smengcl commented on a change in pull request #2713:
URL: https://github.com/apache/ozone/pull/2713#discussion_r722998615



##########
File path: 
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/volume/ListVolumeHandler.java
##########
@@ -85,11 +85,18 @@ protected void execute(OzoneClient client, OzoneAddress 
address)
     }
 
     int counter = 0;
+    final StringBuilder res = new StringBuilder("[ ");  // Mark JSON array 
start

Review comment:
       yeah surely I can just print that to stdout.. i imagine this can only 
OOM the client if we are returning 100000s of volumes.
   
   `StringBuilder` IMO is just a cleaner implementation here. No need to deal 
with `print()` then `println()`




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