You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2023/01/30 19:27:03 UTC

[GitHub] [ozone] adoroszlai commented on a diff in pull request #3943: HDDS-6736. Provided consistent CLI options

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


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/admin/om/CancelPrepareSubCommand.java:
##########
@@ -36,10 +36,10 @@ public class CancelPrepareSubCommand implements Callable<Void> {
   private OMAdmin parent;
 
   @CommandLine.Option(
-      names = {"-id", "--service-id"},
-      description = "Ozone Manager Service ID",
-      required = true
-  )
+      names = {"-id", "--id", "--service-id"},
+      description = "Ozone Manager Service ID." + "Command line option " +
+          "-id will be removed in later versions.",
+      required = true)

Review Comment:
   Please don't add `--id`, as we already have `--service-id`.  (Applies to all commands with the `--service-id` option.)



##########
hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/ListInfoSubcommand.java:
##########
@@ -46,8 +46,9 @@ public class ListInfoSubcommand extends ScmSubcommand {
       defaultValue = "")
   private String ipaddress;
 
-  @CommandLine.Option(names = {"--id"},
-      description = "Show info by datanode UUID.",
+  @CommandLine.Option(names = {"--id", "--uuid"},
+      description = "Show info by datanode UUID. Command line option --id " +
+          "will be removed in later versions.",

Review Comment:
   `--id` is OK, we don't need to remove it.



##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/admin/om/PrepareSubCommand.java:
##########
@@ -55,42 +55,47 @@ public class PrepareSubCommand implements Callable<Void> {
   private OMAdmin parent;
 
   @CommandLine.Option(
-      names = {"-id", "--service-id"},
-      description = "Ozone Manager Service ID",
+      names = {"-id", "--id", "--service-id"},
+      description = "Ozone Manager Service ID." + "Command line option " +
+          "-id will be removed in later versions.",
       required = true
   )
   private String omServiceId;
 
   @CommandLine.Option(
-      names = {"-tawt", "--transaction-apply-wait-timeout"},
+      names = {"-tawt", "--tawt", "--transaction-apply-wait-timeout"},

Review Comment:
   Please don't add `--tawt` or other similar abbreviated long options.  Options should be short or long, but not a mix.  How are users supposed to remember `tawt` and other acronyms?



##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/s3/SetS3SecretHandler.java:
##########
@@ -39,8 +39,9 @@ public class SetS3SecretHandler extends S3Handler {
           + "(Admins only)'")
   private String username;
 
-  @CommandLine.Option(names = {"-s", "--secret", "--secretKey"},
-      description = "Secret key", required = true)
+  @CommandLine.Option(names = {"-s", "--secret", "--secretKey", "--secret-key"},

Review Comment:
   `--secret` is enough, no need for `--secret-key`.



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