ozone icon indicating copy to clipboard operation
ozone copied to clipboard

HDDS-10206. Expose jmx metrics for snapshot cache size on the ozone manager.

Open ceekay47 opened this issue 1 year ago • 4 comments

What changes were proposed in this pull request?

HDDS-10206. Expose jmx metrics for snapshot cache size on the ozone manager.

This PR introduces changes to expose snapshot cache size (dbMap.size() in https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotCache.java) to the Ozone Manager metrics.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-10206

How was this patch tested?

Workflow run on the fork git repo.

ceekay47 avatar Jan 31 '24 18:01 ceekay47

@swamirishi Can you please review when you have time?

ceekay47 avatar Jan 31 '24 18:01 ceekay47

@aswinshakil Can you please take a look when you can?

ceekay47 avatar Feb 22 '24 08:02 ceekay47

@ceekay47 please take a look at compile error:

Error:  /home/runner/work/ozone/ozone/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:[859,54] cannot find symbol
Error:    symbol:   method getSnapshotCache()
Error:    location: variable omSnapshotManager of type org.apache.hadoop.ozone.om.OmSnapshotManager
Error:  /home/runner/work/ozone/ozone/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotCache.java:[89,9] cannot find symbol
Error:    symbol: variable omSnapshotManager
Error:  /home/runner/work/ozone/ozone/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotCache.java:[109,9] cannot find symbol
Error:    symbol: variable omSnapshotManager
Error:  /home/runner/work/ozone/ozone/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotCache.java:[162,9] cannot find symbol
Error:    symbol: variable omSnapshotManager
Error:  /home/runner/work/ozone/ozone/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotCache.java:[235,11] cannot find symbol
Error:    symbol: variable omSnapshotManager

https://github.com/ceekay47/ozone/actions/runs/7883419762/job/21510351002#step:6:2382

adoroszlai avatar Feb 25 '24 11:02 adoroszlai

@adoroszlai Thanks for taking a look. Fixed and updated the PR.

ceekay47 avatar Feb 28 '24 16:02 ceekay47

@hemantk-12 @swamirishi Thanks for the review.

I have addressed the review comments. Can you take a look? Thanks.

ceekay47 avatar Apr 02 '24 05:04 ceekay47

@hemantk-12 Thanks again for the review. I've added validation for the metric in tests.

ceekay47 avatar Apr 04 '24 07:04 ceekay47