You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by Marko Bauhardt <mb...@media-style.com> on 2006/06/07 15:14:52 UTC

hadoop-daemon.sh: tasktracker etc. does not stop on osx

Hi all,
the stopping of namenodes or datanodes etc. does not work correctly  
on os x system.
e.g.
bin/hadoop-daemon.sh stop namenode
no namenode to stop

The reason is, the "/proc" directory does not exists on os x. The  
using of the "ps" command could be solve this problem. This command  
works on os x and linux etc.
Make that sense?


Index: bin/hadoop-daemon.sh
===================================================================
--- bin/hadoop-daemon.sh        (revision 412219)
+++ bin/hadoop-daemon.sh        (working copy)
@@ -92,7 +92,9 @@
    (stop)
      if [ -f $pid ]; then
-      if [ -a /proc/`cat $pid` ]; then
+      procid=`cat $pid`
+      idcount=`ps -p $procid | wc -l`
+      if [ $idcount -eq 2 ]; then
          echo stopping $command
          kill `cat $pid`
        else



Marko