大数据平台搭建 - cdh5.11.1 - hue安装及集成其他组件
一、简介
hue是一个开源的apache hadoop ui系统,由cloudear desktop演化而来,最后cloudera公司将其贡献给了apache基金会的hadoop社区,它基于python框架django实现的。
通过使用hue,我们可以使用可视化的界面在web浏览器上与hadoop集群交互来分析处理数据,例如操作hdfs上的数据,运行MapReduce Job,查看HBase中的数据
二、安装
(1)下载
http://archive.cloudera.com/cdh5/cdh/5/
从这里下载cdh5.11.1的最新版本的hue,3.9.0版本,到本地,并上传到服务器,解压缩到app目录下
(2)必要的组件准备
需要先安装好mysql数据库
需要安装好下面的组件
(3)编译
到hue的根目录下,运行
make apps
三、配置
(1)hue基本配置
打开desktop/conf/hue.ini文件
[desktop] # Set this to a random string, the longer the better.
# This is used for secure hashing in the session store.
secret_key=jFE93j;2[290-eiw.KEiwN2s3['d;/.q[eIW^y#e=+Iei*@Mn<qW5o # Webserver listens on this address and port
http_host=hadoop001
http_port=8888 # Time zone name
time_zone=Asia/Shanghai # Enable or disable Django debug mode.
django_debug_mode=false # Enable or disable backtrace for server error
http_500_debug_mode=false # Enable or disable memory profiling.
## memory_profiler=false # Server email for internal error messages
## django_server_email='hue@localhost.localdomain' # Email backend
## django_email_backend=django.core.mail.backends.smtp.EmailBackend # Webserver runs as this user
server_user=hue
server_group=hue # This should be the Hue admin and proxy user
## default_user=hue # This should be the hadoop cluster admin
#default_hdfs_superuser=hadoop
(2)配置hue集成hadoop
首先hadoop里设置代理用户,需要配置hadoop的core-site.xml
<property>
<name>hadoop.proxyuser.hue.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.hue.groups</name>
<value>*</value>
</property>
加入这两个属性即可。
然后重启hadoop集群
sbin/stop-dfs.sh
sbin/stop-yarn.sh
sbin/start-dfs.sh
sbin/start-yarn.sh
[hadoop] # Configuration for HDFS NameNode
# ------------------------------------------------------------------------
[[hdfs_clusters]]
# HA support by using HttpFs [[[default]]]
# Enter the filesystem uri
fs_defaultfs=hdfs://hadoop001:8020 # 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://hadoop001: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=/home/hadoop/app/hadoop/etc/hadoop # Configuration for YARN (MR2)
# ------------------------------------------------------------------------
[[yarn_clusters]] [[[default]]]
# Enter the host on which you are running the ResourceManager
resourcemanager_host=hadoop002 # 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://hadoop002:8088 # URL of the ProxyServer API
proxy_api_url=http://hadoop002:8088 # URL of the HistoryServer API
history_server_api_url=http://hadoop002: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 # Configuration for MapReduce (MR1)
(3)配置hue集成hive
[beeswax] # Host where HiveServer2 is running.
# If Kerberos security is enabled, use fully-qualified domain name (FQDN).
hive_server_host=hadoop001 # Port where HiveServer2 Thrift server runs on.
hive_server_port=10000 # Hive configuration directory, where hive-site.xml is located
hive_conf_dir=/home/hadoop/app/hive/conf # Timeout in seconds for thrift calls to Hive service
server_conn_timeout=120
(4)配置hue集成hbase
###########################################################################
# Settings to configure HBase Browser
########################################################################### [hbase]
# Comma-separated list of HBase Thrift servers for clusters in the format of '(name|host:port)'.
# Use full hostname with security.
# If using Kerberos we assume GSSAPI SASL, not PLAIN.
hbase_clusters=(Cluster|hadoop004:9090) # HBase configuration directory, where hbase-site.xml is located.
hbase_conf_dir=/home/hadoop/app/hbase/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
(5)配置hue集成oozie
###########################################################################
# Settings to configure liboozie
########################################################################### [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://hadoop004: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/hue/oozie/deployments
(6)配置hue使用mysql数据库
先配置一个mysql数据库
[[database]]
# Database engine is typically one of:
# postgresql_psycopg2, mysql, sqlite3 or oracle.
#
# Note that for sqlite3, 'name', below is a path to the filename. For other backends, it is the database name
# Note for Oracle, options={"threaded":true} must be set in order to avoid crashes.
# Note for Oracle, you can use the Oracle Service Name by setting "host=" and "port=" and then "name=<host>:<port>/<service_name>".
# Note for MariaDB use the 'mysql' engine.
engine=mysql
host=hadoop004
port=3306
user=root
password=123456
name=hue
# conn_max_age option to make database connection persistent value in seconds
# https://docs.djangoproject.com/en/1.9/ref/databases/#persistent-connections
## conn_max_age=0
# Execute this script to produce the database password. This will be used when 'password' is not set.
## password_script=/path/script
## name=desktop/desktop.db
## options={}
# Database schema, to be used only when public schema is revoked in postgres
## schema=public
然后去mysql中,建立一个数据库,就是上面的配置文件中配置的数据库oozie
create database hue default character set utf8 default collate utf8_general_ci;
接着,进入hue的build/env/bin目录下,运行:
PREFERRED_STORAGE_ENGINE We recommend MySQL InnoDB engine over MyISAM which does not support transactions.
那么运行下面的语句即可批量调整:
mysql -u root -proot -e \
"SELECT CONCAT('ALTER TABLE ',table_schema,'.',table_name,' engine=InnoDB;') \
FROM information_schema.tables \
WHERE engine = 'MyISAM' AND table_schema = 'hue';" \
| grep "ALTER TABLE hue" > /tmp/set_engine_innodb.ddl mysql -u root -proot < /tmp/set_engine_innodb.ddl
(注意空格上面是一句,空格下面是一句,分两次执行)
(7)启动hue
先启动hive的metastore服务,和hiveserver2服务
(6)访问hue
http://hadoop004:8888
四、可能会遇到的问题
Failed to contact an active Resource Manager: YARN RM returned a failed response: { "RemoteException" : { "message" : "User: hue is not allowed to impersonate admin", "exception" : "AuthorizationException", "javaClassName" : "org.apache.hadoop.security.authorize.AuthorizationException" } } (error 403)
这个问题是hadoop的core-site.xml配置的代理的用户和hue配置文件的用户不一致造成的。
比如,hadoop的core-site.xml是这样配置的
<property>
<name>hadoop.proxyuser.hue.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.hue.groups</name>
<value>*</value>
</property>
代理用户是hue。
而hue里面是这样配置的:
# Webserver runs as this user
#server_user=hue
#server_group=hue
需要把server_user和server_group设置成hue,即可
大数据平台搭建 - cdh5.11.1 - hue安装及集成其他组件的更多相关文章
- 大数据平台搭建 - cdh5.11.1 - oozie安装
一.简介 oozie是hadoop平台开源的工作流调度引擎,用来管理hadoop作业,属于web应用程序,由oozie server 和oozie client构成. oozie server运行与t ...
- 大数据平台搭建 - cdh5.11.1 - hadoop集群安装
一.前言 由于线下测试的需要,需要在公司线下(测试)环境搭建大数据集群. 那么CDH是什么? hadoop是一个开源项目,所以很多公司再这个基础上进行商业化,不收费的hadoop版本主要有三个,分别是 ...
- 大数据平台搭建 - cdh5.11.1 - hbase集群搭建
一.简介 HBase是一种构建在HDFS之上的分布式.面向列的存储系统.在需要实时读写.随机访问超大规模数据集时,可以使用HBase. 尽管已经有许多数据存储和访问的策略和实现方法,但事实上大多数解决 ...
- 大数据平台搭建 - cdh5.11.1 - spark源码编译及集群搭建
一.spark简介 Apache Spark 是专为大规模数据处理而设计的快速通用的计算引擎,Spark 是一种与 hadoop 相似的开源集群计算环境,但是两者之间还存在一些不同之处,这些有用的不同 ...
- 大数据平台搭建 - cdh5.11.1 - hive客户端安装
一.简介 hive是基于hadoop的一种数据仓库工具,可以将结构化的文件映射成为数据库的一张表,并提供简单sql查询功能,底层实现是转化为MapReduce任务计算. 二.安装 (1)下载 从cdh ...
- 大数据平台搭建(hadoop+spark)
大数据平台搭建(hadoop+spark) 一.基本信息 1. 服务器基本信息 主机名 ip地址 安装服务 spark-master 172.16.200.81 jdk.hadoop.spark.sc ...
- product of大数据平台搭建------CM 和CDH安装
一.安装说明 CM是由cloudera公司提供的大数据组件自动部署和监控管理工具,相应的和CDH是cloudera公司在开源的hadoop社区版的基础上做了商业化的封装的大数据平台. 采用离线安装模式 ...
- CDH 大数据平台搭建
一.概述 Cloudera版本(Cloudera’s Distribution Including Apache Hadoop,简称“CDH”),基于Web的用户界面,支持大多数Hadoop组件,包括 ...
- HDP 大数据平台搭建
一.概述 Apache Ambari是一个基于Web的支持Apache Hadoop集群的供应.管理和监控的开源工具,Ambari已支持大多数Hadoop组件,包括HDFS.MapReduce.Hiv ...
随机推荐
- T-SQL基础语句
存储过程允许标准组件式编程(模块化设计) 存储过程能够实现快速的执行速度 存储过程能够减少网络流量 存储过程可被作为一种安全机制充分利用 在SQL Server 的系列版本中存储过程分为两类:系统提供 ...
- iOS 11 变化
首先我是开发者,更关心对技术的影响,我又需要关注.学习哪些技术,猫神的文章:http://www.cocoachina.com/ios/20170607/19457.html 介绍了 ******** ...
- MySQL数据库的安装和配置
MySQL数据库介绍 什么是数据库DB? DB的全称是database,即数据库的意思.数据库实际上就是一个文件集合,是一个存储数据的仓库,数据库是按照特定的格式把数据存储起来,用户可以对存储的数据进 ...
- 良许Linux | Linux学习方法及学习资料汇总
很多人想学习Linux,却不知道怎么着手,甚至不知道Linux有哪些方向,非常迷茫.基于此,我特地写了篇文章介绍Linux方向性问题,没想到一不小心成了爆款: 到什么程度才叫精通 Linux? 看完 ...
- Liunx学习总结(二)--目录和文件管理
之前我们了解了什么是 liunx ,并且认识了它的目录结构,今天我们就来学习下如何进行目录和文件的管理. 创建目录 语法: mkdir [-mp] 目录名称 选项与参数 -m :配置文件的权限喔!直接 ...
- 《Java 编写基于 Netty 的 RPC 框架》
一 简单概念 RPC: ( Remote Procedure Call),远程调用过程,是通过网络调用远程计算机的进程中某个方法,从而获取到想要的数据,过程如同调用本地的方法一样. 阻塞IO :当阻塞 ...
- Leetcode之二分法专题-441. 排列硬币(Arranging Coins)
Leetcode之二分法专题-441. 排列硬币(Arranging Coins) 你总共有 n 枚硬币,你需要将它们摆成一个阶梯形状,第 k 行就必须正好有 k 枚硬币. 给定一个数字 n,找出可形 ...
- 【Leetcode】【简单】【17. 整数反转】【JavaScript】
题目描述 7. 整数反转 给出一个 32 位的有符号整数,你需要将这个整数中每位上的数字进行反转. 示例 1: 输入: 123输出: 321 示例 2: 输入: -123输出: -321示例 3: 输 ...
- wait()、notify()方法原理,以及使用注意事项
wait.notify原理 在前面以经说到对象锁的本质,实际上是对象头的一个监视器锁的数据结构.这个结构如下: (图片来源于网络) 几个线程一起竞争对象的锁(enter),只有一个能成功(acquir ...
- Linux Centos虚拟机扩容(/dev/mapper/centos-root)
1:.首先查看我们的根分区大小是多少 df -h 文件系统 类型 容量 已用 可用 已用% 挂载点 /dev/mapper/centos-root xfs 18G 1.1G 17G 6% / devt ...