-
Notifications
You must be signed in to change notification settings - Fork 581
HDDS-14041. Add metrics to track Snapshot RocksDB space and SST File stats. #9406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive metrics tracking for Ozone Manager's snapshot RocksDB directories, monitoring disk space usage and SST file counts. The implementation introduces a new metrics class that periodically collects statistics both at the aggregate level (total snapshots directory size and SST file count) and per-checkpoint directory level, with configurable update intervals.
Key Changes
- Introduces
OMSnapshotDirectoryMetricsclass with asynchronous metrics collection using a Timer-based scheduler - Adds configuration property
ozone.om.snapshot.directory.metrics.update.interval(default: 5 minutes) to control update frequency - Integrates metrics lifecycle into OzoneManager's start/restart/stop methods
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
OMSnapshotDirectoryMetrics.java |
New metrics class implementing periodic collection of snapshot directory size and SST file statistics with both aggregate and per-checkpoint metrics |
OzoneManager.java |
Integrates snapshot directory metrics into OM lifecycle by starting metrics collection on start/restart and stopping on shutdown |
OMMetrics.java |
Adds snapshot directory metrics management methods and field to hold the metrics instance |
OMConfigKeys.java |
Defines configuration key and default value for metrics update interval |
ozone-default.xml |
Adds configuration property documentation for the metrics update interval setting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What changes were proposed in this pull request?
Add metrics to track Snapshot RocksDB space and SST File stats
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14041
How was this patch tested?
Tried out on docker