public void getDagInfo() {
    if (!setupResponse()) {
      return;
    }
    DAG dag = checkAndGetDAGFromRequest();
    if (dag == null) {
      return;
    }
    Map<String, Set<String>> counterNames = getCounterListFromRequest();
    Map<String, Object> dagInfo = new HashMap<String, Object>();
    dagInfo.put("id", dag.getID().toString());
    dagInfo.put("progress", Float.toString(dag.getCompletedTaskProgress()));
    dagInfo.put("status", dag.getState().toString());
    try {
      if (counterNames != null && !counterNames.isEmpty()) {
        TezCounters counters = dag.getCachedCounters();
        Map<String, Map<String, Long>> counterMap = constructCounterMapInfo(counters, counterNames);
        if (counterMap != null && !counterMap.isEmpty()) {
          dagInfo.put("counters", counterMap);
        }
      }
    } catch (LimitExceededException e) {
      // Ignore
      // TODO: add an error message instead for counter key
    }
    renderJSON(ImmutableMap.of(
        "dag", dagInfo
    ));
  }
public void getDagInfo() {
    if (!setupResponse()) {
      return;
    }
    DAG dag = checkAndGetDAGFromRequest();
    if (dag == null) {
      return;
    }
    Map<String, Set<String>> counterNames = getCounterListFromRequest();
    Map<String, Object> dagInfo = new HashMap<String, Object>();
    dagInfo.put("id", dag.getID().toString());
    dagInfo.put("progress", Float.toString(dag.getCompletedTaskProgress()));
    dagInfo.put("status", dag.getState().toString());
    try {
      if (counterNames != null && !counterNames.isEmpty()) {
        TezCounters counters = dag.getCachedCounters();
        Map<String, Map<String, Long>> counterMap = constructCounterMapInfo(counters, counterNames);
        if (counterMap != null && !counterMap.isEmpty()) {
          dagInfo.put("counters", counterMap);
        }
      }
    } catch (LimitExceededException e) {
     
     
    }
    renderJSON(ImmutableMap.of(
        "dag", dagInfo
    ));
  }
public void getdaginfo() { if (!setupresponse()) { return; } dag dag = checkandgetdagfromrequest(); if (dag == null) { return; } map<string, set<string>> counternames = getcounterlistfromrequest(); map<string, object> daginfo = new hashmap<string, object>(); daginfo.put("id", dag.getid().tostring()); daginfo.put("progress", float.tostring(dag.getcompletedtaskprogress())); daginfo.put("status", dag.getstate().tostring()); try { if (counternames != null && !counternames.isempty()) { tezcounters counters = dag.getcachedcounters(); map<string, map<string, long>> countermap = constructcountermapinfo(counters, counternames); if (countermap != null && !countermap.isempty()) { daginfo.put("counters", countermap); } } } catch (limitexceededexception e) { } renderjson(immutablemap.of( "dag", daginfo )); }