@DefaultCoder(value=AvroCoder.class) public static class CountingSource.CounterMark extends Object implements UnboundedSource.CheckpointMark
CountingSource is simply the last value produced. The
associated source object encapsulates the information needed to produce the next value.| Constructor and Description |
|---|
CounterMark(long lastEmitted)
Creates a checkpoint mark reflecting the last emitted value.
|
| Modifier and Type | Method and Description |
|---|---|
void |
finalizeCheckpoint()
Perform any finalization that needs to happen after a bundle of data read from
the source has been processed and committed.
|
long |
getLastEmitted()
Returns the last value emitted by the reader.
|
public CounterMark(long lastEmitted)
public long getLastEmitted()
public void finalizeCheckpoint()
throws IOException
UnboundedSource.CheckpointMarkFor example, this could be sending acknowledgement requests to an external data source such as Pub/Sub.
This may be called from any thread, potentially at the same time as calls to the
UnboundedReader that created it.
finalizeCheckpoint in interface UnboundedSource.CheckpointMarkIOException