@NotThreadSafe public class CompletedCheckpoint extends Object implements Serializable, Checkpoint
In most cases, the CompletedCheckpoint objects are very small, because the handles to the checkpoint states are only pointers (such as file paths). However, the some state backend implementations may choose to store some payload data directly with the metadata (for example to avoid many small files). If those thresholds are increased to large values, the memory consumption of the CompletedCheckpoint objects can be significant.
The metadata of the CompletedCheckpoint is also persisted in an external storage system. Checkpoints have an external pointer, which points to the metadata. For example when storing a checkpoint in a file system, that pointer is the file path to the checkpoint's folder or the metadata file. For a state backend that stores metadata in database tables, the pointer could be the table name and row key. The pointer is encoded as a String.
| Modifier and Type | Class and Description |
|---|---|
class |
CompletedCheckpoint.CompletedCheckpointDiscardObject
Implementation of
Checkpoint.DiscardObject. |
Checkpoint.DiscardObjectNOOP_DISCARD_OBJECT| Constructor and Description |
|---|
CompletedCheckpoint(org.apache.flink.api.common.JobID job,
long checkpointID,
long timestamp,
long completionTimestamp,
Map<OperatorID,OperatorState> operatorStates,
Collection<MasterState> masterHookStates,
CheckpointProperties props,
CompletedCheckpointStorageLocation storageLocation,
CompletedCheckpointStats completedCheckpointStats) |
public CompletedCheckpoint(org.apache.flink.api.common.JobID job,
long checkpointID,
long timestamp,
long completionTimestamp,
Map<OperatorID,OperatorState> operatorStates,
@Nullable
Collection<MasterState> masterHookStates,
CheckpointProperties props,
CompletedCheckpointStorageLocation storageLocation,
@Nullable
CompletedCheckpointStats completedCheckpointStats)
public org.apache.flink.api.common.JobID getJobId()
public long getCheckpointID()
getCheckpointID in interface Checkpointpublic long getTimestamp()
public long getCompletionTimestamp()
public CheckpointProperties getProperties()
public Map<OperatorID,OperatorState> getOperatorStates()
public Collection<MasterState> getMasterHookStates()
public StreamStateHandle getMetadataHandle()
public String getExternalPointer()
public long getStateSize()
public void registerSharedStatesAfterRestored(SharedStateRegistry sharedStateRegistry, RestoreMode restoreMode)
sharedStateRegistry - The registry where shared states are registeredrestoreMode - the mode in which this checkpoint was restored frompublic Checkpoint.DiscardObject markAsDiscarded()
CheckpointCheckpoint.DiscardObject.discard() method and should be called from the
CheckpointCoordinator(under the lock) while Checkpoint.DiscardObject.discard() can be
called from any thread/place.markAsDiscarded in interface Checkpointpublic Checkpoint.DiscardObject markAsDiscardedOnSubsume()
public Checkpoint.DiscardObject markAsDiscardedOnShutdown(org.apache.flink.api.common.JobStatus jobStatus)
public boolean shouldBeDiscardedOnSubsume()
public boolean shouldBeDiscardedOnShutdown(org.apache.flink.api.common.JobStatus jobStatus)
public static boolean checkpointsMatch(Collection<CompletedCheckpoint> first, Collection<CompletedCheckpoint> second)
@Nullable public CompletedCheckpointStats getStatistic()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.