Using Apache Hive with HBase in CDH
You need to associate the HBase service with the Hive service, so Hive scripts can use HBase as described in the procedure below.
Prerequisites for Using Hive with HBase
- Using Cloudera Manager, install CDH with HBase using Cloudera Manager. Add the Hive service, and set up the cluster.
- If Kerberos is enabled, assign the following roles to the gateway node:
- Hive Gateway Role
- HDFS Gateway Role
- HBase Gateway Role
- If Kerberos is not enabled, assign the following roles to the gateway node:
- Hive Gateway Role
- HDFS Gateway Role
Associate HBase with Hive
- In a Sentry-controlled environment, grant the hive user most privileges in HBase.
grant 'hive', 'RWXC'
- From the Cloudera Manager home page, click the Hive service.
- On the Hive service page, select the Configuration tab.
- On the Hive service Configuration page, type hbase into the search text box.
- Locate the HBase Service configuration property on the page, select the HBase instance that you want to associate with Hive, and click Save Changes
- Redeploy the client configuration for the Hive service and restart all stale services.
The HBase service is now associated with the Hive service, and your Hive scripts can use HBase.