public static boolean pollJob(JobResourceManager resourceManager, PigJob job) {
    if (jobPollers.get(job.getJobId()) == null) {
      LOG.debug("Setting up polling for " + job.getJobId());
      JobPolling polling = new JobPolling(resourceManager, job);
      polling.scheduleJobPolling();
      jobPollers.put(job.getJobId(), polling);
      return true;
    }
    return false;
  }
Schedule job polling
@param job job instance
@return returns false if already scheduled
contrib/views/pig/src/main/java/org/apache/ambari/view/pig/resources/jobs/utils/JobPolling.java