HBASE-14709 Parent change breaks graceful_stop.sh on a cluster

This commit is contained in:
stack 2015-10-27 16:42:39 -07:00
parent 939697b415
commit 007e4dfa13
1 changed files with 7 additions and 7 deletions

View File

@ -84,7 +84,7 @@ fi
hostname=$1 hostname=$1
filename="/tmp/$hostname" filename="/tmp/$hostname"
local=false local=
localhostname=`/bin/hostname` localhostname=`/bin/hostname`
if [ "$localhostname" == "$hostname" ]; then if [ "$localhostname" == "$hostname" ]; then
@ -103,7 +103,7 @@ log "Unloaded $hostname region(s)"
hosts="/tmp/$(basename $0).$$.tmp" hosts="/tmp/$(basename $0).$$.tmp"
echo $hostname >> $hosts echo $hostname >> $hosts
if [ "$thrift" != "" ]; then if [ "$thrift" != "" ]; then
log "Stopping thrift" log "Stopping thrift server on $hostname"
if [ "$local" ]; then if [ "$local" ]; then
"$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} stop thrift "$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} stop thrift
else else
@ -111,28 +111,28 @@ if [ "$thrift" != "" ]; then
fi fi
fi fi
if [ "$rest" != "" ]; then if [ "$rest" != "" ]; then
log "Stopping rest" log "Stopping rest server on $hostname"
if [ "$local" ]; then if [ "$local" ]; then
"$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} stop rest "$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} stop rest
else else
"$bin"/hbase-daemons.sh --config ${HBASE_CONF_DIR} --hosts ${hosts} stop rest "$bin"/hbase-daemons.sh --config ${HBASE_CONF_DIR} --hosts ${hosts} stop rest
fi fi
fi fi
log "Stopping regionserver" log "Stopping regionserver on $hostname"
if [ "$local" ]; then if [ "$local" ]; then
"$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} stop regionserver "$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} stop regionserver
else else
"$bin"/hbase-daemons.sh --config ${HBASE_CONF_DIR} --hosts ${hosts} stop regionserver "$bin"/hbase-daemons.sh --config ${HBASE_CONF_DIR} --hosts ${hosts} stop regionserver
fi fi
if [ "$restart" != "" ]; then if [ "$restart" != "" ]; then
log "Restarting regionserver" log "Restarting regionserver on $hostname"
if [ "$local" ]; then if [ "$local" ]; then
"$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} start regionserver "$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} start regionserver
else else
"$bin"/hbase-daemons.sh --config ${HBASE_CONF_DIR} --hosts ${hosts} start regionserver "$bin"/hbase-daemons.sh --config ${HBASE_CONF_DIR} --hosts ${hosts} start regionserver
fi fi
if [ "$thrift" != "" ]; then if [ "$thrift" != "" ]; then
log "Restarting thrift" log "Restarting thrift server on $hostname"
# -b 0.0.0.0 says listen on all interfaces rather than just default. # -b 0.0.0.0 says listen on all interfaces rather than just default.
if [ "$local" ]; then if [ "$local" ]; then
"$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} start thrift -b 0.0.0.0 "$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} start thrift -b 0.0.0.0
@ -141,7 +141,7 @@ if [ "$restart" != "" ]; then
fi fi
fi fi
if [ "$rest" != "" ]; then if [ "$rest" != "" ]; then
log "Restarting rest" log "Restarting rest server on $hostname"
if [ "$local" ]; then if [ "$local" ]; then
"$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} start rest "$bin"/hbase-daemon.sh --config ${HBASE_CONF_DIR} start rest
else else