ChenSammi commented on code in PR #9252:
URL: https://github.com/apache/ozone/pull/9252#discussion_r2501977587
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/OMDBInsightEndpoint.java:
##########
@@ -642,6 +642,29 @@ private void getPendingForDeletionDirInfo(
}
}
+ private void calculateTotalPendingDeletedDirSizes(Map<String, Long>
dirSummary) {
+ long totalDataSize = 0L;
+ long totalReplicatedDataSize = 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) {
+ Pair<Long, Long> sizeInfo =
fetchSizeForDeletedDirectory(omKeyInfo.getObjectID());
+ totalDataSize += sizeInfo.getLeft();
+ totalReplicatedDataSize += sizeInfo.getRight();
+ }
+ }
+ } catch (IOException ex) {
Review Comment:
Please log a message for this ex to know why it fails.
--
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]