hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1130833 - in /hadoop/common/trunk: CHANGES.txt bin/hadoop-daemon.sh
Date Thu, 02 Jun 2011 21:42:56 GMT
Author: todd
Date: Thu Jun  2 21:42:56 2011
New Revision: 1130833

URL: http://svn.apache.org/viewvc?rev=1130833&view=rev
Log:
HADOOP-7331. Make hadoop-daemon.sh return exit code 1 if daemon processes did not get started.
Contributed by Tanping Wang.

Modified:
    hadoop/common/trunk/CHANGES.txt
    hadoop/common/trunk/bin/hadoop-daemon.sh

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=1130833&r1=1130832&r2=1130833&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Thu Jun  2 21:42:56 2011
@@ -187,6 +187,9 @@ Trunk (unreleased changes)
 
     HADOOP-7337. Change PureJavaCrc32 annotations to public stable.  (szetszwo)
 
+    HADOOP-7331. Make hadoop-daemon.sh return exit code 1 if daemon processes
+    did not get started. (Tanping Wang via todd)
+
   OPTIMIZATIONS
   
     HADOOP-7333. Performance improvement in PureJavaCrc32. (Eric Caspole

Modified: hadoop/common/trunk/bin/hadoop-daemon.sh
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/bin/hadoop-daemon.sh?rev=1130833&r1=1130832&r2=1130833&view=diff
==============================================================================
--- hadoop/common/trunk/bin/hadoop-daemon.sh (original)
+++ hadoop/common/trunk/bin/hadoop-daemon.sh Thu Jun  2 21:42:56 2011
@@ -136,6 +136,10 @@ case $startStop in
     nohup nice -n $HADOOP_NICENESS $hadoopScript --config $HADOOP_CONF_DIR $command "$@"
> "$log" 2>&1 < /dev/null &
     echo $! > $pid
     sleep 1; head "$log"
+    sleep 3;
+    if ! ps -p $! > /dev/null ; then
+      exit 1
+    fi
     ;;
           
   (stop)
@@ -146,9 +150,11 @@ case $startStop in
         kill `cat $pid`
       else
         echo no $command to stop
+        exit 1
       fi
     else
       echo no $command to stop
+      exit 1
     fi
     ;;
 



Mime
View raw message