diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java index a6c4a42..59ce57f 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java @@ -69,15 +69,17 @@ protected final static Map USAGE = ImmutableMap.builder() .put("-transitionToActive", - new UsageInfo(" [--"+FORCEACTIVE+"]", "Transitions the service into Active state")) + new UsageInfo("[--"+FORCEACTIVE+"] [--"+FORCEMANUAL+"] ", + "Transitions the service into Active state")) .put("-transitionToStandby", - new UsageInfo("", "Transitions the service into Standby state")) + new UsageInfo("[--"+FORCEMANUAL+"] ", + "Transitions the service into Standby state")) .put("-failover", - new UsageInfo("[--"+FORCEFENCE+"] [--"+FORCEACTIVE+"] ", + new UsageInfo("[--"+FORCEFENCE+"] [--"+FORCEACTIVE+"] [--"+FORCEMANUAL+"] ", "Failover from the first service to the second.\n" + - "Unconditionally fence services if the "+FORCEFENCE+" option is used.\n" + + "Unconditionally fence services if the --"+FORCEFENCE+" option is used.\n" + "Try to failover to the target service even if it is not ready if the " + - FORCEACTIVE + " option is used.")) + "--" + FORCEACTIVE + " option is used.")) .put("-getServiceState", new UsageInfo("", "Returns the state of the service")) .put("-checkHealth", @@ -228,7 +230,7 @@ private boolean checkManualStateManagementOK(HAServiceTarget target) { "Refusing to manually manage HA state, since it may cause\n" + "a split-brain scenario or other incorrect state.\n" + "If you are very sure you know what you are doing, please \n" + - "specify the " + FORCEMANUAL + " flag."); + "specify the --" + FORCEMANUAL + " flag."); return false; } else { LOG.warn("Proceeding with manual HA state management even though\n" + @@ -462,7 +464,7 @@ protected int runCmd(String[] argv) throws Exception { private boolean confirmForceManual() throws IOException { return ToolRunner.confirmPrompt( - "You have specified the " + FORCEMANUAL + " flag. This flag is " + + "You have specified the --" + FORCEMANUAL + " flag. This flag is " + "dangerous, as it can induce a split-brain scenario that WILL " + "CORRUPT your HDFS namespace, possibly irrecoverably.\n" + "\n" +