From 5d2f0a19aa415bf274a24cf1383e2f688f53e5a6 Mon Sep 17 00:00:00 2001 From: Eric Yang Date: Tue, 4 Oct 2011 00:51:29 +0000 Subject: [PATCH] MAPREDUCE-3112. Fixed recursive sourcing of HADOOP_OPTS environment variable. (Eric Yang) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1178658 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/packages/templates/conf/hadoop-env.sh | 2 +- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../src/java/org/apache/hadoop/streaming/StreamJob.java | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/packages/templates/conf/hadoop-env.sh b/hadoop-common-project/hadoop-common/src/main/packages/templates/conf/hadoop-env.sh index 488b3be9541..368ae657ccc 100644 --- a/hadoop-common-project/hadoop-common/src/main/packages/templates/conf/hadoop-env.sh +++ b/hadoop-common-project/hadoop-common/src/main/packages/templates/conf/hadoop-env.sh @@ -38,7 +38,7 @@ done #export HADOOP_NAMENODE_INIT_HEAPSIZE="" # Extra Java runtime options. Empty by default. -export HADOOP_OPTS="-Djava.net.preferIPv4Stack=true $HADOOP_OPTS" +export HADOOP_OPTS="-Djava.net.preferIPv4Stack=true $HADOOP_CLIENT_OPTS" # Command specific options appended to HADOOP_OPTS when specified export HADOOP_NAMENODE_OPTS="-Dsecurity.audit.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_NAMENODE_OPTS}" diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 05d1fcbeed1..338de52f5cf 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -1478,6 +1478,9 @@ Release 0.23.0 - Unreleased MAPREDUCE-2792. Replace usage of node ip-addresses with hostnames. (vinodkv via acmurthy) + MAPREDUCE-3112. Fixed recursive sourcing of HADOOP_OPTS environment + variable. (Eric Yang) + Release 0.22.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamJob.java b/hadoop-mapreduce-project/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamJob.java index 27629476d92..a019be7f344 100644 --- a/hadoop-mapreduce-project/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamJob.java +++ b/hadoop-mapreduce-project/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamJob.java @@ -180,7 +180,9 @@ public class StreamJob implements Tool { void preProcessArgs() { verbose_ = false; - addTaskEnvironment_ = ""; + // Unset HADOOP_ROOT_LOGGER in case streaming job + // invokes additional hadoop commands. + addTaskEnvironment_ = "HADOOP_ROOT_LOGGER="; } void postProcessArgs() throws IOException {