// Ignore
// TODO: add an error message instead for counter key
private Map<String, Object> getVertexInfoMap(Vertex vertex,
                                               Map<String, Set<String>> counterNames) {
    Map<String, Object> vertexInfo = new HashMap<String, Object>();
    vertexInfo.put("id", vertex.getVertexId().toString());
    vertexInfo.put("status", vertex.getState().toString());
    vertexInfo.put("progress", Float.toString(vertex.getCompletedTaskProgress()));
    vertexInfo.put("initTime", Long.toString(vertex.getInitTime()));
    vertexInfo.put("startTime", Long.toString(vertex.getStartTime()));
    vertexInfo.put("finishTime", Long.toString(vertex.getFinishTime()));
    vertexInfo.put("firstTaskStartTime", Long.toString(vertex.getFirstTaskStartTime()));
    vertexInfo.put("lastTaskFinishTime", Long.toString(vertex.getLastTaskFinishTime()));
    ProgressBuilder vertexProgress = vertex.getVertexProgress();
    vertexInfo.put("totalTasks", Integer.toString(vertexProgress.getTotalTaskCount()));
    vertexInfo.put("runningTasks", Integer.toString(vertexProgress.getRunningTaskCount()));
    vertexInfo.put("succeededTasks", Integer.toString(vertexProgress.getSucceededTaskCount()));
    vertexInfo.put("failedTaskAttempts",
        Integer.toString(vertexProgress.getFailedTaskAttemptCount()));
    vertexInfo.put("killedTaskAttempts",
        Integer.toString(vertexProgress.getKilledTaskAttemptCount()));
    try {
      if (counterNames != null && !counterNames.isEmpty()) {
        TezCounters counters = vertex.getCachedCounters();
        Map<String, Map<String, Long>> counterMap = constructCounterMapInfo(counters, counterNames);
        if (counterMap != null && !counterMap.isEmpty()) {
          vertexInfo.put("counters", counterMap);
        }
      }
    } catch (LimitExceededException e) {
      // Ignore
      // TODO: add an error message instead for counter key
    }
    return vertexInfo;
  }
}
} catch (LimitExceededException e) {
// Ignore
// TODO: add an error message instead for counter key
}
return vertexInfo;
Integer.toString(vertexProgress.getKilledTaskAttemptCount()));
try {
if (counterNames != null && !counterNames.isEmpty()) {
TezCounters counters = vertex.getCachedCounters();
Map<String, Map<String, Long>> counterMap = constructCounterMapInfo(counters, counterNames);
if (counterMap != null && !counterMap.isEmpty()) {
vertexInfo.put("counters", counterMap);
}
}
} catch (LimitExceededException e) {
// Ignore
// TODO: add an error message instead for counter key
}
return vertexInfo;
}
vertexInfo.put("finishTime", Long.toString(vertex.getFinishTime()));
vertexInfo.put("firstTaskStartTime", Long.toString(vertex.getFirstTaskStartTime()));
vertexInfo.put("lastTaskFinishTime", Long.toString(vertex.getLastTaskFinishTime()));
ProgressBuilder vertexProgress = vertex.getVertexProgress();
vertexInfo.put("totalTasks", Integer.toString(vertexProgress.getTotalTaskCount()));
vertexInfo.put("runningTasks", Integer.toString(vertexProgress.getRunningTaskCount()));
vertexInfo.put("succeededTasks", Integer.toString(vertexProgress.getSucceededTaskCount()));
vertexInfo.put("failedTaskAttempts",
Integer.toString(vertexProgress.getFailedTaskAttemptCount()));
vertexInfo.put("killedTaskAttempts",
Integer.toString(vertexProgress.getKilledTaskAttemptCount()));
try {
if (counterNames != null && !counterNames.isEmpty()) {
TezCounters counters = vertex.getCachedCounters();
Map<String, Map<String, Long>> counterMap = constructCounterMapInfo(counters, counterNames);
if (counterMap != null && !counterMap.isEmpty()) {
vertexInfo.put("counters", counterMap);
}
}
} catch (LimitExceededException e) {
// Ignore
// TODO: add an error message instead for counter key
}
return vertexInfo;
}