public static boolean isZkHADynamicDiscoveryMode(Map<String, String> sessionConf) {
    final String discoveryMode = sessionConf.get(JdbcConnectionParams.SERVICE_DISCOVERY_MODE);
    return (discoveryMode != null) &&
      JdbcConnectionParams.SERVICE_DISCOVERY_MODE_ZOOKEEPER_HA.equalsIgnoreCase(discoveryMode);
  }
Returns true is only if HA service discovery mode is enabled

@param sessionConf - session configuration
@return true if serviceDiscoveryMode=zooKeeperHA is specified in JDBC URI
jdbc/src/java/org/apache/hive/jdbc/ZooKeeperHiveClientHelper.java