This is the documentation for CDH 4.6.0.
Documentation for other versions is available at Cloudera Documentation.

Upgrading HBase

  Note:

To see which version of HBase is shipping in CDH4, check the Version and Packaging Information. For important information on new and changed components, see the CDH4 Release Notes.

  Important:

Check the Known Issues and Work Arounds in CDH4 and Incompatible Changesfor HBase before proceeding.

About Checksums in CDH4.2

When you upgrade to CDH4.2, checksums are turned off by default. This is because of incompatibilities between the Hfile format used in HBase 0.92 (delivered in CDH4.1.x) and the format used in 0.94, which is delivered in CDH4.2. If you want to use checksums in CDH4.2, proceed as follows:

  Warning:

Once you turn on HBase checksums in CDH4.2, you will not be able to roll back to an earlier HBase version.

  1. Upgrade to 4.2
  2. Restart HBase
  3. Turn on checksums by setting hbase.regionserver.checksum.verify to true in hbase-site.xml
  4. Restart HBase

Upgrading HBase from CDH3 to CDH4

To upgrade HBase from CDH3 to CDH4 proceed as follows.

  Note:

If you have already performed the steps to uninstall CDH3 and all components, as described under Upgrading from CDH3 to CDH4, you can skip Step 1 below and proceed with installing the new CDH4 version of HBase.

Step 1: Perform a Graceful Cluster Shutdown and Remove HBase

To shut down the CDH3 version of HBase gracefully:

  1. Stop the Thrift server and clients, then stop the cluster.
    1. Stop the Thrift server and clients:
      sudo service hadoop-hbase-thrift stop
    2. Stop the cluster by shutting down the master and the region servers:
      1. Use the following command on the master node:
        sudo service hadoop-hbase-master stop
      2. Use the following command on each node hosting a region server:
        sudo service hadoop-hbase-regionserver stop
  2. Stop the ZooKeeper Server:
    $ sudo service hadoop-zookeeper-server stop
      Note:

    Depending on your platform and release, you may need to use

    $ sudo /sbin/service hadoop-zookeeper-server stop

    or

    $ sudo /sbin/service hadoop-zookeeper stop

    or (if the CDH4 version of ZooKeeper is already running)

    $ sudo /sbin/service zookeeper-server stop
  3. It is a good idea to back up the /hbaseznode before proceeding. By default, this is in /var/zookeeper.
  4. If you have not already done so, remove the CDH3 version of ZooKeeper. See Upgrading ZooKeeper from CDH3 to CDH4.
  5. Remove HBase:

    To remove HBase on Red-Hat-compatible systems:

    $ sudo yum remove hadoop-hbase

    To remove HBase on SLES systems:

    $ sudo zypper remove hadoop-hbase

    To remove HBase on Ubuntu and Debian systems:

    $ sudo apt-get purge hadoop-hbase
      Warning:

    If you are upgrading an Ubuntu or Debian system from CDH3u3 or earlier, you must use apt-get purge (rather than apt-get remove) to make sure the re-install succeeds, but be aware that apt-get purge removes all your configuration data. If you have modified any configuration files, DO NOT PROCEED before backing them up.

    CAUTION:
    On Ubuntu systems, make sure you remove HBase before removing ZooKeeper; otherwise your HBase configuration will be deleted. This is because hadoop-hbase depends on hadoop-zookeeper, and so purging hadoop-zookeeper will purge hadoop-hbase.

Step 2: Install the new version of HBase

Follow directions under Installing HBase.

  Important:

During uninstall, the package manager renames any configuration files you have modified from <file> to <file>.rpmsave. During re-install, the package manager creates a new <file> with applicable defaults. You are responsible for applying any changes captured in the original CDH3 configuration file to the new CDH4 configuration file. In the case of Ubuntu and Debian upgrades, a file will not be installed if there is already a version of that file on the system, and you will be prompted to resolve conflicts; for details, see Automatic handling of configuration files by dpkg.

Step 3: Upgrade the LZO Plugin

  Note: Skip this step if you were not using the LZO plugin in CDH3.

You need to make sure that the proper libraries (native and .jar) are on the classpath and the library path; otherwise your CDH3 LZO files will not be readable. Do this after installing the new version of HBase, but before starting the HBase Master or Region Servers. Proceed as follows.

  1. Add the LZO JAR file from /usr/lib/hadoop-0.20/lib/ to the HBase classpath:
    echo 'export 
    HBASE_CLASSPATH=$HBASE_CLASSPATH:/usr/lib/hadoop-0.20/lib/hadoop-lzo-20101122174751.20101122171345.552b3f9.jar'> 
    /etc/hbase/conf/hbase-env.sh
  2. Copy the native libraries from the old location to the default location specified in java.library.path. For example, on an Red Hat 6 or CentOS 6 system:
    cp /usr/lib/hadoop-0.20/lib/native/Linux-amd64-64/* /usr/lib/hadoop/lib/native/
      Note: The old location may be different on SLES, Ubuntu, or Debian systems.

Upgrading HBase from an Earlier CDH4 Release

To upgrade HBase from an earlier CDH4 release, proceed as follows.

The instructions that follow assume that you are upgrading HBase as part of an upgrade to the latest CDH4 release, and have already performed the steps under Upgrading from an Earlier CDH4 Release.

Step 1: Perform a Graceful Cluster Shutdown

To shut HBase down gracefully:

  1. Stop the Thrift server and clients, then stop the cluster.
    1. Stop the Thrift server and clients:
      sudo service hbase-thrift stop
    2. Stop the cluster by shutting down the master and the region servers:
      1. Use the following command on the master node:
        sudo service hbase-master stop
      2. Use the following command on each node hosting a region server:
        sudo service hbase-regionserver stop
  2. Stop the ZooKeeper Server:
    $ sudo service zookeeper-server stop

Step 2: Install the new version of HBase

  Note:

You may want to take this opportunity to upgrade ZooKeeper, but you do not have to upgrade Zookeeper before upgrading HBase; the new version of HBase will run with the older version of Zookeeper. For instructions on upgrading ZooKeeper, see Upgrading ZooKeeper to CDH4.

It is a good idea to back up the /hbase znode before proceeding. By default, this is in /var/lib/zookeeper.

To install the new version of HBase, follow directions in the next section, Installing HBase.

  Important:

During package upgrade, the package manager renames any configuration files you have modified from <file> to <file>.rpmsave, and creates a new <file> with applicable defaults. You are responsible for applying any changes captured in the original configuration file to the new configuration file. In the case of Ubuntu and Debian upgrades, you will be prompted if you have made changes to a file for which there is a new version; for details, see Automatic handling of configuration files by dpkg.