public static CuratorFramework zkOpen(Configuration conf) throws IOException {
    ZooKeeperHiveHelper xkHelper = ZooKeeperHiveHelper.builder()
        .quorum(conf.get(ZK_HOSTS))
        .sessionTimeout(conf.getInt(ZK_SESSION_TIMEOUT, CuratorFrameworkFactory.builder().getSessionTimeoutMs()))
        .baseSleepTime(1000)
        .maxRetries(3)
        .sslEnabled(conf.getBoolean(ZK_SSL_ENABLE, false))
        .keyStoreLocation(conf.get(ZK_KEYSTORE_LOCATION, ""))
        .keyStorePassword(conf.get(ZK_KEYSTORE_PASSWORD, ""))
        .keyStoreType(conf.get(ZK_KEYSTORE_TYPE, ""))
        .trustStoreLocation(conf.get(ZK_TRUSTSTORE_LOCATION, ""))
        .trustStorePassword(conf.get(ZK_TRUSTSTORE_PASSWORD, ""))
        .trustStoreType(conf.get(ZK_TRUSTSTORE_TYPE, ""))
        .build();
    CuratorFramework zk = xkHelper.getNewZookeeperClient();
    zk.start();
    return zk;
  }
Open a ZooKeeper connection for the JobState.
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/ZooKeeperStorage.java