Help Center/ MapReduce Service/ Component Operation Guide (LTS) (Ankara Region)/ Using Hive/ Load Balancing for Hive MetaStore Client Connection
Updated on 2024-11-29 GMT+08:00

Load Balancing for Hive MetaStore Client Connection

Scenario

The client connection of Hive MetaStore supports load balancing. That is, heavy load of a single MetaStore node during heavy service traffic can be avoided by connecting to the node with the least connections based on the connection number recorded in ZooKeeper. Enabling this function does not affect the original connection mode.

Procedure

  1. Log in to FusionInsight Manager, click Cluster, choose Services > Hive, click Configurations, and then All Configurations.
  2. Search for the hive.metastore-ext.balance.connection.enable parameter and set its value to true.
  3. Click Save.
  4. Click Instance, select all instances, choose More > Restart Instance, enter the password, and click OK to restart all Hive instances.
  5. For other components that connect to MetaStore, add the hive.metastore-ext.balance.connection.enable parameter and set its value to true.

    The following uses Spark as an example:

    1. Log in to FusionInsight Manager, choose Cluster > Services > Spark, and click Configurations.
    2. Click Customization, add a custom parameter hive.metastore-ext.balance.connection.enable to all hive-site.xml parameter files, set its value to true, and click Save.
    3. Click Instance, select all configuration-expired instances, choose More > Restart Instance, enter the password, and click OK to restart them.