List of usage examples for org.apache.hadoop.mapreduce.v2.api.records Counters addAllCounterGroups
public abstract void addAllCounterGroups(Map<String, CounterGroup> counterGroups);
From source file:org.apache.tez.mapreduce.client.NotRunningJob.java
License:Apache License
@Override public GetCountersResponse getCounters(GetCountersRequest request) throws IOException { GetCountersResponse resp = recordFactory.newRecordInstance(GetCountersResponse.class); Counters counters = recordFactory.newRecordInstance(Counters.class); counters.addAllCounterGroups(new HashMap<String, CounterGroup>()); resp.setCounters(counters);//from ww w .ja v a2 s . co m return resp; }
From source file:org.apache.tez.mapreduce.client.NotRunningJob.java
License:Apache License
@Override public GetTaskReportResponse getTaskReport(GetTaskReportRequest request) throws IOException { GetTaskReportResponse resp = recordFactory.newRecordInstance(GetTaskReportResponse.class); TaskReport report = recordFactory.newRecordInstance(TaskReport.class); report.setTaskId(request.getTaskId()); report.setTaskState(TaskState.NEW);/*from w w w .j a v a2s .c o m*/ Counters counters = recordFactory.newRecordInstance(Counters.class); counters.addAllCounterGroups(new HashMap<String, CounterGroup>()); report.setCounters(counters); report.addAllRunningAttempts(new ArrayList<TaskAttemptId>()); return resp; }