Appendix C. Upgrade from Previous Releases

Upgrading HBase involves careful planning, especially when the cluster is currently in production. With the addition of rolling restarts (see Rolling Restarts), it has become much easier to update HBase with no downtime.

Note

Depending on the version of HBase you are using or upgrading to, you may need to upgrade the underlying Hadoop version first so that it matches the required version for the new version of HBase you are installing. Follow the upgrade guide found on the Hadoop website.

Upgrading to HBase 0.90.x

Depending on the versions you are upgrading from, a different set of steps might be necessary to update your existing cluster to a newer version. The following subsections address the more common update scenarios.

From 0.20.x or 0.89.x

This version of 0.90.x HBase can be started on data written by HBase 0.20.x or HBase 0.89.x, and there is no need for a migration step. HBase 0.89.x and 0.90.x do write out the names of region directories differently—they name them with an MD5 hash of the region name rather than a Jenkins hash, which means that once you have started, there is no going back to HBase 0.20.x.

Be sure to remove the hbase-default.xml file from your conf directory when you upgrade. A 0.20.x version of this file will have suboptimal configurations for HBase 0.90.x. The hbase-default.xml file is now bundled into the HBase JAR and read from there. If you would like to review the content of this file, you can find it in the src directory at $HBASE_HOME/src/main/resources/hbase-default.xml or see Appendix A.

Finally, if upgrading from 0.20.x, check your .META. schema in the shell. In the past, it was recommended that users run with a 16 KB MEMSTORE_FLUSHSIZE. Execute

hbase(main):001:0> scan '-ROOT-'

in the shell. This will output the current .META. schema. Check if the MEMSTORE_FLUSHSIZE size is set to 16 KB (16384). If that is the case, you will need to change this. The new default value is 64 MB (67108864). Run the script $HBASE_HOME/bin/set_meta_memstore_size.rb. This will make the necessary changes to your .META. schema. Failure to run this change will cause your cluster to run more slowly.[131]

Within 0.90.x

You can use a rolling restart during any of the minor upgrades. Simply install the new version and restart the region servers using the procedure described in Rolling Restarts.

Upgrading to HBase 0.92.0

No rolling restart is possible, as the wire protocol has changed between versions. You need to prepare the installation in parallel, then shut down the cluster and start the new version of HBase. No migration is needed otherwise.



[131] See “HBASE-3499 Users upgrading to 0.90.0 need to have their .META. table updated with the right MEMSTORE_SIZE” (http://issues.apache.org/jira/browse/HBASE-3499) for details.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.195.111