栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

【hive配置metastore远程模式】

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

【hive配置metastore远程模式】

hive配置metastore远程模式
    • 远程模式需要单独启动一个metastore服务 然后每个客户端都在配置文件里配置连接到该metastore服务
    • 远程模式下metastore服务和hive运行在不同的进程中
    • 远程模式下需要指定本地模式为false并且配置hive.metastore.uris参数来指定metastore服务运行的ip和端口
    • 并且需要手动启动metastore服务

远程模式需要单独启动一个metastore服务 然后每个客户端都在配置文件里配置连接到该metastore服务 远程模式下metastore服务和hive运行在不同的进程中 远程模式下需要指定本地模式为false并且配置hive.metastore.uris参数来指定metastore服务运行的ip和端口 并且需要手动启动metastore服务

前提准备:

01选择某台机器提前安装mysql,确保hive集群服务器可以连通

02启动hadoop集群 集群正常健康

操作步骤:

01修改hive配置文件

vim conf/hive-env.sh

export HADOOP_HOME=/export/servers/hadoop-2.6.0-cdh5.14.0

02修改hive-site.xml

服务端主要配置:


 

  hive.metastore.warehouse.dir 
  /user/hive/warehouse

 

  javax.jdo.option.ConnectionURL
  jdbc:mysql://xxx.xxx.xxx.xxx:3306/hive_remote?createDatabaseIfNotExist=true

 

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

 

  javax.jdo.option.ConnectionUserName
  root

 

  javax.jdo.option.ConnectionPassword
  false

 

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

 

启动方式:

nohup /export/servers/hive/bin/hive --service metastore &

nohup /export/servers/hive/bin/hive --service hiveserver2 &
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/678056.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号