High availability in Hive

You can enable/disable the high availability mode (HA) for Hive. To do this:

  1. Open your cluster in ADCM.

  2. Go to the Hive service page.

  3. Run the Enable HA HiveServer2 action (Disable HA HiveServer2 to disable). Verify the operation outcome on the ADCM Jobs page.

    hive enable ha
    Enable high availability

When HA is activated, ZooKeeper registers all Hiveserver2 instances with the following default path: /arenadata/cluster/<cluster_id>/hiveserver2.

JDBC connection string in HA

When you activate HA for Hive, the JDBC connection string changes depending on the security mechanism being used. See examples below.

  • HA without SSL/Kerberos

  • HA with SSL

  • HA with SSL+Kerberos

  • HA off

High availability is enabled, insecure connection without SSL/Kerberos:

jdbc:hive2://<cluster_host_0>:2181,<cluster_host_1>:2181,<cluster_host_N>:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=<namespace>

High availability is enabled, secure connection with SSL:

jdbc:hive2://<cluster_host_0>:2181,<cluster_host_1>:2181,<cluster_host_N>:2181;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=<namespace>;ssl=true;sslTrustStore=/tmp/truststore.jks;trustStorePassword=bigdata

High availability is enabled, secure connection with SSL+Kerberos:

jdbc:hive2://<cluster_host_0>:2181,<cluster_host_1>:2181,<cluster_host_N>:2181;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=<namespace>;ssl=true;sslTrustStore=/tmp/truststore.jks;trustStorePassword=bigdata;principal=hive/_HOST@EXAMPLE.COM

Where EXAMPLE.COM is your Kerberos realm, for example RU-CENTRAL1.INTERNAL.

High availability is disabled, the default connection string:

jdbc:hive2://<cluster_host>:10000/
TIP
You can find the up-to-date JDBC connection string on the Hive Main page in ADCM (ClusterServicesHiveMain).
Found a mistake? Seleсt text and press Ctrl+Enter to report it