code: public void addDiagnosticInfo(TaskAttemptID taskId, String diagInfo) {
      List<String> diagHistory = taskDiagnosticData.get(taskId);
      if (diagHistory == null) {
        diagHistory = new ArrayList<String>();
        taskDiagnosticData.put(taskId, diagHistory);
      }
      diagHistory.add(diagInfo);
    }
docs: Save diagnostic information for a given task.
  
  @param taskId id of the task
  @param diagInfo diagnostic information for the task