[
https://issues.apache.org/jira/browse/MAPREDUCE-5234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13659728#comment-13659728
]
Zhijie Shen commented on MAPREDUCE-5234:
----------------------------------------
It's mapreduce.TaskReport, not mapred.TaskReport, as the test class is in the
mapreduce package as well.
{code}
---
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapreduce/TestJob.java
+++
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapreduce/TestJob.java
{code}
{code}
+ TaskReport treport =
+ new TaskReport(tid1, 0.0f, State.FAILED.toString(), null,
+ TIPStatus.FAILED, 100, 100, new Counters());
{code}
The following code seems irrelevant. TaskReport can be tested independently.
{code}
+ Cluster cluster = mock(Cluster.class);
+ ClientProtocol client = mock(ClientProtocol.class);
{code}
{code}
+ when(client.getJobStatus(jobid)).thenReturn(status);
+ TaskReport[] tr = new TaskReport[1];
+ tr[0] = treport;
+ when(client.getTaskReports(jobid, TaskType.MAP)).thenReturn(tr);
+ when(client.getTaskReports(jobid, TaskType.REDUCE)).thenReturn(tr);
+ when(client.getTaskCompletionEvents(jobid, 0, 10)).thenReturn(
+ new TaskCompletionEvent[0]);
+ Job job = Job.getInstance(cluster, status, new JobConf());
+ Assert.assertNotNull(job.toString());
+ TaskReport[] tr1 = client.getTaskReports(jobid, TaskType.MAP);
{code}
> Signature changes for getTaskId of TaskReport in mapred
> -------------------------------------------------------
>
> Key: MAPREDUCE-5234
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-5234
> Project: Hadoop Map/Reduce
> Issue Type: Sub-task
> Reporter: Zhijie Shen
> Assignee: Mayank Bansal
> Attachments: MAPREDUCE-5234-trunk-1.patch,
> MAPREDUCE-5234-trunk-2.patch, MAPREDUCE-5234-trunk-3.patch
>
>
> TaskReport in mapred of MR2 extends TaskReport in mapreduce, and inherits
> getTaskId, which return TaskID object. in MR1, this function returns String.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira