Example usage for org.apache.hadoop.mapreduce.v2.api.records TaskReport addAllRunningAttempts

List of usage examples for org.apache.hadoop.mapreduce.v2.api.records TaskReport addAllRunningAttempts

Introduction

In this page you can find the example usage for org.apache.hadoop.mapreduce.v2.api.records TaskReport addAllRunningAttempts.

Prototype

public abstract void addAllRunningAttempts(List<TaskAttemptId> taskAttempts);

Source Link

Usage

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  ww.  ja v  a 2 s.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;
}