Enabling High Availability for HiveServer2
About this task
Perform the following steps to enable High Availability for HiveServer2.
Configuring Hive
Procedure
Connecting with JDBC/ODBC Clients
Procedure
Connect to HiveServer2 with JDBC/ODBC clients using the following
connection string:
jdbc:hive2://<zookeeper_ensemble>/;serviceDiscoveryMode=zooKeeper;
zooKeeperNamespace=<hiveserver2_zookeeper_namespace> Here: | <zookeeper_ensemble> | Specifies a comma-separated list of ZooKeeper servers that
form the ensemble. For example:
<zk_host1>:<zk_port1>,<zk_host2>:<zk_port2>,<zk_host3>:<zk_port3>. |
| <hiveserver2_zookeeper_namespace> | Specifies the namespace on Zookeeper under which
HiveServer2 znodes are added. The namespace value is configured
in hive.server2.zookeeper.name space. |
IMPORTANT
The example above will not work for secure clusters. To
connect to HiveServer2 with the correct extended secure cluster syntax
parameters, see Beeline ExamplesDeregistering HiveServer2 Instances from Zookeeper
About this task
Remove a HiveServer2 instance from Zookeeper by running the following commands (in the ZooKeeper command line interface) to deregister the server.