HBASE-25594 Make easier to use graceful_stop on localhost mode (#3054)

Co-authored-by: Javier <javier.lucadetena@linecorp.com>
This commit is contained in:
Javier Akira Luca de Tena 2021-03-19 04:04:54 +09:00 committed by Peter Somogyi
parent 5840003686
commit a9a1ec5a8b
1 changed files with 5 additions and 1 deletions

View File

@ -33,7 +33,7 @@ moving regions"
echo " maxthreads xx Limit the number of threads used by the region mover. Default value is 1."
echo " movetimeout xx Timeout for moving regions. If regions are not moved by the timeout value,\
exit with error. Default value is INT_MAX."
echo " hostname Hostname of server we are to stop"
echo " hostname Hostname to stop; match what HBase uses; pass 'localhost' if local to avoid ssh"
echo " e|failfast Set -e so exit immediately if any command exits with non-zero status"
echo " nob|nobalancer Do not manage balancer states. This is only used as optimization in \
rolling_restart.sh to avoid multiple calls to hbase shell"
@ -108,6 +108,10 @@ localhostname=`/bin/hostname -f`
if [ "$localhostname" == "$hostname" ]; then
local=true
fi
if [ "$localhostname" == "$hostname" ] || [ "$hostname" == "localhost" ]; then
local=true
hostname=$localhostname
fi
if [ "$nob" == "true" ]; then
log "[ $0 ] skipping disabling balancer -nob argument is used"