code: public void logTaskFinished(TaskID taskId, String taskType,
                                long finishTime, Counters counters) {
  
      if (disableHistory) {
        return;
      }
  
      JobID id = taskId.getJobID();
      if (!this.jobId.equals(id)) {
        throw new RuntimeException("JobId from task: " + id +
            " does not match expected: " + jobId);
      }
  
      if (null != writers) {
        log(writers, RecordTypes.Task,
            new Keys[]{Keys.TASKID, Keys.TASK_TYPE,
                       Keys.TASK_STATUS, Keys.FINISH_TIME,
                       Keys.COUNTERS},
            new String[]{ taskId.toString(), taskType, Values.SUCCESS.name(),
                          String.valueOf(finishTime),
                          counters.makeEscapedCompactString()});
      }
    }
docs: Log finish time of task.
  @param taskId task id
  @param taskType MAP or REDUCE
  @param finishTime finish timeof task in ms