Using Apache Hive with HBase in CDH

To allow Hive scripts to use HBase, associate the HBase service with the Hive service:

  1. Using Cloudera Manager, add the Hive and HBase services to your cluster, if they are not already there:

    1. From the Cloudera Manager home page, click the cluster where you want to install Hive and HBase.
    2. From the Actions drop-down menu, select Add Service.
    3. From the Service Type column, select HBase, and then click Continue.
    4. Perform the required actions on each page of the Add Service wizard and then click Continue to move forward on each page.
    5. On the last page of the wizard, click Finish.
    6. Click the down-arrow next to the new HBase service and select Start to start the service.
    7. Perform the Add Service wizard steps to add the Hive service. Adding the Hive service also requires that you provide the database connection information for the metastore. Start the Hive service when you have finished adding the service.
  2. From the Cloudera Manager home page, click the Hive service that you just added.
  3. On the Hive service page, select the Configuration tab.
  4. On the Hive service Configuration page, type hbase into the search text box.
  5. Locate the HBase Service configuration property on the page, select the HBase instance that you want to associate with Hive, and click Save Changes
  6. Redeploy the client configuration for the Hive service and restart all stale services.

After performing this configuration, the HBase service is associated with the Hive service and your Hive scripts can use HBase.