ozone
ozone copied to clipboard
HDDS-10597. Use MutableGauge for threshold based SafeModeMetrics.
What changes were proposed in this pull request?
Right now, we use MutableCounterLong for threshold metrics like
numContainerWithOneReplicaReportedThresholdand when it is updated in setNumContainerWithOneReplicaReportedThreshold(long val) it incremented instead of setting the accurate value. This makes no sense as this field is a threshold and shouldn't be used as a counter.
The JMX output show cumulative addition of these threshold values which makes no sense
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10597
How was this patch tested?
Manually