You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2023/01/19 23:36:00 UTC

[GitHub] [ozone] smengcl commented on a diff in pull request #4164: HDDS-7506. [Snapshot] Expose more snapshot metrics under OMMetrics

smengcl commented on code in PR #4164:
URL: https://github.com/apache/ozone/pull/4164#discussion_r1081976308


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -448,6 +451,45 @@ public void incNumSnapshotListFails() {
     numSnapshotListFails.incr();
   }
 
+  public void setNumSnapshotActive(long num) {
+    long currVal = numSnapshotActive.value();
+    numSnapshotActive.incr(num - currVal);

Review Comment:
   Serviceable. But I wonder if there is a better alternative to `MutableCounterLong` in this case.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org