--- title: Hue 3 on HDP installation tutorial author: admin type: post date: 2015-02-12T18:14:15+00:00 url: /hadoop-hue-3-on-hdp-installation-tutorial/ sf_detail_type: - none sf_thumbnail_type: - none sf_thumbnail_link_type: - link_to_post sf_page_title: - 1 sf_page_title_style: - standard sf_no_breadcrumbs: - 1 sf_page_title_bg: - none sf_page_title_text_style: - light sf_background_image_size: - cover sf_social_sharing: - 1 sf_sidebar_config: - left-sidebar sf_left_sidebar: - Sidebar-2 sf_right_sidebar: - Sidebar-1 sf_caption_position: - caption-right sf_remove_promo_bar: - 1 slide_template: - default ampforwp-amp-on-off: - default categories: ---
Note: this guide works with any Hue 4 version and HDP 2.x. There is a recent guide on HDP3.
Note: for Hive issues, just scroll down below ## Installing Hue 3.9 on HDP 2.3 - Amazon EC2 RHEL 7 {.yt.watch-title-container} {{< youtube UZoKXSsz5cw >}} ## Install in HDP 2.2 **Initial draft rom Andrew Mo (hive.server2.parallel.ops.in.session=true
Note about Tez:
[beeswax]
\# Hue will use at most this many HiveServer2 sessions per user at a time.
\# For Tez, increase the number to more if you need more than one query at the time, e.g. 2 or 3 (Tez as a maximum of 1 query by session).
max_number_of_sessions=1
[
][3]
## Installing HUE
[
][4]
For this walk-through, we’ll assume that you’ve already deployed a working cluster using Apache Ambari 1.7.
Let’s go on the HUE Host (Gateway node) and get started by preparing our environment and downloading the Hue 3.8 release tarball.
RHEL/CentOS uses ‘yum’ for package management.
Ubuntu uses ‘apt-get’ for package management. In our example, we’re using Ubuntu.
Prepare dependencies:
sudo apt-get install -y ant
sudo apt-get install -y gcc g++
sudo apt-get install -y libkrb5-dev libmysqlclient-dev
sudo apt-get install -y libssl-dev libsasl2-dev libsasl2-modules-gssapi-mit
sudo apt-get install -y libsqlite3-dev
sudo apt-get install -y libtidy-0.99-0 libxml2-dev libxslt-dev
sudo apt-get install -y maven
sudo apt-get install -y libldap2-dev
sudo apt-get install -y python-dev python-simplejson python-setuptools
Download Hue 3.8.1 release tarball (in case, older version [3.7.1 link][5]):
• wget sudo apt-get install -y openjdk-7-jre openjdk-7-jdk
sudo echo “JAVA_HOME=\”/usr/lib/jvm/java-7-openjdk-amd64/jre\”" >> /etc/environment
Unpackage the HUE 3.7.1 release tarball and change to the directory.
Install HUE:
sudo make install
By default, HUE installs to ‘/usr/local/hue’ in your Gateway node’s local filesystem.
As installed, the HUE installation folders and file ownership will be set to the ‘root’ user.
Let’s fix that so HUE can run correctly without root user permissions:
sudo chown -R ubuntu:ubuntu /usr/local/hue
## Configuring Hadoop and HUE
HUE uses a configuration file to understand information about your Hadoop cluster and where to connect to. We’ll need to configure our Hadoop cluster to accept connections from HUE, and add our cluster information to the HUE configuration file.
### Hadoop Configuration
Ambari provides a convenient single point of management for a Hadoop cluster and related services. We’ll need to reconfigure our HDFS, Hive (WebHcatalog), and Oozie services to take advantage of HUE’s features.
### HDFS
We need to do three things, (1) ensure WebHDFS is enabled, (2) add ‘proxy’ user hosts and groups for HUE, and (3) enable HDFS file access control lists (FACLs) (optional).
[
][6] [
][7]
[
][8]
## Hive (WebHcat) and Oozie
We’ll also need to set up proxy user hosts and groups for HUE in our Hive and Oozie service configurations.
[
][9] [
][10]
Once these cluster configuration updates have been set, save, and restart these services on the respective cluster nodes.
Confirm WebHDFS is running:
## [
][11]
### HUE Configuration
The HUE configuration file can be found at ‘/usr/local/hue/desktop/conf/hue.ini’
Be sure to make a backup before editing!
[
][12]
We’ll need to populate ‘hue.ini’ with our cluster’s configuration information.
Examples are included below, but will vary with your cluster’s configuration.
In this example, the cluster is small, so our cluster NodeNode also happens to be the Hive Server, Hive Metastore, HBase Master, one of three Zookeepers, etc.
WebHDFS needs to point to our cluster NameNode:
[
][13]
Configure the correct values for our YARN cluster Resource Manager, Hive, Oozie, etc:
[
][14] [
][15]
[
][16][
][17][
][18]
To disable HUE ‘apps’ that aren’t necessary, or are unsupported, for our cluster, use the Desktop ‘app_blacklist’ property. Here I’m disabling the Impala and Sentry/Security tabs (note: the HDFS FACLs tab is disabled if the ‘Security’ app is disabled).
## Start HUE on HDP
• We start the HUE server using the ‘supervisor’ command.
[
][19]
• Use the ‘-d’ switch to start the HUE supervisor in daemon mode
Connect to your new HUE server at its IP address/FQDN and the default port of ‘8888’
[
][20]
## It works!
Congratulations, you’re running HUE 3.7.1 with HDP 2.2!
Let’s take a look around at HUE’s great features:
[
][21]
[
][22]
[
][23]
[
][24]
[
][25]
[
][26]
[
][27]
[
][28]
[
][29]
Have any questions? Feel free to contact Andrew or the [hue-user][30] list / [@gethue][31]!
[1]: https://gethue.com/how-to-deploy-hue-on-hdp/
[2]: https://gethue.com/hue-3-8-with-an-oozie-editor-revamp-better-performances-improved-spark-ui-is-out/
[3]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-archi.jpg
[4]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-2.png
[5]: https://cdn.gethue.com/downloads/releases/3.7.1/hue-3.7.1.tgz
[6]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-3.png
[7]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-4.png
[8]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-28.png
[9]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-12.png
[10]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-10.png
[11]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-8.png
[12]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-1.png
[13]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-7.png
[14]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-13.png
[15]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-14.png
[16]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-15.png
[17]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-38.png
[18]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-30.png
[19]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-19.png
[20]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-18.png
[21]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-21.png
[22]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-25.png
[23]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-24.png
[24]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-29.png
[25]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-31.png
[26]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-39.png
[27]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-40.png
[28]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-48.png
[29]: https://cdn.gethue.com/uploads/2015/02/hue-hdp-49.png
[30]: http://groups.google.com/a/cloudera.org/group/hue-user
[31]: https://twitter.com/gethue