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


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/volume/ListVolumeHandler.java:
##########
@@ -76,7 +72,7 @@ protected void execute(OzoneClient client, OzoneAddress 
address)
     }
 
     Iterator<? extends OzoneVolume> volumeIterator;
-    if (userName != null && !listAllVolumes) {
+    if (userName != null && (Integer.MAX_VALUE != listOptions.getLimit())) {

Review Comment:
   Would be nice to add `isAll()` in `ListOptions` and use that here.



##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/ListOptions.java:
##########
@@ -39,7 +39,14 @@ public class ListOptions {
       description = "Prefix to filter the items")
   private String prefix;
 
+  @CommandLine.Option(names = {"--all", "-a"},
+      description = "List all results")
+  private boolean bListAll;
+
   public int getLimit() {
+    if (bListAll) {

Review Comment:
   Nit:
   
   ```suggestion
     private boolean all;
   
     public int getLimit() {
       if (all) {
   ```



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