public class CheckpointStatsTracker extends Object
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 and Description |
---|
CheckpointStatsTracker(int numRememberedCheckpoints,
MetricGroup metricGroup,
JobID jobID)
Creates a new checkpoint stats tracker.
|
Modifier and Type | Method and Description |
---|---|
CheckpointStatsSnapshot |
createSnapshot()
Creates a new snapshot of the available stats.
|
PendingCheckpointStats |
getPendingCheckpointStats(long checkpointId) |
void |
reportFailedCheckpointsWithoutInProgress()
Callback when a checkpoint failure without in progress checkpoint.
|
void |
reportIncompleteStats(long checkpointId,
ExecutionAttemptID attemptId,
CheckpointMetrics metrics) |
void |
reportInitializationMetrics(SubTaskInitializationMetrics initializationMetrics) |
void |
reportInitializationStartTs(long initializationStartTs) |
void |
reportRestoredCheckpoint(long checkpointID,
CheckpointProperties properties,
String externalPath,
long stateSize) |
CheckpointStatsTracker |
updateTotalNumberOfSubtasks(int totalNumberOfSubTasks) |
public CheckpointStatsTracker(int numRememberedCheckpoints, MetricGroup metricGroup, JobID jobID)
numRememberedCheckpoints
- Maximum number of checkpoints to remember, including in
progress ones.metricGroup
- Metric group for exposed metricsjobID
- ID of the job being checkpointedpublic CheckpointStatsTracker updateTotalNumberOfSubtasks(int totalNumberOfSubTasks)
public CheckpointStatsSnapshot createSnapshot()
public void reportRestoredCheckpoint(long checkpointID, CheckpointProperties properties, String externalPath, long stateSize)
public void reportFailedCheckpointsWithoutInProgress()
public PendingCheckpointStats getPendingCheckpointStats(long checkpointId)
public void reportIncompleteStats(long checkpointId, ExecutionAttemptID attemptId, CheckpointMetrics metrics)
public void reportInitializationStartTs(long initializationStartTs)
public void reportInitializationMetrics(SubTaskInitializationMetrics initializationMetrics)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.