Class CompletedCheckpoint
- All Implemented Interfaces:
Serializable,Checkpoint
Size the CompletedCheckpoint Instances
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.
Metadata Persistence
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.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.flink.runtime.checkpoint.Checkpoint
Checkpoint.DiscardObject -
Field Summary
Fields inherited from interface org.apache.flink.runtime.checkpoint.Checkpoint
NOOP_DISCARD_OBJECT -
Constructor Summary
ConstructorsConstructorDescriptionCompletedCheckpoint(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) 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, CheckpointProperties restoredProps) -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckpointsMatch(Collection<CompletedCheckpoint> first, Collection<CompletedCheckpoint> second) longlongorg.apache.flink.api.common.JobIDgetJobId()longlongThis method precede theCheckpoint.DiscardObject.discard()method and should be called from theCheckpointCoordinator(under the lock) whileCheckpoint.DiscardObject.discard()can be called from any thread/place.markAsDiscardedOnShutdown(org.apache.flink.api.common.JobStatus jobStatus) voidregisterSharedStatesAfterRestored(SharedStateRegistry sharedStateRegistry, org.apache.flink.core.execution.RecoveryClaimMode recoveryClaimMode) Register all shared states in the given registry.booleanshouldBeDiscardedOnShutdown(org.apache.flink.api.common.JobStatus jobStatus) booleantoString()
-
Constructor Details
-
CompletedCheckpoint
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) -
CompletedCheckpoint
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, @Nullable CheckpointProperties restoredProps)
-
-
Method Details
-
getJobId
public org.apache.flink.api.common.JobID getJobId() -
getCheckpointID
public long getCheckpointID()- Specified by:
getCheckpointIDin interfaceCheckpoint
-
getTimestamp
public long getTimestamp() -
getCompletionTimestamp
public long getCompletionTimestamp() -
getProperties
-
getRestoredProperties
-
getOperatorStates
-
getMasterHookStates
-
getMetadataHandle
-
getExternalPointer
-
getStateSize
public long getStateSize() -
markAsDiscarded
Description copied from interface:CheckpointThis method precede theCheckpoint.DiscardObject.discard()method and should be called from theCheckpointCoordinator(under the lock) whileCheckpoint.DiscardObject.discard()can be called from any thread/place.- Specified by:
markAsDiscardedin interfaceCheckpoint
-
markAsDiscardedOnSubsume
-
markAsDiscardedOnShutdown
public Checkpoint.DiscardObject markAsDiscardedOnShutdown(org.apache.flink.api.common.JobStatus jobStatus) -
shouldBeDiscardedOnSubsume
public boolean shouldBeDiscardedOnSubsume() -
shouldBeDiscardedOnShutdown
public boolean shouldBeDiscardedOnShutdown(org.apache.flink.api.common.JobStatus jobStatus) -
checkpointsMatch
public static boolean checkpointsMatch(Collection<CompletedCheckpoint> first, Collection<CompletedCheckpoint> second) -
getStatistic
-
toString
-