hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject svn commit: r1469218 - in /hadoop/common/branches/branch-1-win: CHANGES.branch-1-win.txt bin/hadoop bin/hadoop-config.cmd
Date Thu, 18 Apr 2013 08:06:43 GMT
Author: harsh
Date: Thu Apr 18 08:06:42 2013
New Revision: 1469218

URL: http://svn.apache.org/r1469218
Log:
Backport of HADOOP-9450. HADOOP_USER_CLASSPATH_FIRST is not honored; CLASSPATH is PREpended
instead of APpended. Contributed by Chris Nauroth and Harsh J. (harsh)

Modified:
    hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt
    hadoop/common/branches/branch-1-win/bin/hadoop
    hadoop/common/branches/branch-1-win/bin/hadoop-config.cmd

Modified: hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt?rev=1469218&r1=1469217&r2=1469218&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt (original)
+++ hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt Thu Apr 18 08:06:42 2013
@@ -365,3 +365,6 @@ Branch-hadoop-1-win (branched from branc
 
     HADOOP-9467. Metrics2 record filter should check name as well as tags.
     (Ganeshan Iyler via llu)
+
+    HADOOP-9450. HADOOP_USER_CLASSPATH_FIRST is not honored; CLASSPATH
+    is PREpended instead of APpended. (Chris Nauroth and harsh via harsh)

Modified: hadoop/common/branches/branch-1-win/bin/hadoop
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/bin/hadoop?rev=1469218&r1=1469217&r2=1469218&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/bin/hadoop (original)
+++ hadoop/common/branches/branch-1-win/bin/hadoop Thu Apr 18 08:06:42 2013
@@ -129,9 +129,7 @@ fi
 
 # CLASSPATH initially contains $HADOOP_CONF_DIR
 CLASSPATH="${HADOOP_CONF_DIR}"
-if [ "$HADOOP_USER_CLASSPATH_FIRST" != "" ] && [ "$HADOOP_CLASSPATH" != "" ] ; then
-  CLASSPATH=${CLASSPATH}:${HADOOP_CLASSPATH}
-fi
+
 CLASSPATH=${CLASSPATH}:$JAVA_HOME/lib/tools.jar
 
 # for developers, add Hadoop classes to CLASSPATH
@@ -205,9 +203,16 @@ else
   done
 fi
 
-# add user-specified CLASSPATH last
-if [ "$HADOOP_USER_CLASSPATH_FIRST" = "" ] && [ "$HADOOP_CLASSPATH" != "" ]; then
-  CLASSPATH=${CLASSPATH}:${HADOOP_CLASSPATH}
+# Add the user-specified CLASSPATH via HADOOP_CLASSPATH
+# Add it first or last depending on if user has
+# set env-var HADOOP_USER_CLASSPATH_FIRST
+if [ "$HADOOP_CLASSPATH" != "" ]; then
+  # Prefix it if its to be preceded
+  if [ "$HADOOP_USER_CLASSPATH_FIRST" != "" ]; then
+    CLASSPATH=${HADOOP_CLASSPATH}:${CLASSPATH}
+  else
+    CLASSPATH=${CLASSPATH}:${HADOOP_CLASSPATH}
+  fi
 fi
 
 # default log directory & file

Modified: hadoop/common/branches/branch-1-win/bin/hadoop-config.cmd
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/bin/hadoop-config.cmd?rev=1469218&r1=1469217&r2=1469218&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/bin/hadoop-config.cmd (original)
+++ hadoop/common/branches/branch-1-win/bin/hadoop-config.cmd Thu Apr 18 08:06:42 2013
@@ -149,19 +149,6 @@ for %%i in (%HADOOP_CORE_HOME%\lib\jsp-2
   set CLASSPATH=!CLASSPATH!;%%i
 )
 
-@rem
-@rem add user-specified CLASSPATH last
-@rem
-
-if defined HADOOP_CLASSPATH (
-  if defined HADOOP_USER_CLASSPATH_FIRST (
-    set CLASSPATH=%HADOOP_CLASSPATH%;%CLASSPATH%;
-  )
-  if not defined HADOOP_USER_CLASSPATH_FIRST (
-    set CLASSPATH=%CLASSPATH%;%HADOOP_CLASSPATH%;
-  )
-)
-
 if not defined HADOOP_LOG_DIR (
   set HADOOP_LOG_DIR=%HADOOP_HOME%\logs
 )
@@ -275,4 +262,17 @@ if defined HADOOP_MAPRED_HOME (
   )
 )
 
+@rem
+@rem add user-specified CLASSPATH last
+@rem
+
+if defined HADOOP_CLASSPATH (
+  if defined HADOOP_USER_CLASSPATH_FIRST (
+    set CLASSPATH=%HADOOP_CLASSPATH%;%CLASSPATH%;
+  )
+  if not defined HADOOP_USER_CLASSPATH_FIRST (
+    set CLASSPATH=%CLASSPATH%;%HADOOP_CLASSPATH%;
+  )
+)
+
 :eof



Mime
View raw message