public synchronized void notifyDone(Job doneJob){
  LOG.debug("Done notification received for " + doneJob);
  Set<Job> newReadyJobs=dagManager.removeJob(doneJob);
  for (  Job jobToRun : newReadyJobs) {
    LOG.debug("Job " + jobToRun + " is ready to run.");
    jobsToRun.add(jobToRun);
  }
  incrementDoneJobCount();
  countLock.lock();
  try {
    LOG.debug("Submitted jobs: " + submittedJobCount + " Pending jobs: "+ (submittedJobCount - doneJobCount)+ " Completed jobs: "+ doneJobCount);
  }
  finally {
    countLock.unlock();
  }
}

public synchronized void notifyDone ( Job doneJob ) { LOG . debug ( "Done notification received for " + doneJob ) ; Set < Job > newReadyJobs = dagManager . removeJob ( doneJob ) ; for ( Job jobToRun : newReadyJobs ) { LOG . debug ( "Job " + jobToRun + " is ready to run." ) ; jobsToRun . add ( jobToRun ) ; } incrementDoneJobCount ( ) ; countLock . lock ( ) ; try { LOG . debug ( "Submitted jobs: " + submittedJobCount + " Pending jobs: " + ( submittedJobCount - doneJobCount ) + " Completed jobs: " + doneJobCount ) ; } finally { countLock . unlock ( ) ; } }
should be called by the workers to indicate that a job has finished running . this removes the job from the dag so that other jobs that depended on the finished job can now be run .
