code: @SuppressWarnings("deprecation")
    public void failedTask(
      TaskInProgress tip,
      TaskAttemptID taskid,
      String reason,
      TaskStatus.Phase phase,
      boolean isFailed,
      String trackerName,
      TaskTrackerInfo ttStatus) {
      TaskStatus.State state =
        isFailed ? TaskStatus.State.FAILED: TaskStatus.State.KILLED;
      TaskStatus status = TaskStatus.createTaskStatus(tip.isMapTask(),
                                                      taskid,
                                                      0.0f,
                                                      1,
                                                      state,
                                                      reason,
                                                      reason,
                                                      trackerName, phase,
                                                      new Counters());
      synchronized (lockObject) {
        // update the actual start-time of the attempt
        TaskStatus oldStatus = tip.getTaskStatus(taskid);
        long startTime = oldStatus == null
        ? JobTracker.getClock().getTime()
            : oldStatus.getStartTime();
        if (startTime < 0) {
          startTime = JobTracker.getClock().getTime();
        }
        status.setStartTime(startTime);
        status.setFinishTime(JobTracker.getClock().getTime());
        boolean wasComplete = tip.isComplete();
        updateTaskStatus(tip, status, ttStatus);
        boolean isComplete = tip.isComplete();
        if (wasComplete && !isComplete) { // mark a successful tip as failed
          String taskType = getTaskType(tip);
          JobHistory.Task.logFailed(tip.getTIPId(), taskType,
              tip.getExecFinishTime(), reason, taskid);
        }
      }
    }
docs: Fail a task with a given reason, but without a status object.