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

Cloudera Manager 4 and CDH 4 have reached End of Maintenance (EOM) on August 9, 2015. Cloudera will not support or provide patches for any of the Cloudera Manager 4 or CDH 4 releases after that date.

Using Hive to Run Queries on a Secure HBase Server

To use Hive to run queries on a secure HBase Server, you must set the following HIVE_OPTS environment variable:

env HIVE_OPTS="-hiveconf -hiveconf hbase.rpc.engine=org.apache.hadoop.hbase.ipc.SecureRpcEngine -hiveconf hbase.master.kerberos.principal=hbase/_HOST@YOUR-REALM.COM -hiveconf hbase.regionserver.kerberos.principal=hbase/_HOST@YOUR-REALM.COM -hiveconf hbase.zookeeper.quorum=zookeeper1,zookeeper2,zookeeper3" hive


  • You replace YOUR-REALM with the name of your Kerberos realm
  • You replace zookeeper1,zookeeper2,zookeeper3 with the names of your ZooKeeper servers. The hbase.zookeeper.quorum property is configured in the hbase-site.xml file.
  • The special string _HOST is replaced at run-time by the fully-qualified domain name of the host machine where the HBase Master or Region Server is running. This requires that reverse DNS is properly working on all the hosts configured this way.

In the following, _HOST is the name of the host where the HBase Master is running:

-hiveconf hbase.master.kerberos.principal=hbase/_HOST@YOUR-REALM.COM

In the following, _HOST is the host name of the HBase Region Server that the application is connecting to:

-hiveconf hbase.regionserver.kerberos.principal=hbase/_HOST@YOUR-REALM.COM

You can also set the HIVE_OPTS environment variable in your shell profile.

This page last updated August 5, 2015