public class StopWithSavepointTerminationHandlerImpl extends Object implements StopWithSavepointTerminationHandler
The operation only succeeds if both steps, the savepoint creation and the successful termination of the job, succeed. If the former step fails, the operation fails exceptionally without any further actions. If the latter one fails, a global fail-over is triggered before failing the operation.
The implementation expects the savepoint creation being completed before the executions terminate.
|Constructor and Description|
|Modifier and Type||Method and Description|
Returns the a
Handles the termination of the job based on the passed terminated
Handles the result of a
public StopWithSavepointTerminationHandlerImpl(JobID jobId, S schedulerWithCheckpointing, org.slf4j.Logger log)
public CompletableFuture<String> getSavepointPath()
CompletableFuturereferring to the result of the stop-with-savepoint operation.
CompletableFuturecontaining the path to the created savepoint in case of success.
public void handleSavepointCreation(CompletedCheckpoint completedSavepoint, Throwable throwable)
CompletedCheckpoint. Only one of the two parameters are allowed to be set.
CompletedCheckpointreferring to the created savepoint
throwable- an error that was caught during savepoint creation
public void handleExecutionsTermination(Collection<ExecutionState> terminatedExecutionStates)
ExecutionStates. stop-with-savepoint expects the
terminatedExecutionStatesto only contain
terminatedExecutionStates- The terminated
ExecutionStatesof the underlying job.
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.