cdh版本的hue安装配置部署以及集成hadoophbasehivemysql
等权威指南
我⽬前使⽤的是hue-3.7.0-cdh5.3.6
hue(HUE=Hadoop User Experience)
Hue是⼀个开源的Apache Hadoop UI系统,由Cloudera Desktop演化⽽来,最后Cloudera公司将其贡献给Apache基⾦会的Hadoop社区,它是基于Python Web框架Django实现的。
通过使⽤Hue我们可以在浏览器端的Web控制台上与Hadoop集进⾏交互来分析处理数据,例如操作HDFS上的数据,运⾏MapReduce Job,执⾏Hive的SQL语句,浏览HBase数据库等等。
hue特点:
能够⽀持各个版本的hadoop
hue默认数据库:sql lite
⽂件浏览器:对数据进⾏增删改查
hue下载src包进⾏⼀次编译,⼆次编译,在这⽤的是已经⼀次编译
hue部署:
1、下载依赖包:yum源安装
sudo yum -y install ant asciidoc cyrus-sasl-devel cyrus-sasl-gssapi gcc gcc-c++ krb5-devel libtidy libxml2-devel libxslt-devel mvn mysql mysql-devel openldap-devel python-devel sqlite-devel openssl-devel
sudo yum install ant asciidoc cyrus-sasl-devel cyrus-sasl-gssapi cyrus-sasl-plain gcc gcc-c++ krb5-devel libffi-devel libxml2-devel libxslt-devel make mysql mysql-devel openldap-devel python-devel sqlite-devel gmp-devel
2、解压hue tar包
tar -zxvf hue-3.7.0-cdh5.3. -C /指定的⽬录
3、⼆次编译
进⼊hue⽬录:执⾏make apps 会出现个build⽬录
错误:(centos 7会有)
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
给下⾯两个删掉:/usr/include/openssl/x509.h -》751、752⾏
X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev);
X509_REQ *X509_REQ_dup(X509_REQ *req);
##必须删掉,注释不⾏
4、进⼊到hue-3.7.0-cdh5.3.6/desktop/conf
配置hue.ini⽂件:
secret_key=jFE93j;2[290-eiw.KEiwN2s3['d;/.q[eIW^y#e=+Iei*@Mn<qW5o
http_ingge
http_port=8888
time_zone=Asia/Shanghai
5、启动hue
两种⽅式
1-->cd build/env/bin---》./supervisor
2-->build/env/bin/supervisor
6、浏览器访问hue
主机名+8888
创建⽤户名和密码
hue和hadoop的组件配置
1、hdfs的配置
在l中配置
<property>
<name>abled</name>
<value>true</value>
</property>
在l中配置
<property>
<name>hadoop.proxyuser.hue.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.ups</name> <value>*</value>
</property>
2、重新启动hdfs进程
sbin/start-yarn.sh
3、hue配置
[[hdfs_clusters]]
# HA support by using HttpFs
[[[default]]]
# Enter the filesystem uri
fs_defaultfs=hdfs://ingge:8020
# Default umask for file and directory creation, specified in an octal value.
## umask=022
# Directory of the Hadoop configuration
hadoop_conf_dir=/opt/modules/cdh/hadoop-2.5.0-cdh5.3.6/etc/hadoop [[yarn_clusters]]
[[[default]]]
# Enter the host on which you are running the ResourceManager
resourcemanager_ingge
# 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
eg:此配置都是伪分布式模式
4、启动hue服务
build/env/bin/supervisor
hue与hive配置
1、hive配置
在l配置
<property>
<name>hive.server2.thrift.bind.host</name>
<value&ingge</value>
</property>
<property>
<name&astore.uris</name>
<value&ingge:9083</value>
</property>
2、启动hive服务
bin/hiveserver2 &
bin/hive --service metastore &
3 、hue配置
修改hue.ini⽂件
[beeswax]
# Host where HiveServer2 is running.
# If Kerberos security is enabled, use fully-qualified domain name (FQDN).
hive_server_ingge
# Port where HiveServer2 Thrift server runs on.
hive_server_port=10000
# Hive configuration directory, l is located
hive_conf_dir=/opt/modules/cdh/hive-0.13.1-cdh5.3.6/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
hue与关系型数据库配置
[librdbms]
# The RDBMS app can have any number of databases configured in the databases
# section. A database is known by its section name
# (IE sqlite, mysql, psql, and oracle in the list below).
[[databases]]
# sqlite configuration.
[[[sqlite]]] //注意这⾥⼀定要取消注释
# Name to show in the UI.
nice_name=SQLite
# For SQLite, name defines the path to the database.
name=/opt/modules/hue-3.7.0-cdh5.3.6/desktop/desktop.db
# Database backend to use.
engine=sqlite
# mysql, oracle, or postgresql configuration.
##注意:这⾥的数据不能改动,默认是hue的数据库
[[[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=sqoop//这个name是数据库表名
# Database backend to use. This can be:
# 1. mysql
# 2. postgresql
# 3. oracle
engine=mysql
# IP or hostname of the database to connect to.
ingge
# 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=xningge
# Password matching the username to authenticate with when
# connecting to the database.
password=
hue与zookeeper配置
只需修改hue.ini⽂件
host_ingge:2181
启动zookeeper:
hue与oozie的配置
如果没有出来的:
修改:l
<property>
<name>oozie.service.WorkflowAppService.system.libpath</name>
<value>/user/oozie/share/lib</value>
</property>
到oozie⽬录下重新创建sharelib库:
bin/oozie-setup.sh sharelib create -fs hdfs://ingge:8020 -locallib oozie-sharelib-4.0.0-cdh5.3. 启动oozie:bin/oozied.sh start
hue与hbase的配置
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论