code: public void logMapTaskFinished(TaskAttemptID taskAttemptId,
                                   long finishTime,
                                   String hostName,
                                   String taskType,
                                   String stateString,
                                   Counters counter) {
      if (disableHistory) {
        return;
      }
  
      JobID id = taskAttemptId.getJobID();
      if (!this.jobId.equals(id)) {
        throw new RuntimeException("JobId from task: " + id +
                                   " does not match expected: " + jobId);
      }
      if (null != writers) {
        log(writers, RecordTypes.MapAttempt,
            new Keys[]{ Keys.TASK_TYPE, Keys.TASKID,
                        Keys.TASK_ATTEMPT_ID, Keys.TASK_STATUS,
                        Keys.FINISH_TIME, Keys.HOSTNAME,
                        Keys.STATE_STRING, Keys.COUNTERS},
            new String[]{taskType,
                         taskAttemptId.getTaskID().toString(),
                         taskAttemptId.toString(),
                         Values.SUCCESS.name(),
                         String.valueOf(finishTime), hostName,
                         stateString,
                         counter.makeEscapedCompactString()});
      }
    }
docs: Log finish time of map task attempt.
  
  @param taskAttemptId task attempt id
  @param finishTime finish time
  @param hostName host name
  @param taskType Whether the attempt is cleanup or setup or map
  @param stateString state string of the task attempt
  @param counter counters of the task attempt