public boolean start(long timeout, TimeUnit unit) throws Exception {
    Preconditions.checkState(state.compareAndSet(State.LATENT, State.INITIAL_SELECTION), "Already started");
    CountDownLatch localLatch = initialCreateLatch.get();
    client.getConnectionStateListenable().addListener(connectionStateListener);
    chooseSlotToTake();
    startCreateCurrentNode();
    return localLatch.await(timeout, unit);
  }
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