3. Decommission HBase RegionServers

Use the following instructions to decommission HBase RegionServers in your cluster:

  1. Decommission RegionServers.

    The preferred method of decommissioning RegionServers is to use the graceful_stop.sh script (Option I). This option gradually unloads Regions from the RegionServer, allowing the node to be terminated without impacting data availability. You can also terminate the RegionServer without first unloading its Regions (Option II). This will result in a short window of data unavailability as HBase's natural data recovery operations execute.

    • Option I: Perform graceful stop

      You can also use the following command to gracefully decommission a loaded RegionServer.

      Execute the following command from any host machine with HBase configuration installed:

      su - $HBASE_USER
      /usr/lib/hbase/bin/graceful_stop.sh $RegionServer.Hostname

      where $HBASE_USER is the user owning the HBase Services. For example, hbase.

      [Important]Important

      The value of $RegionServer.Hostname argument must match the hostname that HBase uses to identify RegionServers.

      To find the hostname for a particular RegionServer, go to the HBase web UI and check the list of RegionServers in the HBase master UI. Typically, HBase Master uses hostnames but occassionally it can be the FQDN of a RegionServer.

    • Option II: Use hbase-daemon.sh

      Execute the following command on the RegionServer that you want to decommission:

      [Important]Important

      It is important to execute the hbase-daemon.sh script on the RegionServer that you want to decommission.

      su - $HBASE_USER
      /usr/lib/hbase/bin/hbase-daemon.sh stop regionserver

      where $HBASE_USER is the user owning the HBase Services. For example, hbase.

      Note that Option II causes the RegionServer to close all the regions before shutting down.

  2. Enable the load balancer.

    If you used the graceful_stop.sh script earlier, you may need to re-enable the Region Balancer. Do so using the balance_switch command from the shell. Pass the command true to enable the balancer, false to disable it. The command's return value is the state of the balancer before running the command. If graceful_stop.sh disabled the balancer earlier, enable it again like this:

    su - $HBASE_USER
    hbase shell
    hbase(main):001:0> balance_switch true
    false
    0 row(s) in 0.3590 seconds

    where $HBASE_USER is the user owning the HBase services. For example, hbase


loading table of contents...