9.Hive Metastore Administration
前言
本节讲metastore相关的知识.
hive所有的元数据都是通过matestore管理的.hive cli/hiveserver2包含了内置的metastore.
metastore参数
metastore的基本参数
K
V
说明
javax.jdo.option.ConnectionURL
jdbc连接字符串
javax.jdo.option.ConnectionDriverName
jdbc驱动类名
当使用mysql时:com.mysql.jdbc.Driver
javax.jdo.option.ConnectionUserName
数据库连接用户名
javax.jdo.option.ConnectionPassword
数据库连接密码
metastore的额外参数
Configuration Parameter
Description
Default Value
org.jpox.autoCreateSchema
如果hive启动时没有相应的元数据Schecma,则创建相关的库\表等,安装之后装该参数设置为false.只在初始化时使用.一般不用这个功能都手动创建hive元数据
datanucleus.autoStartMechanism
Whether to initialize on startup.
hive.metastore.server.min.threads
Thrift server's pool最小连接数
200
hive.metastore.server.max.threads
Thrift server's pool最大连接数
100000 since Hive 0.8.1
hive.metastore.filter.hook
Metastore hook class for further filtering the metadata read results on client side.(Hive 1.1.0 and later.)
org.apache.hadoop.hive.metastore.DefaultMetaStoreFilterHookImpl
hive.metastore.port
Hive metastore listener port.(Hive 1.3.0 and later.)
9083
客户端参数
| K | V | 说明 |
|---|---|---|
| javax.jdo.option.ConnectionURL | jdbc连接字符串 | |
| javax.jdo.option.ConnectionDriverName | jdbc驱动类名 | 当使用mysql时:com.mysql.jdbc.Driver |
| javax.jdo.option.ConnectionUserName | 数据库连接用户名 | |
| javax.jdo.option.ConnectionPassword | 数据库连接密码 |
| Configuration Parameter | Description | Default Value |
|---|---|---|
| org.jpox.autoCreateSchema | 如果hive启动时没有相应的元数据Schecma,则创建相关的库\表等,安装之后装该参数设置为false.只在初始化时使用.一般不用这个功能都手动创建hive元数据 | |
| datanucleus.autoStartMechanism | Whether to initialize on startup. | |
| hive.metastore.server.min.threads | Thrift server's pool最小连接数 | 200 |
| hive.metastore.server.max.threads | Thrift server's pool最大连接数 | 100000 since Hive 0.8.1 |
| hive.metastore.filter.hook | Metastore hook class for further filtering the metadata read results on client side.(Hive 1.1.0 and later.) | org.apache.hadoop.hive.metastore.DefaultMetaStoreFilterHookImpl |
| hive.metastore.port | Hive metastore listener port.(Hive 1.3.0 and later.) | 9083 |
一切要使用metastore服务的客户端| K|V|说明|
| K | V | 说明 |
|---|---|---|
| hive.metastore.uris | metastore服务器地址,用于客户端连接 | 可以配置多个 |
| hive.metastore.warehouse.dir | hive仓库在hdfs上的位置.这个应该不需要配置的 |
mestastore是没有状态的,因此可以启动多个metastore作为ha. client默认会选择hive.metastore.uris中的第一个,但第一个连接不上的话,则随机从列表中选一个.
使用zk自动发现mestastore
从hive4.0.0开始可以像hiveserver2一样通过zookeeper自动发现metastore实现ha.
| Config Param | Config Value | Comment |
|---|---|---|
| hive.metastore.service.discovery.mode | 默认不配置,可以是zookeeper | 当设置为zookeeper时,metastore在启动实现会在zk中注册自己,在关闭时从zk取注销. server和client配置要相同 |
| hive.metastore.uris | zookeepr_host_name:port, host_name:port, ... | 上面为zookeeper时,zookeepr集群地址.server和client配置要相同 |
| hive.metastore.zookeeper.client.port | port | 上面要是设置了port这个就可以忽略.zookeeper服务器端口.server和client配置要相同 |
| hive.metastore.zookeeper.namespace | namespace name | zookeeper中metastore的根目录 |
| hive.metastore.zookeeper.session.timeout | 单位毫秒 | ZooKeeper client's session timeout. 心跳超过这个时间客户端与zk的连接断开 |
| hive.metastore.zookeeper.connection.timeout | 单位秒 | ZooKeeper client's connection timeout in seconds. Connection timeout * hive.metastore.zookeeper.connection.max.retries with exponential backoff is when curator client deems connection is lost to zookeeper. |
| hive.metastore.zookeeper.connection.max.retries | 连接zk的重试次数 | |
| hive.metastore.zookeeper.connection.basesleeptime | 单位毫秒 | Initial amount of time (in milliseconds) to wait between retries when connecting to the ZooKeeper server when using ExponentialBackoffRetry policy. |
启动hive metastore服务
hive --service metastore [-p 9083]
9.Hive Metastore Administration的更多相关文章
- 【原创】大叔经验分享(24)hive metastore的几种部署方式
hive及其他组件(比如spark.impala等)都会依赖hive metastore,依赖的配置文件位于hive-site.xml hive metastore重要配置 hive.metastor ...
- Hive安装配置指北(含Hive Metastore详解)
个人主页: http://www.linbingdong.com 本文介绍Hive安装配置的整个过程,包括MySQL.Hive及Metastore的安装配置,并分析了Metastore三种配置方式的区 ...
- Hive metastore三种配置方式
http://blog.csdn.net/reesun/article/details/8556078 Hive的meta数据支持以下三种存储方式,其中两种属于本地存储,一种为远端存储.远端存储比较适 ...
- Hadoop之Hive(2)--配置Hive Metastore
Hive metastore服务以关系性数据库的方式存储Hive tables和partitions的metadata,并且提供给客户端访问这些数据的metastore service的API.下面介 ...
- Hive Metastore 代码简析
1. hive metastore 内部结构 1.1 包结构 从package结构来看,主要的5个package,让我们来看看这几个package的内容 (1) metastorepackage是m ...
- hive metastore异常 org.apache.thrift.protocol.TProtocolException: Missing version in readMessageBegin, old client
hiveserver2的端口是10000hive.metastoe.uris 的端口9083改为10000之后 beelien 连接hiveserver2报错 Error: Could not ope ...
- Hive Metastore ObjectStore PersistenceManager自动关闭bug解析
最近在测试HCatalog,由于Hcatalog本身就是一个独立JAR包,虽然它也可以运行service,但是其实这个service就是metastore thrift server,我们在写基于Hc ...
- hive metastore Server 出现异常
报错信息: 常见问题分析: 1 hive metastore 数据库中用户名或者密码出现更改,并且重启了hive,导致生效但是CDH下没有及时更改hive metastore设置密码 2 Mysql ...
- Hive metastore整体代码分析及详解
从上一篇对Hive metastore表结构的简要分析中,我再根据数据设计的实体对象,再进行整个代码结构的总结.那么我们先打开metadata的目录,其目录结构: 可以看到,整个hivemeta的目录 ...
随机推荐
- flex布局中flex-shrink的计算规则
下面代码来自MDN html部分: <p>the width of content is 500px, flex-basic of flex item is 120px.</p> ...
- saltstack之混合匹配
需要-C参数: salt -C ## 使用grains属性来匹配 [root@hadoop0 pillar]# salt -C 'G@os:Ubuntu' test.ping uadoop1: Tru ...
- iRedMail搭建完后登录提示【连接至IMAP服务器失败】(转)
http://ask.apelearn.com/question/8080(参考) ================搭建步骤如下=====================登录www.net.cn,产品 ...
- JS数组的赋值
var test=[1,2,3,4,5,6,7]; var arr=test; arr.splice(2,1); alert(test);//1,2,4,5,6,7 JS数组实质上是对象.因此, ...
- Kafka基础认识
1):Apache kafka介绍及架构详解 假设一个场景: 数据源: 应用系统A 产生的用户访问数据和订单数据 10000 条一秒钟 push:推送数据 消息系统:队列 产生的数据量>数据量 ...
- go Context的使用
控制并发有两种经典的方式,一种是WaitGroup,另外一种就是Context WaitGroup的使用 WaitGroup可以用来控制多个goroutine同时完成 func main() { va ...
- Verilog_Day2
Verilog_Day1 在CSDN博客上.http://blog.csdn.net/m0_38073085 第三章: 书上基本知识 每个Verilog程序包括4个主要部分:端口定义,I/O说明,内部 ...
- 大数据入门第九天——MapReduce详解(五)mapJoin、GroupingComparator与更多MR实例
一.数据倾斜分析——mapJoin 1.背景 接上一个day的Join算法,我们的解决join的方式是:在reduce端通过pid进行串接,这样的话: --order ,,P0001, ,,P0001 ...
- 20145234黄斐《Java程序设计》MyDC
http://git.oschina.net/jiataiji/java
- python安装mysql
一.MySQL是一种关系数据库管理系统,关系数据库将数据保存在不同的表中,而不是将所有数据放在一个大仓库内,这样就增加了速度并提高了灵活性. 二.最近在学习python语言,总体上面来说还是接触的挺快 ...
hive --service metastore [-p 9083]
hive及其他组件(比如spark.impala等)都会依赖hive metastore,依赖的配置文件位于hive-site.xml hive metastore重要配置 hive.metastor ...
个人主页: http://www.linbingdong.com 本文介绍Hive安装配置的整个过程,包括MySQL.Hive及Metastore的安装配置,并分析了Metastore三种配置方式的区 ...
http://blog.csdn.net/reesun/article/details/8556078 Hive的meta数据支持以下三种存储方式,其中两种属于本地存储,一种为远端存储.远端存储比较适 ...
Hive metastore服务以关系性数据库的方式存储Hive tables和partitions的metadata,并且提供给客户端访问这些数据的metastore service的API.下面介 ...
1. hive metastore 内部结构 1.1 包结构 从package结构来看,主要的5个package,让我们来看看这几个package的内容 (1) metastorepackage是m ...
hiveserver2的端口是10000hive.metastoe.uris 的端口9083改为10000之后 beelien 连接hiveserver2报错 Error: Could not ope ...
最近在测试HCatalog,由于Hcatalog本身就是一个独立JAR包,虽然它也可以运行service,但是其实这个service就是metastore thrift server,我们在写基于Hc ...
报错信息: 常见问题分析: 1 hive metastore 数据库中用户名或者密码出现更改,并且重启了hive,导致生效但是CDH下没有及时更改hive metastore设置密码 2 Mysql ...
从上一篇对Hive metastore表结构的简要分析中,我再根据数据设计的实体对象,再进行整个代码结构的总结.那么我们先打开metadata的目录,其目录结构: 可以看到,整个hivemeta的目录 ...
下面代码来自MDN html部分: <p>the width of content is 500px, flex-basic of flex item is 120px.</p> ...
需要-C参数: salt -C ## 使用grains属性来匹配 [root@hadoop0 pillar]# salt -C 'G@os:Ubuntu' test.ping uadoop1: Tru ...
http://ask.apelearn.com/question/8080(参考) ================搭建步骤如下=====================登录www.net.cn,产品 ...
var test=[1,2,3,4,5,6,7]; var arr=test; arr.splice(2,1); alert(test);//1,2,4,5,6,7 JS数组实质上是对象.因此, ...
1):Apache kafka介绍及架构详解 假设一个场景: 数据源: 应用系统A 产生的用户访问数据和订单数据 10000 条一秒钟 push:推送数据 消息系统:队列 产生的数据量>数据量 ...
控制并发有两种经典的方式,一种是WaitGroup,另外一种就是Context WaitGroup的使用 WaitGroup可以用来控制多个goroutine同时完成 func main() { va ...
Verilog_Day1 在CSDN博客上.http://blog.csdn.net/m0_38073085 第三章: 书上基本知识 每个Verilog程序包括4个主要部分:端口定义,I/O说明,内部 ...
一.数据倾斜分析——mapJoin 1.背景 接上一个day的Join算法,我们的解决join的方式是:在reduce端通过pid进行串接,这样的话: --order ,,P0001, ,,P0001 ...
http://git.oschina.net/jiataiji/java
一.MySQL是一种关系数据库管理系统,关系数据库将数据保存在不同的表中,而不是将所有数据放在一个大仓库内,这样就增加了速度并提高了灵活性. 二.最近在学习python语言,总体上面来说还是接触的挺快 ...