private void getTaskDataByVertexId(URL url, String dagId, String vertexId, List<TezTaskData> taskList,
                                       boolean isMapTask) throws IOException, AuthenticationException {

      JsonNode rootNode = ThreadContextMR2.readJsonNode(url);
      JsonNode tasks = rootNode.path("entities");
      for (JsonNode task : tasks) {
        String state = task.path("otherinfo").path("status").getTextValue();
        String taskId = task.get("entity").getValueAsText();
        String attemptId = task.path("otherinfo").path("successfulAttemptId").getTextValue();
        if (state.equals("SUCCEEDED")) {
          attemptId = task.path("otherinfo").path("successfulAttemptId").getTextValue();
        }
        else{
          JsonNode firstAttempt = getTaskFirstFailedAttempt(_urlFactory.getTaskAllAttemptsURL(dagId,taskId));
          if(firstAttempt != null){
            attemptId = firstAttempt.get("entity").getTextValue();
          }
        }

        taskList.add(new TezTaskData(taskId, attemptId));
      }

      getTaskData(dagId, taskList, isMapTask);

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