Setting up HUE locally can speed up tests for HUE-Impala integration bugs. For example, HUE maybe the best portal to test some HS2 protocol interfaces like GET_TABLES. Note that impala-shell uses beeswax protocol and beeline uses jdbc protocol. None of them can fully test on HS2 protocol interfaces. Here comes the steps for setting up HUE locally to point to Hive and Impala in the minicluster.
Take installing HUE-cdh5.16.2-release on ubuntu16.04 as an example.
Install prerequirements and compile HUE:
- sudo apt-get install git ant gcc g++ libffi-dev libkrb5-dev libmysqlclient-dev libsasl2-dev libsasl2-modules-gssapi-mit libsqlite3-dev libssl-dev libxml2-dev libxslt-dev make maven libldap2-dev python-dev python-setuptools libgmp3-dev
- Make sure that you have jdk and maven installed. JAVA_HOME is set. Can find java and mvn in PATH.
- git clone --branch cdh5.16.2-release https://github.com/cloudera/hue.git
- cd hue
- make apps
After "make" succeeds, edit config to use non-default port 11050 of HiveServer2. In desktop/conf/pseudo-distributed.ini, go to the [beeswax] section and add
Then launch HUE server (in dev mode)
Now Hue should be running on http://localhost:8000. You should be able to use Hive and Impala in HUE.
If you are accessing HUE in other machine, launch HUE server in production mode:
build/env/bin/hue runserver 0.0.0.0:8000
For testing GET_TABLES interface on Impala:
- use Impala editor in HUE and choose a database in left hand side bar
- click the refresh button and choose "Clear Cache" → "Refresh"
1. "make apps" fails with error: Couldn't find index page for 'nose'
The full error message may be
--- Installing development tool: nose[1.3.7] /home/quanlong/workspace/hue/build/env/bin/python2.7 /home/quanlong/workspace/hue/build/env/bin/easy_install -i https://pypi.python.org/ \ -H *.cloudera.com,pypi.python.org -qq nose==1.3.7 Couldn't find index page for 'nose' (maybe misspelled?) No local packages or download links found for nose==1.3.7 error: Could not find suitable distribution for Requirement.parse('nose==1.3.7') /home/quanlong/workspace/hue/desktop/devtools.mk:34: recipe for target 'nose[1.3.7]' failed make: *** [nose[1.3.7]] Error 1 make: Leaving directory '/home/quanlong/workspace/hue/desktop' /home/quanlong/workspace/hue/desktop/devtools.mk:42: recipe for target '/home/quanlong/workspace/hue/build/.devtools' failed make: *** [/home/quanlong/workspace/hue/build/.devtools] Error 2 make: Leaving directory '/home/quanlong/workspace/hue/desktop' Makefile:148: recipe for target 'desktop' failed make: *** [desktop] Error 2
Somehow easy_install fails to install nose in version 1.3.7. It could also fail in installing other python dependencies mentioned in desktop/devtools.mk:
DEVTOOLS += \ nose[1.3.7] \ coverage[3.7.1] \ nosetty[0.4] \ werkzeug[0.6] \ windmill[1.3] \ pylint[0.28.0]
You can work around it by using pip to install them. Use pip in the virtualenv:
$ source build/env/bin/activate (env)$ pip install nose==1.3.7 (env)$ pip install coverage==3.7.1 (env)$ pip install nosetty==0.4 (env)$ pip install werkzeug==0.6 (env)$ pip install windmill==1.3 (env)$ pip install pylint==0.28.0 (env)$ deactivate
Then go ahead to "make apps".