hivemetastore(hivemetastore的作用)

本篇文章给大家谈谈hivemetastore,以及hivemetastore的作用对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。

本文目录一览:

hive的安装,什么是hive的metastore的远程与本地

这里实验一下此谨把hive.metastore.local参数设置为false的情况下怎么启动hive,

当然首先要修改为false,

hive.metastore.local

false

controls whether to connect to remove metastore server or open a new metastore server in Hive Client JVM

并加入配置thrift server的配置:

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

然后启动hadoop集群,启动win上的mysql,保证集群ok,测试mysql ok

然后启动metastore:hive --service metastore

这个过程会测试连接 建立schema 建表

继续启动thrift server:吵逗hive --service hiveserver

Starting Hive Thrift Server

这里会卡住,其实这是典型的前台启动,如果退出到shell,那么server就会停止,想后台启动的话可以采用nohup方式。

最后启动hive:hive

hive show tables;

OK

tb

tb2

Time taken: 1.117 seconds

发现hive就可以启动起来了,其实我们只需要把hive理解为几个部分森碰基即可:metastore、thrift server和剩下的hive,这几个部分都是可以分开部署的,放在不同的服务器上,这样的设计增加了hive的ha和可扩展性 但是分开部署会牺牲很大的可维护性,也增加了运维的复杂性,所以一般还是把元数据留着mysql中 其他的部分放在一个jvm中。

hive也是个cs结构的东西 thrift是负责client和server通信的

[img]

hive metastore database is not initialized.怎么解决

最好先启动metasotre然后再启动hiveserverhive--servicemetastore-----------StartupHiveEmbeddedhive--servicehiveserver-----------StartupHiveStandalone(如果metastore配置成remote方凯枝式那就应该把metastore也启动)测试standalone,必辩洞须用remotemysql那种设置howtoconfigeration,prefertohive--servicehiveserver2---forhive2HiveServercannothandleconcurrentrequestsfrommorethanoneclient.ThisisactuallyalimitationimposedbytheThriftinterfacethatHiveServerexports,andcan'tberesolvedbymodifyingtheHiveServercode.HiveServer2isarewriteofHiveServerthataddressestheseproblems,startingwithHive0.11.0hadoopjar/opt/mapr/hadoop/hadoop-0.20.2/hadoop-0.20.2-dev-examples.jarwordcount/盯灶敏user/root/wcin/user/root/wcout1

如何连接hive metastore

最好先启动metasotre然后再启动hiveserverhive--servicemetastore-----------StartupHiveEmbeddedhive--servicehiveserver-----------StartupHiveStandalone(如果metastore配置成remote方凯枝式那就应该把metastore也启动)测试standalone,必辩洞须用remotemysql那种设置howtoconfigeration,prefertohive--servicehiveserver2---forhive2HiveServercannothandleconcurrentrequestsfrommorethanoneclient.ThisisactuallyalimitationimposedbytheThriftinterfacethatHiveServerexports,andcan'tberesolvedbymodifyingtheHiveServercode.HiveServer2isarewriteofHiveServerthataddressestheseproblems,startingwithHive0.11.0hadoopjar/opt/mapr/hadoop/hadoop-0.20.2/hadoop-0.20.2-dev-examples.jarwordcount/盯灶敏user/root/wcin/user/root/wcout1

远程连接元数据库hive.metastore.uris怎么写

hive配置远程metastore的方法:

1)首先配置hive使用本地MySQL存储metastore(服务器A

111.121.21.23)(也可以使用远程mysql存储)

2)配搜胡置完成后,在服务器A启动服务:/etc/init.d/Hadoop-hive-metastore

start

(默认监听端口是:9083)

3)配辩漏毕置hive客户端,修改hive-site.xml:(服务器B-需要有hadoop环境)

property

namehive.metastore.local/name

valuefalse/value

descriptioncontrols

whether

to

connect

to

remote

metastore

server

or

open

a

new

metastore

server

in

Hive

Client

JVM/description

/property

property

namehive.metastore.uris/name

valuethrift://127.0.0.1:9083/value

description/description

/property

4)hive

执携芹行测试hql

关于hivemetastore和hivemetastore的作用的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。

标签列表