sumitagrawl commented on code in PR #8591:
URL: https://github.com/apache/ozone/pull/8591#discussion_r2201040973


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/OMDBInsightEndpoint.java:
##########
@@ -627,6 +627,28 @@ private void getPendingForDeletionDirInfo(
     }
   }
 
+  private void calculateTotalPendingDeletedDirSizes(Map<String, Long> 
dirSummary) {
+    long totalUnreplicatedSize = 0L;
+    long totalReplicatedSize = 0L;
+
+    Table<String, OmKeyInfo> deletedDirTable = 
omMetadataManager.getDeletedDirTable();
+    try (TableIterator<String, ? extends Table.KeyValue<String, OmKeyInfo>> 
iterator = deletedDirTable.iterator()) {
+      while (iterator.hasNext()) {
+        Table.KeyValue<String, OmKeyInfo> kv = iterator.next();
+        OmKeyInfo omKeyInfo = kv.getValue();
+        if (omKeyInfo != null) {
+          totalUnreplicatedSize += 
fetchSizeForDeletedDirectory(omKeyInfo.getObjectID());

Review Comment:
   based on previous PR, need handle this



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