Installing Hive on Tez and adding a HiveServer role

Cloudera Runtime (CR) services include Hive on Tez and Hive Metastore (HMS). Hive on Tez is a SQL query engine using Apache Tez that performs the HiveServer (HS2) role in a Cloudera cluster. You need to install Hive on Tez and HMS in the correct order; otherwise, HiveServer fails. You need to install additional HiveServer roles to Hive on Tez, not the Hive service; otherwise, HiveServer fails.

  1. Add the Hive service to a cluster.
  2. Add the Hive on Tez service to the same cluster.
    The Hive on Tez service includes the HiveServer2 role.
  3. Accept the default, or change the Hive warehouse location for managed and external tables as described below.

Adding a HiveServer role

  1. In Cloudera Manager, click Clusters > Hive on Tez.
    Do not click Clusters > Hive by mistake. Only the Hive on Tez service supports the HiveServer2 role.
  2. Click Actions > Add Role Instances.
  3. Click in the HiveServer2 box to select hosts.
  4. In the Host name column, select a host for the HiveServer2 role, and click OK.
    The selected host name you assigned the HiveServer2 role appears under HiveServer2.
  5. Click Continue.
    The new HiveServer2 role state is stopped.
  6. Select the new HiveServer2 role.
  7. In Actions for Selected, select Start, and then click Start to confirm.
    You see that the service successfully started.

Changing the Hive warehouse location

You use the Hive Metastore Action menu in Cloudera Manager, and navigate to one of the following menu items in the first step below.
  • Hive > Action Menu > Create Hive Warehouse Directory
  • Hive > Action Menu > Create Hive Warehouse External Directory
  1. Set up directories for the Hive warehouse directory and Hive warehouse external directory from Cloudera Manager Actions.
  2. In Cloudera Manager, click Clusters > Hive (the Hive Metastore service) > Configuration, and change the hive.metastore.warehouse.dir property value to the path you specified for the new Hive warehouse directory.
  3. Change the hive.metastore.warehouse.external.dir property value to the path you specified for the Hive warehouse external directory.
  4. Configure Ranger policies or set up ACL permissions to access the directories.