MAPREDUCE-2550. Fix bin/mapred to work properly from within a source checkout. Contributed by Eric Yang.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1137017 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7964df9c94
commit
5f81b0f421
@ -304,6 +304,9 @@ Trunk (unreleased changes)
|
||||
MAPREDUCE-2576. Typo in comment in SimulatorLaunchTaskAction.java.
|
||||
(Tim Sell via jghoman)
|
||||
|
||||
MAPREDUCE-2550. Fix bin/mapred to work properly from within a source
|
||||
checkout (Eric Yang via todd)
|
||||
|
||||
Release 0.22.0 - Unreleased
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -19,7 +19,11 @@ bin=`which $0`
|
||||
bin=`dirname ${bin}`
|
||||
bin=`cd "$bin"; pwd`
|
||||
|
||||
if [ -e $bin/../libexec/mapred-config.sh ]; then
|
||||
. $bin/../libexec/mapred-config.sh
|
||||
else
|
||||
. "$bin/mapred-config.sh"
|
||||
fi
|
||||
|
||||
function print_usage(){
|
||||
echo "Usage: mapred [--config confdir] COMMAND"
|
||||
|
@ -22,10 +22,14 @@ bin=`which "$0"`
|
||||
bin=`dirname "${bin}"`
|
||||
bin=`cd "$bin"; pwd`
|
||||
|
||||
if [ -d "${bin}" ]; then
|
||||
. "$bin"/../libexec/hadoop-config.sh
|
||||
elif [ -e "${HADOOP_PREFIX}"/bin/hadoop-config.sh ]; then
|
||||
. "$HADOOP_MAPRED_PREFIX"/bin/hadoop-config.sh
|
||||
if [ -e "$bin/../libexec/hadoop-config.sh" ]; then
|
||||
. "$bin/../libexec/hadoop-config.sh"
|
||||
elif [ -e "${HADOOP_COMMON_HOME}/bin/hadoop-config.sh" ]; then
|
||||
. "$HADOOP_COMMON_HOME"/bin/hadoop-config.sh
|
||||
elif [ -e "${HADOOP_HOME}/bin/hadoop-config.sh" ]; then
|
||||
. "$HADOOP_HOME"/bin/hadoop-config.sh
|
||||
elif [ -e "${HADOOP_MAPRED_HOME}/bin/hadoop-config.sh" ]; then
|
||||
. "$HADOOP_MAPRED_HOME"/bin/hadoop-config.sh
|
||||
else
|
||||
echo "Hadoop common not found."
|
||||
exit
|
||||
|
@ -21,7 +21,12 @@
|
||||
bin=`dirname "${BASH_SOURCE-$0}"`
|
||||
bin=`cd "$bin"; pwd`
|
||||
|
||||
if [ -e $bin/../libexec/mapred-config.sh ]; then
|
||||
. $bin/../libexec/mapred-config.sh
|
||||
else
|
||||
. "$bin/mapred-config.sh"
|
||||
fi
|
||||
|
||||
|
||||
# start mapred daemons
|
||||
# start jobtracker first to minimize connection errors at startup
|
||||
|
@ -21,7 +21,11 @@
|
||||
bin=`dirname "${BASH_SOURCE-$0}"`
|
||||
bin=`cd "$bin"; pwd`
|
||||
|
||||
if [ -e $bin/../libexec/mapred-config.sh ]; then
|
||||
. $bin/../libexec/mapred-config.sh
|
||||
else
|
||||
. "$bin/mapred-config.sh"
|
||||
fi
|
||||
|
||||
"$HADOOP_PREFIX"/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR --script "$bin"/mapred stop jobtracker
|
||||
"$HADOOP_PREFIX"/bin/hadoop-daemons.sh --config $HADOOP_CONF_DIR --script "$bin"/mapred stop tasktracker
|
||||
|
Loading…
x
Reference in New Issue
Block a user