From 4b46c54d9db467c6d9cedc563e5ff65101ebc7ad Mon Sep 17 00:00:00 2001 From: Chi-Hsuan Huang Date: Mon, 1 Jun 2026 22:58:11 +0800 Subject: [PATCH 1/7] HDDS-15420. Fix --jvmargs typo in ozone command help Change 'will be append' to 'will be appended' in the --jvmargs option description. --- hadoop-ozone/dist/src/shell/ozone/ozone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-ozone/dist/src/shell/ozone/ozone b/hadoop-ozone/dist/src/shell/ozone/ozone index 432ed1d173d3..3ac62baa7bb3 100755 --- a/hadoop-ozone/dist/src/shell/ozone/ozone +++ b/hadoop-ozone/dist/src/shell/ozone/ozone @@ -35,7 +35,7 @@ function ozone_usage ozone_add_option "--hosts filename" "list of hosts to use in worker mode" ozone_add_option "--loglevel level" "set the log4j level for this command" ozone_add_option "--workers" "turn on worker mode" - ozone_add_option "--jvmargs arguments" "append JVM options to any existing options defined in the OZONE_OPTS environment variable. Any defined in OZONE_CLIENT_OPTS will be append after these jvmargs" + ozone_add_option "--jvmargs arguments" "append JVM options to any existing options defined in the OZONE_OPTS environment variable. Any defined in OZONE_CLIENT_OPTS will be appended after these jvmargs" ozone_add_option "--validate (continue)" "validates if all jars as indicated in the corresponding OZONE_RUN_ARTIFACT_NAME classpath file are present, command execution shall continue post validation failure if 'continue' is passed" ozone_add_subcommand "classpath" client "prints the class path needed for running ozone commands" From 9f95b8f95047a225907aab2e5514dfdc204bf3fd Mon Sep 17 00:00:00 2001 From: Chi-Hsuan Huang Date: Mon, 1 Jun 2026 22:58:49 +0800 Subject: [PATCH 2/7] HDDS-15420. Clarify --validate option in ozone command help Use [continue] to denote the optional argument and drop the internal OZONE_RUN_ARTIFACT_NAME reference from the user-facing description, in both the shell usage menu and the autocompletion generator. --- hadoop-ozone/dist/src/shell/ozone/ozone | 2 +- .../java/org/apache/hadoop/ozone/utils/AutoCompletion.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hadoop-ozone/dist/src/shell/ozone/ozone b/hadoop-ozone/dist/src/shell/ozone/ozone index 3ac62baa7bb3..0e89092b0a1b 100755 --- a/hadoop-ozone/dist/src/shell/ozone/ozone +++ b/hadoop-ozone/dist/src/shell/ozone/ozone @@ -36,7 +36,7 @@ function ozone_usage ozone_add_option "--loglevel level" "set the log4j level for this command" ozone_add_option "--workers" "turn on worker mode" ozone_add_option "--jvmargs arguments" "append JVM options to any existing options defined in the OZONE_OPTS environment variable. Any defined in OZONE_CLIENT_OPTS will be appended after these jvmargs" - ozone_add_option "--validate (continue)" "validates if all jars as indicated in the corresponding OZONE_RUN_ARTIFACT_NAME classpath file are present, command execution shall continue post validation failure if 'continue' is passed" + ozone_add_option "--validate [continue]" "validate that all required jars are present on the classpath; with 'continue', keep running even if validation fails" ozone_add_subcommand "classpath" client "prints the class path needed for running ozone commands" ozone_add_subcommand "completion" client "generate autocompletion script for bash/zsh" diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/utils/AutoCompletion.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/utils/AutoCompletion.java index 3d78b1c1a2ef..22ef11d9dee7 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/utils/AutoCompletion.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/utils/AutoCompletion.java @@ -168,8 +168,8 @@ private static final class Ozone { private String jvmargs; @Option(names = {"--validate"}, - description = "validates if all jars as indicated in the corresponding OZONE_RUN_ARTIFACT_NAME classpath " + - "file are present, command execution shall continue post validation failure if 'continue' is passed") + description = "validate that all required jars are present on the classpath; " + + "with 'continue', keep running even if validation fails") private String validate; } } From eb40a7564535380fff4aa70a2b469b5cc1a51a20 Mon Sep 17 00:00:00 2001 From: Chi-Hsuan Huang Date: Mon, 1 Jun 2026 22:59:51 +0800 Subject: [PATCH 3/7] HDDS-15420. Refer to Ozone instead of Hadoop in envvars help --- hadoop-ozone/dist/src/shell/ozone/ozone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-ozone/dist/src/shell/ozone/ozone b/hadoop-ozone/dist/src/shell/ozone/ozone index 0e89092b0a1b..c912b1d63396 100755 --- a/hadoop-ozone/dist/src/shell/ozone/ozone +++ b/hadoop-ozone/dist/src/shell/ozone/ozone @@ -41,7 +41,7 @@ function ozone_usage ozone_add_subcommand "classpath" client "prints the class path needed for running ozone commands" ozone_add_subcommand "completion" client "generate autocompletion script for bash/zsh" ozone_add_subcommand "datanode" daemon "run a HDDS datanode" - ozone_add_subcommand "envvars" client "display computed Hadoop environment variables" + ozone_add_subcommand "envvars" client "display computed Ozone environment variables" ozone_add_subcommand "daemonlog" admin "get/set the log level for each daemon" ozone_add_subcommand "freon" client "runs an ozone data generator" ozone_add_subcommand "fs" client "run a filesystem command on Ozone file system. Equivalent to 'hadoop fs'" From 2ff749c57214391c56fae915266ce98d470a7c54 Mon Sep 17 00:00:00 2001 From: Chi-Hsuan Huang Date: Mon, 1 Jun 2026 23:13:44 +0800 Subject: [PATCH 4/7] HDDS-15420. Fix copy-pasted --daemon description in autocompletion source The --daemon option description was accidentally copied from --buildpaths. Correct it to 'operate on a daemon' for source consistency. (picocli's generated completion emits option names only, so this is not user-visible today.) --- .../main/java/org/apache/hadoop/ozone/utils/AutoCompletion.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/utils/AutoCompletion.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/utils/AutoCompletion.java index 22ef11d9dee7..7e1ccbf04fbd 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/utils/AutoCompletion.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/utils/AutoCompletion.java @@ -139,7 +139,7 @@ private static final class Ozone { private String debug; @Option(names = {"--daemon"}, - description = "attempt to add class files from build tree") + description = "operate on a daemon") private String daemon; @Option(names = {"--help"}, From c60477c090605f28a85dfb164a95f6d5ac8f47e2 Mon Sep 17 00:00:00 2001 From: Chi-Hsuan Huang Date: Mon, 1 Jun 2026 23:13:44 +0800 Subject: [PATCH 5/7] HDDS-15420. Document and support shell alias for sh command The 'shell' alias for 'sh' is accepted by the ozone script but was undocumented and unknown to the autocompletion generator. Note it in the usage menu and register it on the OzoneShell command, so generated bash/zsh completion lists and dispatches 'shell' as well. --- .../src/main/java/org/apache/hadoop/ozone/shell/OzoneShell.java | 2 +- hadoop-ozone/dist/src/shell/ozone/ozone | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-ozone/cli-shell/src/main/java/org/apache/hadoop/ozone/shell/OzoneShell.java b/hadoop-ozone/cli-shell/src/main/java/org/apache/hadoop/ozone/shell/OzoneShell.java index 6d83d0fc13a1..22422fec22b8 100644 --- a/hadoop-ozone/cli-shell/src/main/java/org/apache/hadoop/ozone/shell/OzoneShell.java +++ b/hadoop-ozone/cli-shell/src/main/java/org/apache/hadoop/ozone/shell/OzoneShell.java @@ -30,7 +30,7 @@ /** * Shell commands for native rpc object manipulation. */ -@Command(name = "ozone sh", aliases = "sh", +@Command(name = "ozone sh", aliases = {"sh", "shell"}, description = "Shell for Ozone object store", subcommands = { BucketCommands.class, diff --git a/hadoop-ozone/dist/src/shell/ozone/ozone b/hadoop-ozone/dist/src/shell/ozone/ozone index c912b1d63396..4261bc324dbf 100755 --- a/hadoop-ozone/dist/src/shell/ozone/ozone +++ b/hadoop-ozone/dist/src/shell/ozone/ozone @@ -53,7 +53,7 @@ function ozone_usage ozone_add_subcommand "httpfs" daemon "run the HTTPFS compatible REST gateway" ozone_add_subcommand "csi" daemon "run the standalone CSI daemon" ozone_add_subcommand "recon" daemon "run the Recon service" - ozone_add_subcommand "sh" client "command line interface for object store operations" + ozone_add_subcommand "sh" client "command line interface for object store operations (alias: shell)" ozone_add_subcommand "s3" client "command line interface for s3 related operations" ozone_add_subcommand "tenant" client "command line interface for multi-tenant related operations" ozone_add_subcommand "insight" client "tool to get runtime operation information" From 6be4a0258fbad0226d86fccbe1be4e1be33e4511 Mon Sep 17 00:00:00 2001 From: Chi-Hsuan Huang Date: Mon, 1 Jun 2026 23:50:25 +0800 Subject: [PATCH 6/7] HDDS-15420. Drop internal OZONE_RUN_ARTIFACT_NAME from --validate usage text The --validate misuse/error message and its function doc still named the internal OZONE_RUN_ARTIFACT_NAME variable. Reword to user-facing text, consistent with the usage menu and autocompletion descriptions. --- hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh b/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh index 4a4173f6d67f..475ba6740fa8 100755 --- a/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh +++ b/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh @@ -48,14 +48,14 @@ function ozone_debug ## @replaceable yes function ozone_validate_classpath_usage { - description=$'The --validate flag validates if all jars as indicated in the corresponding OZONE_RUN_ARTIFACT_NAME classpath file are present\n\n' + description=$'The --validate flag checks that all jars required for the command are present on the classpath\n\n' usage_text=$'Usage I: ozone --validate classpath \nUsage II: ozone --validate [OPTIONS] --daemon start|status|stop csi|datanode|om|recon|s3g|scm\n\n' options=$' OPTIONS is none or any of:\n\ncontinue\tcommand execution shall continue even if validation fails' ozone_error "${description}${usage_text}${options}" exit 1 } -## @description Validates if all jars as indicated in the corresponding OZONE_RUN_ARTIFACT_NAME classpath file are present +## @description Validates that all jars required for the command are present on the classpath ## @audience private ## @stability evolving ## @replaceable yes From 469ef7baa0cbf5e1b67015d92544da6c13bd7d73 Mon Sep 17 00:00:00 2001 From: Chi-Hsuan Huang Date: Mon, 1 Jun 2026 23:50:38 +0800 Subject: [PATCH 7/7] HDDS-15420. Refer to Ozone instead of Hadoop in envvars tool docs --- hadoop-hdds/docs/content/tools/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-hdds/docs/content/tools/_index.md b/hadoop-hdds/docs/content/tools/_index.md index c44be17effa1..aa708e263b81 100644 --- a/hadoop-hdds/docs/content/tools/_index.md +++ b/hadoop-hdds/docs/content/tools/_index.md @@ -54,7 +54,7 @@ Admin commands: * **classpath** - Prints the class path needed to get the hadoop jar and the required libraries. * **dtutil** - Operations related to delegation tokens - * **envvars** - Display computed Hadoop environment variables. + * **envvars** - Display computed Ozone environment variables. * **getconf** - Reads ozone config values from configuration. * **genconf** - Generate minimally required ozone configs and output to ozone-site.xml.