FAQ
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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-dev @
categorieshadoop
postedJun 7, '06 at 1:15p
activeJun 7, '06 at 1:15p
posts1
users1
websitehadoop.apache.org...
irc#hadoop

1 user in discussion

Marko Bauhardt: 1 post

People

Translate

site design / logo © 2022 Grokbase