MAPREDUCE-3373. Hadoop scripts unconditionally source "$bin"/../libexec/hadoop-config.sh. Contributed by Bruno Mahé
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1203455 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dc5a0ab245
commit
bd2e2aaf99
|
@ -100,6 +100,9 @@ Release 0.23.1 - Unreleased
|
||||||
MAPREDUCE-3102. Changed NodeManager to fail fast when LinuxContainerExecutor
|
MAPREDUCE-3102. Changed NodeManager to fail fast when LinuxContainerExecutor
|
||||||
has wrong configuration or permissions. (Hitesh Shah via vinodkv)
|
has wrong configuration or permissions. (Hitesh Shah via vinodkv)
|
||||||
|
|
||||||
|
MAPREDUCE-3373. Hadoop scripts unconditionally source
|
||||||
|
"$bin"/../libexec/hadoop-config.sh. (Bruno Mahé via tomwhite)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -19,8 +19,10 @@ bin=`which $0`
|
||||||
bin=`dirname ${bin}`
|
bin=`dirname ${bin}`
|
||||||
bin=`cd "$bin"; pwd`
|
bin=`cd "$bin"; pwd`
|
||||||
|
|
||||||
if [ -e $bin/../libexec/mapred-config.sh ]; then
|
DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||||
. $bin/../libexec/mapred-config.sh
|
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||||
|
if [ -e ${HADOOP_LIBEXEC_DIR}/mapred-config.sh ]; then
|
||||||
|
. ${HADOOP_LIBEXEC_DIR}/mapred-config.sh
|
||||||
else
|
else
|
||||||
. "$bin/mapred-config.sh"
|
. "$bin/mapred-config.sh"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -22,8 +22,10 @@ bin=`which "$0"`
|
||||||
bin=`dirname "${bin}"`
|
bin=`dirname "${bin}"`
|
||||||
bin=`cd "$bin"; pwd`
|
bin=`cd "$bin"; pwd`
|
||||||
|
|
||||||
if [ -e "$bin/../libexec/hadoop-config.sh" ]; then
|
DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||||
. "$bin/../libexec/hadoop-config.sh"
|
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||||
|
if [ -e "${HADOOP_LIBEXEC_DIR}/hadoop-config.sh" ]; then
|
||||||
|
. "${HADOOP_LIBEXEC_DIR}/hadoop-config.sh"
|
||||||
elif [ -e "${HADOOP_COMMON_HOME}/libexec/hadoop-config.sh" ]; then
|
elif [ -e "${HADOOP_COMMON_HOME}/libexec/hadoop-config.sh" ]; then
|
||||||
. "$HADOOP_COMMON_HOME"/libexec/hadoop-config.sh
|
. "$HADOOP_COMMON_HOME"/libexec/hadoop-config.sh
|
||||||
elif [ -e "${HADOOP_COMMON_HOME}/bin/hadoop-config.sh" ]; then
|
elif [ -e "${HADOOP_COMMON_HOME}/bin/hadoop-config.sh" ]; then
|
||||||
|
|
|
@ -38,7 +38,9 @@ fi
|
||||||
bin=`dirname "${BASH_SOURCE-$0}"`
|
bin=`dirname "${BASH_SOURCE-$0}"`
|
||||||
bin=`cd "$bin"; pwd`
|
bin=`cd "$bin"; pwd`
|
||||||
|
|
||||||
. "$bin"/yarn-config.sh
|
DEFAULT_LIBEXEC_DIR="$bin"
|
||||||
|
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||||
|
. $HADOOP_LIBEXEC_DIR/yarn-config.sh
|
||||||
|
|
||||||
# If the slaves file is specified in the command line,
|
# If the slaves file is specified in the command line,
|
||||||
# then it takes precedence over the definition in
|
# then it takes precedence over the definition in
|
||||||
|
|
|
@ -23,7 +23,10 @@ echo "starting yarn daemons"
|
||||||
bin=`dirname "${BASH_SOURCE-$0}"`
|
bin=`dirname "${BASH_SOURCE-$0}"`
|
||||||
bin=`cd "$bin"; pwd`
|
bin=`cd "$bin"; pwd`
|
||||||
|
|
||||||
. "$bin"/yarn-config.sh
|
DEFAULT_LIBEXEC_DIR="$bin"
|
||||||
|
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||||
|
. $HADOOP_LIBEXEC_DIR/yarn-config.sh
|
||||||
|
|
||||||
# start resourceManager
|
# start resourceManager
|
||||||
"$bin"/yarn-daemon.sh --config $YARN_CONF_DIR start resourcemanager
|
"$bin"/yarn-daemon.sh --config $YARN_CONF_DIR start resourcemanager
|
||||||
# start nodeManager
|
# start nodeManager
|
||||||
|
|
|
@ -23,7 +23,10 @@ echo "stopping yarn daemons"
|
||||||
bin=`dirname "${BASH_SOURCE-$0}"`
|
bin=`dirname "${BASH_SOURCE-$0}"`
|
||||||
bin=`cd "$bin"; pwd`
|
bin=`cd "$bin"; pwd`
|
||||||
|
|
||||||
. "$bin"/yarn-config.sh
|
DEFAULT_LIBEXEC_DIR="$bin"
|
||||||
|
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||||
|
. $HADOOP_LIBEXEC_DIR/yarn-config.sh
|
||||||
|
|
||||||
# stop resourceManager
|
# stop resourceManager
|
||||||
"$bin"/yarn-daemon.sh --config $YARN_CONF_DIR stop resourcemanager
|
"$bin"/yarn-daemon.sh --config $YARN_CONF_DIR stop resourcemanager
|
||||||
# stop nodeManager
|
# stop nodeManager
|
||||||
|
|
|
@ -44,7 +44,9 @@
|
||||||
bin=`dirname "${BASH_SOURCE-$0}"`
|
bin=`dirname "${BASH_SOURCE-$0}"`
|
||||||
bin=`cd "$bin"; pwd`
|
bin=`cd "$bin"; pwd`
|
||||||
|
|
||||||
. "$bin"/yarn-config.sh
|
DEFAULT_LIBEXEC_DIR="$bin"
|
||||||
|
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||||
|
. $HADOOP_LIBEXEC_DIR/yarn-config.sh
|
||||||
|
|
||||||
cygwin=false
|
cygwin=false
|
||||||
case "`uname`" in
|
case "`uname`" in
|
||||||
|
|
|
@ -39,7 +39,9 @@ fi
|
||||||
bin=`dirname "${BASH_SOURCE-$0}"`
|
bin=`dirname "${BASH_SOURCE-$0}"`
|
||||||
bin=`cd "$bin"; pwd`
|
bin=`cd "$bin"; pwd`
|
||||||
|
|
||||||
. "$bin"/yarn-config.sh
|
DEFAULT_LIBEXEC_DIR="$bin"
|
||||||
|
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||||
|
. $HADOOP_LIBEXEC_DIR/yarn-config.sh
|
||||||
|
|
||||||
# get arguments
|
# get arguments
|
||||||
startStop=$1
|
startStop=$1
|
||||||
|
|
|
@ -30,7 +30,9 @@ fi
|
||||||
bin=`dirname "${BASH_SOURCE-$0}"`
|
bin=`dirname "${BASH_SOURCE-$0}"`
|
||||||
bin=`cd "$bin"; pwd`
|
bin=`cd "$bin"; pwd`
|
||||||
|
|
||||||
. $bin/yarn-config.sh
|
DEFAULT_LIBEXEC_DIR="$bin"
|
||||||
|
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||||
|
. $HADOOP_LIBEXEC_DIR/yarn-config.sh
|
||||||
|
|
||||||
exec "$bin/slaves.sh" --config $YARN_CONF_DIR cd "$YARN_HOME" \; "$bin/yarn-daemon.sh" --config $YARN_CONF_DIR "$@"
|
exec "$bin/slaves.sh" --config $YARN_CONF_DIR cd "$YARN_HOME" \; "$bin/yarn-daemon.sh" --config $YARN_CONF_DIR "$@"
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,9 @@ params=$#
|
||||||
bin=`dirname "$0"`
|
bin=`dirname "$0"`
|
||||||
bin=`cd "$bin"; pwd`
|
bin=`cd "$bin"; pwd`
|
||||||
|
|
||||||
. "$bin"/hadoop-config.sh
|
DEFAULT_LIBEXEC_DIR="$bin"
|
||||||
|
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||||
|
. $HADOOP_LIBEXEC_DIR/hadoop-config.sh
|
||||||
|
|
||||||
# get arguments
|
# get arguments
|
||||||
if [ $# -ge 1 ]; then
|
if [ $# -ge 1 ]; then
|
||||||
|
|
|
@ -25,7 +25,9 @@ params=$#
|
||||||
bin=`dirname "$0"`
|
bin=`dirname "$0"`
|
||||||
bin=`cd "$bin"; pwd`
|
bin=`cd "$bin"; pwd`
|
||||||
|
|
||||||
. "$bin"/hadoop-config.sh
|
DEFAULT_LIBEXEC_DIR="$bin"
|
||||||
|
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||||
|
. $HADOOP_LIBEXEC_DIR/hadoop-config.sh
|
||||||
|
|
||||||
# get arguments
|
# get arguments
|
||||||
if [ $# -ge 1 ]; then
|
if [ $# -ge 1 ]; then
|
||||||
|
|
|
@ -24,7 +24,9 @@ params=$#
|
||||||
bin=`dirname "$0"`
|
bin=`dirname "$0"`
|
||||||
bin=`cd "$bin"; pwd`
|
bin=`cd "$bin"; pwd`
|
||||||
|
|
||||||
. "$bin"/hadoop-config.sh
|
DEFAULT_LIBEXEC_DIR="$bin"
|
||||||
|
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||||
|
. $HADOOP_LIBEXEC_DIR/hadoop-config.sh
|
||||||
|
|
||||||
# get arguments
|
# get arguments
|
||||||
if [ $# -ge 1 ]; then
|
if [ $# -ge 1 ]; then
|
||||||
|
|
|
@ -25,7 +25,9 @@ params=$#
|
||||||
bin=`dirname "$0"`
|
bin=`dirname "$0"`
|
||||||
bin=`cd "$bin"; pwd`
|
bin=`cd "$bin"; pwd`
|
||||||
|
|
||||||
. "$bin"/hadoop-config.sh
|
DEFAULT_LIBEXEC_DIR="$bin"
|
||||||
|
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||||
|
. $HADOOP_LIBEXEC_DIR/hadoop-config.sh
|
||||||
|
|
||||||
# get arguments
|
# get arguments
|
||||||
if [ $# -ge 1 ]; then
|
if [ $# -ge 1 ]; then
|
||||||
|
|
Loading…
Reference in New Issue