public List<String> getChildList(CuratorFramework zk) {
    try {
      List<String> jobs = JobStateTracker.getTrackingJobs(appConf, zk);
      Collections.sort(jobs);
      return jobs;
    } catch (IOException e) {
      LOG.info("No jobs to check.");
    }
    return Collections.emptyList();
  }
Get the list of jobs from JobState
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/ZooKeeperCleanup.java