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 2020/12/16 05:28:01 UTC

[GitHub] [ozone] sky76093016 commented on a change in pull request #1623: HDDS-4508. Add total container count to SCMContainerMetrics

sky76093016 commented on a change in pull request #1623:
URL: https://github.com/apache/ozone/pull/1623#discussion_r543976524



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMContainerMetrics.java
##########
@@ -84,6 +84,14 @@ public void getMetrics(MetricsCollector collector, boolean all) {
             stateCount.get(DELETING.toString()))
         .addGauge(Interns.info("DeletedContainers",
             "Number of containers in deleted state"),
+            stateCount.get(DELETED.toString()))
+        .addGauge(Interns.info("TotalContainers",
+            "Number of all containers"),
+          stateCount.get(OPEN.toString())+
+            stateCount.get(CLOSING.toString())+
+            stateCount.get(QUASI_CLOSED.toString())+
+            stateCount.get(CLOSED.toString())+
+            stateCount.get(DELETING.toString())+

Review comment:
       Thanks @adoroszlai  for the suggestion,I tried to modify it.




----------------------------------------------------------------
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.

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