Class DefaultCheckpointStatsTracker
- java.lang.Object
-
- org.apache.flink.runtime.checkpoint.DefaultCheckpointStatsTracker
-
- All Implemented Interfaces:
CheckpointStatsTracker
public class DefaultCheckpointStatsTracker extends Object implements CheckpointStatsTracker
-
-
Constructor Summary
Constructors Constructor Description DefaultCheckpointStatsTracker(int numRememberedCheckpoints, JobManagerJobMetricGroup metricGroup)Creates a new checkpoint stats tracker.DefaultCheckpointStatsTracker(int numRememberedCheckpoints, JobManagerJobMetricGroup metricGroup, CheckpointStatsListener checkpointStatsListener)Creates a new checkpoint stats tracker.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CheckpointStatsSnapshotcreateSnapshot()Creates a new snapshot of the available stats.PendingCheckpointStatsgetPendingCheckpointStats(long checkpointId)voidreportCompletedCheckpoint(CompletedCheckpointStats completed)Callback when a checkpoint completes.voidreportFailedCheckpoint(FailedCheckpointStats failed)voidreportFailedCheckpointsWithoutInProgress()Callback when a checkpoint failure without in progress checkpoint.voidreportIncompleteStats(long checkpointId, ExecutionAttemptID attemptId, CheckpointMetrics metrics)voidreportInitializationMetrics(ExecutionAttemptID executionAttemptId, SubTaskInitializationMetrics initializationMetrics)voidreportInitializationStarted(Set<ExecutionAttemptID> toInitialize, long initializationStartTs)PendingCheckpointStatsreportPendingCheckpoint(long checkpointId, long triggerTimestamp, CheckpointProperties props, Map<JobVertexID,Integer> vertexToDop)Creates a new pending checkpoint tracker.voidreportRestoredCheckpoint(long checkpointID, CheckpointProperties properties, String externalPath, long stateSize)
-
-
-
Constructor Detail
-
DefaultCheckpointStatsTracker
public DefaultCheckpointStatsTracker(int numRememberedCheckpoints, JobManagerJobMetricGroup metricGroup)Creates a new checkpoint stats tracker.- Parameters:
numRememberedCheckpoints- Maximum number of checkpoints to remember, including in progress ones.metricGroup- Metric group for exposed metrics
-
DefaultCheckpointStatsTracker
public DefaultCheckpointStatsTracker(int numRememberedCheckpoints, JobManagerJobMetricGroup metricGroup, @Nullable CheckpointStatsListener checkpointStatsListener)Creates a new checkpoint stats tracker.- Parameters:
numRememberedCheckpoints- Maximum number of checkpoints to remember, including in progress ones.metricGroup- Metric group for exposed metrics.checkpointStatsListener- Listener for monitoring checkpoint-related events.
-
-
Method Detail
-
createSnapshot
public CheckpointStatsSnapshot createSnapshot()
Description copied from interface:CheckpointStatsTrackerCreates a new snapshot of the available stats.- Specified by:
createSnapshotin interfaceCheckpointStatsTracker- Returns:
- The latest statistics snapshot.
-
reportPendingCheckpoint
public PendingCheckpointStats reportPendingCheckpoint(long checkpointId, long triggerTimestamp, CheckpointProperties props, Map<JobVertexID,Integer> vertexToDop)
Description copied from interface:CheckpointStatsTrackerCreates a new pending checkpoint tracker.- Specified by:
reportPendingCheckpointin interfaceCheckpointStatsTracker- Parameters:
checkpointId- ID of the checkpoint.triggerTimestamp- Trigger timestamp of the checkpoint.props- The checkpoint properties.vertexToDop- mapping ofJobVertexIDto DOP- Returns:
- Tracker for statistics gathering or
nullif no stats were tracked.
-
reportRestoredCheckpoint
public void reportRestoredCheckpoint(long checkpointID, CheckpointProperties properties, String externalPath, long stateSize)- Specified by:
reportRestoredCheckpointin interfaceCheckpointStatsTracker
-
reportCompletedCheckpoint
public void reportCompletedCheckpoint(CompletedCheckpointStats completed)
Description copied from interface:CheckpointStatsTrackerCallback when a checkpoint completes.- Specified by:
reportCompletedCheckpointin interfaceCheckpointStatsTracker- Parameters:
completed- The completed checkpoint stats.
-
reportFailedCheckpoint
public void reportFailedCheckpoint(FailedCheckpointStats failed)
- Specified by:
reportFailedCheckpointin interfaceCheckpointStatsTracker
-
reportFailedCheckpointsWithoutInProgress
public void reportFailedCheckpointsWithoutInProgress()
Description copied from interface:CheckpointStatsTrackerCallback when a checkpoint failure without in progress checkpoint. For example, it should be callback when triggering checkpoint failure before creating PendingCheckpoint.- Specified by:
reportFailedCheckpointsWithoutInProgressin interfaceCheckpointStatsTracker
-
getPendingCheckpointStats
public PendingCheckpointStats getPendingCheckpointStats(long checkpointId)
- Specified by:
getPendingCheckpointStatsin interfaceCheckpointStatsTracker
-
reportIncompleteStats
public void reportIncompleteStats(long checkpointId, ExecutionAttemptID attemptId, CheckpointMetrics metrics)- Specified by:
reportIncompleteStatsin interfaceCheckpointStatsTracker
-
reportInitializationStarted
public void reportInitializationStarted(Set<ExecutionAttemptID> toInitialize, long initializationStartTs)
- Specified by:
reportInitializationStartedin interfaceCheckpointStatsTracker
-
reportInitializationMetrics
public void reportInitializationMetrics(ExecutionAttemptID executionAttemptId, SubTaskInitializationMetrics initializationMetrics)
- Specified by:
reportInitializationMetricsin interfaceCheckpointStatsTracker
-
-