Class CheckpointStatsCache
java.lang.Object
org.apache.flink.runtime.rest.handler.job.checkpoints.CheckpointStatsCache
A size-based cache of accessed checkpoints for completed and failed checkpoints.
Having this cache in place for accessed stats improves the user experience quite a bit as accessed checkpoint stats stay available and don't expire. For example if you manage to click on the last checkpoint in the history, it is not available via the stats as soon as another checkpoint is triggered. With the cache in place, the checkpoint will still be available for investigation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidtryAdd(AbstractCheckpointStats checkpoint) Try to add the checkpoint to the cache.tryGet(long checkpointId) Try to look up a checkpoint by it's ID in the cache.
-
Constructor Details
-
CheckpointStatsCache
public CheckpointStatsCache(int maxNumEntries)
-
-
Method Details
-
tryAdd
Try to add the checkpoint to the cache.- Parameters:
checkpoint- Checkpoint to be added.
-
tryGet
Try to look up a checkpoint by it's ID in the cache.- Parameters:
checkpointId- ID of the checkpoint to look up.- Returns:
- The checkpoint or
nullif checkpoint not found.
-