You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ns...@apache.org on 2011/10/11 04:01:34 UTC
svn commit: r1181357 - in /hbase/branches/0.89/bin: regionservers.sh
rolling-restart.sh
Author: nspiegelberg
Date: Tue Oct 11 02:01:34 2011
New Revision: 1181357
URL: http://svn.apache.org/viewvc?rev=1181357&view=rev
Log:
Set Sleep Time for Rolling Restarts
Summary:
Default sleep time to 60 sec. Total of 2 min, one for stop and one for start,
per RS. Note that I had to change regionservers.sh so bin/start-hbase.sh
doesn't use this wait. Need to figure out a long term solution with public
branch, but this will allow us to do rolling restart on your tiers now.
Test Plan:
bin/rolling-restart.sh
DiffCamp Revision: 147945
Reviewed By: kranganathan
CC: mwelty, kranganathan, gsmyth
Revert Plan:
OK
Modified:
hbase/branches/0.89/bin/regionservers.sh
hbase/branches/0.89/bin/rolling-restart.sh
Modified: hbase/branches/0.89/bin/regionservers.sh
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/bin/regionservers.sh?rev=1181357&r1=1181356&r2=1181357&view=diff
==============================================================================
--- hbase/branches/0.89/bin/regionservers.sh (original)
+++ hbase/branches/0.89/bin/regionservers.sh Tue Oct 11 02:01:34 2011
@@ -66,9 +66,9 @@ for regionserver in `cat "$HOSTLIST"`; d
else # run each command serially
ssh $HBASE_SSH_OPTS $regionserver $"${@// /\\ }" \
2>&1 | sed "s/^/$regionserver: /"
- fi
- if [ "$HBASE_SLAVE_SLEEP" != "" ]; then
- sleep $HBASE_SLAVE_SLEEP
+ if [ "$HBASE_SLAVE_SLEEP" != "" ]; then
+ sleep $HBASE_SLAVE_SLEEP
+ fi
fi
done
Modified: hbase/branches/0.89/bin/rolling-restart.sh
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/bin/rolling-restart.sh?rev=1181357&r1=1181356&r2=1181357&view=diff
==============================================================================
--- hbase/branches/0.89/bin/rolling-restart.sh (original)
+++ hbase/branches/0.89/bin/rolling-restart.sh Tue Oct 11 02:01:34 2011
@@ -53,6 +53,8 @@ distMode=`$bin/hbase org.apache.hadoop.h
if [ "$distMode" == 'false' ]; then
"$bin"/hbase-daemon.sh restart master
else
+ export HBASE_SLAVE_SLEEP=60
+
# stop all masters before re-start to avoid races for master znode
"$bin"/hbase-daemon.sh --config "${HBASE_CONF_DIR}" stop master
"$bin"/hbase-daemons.sh --config "${HBASE_CONF_DIR}" \