private TezCounterData getTaskCounter(URL url) throws IOException, AuthenticationException {
      JsonNode rootNode = ThreadContextMR2.readJsonNode(url);
      JsonNode groups = rootNode.path("otherinfo").path("counters").path("counterGroups");
      TezCounterData holder = new TezCounterData();

      //Fetch task level metrics
      for (JsonNode group : groups) {
        for (JsonNode counter : group.path("counters")) {
          String name = counter.get("counterName").getTextValue();
          String groupName = group.get("counterGroupName").getTextValue();
          Long value = counter.get("counterValue").getLongValue();
          holder.set(groupName, name, value);
        }
      }

      return holder;
    }
JSONFactory class provides functionality to parse mined job data from timeline server.
app/com/linkedin/drelephant/tez/fetchers/TezFetcher.java