ChenSammi commented on code in PR #9564:
URL: https://github.com/apache/ozone/pull/9564#discussion_r2652302555


##########
hadoop-ozone/cli-shell/src/main/java/org/apache/hadoop/ozone/shell/acl/GetAclHandler.java:
##########
@@ -19,19 +19,61 @@
 
 import java.io.IOException;
 import java.util.List;
+import java.util.stream.Collectors;
 import org.apache.hadoop.ozone.OzoneAcl;
 import org.apache.hadoop.ozone.client.OzoneClient;
 import org.apache.hadoop.ozone.security.acl.OzoneObj;
+import picocli.CommandLine.Option;
 
 /**
  * Get ACLs.
  */
 public abstract class GetAclHandler extends AclHandler {
 
+  @Option(names = {"--string", "-o"},

Review Comment:
   It's very good to thought that there are possible other formats to support 
in future. But the current Ozone CLI state is either json or plain output 
without structured format, so  --json is used in many CLIs. To have a 
consistent CLI option format, --json is preferred.  There is possibility to 
support xml or yaml in future, but we don't see such requirements so far. If it 
becomes true, then a lot of existing CLIs need to improved in batches. 
   
   >  why have a flag for the default behavior?
   
   If there is --json in the command line, then it's true, otherwise it's 
false. So default "true" might not be feasible, "false" is more appropriate. 
   
   > "--string", "-o"
   
   "--string" is kind of vague, user cannot get the clear idea about what this 
option means without looking into description, and  "-o" usually means 
"--output-file".  A self explained option name is more preferred. 



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