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:
hive_server_portproperties. This step is not required on a single node cluster.
Verify that the path specified in the
hive_conf_dirproperty applies to the Hive version that you have installed. If needed, update the path to reflect the Hive version that you have installed.
If Hue and Hive are installed on separate nodes, you must also copy the Hive conf directory to the Hue node.
For Hive 0.13: If you want to view logs during query execution, set
use_get_log_apito 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.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.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)
Configure Shared Hive Data and Metadata Directories for Hue
hive.metastore.urisproperty as shown:
hive.metastore.warehouse.dirproperty can keep its default value and does not need to be changed.
Enable Hue impersonation by setting the following property to
Set the location of the
To enable the Hive Metastore service to share the embedded Derby database, add the following property blocks to the
hive-site.xmlfile on the node running
hiveserver2to point to the location of the Derby metastore:
To enable the Hive Metastore service to share a MySQL database, add the following property blocks to the hive-site.xml file:
Configure Separate Hive Data and Metadata Directories for Hue:
If you want to store Hue data and metadata in separate directories from Hive data and metadata, follow these steps:
hive-site.xmlto a new location. (The original
hive-site.xmlfile remains in the previous location for use by Hive.)
hue.iniand change the
hive_conf_dirproperty so it points to the new location for
- Change the
hive.metastore.warehouse.dirproperty in the new
hive-site.xmlfile so it points to the directory where Hue data will be located.
- Change the
hive.metastore.urisproperty so it points to the directory for Hue's
true, as shown in step 2 above.
3. Additional Configurations
Perform any additional Hue configurations and then restart Hue so that the changes will take effect. See Starting the Hue Webserver.