public synchronized Optional<KillQueryZookeeperData> getKillQueryData() throws Exception {
      if (client.checkExists().forPath(barrierPath) != null) {
        byte[] data = client.getData().forPath(barrierPath);
        return Optional.of(new KillQueryZookeeperData(new String(data, StandardCharsets.UTF_8)));
      }
      return Optional.empty();
    }
Utility to set the barrier node.

@throws Exception errors
service/src/java/org/apache/hive/service/server/KillQueryZookeeperManager.java