hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r515859 - in /lucene/hadoop/trunk: CHANGES.txt bin/hadoop
Date Thu, 08 Mar 2007 00:11:04 GMT
Author: cutting
Date: Wed Mar  7 16:11:03 2007
New Revision: 515859

URL: http://svn.apache.org/viewvc?view=rev&rev=515859
Log:
HADOOP-1080.  Fix classpath bug in bin/hadoop on Windows when native libraries are present.
 Contributed by Andrzej.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/bin/hadoop

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=515859&r1=515858&r2=515859
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Wed Mar  7 16:11:03 2007
@@ -30,6 +30,9 @@
  8. HADOOP-1088.  Fix record serialization of negative values.
     (Milind Bhandarkar via cutting)
 
+ 9. HADOOP-1080.  Fix bug in bin/hadoop on Windows when native
+    libraries are present.  (ab via cutting)
+
 
 Release 0.12.0 - 2007-03-02
 

Modified: lucene/hadoop/trunk/bin/hadoop
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/hadoop?view=diff&rev=515859&r1=515858&r2=515859
==============================================================================
--- lucene/hadoop/trunk/bin/hadoop (original)
+++ lucene/hadoop/trunk/bin/hadoop Wed Mar  7 16:11:03 2007
@@ -21,6 +21,11 @@
 
 . "$bin"/hadoop-config.sh
 
+cygwin=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+esac
+
 # if no args specified, show usage
 if [ $# = 0 ]; then
   echo "Usage: hadoop [--config confdir] COMMAND"
@@ -108,6 +113,21 @@
   CLASSPATH=${CLASSPATH}:$f;
 done
 
+
+# default log directory & file
+if [ "$HADOOP_LOG_DIR" = "" ]; then
+  HADOOP_LOG_DIR="$HADOOP_HOME/logs"
+fi
+if [ "$HADOOP_LOGFILE" = "" ]; then
+  HADOOP_LOGFILE='hadoop.log'
+fi
+
+# cygwin path translation
+if $cygwin; then
+  CLASSPATH=`cygpath -p -w "$CLASSPATH"`
+  HADOOP_HOME=`cygpath -d "$HADOOP_HOME"`
+  HADOOP_LOG_DIR=`cygpath -d "$HADOOP_LOG_DIR"`
+fi
 # setup 'java.library.path' for native-hadoop code if necessary
 JAVA_LIBRARY_PATH=''
 if [ -d "${HADOOP_HOME}/build/native" -o -d "${HADOOP_HOME}/lib/native" ]; then
@@ -125,18 +145,15 @@
     fi
   fi
 fi
+
+# cygwin path translation
+if $cygwin; then
+  JAVA_LIBRARY_PATH=`cygpath -p "$JAVA_LIBRARY_PATH"`
+fi
  
 # restore ordinary behaviour
 unset IFS
 
-# default log directory & file
-if [ "$HADOOP_LOG_DIR" = "" ]; then
-  HADOOP_LOG_DIR="$HADOOP_HOME/logs"
-fi
-if [ "$HADOOP_LOGFILE" = "" ]; then
-  HADOOP_LOGFILE='hadoop.log'
-fi
-
 # figure out which class to run
 if [ "$COMMAND" = "namenode" ] ; then
   CLASS='org.apache.hadoop.dfs.NameNode'
@@ -168,12 +185,6 @@
   CLASS=$COMMAND
 fi
 
-# cygwin path translation
-if expr `uname` : 'CYGWIN*' > /dev/null; then
-  CLASSPATH=`cygpath -p -w "$CLASSPATH"`
-  HADOOP_HOME=`cygpath -d "$HADOOP_HOME"`
-  HADOOP_LOG_DIR=`cygpath -d "$HADOOP_LOG_DIR"`
-fi
 
 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.dir=$HADOOP_LOG_DIR"
 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.file=$HADOOP_LOGFILE"



Mime
View raw message