For this guide using Hue is Query Tool With GUI For Browsing, Querying, Visualizing Data & Developing Apps for Hadoop. Here is how to install Hue on Ubuntu 16.04 running Hadoop. Hue consists of web service which runs on a node in cluster. Hue has editors for Hive, Impala, Pig, MapReduce, Spark and any SQL like MySQL, Oracle, SparkSQL, Solr SQL, Phoenix etc. Dashboards to dynamically interact and visualize data with Solr or SQL. Scheduler of jobs and workflows. Browsers for Jobs, HDFS, S3 files, SQL Tables, Indexes, Git files, Sentry permissions, Sqoop etc. Some related thing to know is that – we can accessing HBase by using the HBase Shell. We can start HBase Shell with hbase shell
command.
Normally we can install Apache Hadoop in the way we described how to install Apache Hadoop on single server or use Apache Hadoop of some brand as appliance like that of Cloudera in this case. Hue actually optimised for Cloudera’s Distribution including Apache Hadoop (CDH). However, peoples install and run Hue with regular version of Apache with sometime some troubles. Those troubles can be fixed like an user got fixed here :
1 | https://community.cloudera.com/t5/Web-UI-Hue-Beeswax/hue-configuration-error-non-cloudera-installation/td-p/32691 |
If you install only Hue without Hadoop, it will actually run it but that will have no other use. Here is Hue on Github :
---
1 | https://github.com/cloudera/hue |
How To Install Hue on Ubuntu 16.04
Install the pre-requites after update, upgrade :
1 2 3 | apt update apt upgrade apt install git ant gcc g++ libkrb5-dev libmysqlclient-dev libssl-dev libsasl2-dev libsasl2-modules-gssapi-mit libsqlite3-dev libtidy-0.99-0 libxml2-dev libxslt-dev make libldap2-dev maven python-dev python-setuptools libgmp3-dev |
Change directory to somewhere like /tmp
and clone that official repo of Hue :
1 2 3 4 5 | cd /tmp git clone https://github.com/cloudera/hue.git cd hue make apps build/env/bin/hue runserver |
You’ll get this kind of information :
1 2 3 | Django version 1.6.10, using settings 'desktop.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. |
Obviously, if you point to http://127.0.0.1:8000/
you’ll get the GUI. Stop the server after testing.
Move hue to /usr/local
i.e. to the directory where your Hadoop and Hbase are located:
1 | sudo mv /tmp/hue /usr/local |
Obviously you need to configure each settings file of each component (like Hadoop) you want to connect with. Your hdfs-site.xml
probably will be in /etc/hadoop/conf
, where this configuration needed :
1 2 3 4 | <property> <name>dfs.webhdfs.enabled</name> <value>true</value> </property> |
Add this to core-site.html
:
1 2 3 4 5 6 7 8 | <property> <name>hadoop.proxyuser.hue.hosts</name> <value>*</value> </property> <property> <name>hadoop.proxyuser.hue.groups</name> <value>*</value> </property> |
As from Cloudera’s documentation, if you place your Hue Server outside the Hadoop cluster, you can run an HttpFS server to provide Hue access to HDFS. The HttpFS service requires only one port to be opened to the cluster.
Also add this in httpfs-site.xml
which will be in /etc/hadoop-httpfs/conf
:
1 2 3 4 5 6 7 8 | <property> <name>httpfs.proxyuser.hue.hosts</name> <value>*</value> </property> <property> <name>httpfs.proxyuser.hue.groups</name> <value>*</value> </property> |