Selaa lähdekoodia

Log to logs directory by default.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@375684 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 19 vuotta sitten
vanhempi
commit
85ac638e21
1 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 5 2
      bin/hadoop-daemon.sh

+ 5 - 2
bin/hadoop-daemon.sh

@@ -36,9 +36,13 @@ while [ -h "$this" ]; do
   fi
 done
 
+# the root of the Hadoop installation
+root=`dirname $this`/..
+
 # get log directory
 if [ "$HADOOP_LOG_DIR" = "" ]; then
-  HADOOP_LOG_DIR=$PWD
+  HADOOP_LOG_DIR=$root/logs
+  mkdir -p $HADOOP_LOG_DIR
 fi
 
 if [ "$HADOOP_PID_DIR" = "" ]; then
@@ -64,7 +68,6 @@ case $startStop in
       fi
     fi
 
-    root=`dirname $this`/..
     if [ "$HADOOP_MASTER" != "" ]; then
       echo rsync from $HADOOP_MASTER
       rsync -a --delete --exclude=.svn $HADOOP_MASTER/ $root