@DefaultCoder(value=AvroCoder.class) public static class CountingSource.CounterMark extends java.lang.Object implements UnboundedSource.CheckpointMark
CountingSourceis simply the last value produced. The associated source object encapsulates the information needed to produce the next value.
|Constructor and Description|
Creates a checkpoint mark reflecting the last emitted value.
|Modifier and Type||Method and Description|
Called by the system to signal that this checkpoint mark has been committed along with all the records which have been read from the
Returns the last value emitted by the reader.
Returns the time the reader was started.
public CounterMark(long lastEmitted, org.joda.time.Instant startTime)
public long getLastEmitted()
public org.joda.time.Instant getStartTime()
public void finalizeCheckpoint() throws java.io.IOException
UnboundedSource.UnboundedReadersince the previous checkpoint was taken.
For example, this method could send acknowledgements to an external data source such as Pubsub.
UnboundedSource.UnboundedReaderit was created from.
UnboundedSource.UnboundedReaderhas not yet be finalized.
UnboundedSource.UnboundedReaderfrom which this checkpoint was created still exists at the time this method is called.