From d8c3e63dced54e1453d46abe51eb2941768aa4f3 Mon Sep 17 00:00:00 2001 From: Arun Murthy Date: Fri, 26 Aug 2011 17:55:53 +0000 Subject: [PATCH] MAPREDUCE-2885. Fix mapred-config.sh to look for hadoop-config.sh in HADOOP_COMMON_HOME/libexec. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1162188 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ hadoop-mapreduce-project/bin/mapred-config.sh | 2 ++ 2 files changed, 5 insertions(+) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 6604f47486..28ba0bc152 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -1152,6 +1152,9 @@ Release 0.23.0 - Unreleased MAPREDUCE-2881. Fix to include log4j 1.2.16 depenency (gkesavan) + MAPREDUCE-2885. Fix mapred-config.sh to look for hadoop-config.sh in + HADOOP_COMMON_HOME/libexec. (acmurthy) + Release 0.22.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/bin/mapred-config.sh b/hadoop-mapreduce-project/bin/mapred-config.sh index 53c12a8d66..c79f4fb62f 100644 --- a/hadoop-mapreduce-project/bin/mapred-config.sh +++ b/hadoop-mapreduce-project/bin/mapred-config.sh @@ -24,6 +24,8 @@ bin=`cd "$bin"; pwd` if [ -e "$bin/../libexec/hadoop-config.sh" ]; then . "$bin/../libexec/hadoop-config.sh" +elif [ -e "${HADOOP_COMMON_HOME}/libexec/hadoop-config.sh" ]; then + . "$HADOOP_COMMON_HOME"/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