@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.DiscardObject
NOOP_DISCARD_OBJECT
Constructor and Description |
---|
CompletedCheckpoint(JobID job,
long checkpointID,
long timestamp,
long completionTimestamp,
Map<OperatorID,OperatorState> operatorStates,
Collection<MasterState> masterHookStates,
CheckpointProperties props,
CompletedCheckpointStorageLocation storageLocation,
CompletedCheckpointStats completedCheckpointStats) |
CompletedCheckpoint(JobID job,
long checkpointID,
long timestamp,
long completionTimestamp,
Map<OperatorID,OperatorState> operatorStates,
Collection<MasterState> masterHookStates,
CheckpointProperties props,
CompletedCheckpointStorageLocation storageLocation,
CompletedCheckpointStats completedCheckpointStats,
CheckpointProperties restoredProps) |
public CompletedCheckpoint(JobID job, long checkpointID, long timestamp, long completionTimestamp, Map<OperatorID,OperatorState> operatorStates, @Nullable Collection<MasterState> masterHookStates, CheckpointProperties props, CompletedCheckpointStorageLocation storageLocation, @Nullable CompletedCheckpointStats completedCheckpointStats)
public CompletedCheckpoint(JobID job, long checkpointID, long timestamp, long completionTimestamp, Map<OperatorID,OperatorState> operatorStates, @Nullable Collection<MasterState> masterHookStates, CheckpointProperties props, CompletedCheckpointStorageLocation storageLocation, @Nullable CompletedCheckpointStats completedCheckpointStats, @Nullable CheckpointProperties restoredProps)
public JobID getJobId()
public long getCheckpointID()
getCheckpointID
in interface Checkpoint
public long getTimestamp()
public long getCompletionTimestamp()
public CheckpointProperties getProperties()
public Optional<CheckpointProperties> getRestoredProperties()
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()
Checkpoint
Checkpoint.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 Checkpoint
public Checkpoint.DiscardObject markAsDiscardedOnSubsume()
public Checkpoint.DiscardObject markAsDiscardedOnShutdown(JobStatus jobStatus)
public boolean shouldBeDiscardedOnSubsume()
public boolean shouldBeDiscardedOnShutdown(JobStatus jobStatus)
public static boolean checkpointsMatch(Collection<CompletedCheckpoint> first, Collection<CompletedCheckpoint> second)
@Nullable public CompletedCheckpointStats getStatistic()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.