public static synchronized LlapRegistryService getClient(Configuration conf) {
    String hosts = HiveConf.getTrimmedVar(conf, HiveConf.ConfVars.LLAP_DAEMON_SERVICE_HOSTS);
    Preconditions.checkNotNull(hosts, ConfVars.LLAP_DAEMON_SERVICE_HOSTS.toString() + " must be defined");
    LlapRegistryService registry;
    if (hosts.startsWith("@")) {
      // Caching instances only in case of the YARN registry. Each host based list will get it's own copy.
      String appName = hosts.substring(1);
      String userName = HiveConf.getVar(conf, ConfVars.LLAP_ZK_REGISTRY_USER, currentUser());
      String key = appName + "-" + userName;
      registry = yarnRegistries.get(key);
      if (registry == null || !registry.isInState(STATE.STARTED)) {
        registry = new LlapRegistryService(false);
        registry.init(conf);
        registry.start();
        yarnRegistries.put(key, registry);
      }
    } else {
      registry = new LlapRegistryService(false);
      registry.init(conf);
      registry.start();
    }
    LOG.info("Using LLAP registry (client) type: " + registry);
    return registry;
  }
Helper method to get a ServiceRegistry instance to read from the registry.
This should not be used by LLAP daemons.

@param conf {@link Configuration} instance which contains service registry information.
@return
llap-client/src/java/org/apache/hadoop/hive/llap/registry/impl/LlapRegistryService.java