Class StopWithSavepointTerminationManager
java.lang.Object
org.apache.flink.runtime.scheduler.stopwithsavepoint.StopWithSavepointTerminationManager
StopWithSavepointTerminationManager fulfills the contract given by StopWithSavepointTerminationHandler to run the stop-with-savepoint steps in a specific order.-
Constructor Summary
ConstructorsConstructorDescriptionStopWithSavepointTerminationManager(StopWithSavepointTerminationHandler stopWithSavepointTerminationHandler) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckSavepointActionPreconditions(CheckpointCoordinator checkpointCoordinator, String targetDirectory, org.apache.flink.api.common.JobID jobId, org.slf4j.Logger logger) stopWithSavepoint(CompletableFuture<CompletedCheckpoint> completedSavepointFuture, CompletableFuture<Collection<ExecutionState>> terminatedExecutionStatesFuture, org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor mainThreadExecutor) Enforces the correct completion order of the passedCompletableFutureinstances in accordance to the contract ofStopWithSavepointTerminationHandler.
-
Constructor Details
-
StopWithSavepointTerminationManager
public StopWithSavepointTerminationManager(StopWithSavepointTerminationHandler stopWithSavepointTerminationHandler)
-
-
Method Details
-
stopWithSavepoint
public CompletableFuture<String> stopWithSavepoint(CompletableFuture<CompletedCheckpoint> completedSavepointFuture, CompletableFuture<Collection<ExecutionState>> terminatedExecutionStatesFuture, org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor mainThreadExecutor) Enforces the correct completion order of the passedCompletableFutureinstances in accordance to the contract ofStopWithSavepointTerminationHandler.- Parameters:
completedSavepointFuture- TheCompletableFutureof the savepoint creation step.terminatedExecutionStatesFuture- TheCompletableFutureof the termination step.mainThreadExecutor- The executor theStopWithSavepointTerminationHandleroperations run on.- Returns:
- A
CompletableFuturecontaining the path to the created savepoint.
-
checkSavepointActionPreconditions
public static void checkSavepointActionPreconditions(CheckpointCoordinator checkpointCoordinator, @Nullable String targetDirectory, org.apache.flink.api.common.JobID jobId, org.slf4j.Logger logger)
-