ChenSammi commented on code in PR #8827:
URL: https://github.com/apache/ozone/pull/8827#discussion_r2292817958


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainerMetadataInspector.java:
##########
@@ -267,6 +269,23 @@ static ObjectNode getAggregateValues(DatanodeStore store,
     }
 
     // Count pending delete blocks.
+    final PendingDelete pendingDelete = getAggregatePendingDelete(store, 
containerData, schemaVersion);
+
+    if (isSameSchemaVersion(schemaVersion, OzoneConsts.SCHEMA_V1)) {
+      blockCountTotal += pendingDelete.getCount();
+      usedBytesTotal += pendingDelete.getBytes();
+    }
+
+    aggregates.put("blockCount", blockCountTotal);
+    aggregates.put("usedBytes", usedBytesTotal);
+    pendingDelete.addToJson(aggregates);
+
+    return aggregates;
+  }
+
+  public static PendingDelete getAggregatePendingDelete(DatanodeStore store,
+                KeyValueContainerData containerData, String schemaVersion)
+      throws IOException {

Review Comment:
   ```suggestion
         KeyValueContainerData containerData, String schemaVersion)
         throws IOException {
   ```



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