devmadhuu commented on code in PR #4440:
URL: https://github.com/apache/ozone/pull/4440#discussion_r1143032950


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/types/ClusterStateResponse.java:
##########
@@ -66,6 +66,12 @@ public final class ClusterStateResponse {
   @JsonProperty("openContainers")
   private int openContainers;
 
+  /**
+   * Total count of deleted containers in the cluster.
+   */
+  @JsonProperty("deletedContainers")
+  private int deletedContainers;

Review Comment:
   Please wrap all container stats in a new object something like 
"ContainerStats". Later we can use for wrapping missing containers also.



##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ClusterStateEndpoint.java:
##########
@@ -134,7 +136,8 @@ public Response getClusterState() {
       totalKeys += fileRecord.getValue();
     }
     builder.setKeys(totalKeys);
-
+    // Subtract deleted containers from total containers.
+    containers = containers - deletedContainersCount;

Review Comment:
   I think we should also expose in UI this deletedContainer count separately a 
part from maths computation and updating total container count.



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