Class StopWithSavepointTerminationManager

java.lang.Object
org.apache.flink.runtime.scheduler.stopwithsavepoint.StopWithSavepointTerminationManager

public class StopWithSavepointTerminationManager extends Object
StopWithSavepointTerminationManager fulfills the contract given by StopWithSavepointTerminationHandler to run the stop-with-savepoint steps in a specific order.
  • Constructor Details

  • 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 passed CompletableFuture instances in accordance to the contract of StopWithSavepointTerminationHandler.
      Parameters:
      completedSavepointFuture - The CompletableFuture of the savepoint creation step.
      terminatedExecutionStatesFuture - The CompletableFuture of the termination step.
      mainThreadExecutor - The executor the StopWithSavepointTerminationHandler operations run on.
      Returns:
      A CompletableFuture containing 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)