public class PendingCheckpoint extends Object implements Checkpoint
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(JobID jobId,
long checkpointId,
long checkpointTimestamp,
org.apache.flink.runtime.checkpoint.CheckpointPlan checkpointPlan,
Collection<OperatorID> operatorCoordinatorsToConfirm,
Collection<String> masterStateIdentifiers,
CheckpointProperties props,
CheckpointStorageLocation targetLocation,
CompletableFuture<CompletedCheckpoint> onCompletionPromise) |
Modifier and Type | Method and Description |
---|---|
void |
abort(CheckpointFailureReason reason,
Throwable cause,
CheckpointsCleaner checkpointsCleaner,
Runnable postCleanup,
Executor executor,
PendingCheckpointStats statsCallback)
Aborts a checkpoint with reason and cause.
|
PendingCheckpoint.TaskAcknowledgeResult |
acknowledgeCoordinatorState(OperatorInfo coordinatorInfo,
ByteStreamStateHandle stateHandle) |
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,
PendingCheckpointStats statsCallback)
Acknowledges the task with the given execution attempt id and the given subtask state.
|
boolean |
canBeSubsumed()
Checks whether this checkpoint can be subsumed or whether it should always continue,
regardless of newer checkpoints in progress.
|
void |
discard()
Discard state.
|
CompletedCheckpoint |
finalizeCheckpoint(CheckpointsCleaner checkpointsCleaner,
Runnable postCleanup,
Executor executor,
PendingCheckpointStats statsCallback) |
long |
getCheckpointId()
Deprecated.
|
long |
getCheckpointID() |
org.apache.flink.runtime.checkpoint.CheckpointPlan |
getCheckpointPlan() |
CheckpointStorageLocation |
getCheckpointStorageLocation() |
long |
getCheckpointTimestamp() |
CompletableFuture<CompletedCheckpoint> |
getCompletionFuture()
Returns the completion future.
|
CheckpointException |
getFailureCause() |
JobID |
getJobId() |
List<MasterState> |
getMasterStates() |
int |
getNumberOfAcknowledgedTasks() |
int |
getNumberOfNonAcknowledgedOperatorCoordinators() |
int |
getNumberOfNonAcknowledgedTasks() |
Map<OperatorID,OperatorState> |
getOperatorStates() |
boolean |
isAcknowledgedBy(ExecutionAttemptID executionAttemptId) |
boolean |
isDisposed() |
boolean |
isFullyAcknowledged() |
boolean |
setCancellerHandle(ScheduledFuture<?> cancellerHandle)
Sets the handle for the canceller to this pending checkpoint.
|
String |
toString() |
public PendingCheckpoint(JobID jobId, long checkpointId, long checkpointTimestamp, org.apache.flink.runtime.checkpoint.CheckpointPlan checkpointPlan, Collection<OperatorID> operatorCoordinatorsToConfirm, Collection<String> masterStateIdentifiers, CheckpointProperties props, CheckpointStorageLocation targetLocation, CompletableFuture<CompletedCheckpoint> onCompletionPromise)
public JobID getJobId()
@Deprecated public long getCheckpointId()
getCheckpointID()
public long getCheckpointID()
getCheckpointID
in interface Checkpoint
public CheckpointStorageLocation getCheckpointStorageLocation()
public long getCheckpointTimestamp()
public int getNumberOfNonAcknowledgedTasks()
public int getNumberOfNonAcknowledgedOperatorCoordinators()
public org.apache.flink.runtime.checkpoint.CheckpointPlan getCheckpointPlan()
public int getNumberOfAcknowledgedTasks()
public Map<OperatorID,OperatorState> getOperatorStates()
public List<MasterState> getMasterStates()
public boolean isFullyAcknowledged()
public boolean isAcknowledgedBy(ExecutionAttemptID executionAttemptId)
public boolean isDisposed()
public boolean canBeSubsumed()
public boolean setCancellerHandle(ScheduledFuture<?> cancellerHandle)
public CheckpointException getFailureCause()
public CompletableFuture<CompletedCheckpoint> getCompletionFuture()
public CompletedCheckpoint finalizeCheckpoint(CheckpointsCleaner checkpointsCleaner, Runnable postCleanup, Executor executor, @Nullable PendingCheckpointStats statsCallback) throws IOException
IOException
public PendingCheckpoint.TaskAcknowledgeResult acknowledgeTask(ExecutionAttemptID executionAttemptId, TaskStateSnapshot operatorSubtaskStates, CheckpointMetrics metrics, @Nullable PendingCheckpointStats statsCallback)
executionAttemptId
- of the acknowledged taskoperatorSubtaskStates
- of the acknowledged taskmetrics
- Checkpoint metrics for the statspublic PendingCheckpoint.TaskAcknowledgeResult acknowledgeCoordinatorState(OperatorInfo coordinatorInfo, @Nullable ByteStreamStateHandle stateHandle)
public 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, CheckpointsCleaner checkpointsCleaner, Runnable postCleanup, Executor executor, PendingCheckpointStats statsCallback)
public void discard()
dispose
.discard
in interface Checkpoint
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.