public class CheckpointFailureManager extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
CheckpointFailureManager.FailJobCallback
A callback interface about how to fail a job.
|
Modifier and Type | Field and Description |
---|---|
static String |
EXCEEDED_CHECKPOINT_TOLERABLE_FAILURE_MESSAGE |
static int |
UNLIMITED_TOLERABLE_FAILURE_NUMBER |
Constructor and Description |
---|
CheckpointFailureManager(int tolerableCpFailureNumber,
CheckpointFailureManager.FailJobCallback failureCallback) |
Modifier and Type | Method and Description |
---|---|
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 static final String EXCEEDED_CHECKPOINT_TOLERABLE_FAILURE_MESSAGE
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–2021 The Apache Software Foundation. All rights reserved.