sarvekshayr commented on code in PR #11410:
URL: https://github.com/apache/ozone/pull/11410#discussion_r4183230318
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -219,14 +220,14 @@ public class OMMetrics implements OmMetadataReaderMetrics
{
// Metrics for total number of volumes, buckets and keys
- private @Metric MutableCounterLong numVolumes;
- private @Metric MutableCounterLong numBuckets;
+ private @Metric MutableGaugeLong numVolumes;
+ private @Metric MutableGaugeLong numBuckets;
private @Metric MutableCounterLong numS3Buckets;
Review Comment:
Metric `numS3Buckets` and its methods have no usages in code, should we
still consider changing it to gauge?
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
Review Comment:
Now that these are gauges - `decNumVolumes()`, `decNumBuckets()`,
`decNumKeys()` and `decNumKeys(long)` can call `decr()` and `decr(val)`.
The negative `incr()` was a counter workaround.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
Review Comment:
`decNumS3Buckets()` is also incrementing the `numS3Buckets` which is
incorrect.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]