hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Boudnik (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MAPREDUCE-1871) Create automated test scenario for "Collect information about number of tasks succeeded / total per time unit for a tasktracker"
Date Wed, 07 Jul 2010 02:01:53 GMT

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

Konstantin Boudnik commented on MAPREDUCE-1871:
-----------------------------------------------

bq. 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 .

I think there's a confusion here. Current code uses an int array as a return type and then
you accessing the content of the array by accessing the elements of array i.e. {{int succeededTasksSinceStartBeforeJob
= ttAllInfo[1];}} This is bad for at least two reasons:
- it is hard to say what [1] or [2] means. But you can fix this by having named constants
for the array elements (although, it is still C-like programming style)
- you have to keep the order of elements to be synced both on the producer (JT) and consumer
(your test) sides. This is ugly and hard to maintain.

What I have suggested is this. Instead of int array have class Foo with a number of int fields,
a constructor, and a bunch of getters returning int as well. Instead of creating an array
now you'll instantiate an object type Foo by passing whatever values you need to its constructor.
The following method signature {{public int[] JobTracker.getInfoFromAllClientsForAllTaskType()}}
will change to {{public Foo JobTracker.getInfoFromAllClientsForAllTaskType()}}. Your test
will be accessing the needed value via particular getters from the object say: {{foo.getSucceededTasksSinceStartBeforeJob()}}
(also, the name doesn't make much sense to me... sincestartbefore ?).

Hope it makes more sense now.


> 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,
1871-ydist-security-patch.txt, MAPREDUCE-1871.patch, MAPREDUCE-1871.patch
>
>
> 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.


Mime
View raw message