private List<String> getAllServerUrls() {
    List<String> serverHosts = new ArrayList<>();
    if (conf.getBoolVar(HiveConf.ConfVars.HIVE_SERVER2_SUPPORT_DYNAMIC_SERVICE_DISCOVERY) && !conf
        .getBoolVar(HiveConf.ConfVars.HIVE_SERVER2_ACTIVE_PASSIVE_HA_ENABLE)) {
      String zooKeeperNamespace = conf.getVar(HiveConf.ConfVars.HIVE_SERVER2_ZOOKEEPER_NAMESPACE);
      try {
        serverHosts.addAll(zooKeeperClient.getChildren().forPath("/" + zooKeeperNamespace));
      } catch (Exception e) {
        LOG.error("Unable the get available server hosts", e);
      }
    }
    return serverHosts;
  }
Kill query coordination service.
When service discovery is enabled a local kill query can request a kill
on every other HS2 server with the queryId or queryTag and wait for confirmation on denial.
The communication is done through Zookeeper.
service/src/java/org/apache/hive/service/server/KillQueryZookeeperManager.java