public class StopWithSavepointTerminationManager extends Object
StopWithSavepointTerminationManager
fulfills the contract given by StopWithSavepointTerminationHandler
to run the stop-with-savepoint steps in a specific order.Constructor and Description |
---|
StopWithSavepointTerminationManager(StopWithSavepointTerminationHandler stopWithSavepointTerminationHandler) |
Modifier and Type | Method and 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 passed
CompletableFuture instances in
accordance to the contract of StopWithSavepointTerminationHandler . |
public StopWithSavepointTerminationManager(StopWithSavepointTerminationHandler stopWithSavepointTerminationHandler)
public CompletableFuture<String> stopWithSavepoint(CompletableFuture<CompletedCheckpoint> completedSavepointFuture, CompletableFuture<Collection<ExecutionState>> terminatedExecutionStatesFuture, ComponentMainThreadExecutor mainThreadExecutor)
CompletableFuture
instances in
accordance to the contract of StopWithSavepointTerminationHandler
.completedSavepointFuture
- The CompletableFuture
of the savepoint creation step.terminatedExecutionStatesFuture
- The CompletableFuture
of the termination step.mainThreadExecutor
- The executor the StopWithSavepointTerminationHandler
operations run on.CompletableFuture
containing the path to the created savepoint.public static void checkSavepointActionPreconditions(CheckpointCoordinator checkpointCoordinator, @Nullable String targetDirectory, JobID jobId, org.slf4j.Logger logger)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.