diff --git llap-client/src/java/org/apache/hadoop/hive/llap/registry/impl/LlapZookeeperRegistryImpl.java llap-client/src/java/org/apache/hadoop/hive/llap/registry/impl/LlapZookeeperRegistryImpl.java index 525aadb..8d9a98a 100644 --- llap-client/src/java/org/apache/hadoop/hive/llap/registry/impl/LlapZookeeperRegistryImpl.java +++ llap-client/src/java/org/apache/hadoop/hive/llap/registry/impl/LlapZookeeperRegistryImpl.java @@ -588,18 +588,10 @@ public DynamicServiceInstanceSet(final PathChildrenCache cache) { @Override public ServiceInstance getInstance(String name) { - ChildData childData = instancesCache.getCurrentData(name); - if (childData != null) { - byte[] data = childData.getData(); - if (data != null) { - try { - ServiceRecord srv = encoder.fromBytes(name, data); - ServiceInstance instance = new DynamicServiceInstance(srv); - return instance; - } catch (IOException e) { - LOG.error("Unable to decode data for zkpath: {}", name); - return null; - } + Collection instances = getAll(); + for(ServiceInstance instance : instances) { + if (instance.getWorkerIdentity().equals(name)) { + return instance; } } return null;