hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vino...@apache.org
Subject hadoop git commit: HADOOP-12451. Setting HADOOP_HOME explicitly should be allowed. Fixing bugs in the first patch committed. (Karthik Kambatla via vinodkv)
Date Tue, 10 Nov 2015 20:32:35 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.7.2 57c0f5a5a -> 6d610af22


HADOOP-12451. Setting HADOOP_HOME explicitly should be allowed. Fixing bugs in
the first patch committed. (Karthik Kambatla via vinodkv)

(cherry picked from commit b742ea7fe677def932e94abfa7d3fcec80ccfd93)
(cherry picked from commit 373b29491f1fb34a7b83a300f01fbbe985b5b33d)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/6d610af2
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/6d610af2
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/6d610af2

Branch: refs/heads/branch-2.7.2
Commit: 6d610af22f6ef3ff542753d374e383e57540ad21
Parents: 57c0f5a
Author: Vinod Kumar Vavilapalli <vinodkv@apache.org>
Authored: Tue Nov 10 12:16:52 2015 -0800
Committer: Vinod Kumar Vavilapalli <vinodkv@apache.org>
Committed: Tue Nov 10 12:32:18 2015 -0800

----------------------------------------------------------------------
 .../hadoop-common/src/main/bin/hadoop-config.sh          | 11 +++++------
 hadoop-yarn-project/hadoop-yarn/bin/yarn                 | 11 +++++++----
 2 files changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/6d610af2/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh
index fab3db4..980f4b6 100644
--- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh
+++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh
@@ -251,14 +251,13 @@ TOOL_PATH="${TOOL_PATH:-$HADOOP_PREFIX/share/hadoop/tools/lib/*}"
 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.dir=$HADOOP_LOG_DIR"
 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.file=$HADOOP_LOGFILE"
 
-if [ "$HADOOP_HOME" = "" ]; then
-  HADOOP_HOME=$HADOOP_PREFIX
-fi
 if [ "$cygwin" = true ]; then
-  HADOOP_HOME=$(cygpath -w "$HADOOP_HOME" 2>/dev/null)
+  HADOOP_HOME=$(cygpath -w "$HADOOP_PREFIX" 2>/dev/null)
+  HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.home.dir=$HADOOP_HOME"
+  export HADOOP_HOME
+else
+  HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.home.dir=$HADOOP_PREFIX"
 fi
-export HADOOP_HOME
-HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.home.dir=$HADOOP_HOME"
 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.id.str=$HADOOP_IDENT_STRING"
 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.root.logger=${HADOOP_ROOT_LOGGER:-${HADOOP_LOGLEVEL},console}"
 if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6d610af2/hadoop-yarn-project/hadoop-yarn/bin/yarn
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/bin/yarn b/hadoop-yarn-project/hadoop-yarn/bin/yarn
index 7e3c29f..71347a2 100644
--- a/hadoop-yarn-project/hadoop-yarn/bin/yarn
+++ b/hadoop-yarn-project/hadoop-yarn/bin/yarn
@@ -312,12 +312,15 @@ YARN_OPTS="$YARN_OPTS -Dyarn.log.dir=$YARN_LOG_DIR"
 YARN_OPTS="$YARN_OPTS -Dhadoop.log.file=$YARN_LOGFILE"
 YARN_OPTS="$YARN_OPTS -Dyarn.log.file=$YARN_LOGFILE"
 YARN_OPTS="$YARN_OPTS -Dyarn.home.dir=$HADOOP_YARN_HOME"
-HADOOP_HOME=$HADOOP_PREFIX
+
 if $cygwin; then
-  HADOOP_HOME=$(cygpath -w "$HADOOP_HOME" 2>/dev/null)
+  HADOOP_HOME=$(cygpath -w "$HADOOP_PREFIX" 2>/dev/null)
+  YARN_OPTS="$YARN_OPTS -Dhadoop.home.dir=$HADOOP_HOME"
+  export HADOOP_HOME
+else
+  YARN_OPTS="$YARN_OPTS -Dhadoop.home.dir=$HADOOP_PREFIX"
 fi
-export HADOOP_HOME
-YARN_OPTS="$YARN_OPTS -Dhadoop.home.dir=$HADOOP_HOME"
+
 YARN_OPTS="$YARN_OPTS -Dhadoop.root.logger=${YARN_ROOT_LOGGER:-${HADOOP_LOGLEVEL},console}"
 YARN_OPTS="$YARN_OPTS -Dyarn.root.logger=${YARN_ROOT_LOGGER:-${HADOOP_LOGLEVEL},console}"
 if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then


Mime
View raw message