private void getTaskData(String jobId, List<MapReduceTaskData> taskList) throws IOException, AuthenticationException {

      int sampleSize = sampleAndGetSize(jobId, taskList);

      for(int i=0; i < sampleSize; i++) {
        MapReduceTaskData data = taskList.get(i);

        URL taskCounterURL = getTaskCounterURL(jobId, data.getTaskId());
        MapReduceCounterData taskCounter = getTaskCounter(taskCounterURL);

        long[] taskExecTime = null;
        if(!data.getAttemptId().isEmpty()) {
          URL taskAttemptURL = getTaskAttemptURL(jobId, data.getTaskId(), data.getAttemptId());
          taskExecTime = getTaskExecTime(taskAttemptURL);
        }
        data.setTimeAndCounter(taskExecTime, taskCounter);
      }
    }
This class implements the Fetcher for MapReduce Applications on Hadoop2
app/com/linkedin/drelephant/mapreduce/fetchers/MapReduceFetcherHadoop2.java