hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r807404 - in /hadoop/common/trunk: CHANGES.txt bin/hadoop-config.sh bin/hdfs bin/mapred bin/rcc
Date Mon, 24 Aug 2009 22:06:54 GMT
Author: szetszwo
Date: Mon Aug 24 22:06:54 2009
New Revision: 807404

URL: http://svn.apache.org/viewvc?rev=807404&view=rev
Log:
HADOOP-6152. Fix classpath variables in bin/hadoop-config.sh and some other scripts.  Contributed
by Aaron Kimball

Modified:
    hadoop/common/trunk/CHANGES.txt
    hadoop/common/trunk/bin/hadoop-config.sh
    hadoop/common/trunk/bin/hdfs
    hadoop/common/trunk/bin/mapred
    hadoop/common/trunk/bin/rcc

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=807404&r1=807403&r2=807404&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Mon Aug 24 22:06:54 2009
@@ -938,6 +938,9 @@
     HADOOP-6103. Clones the classloader as part of Configuration clone.
     (Amareshwari Sriramadasu via ddas)
 
+    HADOOP-6152. Fix classpath variables in bin/hadoop-config.sh and some
+    other scripts.  (Aaron Kimball via szetszwo)
+
 Release 0.20.1 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/bin/hadoop-config.sh
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/bin/hadoop-config.sh?rev=807404&r1=807403&r2=807404&view=diff
==============================================================================
--- hadoop/common/trunk/bin/hadoop-config.sh (original)
+++ hadoop/common/trunk/bin/hadoop-config.sh Mon Aug 24 22:06:54 2009
@@ -115,9 +115,6 @@
 if [ -d "$HADOOP_CORE_HOME/build/test/classes" ]; then
   CLASSPATH=${CLASSPATH}:$HADOOP_CORE_HOME/build/test/classes
 fi
-if [ -d "$HADOOP_CORE_HOME/build/tools" ]; then
-  CLASSPATH=${CLASSPATH}:$HADOOP_CORE_HOME/build/tools
-fi
 
 # so that filenames w/ spaces are handled correctly in loops below
 IFS=
@@ -157,13 +154,6 @@
   CLASSPATH=${CLASSPATH}:$f;
 done
 
-for f in $HADOOP_CORE_HOME/hadoop-*-tools.jar; do
-  TOOL_PATH=${TOOL_PATH}:$f;
-done
-for f in $HADOOP_CORE_HOME/build/hadoop-*-tools.jar; do
-  TOOL_PATH=${TOOL_PATH}:$f;
-done
-
 # add user-specified CLASSPATH last
 if [ "$HADOOP_CLASSPATH" != "" ]; then
   CLASSPATH=${CLASSPATH}:${HADOOP_CLASSPATH}
@@ -189,7 +179,6 @@
 if $cygwin; then
   HADOOP_CORE_HOME=`cygpath -w "$HADOOP_CORE_HOME"`
   HADOOP_LOG_DIR=`cygpath -w "$HADOOP_LOG_DIR"`
-  TOOL_PATH=`cygpath -p -w "$TOOL_PATH"`
 fi
 # setup 'java.library.path' for native-hadoop code if necessary
 JAVA_LIBRARY_PATH=''
@@ -228,12 +217,12 @@
 if [ "$HADOOP_HDFS_HOME" = "" ]; then
   if [ -d "${HADOOP_HOME}/hdfs" ]; then
     HADOOP_HDFS_HOME=$HADOOP_HOME/hdfs
-    echo Found HDFS installed at $HADOOP_HDFS_HOME
+    #echo Found HDFS installed at $HADOOP_HDFS_HOME
   fi
 fi
 
 if [ -d "${HADOOP_HDFS_HOME}" ]; then
-  for f in $HADOOP_HDFS_HOME/hadoop-*-hdfs.jar; do
+  for f in $HADOOP_HDFS_HOME/hadoop-hdfs-*.jar; do
     CLASSPATH=${CLASSPATH}:$f;
   done
 
@@ -247,14 +236,51 @@
   fi
 fi
 
+# cygwin path translation
+if $cygwin; then
+  HADOOP_HDFS_HOME=`cygpath -w "$HADOOP_HDFS_HOME"`
+fi
+
 # set mapred home if mapred is present
 if [ "$HADOOP_MAPRED_HOME" = "" ]; then
   if [ -d "${HADOOP_HOME}/mapred" ]; then
     HADOOP_MAPRED_HOME=$HADOOP_HOME/mapred
-    echo Found MAPRED installed at $HADOOP_MAPRED_HOME
+    #echo Found MAPRED installed at $HADOOP_MAPRED_HOME
   fi
 fi
 
+if [ -d "${HADOOP_MAPRED_HOME}" ]; then
+  for f in $HADOOP_MAPRED_HOME/hadoop-mapred-*.jar; do
+    CLASSPATH=${CLASSPATH}:$f
+  done
+
+  for f in $HADOOP_MAPRED_HOME/lib/*.jar; do
+    CLASSPATH=${CLASSPATH}:$f
+  done
+
+  if [ -d "$HADOOP_MAPRED_HOME/build/classes" ]; then
+    CLASSPATH=${CLASSPATH}:$HADOOP_MAPRED_HOME/build/classes
+  fi
+
+  if [ -d "$HADOOP_MAPRED_HOME/build/tools" ]; then
+    CLASSPATH=${CLASSPATH}:$HADOOP_MAPRED_HOME/build/tools
+  fi
+
+  for f in $HADOOP_MAPRED_HOME/hadoop-mapred-tools-*.jar; do
+    TOOL_PATH=${TOOL_PATH}:$f;
+  done
+  for f in $HADOOP_MAPRED_HOME/build/hadoop-mapred-tools-*.jar; do
+    TOOL_PATH=${TOOL_PATH}:$f;
+  done
+fi
+
+# cygwin path translation
+if $cygwin; then
+  HADOOP_MAPRED_HOME=`cygpath -w "$HADOOP_MAPRED_HOME"`
+  TOOL_PATH=`cygpath -p -w "$TOOL_PATH"`
+fi
+
+
 # TODO:remove this when dir structure is changed
-export HADOOP_HDFS_HOME=$HADOOP_HOME
-export HADOOP_MAPRED_HOME=$HADOOP_HOME
+#export HADOOP_HDFS_HOME=$HADOOP_HOME
+#export HADOOP_MAPRED_HOME=$HADOOP_HOME

Modified: hadoop/common/trunk/bin/hdfs
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/bin/hdfs?rev=807404&r1=807403&r2=807404&view=diff
==============================================================================
--- hadoop/common/trunk/bin/hdfs (original)
+++ hadoop/common/trunk/bin/hdfs Mon Aug 24 22:06:54 2009
@@ -94,7 +94,7 @@
 if [ -d "$HADOOP_HDFS_HOME/webapps" ]; then
   CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME
 fi
-for f in $HADOOP_HDFS_HOME/hadoop-*-hdfs.jar; do
+for f in $HADOOP_HDFS_HOME/hadoop-hdfs-*.jar; do
   CLASSPATH=${CLASSPATH}:$f;
 done
 

Modified: hadoop/common/trunk/bin/mapred
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/bin/mapred?rev=807404&r1=807403&r2=807404&view=diff
==============================================================================
--- hadoop/common/trunk/bin/mapred (original)
+++ hadoop/common/trunk/bin/mapred Mon Aug 24 22:06:54 2009
@@ -84,7 +84,7 @@
 if [ -d "$HADOOP_MAPRED_HOME/webapps" ]; then
   CLASSPATH=${CLASSPATH}:$HADOOP_MAPRED_HOME
 fi
-for f in $HADOOP_MAPRED_HOME/hadoop-*-mapred.jar; do
+for f in $HADOOP_MAPRED_HOME/hadoop-mapred-*.jar; do
   CLASSPATH=${CLASSPATH}:$f;
 done
 

Modified: hadoop/common/trunk/bin/rcc
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/bin/rcc?rev=807404&r1=807403&r2=807404&view=diff
==============================================================================
--- hadoop/common/trunk/bin/rcc (original)
+++ hadoop/common/trunk/bin/rcc Mon Aug 24 22:06:54 2009
@@ -72,7 +72,7 @@
 if [ -d "$HADOOP_HOME/webapps" ]; then
   CLASSPATH=${CLASSPATH}:$HADOOP_HOME
 fi
-for f in $HADOOP_HOME/hadoop-*-core.jar; do
+for f in $HADOOP_HOME/hadoop-core-*.jar; do
   CLASSPATH=${CLASSPATH}:$f;
 done
 



Mime
View raw message