[英]Multiple connectinUrl for Hive metastore client
is there a way to assign to hive metastoreclient a list of ConnectionURL in order ask hive metastore to connect to an other database in case of the first one fails ? 有没有一种方法可以分配给hive metastoreclient一个ConnectionURL的列表,以便在第一个失败时要求hive metastore连接到另一个数据库?
the only property that i found in hive-site.xml is ( and it's only accept one URL) : 我在hive-site.xml中找到的唯一属性是(并且它仅接受一个URL):
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://myhost/metastore</value>
<description>the URL of the MySQL database</description>
</property>
Straight from MySQL documentation : 直接来自MySQL文档 :
# Connection URL for a server failover setup:
jdbc:mysql//primaryhost,secondaryhost1,secondaryhost2/test
# Connection URL for load balancing:
jdbc:mysql:loadbalance://localhost:3306,localhost:3310/sakila
# Connection URL for server replication:
jdbc:mysql:replication://master,slave1,slave2,slave3/test
So it's a MySQL setup issue, not a Metastore config issue. 因此,这是一个MySQL设置问题,而不是Metastore配置问题。
https://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html https://dev.mysql.com/doc/connector-j/zh-CN/connector-j-reference-configuration-properties.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.