Class CheckpointsCleaner
- java.lang.Object
-
- org.apache.flink.runtime.checkpoint.CheckpointsCleaner
-
- All Implemented Interfaces:
Serializable
,AutoCloseable
,AutoCloseableAsync
@ThreadSafe public class CheckpointsCleaner extends Object implements Serializable, AutoCloseableAsync
Delegate class responsible for checkpoints cleaning and counting the number of checkpoints yet to clean.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CheckpointsCleaner()
CheckpointsCleaner(boolean parallelMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSubsumedCheckpoint(CompletedCheckpoint completedCheckpoint)
Add one subsumed checkpoint to CheckpointsCleaner, the subsumed checkpoint would be discarded atcleanSubsumedCheckpoints(long, Set, Runnable, Executor)
.void
cleanCheckpoint(Checkpoint checkpoint, boolean shouldDiscard, Runnable postCleanAction, Executor executor)
void
cleanCheckpointOnFailedStoring(CompletedCheckpoint completedCheckpoint, Executor executor)
void
cleanSubsumedCheckpoints(long upTo, Set<Long> stillInUse, Runnable postCleanAction, Executor executor)
Clean checkpoint that is not in the given {@param stillInUse}.CompletableFuture<Void>
closeAsync()
Trigger the closing of the resource and return the corresponding close future.-
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.util.AutoCloseableAsync
close
-
-
-
-
Method Detail
-
cleanCheckpoint
public void cleanCheckpoint(Checkpoint checkpoint, boolean shouldDiscard, Runnable postCleanAction, Executor executor)
-
addSubsumedCheckpoint
public void addSubsumedCheckpoint(CompletedCheckpoint completedCheckpoint)
Add one subsumed checkpoint to CheckpointsCleaner, the subsumed checkpoint would be discarded atcleanSubsumedCheckpoints(long, Set, Runnable, Executor)
.- Parameters:
completedCheckpoint
- which is subsumed.
-
cleanSubsumedCheckpoints
public void cleanSubsumedCheckpoints(long upTo, Set<Long> stillInUse, Runnable postCleanAction, Executor executor)
Clean checkpoint that is not in the given {@param stillInUse}.- Parameters:
upTo
- lowest CheckpointID which is still valid.stillInUse
- the state of those checkpoints are still referenced.postCleanAction
- post action after cleaning.executor
- is used to perform the cleanup logic.
-
cleanCheckpointOnFailedStoring
public void cleanCheckpointOnFailedStoring(CompletedCheckpoint completedCheckpoint, Executor executor)
-
closeAsync
public CompletableFuture<Void> closeAsync()
Description copied from interface:AutoCloseableAsync
Trigger the closing of the resource and return the corresponding close future.- Specified by:
closeAsync
in interfaceAutoCloseableAsync
- Returns:
- Future which is completed once the resource has been closed
-
-