热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

HUE配置文件hue.ini的hive和beeswax模块详解(图文详解)(分HA集群和非HA集群)...

不多说,直接上干货!我的集群机器情况是bigdatamaster(192.168.80.10)、bigdataslave1&

 

 

不多说,直接上干货!

 

 

  我的集群机器情况是 bigdatamaster(192.168.80.10)、bigdataslave1(192.168.80.11)和bigdataslave2(192.168.80.12)

  然后,安装目录是在/home/hadoop/app下。

 

  官方建议在master机器上安装Hue,我这里也不例外。安装在bigdatamaster机器上。

 

 Hue版本:hue-3.9.0-cdh5.5.4

需要编译才能使用(联网)


 说给大家的话:大家电脑的配置好的话,一定要安装cloudera manager。毕竟是一家人的。
同时,我也亲身经历过,会有部分组件版本出现问题安装起来要个大半天时间去排除,做好心里准备。废话不多说,因为我目前读研,自己笔记本电脑最大8G,只能玩手动来练手。
纯粹是为了给身边没高配且条件有限的学生党看的! 但我已经在实验室机器群里搭建好cloudera manager 以及 ambari都有。
大数据领域两大最主流集群管理工具Ambari和Cloudera Manger Cloudera安装搭建部署大数据集群(图文分五大步详解)(博主强烈推荐) Ambari安装搭建部署大数据集群(图文分五大步详解)(博主强烈推荐)

 

 

 

 

 

 

 

  首先,在这里,先给大家普及知识。

对于hive的安装是有3种方式的:

1.本地derby

2.本地mysql (比如master、slave1、slave2集群。hive一般我是安装在master上)(也叫作hive单用户模式)

  当然,你也来个master、slave1、slave2集群,外加client专门来安装hive、sqoop、azkaban这样的。

  或者,你也来个master、slave1、slave2、slave3、slave4集群,hive一般我也是安装在master上。

3..远端mysql (在主从上配)(也叫作hive多用户模式)

  (比如master、slave1、slave2集群。hive一般我是安装在master和slave1上)

  或者,你也来个master、slave1、slave2、slave3、slave4集群,hive一般我也是安装在master和slave1上。

Hadoop Hive概念学习系列之hive三种方式区别和搭建、HiveServer2环境搭建、HWI环境搭建和beeline环境搭建(五)

 

 

 

 

https://www.cloudera.com/documentation/enterprise/latest/topics/cdh_ig_hue_config.html#concept_ezg_b2s_hl

 

 

 

 

 

    首先,来看看官网提供的参考步骤

 

http://archive.cloudera.com/cdh5/cdh/5/hue-3.9.0-cdh5.5.0/manual.html

 

 

 

 

 

 

 

 

 

 

一、以下是默认的配置文件

 

###########################################################################
# Settings to configure Beeswax with Hive
###########################################################################[beeswax]# Host
where HiveServer2 is running.# If Kerberos security is enabled, use fully-qualified domain name (FQDN).## hive_server_host=localhost# Port where HiveServer2 Thrift server runs on.## hive_server_port=10000# Hive configuration directory, where hive-site.xml is located## hive_conf_dir=/etc/hive/conf# Timeout in seconds for thrift calls to Hive service## server_conn_timeout=120# Choose whether to use the old GetLog() thrift call from before Hive 0.14 to retrieve the logs.# If false, use the FetchResults() thrift call from Hive 1.0 or more instead.## use_get_log_api=false# 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.# New column format is from version 7.## thrift_version=7

 

 

 

 

 

 

二、以下是跟我机器集群匹配的配置文件(非HA集群下怎么配置Hue的hive和beeswax模块)(本地mysql模式)

三、以下是跟我机器集群匹配的配置文件(非HA集群下怎么配置Hue的hive和beeswax模块)(本地mysql模式)

  都是如下哈。因为hive说白了,是可以安装在集群之外,它就是一个客户端。

 

 

  其实啊,目前Hue里的beeswax 和 hive模块是一起的。为什么叫[beeswax]而不是[hive]这是历史原因!!!

 

 

 

 

   

  同时,是还要将hive-default.xml.template里的hive.server2.thrift.port默认属性 和 hive.server2.thrift.bind.host默认属性,

拷贝到hive-site.xml里进行修改。

hive.server2.thrift.port10000hive.server2.thrift.bind.hostbigdatamaster

 

 

 

 

 

###########################################################################
# Settings to configure Beeswax with Hive
###########################################################################[beeswax]# Host
where HiveServer2 is running.# If Kerberos security is enabled, use fully-qualified domain name (FQDN).hive_server_host=bigdatamaster# Port where HiveServer2 Thrift server runs on.hive_server_port=10000# Hive configuration directory, where hive-site.xml is locatedhive_conf_dir=/home/hadoop/app/hive/conf# Timeout in seconds for thrift calls to Hive service## server_conn_timeout=120# Choose whether to use the old GetLog() thrift call from before Hive 0.14 to retrieve the logs.# If false, use the FetchResults() thrift call from Hive 1.0 or more instead.## use_get_log_api=false# 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# The maximum number of partitions that will be included in the SELECT * LIMIT sample query for partitioned tables.## sample_table_max_partitions=10# 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.# New column format is from version 7.## thrift_version=7

 

 

 

 

   因为,Hue底层通过HiveServer2中JDBC/ODBC方式连接HIve,进行数据分析查询,需要先启动Hive中的HiveServer2服务。

 

   所以,启动hive(在bigdatamaster节点)

$HIVE_HOME/bin/hive --service hiveserver2


或者


$HIVE_HOME/bin/hiveserver2

 

 

 

   得到

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

   其他,不多赘述,大家自己去看自己机器!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

四、以下是跟我机器集群匹配的配置文件(非HA集群下怎么配置Hue的hive和beeswax模块)(远端mysql模式)

五、以下是跟我机器集群匹配的配置文件(非HA集群下怎么配置Hue的hive和beeswax模块)(远端mysql模式)

  都是如下哈。因为hive说白了,是可以安装在集群之外,它就是一个客户端。

 

 

 

 

  其实啊,目前Hue里的beeswax 和 hive模块是一起的。

 

 

 

 

 

 

   比如,我这里是master、slave1和slave2组成的集群,在master和slave1上搭建的是hive的Remote模式。

 

 

 

 

看hive的官方文档

http://hive.apache.org/

 

 

 

 

 

 

 

 

   master机器上

将hive-site.xml配置文件拆为如下两部分
1)、服务端配置文件(比如在master)
"1.0"?>
"text/xsl" href="configuration.xsl"?>
hive.metastore.warehouse.dir
/user/hive/warehouse

javax.jdo.option.ConnectionURL
jdbc:mysql://192.168.80.10:3306/hive?createDatabaseIfNotExist=true

javax.jdo.option.ConnectionDriverName
com.mysql.jdbc.Driver

javax.jdo.option.ConnectionUserName
root

javax.jdo.option.ConnectionPassword
123456

 

 

 

 

 

  slave1机器上

"1.0"?>
"text/xsl" href="configuration.xsl"?>
hive.metastore.warehouse.dir
/user/hive/warehouse

hive.metastore.local
false

hive.metastore.uris
thrift://192.168.80.11:9083

  注意,在客户端slave1,有个属性,hive.metastore.local为false。

 

 

 

  在master节点上启动hive服务端程序
hive --service metastore

或者

hive  --servie metastore -9083

 

 

 

 

  注意啦,是还要将hive-default.xml.template里的hive.metastore.uris默认属性,

拷贝到hive-site.xml里进行修改。

  hive.metastore.uris  (在slave1机器上)


hive.metastore.uris
thrift://192.168.80.11:9083

 

 

 

 

 

###########################################################################
# Settings to configure Beeswax with Hive
###########################################################################[beeswax]# Host
where HiveServer2 is running.# If Kerberos security is enabled, use fully-qualified domain name (FQDN).hive_server_host=bigdatamaster# Port where HiveServer2 Thrift server runs on.hive_server_port=10000# Hive configuration directory, where hive-site.xml is locatedhive_conf_dir=/home/hadoop/app/hive/conf# Timeout in seconds for thrift calls to Hive service## server_conn_timeout=120# Choose whether to use the old GetLog() thrift call from before Hive 0.14 to retrieve the logs.# If false, use the FetchResults() thrift call from Hive 1.0 or more instead.## use_get_log_api=false# 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# The maximum number of partitions that will be included in the SELECT * LIMIT sample query for partitioned tables.## sample_table_max_partitions=10# 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.# New column format is from version 7.## thrift_version=7

 

 

   最后的界面

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  以下是跟我机器集群匹配的配置文件(HA集群下怎么配置Hue的hive和beeswax模块)(本地和远端mysql模式)

 

    如下:

 

[beeswax]# Host where HiveServer2 is running.# If Kerberos security is enabled, use fully-qualified domain name (FQDN).hive_server_host=bigdata-pro01.kfk.com# Port where HiveServer2 Thrift server runs on.hive_server_port=10000# Hive configuration directory, where hive-site.xml is locatedhive_conf_dir=/opt/modules/hive-0.13.1-cdh5.3.0/conf# Timeout in seconds for thrift calls to Hive service## server_conn_timeout=120# Choose whether to use the old GetLog() thrift call from before Hive 0.14 to retrieve the logs.# If false, use the FetchResults() thrift call from Hive 1.0 or more instead.## use_get_log_api=false# 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.# New column format is from version 7.## thrift_version=7

 

 

 

 

  先启动hivesever2

[kfk@bigdata-pro01 hive-0.13.1-cdh5.3.0]$ pwd
/opt/modules/hive-0.13.1-cdh5.3.0
[kfk@bigdata
-pro01 hive-0.13.1-cdh5.3.0]$ bin/hiveserver2
Starting HiveServer2
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding
in [jar:file:/opt/modules/hadoop-2.6.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding
in [jar:file:/opt/modules/hbase-0.98.6-cdh5.3.0/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http:
//www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

 

 

 

 

     停掉hue,再启动hue

^C[kfk@bigdata-pro01 hue-3.9.0-cdh5.5.0]$ ./build/env/bin/supervisor
[INFO] Not running
as root, skipping privilege drop
starting server with options:
{
'daemonize': False,'host': 'bigdata-pro01.kfk.com','pidfile': None,'port': 8888,'server_group': 'hue','server_name': 'localhost','server_user': 'hue','ssl_certificate': None,'ssl_cipher_list': 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA','ssl_private_key': None,'threads': 40,'workdir': None}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  成功!

 

 

 

 

 

欢迎大家,加入我的微信公众号:大数据躺过的坑        人工智能躺过的坑
 

同时,大家可以关注我的个人博客:

   http://www.cnblogs.com/zlslch/   和     http://www.cnblogs.com/lchzls/      http://www.cnblogs.com/sunnyDream/   

   详情请见:http://www.cnblogs.com/zlslch/p/7473861.html

 

  人生苦短,我愿分享。本公众号将秉持活到老学到老学习无休止的交流分享开源精神,汇聚于互联网和个人学习工作的精华干货知识,一切来于互联网,反馈回互联网。
  目前研究领域:大数据、机器学习、深度学习、人工智能、数据挖掘、数据分析。 语言涉及:Java、Scala、Python、Shell、Linux等 。同时还涉及平常所使用的手机、电脑和互联网上的使用技巧、问题和实用软件。 只要你一直关注和呆在群里,每天必须有收获

 

      对应本平台的讨论和答疑QQ群:大数据和人工智能躺过的坑(总群)(161156071) 

 

 

 

 

 

 

 

 

 

 

 

 

 



推荐阅读
  • CEPH LIO iSCSI Gateway及其使用参考文档
    本文介绍了CEPH LIO iSCSI Gateway以及使用该网关的参考文档,包括Ceph Block Device、CEPH ISCSI GATEWAY、USING AN ISCSI GATEWAY等。同时提供了多个参考链接,详细介绍了CEPH LIO iSCSI Gateway的配置和使用方法。 ... [详细]
  • 本文介绍了一个适用于PHP应用快速接入TRX和TRC20数字资产的开发包,该开发包支持使用自有Tron区块链节点的应用场景,也支持基于Tron官方公共API服务的轻量级部署场景。提供的功能包括生成地址、验证地址、查询余额、交易转账、查询最新区块和查询交易信息等。详细信息可参考tron-php的Github地址:https://github.com/Fenguoz/tron-php。 ... [详细]
  • 微软头条实习生分享深度学习自学指南
    本文介绍了一位微软头条实习生自学深度学习的经验分享,包括学习资源推荐、重要基础知识的学习要点等。作者强调了学好Python和数学基础的重要性,并提供了一些建议。 ... [详细]
  • EPICS Archiver Appliance存储waveform记录的尝试及资源需求分析
    本文介绍了EPICS Archiver Appliance存储waveform记录的尝试过程,并分析了其所需的资源容量。通过解决错误提示和调整内存大小,成功存储了波形数据。然后,讨论了储存环逐束团信号的意义,以及通过记录多圈的束团信号进行参数分析的可能性。波形数据的存储需求巨大,每天需要近250G,一年需要90T。然而,储存环逐束团信号具有重要意义,可以揭示出每个束团的纵向振荡频率和模式。 ... [详细]
  • 这是原文链接:sendingformdata许多情况下,我们使用表单发送数据到服务器。服务器处理数据并返回响应给用户。这看起来很简单,但是 ... [详细]
  • 本文介绍了数据库的存储结构及其重要性,强调了关系数据库范例中将逻辑存储与物理存储分开的必要性。通过逻辑结构和物理结构的分离,可以实现对物理存储的重新组织和数据库的迁移,而应用程序不会察觉到任何更改。文章还展示了Oracle数据库的逻辑结构和物理结构,并介绍了表空间的概念和作用。 ... [详细]
  • Windows下配置PHP5.6的方法及注意事项
    本文介绍了在Windows系统下配置PHP5.6的步骤及注意事项,包括下载PHP5.6、解压并配置IIS、添加模块映射、测试等。同时提供了一些常见问题的解决方法,如下载缺失的msvcr110.dll文件等。通过本文的指导,读者可以轻松地在Windows系统下配置PHP5.6,并解决一些常见的配置问题。 ... [详细]
  • 本文主要解析了Open judge C16H问题中涉及到的Magical Balls的快速幂和逆元算法,并给出了问题的解析和解决方法。详细介绍了问题的背景和规则,并给出了相应的算法解析和实现步骤。通过本文的解析,读者可以更好地理解和解决Open judge C16H问题中的Magical Balls部分。 ... [详细]
  • 知识图谱——机器大脑中的知识库
    本文介绍了知识图谱在机器大脑中的应用,以及搜索引擎在知识图谱方面的发展。以谷歌知识图谱为例,说明了知识图谱的智能化特点。通过搜索引擎用户可以获取更加智能化的答案,如搜索关键词"Marie Curie",会得到居里夫人的详细信息以及与之相关的历史人物。知识图谱的出现引起了搜索引擎行业的变革,不仅美国的微软必应,中国的百度、搜狗等搜索引擎公司也纷纷推出了自己的知识图谱。 ... [详细]
  • http:my.oschina.netleejun2005blog136820刚看到群里又有同学在说HTTP协议下的Get请求参数长度是有大小限制的,最大不能超过XX ... [详细]
  • 在重复造轮子的情况下用ProxyServlet反向代理来减少工作量
    像不少公司内部不同团队都会自己研发自己工具产品,当各个产品逐渐成熟,到达了一定的发展瓶颈,同时每个产品都有着自己的入口,用户 ... [详细]
  • 预备知识可参考我整理的博客Windows编程之线程:https:www.cnblogs.comZhuSenlinp16662075.htmlWindows编程之线程同步:https ... [详细]
  • Windows7 64位系统安装PLSQL Developer的步骤和注意事项
    本文介绍了在Windows7 64位系统上安装PLSQL Developer的步骤和注意事项。首先下载并安装PLSQL Developer,注意不要安装在默认目录下。然后下载Windows 32位的oracle instant client,并解压到指定路径。最后,按照自己的喜好对解压后的文件进行命名和压缩。 ... [详细]
  • 解决nginx启动报错epoll_wait() reported that client prematurely closed connection的方法
    本文介绍了解决nginx启动报错epoll_wait() reported that client prematurely closed connection的方法,包括检查location配置是否正确、pass_proxy是否需要加“/”等。同时,还介绍了修改nginx的error.log日志级别为debug,以便查看详细日志信息。 ... [详细]
  • centos安装Mysql的方法及步骤详解
    本文介绍了centos安装Mysql的两种方式:rpm方式和绿色方式安装,详细介绍了安装所需的软件包以及安装过程中的注意事项,包括检查是否安装成功的方法。通过本文,读者可以了解到在centos系统上如何正确安装Mysql。 ... [详细]
author-avatar
猥琐的爆米花
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有