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

Reply via email to