public static List<String> getTrackingJobs(Configuration conf, CuratorFramework zk)
    throws IOException {
    ArrayList<String> jobs = new ArrayList<String>();
    try {
      for (String myid : zk.getChildren().forPath(
        conf.get(TempletonStorage.STORAGE_ROOT)
          + ZooKeeperStorage.TRACKINGDIR)) {
        jobs.add(myid);
      }
    } catch (Exception e) {
      throw new IOException("Can't get tracking children", e);
    }
    return jobs;
  }
Make a ZK path to an existing tracking node
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/JobStateTracker.java