presto + hive.metastore.uri + presto工如何连接到hive metastore

evrscar2  于 2021-04-07  发布在  Hive
关注(0)|答案(1)|浏览(711)

我们有hadoop集群 - hdp 2.6.5与hive元存储,和po工人。
在prestxxox Worker中,我们定义了以下配置。

[root@presto_worker catalog]# ls -ltr
total 12
-rw-r--r-- 1 root root 247 Aug  5 14:30 jmx.properties
-rw-r--r-- 1 root root  54 Aug  5 14:30 memory.properties
-rw-r--r-- 1 root root 329 Aug  5 14:30 hive.properties

[root@presto_worker catalog]# more hive.properties

# 

connector.name=hive-hadoop2
hive.metastore.uri=thrift://hadoop01.sys65.com:9083,thrift://hadoop03.sys65.com:9083
hive.config.resources=/etc/hadoop/conf/core-site.xml,/etc/hadoop/conf/hdfs-site.xml
hive.parquet.fail-on-corrupted-statistics=false
hive.force-local-scheduling=true
hive.parquet.use-column-names=true

我的问题是--"presto_worker "是如何连接到hive元店的?
当presto_worker连接到hive元存储时,后台执行的过程步骤是什么?

qlvxas9a

qlvxas9a1#

Worker在执行 "INSERT "到现有分区表时,需要连接到hive元存储。相关代码在这里:https://github.com/trinodb/trino/blob/6d9d47e0909b3fe9367584ba8450827dbbb8e1d7/presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/hivepagesinkmetadataprovider.java#l58。

相关问题