Interface CheckpointStatsTracker
-
- All Known Implementing Classes:
DefaultCheckpointStatsTracker,NoOpCheckpointStatsTracker
public interface CheckpointStatsTrackerTracker for checkpoint statistics.This is tightly integrated with the
CheckpointCoordinatorin order to ease the gathering of fine-grained statistics.The tracked stats include summary counts, a detailed history of recent and in progress checkpoints as well as summaries about the size, duration and more of recent checkpoints.
Data is gathered via callbacks in the
CheckpointCoordinatorand related classes likePendingCheckpointandCompletedCheckpoint, which receive the raw stats data in the first place.The statistics are accessed via
createSnapshot()and exposed via both the web frontend and theMetricsystem.
-
-
Method Summary
All Methods Instance Methods Abstract 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)
-
-
-
Method Detail
-
reportRestoredCheckpoint
void reportRestoredCheckpoint(long checkpointID, CheckpointProperties properties, String externalPath, long stateSize)
-
reportCompletedCheckpoint
void reportCompletedCheckpoint(CompletedCheckpointStats completed)
Callback when a checkpoint completes.- Parameters:
completed- The completed checkpoint stats.
-
getPendingCheckpointStats
@Nullable PendingCheckpointStats getPendingCheckpointStats(long checkpointId)
-
reportIncompleteStats
void reportIncompleteStats(long checkpointId, ExecutionAttemptID attemptId, CheckpointMetrics metrics)
-
reportInitializationStarted
void reportInitializationStarted(Set<ExecutionAttemptID> toInitialize, long initializationStartTs)
-
reportInitializationMetrics
void reportInitializationMetrics(ExecutionAttemptID executionAttemptId, SubTaskInitializationMetrics initializationMetrics)
-
reportPendingCheckpoint
@Nullable PendingCheckpointStats reportPendingCheckpoint(long checkpointId, long triggerTimestamp, CheckpointProperties props, Map<JobVertexID,Integer> vertexToDop)
Creates a new pending checkpoint tracker.- 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.
-
reportFailedCheckpoint
void reportFailedCheckpoint(FailedCheckpointStats failed)
-
reportFailedCheckpointsWithoutInProgress
void reportFailedCheckpointsWithoutInProgress()
Callback when a checkpoint failure without in progress checkpoint. For example, it should be callback when triggering checkpoint failure before creating PendingCheckpoint.
-
createSnapshot
CheckpointStatsSnapshot createSnapshot()
Creates a new snapshot of the available stats.- Returns:
- The latest statistics snapshot.
-
-