public class CheckpointFailureManager extends Object
限定符和类型 | 类和说明 |
---|---|
static interface |
CheckpointFailureManager.FailJobCallback
A callback interface about how to fail a job.
|
限定符和类型 | 字段和说明 |
---|---|
static int |
UNLIMITED_TOLERABLE_FAILURE_NUMBER |
构造器和说明 |
---|
CheckpointFailureManager(int tolerableCpFailureNumber,
CheckpointFailureManager.FailJobCallback failureCallback) |
限定符和类型 | 方法和说明 |
---|---|
void |
checkFailureCounter(CheckpointException exception,
long checkpointId) |
void |
handleCheckpointSuccess(long checkpointId)
Handle checkpoint success.
|
void |
handleJobLevelCheckpointException(CheckpointException exception,
long checkpointId)
Handle job level checkpoint exception with a handler callback.
|
void |
handleTaskLevelCheckpointException(CheckpointException exception,
long checkpointId,
ExecutionAttemptID executionAttemptID)
Handle task level checkpoint exception with a handler callback.
|
public static final int UNLIMITED_TOLERABLE_FAILURE_NUMBER
public CheckpointFailureManager(int tolerableCpFailureNumber, CheckpointFailureManager.FailJobCallback failureCallback)
public void handleJobLevelCheckpointException(CheckpointException exception, long checkpointId)
exception
- the checkpoint exception.checkpointId
- the failed checkpoint id used to count the continuous failure number based on
checkpoint id sequence. In trigger phase, we may not get the checkpoint id when the failure
happens before the checkpoint id generation. In this case, it will be specified a negative
latest generated checkpoint id as a special flag.public void handleTaskLevelCheckpointException(CheckpointException exception, long checkpointId, ExecutionAttemptID executionAttemptID)
exception
- the checkpoint exception.checkpointId
- the failed checkpoint id used to count the continuous failure number based on
checkpoint id sequence. In trigger phase, we may not get the checkpoint id when the failure
happens before the checkpoint id generation. In this case, it will be specified a negative
latest generated checkpoint id as a special flag.executionAttemptID
- the execution attempt id, as a safe guard.public void checkFailureCounter(CheckpointException exception, long checkpointId)
public void handleCheckpointSuccess(long checkpointId)
checkpointId
- the failed checkpoint id used to count the continuous failure number based on
checkpoint id sequence.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.