tencent cloud

All product documents
Elastic MapReduce
HiveServer2 CLB
Last updated: 2024-10-30 11:36:28
HiveServer2 CLB
Last updated: 2024-10-30 11:36:28
When an EMR cluster has multiple HiveServer2 services, load balancing for HiveServer2 can be achieved using the ZooKeeper service. This document provides a detailed introduction to using HiveServer2 load balancing.

Development Preparation

Make sure you have activated Tencent Cloud and created an EMR cluster. For more details, see Creating a Cluster.
Create a High Availability Hadoop default scene cluster, and select the Hive component in the software configuration interface.

Achieving HiveServer2 Load Balancing through ZooKeeper

The high-availability cluster in the default Hadoop scene has ZooKeeper service installed by default. You can use the following connection method to connect to HiveServer2, leveraging ZooKeeper to achieve load balancing:
beeline -u 'jdbc:hive2://${hive.zookeeper.quorum}/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=<hive.server2.zookeeper.namespace>' -n ${user} -p ${password}
Note:
1. ${hive.zookeeper.quorum} and ${hive.server2.zookeeper.namespace} are related configurations for ZooKeeper Server in Hive. You can find the corresponding values of the hive.zookeeper.quorum and hive.server2.zookeeper.namespace parameters in the hive-site.xml configuration file under EMR console Cluster Services > HIVE > Configuration Management.
2. user and password refer to the LDAP username and login password you set.

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon