Author: cutting Date: Fri Aug 26 12:07:35 2005 New Revision: 240308 URL: http://svn.apache.org/viewcvs?rev=240308&view=rev Log: Add scripts to manage mapred/ndfs hosts.
Added: lucene/nutch/branches/mapred/bin/nutch-daemons.sh (with props) lucene/nutch/branches/mapred/bin/slaves.sh (with props) lucene/nutch/branches/mapred/bin/start-all.sh (with props) lucene/nutch/branches/mapred/bin/stop-all.sh (with props) Added: lucene/nutch/branches/mapred/bin/nutch-daemons.sh URL: http://svn.apache.org/viewcvs/lucene/nutch/branches/mapred/bin/nutch-daemons.sh?rev=240308&view=auto ============================================================================== --- lucene/nutch/branches/mapred/bin/nutch-daemons.sh (added) +++ lucene/nutch/branches/mapred/bin/nutch-daemons.sh Fri Aug 26 12:07:35 2005 @@ -0,0 +1,16 @@ +#!/bin/bash +# +# Run a Nutch command on all slave hosts. + +usage="Usage: nutch-daemons.sh [start|stop] command args..." + +# if no args specified, show usage +if [ $# -le 1 ]; then + echo $usage + exit 1 +fi + +bin=`dirname $0` +bin=`cd $bin; pwd` + +exec $bin/slaves.sh /bin/bash --login $bin/nutch-daemon.sh "$@" Propchange: lucene/nutch/branches/mapred/bin/nutch-daemons.sh ------------------------------------------------------------------------------ svn:executable = * Added: lucene/nutch/branches/mapred/bin/slaves.sh URL: http://svn.apache.org/viewcvs/lucene/nutch/branches/mapred/bin/slaves.sh?rev=240308&view=auto ============================================================================== --- lucene/nutch/branches/mapred/bin/slaves.sh (added) +++ lucene/nutch/branches/mapred/bin/slaves.sh Fri Aug 26 12:07:35 2005 @@ -0,0 +1,26 @@ +#!/bin/bash +# +# Run a shell command on all slave hosts. +# +# Environment Variables +# +# NUTCH_SLAVES File naming remote hosts. +## + +usage="Usage: slaves.sh command..." + +# if no args specified, show usage +if [ $# -le 0 ]; then + echo $usage + exit 1 +fi + +if [ "$NUTCH_SLAVES" = "" ]; then + echo Set NUTCH_SLAVES to file listing slave host names. + exit 1 +fi + +for slave in `cat $NUTCH_SLAVES`; do + echo -n $slave:\ + ssh -o ConnectTimeout=1 $slave "$@" +done Propchange: lucene/nutch/branches/mapred/bin/slaves.sh ------------------------------------------------------------------------------ svn:executable = * Added: lucene/nutch/branches/mapred/bin/start-all.sh URL: http://svn.apache.org/viewcvs/lucene/nutch/branches/mapred/bin/start-all.sh?rev=240308&view=auto ============================================================================== --- lucene/nutch/branches/mapred/bin/start-all.sh (added) +++ lucene/nutch/branches/mapred/bin/start-all.sh Fri Aug 26 12:07:35 2005 @@ -0,0 +1,11 @@ +#!/bin/bash + +# Start all nutch daemons. Run this on master node. + +bin=`dirname $0` +bin=`cd $bin; pwd` + +$bin/nutch-daemons.sh start datanode +$bin/nutch-daemon.sh start namenode +$bin/nutch-daemon.sh start jobtracker +$bin/nutch-daemons.sh start tasktracker Propchange: lucene/nutch/branches/mapred/bin/start-all.sh ------------------------------------------------------------------------------ svn:executable = * Added: lucene/nutch/branches/mapred/bin/stop-all.sh URL: http://svn.apache.org/viewcvs/lucene/nutch/branches/mapred/bin/stop-all.sh?rev=240308&view=auto ============================================================================== --- lucene/nutch/branches/mapred/bin/stop-all.sh (added) +++ lucene/nutch/branches/mapred/bin/stop-all.sh Fri Aug 26 12:07:35 2005 @@ -0,0 +1,11 @@ +#!/bin/bash + +# Stop all nutch daemons. Run this on master node. + +bin=`dirname $0` +bin=`cd $bin; pwd` + +$bin/nutch-daemons.sh stop tasktracker +$bin/nutch-daemon.sh stop jobtracker +$bin/nutch-daemon.sh stop namenode +$bin/nutch-daemons.sh stop datanode Propchange: lucene/nutch/branches/mapred/bin/stop-all.sh ------------------------------------------------------------------------------ svn:executable = *