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 theSharedStateRegistryand 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)SharedStateRegistrygetSharedStateRegistry()Returns theSharedStateRegistryused to register the shared state.voidshutdown(org.apache.flink.api.common.JobStatus jobStatus, CheckpointsCleaner checkpointsCleaner)Shuts down the store.protected voidunregisterUnusedState(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:CompletedCheckpointStoreReturns theSharedStateRegistryused to register the shared state.- Specified by:
getSharedStateRegistryin interfaceCompletedCheckpointStore
-
shutdown
public void shutdown(org.apache.flink.api.common.JobStatus jobStatus, CheckpointsCleaner checkpointsCleaner) throws ExceptionDescription copied from interface:CompletedCheckpointStoreShuts 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:
shutdownin 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)
-
-