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 92c47716b3..cf4e7b8640 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 @@ -153,9 +153,10 @@ public String register() throws IOException { HiveConf.getVarWithoutType(conf, ConfVars.LLAP_DAEMON_TASK_SCHEDULER_WAIT_QUEUE_SIZE)); populateConfigValues(capacityValues.entrySet()); - String uniqueId = registerServiceRecord(daemonZkRecord); + String uniqueId = UNIQUE_ID.toString(); long znodeCreationTimeout = 120; + initializeWithoutRegisteringInternal(); // Create a znode under the rootNamespace parent for this instance of the server try { slotZnode = new SlotZnode( @@ -171,6 +172,7 @@ public String register() throws IOException { throw (e instanceof IOException) ? (IOException)e : new IOException(e); } + registerServiceRecord(daemonZkRecord, uniqueId); LOG.info("Registered node. Created a znode on ZooKeeper for LLAP instance: rpc: {}, " + "shuffle: {}, webui: {}, mgmt: {}, znodePath: {}", rpcEndpoint, getShuffleEndpoint(), getServicesEndpoint(), getMngEndpoint(), getRegistrationZnodePath()); diff --git llap-client/src/java/org/apache/hadoop/hive/registry/impl/ZkRegistryBase.java llap-client/src/java/org/apache/hadoop/hive/registry/impl/ZkRegistryBase.java index d28fd1778c..e2768fd152 100644 --- llap-client/src/java/org/apache/hadoop/hive/registry/impl/ZkRegistryBase.java +++ llap-client/src/java/org/apache/hadoop/hive/registry/impl/ZkRegistryBase.java @@ -345,7 +345,7 @@ protected final void updateServiceRecord( } - final void initializeWithoutRegisteringInternal() throws IOException { + final protected void initializeWithoutRegisteringInternal() throws IOException { // Create a znode under the rootNamespace parent for this instance of the server try { try {