7. Upgrade HBase

Run the following commands on both the HBase Master and the RegionServers hosts.

  1. Upgrade HBase.

    • For RHEL/CentOS/Oracle Linux:

      yum upgrade hbase
                          

    • For SLES:

       zypper install hbase
    • For Ubuntu:

       apt-get install hbase
  2. Replace your configuration after upgrading. Replace the HBase template configuration in /etc/hbase/conf.

  3. Check for HFiles in V1 format. HBase 0.96.0 discontinues support for HFileV1. Before the actual upgrade, run the following command to check if there are HFiles in V1 format:

    ./bin/hbase upgrade -check

    HFileV1 was a common format prior to HBase 0.94. You may see output similar to:

    Tables Processed:
                        
    hdfs://localhost:41020/myHBase/.META.
    hdfs://localhost:41020/myHBase/usertable
    hdfs://localhost:41020/myHBase/TestTable
    hdfs://localhost:41020/myHBase/t
                        
    Count of HFileV1: 2
    HFileV1:
    hdfs://localhost:41020/myHBase/usertable/fa02dac1f38d03577bd0f7e666f12812/family/249450144068442524
    hdfs://localhost:41020/myHBase/usertable/ecdd3eaee2d2fcf8184ac025555bb2af/family/249450144068442512
                        
    Count of corrupted files: 1
    Corrupted Files:
    hdfs://localhost:41020/myHBase/usertable/fa02dac1f38d03577bd0f7e666f12812/family/1
    Count of Regions with HFileV1: 2
    Regions to Major Compact:
    hdfs://localhost:41020/myHBase/usertable/fa02dac1f38d03577bd0f7e666f12812
    hdfs://localhost:41020/myHBase/usertable/ecdd3eaee2d2fcf8184ac025555bb2af

    When you run the upgrade check, if “Count of HFileV1” returns any files, start the hbase shell to use major compaction for regions that have have HFileV1 format. For example in the sample output above, you must compact the fa02dac1f38d03577bd0f7e666f12812 and ecdd3eaee2d2fcf8184ac025555bb2af regions.

  4. As the HBase user, run an upgrade:

    su $HBASE_USER
    /usr/lib/hbase/bin/hbase upgrade -execute

    You should see a completed Znode upgrade with no errors.

  5. Start services. Run as root:

    Suppose $HBASE_USER = hbase
    sudo su -l hbase -c "/usr/lib/hbase/bin/hbase-daemon.sh --config /etc/hbase/conf start master"
    sudo su -l hbase -c "/usr/lib/hbase/bin/hbase-daemon.sh --config /etc/hbase/conf start regionserver"
  6. Check processes.

    ps -ef | grep -i hmaster
    ps -ef | grep -i hregion


loading table of contents...