Class CheckpointStatsTracker
- java.lang.Object
-
- org.apache.flink.runtime.checkpoint.CheckpointStatsTracker
-
public class CheckpointStatsTracker extends Object
Tracker 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.
-
-
Constructor Summary
Constructors Constructor Description CheckpointStatsTracker(int numRememberedCheckpoints, org.apache.flink.metrics.MetricGroup metricGroup)CheckpointStatsTracker(int numRememberedCheckpoints, JobManagerJobMetricGroup metricGroup)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)voidreportFailedCheckpointsWithoutInProgress()Callback when a checkpoint failure without in progress checkpoint.voidreportIncompleteStats(long checkpointId, ExecutionAttemptID attemptId, CheckpointMetrics metrics)
-
-
-
Constructor Detail
-
CheckpointStatsTracker
public CheckpointStatsTracker(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
-
CheckpointStatsTracker
public CheckpointStatsTracker(int numRememberedCheckpoints, org.apache.flink.metrics.MetricGroup metricGroup)
-
-
Method Detail
-
createSnapshot
public CheckpointStatsSnapshot createSnapshot()
Creates a new snapshot of the available stats.- Returns:
- The latest statistics snapshot.
-
reportFailedCheckpointsWithoutInProgress
public void reportFailedCheckpointsWithoutInProgress()
Callback when a checkpoint failure without in progress checkpoint. For example, it should be callback when triggering checkpoint failure before creating PendingCheckpoint.
-
getPendingCheckpointStats
public PendingCheckpointStats getPendingCheckpointStats(long checkpointId)
-
reportIncompleteStats
public void reportIncompleteStats(long checkpointId, ExecutionAttemptID attemptId, CheckpointMetrics metrics)
-
-