5. Upgrade HBase

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

Complete the following steps to upgrade HBase:

  1. Install the MapR HBase 0.98.12 or1.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

    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.

    Do not install the HBase Master and RegionServer packages.

    Warning: Do not install HBase 0.98.12 or 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.
  2. On the node where you installed HBase 0.98.12 or 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.

  3. On the node where you installed HBase 0.98.12 or 1.1, run the following command to check for incompatible files on the nodes running HBase 0.94:
    Example:
    $ /opt/mapr/hbase/hbase-0.98.x/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.

  4. On the node where you installed HBase 0.98.12 or 1.1, run the hbase upgrade -check command again to confirm that no incompatible files remain.
  5. 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.
  6. On the node where you installed HBase 0.98.12 or 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 0.98.x on each node.
    $ /opt/mapr/hbase/hbase-0.98.x/bin/hbase upgrade -execute
  7. On each node with HBase 0.94.x installed, upgrade the packages using one of the following methods:
    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 Using the 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 upgrade mapr-hbase mapr-hbase-regionserver
    • To upgrade an HBase master node:
      yum upgrade mapr-hbase mapr-hbase-master
    • To upgrade an HBase client node:
      yum upgrade 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
    To upgrade by manually installing packages:
    On RedHat and CentOS
    1. Download the RPM package files mapr-hbase, mapr-hbase-master, and mapr-hbase-regionserver for version 0.98.x or 1.1 from http://package.mapr.com/releases/ecosystem-all.
    2. Install the package with rpm. To upgrade an HBase region server node:
      rpm -i --force mapr-hbase-0.98.<version>.noarch.rpm mapr-hbase-regionserver-0.98.<version>.noarch.rpm
      To upgrade an HBase master node:
      rpm -i --force mapr-hbase-0.98.<version>.noarch.rpm mapr-hbase-master-0.98.<version>.noarch.rpm
    On Ubuntu
    1. Download the RPM package files mapr-hbase, mapr-hbase-master, and mapr-hbase-regionserver for version 0.98.12 or 1.1 from http://package.mapr.com/releases/ecosystem-all.
    2. Install the package with dpkg. To upgrade an HBase region server node:
      dpkg -i mapr-hbase_0.98.<version>_all.deb mapr-hbase-regionserver_0.98.<version>_all.deb
      To upgrade an HBase master node:
      dpkg -i mapr-hbase_0.98.<version>_all.deb mapr-hbase-master_0.98.<version>_all.deb
  8. On each HBase node, migrate any custom configuration settings to the configuration files within the conf directory:
    opt/mapr/hbase/hbase-<version>/conf/
  9. On each HBase node, run configure.sh -R:
    $ /opt/mapr/server/configure.sh -R