diff --git a/hadoop-yarn-project/hadoop-yarn/bin/yarn b/hadoop-yarn-project/hadoop-yarn/bin/yarn index f52a83e609e..a739dac8e31 100644 --- a/hadoop-yarn-project/hadoop-yarn/bin/yarn +++ b/hadoop-yarn-project/hadoop-yarn/bin/yarn @@ -61,23 +61,27 @@ HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR} function print_usage(){ echo "Usage: yarn [--config confdir] COMMAND" echo "where COMMAND is one of:" - echo " resourcemanager -format deletes the RMStateStore" - echo " resourcemanager run the ResourceManager" - echo " nodemanager run a nodemanager on each slave" - echo " timelineserver run the timeline server" - echo " rmadmin admin tools" - echo " version print the version" - echo " jar run a jar file" - echo " application prints application(s) report/kill application" - echo " applicationattempt prints applicationattempt(s) report" - echo " container prints container(s) report" - echo " node prints node report(s)" - echo " logs dump container logs" - echo " classpath prints the class path needed to get the" - echo " Hadoop jar and the required libraries" - echo " daemonlog get/set the log level for each daemon" + echo " resourcemanager -format-state-store deletes the RMStateStore" + echo " resourcemanager run the ResourceManager" + echo " nodemanager run a nodemanager on each slave" + echo " timelineserver run the timeline server" + echo " rmadmin admin tools" + echo " version print the version" + echo " jar run a jar file" + echo " application prints application(s)" + echo " report/kill application" + echo " applicationattempt prints applicationattempt(s)" + echo " report" + echo " container prints container(s) report" + echo " node prints node report(s)" + echo " logs dump container logs" + echo " classpath prints the class path needed to" + echo " get the Hadoop jar and the" + echo " required libraries" + echo " daemonlog get/set the log level for each" + echo " daemon" echo " or" - echo " CLASSNAME run the class named CLASSNAME" + echo " CLASSNAME run the class named CLASSNAME" echo "Most commands print help when invoked w/o parameters." } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java index e2deaa11c60..409ba4893b9 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java @@ -1035,8 +1035,8 @@ public class ResourceManager extends CompositeService implements Recoverable { StringUtils.startupShutdownMessage(ResourceManager.class, argv, LOG); try { Configuration conf = new YarnConfiguration(); - // If -format, then delete RMStateStore; else startup normally - if (argv.length == 1 && argv[0].equals("-format")) { + // If -format-state-store, then delete RMStateStore; else startup normally + if (argv.length == 1 && argv[0].equals("-format-state-store")) { deleteRMStateStore(conf); } else { ResourceManager resourceManager = new ResourceManager();