From bd0fbbb9429e9c82ed4ef52e33fec8afb63dd9c2 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 18 Nov 2011 05:14:15 +0000 Subject: [PATCH] =?UTF-8?q?MAPREDUCE-3372.=20HADOOP=5FPREFIX=20cannot=20be?= =?UTF-8?q?=20overridden.=20Contributed=20by=20Bruno=20Mah=C3=A9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1203488 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ hadoop-mapreduce-project/src/examples/python/compile | 2 +- hadoop-mapreduce-project/src/examples/python/pyAbacus/compile | 2 +- .../src/packages/deb/init.d/hadoop-historyserver | 2 +- .../src/packages/rpm/init.d/hadoop-historyserver | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index d4a1197fb6e..8e4a8b3b453 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -103,6 +103,9 @@ Release 0.23.1 - Unreleased MAPREDUCE-3373. Hadoop scripts unconditionally source "$bin"/../libexec/hadoop-config.sh. (Bruno Mahé via tomwhite) + MAPREDUCE-3372. HADOOP_PREFIX cannot be overridden. + (Bruno Mahé via tomwhite) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-mapreduce-project/src/examples/python/compile b/hadoop-mapreduce-project/src/examples/python/compile index e202a1ccbbc..32c80ed921f 100644 --- a/hadoop-mapreduce-project/src/examples/python/compile +++ b/hadoop-mapreduce-project/src/examples/python/compile @@ -12,7 +12,7 @@ # limitations under the License. -export HADOOP_PREFIX=../../.. +export HADOOP_PREFIX=${HADOOP_PREFIX:-../../..} export CLASSPATH="$HADOOP_PREFIX/build/classes" diff --git a/hadoop-mapreduce-project/src/examples/python/pyAbacus/compile b/hadoop-mapreduce-project/src/examples/python/pyAbacus/compile index c06573b8da4..641d5ff7294 100644 --- a/hadoop-mapreduce-project/src/examples/python/pyAbacus/compile +++ b/hadoop-mapreduce-project/src/examples/python/pyAbacus/compile @@ -12,7 +12,7 @@ # limitations under the License. -export HADOOP_PREFIX=../../../../.. +export HADOOP_PREFIX=${HADOOP_PREFIX:-../../../../..} export CLASSPATH="$HADOOP_PREFIX/build/classes" export CLASSPATH=${CLASSPATH}:"$HADOOP_PREFIX/build/contrib/abacus/classes" diff --git a/hadoop-mapreduce-project/src/packages/deb/init.d/hadoop-historyserver b/hadoop-mapreduce-project/src/packages/deb/init.d/hadoop-historyserver index 4421f5538e8..6334729cd92 100644 --- a/hadoop-mapreduce-project/src/packages/deb/init.d/hadoop-historyserver +++ b/hadoop-mapreduce-project/src/packages/deb/init.d/hadoop-historyserver @@ -67,7 +67,7 @@ check_privsep_dir() { } export PATH="${PATH:+$PATH:}/usr/sbin:/usr/bin" -export HADOOP_PREFIX="/usr" +export HADOOP_PREFIX=${HADOOP_PREFIX:-/usr} case "$1" in start) diff --git a/hadoop-mapreduce-project/src/packages/rpm/init.d/hadoop-historyserver b/hadoop-mapreduce-project/src/packages/rpm/init.d/hadoop-historyserver index 71d1658327c..5677593870f 100644 --- a/hadoop-mapreduce-project/src/packages/rpm/init.d/hadoop-historyserver +++ b/hadoop-mapreduce-project/src/packages/rpm/init.d/hadoop-historyserver @@ -27,7 +27,7 @@ source /etc/default/hadoop-env.sh RETVAL=0 PIDFILE="${HADOOP_PID_DIR}/hadoop-mapred-historyserver.pid" desc="Hadoop historyserver daemon" -export HADOOP_PREFIX="/usr" +export HADOOP_PREFIX=${HADOOP_PREFIX:-/usr} start() { echo -n $"Starting $desc (hadoop-historyserver): "