Integrate Hue with Hive

Complete the following steps to integrate Hue with Hive:

  1. Edit the hue.ini file. Complete the following steps in the beeswax section of the hue.ini file:
    1. Configure the hive_server_host and hive_server_port properties. This step is not required on a single node cluster.
      [beeswax]
       
      # Host where HiveServer2 is running.
      # If Kerberos security is enabled, use fully-qualified domain name (FQDN).
        hive_server_host=<FQDN of Hive Server>
       
      # Port that HiveServer2 Thrift server runs on.
        hive_server_port=10000
    2. Verify that the path specified in the hive_conf_dir property applies to the Hive version that you have installed. If needed, update the path to reflect the Hive version that you have installed.
      # Hive configuration directory, where hive-site.xml is located
      hive_conf_dir=/opt/mapr/hive/hive-1.0/conf
      If Hue and Hive are installed on separate nodes, you must also copy the Hive conf directory to the Hue node.
    3. For Hive 0.13: If you want to view logs during query execution, set use_get_log_api to true. From Hive 1.0 onward, this value does not need to be set to true in order to view the logs during query execution.
      Note: If you install Hue and Hive 0.13 with the MapR Installer, the MapR Installer automatically performs this step.
  2. Configure Data and Metadata Directories. When Hue and Hive are used together, they are usually configured to share metadata and data directories. However, you can create create separate directories for Hue and Hive.
    The locations of the shared directories are specified by the following properties in the hive-site.xml file:
    • hive.metastore.uris (the hostname and port of the Hive Metastore node)
    • hive.metastore.warehouse.dir (the directory where the default database for the warehouse is located)
    See Configure Shared Hive Data and Metadata Directories for Hue and Configure Separate Hive Data and Metadata Directories for Hue for more information.
  3. Perform any additional Hue configurations and then restart Hue so that the changes will take effect. See Starting the Hue Webserver.