@SuppressWarnings("resource") // Bogus warnings despite closeQuietly.
  protected final synchronized PathChildrenCache ensureInstancesCache(
      long clusterReadyTimeoutMs) throws IOException {
    Preconditions.checkArgument(zooKeeperClient != null &&
            zooKeeperClient.getState() == CuratorFrameworkState.STARTED, "client is not started");
    // lazily create PathChildrenCache
    PathChildrenCache instancesCache = this.instancesCache;
    if (instancesCache != null) return instancesCache;
    ExecutorService tp = Executors.newFixedThreadPool(1, new ThreadFactoryBuilder()
              .setDaemon(true).setNameFormat("StateChangeNotificationHandler").build());
    long startTimeNs = System.nanoTime(), deltaNs = clusterReadyTimeoutMs * 1000000L;
    long sleepTimeMs = Math.min(16, clusterReadyTimeoutMs);
    while (true) {
      instancesCache = new PathChildrenCache(zooKeeperClient, workersPath, true);
      instancesCache.getListenable().addListener(new InstanceStateChangeListener(), tp);
      try {
        instancesCache.start(PathChildrenCache.StartMode.BUILD_INITIAL_CACHE);
        this.instancesCache = instancesCache;
        return instancesCache;
      } catch (InvalidACLException e) {
        // PathChildrenCache tried to mkdir when the znode wasn't there, and failed.
        CloseableUtils.closeQuietly(instancesCache);
        long elapsedNs = System.nanoTime() - startTimeNs;
        if (deltaNs == 0 || deltaNs <= elapsedNs) {
          LOG.error("Unable to start curator PathChildrenCache", e);
          throw new IOException(e);
        }
        LOG.warn("The cluster is not started yet (InvalidACL); will retry");
        try {
          Thread.sleep(Math.min(sleepTimeMs, (deltaNs - elapsedNs)/1000000L));
        } catch (InterruptedException e1) {
          LOG.error("Interrupted while retrying the PathChildrenCache startup");
          throw new IOException(e1);
        }
        sleepTimeMs = sleepTimeMs << 1;
      } catch (Exception e) {
        CloseableUtils.closeQuietly(instancesCache);
        LOG.error("Unable to start curator PathChildrenCache", e);
        throw new IOException(e);
      }
    }
  }
Get the ensemble server addresses from the configuration. The format is: host1:port,
host2:port..

@param conf configuration
llap-client/src/java/org/apache/hadoop/hive/registry/impl/ZkRegistryBase.java