点击上方免费订阅(学习)
Hue百科:
Hue 是一种基于Apche hadoop基础平台的在线开源数据分析接口,参见gethue.com
Hue的主要功能:
-
提供SQL 接口:Hive, Impala, MySql, PostGres, Sqlite and Oracle;
-
提供Solr动态查询面板;
-
提供Spark 编辑器;
-
提供浏览界面:YARN, HDFS, Hive table Metastore, HBase, ZooKeeper;
-
提供 Sqoop2编辑器、Oozie 流编辑器和控制面板;
-
提供Hadoop数据加载向导;
除此,它还提供一个创建hadoop应用的SDK,更多开发文档在gethue.com
如何开始?
首先建立服务器运行环境:
$ git clone https://github.com/cloudera/hue.git $ cd hue $ make apps $ build/env/bin/hue runserver
现在Hue已经运行在本地http://localhost:8000!
开发配置文件是desktop/conf/pseudo-distributed.ini
.
接下来启动生产环境:
$ build/env/bin/supervisor
启动测试:
安装最小集群 (仅一次):
$ ./tools/jenkins/jenkins.sh slow
开始全部测试:
$ build/env/bin/hue test all
或者逐项测试,如:
$ build/env/bin/hue test specific impala $ build/env/bin/hue test specific impala.tests:TestMockedImpala $ build/env/bin/hue test specific impala.tests:TestMockedImpala.test_basic_flow
开发环境需求
你的系统里需要安装和运行如下的程序包和工具:
Ubuntu:
-
ant
-
gcc
-
g++
-
libkrb5-dev
-
libmysqlclient-dev
-
libssl-dev
-
libsasl2-dev
-
libsasl2-modules-gssapi-mit
-
libsqlite3-dev
-
libtidy-0.99-0 (for unit tests only)
-
libxml2-dev
-
libxslt-dev
-
make
-
mvn (from
maven
package or maven3 tarball) -
openldap-dev / libldap2-dev
-
python-dev
-
python-setuptools
-
libgmp3-dev
CentOS/RHEL:
-
ant
-
asciidoc
-
cyrus-sasl-devel
-
cyrus-sasl-gssapi
-
gcc
-
gcc-c++
-
krb5-devel
-
libtidy (for unit tests only)
-
libxml2-devel
-
libxslt-devel
-
make
-
mvn (from
maven
package or maven3 tarball) -
mysql
-
mysql-devel
-
openldap-devel
-
python-devel
-
sqlite-devel
-
openssl-devel (for version 7+)
-
gmp-devel
MacOS:
-
Xcode command line tools
-
Oracle’s JDK 1.7+
-
maven (Homebrew)
-
mysql (Homebrew)
-
gmp (Homebrew)
-
openssl (Homebrew)
-
Required for Mac OS X 10.11+ (El Capitan), after
brew install openssl
, run:export LDFLAGS=-L/usr/local/opt/openssl/lib && export CPPFLAGS=-I/usr/local/opt/openssl/include
文件列表
Hue的框架文件在 desktop/core里,其中含有web组件;destop/libs是Hadoop服务API接口;可以运行的APP在apps/里;第三方独立应用可以放置在ext-py/目录下。
一个应用的典型目录结构如下:
src/ for Python/Django code models.py urls.py views.py forms.py settings.py conf/ for configuration (``.ini``) files to be installed static/ for static HTML/js resources and help doc templates/ for data to be put through a template engine locales/ for localizations in multiple languages
For the URLs within your application, you should make your ownurls.py
which will be automatically rooted at/yourappname/
in the global namespace. Seeapps/about/src/about/urls.py
for an example.
你可以通过ulrs.py声明你自己应用的URL地址,这些URL地址通过全局命名里的/yourappname/自动被root,更多例子请参考apps/about/src/about/urls.py
代码栈
Hue 的代码栈如下:
-
Python 2.6.5 – 2.7
-
Django 1.6 (https://docs.djangoproject.com/en/1.6/)
-
Knockout.js (http://knockoutjs.com/)
-
jQuery (http://jquery.com/)
-
Bootstrap (http://getbootstrap.com/)
Hue 社区
-
User group:http://groups.google.com/a/cloudera.org/group/hue-user
-
Jira:https://issues.cloudera.org/browse/HUE
-
Reviews:https://review.cloudera.org/dashboard/?view=to-group&group=hue(repo ‘hue-rw’)
License 规范
Apache License, Version 2.0http://www.apache.org/licenses/LICENSE-2.0
PPV课翻译小组作品, 未经许可严禁转载
PPV课-大数据培训专家
国内领先的大数据学习社区和职业培训平台,欢迎关注!
原文始发于微信公众号(PPV课数据科学社区):【工具】大数据在线分析利器:Hue
原创文章,作者:ppvke,如若转载,请注明出处:http://www.ppvke.com/archives/14927