You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2021/03/18 19:07:07 UTC

[hbase] branch branch-2.3 updated: HBOPS-25594 Make easier to use graceful_stop on localhost mode (#3054)

This is an automated email from the ASF dual-hosted git repository.

stack pushed a commit to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.3 by this push:
     new 728d4f5  HBOPS-25594 Make easier to use graceful_stop on localhost mode (#3054)
728d4f5 is described below

commit 728d4f5ab12fd2631b1ef0a7c61203e9acfb05f0
Author: Javier Akira Luca de Tena <ak...@gmail.com>
AuthorDate: Fri Mar 19 04:04:54 2021 +0900

    HBOPS-25594 Make easier to use graceful_stop on localhost mode (#3054)
    
    Co-authored-by: Javier <ja...@linecorp.com>
---
 bin/graceful_stop.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bin/graceful_stop.sh b/bin/graceful_stop.sh
index 89e3dd9..e565929 100755
--- a/bin/graceful_stop.sh
+++ b/bin/graceful_stop.sh
@@ -32,7 +32,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"
@@ -100,6 +100,10 @@ localhostname=`/bin/hostname`
 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"