private long[] getTaskExecTime(URL url, boolean isMapTask) throws IOException, AuthenticationException {
      JsonNode rootNode = ThreadContextMR2.readJsonNode(url);
      JsonNode groups = rootNode.path("otherinfo").path("counters").path("counterGroups");

      long startTime = rootNode.path("otherinfo").get("startTime").getLongValue();
      long finishTime = rootNode.path("otherinfo").get("endTime").getLongValue();

      long shuffleTime = 0;
      long mergeTime = 0;

      for (JsonNode group : groups) {
        for (JsonNode counter : group.path("counters")) {
          String name = counter.get("counterName").getTextValue();
          if (!isMapTask && name.equals("MERGE_PHASE_TIME")) {
            mergeTime = counter.get("counterValue").getLongValue();
          }
          else if (!isMapTask && name.equals("SHUFFLE_PHASE_TIME")){
            shuffleTime = counter.get("counterValue").getLongValue();
          }

        }
      }

      long[] time = new long[] { finishTime - startTime, shuffleTime, mergeTime, startTime, finishTime };

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