Package org.apache.flink.runtime.state
Class StateSnapshotContextSynchronousImpl
java.lang.Object
org.apache.flink.runtime.state.StateSnapshotContextSynchronousImpl
- All Implemented Interfaces:
FunctionSnapshotContext,ManagedSnapshotContext,StateSnapshotContext
This class is a default implementation for StateSnapshotContext.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RunnableFuture<SnapshotResult<KeyedStateHandle>>protected RunnableFuture<SnapshotResult<OperatorStateHandle>> -
Constructor Summary
ConstructorsConstructorDescriptionStateSnapshotContextSynchronousImpl(long checkpointId, long checkpointTimestamp) StateSnapshotContextSynchronousImpl(long checkpointId, long checkpointTimestamp, CheckpointStreamFactory streamFactory, KeyGroupRange keyGroupRange, org.apache.flink.core.fs.CloseableRegistry closableRegistry) -
Method Summary
Modifier and TypeMethodDescriptionvoidlongReturns 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.Returns an output stream for keyed stateReturns an output stream for operator state
-
Field Details
-
keyedStateCheckpointClosingFuture
-
operatorStateCheckpointClosingFuture
-
-
Constructor Details
-
StateSnapshotContextSynchronousImpl
@VisibleForTesting public StateSnapshotContextSynchronousImpl(long checkpointId, long checkpointTimestamp) -
StateSnapshotContextSynchronousImpl
public StateSnapshotContextSynchronousImpl(long checkpointId, long checkpointTimestamp, CheckpointStreamFactory streamFactory, KeyGroupRange keyGroupRange, org.apache.flink.core.fs.CloseableRegistry closableRegistry)
-
-
Method Details
-
getCheckpointId
public long getCheckpointId()Description copied from interface:ManagedSnapshotContextReturns 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.- Specified by:
getCheckpointIdin interfaceManagedSnapshotContext
-
getCheckpointTimestamp
public long getCheckpointTimestamp()Description copied from interface:ManagedSnapshotContextReturns timestamp (wall clock time) when the master node triggered the checkpoint for which the state snapshot is taken.- Specified by:
getCheckpointTimestampin interfaceManagedSnapshotContext
-
getRawKeyedOperatorStateOutput
Description copied from interface:StateSnapshotContextReturns an output stream for keyed state- Specified by:
getRawKeyedOperatorStateOutputin interfaceStateSnapshotContext- Throws:
Exception
-
getRawOperatorStateOutput
Description copied from interface:StateSnapshotContextReturns an output stream for operator state- Specified by:
getRawOperatorStateOutputin interfaceStateSnapshotContext- Throws:
Exception
-
getKeyedStateStreamFuture
@Nonnull public RunnableFuture<SnapshotResult<KeyedStateHandle>> getKeyedStateStreamFuture() throws IOException- Throws:
IOException
-
getOperatorStateStreamFuture
@Nonnull public RunnableFuture<SnapshotResult<OperatorStateHandle>> getOperatorStateStreamFuture() throws IOException- Throws:
IOException
-
closeExceptionally
- Throws:
IOException
-