slfan1989 commented on code in PR #7206:
URL: https://github.com/apache/ozone/pull/7206#discussion_r1771721588


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/VolumeInfoMetrics.java:
##########
@@ -153,4 +154,15 @@ public void dbCompactTimesNanoSecondsIncr(long time) {
     dbCompactLatency.add(time);
   }
 
+  /**
+   * Return the Container Count of the Volume.
+   */
+  @Metric("Returns the Container Count of the Volume")
+  public long getContainers() {
+    return this.containers;
+  }
+
+  public void setContainers(long count) {
+    this.containers = count;
+  }

Review Comment:
   I came up with a solution. we will inject the `ContainerController` into the 
`HddsVolume` to make it easier to retrieve the container count on each disk. 
What do you think about this approach?



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

Reply via email to