public class CompletedCheckpoint extends Object implements Serializable
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.
Constructor and Description |
---|
CompletedCheckpoint(JobID job,
long checkpointID,
long timestamp,
long completionTimestamp,
Map<OperatorID,OperatorState> operatorStates,
Collection<MasterState> masterHookStates,
CheckpointProperties props,
CompletedCheckpointStorageLocation storageLocation) |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkpointsMatch(Collection<CompletedCheckpoint> first,
Collection<CompletedCheckpoint> second) |
void |
discardOnFailedStoring() |
boolean |
discardOnShutdown(JobStatus jobStatus) |
boolean |
discardOnSubsume() |
long |
getCheckpointID() |
long |
getDuration() |
String |
getExternalPointer() |
JobID |
getJobId() |
Collection<MasterState> |
getMasterHookStates() |
StreamStateHandle |
getMetadataHandle() |
Map<OperatorID,OperatorState> |
getOperatorStates() |
CheckpointProperties |
getProperties() |
long |
getStateSize() |
long |
getTimestamp() |
void |
registerSharedStatesAfterRestored(SharedStateRegistry sharedStateRegistry)
Register all shared states in the given registry.
|
String |
toString() |
public CompletedCheckpoint(JobID job, long checkpointID, long timestamp, long completionTimestamp, Map<OperatorID,OperatorState> operatorStates, @Nullable Collection<MasterState> masterHookStates, CheckpointProperties props, CompletedCheckpointStorageLocation storageLocation)
public JobID getJobId()
public long getCheckpointID()
public long getTimestamp()
public long getDuration()
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)
sharedStateRegistry
- The registry where shared states are registeredpublic boolean discardOnShutdown(JobStatus jobStatus) throws Exception
Exception
public static boolean checkpointsMatch(Collection<CompletedCheckpoint> first, Collection<CompletedCheckpoint> second)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.