Package org.apache.flink.runtime.state
Interface ManagedSnapshotContext
- All Known Subinterfaces:
FunctionSnapshotContext,StateSnapshotContext
- All Known Implementing Classes:
StateSnapshotContextSynchronousImpl
@PublicEvolving
public interface ManagedSnapshotContext
This interface provides a context in which operators that use managed state (i.e. state that is
managed by state backends) can perform a snapshot. As snapshots of the backends themselves are
taken by the system, this interface mainly provides meta information about the checkpoint.
-
Method Summary
Modifier and TypeMethodDescriptionlongReturns the ID of the checkpoint for which the snapshot is taken.longReturns timestamp (wall clock time) when the master node triggered the checkpoint for which the state snapshot is taken.
-
Method Details
-
getCheckpointId
long getCheckpointId()Returns the ID of the checkpoint for which the snapshot is taken.The checkpoint ID is guaranteed to be strictly monotonously increasing across checkpoints. For two completed checkpoints A and B,
ID_B > ID_Ameans that checkpoint B subsumes checkpoint A, i.e., checkpoint B contains a later state than checkpoint A. -
getCheckpointTimestamp
long getCheckpointTimestamp()Returns timestamp (wall clock time) when the master node triggered the checkpoint for which the state snapshot is taken.
-