private void startCreateCurrentNode() {
    if (!isActive()) return;
    String createPath = null;
    try {
      createPath = getSlotPath(currentSlot);
      LOG.info("Attempting to create " + createPath);
      client.create().withMode(CreateMode.EPHEMERAL).inBackground(backgroundCallback)
        .forPath(createPath, data);
    } catch (Exception e) {
      LOG.error("Creating node. Path: " + createPath, e);
      throw new RuntimeException(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