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


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/FSOBucketHandler.java:
##########
@@ -146,49 +145,116 @@ public long calculateDUUnderObject(long parentId)
           break;
         }
         OmKeyInfo keyInfo = kv.getValue();
+        if (recursive) {
+          if (stats.getLimit() == -1) {
+            populateDiskUsage(keyInfo, diskUsageList);
+          } else {
+            if (stats.getCurrentCount() < stats.getLimit()) {
+              populateDiskUsage(keyInfo, diskUsageList);
+              stats.setCurrentCount(stats.getCurrentCount() + 1);
+              stats.setLastKey(kv.getKey());

Review Comment:
   @sumitagrawl , thanks for reviewing the patch. Current listKeys API has this 
limit parameter which will limit in order. If other buckets also present in 
volume and if limit reached, i will not list. This is similar to what we have 
in CLI behavior.



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