code: void markCompletedJob(JobInProgress job) {
      for (TaskInProgress tip : job.getTasks(TaskType.JOB_SETUP)) {
        for (TaskStatus taskStatus : tip.getTaskStatuses()) {
          if (taskStatus.getRunState() != TaskStatus.State.RUNNING &&
              taskStatus.getRunState() != TaskStatus.State.COMMIT_PENDING &&
              taskStatus.getRunState() != TaskStatus.State.UNASSIGNED) {
            markCompletedTaskAttempt(taskStatus.getTaskTracker(),
                                     taskStatus.getTaskID());
          }
        }
      }
      for (TaskInProgress tip : job.getTasks(TaskType.MAP)) {
        for (TaskStatus taskStatus : tip.getTaskStatuses()) {
          if (taskStatus.getRunState() != TaskStatus.State.RUNNING &&
              taskStatus.getRunState() != TaskStatus.State.COMMIT_PENDING &&
              taskStatus.getRunState() != TaskStatus.State.FAILED_UNCLEAN &&
              taskStatus.getRunState() != TaskStatus.State.KILLED_UNCLEAN &&
              taskStatus.getRunState() != TaskStatus.State.UNASSIGNED) {
            markCompletedTaskAttempt(taskStatus.getTaskTracker(),
                                     taskStatus.getTaskID());
          }
        }
      }
      for (TaskInProgress tip : job.getTasks(TaskType.REDUCE)) {
        for (TaskStatus taskStatus : tip.getTaskStatuses()) {
          if (taskStatus.getRunState() != TaskStatus.State.RUNNING &&
              taskStatus.getRunState() != TaskStatus.State.COMMIT_PENDING &&
              taskStatus.getRunState() != TaskStatus.State.FAILED_UNCLEAN &&
              taskStatus.getRunState() != TaskStatus.State.KILLED_UNCLEAN &&
              taskStatus.getRunState() != TaskStatus.State.UNASSIGNED) {
            markCompletedTaskAttempt(taskStatus.getTaskTracker(),
                                     taskStatus.getTaskID());
          }
        }
      }
    }
docs: Mark all 'non-running' jobs of the job for pruning.
  This function assumes that the JobTracker is locked on entry.
  
  @param job the completed job