private void getTaskDataAll(URL url, String jobId, List<MapReduceTaskData> mapperList,
        List<MapReduceTaskData> reducerList) throws IOException, AuthenticationException {

      JsonNode rootNode = ThreadContextMR2.readJsonNode(url);
      JsonNode tasks = rootNode.path("tasks").path("task");

      for (JsonNode task : tasks) {
        String state = task.get("state").getValueAsText();
        String taskId = task.get("id").getValueAsText();
        String attemptId = "";
        if(state.equals("SUCCEEDED")) {
           attemptId = task.get("successfulAttempt").getValueAsText();
        } else {
          JsonNode firstAttempt = getTaskFirstFailedAttempt(_urlFactory.getTaskAllAttemptsURL(jobId, taskId));
          if( firstAttempt != null) {
            attemptId = firstAttempt.get("id").getValueAsText();
          }
        }

        boolean isMapper = task.get("type").getValueAsText().equals("MAP");

        if (isMapper) {
          mapperList.add(new MapReduceTaskData(taskId, attemptId, state));
        } else {
          reducerList.add(new MapReduceTaskData(taskId, attemptId, state));
        }
      }

      getTaskData(jobId, mapperList);
      getTaskData(jobId, reducerList);
    }
This class implements the Fetcher for MapReduce Applications on Hadoop2
app/com/linkedin/drelephant/mapreduce/fetchers/MapReduceFetcherHadoop2.java