code: public void kill() {
      boolean killNow = false;
      synchronized(jobInitKillStatus) {
        jobInitKillStatus.killed = true;
        //if not in middle of init, terminate it now
        if(!jobInitKillStatus.initStarted || jobInitKillStatus.initDone) {
          //avoiding nested locking by setting flag
          killNow = true;
        }
      }
      if(killNow) {
        terminate(JobStatus.KILLED);
      }
    }
docs: Kill the job and all its component tasks. This method should be called from
  jobtracker and should return fast as it locks the jobtracker.