public abstract class AbstractCompleteCheckpointStore extends Object implements CompletedCheckpointStore
CompletedCheckpointStore
, which holds the SharedStateRegistry
and provides the registration of shared state.LOG
Constructor and Description |
---|
AbstractCompleteCheckpointStore(SharedStateRegistry sharedStateRegistry) |
Modifier and Type | Method and Description |
---|---|
protected static Optional<Long> |
findLowest(Deque<CompletedCheckpoint> unSubsumedCheckpoints) |
SharedStateRegistry |
getSharedStateRegistry()
Returns the
SharedStateRegistry 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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addCheckpointAndSubsumeOldestOne, getAllCheckpoints, getLatestCheckpoint, getLatestCheckpointId, getMaxNumberOfRetainedCheckpoints, getNumberOfRetainedCheckpoints, requiresExternalizedCheckpoints
public AbstractCompleteCheckpointStore(SharedStateRegistry sharedStateRegistry)
public SharedStateRegistry getSharedStateRegistry()
CompletedCheckpointStore
SharedStateRegistry
used to register the shared state.getSharedStateRegistry
in interface CompletedCheckpointStore
public void shutdown(JobStatus jobStatus, CheckpointsCleaner checkpointsCleaner) throws Exception
CompletedCheckpointStore
The job status is forwarded and used to decide whether state should actually be discarded
or kept. SharedStateRegistry.unregisterUnusedState(long)
and CheckpointsCleaner.cleanSubsumedCheckpoints(long, java.util.Set<java.lang.Long>, java.lang.Runnable, java.util.concurrent.Executor)
should be called here to subsume unused state.
shutdown
in interface CompletedCheckpointStore
jobStatus
- Job state on shut downcheckpointsCleaner
- that will cleanup completed checkpoints if neededException
protected void unregisterUnusedState(Deque<CompletedCheckpoint> unSubsumedCheckpoints)
protected static Optional<Long> findLowest(Deque<CompletedCheckpoint> unSubsumedCheckpoints)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.