Hue 入門

1 簡介

Hue 是什么造锅?

Hue=Hadoop User Experience(Hadoop 用戶體驗),直白來說就一個開源的 Apache Hadoop UI 系統(tǒng)蝌矛,它是基于Python Web 框架 Django 實現(xiàn)的碎罚,通過使用 Hue 我們可以在瀏覽器端的 Web 控制臺上與 Hadoop 集群進行交互來分析處理數(shù)據(jù)欣硼。

2 安裝部署

2.1、幫助文檔

http://archive.cloudera.com/cdh5/cdh/5/hue-3.7.0-cdh5.3.0/manual.html

2.2映穗、Hue 安裝

1.安裝前準(zhǔn)備

必備的軟件環(huán)境:

Centos 7.6+Python 2.7.5+JDK8+Maven-3.3.9+Ant-1.8.1+Hue-3.7.0

必備的集群環(huán)境:

Hadoop+HBase+Hive+ZK+MySQL+Oozie

配置環(huán)境變量

<pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="bash" cid="n186" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> #JAVA_HOME
export JAVA_HOME=/opt/module/jdk1.8.0_144
export PATH=PATH:JAVA_HOME/bin
?

MAVEN_HOME

export MAVEN_HOME=/opt/module/maven-3.3.9
export PATH=PATH:MAVEN_HOME/bin
?

HADOOP_HOME

export HADOOP_HOME=/opt/module/hadoop-2.7.2
export PATH=PATH:HADOOP_HOME/bin:$HADOOP_HOME/sbin
?

HIVE_HOME

export HIVE_HOME=/opt/module/hive-1.2.1
export PATH=PATH:HIVE_HOME/bin
?

HBASE_HOME

export HIVE_HOME=/opt/module/hbase-1.3.1
export PATH=PATH:HBASE_HOME/bin
?

ANT_HOME

export ANT_HOME=/opt/module/ant-1.8.1
export PATH=PATH:ANT_HOME/bin</pre>

重新加載 profile 文件窖张,測試 maven、ant 是否安裝成功

<pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="bash" cid="n188" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> [djm@hadoop102 ~]source /etc/profile [djm@hadoop102 ~] mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: /opt/module/maven-3.3.9
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: /opt/module/jdk1.8.0_144/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-957.el7.x86_64", arch: "amd64", family: "unix"
[djm@hadoop102 ~]$ ant -v
Apache Ant version 1.8.1 compiled on April 30 2010
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed</pre>

安裝 Hue 所需要的依賴包

<pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="" cid="n190" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> yum install asciidoc cyrus-sasl-devel cyrus-sasl-gssapi cyrus-sasl-plain gcc gcc-c++ krb5-devel libffi-devel libtidy libxml2-devel libxslt-devel make mysql mysql-devel openldap-devel python-devel sqlite-devel openssl-devel gmp-devel -y</pre>

解壓

<pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="bash" cid="n192" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> [djm@hadoop102 ~]$ tar -zxvf hue-3.7.0-cdh5.3.6.tar -C /opt/module</pre>

編譯

<pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="bash" cid="n194" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> [djm@hadoop102 ~]cd /opt/module/hue-3.7.0-cdh5.3.6 [djm@hadoop102 hue-3.7.0-cdh5.3.6] make apps</pre>

在編譯時出現(xiàn)了下面的問題

OpenSSL/crypto/crl.c:6:23: error: static declaration of ‘X509_REVOKED_dup’ follows non-static declaration static X509_REVOKED * X509_REVOKED_dup(X509_REVOKED *orig) { ^ In file included from /usr/include/openssl/ssl.h:156:0, from OpenSSL/crypto/x509.h:17, from OpenSSL/crypto/crypto.h:30, from OpenSSL/crypto/crl.c:3: /usr/include/openssl/x509.h:751:15: note: previous declaration of ‘X509_REVOKED_dup’ was here X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev); ^ error: command gcc failed with exit status 1 make[2]: [/opt/modules/hue-3.7.0-cdh5.3.6/desktop/core/build/pyopenssl/egg.stamp] Error 1 make[2]: Leaving directory /opt/modules/hue-3.7.0-cdh5.3.6/desktop/core make[1]: [.recursive-env-install/core] Error 2 make[1]: Leaving directory /opt/modules/hue-3.7.0-cdh5.3.6/desktop make: [desktop] Error 2

解決方法:刪除 /usr/include/openssl/x509.h 的 751男公、752 行

X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev);

X509_REQ *X509_REQ_dup(X509_REQ *req);

然后重新編譯

編輯 hue.ini 文件

<pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="ini" cid="n203" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> [djm@hadoop102 hue-3.7.0-cdh5.3.6]$ vim desktop/conf/hue.ini
secret_key=jFE93j;2[290-eiw.KEiwN2s3['d;/.q[eIW^y#e=+Iei*@Mn<qW5o
http_host=hadoop102
http_port=8888
time_zone=Asia/Shanghai</pre>

啟動服務(wù)

<pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="bash" cid="n205" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> [djm@hadoop102 hue-3.7.0-cdh5.3.6]$ build/env/bin/supervisor </pre>

3 與其他框架集成

3.1 Hue 與 HDFS

編輯 hdfs-site.xml 文件

<pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="xml" cid="n209" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> <property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property></pre>

編輯 core-site.xml 文件

<pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="xml" cid="n211" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> <property>
<name>hadoop.proxyuser.hue.hosts</name>
<value></value>
</property>
<property>
<name>hadoop.proxyuser.hue.groups</name>
<value>
</value>
</property>

<property>
<name>hadoop.proxyuser.djm.hosts</name>
<value></value>
</property>
<property>
<name>hadoop.proxyuser.djm.groups</name>
<value>
</value>
</property>


<property>
<name>hadoop.proxyuser.httpfs.hosts</name>
<value></value>
</property>
<property>
<name>hadoop.proxyuser.httpfs.groups</name>
<value>
</value>
</property></pre>

編輯 httpfs-site.xml 文件

<pre mdtype="fences" cid="n220" lang="xml" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" spellcheck="false" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> <property>
<name>httpfs.proxyuser.hue.hosts</name>
<value></value>
</property>
<property>
<name>httpfs.proxyuser.hue.groups</name>
<value>
</value>
</property></pre>

分發(fā)

啟動 httpfs 服務(wù)

<pre mdtype="fences" cid="n226" lang="bash" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" spellcheck="false" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> [djm@hadoop102 ~]$ /opt/module/hadoop-2.7.2/sbin/httpfs.sh start</pre>

編輯 hue.ini 文件

<pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="ini" cid="n230" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> # Configuration for HDFS NameNode

------------------------------------------------------------------------

[[hdfs_clusters]]

HA support by using HttpFs

?
[[[default]]]

Enter the filesystem uri

fs_defaultfs=hdfs://hadoop102:9000
?

NameNode logical name.

logical_name=

?

Use WebHdfs/HttpFs as the communication mechanism.

Domain should be the NameNode or HttpFs host.

Default port is 14000 for HttpFs.

webhdfs_url=http://hadoop102:50070/webhdfs/v1
?

Change this if your HDFS cluster is Kerberos-secured

security_enabled=false

?

Default umask for file and directory creation, specified in an octal value.

umask=022

?

Directory of the Hadoop configuration

hadoop_conf_dir=$HADOOP_CONF_DIR when set or '/etc/hadoop/conf'

hadoop_conf_dir=/opt/module/hadoop-2.7.2/etc/hadoop
hadoop_hdfs_home=/opt/module/hadoop-2.7.2
hadoop_bin=/opt/module/hadoop-2.7.2/bin</pre>

重啟 Hue 服務(wù)

3.2 Hue 與 YRAN

編輯 hue.ini 文件

<pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="ini" cid="n239" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> # Configuration for YARN (MR2)

------------------------------------------------------------------------

[[yarn_clusters]]
?
[[[default]]]

Enter the host on which you are running the ResourceManager

resourcemanager_host=hadoop102
?

The port where the ResourceManager IPC listens on

resourcemanager_port=8032
?

Whether to submit jobs to this cluster

submit_to=True
?

Resource Manager logical name (required for HA)

logical_name=

?

Change this if your YARN cluster is Kerberos-secured

security_enabled=false

?

URL of the ResourceManager API

resourcemanager_api_url=http://hadoop103:8088
?

URL of the ProxyServer API

proxy_api_url=http://hadoop103:8088
?

URL of the HistoryServer API

history_server_api_url=http://hadoop104:19888
?

In secure mode (HTTPS), if SSL certificates from Resource Manager's

Rest Server have to be verified against certificate authority

ssl_cert_ca_verify=False

?

HA support by specifying multiple clusters

e.g.

?

[[[ha]]]

Resource Manager logical name (required for HA)

logical_name=my-rm-name</pre>

重啟 Hue 服務(wù)

3.3 Hue 與 Hive

修改 hive-site.xml

<pre mdtype="fences" cid="n244" lang="xml" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" spellcheck="false" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">
<property>
<name>hive.server2.thrift.port</name>
<value>10000</value>
</property>

<property>
<name>hive.server2.thrift.bind.host</name>
<value>hadoop102</value>
</property>

<property>
<name>hive.server2.long.polling.timeout</name>
<value>5000</value>
</property>

<property>
<name>hive.metastore.uris</name>
<value>thrift://192.168.10.102:9083</value>
</property></pre>

啟動 Hive 相關(guān)服務(wù)

<pre mdtype="fences" cid="n248" lang="bash" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" spellcheck="false" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> [djm@hadoop102 hive-1.2.1]bin/hive --service metastore & [djm@hadoop102 hive-1.2.1] bin/hive --service hiveserver2 &</pre>

編輯 hue.ini 文件

<pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="ini" cid="n255" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> [beeswax]
?

Host where HiveServer2 is running.

If Kerberos security is enabled, use fully-qualified domain name (FQDN).

hive_server_host=hadoop102
?

Port where HiveServer2 Thrift server runs on.

hive_server_port=10000
?

Hive configuration directory, where hive-site.xml is located

hive_conf_dir=/opt/module/hive-1.2.1/conf
?

Timeout in seconds for thrift calls to Hive service

server_conn_timeout=120

?

Choose whether Hue uses the GetLog() thrift call to retrieve Hive logs.

If false, Hue will use the FetchResults() thrift call instead.

use_get_log_api=true

?

Set a LIMIT clause when browsing a partitioned table.

A positive value will be set as the LIMIT. If 0 or negative, do not set any limit.

browse_partitioned_table_limit=250

?

A limit to the number of rows that can be downloaded from a query.

A value of -1 means there will be no limit.

A maximum of 65,000 is applied to XLS downloads.

download_row_limit=1000000

?

Hue will try to close the Hive query when the user leaves the editor page.

This will free all the query resources in HiveServer2, but also make its results inaccessible.

close_queries=false

?

Thrift version to use when communicating with HiveServer2

thrift_version=5</pre>

重啟 Hue 服務(wù)

3.4 Hue 與 MySQL

編輯 hue.ini 文件

<pre mdtype="fences" cid="n257" lang="ini" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" spellcheck="false" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> [[[mysql]]]

Name to show in the UI.

nice_name="My SQL DB"
?

For MySQL and PostgreSQL, name is the name of the database.

For Oracle, Name is instance of the Oracle server. For express edition

this is 'xe' by default.

name=mysqldb

?

Database backend to use. This can be:

1. mysql

2. postgresql

3. oracle

engine=mysql
?

IP or hostname of the database to connect to.

host=hadoop102
?

Port the database server is listening to. Defaults are:

1. MySQL: 3306

2. PostgreSQL: 5432

3. Oracle Express Edition: 1521

port=3306
?

Username to authenticate with when connecting to the database.

user=root
?

Password matching the username to authenticate with when

connecting to the database.

password=123456
?

Database options to send to the server when connecting.

https://docs.djangoproject.com/en/1.4/ref/databases/

options={}</pre>

重啟 Hue 服務(wù)

3.5 Hue 與 Zookeeper

編輯 hue.ini 文件

<pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="ini" cid="n267" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> [zookeeper]
?
[[clusters]]
?
[[[default]]]

Zookeeper ensemble. Comma separated list of Host/Port.

e.g. localhost:2181,localhost:2182,localhost:2183

host_ports=hadoop102:2181,hadoop103:2181,hadoop104:2181
?

The URL of the REST contrib service (required for znode browsing)

rest_url=http://localhost:9998</pre>

重啟 Hue 服務(wù)

3.6 Hue 與 HBase

啟動 HBase 服務(wù)和Hbase的 thrift 服務(wù)

<pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="bash" cid="n280" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> [djm@hadoop102 hbase-1.3.1]bin/start-hbase.sh [djm@hadoop102 hbase-1.3.1] bin/hbase-daemon.sh start thrift</pre>

編輯 hue.ini 文件

<pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="ini" cid="n275" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> [hbase]

Comma-separated list of HBase Thrift servers for clusters in the format of '(name|host:port)'.

Use full hostname with security.

hbase_clusters=(Cluster|hadoop102:9090)
?

HBase configuration directory, where hbase-site.xml is located.

hbase_conf_dir=/opt/module/hbase-1.3.1/conf
?

Hard limit of rows or columns per row fetched before truncating.

truncate_limit = 500

?

'buffered' is the default of the HBase Thrift Server and supports security.

'framed' can be used to chunk up responses,

which is useful when used in conjunction with the nonblocking server in Thrift.

thrift_transport=buffered</pre>

重啟 Hue 服務(wù)

3.7 Hue 與 Oozie

編輯 hue.ini 文件

<pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="ini" cid="n290" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; background: rgb(51, 51, 51); font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; position: relative !important; padding: 10px 10px 10px 0px; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"> [liboozie]

The URL where the Oozie service runs on. This is required in order for

users to submit jobs. Empty value disables the config check.

oozie_url=http://hadoop:11000/oozie
?

Requires FQDN in oozie_url if enabled

security_enabled=false

?

Location on HDFS where the workflows/coordinator are deployed when submitted.

remote_deployement_dir=/user/djm/oozie-apps
?
?
###########################################################################

Settings to configure the Oozie app

###########################################################################
?
[oozie]

Location on local FS where the examples are stored.

local_data_dir=/opt/module/oozie-4.0.0-cdh5.3.6/examples
?

Location on local FS where the data for the examples is stored.

sample_data_dir=/opt/module/oozie-4.0.0-cdh5.3.6/oozie-apps
?

Location on HDFS where the oozie examples and workflows are stored.

remote_data_dir=/user/djm/oozie-apps
?

Maximum of Oozie workflows or coodinators to retrieve in one API call.

oozie_jobs_count=100

?

Use Cron format for defining the frequency of a Coordinator instead of the old frequency number/unit.

enable_cron_scheduling=true</pre>

重啟 Hue 服務(wù)

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末荤堪,一起剝皮案震驚了整個濱河市合陵,隨后出現(xiàn)的幾起案子枢赔,更是在濱河造成了極大的恐慌,老刑警劉巖拥知,帶你破解...
    沈念sama閱讀 217,277評論 6 503
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件踏拜,死亡現(xiàn)場離奇詭異,居然都是意外死亡低剔,警方通過查閱死者的電腦和手機速梗,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,689評論 3 393
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來襟齿,“玉大人姻锁,你說我怎么就攤上這事〔缕郏” “怎么了位隶?”我有些...
    開封第一講書人閱讀 163,624評論 0 353
  • 文/不壞的土叔 我叫張陵,是天一觀的道長开皿。 經(jīng)常有香客問我涧黄,道長,這世上最難降的妖魔是什么赋荆? 我笑而不...
    開封第一講書人閱讀 58,356評論 1 293
  • 正文 為了忘掉前任笋妥,我火速辦了婚禮,結(jié)果婚禮上窄潭,老公的妹妹穿的比我還像新娘春宣。我一直安慰自己,他們只是感情好嫉你,可當(dāng)我...
    茶點故事閱讀 67,402評論 6 392
  • 文/花漫 我一把揭開白布月帝。 她就那樣靜靜地躺著,像睡著了一般均抽。 火紅的嫁衣襯著肌膚如雪嫁赏。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,292評論 1 301
  • 那天油挥,我揣著相機與錄音潦蝇,去河邊找鬼款熬。 笑死,一個胖子當(dāng)著我的面吹牛攘乒,可吹牛的內(nèi)容都是我干的贤牛。 我是一名探鬼主播,決...
    沈念sama閱讀 40,135評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼则酝,長吁一口氣:“原來是場噩夢啊……” “哼殉簸!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起沽讹,我...
    開封第一講書人閱讀 38,992評論 0 275
  • 序言:老撾萬榮一對情侶失蹤般卑,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后爽雄,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體蝠检,經(jīng)...
    沈念sama閱讀 45,429評論 1 314
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,636評論 3 334
  • 正文 我和宋清朗相戀三年挚瘟,在試婚紗的時候發(fā)現(xiàn)自己被綠了叹谁。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 39,785評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡乘盖,死狀恐怖焰檩,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情订框,我是刑警寧澤析苫,帶...
    沈念sama閱讀 35,492評論 5 345
  • 正文 年R本政府宣布,位于F島的核電站布蔗,受9級特大地震影響藤违,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜纵揍,卻給世界環(huán)境...
    茶點故事閱讀 41,092評論 3 328
  • 文/蒙蒙 一顿乒、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧泽谨,春花似錦璧榄、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,723評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至雄卷,卻和暖如春搓蚪,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背丁鹉。 一陣腳步聲響...
    開封第一講書人閱讀 32,858評論 1 269
  • 我被黑心中介騙來泰國打工妒潭, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留悴能,地道東北人。 一個月前我還...
    沈念sama閱讀 47,891評論 2 370
  • 正文 我出身青樓雳灾,卻偏偏與公主長得像漠酿,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子谎亩,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 44,713評論 2 354

推薦閱讀更多精彩內(nèi)容

  • 1炒嘲、運行環(huán)境 主機IP 主機名 2、配置主機名(分別在五臺機器上執(zhí)行) hostname +主機名例如: h...
    獻給記性不好的自己閱讀 3,553評論 0 6
  • HIVE是一個基于Hadoop的數(shù)據(jù)倉庫匈庭,適用于一些高延遲性的應(yīng)用夫凸。如果對延遲性要求比較高,則可以選擇Hbase嚎花。...
    夏無憂陽閱讀 5,043評論 0 12
  • 說明:不少讀者反饋寸痢,想使用開源組件搭建Hadoop平臺,然后再部署Kylin紊选,但是遇到各種問題。這里我為讀者部署一...
    大詩兄_zl閱讀 2,070評論 0 2
  • 親愛的你道逗,身體還好嗎兵罢? 怪我,怪我年輕的時候沒能投入更多時間鍛煉滓窍,底子差卖词,年紀(jì)大了毛病就多,腰酸背痛腿抽筋吏夯,耳聾眼...
    寧靜叮咚閱讀 159評論 0 1
  • 孩子此蜈,告訴阿姨你的名字好不好? 嗯我叫哲哲噪生。 嗯很好聽啊裆赵,誰給你起的名字啊跺嗽? 哲哲啊战授。
    親愛的龍貓316閱讀 154評論 0 0