static List<JdbcConnectionParams> getDirectParamsList(JdbcConnectionParams connParams)
      throws ZooKeeperHiveClientException {
    CuratorFramework zooKeeperClient = null;
    try {
      zooKeeperClient = getZkClient(connParams);
      final List<String> serverHosts = getServerHosts(connParams, zooKeeperClient);

      if (serverHosts.isEmpty()) {
        throw new ZooKeeperHiveClientException("No more HiveServer2 URIs from ZooKeeper to attempt");
      }

      final List<JdbcConnectionParams> directParamsList = new ArrayList<>(serverHosts.size());
      for (final String serverNode : serverHosts) {
        JdbcConnectionParams directConnParams = new JdbcConnectionParams(connParams);
        directParamsList.add(directConnParams);
        updateParamsWithZKServerNode(directConnParams, zooKeeperClient, serverNode);
      }
      return directParamsList;
    } catch (Exception e) {
      throw new ZooKeeperHiveClientException("Unable to read HiveServer2 configs from ZooKeeper", e);
    } finally {
      if (zooKeeperClient != null) {
        zooKeeperClient.close();
      }
    }
  }
Get a list of all HiveServer2 server hosts.

@param connParams The current JDBC connection parameters
@param zooKeeperClient The client to use to connect to ZooKeeper
@return A list of HiveServer2 hosts
@throws ZooKeeperHiveClientException Failed to communicate to ZooKeeper
jdbc/src/java/org/apache/hive/jdbc/ZooKeeperHiveClientHelper.java