Merge -r 1203454:1203455 from trunk to branch-0.23. Fixes: MAPREDUCE-3373

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1203458 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas White 2011-11-18 01:01:20 +00:00
parent ab36c671c0
commit 90158a3ec2
13 changed files with 42 additions and 16 deletions

View File

@ -44,8 +44,8 @@ Release 0.23.1 - Unreleased
MAPREDUCE-3169. Create a new MiniMRCluster equivalent which only provides MAPREDUCE-3169. Create a new MiniMRCluster equivalent which only provides
client APIs cross MR1 and MR2. (Ahmed via tucu) client APIs cross MR1 and MR2. (Ahmed via tucu)
MAPREDUCE-3169. Create a new MiniMRCluster equivalent which only provides MAPREDUCE-3373. Hadoop scripts unconditionally source
client APIs cross MR1 and MR2. (Ahmed via tucu) "$bin"/../libexec/hadoop-config.sh. (Bruno Mahé via tomwhite)
OPTIMIZATIONS OPTIMIZATIONS

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 "$@"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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