protected MapReduceTaskData[] getTaskData(String jobId, List<JobHistoryParser.TaskInfo> infoList) {
    int sampleSize = sampleAndGetSize(jobId, infoList);

    List<MapReduceTaskData> taskList = new ArrayList<MapReduceTaskData>();
    for (int i = 0; i < sampleSize; i++) {
      JobHistoryParser.TaskInfo tInfo = infoList.get(i);

      String taskId = tInfo.getTaskId().toString();
      TaskAttemptID attemptId = null;
      if(tInfo.getTaskStatus().equals("SUCCEEDED")) {
        attemptId = tInfo.getSuccessfulAttemptId();
      } else {
        attemptId = tInfo.getFailedDueToAttemptId();
      }

      MapReduceTaskData taskData = new MapReduceTaskData(taskId, attemptId == null ? "" : attemptId.toString() , tInfo.getTaskStatus());

      MapReduceCounterData taskCounterData = getCounterData(tInfo.getCounters());

      long[] taskExecTime = null;
      if (attemptId != null) {
        taskExecTime = getTaskExecTime(tInfo.getAllTaskAttempts().get(attemptId));
      }

      taskData.setTimeAndCounter(taskExecTime, taskCounterData);
      taskList.add(taskData);
    }
    return taskList.toArray(new MapReduceTaskData[taskList.size()]);
  }
The location of a job history file is in format: {done-dir}/yyyy/mm/dd/{serialPart}.
yyyy/mm/dd is the year, month and date of the finish time.
serialPart is the first 6 digits of the serial number considering it as a 9 digits number.
PS: The serial number is the last part of an app id.
<p>
For example, if appId = application_1461566847127_84624, then serial number is 84624.
Consider it as a 9 digits number, serial number is 000084624. So the corresponding
serialPart is 000084. If this application finish at 2016-5-30, its history file will locate
at {done-dir}/2016/05/30/000084
</p>
<p>
Furthermore, this location format is only satisfied for finished jobs in {done-dir} and not
for running jobs in {intermediate-done-dir}.
</p>
app/com/linkedin/drelephant/mapreduce/fetchers/MapReduceFSFetcherHadoop2.java