YARN-2131. Addendum. Add a way to format the RMStateStore. (Robert Kanter via kasha)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1612444 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
33d82259aa
commit
10a82e54da
|
@ -61,23 +61,27 @@ HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||||
function print_usage(){
|
function print_usage(){
|
||||||
echo "Usage: yarn [--config confdir] COMMAND"
|
echo "Usage: yarn [--config confdir] COMMAND"
|
||||||
echo "where COMMAND is one of:"
|
echo "where COMMAND is one of:"
|
||||||
echo " resourcemanager -format deletes the RMStateStore"
|
echo " resourcemanager -format-state-store deletes the RMStateStore"
|
||||||
echo " resourcemanager run the ResourceManager"
|
echo " resourcemanager run the ResourceManager"
|
||||||
echo " nodemanager run a nodemanager on each slave"
|
echo " nodemanager run a nodemanager on each slave"
|
||||||
echo " timelineserver run the timeline server"
|
echo " timelineserver run the timeline server"
|
||||||
echo " rmadmin admin tools"
|
echo " rmadmin admin tools"
|
||||||
echo " version print the version"
|
echo " version print the version"
|
||||||
echo " jar <jar> run a jar file"
|
echo " jar <jar> run a jar file"
|
||||||
echo " application prints application(s) report/kill application"
|
echo " application prints application(s)"
|
||||||
echo " applicationattempt prints applicationattempt(s) report"
|
echo " report/kill application"
|
||||||
echo " container prints container(s) report"
|
echo " applicationattempt prints applicationattempt(s)"
|
||||||
echo " node prints node report(s)"
|
echo " report"
|
||||||
echo " logs dump container logs"
|
echo " container prints container(s) report"
|
||||||
echo " classpath prints the class path needed to get the"
|
echo " node prints node report(s)"
|
||||||
echo " Hadoop jar and the required libraries"
|
echo " logs dump container logs"
|
||||||
echo " daemonlog get/set the log level for each daemon"
|
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 " 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."
|
echo "Most commands print help when invoked w/o parameters."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1035,8 +1035,8 @@ public class ResourceManager extends CompositeService implements Recoverable {
|
||||||
StringUtils.startupShutdownMessage(ResourceManager.class, argv, LOG);
|
StringUtils.startupShutdownMessage(ResourceManager.class, argv, LOG);
|
||||||
try {
|
try {
|
||||||
Configuration conf = new YarnConfiguration();
|
Configuration conf = new YarnConfiguration();
|
||||||
// If -format, then delete RMStateStore; else startup normally
|
// If -format-state-store, then delete RMStateStore; else startup normally
|
||||||
if (argv.length == 1 && argv[0].equals("-format")) {
|
if (argv.length == 1 && argv[0].equals("-format-state-store")) {
|
||||||
deleteRMStateStore(conf);
|
deleteRMStateStore(conf);
|
||||||
} else {
|
} else {
|
||||||
ResourceManager resourceManager = new ResourceManager();
|
ResourceManager resourceManager = new ResourceManager();
|
||||||
|
|
Loading…
Reference in New Issue