code: private void updatePreemptionVariables() {
      long now = clock.getTime();
      for (Map.Entry<JobInProgress, JobInfo> entry: infos.entrySet()) {
        JobInProgress job = entry.getKey();
        JobInfo info = entry.getValue();
        if (job.getStatus().getRunState() != JobStatus.RUNNING) {
          // Job is still in PREP state and tasks aren't initialized. Count it as
          // both at min and fair share since we shouldn't start any timeouts now.
          info.lastTimeAtMapMinShare = now;
          info.lastTimeAtReduceMinShare = now;
          info.lastTimeAtMapHalfFairShare = now;
          info.lastTimeAtReduceHalfFairShare = now;
        } else {
          if (!isStarvedForMinShare(info, TaskType.MAP))
            info.lastTimeAtMapMinShare = now;
          if (!isStarvedForMinShare(info, TaskType.REDUCE))
            info.lastTimeAtReduceMinShare = now;
          if (!isStarvedForFairShare(info, TaskType.MAP))
            info.lastTimeAtMapHalfFairShare = now;
          if (!isStarvedForFairShare(info, TaskType.REDUCE))
            info.lastTimeAtReduceHalfFairShare = now;
        }
      }
    }
docs: Update the preemption JobInfo fields for all jobs, i.e. the times since
  each job last was at its guaranteed share and at > 1/2 of its fair share
  for each type of task.