You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/10/05 20:02:06 UTC

[GitHub] [ozone] adoroszlai commented on a diff in pull request #3777: HDDS-7219. Ozone bucket list for links displays default layout for all linked buckets

adoroszlai commented on code in PR #3777:
URL: https://github.com/apache/ozone/pull/3777#discussion_r985589271


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/bucket/ListBucketHandler.java:
##########
@@ -50,9 +52,17 @@ protected void execute(OzoneClient client, OzoneAddress address)
     OzoneVolume vol = client.getObjectStore().getVolume(volumeName);
     Iterator<? extends OzoneBucket> bucketIterator =
         vol.listBuckets(listOptions.getPrefix(), listOptions.getStartItem());
-
-    int counter = printAsJsonArray(bucketIterator, listOptions.getLimit());
-
+    List<Object> bucketList = new ArrayList<>();
+    while (bucketIterator.hasNext()) {

Review Comment:
   Please keep `limit > counter` from earlier version of the patch.  Limiting the size of the list while it is being populated is better than while printing it.
   
   (Sorry, I was going to make this comment in previous round of review, but somehow forgot to submit.)



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