diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/OzoneRepair.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/OzoneRepair.java index b1ed206f975..6e23e63bb6f 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/OzoneRepair.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/OzoneRepair.java @@ -31,7 +31,7 @@ * Ozone Repair Command line tool. */ @CommandLine.Command(name = "ozone repair", - description = "Operational tool to repair Ozone", + description = "Repair is an advanced operation and the nodes being repaired should be stopped while it is running", versionProvider = HddsVersionProvider.class, mixinStandardHelpOptions = true) public class OzoneRepair extends GenericCli implements ExtensibleParentCommand { @@ -46,6 +46,10 @@ public static void main(String[] argv) { @Override public int execute(String[] argv) { + if (argv.length == 0 || argv[0].equals("--help") || argv[0].equals("-h")) { + return super.execute(argv); + } + String currentUser = getSystemUserName(); if (!("y".equalsIgnoreCase(getConsoleReadLineWithFormat(currentUser)))) { System.out.println("Aborting command.");