Upgrade from HBase 0.94.x

Note: Failure to follow these steps could leave the cluster in an inoperable state.

Complete the following steps to upgrade HBase:

  1. Prepare nodes for the upgrade.
    Note: If your upgrade plan includes both a new version of the MapR distribution and a new version of HBase, follow these steps before upgrading the MapR software.
    When you upgrade from HBase 0.94 to HBase 1.1, you need a node in your existing cluster that is not running HBase 0.94 but has connectivity to ZooKeeper and MFS services on the cluster. The following instructions explain how to workaround this issue by preparing an existing node that is running HBase for the upgrade. You cannot add a node to the cluster to serve this purpose.
    1. Pause the Hbase load balancer via the HBase shell. For example:
      hbase(main):001:0> balance_switch false
      true
      0 row(s) in 0.3590 seconds
    2. Identify the node in your cluster that serves the lowest number of HBase regions.
    3. Stop all HBase services on that node. See the HBase documentation for details about the graceful_stop.sh script, which you can use to gracefully stop regions after pausing the load balancer. This script gradually unloads regions, allowing the node to be shut down without affecting data availability: Alternatively, you can use the MCS or a maprcli command to shut down the RegionServer on that node without first unloading regions. However, this option results in a short window of data unavailability while HBase data-recovery operations are running.
      /opt/mapr/hbase/hbase-<Version>/bin/graceful_stop.sh   hostname
    4. Continue with the main HBase upgrade procedure, starting with an installation of mapr-hbase on that node.
  2. Ensure that you have completed the pre-upgrade steps.
  3. Install the MapR HBase 1.1 package on one node in your existing cluster that is not running HBase 0.94 but has connectivity to ZooKeeper and MFS services on the cluster:
    On RedHat or CentOS
    yum install mapr-hbase
    On Ubuntu
    apt-get install mapr-hbase
    On SUSE
    zypper install mapr-hbase

    If you do not have a node available on your cluster where you can complete this step (and you cannot add a node to serve this purpose), prepare an HBase node first as described in Pre-Upgrade Steps for HBase.

    Do not install the HBase Master and RegionServer packages.

    Warning: Do not install HBase 1.1 packages on nodes that are running HBase 0.94 services. This will remove the 0.94 files, and you will not be able to cleanly shut down HBase 0.94 services on those nodes.
  4. On the node where you installed HBase 1.1, run configure.sh.
    For example, you can run the following command if the node is already configured to access the cluster:
    $ /opt/mapr/server/configure.sh -R

    If this node is a new node with no existing MapR packages and services, you need to run configure.sh with additional options.

  5. On the node where you installed HBase 1.1, run the following command to check for incompatible files on the nodes running HBase 0.94:
    Example:
    $ /opt/mapr/hbase/hbase-1.1/bin/hbase upgrade -check
    Note:
    If incompatible HFile format files are found, convert the files by running major compaction on the table. To run the compaction operation, run the following command on an HBase 0.94 node for each table that has the incompatible format:
    $ echo "major_compact '<table_name>'" | hbase shell 
    Then, wait for the compactions to complete, as indicated on the HBase Master UI.

    A major compaction operation can have a significant impact on the cluster and should be run with caution, preferably when cluster traffic is minimal.

  6. On the node where you installed HBase 1.1, run the hbase upgrade -check command again to confirm that no incompatible files remain.
  7. Shut down the HBase 0.94.x services on the cluster. Shut down the HBase Master services first, then the RegionServer services. You can use either the maprcli or the MCS to shut down the services.
  8. On the node where you installed HBase 1.1, run the following command to upgrade the HBase metadata: Run this upgrade command once only for the entire cluster. You do not need to run it on each node. When this upgrade command is run successfully, the appropriate HBase packages can be upgraded to 1.1 on each node.
    $ /opt/mapr/hbase/hbase-1.1/bin/hbase upgrade -execute
  9. On each node with HBase 0.94.x installed, upgrade the packages.
    Note: If you have additional HBase services or libraries installed, you should also upgrade those packages to match the HBase version you are upgrading to. To upgrade an existing HBase Thrift Gateway, see Upgrading HBase Thrift Gateway.
    To upgrade with a package manager:
    After configuring repositories so that the version you want to install is available, you can use a package manager to install from the repository. The upgrade process will remove all but the following directories in the current HBase directory: conf and logs.
    On RedHat and CentOS
    • To upgrade an HBase region server node:
      yum update mapr-hbase mapr-hbase-regionserver
    • To upgrade an HBase master node:
      yum update mapr-hbase mapr-hbase-master
    • To upgrade an HBase client node:
      yum update mapr-hbase
    On Ubuntu
    • To upgrade an HBase region server node:
      apt-get install mapr-hbase mapr-hbase-regionserver
    • To upgrade an HBase master node:
      apt-get install mapr-hbase mapr-hbase-master
    • To upgrade an HBase client node:
      apt-get install mapr-hbase
    On Suse
    • To upgrade an HBase region server node:
      zypper update mapr-hbase mapr-hbase-regionserver
    • To upgrade an HBase master node:
      zypper update mapr-hbase mapr-hbase-master
    • To upgrade an HBase client node:
      zypper update mapr-hbase
  10. On each HBase node, migrate any custom configuration settings to the configuration files within the conf directory:
    opt/mapr/hbase/hbase-<version>/conf/
  11. On each HBase node, run configure.sh -R:
    $ /opt/mapr/server/configure.sh -R
  12. Complete the post-upgrade steps.