Hue集成Hadoop和Hive

一、环境准备

1、下载Hue:https://dl.dropboxusercontent.com/u/730827/hue/releases/3.12.0/hue-3.12.0.tgz

2、安装依赖

yum groupinstall -y "Development Tools" "Development Libraries"
yum install -y apache-maven ant asciidoc cyrus-sasl-devel cyrus-sasl-gssapi gcc gcc-c++ krb5-devel libxml2-devel libxslt-devel make mysql mysql-devel openldap-devel python-devel sqlite-devel gmp-devel libffi-devel

二、MySQL配置

1、    为root用户设置密码;
2、    配置远程登录
3、    创建hue数据库
4、    flush hosts
5、    flush privileges

三、解压、编译并安装

tar -zxvf hue-3.12.0.tgz -C /opt
cd /opt/ hue-3.12.0
make apps

四、集成环境配置

1、配置HDFS

vim /opt/hadoop-2.7.3/etc/hadoop/hdfs-site.xml

<property>
     <name>dfs.webhdfs.enabled</name>
     <value>true</value>
</property>

<property>
     <name>dfs.permissions.enabled</name>
     <value>false</value>
</property>

2、配置core-site.xml

vim /opt/hadoop-2.7.3/etc/hadoop/core-site.xml

<property>
     <name>hadoop.proxyuser.hue.hosts</name>
      <value>*</value>
</property>

<property>
      <name>hadoop.proxyuser.hue.groups</name>
      <value>*</value>
</property>

<property>
       <name>hadoop.proxyuser.root.hosts</name>
       <value>*</value> </property>

  <property>
       <name>hadoop.proxyuser.root.groups</name>
        <value>*</value>
 </property>

3、配置yarn-site.xml

vim /opt/hadoop-2.7.3/etc/hadoop/yarn-site.xml

<!--打开HDFS上日志记录功能-->
<property>
    <name>yarn.log-aggregation-enable</name>
    <value>true</value>
</property>

<!--在HDFS上聚合的日志最长保留多少秒。3天-->
<property>
     <name>yarn.log-aggregation.retain-seconds</name>
     <value>259200</value>
</property>

4、配置httpfs-site.xml

vim /opt/hadoop-2.7.3/etc/hadoop/httpfs-site.xml

<property>
    <name>httpfs.proxyuser.hue.hosts</name>
    <value>*</value>
</property>

<property>
    <name>httpfs.proxyuser.hue.groups</name>
    <value>*</value>
</property>

5、配置文件同步

将以上配置文件同步到其他Hadoop主机

添加hue用户及用户组

sudo useradd hue
sudo chmod -R 755 /opt/hue-3.12.0/
sudo chown -R hue:hue /opt/hue-3.12.0/

五、Hue的配置

vim  /opt/hue-3.8.1/desktop/conf/hue.ini

1、配置HDFS超级用户

 # This should be the hadoop cluster admin
  default_hdfs_superuser=xfvm

超级用户参见HDFS WEBUI

2、配置desktop

[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=xfvm04
  http_port=8888

  # Time zone name
  time_zone=Asia/Shanghai

3、配置HDFS

 [[hdfs_clusters]]
    # HA support by using HttpFs

    [[[default]]]
      # Enter the filesystem uri
      fs_defaultfs=hdfs://xfvm01: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://xfvm01:50070/webhdfs/v1

4、配置YARN

   [[[default]]]
      # Enter the host on which you are running the ResourceManager
      resourcemanager_host=xfvm01

      # The port where the ResourceManager IPC listens on
      resourcemanager_port=8132
      #参考yarn-site.xml中的yarn.resourcemanager.address.rm1
      # 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://xfvm01:8188
#参考yarn-site.xml中的yarn.resourcemanager.webapp.address.rm1
      # URL of the ProxyServer API
      proxy_api_url=http://xfvm01:8130
      #参考yarn-site.xml中的yarn.resourcemanager.scheduler.address.rm1
      #端口固定:8088
      # URL of the HistoryServer API
      #参考mapred-site.xml中的mapreduce.jobhistory.webapp.address
      history_server_api_url=http://xfvm03:19888

5、配置HIVE

[beeswax]

  # Host where HiveServer2 is running.
  # If Kerberos security is enabled, use fully-qualified domain name (FQDN).
  hive_server_host=xfvm04

  # Port where HiveServer2 Thrift server runs on.
  hive_server_port=10000 

6、配置zookeeper

[zookeeper]

  [[clusters]]

    [[[default]]]
      # Zookeeper ensemble. Comma separated list of Host/Port.
      # e.g. localhost:2181,localhost:2182,localhost:2183
      host_ports=xfvm02:2181,xfvm03:2181,xfvm04:2181

7、配置MySQL

 # mysql, oracle, or postgresql configuration.
    ## [[[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=xfvm04

      # 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 

8、配置禁用组件(还未安装的组件)

# Comma separated list of apps to not load at server startup.
  # e.g.: pig,zookeeper
  app_blacklist=pig,hbase,spark,impala,oozie

六、Hive环境变量的配置(hiveserver2,使用Mysql作为独立的元数据库)

1、编辑hive-site.xml

<property>
    <name>hive.metastore.uris</name>
    <value>thrift://192.168.10.24:9083</value>
    <description>Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore.</description>
  </property>

  <property>
    <name>hive.server2.thrift.bind.host</name>
    <value>192.168.10.24</value>
    <description>Bind host on which to run the HiveServer2 Thrift service.</description>
  </property>

七、MySQL初始化

进入hue安装目录的/bin目录

./hue syncdb
./hue migrate

八、启动顺序

1、启动Hive metastore

$ bin/hive --service metastore &

2、启动hiveserver2

$ bin/hive --service hiveserver2 &

3、启动Hue

$bin/supervisor

4、浏览器:http://xfvm04:8888,输入用户名和密码即可登录

时间: 2024-08-13 21:28:22

Hue集成Hadoop和Hive的相关文章

cdh版本的hue安装配置部署以及集成hadoop hbase hive mysql等权威指南

hue下载地址:https://github.com/cloudera/hue hue学习文档地址:http://archive.cloudera.com/cdh5/cdh/5/hue-3.7.0-cdh5.3.6/manual.html 我目前使用的是hue-3.7.0-cdh5.3.6 hue(HUE=Hadoop User Experience) Hue是一个开源的Apache Hadoop UI系统,由Cloudera Desktop演化而来,最后Cloudera公司将其贡献给Apach

【总结】HUE集成Sentry,通过HUE界面管理Sentry权限

将Sentry集成到HUE中能够有许多好处: 1.通过HUE界面,创建role 2.在HUE的Sentry管理界面,可以Grant privileges给用户 3.在Hue中创建与Sentry中role同名的group 4.将role赋予一个user 5.保证HUE用户,在所有节点上的group与HUE中的group相同 HUE集成Sentry操作 1.将登录HUE管理用户和权限的用户所属组添加到sentry-site.xml配置文件中 <property>   <name>sen

Centos 安装R 集成 Hadoop、RHive 配置安装手册

RHive 是一种通过HIVE高性能查询来扩展R计算能力的包.它可以在R环境中非常容易的调用HQL, 也允许在Hive中使用R的对象和函数.理论上数据处理量可以无限扩展的Hive平台,搭配上数据挖掘的利器R环境, 堪称是一个完美的大数据分析挖掘的工作环境. 资源包下载地址: http://pan.baidu.com/s/1ntwzeTb 安装 首先hadoop 以及hive 的安装这里就跳过了.这里主要介绍在Centos 中如何安装R 语言以及如何集成Rhive 到hadoop 中. 本次实验节

《Programming Hive》读书笔记(一)Hadoop和hive环境搭建

<Programming Hive>读书笔记(一)Hadoop和Hive环境搭建 先把基本的技术和工具学好,才能更高效地思考和工作. Chapter 1.Introduction 简介 Chapter 2.Getting Started 环境配置 Hadoop版本会更新,以官方安装教程为准 http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html#Standalone_O

在HDInsight中开始使用Hadoop与Hive来分析移动手机使用

在HDInsight中开始使用Hadoop与Hive来分析移动手机使用 为了能让你迅速上手使用HDInsight,本教程将向您介绍如何运行一个查询Hive提取的Hadoop集群,从非结构化数据的有意义的信息.然后,你将分析结果在Microsoft Excel中. 注意:如果你是新的Hadoop和大数据,你可以阅读更多有关条款的Apache Hadoop,MapReduce,HDFS和Hive.要了解HDInsight如何使Hadoop的在Azure中,看HDInsight Hadoop的介绍.

Linux系统运维之Hadoop、Hive、Flume数据处理

配置环境 主机名 IP 备注 Hadoop-Data01 192.168.0.194 Hadoop-Master/Hive/Mysql/Flume-Agent Hadoop-Data02 192.168.0.195 Hadoop-Slave 软件版本: CentOS release 6.6 (Final) Hdk-8u131-linux-x64 Hadoop-2.7.3 Hive-2.1.1 Apache-flume-1.7.0-bin 下载JDK.Hadoop.Hive.Flume: [[em

大数据 hadoop pig hive 关系

初接触hadoop技术的朋友肯定会对它体系下寄生的个个开源项目糊涂了,我敢保证Hive,Pig,HBase这些开源技术会把你搞的有些糊涂,不要紧糊涂的不止你一个,如某个菜鸟的帖子的疑问,when to use Hbase and when to use Hive?....请教了^_^没关系这里我帮大家理清每个技术的原理和思路. Pig 一种操作hadoop的轻量级脚本语言,最初又雅虎公司推出,不过现在正在走下坡路了.当初雅虎自己慢慢退出pig的维护之后将它开源贡献到开源社区由所有爱好者来维护.不

全网最详细的hive-site.xml配置文件里如何添加达到Hive与HBase的集成,即Hive通过这些参数去连接HBase(图文详解)

不多说,直接上干货! 一般,普通的情况是 <configuration> <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://master:3306/metastore?createDatabaseIfNotExist=true</value> </property> <property> <name>

hadoop、hive、hbase的理解

hadoop是一个分布式计算+分布式文件系统,前者其实就是MapReduce,后者是HDFS.后者可以独立运行,前者可以选择性使用,也可以不使用. hive是一个构建在Hadoop基础设施之上的数据仓库. hbase是一种Key/Value系统,它运行在HDFS之上,是一个分布式的.面向列的开源数据库. 特点: hive把数据文件加载进来作为一个hive表(或者外部表),它支持类似sql语句的功能,你可以通过该语句完成分布式环境下的计算功能,hive会把语句转换成MapReduce,然后交给ha