HiveServer2 High Availability
To enable high availability for multiple HiveServer2 hosts, configure a load balancer to manage them. To increase stability and security, configure the load balancer on a proxy server.
Enabling HiveServer2 High Availability Using Cloudera Manager
Minimum Required Role: Configurator (also provided by Cluster Administrator, Full Administrator)
- Go to the Hive service.
- Click the Configuration tab.
- Select .
- Select .
- Locate the HiveServer2 Load Balancer property or search for it by typing its name in the Search box.
- Enter values for hostname:port number.
- Click Save Changes to commit the changes.
- Restart the Hive service.
Configuring HiveServer2 to Load Balance Behind a Proxy
For clusters with multiple users and availability requirements, you can configure a proxy server to relay requests to and from each HiveServer2 host. Applications connect to a single well-known host and port, and connection requests to the proxy succeed even when hosts running HiveServer2 become unavailable.
- Download load-balancing proxy software of your choice on a single host.
- Configure the software, typically by editing a configuration file:
- Set the port for the load balancer to listen on and relay HiveServer2 requests back and forth.
- Set the port and hostname for each HiveServer2 host—that is, the hosts from which the load balancer chooses when relaying each query.
- Run the load-balancing proxy server and point it at the configuration file.
- In Cloudera Manager, configure HiveServer2 Load Balancer for the proxy server. See Enabling HiveServer2 High Availability Using Cloudera Manager.
- Point all scripts, jobs, or application configurations to the new proxy server instead of any specific HiveServer2 instance.