public HelixManager getZkHelixManagerAndConnect(String clusterName, String instanceName, InstanceType instanceType,
      String zkAddr, ClusterMapConfig clusterMapConfig) throws Exception {
    HelixManager manager = getZKHelixManager(clusterName, instanceName, instanceType, zkAddr, clusterMapConfig);
    synchronized (manager) {
      if (!manager.isConnected()) {
        LOGGER.info("Connecting to HelixManager at {}", zkAddr);
        manager.connect();
        LOGGER.info("Established connection to HelixManager at {}", zkAddr);
      } else {
        LOGGER.info("HelixManager at {} already connected", zkAddr);
      }
    }
    return manager;
  }
Get a reference to a {@link HelixManager} and connect to it, if not already connected
@param clusterName the name of the cluster for which the manager is to be gotten.
@param instanceName the name of the instance on whose behalf the manager is to be gotten.
@param instanceType the {@link InstanceType} of the requester.
@param zkAddr the address identifying the zk service to which this request is to be made.
@return the constructed and connected {@link HelixManager}.
@throws Exception if connecting failed.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixFactory.java