Class StopWithSavepointTerminationManager
- java.lang.Object
-
- org.apache.flink.runtime.scheduler.stopwithsavepoint.StopWithSavepointTerminationManager
-
public class StopWithSavepointTerminationManager extends Object
StopWithSavepointTerminationManager
fulfills the contract given byStopWithSavepointTerminationHandler
to run the stop-with-savepoint steps in a specific order.
-
-
Constructor Summary
Constructors Constructor Description StopWithSavepointTerminationManager(StopWithSavepointTerminationHandler stopWithSavepointTerminationHandler)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
checkSavepointActionPreconditions(CheckpointCoordinator checkpointCoordinator, String targetDirectory, JobID jobId, org.slf4j.Logger logger)
CompletableFuture<String>
stopWithSavepoint(CompletableFuture<CompletedCheckpoint> completedSavepointFuture, CompletableFuture<Collection<ExecutionState>> terminatedExecutionStatesFuture, ComponentMainThreadExecutor mainThreadExecutor)
Enforces the correct completion order of the passedCompletableFuture
instances in accordance to the contract ofStopWithSavepointTerminationHandler
.
-
-
-
Constructor Detail
-
StopWithSavepointTerminationManager
public StopWithSavepointTerminationManager(StopWithSavepointTerminationHandler stopWithSavepointTerminationHandler)
-
-
Method Detail
-
stopWithSavepoint
public CompletableFuture<String> stopWithSavepoint(CompletableFuture<CompletedCheckpoint> completedSavepointFuture, CompletableFuture<Collection<ExecutionState>> terminatedExecutionStatesFuture, ComponentMainThreadExecutor mainThreadExecutor)
Enforces the correct completion order of the passedCompletableFuture
instances in accordance to the contract ofStopWithSavepointTerminationHandler
.- Parameters:
completedSavepointFuture
- TheCompletableFuture
of the savepoint creation step.terminatedExecutionStatesFuture
- TheCompletableFuture
of the termination step.mainThreadExecutor
- The executor theStopWithSavepointTerminationHandler
operations run on.- Returns:
- A
CompletableFuture
containing the path to the created savepoint.
-
checkSavepointActionPreconditions
public static void checkSavepointActionPreconditions(CheckpointCoordinator checkpointCoordinator, @Nullable String targetDirectory, JobID jobId, org.slf4j.Logger logger)
-
-