private MapReduceCounterData getJobCounter(URL url) throws IOException, AuthenticationException {
      MapReduceCounterData holder = new MapReduceCounterData();

      JsonNode rootNode = ThreadContextMR2.readJsonNode(url);
      JsonNode groups = rootNode.path("jobCounters").path("counterGroup");

      for (JsonNode group : groups) {
        for (JsonNode counter : group.path("counter")) {
          String counterName = counter.get("name").getValueAsText();
          Long counterValue = counter.get("totalCounterValue").getLongValue();
          String groupName = group.get("counterGroupName").getValueAsText();
          holder.set(groupName, counterName, counterValue);
        }
      }
      return holder;
    }
This class implements the Fetcher for MapReduce Applications on Hadoop2
app/com/linkedin/drelephant/mapreduce/fetchers/MapReduceFetcherHadoop2.java