public class PendingCheckpoint extends Object
CompletedCheckpoint.
Note that the pending checkpoint, as well as the successful checkpoint keep the state handles always as serialized values, never as actual values.
| Modifier and Type | Class and Description |
|---|---|
static class |
PendingCheckpoint.TaskAcknowledgeResult
Result of the
acknowledgedTasks method. |
| Constructor and Description |
|---|
PendingCheckpoint(org.apache.flink.api.common.JobID jobId,
long checkpointId,
long checkpointTimestamp,
Map<ExecutionAttemptID,ExecutionVertex> verticesToConfirm,
Collection<String> masterStateIdentifiers,
CheckpointProperties props,
CheckpointStorageLocation targetLocation,
Executor executor) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(CheckpointFailureReason reason)
Aborts a checkpoint with reason and cause.
|
void |
abort(CheckpointFailureReason reason,
Throwable cause)
Aborts a checkpoint with reason and cause.
|
void |
acknowledgeMasterState(String identifier,
MasterState state)
Acknowledges a master state (state generated on the checkpoint coordinator) to
the pending checkpoint.
|
PendingCheckpoint.TaskAcknowledgeResult |
acknowledgeTask(ExecutionAttemptID executionAttemptId,
TaskStateSnapshot operatorSubtaskStates,
CheckpointMetrics metrics)
Acknowledges the task with the given execution attempt id and the given subtask state.
|
boolean |
areMasterStatesFullyAcknowledged() |
boolean |
areTasksFullyAcknowledged() |
boolean |
canBeSubsumed()
Checks whether this checkpoint can be subsumed or whether it should always continue, regardless
of newer checkpoints in progress.
|
CompletedCheckpoint |
finalizeCheckpoint() |
long |
getCheckpointId() |
long |
getCheckpointTimestamp() |
CompletableFuture<CompletedCheckpoint> |
getCompletionFuture()
Returns the completion future.
|
org.apache.flink.api.common.JobID |
getJobId() |
List<MasterState> |
getMasterStates() |
int |
getNumberOfAcknowledgedTasks() |
int |
getNumberOfNonAcknowledgedTasks() |
Map<OperatorID,OperatorState> |
getOperatorStates() |
boolean |
isAcknowledgedBy(ExecutionAttemptID executionAttemptId) |
boolean |
isDiscarded() |
boolean |
setCancellerHandle(ScheduledFuture<?> cancellerHandle)
Sets the handle for the canceller to this pending checkpoint.
|
String |
toString() |
public PendingCheckpoint(org.apache.flink.api.common.JobID jobId,
long checkpointId,
long checkpointTimestamp,
Map<ExecutionAttemptID,ExecutionVertex> verticesToConfirm,
Collection<String> masterStateIdentifiers,
CheckpointProperties props,
CheckpointStorageLocation targetLocation,
Executor executor)
public org.apache.flink.api.common.JobID getJobId()
public long getCheckpointId()
public long getCheckpointTimestamp()
public int getNumberOfNonAcknowledgedTasks()
public int getNumberOfAcknowledgedTasks()
public Map<OperatorID,OperatorState> getOperatorStates()
public List<MasterState> getMasterStates()
public boolean areMasterStatesFullyAcknowledged()
public boolean areTasksFullyAcknowledged()
public boolean isAcknowledgedBy(ExecutionAttemptID executionAttemptId)
public boolean isDiscarded()
public boolean canBeSubsumed()
public boolean setCancellerHandle(ScheduledFuture<?> cancellerHandle)
public CompletableFuture<CompletedCheckpoint> getCompletionFuture()
public CompletedCheckpoint finalizeCheckpoint() throws IOException
IOExceptionpublic PendingCheckpoint.TaskAcknowledgeResult acknowledgeTask(ExecutionAttemptID executionAttemptId, TaskStateSnapshot operatorSubtaskStates, CheckpointMetrics metrics)
executionAttemptId - of the acknowledged taskoperatorSubtaskStates - of the acknowledged taskmetrics - Checkpoint metrics for the statspublic void acknowledgeMasterState(String identifier, @Nullable MasterState state)
identifier - The identifier of the master statestate - The state to acknowledgepublic void abort(CheckpointFailureReason reason, @Nullable Throwable cause)
public void abort(CheckpointFailureReason reason)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.