private void watchNode() throws Exception {
    if (!isActive()) return;
    String localNodePath = nodePath.get();
    if (localNodePath == null) return;
    try {
      client.checkExists().usingWatcher(watcher).inBackground(
          checkExistsCallback).forPath(localNodePath);
    } catch (Exception e) {
      LOG.error("Watching node: " + localNodePath, e);
      throw e;
    }
  }
We would have used the curator ephemeral node with some extra logic but it doesn't handle
the EXISTS condition, which is crucial here; so we c/p parts of Curator and add our logic.
llap-client/src/java/org/apache/hadoop/hive/llap/registry/impl/SlotZnode.java