hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r384340 - in /lucene/hadoop/trunk: bin/slaves.sh conf/hadoop-env.sh.template
Date Wed, 08 Mar 2006 22:12:53 GMT
Author: cutting
Date: Wed Mar  8 14:12:52 2006
New Revision: 384340

URL: http://svn.apache.org/viewcvs?rev=384340&view=rev
Log:
Add ability to sleep a bit between each command that's submitted to a slave, to meter slave
commands a bit.

Modified:
    lucene/hadoop/trunk/bin/slaves.sh
    lucene/hadoop/trunk/conf/hadoop-env.sh.template

Modified: lucene/hadoop/trunk/bin/slaves.sh
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/bin/slaves.sh?rev=384340&r1=384339&r2=384340&view=diff
==============================================================================
--- lucene/hadoop/trunk/bin/slaves.sh (original)
+++ lucene/hadoop/trunk/bin/slaves.sh Wed Mar  8 14:12:52 2006
@@ -6,6 +6,7 @@
 #
 #   HADOOP_SLAVES    File naming remote hosts.  Default is ~/.slaves
 #   HADOOP_CONF_DIR  Alternate conf dir. Default is ${HADOOP_HOME}/conf.
+#   HADOOP_SLAVE_SLEEP Seconds to sleep between spawning remote commands.
 ##
 
 usage="Usage: slaves.sh command..."
@@ -54,6 +55,9 @@
 for slave in `cat "$HADOOP_SLAVES"`; do
  ssh $HADOOP_SSH_OPTS $slave $"${@// /\\ }" \
    2>&1 | sed "s/^/$slave: /" &
+ if [ "$HADOOP_SLAVE_SLEEP" != "" ]; then
+   sleep $HADOOP_SLAVE_SLEEP
+ fi
 done
 
 wait

Modified: lucene/hadoop/trunk/conf/hadoop-env.sh.template
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/conf/hadoop-env.sh.template?rev=384340&r1=384339&r2=384340&view=diff
==============================================================================
--- lucene/hadoop/trunk/conf/hadoop-env.sh.template (original)
+++ lucene/hadoop/trunk/conf/hadoop-env.sh.template Wed Mar  8 14:12:52 2006
@@ -26,6 +26,11 @@
 # host:path where hadoop code should be rsync'd from.  Unset by default.
 # export HADOOP_MASTER=master:/home/$USER/src/hadoop
 
+# Seconds to sleep between slave commands.  Unset by default.  This
+# can be useful in large clusters, where, e.g., slave rsyncs can
+# otherwise arrive faster than the master can service them.
+# export HADOOP_SLAVE_SLEEP=0.1
+
 # The directory where pid files are stored. /tmp by default.
 # export HADOOP_PID_DIR=/var/hadoop/pids
 



Mime
View raw message