Search in sources :

Example 21 with TaskReport

use of org.apache.hadoop.mapreduce.v2.api.records.TaskReport in project tez by apache.

the class NotRunningJob method getTaskReport.

@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);
    Counters counters = recordFactory.newRecordInstance(Counters.class);
    counters.addAllCounterGroups(new HashMap<String, CounterGroup>());
    report.setCounters(counters);
    report.addAllRunningAttempts(new ArrayList<TaskAttemptId>());
    return resp;
}
Also used : TaskReport(org.apache.hadoop.mapreduce.v2.api.records.TaskReport) TaskAttemptId(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId) GetTaskReportResponse(org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetTaskReportResponse) CounterGroup(org.apache.hadoop.mapreduce.v2.api.records.CounterGroup) Counters(org.apache.hadoop.mapreduce.v2.api.records.Counters)

Example 22 with TaskReport

use of org.apache.hadoop.mapreduce.v2.api.records.TaskReport in project tez by apache.

the class NotRunningJob method getTaskReports.

@Override
public GetTaskReportsResponse getTaskReports(GetTaskReportsRequest request) throws IOException {
    GetTaskReportsResponse resp = recordFactory.newRecordInstance(GetTaskReportsResponse.class);
    resp.addAllTaskReports(new ArrayList<TaskReport>());
    return resp;
}
Also used : TaskReport(org.apache.hadoop.mapreduce.v2.api.records.TaskReport) GetTaskReportsResponse(org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetTaskReportsResponse)

Aggregations

TaskReport (org.apache.hadoop.mapreduce.v2.api.records.TaskReport)20 TaskId (org.apache.hadoop.mapreduce.v2.api.records.TaskId)9 Task (org.apache.hadoop.mapreduce.v2.app.job.Task)8 Test (org.junit.Test)6 TaskAttemptId (org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId)5 Job (org.apache.hadoop.mapreduce.v2.app.job.Job)5 TaskAttempt (org.apache.hadoop.mapreduce.v2.app.job.TaskAttempt)5 JobId (org.apache.hadoop.mapreduce.v2.api.records.JobId)4 JobIdPBImpl (org.apache.hadoop.mapreduce.v2.api.records.impl.pb.JobIdPBImpl)4 TaskIdPBImpl (org.apache.hadoop.mapreduce.v2.api.records.impl.pb.TaskIdPBImpl)4 PrintWriter (java.io.PrintWriter)3 HashMap (java.util.HashMap)3 TaskAttemptReport (org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptReport)3 AppContext (org.apache.hadoop.mapreduce.v2.app.AppContext)3 FewAttemptsBlock (org.apache.hadoop.mapreduce.v2.app.webapp.AttemptsPage.FewAttemptsBlock)3 Configuration (org.apache.hadoop.conf.Configuration)2 GetTaskReportResponse (org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetTaskReportResponse)2 GetTaskReportsResponse (org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetTaskReportsResponse)2 CounterGroup (org.apache.hadoop.mapreduce.v2.api.records.CounterGroup)2 Counters (org.apache.hadoop.mapreduce.v2.api.records.Counters)2