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

Using Pig with HBase

To allow Pig scripts to use HBase, add the following statement to the top of each script. Replace the <component_version> strings with the current HBase, ZooKeeper and CDH version numbers.

register /usr/lib/zookeeper/zookeeper-<ZooKeeper_version>-cdh<CDH_version>.jar
register /usr/lib/hbase/hbase-<HBase_version>-cdh<CDH_version>-security.jar

For example,

register /usr/lib/zookeeper/zookeeper-3.4.5-cdh5.0.0.jar
register /usr/lib/hbase/hbase-0.95.2-cdh5.0.0-security.jar
Page generated September 3, 2015.