[ 
https://issues.apache.org/jira/browse/MAPREDUCE-1871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884649#action_12884649
 ] 

Iyappan Srinivasan commented on MAPREDUCE-1871:
-----------------------------------------------

Consider lowering log levels in JobTrackerAspect.aj. I think there's no need to 
print clearly debug messages with INFO level. 
- Lowered.

+ * @return int isn't very informative. 
- Gave more information

this is very C-like programming style: 
+ /**
+ * This gets the value of all task trackers windows in the tasktracker page.
+ *
+ * @param none,
+ * @return int[] of all the tasks that ran, in the sequence given below
+ * "since_start", "total_tasks"
+ * "since_start","succeeded_tasks"
+ * "last_hour", "total_tasks"
+ * "last_hour", "succeeded_tasks"
+ * "last_day", "total_tasks"
+ * "last_day", "succeeded_tasks"
+ */
why don't you use an object container instead? It will make code like this
+ int totalTasksSinceStartBeforeJob = ttAllInfo[0];
+ int succeededTasksSinceStartBeforeJob = ttAllInfo[1];
+ int totalTasksLastHourBeforeJob = ttAllInfo[2];
+ int succeededTasksLastHourBeforeJob = ttAllInfo[3];
much clearer and readable.
- Code is right now like this. If you check the testcases, values are getting 
received in the way you mentioned. When using Aspectj, I cannot use ArrayLists 
or Integer Arrays as return values in JobTracker. So, used int array .

bad choice of class name TestTaskTrackerInfoFirst as well as 
TestTaskTrackerInfoSecond 

- Gave them names of TestTaskTrackerInfoSuccessfulFailedJobs.java and 
TestTaskTrackerInfoTTProcess.java

some of the tests are commented out //@Test. Please consider to take them away 
all together if they aren't going to be used. You'd better add them later in a 
separate JIRA. 

- Removed the comments. Actually they are perfectly working testcases.

in the second test class waiting and log levels in waitForTTStop() and 
waitForTTStart() seem to be inconsistent. 
- Made them consistent.



> Create automated test scenario for "Collect information about number of tasks 
> succeeded / total per time unit for a tasktracker"
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1871
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1871
>             Project: Hadoop Map/Reduce
>          Issue Type: Test
>          Components: test
>            Reporter: Iyappan Srinivasan
>            Assignee: Iyappan Srinivasan
>         Attachments: 1871-ydist-security-patch.txt, 
> 1871-ydist-security-patch.txt, 1871-ydist-security-patch.txt
>
>
> Create automated test scenario for "Collect information about number of tasks 
> succeeded / total per time unit for a tasktracker"
> 1) Verification of all the above mentioned fields with the specified TTs. 
> Total no. of tasks and successful tasks should be equal to the corresponding 
> no. of tasks specified in TTs logs
> 2)  Fail a task on tasktracker.  Node UI should update the status of tasks on 
> that TT accordingly. 
> 3)  Kill a task on tasktracker.  Node UI should update the status of tasks on 
> that TT accordingly
> 4) Positive Run simultaneous jobs and check if all the fields are populated 
> with proper values of tasks.  Node UI should have correct valiues for all the 
> fields mentioned above. 
> 5)  Check the fields across one hour window  Fields related to hour should be 
> updated after every hour
> 6) Check the fields across one day window  fields related to hour should be 
> updated after every day
> 7) Restart a TT and bring it back.  UI should retain the fields values.  
> 8) Positive Run a bunch of jobs with 0 maps and 0 reduces simultanously.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to