Package cz.o2.proxima.beam.direct.io
Class BeamCommitLogReader.UnboundedCommitLogReader
- java.lang.Object
-
- org.apache.beam.sdk.io.Source.Reader<OutputT>
-
- org.apache.beam.sdk.io.UnboundedSource.UnboundedReader<StreamElement>
-
- cz.o2.proxima.beam.direct.io.BeamCommitLogReader.UnboundedCommitLogReader
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Enclosing class:
- BeamCommitLogReader
static class BeamCommitLogReader.UnboundedCommitLogReader extends org.apache.beam.sdk.io.UnboundedSource.UnboundedReader<StreamElement>
-
-
Field Summary
Fields Modifier and Type Field Description private booleanfinishedprivate org.joda.time.InstantpreviousWatermarkprivate BeamCommitLogReaderreaderprivate DirectUnboundedSourcesource
-
Constructor Summary
Constructors Constructor Description UnboundedCommitLogReader(java.lang.String name, DirectUnboundedSource source, CommitLogReader reader, Position position, boolean eventTime, long limit, Partition partition, Offset offset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadvance()voidclose()DirectUnboundedSource.CheckpointgetCheckpointMark()StreamElementgetCurrent()byte[]getCurrentRecordId()DirectUnboundedSourcegetCurrentSource()org.joda.time.InstantgetCurrentTimestamp()org.joda.time.InstantgetWatermark()booleanstart()
-
-
-
Field Detail
-
source
private final DirectUnboundedSource source
-
reader
private final BeamCommitLogReader reader
-
previousWatermark
private org.joda.time.Instant previousWatermark
-
finished
private boolean finished
-
-
Constructor Detail
-
UnboundedCommitLogReader
UnboundedCommitLogReader(java.lang.String name, DirectUnboundedSource source, CommitLogReader reader, Position position, boolean eventTime, long limit, @Nullable Partition partition, @Nullable Offset offset)
-
-
Method Detail
-
getCurrentSource
public DirectUnboundedSource getCurrentSource()
- Specified by:
getCurrentSourcein classorg.apache.beam.sdk.io.UnboundedSource.UnboundedReader<StreamElement>
-
start
public boolean start() throws java.io.IOException- Specified by:
startin classorg.apache.beam.sdk.io.UnboundedSource.UnboundedReader<StreamElement>- Throws:
java.io.IOException
-
advance
public boolean advance() throws java.io.IOException- Specified by:
advancein classorg.apache.beam.sdk.io.UnboundedSource.UnboundedReader<StreamElement>- Throws:
java.io.IOException
-
getCurrent
public StreamElement getCurrent() throws java.util.NoSuchElementException
- Specified by:
getCurrentin classorg.apache.beam.sdk.io.Source.Reader<StreamElement>- Throws:
java.util.NoSuchElementException
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein classorg.apache.beam.sdk.io.Source.Reader<StreamElement>
-
getWatermark
public org.joda.time.Instant getWatermark()
- Specified by:
getWatermarkin classorg.apache.beam.sdk.io.UnboundedSource.UnboundedReader<StreamElement>
-
getCheckpointMark
public DirectUnboundedSource.Checkpoint getCheckpointMark()
- Specified by:
getCheckpointMarkin classorg.apache.beam.sdk.io.UnboundedSource.UnboundedReader<StreamElement>
-
getCurrentTimestamp
public org.joda.time.Instant getCurrentTimestamp() throws java.util.NoSuchElementException- Specified by:
getCurrentTimestampin classorg.apache.beam.sdk.io.Source.Reader<StreamElement>- Throws:
java.util.NoSuchElementException
-
getCurrentRecordId
public byte[] getCurrentRecordId() throws java.util.NoSuchElementException- Overrides:
getCurrentRecordIdin classorg.apache.beam.sdk.io.UnboundedSource.UnboundedReader<StreamElement>- Throws:
java.util.NoSuchElementException
-
-