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/16 04:42:41 UTC

[hbase] branch branch-2 updated: HBASE-25594 graceful_stop.sh fails to unload regions when ran at localhost

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

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


The following commit(s) were added to refs/heads/branch-2 by this push:
     new 3135b7a  HBASE-25594 graceful_stop.sh fails to unload regions when ran at localhost
3135b7a is described below

commit 3135b7a42fd884cddd124823e2aedaa711f527a2
Author: Javier <ja...@linecorp.com>
AuthorDate: Mon Feb 22 20:51:57 2021 +0900

    HBASE-25594 graceful_stop.sh fails to unload regions when ran at localhost
    
    Signed-off-by: stack <st...@apache.org>
---
 bin/graceful_stop.sh                     |  4 ++--
 src/main/asciidoc/_chapters/ops_mgt.adoc | 22 +++++++++++-----------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/bin/graceful_stop.sh b/bin/graceful_stop.sh
index a2b4efe..8944653 100755
--- a/bin/graceful_stop.sh
+++ b/bin/graceful_stop.sh
@@ -103,7 +103,7 @@ hostname=$1
 filename="/tmp/$hostname"
 
 local=
-localhostname=`/bin/hostname`
+localhostname=`/bin/hostname -f`
 
 if [ "$localhostname" == "$hostname" ]; then
   local=true
@@ -201,4 +201,4 @@ else
 fi
 
 # Cleanup tmp files.
-trap "rm -f  "/tmp/$(basename $0).*.tmp" &> /dev/null" EXIT
+trap "rm -f  /tmp/$(basename $0).*.tmp &> /dev/null" EXIT
diff --git a/src/main/asciidoc/_chapters/ops_mgt.adoc b/src/main/asciidoc/_chapters/ops_mgt.adoc
index dab2ed2..d62e234 100644
--- a/src/main/asciidoc/_chapters/ops_mgt.adoc
+++ b/src/main/asciidoc/_chapters/ops_mgt.adoc
@@ -1364,10 +1364,9 @@ Copy the script if you need to make use of it in a version of hbase previous to
 
 A downside to the above stop of a RegionServer is that regions could be offline for a good period of time.
 Regions are closed in order.
-If many regions on the server, the first region to close may not be back online until all regions close and after the master notices the RegionServer's znode gone.
-In Apache HBase 0.90.2, we added facility for having a node gradually shed its load and then shutdown itself down.
-Apache HBase 0.90.2 added the _graceful_stop.sh_ script.
-Here is its usage:
+If many regions on the server, the first region to close may not be back online until all regions close and
+after the master notices the RegionServer's znode gone.  A node can be asked to gradually shed its load and
+then shutdown itself using the  _graceful_stop.sh_ script. Here is its usage:
 
 ----
 $ ./bin/graceful_stop.sh
@@ -1393,16 +1392,17 @@ To decommission a loaded RegionServer, run the following: +$
 [NOTE]
 ====
 The `HOSTNAME` passed to _graceful_stop.sh_ must match the hostname that hbase is using to identify RegionServers.
-Check the list of RegionServers in the master UI for how HBase is referring to servers.
-It's usually hostname but can also be FQDN.
-Whatever HBase is using, this is what you should pass the _graceful_stop.sh_ decommission script.
-If you pass IPs, the script is not yet smart enough to make a hostname (or FQDN) of it and so it will fail when it checks if server is currently running; the graceful unloading of regions will not run.
+HBase uses fully-qualified domain names usually. Check the list of RegionServers in the master UI for how HBase
+is referring to servers. Whatever HBase is using, this is what you should pass the _graceful_stop.sh_ decommission script.
+If you pass IPs, the script is not yet smart enough to make a hostname (or FQDN) of it and so it will fail when it checks
+if server is currently running; the graceful unloading of regions will not run.
 ====
 
 The _graceful_stop.sh_ script will move the regions off the decommissioned RegionServer one at a time to minimize region churn.
-It will verify the region deployed in the new location before it will moves the next region and so on until the decommissioned server is carrying zero regions.
-At this point, the _graceful_stop.sh_ tells the RegionServer `stop`.
-The master will at this point notice the RegionServer gone but all regions will have already been redeployed and because the RegionServer went down cleanly, there will be no WAL logs to split.
+It will verify the region deployed in the new location before it will moves the next region and so on until the decommissioned
+server is carrying zero regions. At this point, the _graceful_stop.sh_ tells the RegionServer `stop`.
+The master will at this point notice the RegionServer gone but all regions will have already been redeployed and because the
+RegionServer went down cleanly, there will be no WAL logs to split.
 
 [[lb]]
 .Load Balancer