<property>
<name>hive.server2.support.dynamic.service.discovery</name>
<value>true</value>
</property>
<property>
<name>hive.server2.zookeeper.namespace</name>
<value>hiveserver2</value>
</property>
<property>
<name>hive.zookeeper.quorum</name>
<value>zk1,zk2</value>
</property>
Hive Thrift Server以HA的方式运行后, JDBC连接串的写法:
Connection URL When ZooKeeper Service Discovery Is Enabled
ZooKeeper-based service discovery introduced in Hive 0.14.0 (HIVE-7935) enables high availability and rolling upgrade for HiveServer2. A JDBC URL that specifies <zookeeper quorum> needs to be used to make use of these features.
With further changes in Hive 2.0.0 and 1.3.0 (unreleased, HIVE-11581), none of the additional configuration parameters such as authentication mode, transport mode, or SSL parameters need to be specified, as they are retrieved from the ZooKeeper entries along with the hostname.
The JDBC connection URL: jdbc:hive2://<zookeeper quorum>/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
.
The <zookeeper quorum> is the same as the value of hive.zookeeper.quorum configuration parameter in hive-site.xml/hivserver2-site.xml used by HiveServer2.
更多信息参看:
https://github.com/apache/spark/pull/9113
https://issues.apache.org/jira/browse/HIVE-8376
https://issues.apache.org/jira/secure/attachment/12673832/HiveServer2DynamicServiceDiscovery.pdf
相关推荐
- 与Node2配置相似,但`hive.server2.thrift.bind.host`应设置为Node4的IP地址,确保每个实例监听不同的端口。 **高可用实现**: - 使用Zookeeper协调Hiveserver2实例。当主Hiveserver2故障时,Zookeeper会检测到并...
Kyuubi相比于传统的Hive Server2和Spark ThriftServer,具有显著的优势。首先,Kyuubi提供了多租户支持,这意味着多个用户或部门可以在同一平台上安全地共享资源,而无需担心数据隔离问题。其次,Kyuubi支持Hive ...
- **10000**:默认的HiveServer2 Thrift端口,可以通过配置文件`/etc/hive/conf/hive-env.sh`中的`export HIVE_SERVER2_THRIFT_PORT=<port>`来更改。 #### ZooKeeper端口配置 - **Server** - **2181**:`client...
- Hive远程服务通常通过Thrift服务器的方式对外提供服务接口。 28. **Hive不支持的操作**: - Hive不支持传统的事务特性,如更新(update)和删除(delete)操作。 29. **Hive的适用场景**: - Hive非常适合对大型...
- **详细解析**:Hive远程服务可以通过Thrift Server的方式供其他应用程序访问。 28. **Hive更新限制** - **知识点**:Hive对数据更新的支持情况。 - **详细解析**:Hive默认不支持更新操作,特别是对单条记录的...
11.分布式SQL引擎(spakr-sql和Spark ThriftServer) 12.Catalyst 优化器 第四章、离线综合实战 1.综合实战概述(需求、调研、业务) 2.环境搭建(大数据环境和应用开发环境) 3.项目初始化(工具类和属性文件) 4....