Class CheckpointStatsTracker


  • public class CheckpointStatsTracker
    extends Object
    Tracker for checkpoint statistics.

    This is tightly integrated with the CheckpointCoordinator in 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 CheckpointCoordinator and related classes like PendingCheckpoint and CompletedCheckpoint, which receive the raw stats data in the first place.

    The statistics are accessed via createSnapshot() and exposed via both the web frontend and the Metric system.

    • Constructor Detail

      • CheckpointStatsTracker

        public CheckpointStatsTracker​(int numRememberedCheckpoints,
                                      org.apache.flink.metrics.MetricGroup metricGroup,
                                      org.apache.flink.api.common.JobID jobID)
        Creates a new checkpoint stats tracker.
        Parameters:
        numRememberedCheckpoints - Maximum number of checkpoints to remember, including in progress ones.
        metricGroup - Metric group for exposed metrics
        jobID - ID of the job being checkpointed
    • Method Detail

      • updateTotalNumberOfSubtasks

        public CheckpointStatsTracker updateTotalNumberOfSubtasks​(int totalNumberOfSubTasks)
      • createSnapshot

        public CheckpointStatsSnapshot createSnapshot()
        Creates a new snapshot of the available stats.
        Returns:
        The latest statistics snapshot.
      • reportRestoredCheckpoint

        public void reportRestoredCheckpoint​(long checkpointID,
                                             CheckpointProperties properties,
                                             String externalPath,
                                             long stateSize)
      • 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.
      • reportInitializationStartTs

        public void reportInitializationStartTs​(long initializationStartTs)