public class StopWithSavepointTerminationHandlerImpl extends Object implements StopWithSavepointTerminationHandler
StopWithSavepointTerminationHandlerImpl 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.
| 构造器和说明 |
|---|
StopWithSavepointTerminationHandlerImpl(org.apache.flink.api.common.JobID jobId,
S schedulerWithCheckpointing,
org.slf4j.Logger log) |
| 限定符和类型 | 方法和说明 |
|---|---|
CompletableFuture<String> |
getSavepointPath()
Returns the a
CompletableFuture referring to the result of the stop-with-savepoint
operation. |
void |
handleExecutionsTermination(Collection<ExecutionState> terminatedExecutionStates)
Handles the termination of the job based on the passed terminated
ExecutionStates. stop-with-savepoint expects the terminatedExecutionStates to only
contain ExecutionState.FINISHED to succeed. |
void |
handleSavepointCreation(CompletedCheckpoint completedSavepoint,
Throwable throwable)
Handles the result of a
CompletableFuture holding a CompletedCheckpoint. |
public StopWithSavepointTerminationHandlerImpl(org.apache.flink.api.common.JobID jobId,
S schedulerWithCheckpointing,
org.slf4j.Logger log)
public CompletableFuture<String> getSavepointPath()
StopWithSavepointTerminationHandlerCompletableFuture referring to the result of the stop-with-savepoint
operation.getSavepointPath 在接口中 StopWithSavepointTerminationHandlerCompletableFuture containing the path to the created savepoint in case of
success.public void handleSavepointCreation(CompletedCheckpoint completedSavepoint, Throwable throwable)
StopWithSavepointTerminationHandlerCompletableFuture holding a CompletedCheckpoint. Only
one of the two parameters are allowed to be set.handleSavepointCreation 在接口中 StopWithSavepointTerminationHandlercompletedSavepoint - the CompletedCheckpoint referring to the created savepointthrowable - an error that was caught during savepoint creationpublic void handleExecutionsTermination(Collection<ExecutionState> terminatedExecutionStates)
StopWithSavepointTerminationHandlerExecutionStates. stop-with-savepoint expects the terminatedExecutionStates to only
contain ExecutionState.FINISHED to succeed.handleExecutionsTermination 在接口中 StopWithSavepointTerminationHandlerterminatedExecutionStates - The terminated ExecutionStates of the underlying
job.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.