HADOOP-9267. hadoop -help, -h, --help should show usage instructions. Contributed by Andrew Wang.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1449161 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cdb292f44c
commit
8271fae921
|
@ -376,6 +376,9 @@ Release 2.0.4-beta - UNRELEASED
|
||||||
|
|
||||||
HADOOP-9304. remove addition of avro genreated-sources dirs to build. (tucu)
|
HADOOP-9304. remove addition of avro genreated-sources dirs to build. (tucu)
|
||||||
|
|
||||||
|
HADOOP-9267. hadoop -help, -h, --help should show usage instructions.
|
||||||
|
(Andrew Wang via atm)
|
||||||
|
|
||||||
Release 2.0.3-alpha - 2013-02-06
|
Release 2.0.3-alpha - 2013-02-06
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -50,6 +50,12 @@ fi
|
||||||
|
|
||||||
COMMAND=$1
|
COMMAND=$1
|
||||||
case $COMMAND in
|
case $COMMAND in
|
||||||
|
# usage flags
|
||||||
|
--help|-help|-h)
|
||||||
|
print_usage
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
|
||||||
#hdfs commands
|
#hdfs commands
|
||||||
namenode|secondarynamenode|datanode|dfs|dfsadmin|fsck|balancer|fetchdt|oiv|dfsgroups)
|
namenode|secondarynamenode|datanode|dfs|dfsadmin|fsck|balancer|fetchdt|oiv|dfsgroups)
|
||||||
echo "DEPRECATED: Use of this script to execute hdfs command is deprecated." 1>&2
|
echo "DEPRECATED: Use of this script to execute hdfs command is deprecated." 1>&2
|
||||||
|
|
|
@ -56,6 +56,14 @@ fi
|
||||||
COMMAND=$1
|
COMMAND=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
|
case $COMMAND in
|
||||||
|
# usage flags
|
||||||
|
--help|-help|-h)
|
||||||
|
print_usage
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Determine if we're starting a secure datanode, and if so, redefine appropriate variables
|
# Determine if we're starting a secure datanode, and if so, redefine appropriate variables
|
||||||
if [ "$COMMAND" == "datanode" ] && [ "$EUID" -eq 0 ] && [ -n "$HADOOP_SECURE_DN_USER" ]; then
|
if [ "$COMMAND" == "datanode" ] && [ "$EUID" -eq 0 ] && [ -n "$HADOOP_SECURE_DN_USER" ]; then
|
||||||
if [ -n "$JSVC_HOME" ]; then
|
if [ -n "$JSVC_HOME" ]; then
|
||||||
|
|
|
@ -53,13 +53,7 @@ DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||||
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||||
. $HADOOP_LIBEXEC_DIR/yarn-config.sh
|
. $HADOOP_LIBEXEC_DIR/yarn-config.sh
|
||||||
|
|
||||||
cygwin=false
|
function print_usage(){
|
||||||
case "`uname`" in
|
|
||||||
CYGWIN*) cygwin=true;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# if no args specified, show usage
|
|
||||||
if [ $# = 0 ]; then
|
|
||||||
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 run the ResourceManager"
|
echo " resourcemanager run the ResourceManager"
|
||||||
|
@ -76,6 +70,16 @@ if [ $# = 0 ]; then
|
||||||
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."
|
||||||
|
}
|
||||||
|
|
||||||
|
cygwin=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN*) cygwin=true;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# if no args specified, show usage
|
||||||
|
if [ $# = 0 ]; then
|
||||||
|
print_usage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -83,6 +87,14 @@ fi
|
||||||
COMMAND=$1
|
COMMAND=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
|
case $COMMAND in
|
||||||
|
# usage flags
|
||||||
|
--help|-help|-h)
|
||||||
|
print_usage
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [ -f "${YARN_CONF_DIR}/yarn-env.sh" ]; then
|
if [ -f "${YARN_CONF_DIR}/yarn-env.sh" ]; then
|
||||||
. "${YARN_CONF_DIR}/yarn-env.sh"
|
. "${YARN_CONF_DIR}/yarn-env.sh"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue