You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "devmadhuu (via GitHub)" <gi...@apache.org> on 2023/03/21 08:48:54 UTC

[GitHub] [ozone] devmadhuu commented on a diff in pull request #4440: HDDS-8127. Don't count deleted containers towards Recon container count.

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