Class AbstractCompleteCheckpointStore
- java.lang.Object
-
- org.apache.flink.runtime.checkpoint.AbstractCompleteCheckpointStore
-
- All Implemented Interfaces:
CompletedCheckpointStore
- Direct Known Subclasses:
DefaultCompletedCheckpointStore
,EmbeddedCompletedCheckpointStore
,StandaloneCompletedCheckpointStore
public abstract class AbstractCompleteCheckpointStore extends Object implements CompletedCheckpointStore
The abstract class ofCompletedCheckpointStore
, which holds theSharedStateRegistry
and provides the registration of shared state.
-
-
Field Summary
-
Fields inherited from interface org.apache.flink.runtime.checkpoint.CompletedCheckpointStore
LOG
-
-
Constructor Summary
Constructors Constructor Description AbstractCompleteCheckpointStore(SharedStateRegistry sharedStateRegistry)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static Optional<Long>
findLowest(Deque<CompletedCheckpoint> unSubsumedCheckpoints)
SharedStateRegistry
getSharedStateRegistry()
Returns theSharedStateRegistry
used to register the shared state.void
shutdown(JobStatus jobStatus, CheckpointsCleaner checkpointsCleaner)
Shuts down the store.protected void
unregisterUnusedState(Deque<CompletedCheckpoint> unSubsumedCheckpoints)
Unregister shared states that are no longer in use.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.runtime.checkpoint.CompletedCheckpointStore
addCheckpointAndSubsumeOldestOne, getAllCheckpoints, getLatestCheckpoint, getLatestCheckpointId, getMaxNumberOfRetainedCheckpoints, getNumberOfRetainedCheckpoints, requiresExternalizedCheckpoints
-
-
-
-
Constructor Detail
-
AbstractCompleteCheckpointStore
public AbstractCompleteCheckpointStore(SharedStateRegistry sharedStateRegistry)
-
-
Method Detail
-
getSharedStateRegistry
public SharedStateRegistry getSharedStateRegistry()
Description copied from interface:CompletedCheckpointStore
Returns theSharedStateRegistry
used to register the shared state.- Specified by:
getSharedStateRegistry
in interfaceCompletedCheckpointStore
-
shutdown
public void shutdown(JobStatus jobStatus, CheckpointsCleaner checkpointsCleaner) throws Exception
Description copied from interface:CompletedCheckpointStore
Shuts down the store.The job status is forwarded and used to decide whether state should actually be discarded or kept.
SharedStateRegistry.unregisterUnusedState(long)
andCheckpointsCleaner.cleanSubsumedCheckpoints(long, java.util.Set<java.lang.Long>, java.lang.Runnable, java.util.concurrent.Executor)
should be called here to subsume unused state.- Specified by:
shutdown
in interfaceCompletedCheckpointStore
- Parameters:
jobStatus
- Job state on shut downcheckpointsCleaner
- that will cleanup completed checkpoints if needed- Throws:
Exception
-
unregisterUnusedState
protected void unregisterUnusedState(Deque<CompletedCheckpoint> unSubsumedCheckpoints)
Unregister shared states that are no longer in use. Should be called after completing a checkpoint (even if no checkpoint was subsumed, so that state added by an aborted checkpoints and not used later can be removed).
-
findLowest
protected static Optional<Long> findLowest(Deque<CompletedCheckpoint> unSubsumedCheckpoints)
-
-