[
https://issues.apache.org/jira/browse/MAPREDUCE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12864739#action_12864739
]
Iyappan Srinivasan commented on MAPREDUCE-1758:
-----------------------------------------------
Some comments:
1) I think, we shd change whatever tcs which are checked in, which uses these
functions ina single patch. Because after checking this in, other tcs which
were using these methods will break.
2) + public void isTaskStopped(TaskID tID) throws IOException {
+
+ while (proxy.getTask(tID).getTaskStatus().getRunState()
+ == TaskStatus.State.RUNNING) {
+ UtilsForTests.waitFor(1000);
+ }
+ }
Here check "null" for proxy.getTask(tID)
3) + public void signalAllTasks(JobID id) throws IOException{
+ TaskInfo[] taskInfos = getJTClient().getProxy().getTaskInfo(id);
+ for (TaskInfo taskInfoRemaining : taskInfos) {
+ FinishTaskControlAction action = new FinishTaskControlAction(TaskID
+ .downgrade(taskInfoRemaining.getTaskID()));
+ Collection<TTClient> tts = getTTClients();
+ for (TTClient cli : tts) {
+ cli.getProxy().sendAction(action);
Check for null in taskInfos, taskInfo, action.
4) + * Allow the job to continue through MR control job.
+ * @param id,signal all the task for the current job.
+ * @throws IOException when failed to get task info.
here correct the javadoc. @param should come in next line.
5) + public boolean isJobStarted(JobID id) throws IOException {
+ JobInfo jInfo = getProxy().getJobInfo(id);
+ int counter = 0;
+ while (counter < 60) {
+ if (jInfo.getStatus().getRunState() == JobStatus.RUNNING) {
+ break;
+ } else {
+ UtilsForTests.waitFor(1000);
+ jInfo = getProxy().getJobInfo(jInfo.getID());
+ Assert.assertNotNull("Job information is null",jInfo);
+ }
+ counter++;
+ }
+ return (counter != 60)? true : false ;
+ }
a) Check null of jobInfo
b) space between parameters in functions.
6) jobInfo shd be checked for null in is JobStopped also.
7) ttClientIns.isTaskStopped(tID);
- Use AssertTrue here
> Building blocks for the herriot test cases
> --------------------------------------------
>
> Key: MAPREDUCE-1758
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-1758
> Project: Hadoop Map/Reduce
> Issue Type: New Feature
> Reporter: Balaji Rajagopalan
> Assignee: Balaji Rajagopalan
> Priority: Minor
> Attachments: bb_patch.txt
>
>
> There is so much commonality in the test cases that we are writing, so it is
> pertinent to create reusable code. The common methods will be added to
> herriot framework.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.