code: public void logTaskUpdates(TaskID taskId, long finishTime) {
      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.FINISH_TIME},
            new String[]{ taskId.toString(),
                          String.valueOf(finishTime)});
      }
    }
docs: Update the finish time of task.
  @param taskId task id
  @param finishTime finish time of task in ms