You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Scott Chen (JIRA)" <ji...@apache.org> on 2009/11/09 22:51:33 UTC

[jira] Created: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Alternatively schedule different types of tasks in fair share scheduler
-----------------------------------------------------------------------

                 Key: MAPREDUCE-1198
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
             Project: Hadoop Map/Reduce
          Issue Type: Improvement
          Components: contrib/fair-share
            Reporter: Scott Chen
            Assignee: Scott Chen


Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780757#action_12780757 ] 

Hudson commented on MAPREDUCE-1198:
-----------------------------------

Integrated in Hadoop-Mapreduce-trunk-Commit #125 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/125/])
    . Alternatively schedule different types of tasks in fair share
scheduler. Contributed by Scott Chen.


> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch, MAPREDUCE-1198-v4.patch, MAPREDUCE-1198-v5.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784912#action_12784912 ] 

Hudson commented on MAPREDUCE-1198:
-----------------------------------

Integrated in Hadoop-Mapreduce-trunk #162 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-Mapreduce-trunk/162/])
    

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch, MAPREDUCE-1198-v4.patch, MAPREDUCE-1198-v5.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Matei Zaharia (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matei Zaharia updated MAPREDUCE-1198:
-------------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch, MAPREDUCE-1198-v4.patch, MAPREDUCE-1198-v5.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Matei Zaharia (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779747#action_12779747 ] 

Matei Zaharia commented on MAPREDUCE-1198:
------------------------------------------

I'm taking a look at it. It looks okay so far, except I don't understand why you have if (mapRejected == true) as part of the condition to set mapRejected = true (and similar for reduceRejected). This looks like it won't change anything, but it will just write extra statements to the log.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779063#action_12779063 ] 

Scott Chen commented on MAPREDUCE-1198:
---------------------------------------

Thanks for the comments, Matei.
I see. So I should consider one task at a time and alternate between task types. I will work on the new patch and post it soon.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Attachment: MAPREDUCE-1198-v5.patch

1. I have changed mapAssigned and reduceAssigned variables to mapsAssigned and reducesAssigned.
2. I agree that using the foundTask flag is a better idea. It does make the code clear and the function is the same. So I also made the change.
3. I still feel bad about creating a new hashmap for every task assigned. So in this patch there are two hashmap: one for map and the other dummy one for reduce. I don't know if you like this solution. If you think this is not good, we can change it back to your proposal.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch, MAPREDUCE-1198-v4.patch, MAPREDUCE-1198-v5.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Attachment: MAPREDUCE-1198-v2.patch

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779838#action_12779838 ] 

Hadoop QA commented on MAPREDUCE-1198:
--------------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12425418/MAPREDUCE-1198-v3.patch
  against trunk revision 881673.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 3 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/143/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/143/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/143/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/143/console

This message is automatically generated.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Attachment: MAPREDUCE-1198-v2.patch

I rewrite the loop such that it can assign only one task at a time. The loop will choose the task type to be assigned every time.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780688#action_12780688 ] 

Scott Chen commented on MAPREDUCE-1198:
---------------------------------------

Thanks a lot for all the help, Matei

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch, MAPREDUCE-1198-v4.patch, MAPREDUCE-1198-v5.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Matei Zaharia (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778540#action_12778540 ] 

Matei Zaharia commented on MAPREDUCE-1198:
------------------------------------------

Hi Scott,

I don't think what you have is quite the right fix, because when a node has space to launch more than one task, the scheduler will still assign multiple tasks of the same type rather than alternating between them. In the pre-0.21 fair scheduler, where only one task of each type was assigned per heartbeat, this solution would've worked okay. However, in the current trunk, the scheduler can launch multiple tasks per heartbeat, and with your code, it will launch many maps or many reduces (depending on which one it had fewer of), but not both.

The right thing would be to add a while loop outside the current for loop. On each iteration of the while loop, you'd order the task types (as {map, reduce} or {reduce, map}) and then look for a single task to launch. You then stop the while loop when neither maps nor reduces have been launched in a particular iteration. That's what I tried to describe in my post on MAPREDUCE-961, sorry if it wasn't clear.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779633#action_12779633 ] 

Scott Chen commented on MAPREDUCE-1198:
---------------------------------------

The test fail is related to MAPREDUCE-915. It has been fixed in MAPREDUCE-687.

@Matei: Can you help me review the new patch again? Thank you.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

        Fix Version/s: 0.22.0
    Affects Version/s: 0.22.0
               Status: Patch Available  (was: Open)

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780186#action_12780186 ] 

Scott Chen commented on MAPREDUCE-1198:
---------------------------------------

I agree with all these points. They are all good suggestions. Thank you for the careful review. I will start work on them.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779778#action_12779778 ] 

Scott Chen commented on MAPREDUCE-1198:
---------------------------------------

My intention is that when a task type is rejected once, it should always be rejected. Since it is the first condition in || (or), if it is true the following condition checks will be skipped. 

But you are right, this will not change the logic if we remove it. If it is confusing, I think it is OK to remove it.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779780#action_12779780 ] 

Scott Chen commented on MAPREDUCE-1198:
---------------------------------------

You are right about the LOG. I didn't aware that the LOG should write only on the first time. I will fix this and post it right away.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Status: Open  (was: Patch Available)

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Status: Patch Available  (was: Open)

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Matei Zaharia (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780178#action_12780178 ] 

Matei Zaharia commented on MAPREDUCE-1198:
------------------------------------------

I've looked at the patch in more detail. It mostly looks good, but I have a question: When no task is found in the loop over Schedulables (for (Schedulable sched: scheds)), why do you still increase the mapAssigningCount or reduceAssigningCount after the loop? My guess is that you're increasing it so that it reaches its cap and we stop trying to assign that type of task. However, it would be clearer if you just set mapRejected or reduceRejected to true when you don't find a task of that type. You could add a boolean variable outside the loop called foundTask, initialize it to false, and set it to true when you do find a task (before the break). Then, after the loop, if findTask == false, set mapRejected or reduceRejected to true.

Also, a couple of smaller comments:
* Instead of the names mapAssigningCount and reduceAssigningCount, you can use mapsAssigned and reducesAssigned.
* In the inner loop, the launchedMap.add(job); statement that is inside an if (taskType == TaskType.MAP) could be moved below to the MAP case of the "update running task counts" statement.
* "to prevent the type from starving" -> "to prevent that task type from starving"
* Capitalize the this in "// this is the only exit of the while (true) loop"

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Attachment: MAPREDUCE-1198-v3.patch

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Matei Zaharia (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780281#action_12780281 ] 

Matei Zaharia commented on MAPREDUCE-1198:
------------------------------------------

A couple of comments:
* I think initializing the HashSet outside the while loop and clearing it on every for iteration is unnecessary optimization. I'd suggest initializing it in the while loop instead (i.e. have it be a variable right above the for (Schedulable sched: scheds) loop). Also, if you do this, you don't need to clear the set in each iteration of the for loop, and you can do the visitedForMap.addAll() after the for loop. It's okay if a job is added to the HashSet twice - after all, it is a Set. The only thing we want to avoid is having the same set used for maps and reduces.
* It would be better to call the mapAssigned and reduceAssigned variables mapsAssigned and reducesAssigned instead, to make it clear that they're counts.
* In my opinion setting mapRejected / reduceRejected = true and then unsetting it is more confusing than having an extra foundTask flag that is set to true when we find a task. I'd prefer the latter, because I want the code to be as easy as possible for a newcomer to understand. However, I don't have strong feelings about this.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch, MAPREDUCE-1198-v4.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Attachment: MAPREDUCE-1198-v1.patch

In FairScheduler.assignTasks(), before scanning the jobs for a map and a reduce, we first sort the task type order according to the number of running maps and reduces on the TT. The original way will always first look at a map and then a reduce which may starve reduce tasks.

This is basically an implementation of Matei's pseudo code mentioned in MAPREDUCE-961.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>         Attachments: MAPREDUCE-1198-v1.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Status: Open  (was: Patch Available)

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Status: Open  (was: Patch Available)

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778647#action_12778647 ] 

Hadoop QA commented on MAPREDUCE-1198:
--------------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12425128/MAPREDUCE-1198-v1.patch
  against trunk revision 836063.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 3 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/246/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/246/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/246/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/246/console

This message is automatically generated.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Status: Patch Available  (was: Open)

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Priority: Minor  (was: Major)

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>            Priority: Minor
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Priority: Major  (was: Minor)

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Attachment:     (was: MAPREDUCE-1198-v3.patch)

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Attachment: MAPREDUCE-1198-v3.patch

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779268#action_12779268 ] 

Hadoop QA commented on MAPREDUCE-1198:
--------------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12425272/MAPREDUCE-1198-v2.patch
  against trunk revision 881536.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 3 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    -1 core tests.  The patch failed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/249/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/249/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/249/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/249/console

This message is automatically generated.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779783#action_12779783 ] 

Scott Chen commented on MAPREDUCE-1198:
---------------------------------------

I did a minor change on the reject condition check. Now it will not print the log repeatedly. Thanks for pointing this out, Matei.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Attachment:     (was: MAPREDUCE-1198-v2.patch)

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Attachment: MAPREDUCE-1198-v4.patch

I have revised the code according to Matei's suggestions. 
1. Initialize the rejection flags to true. So if the task is not found, it will be mark as rejected
2. Change the counter to mapAssigned and reduceAssigned and move them in the proper places
3. Move the initialization of the HashSet visited outside the loop to avoid repeated initialization
4. Changes of the comments according to the suggestions.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch, MAPREDUCE-1198-v4.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Matei Zaharia (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780745#action_12780745 ] 

Matei Zaharia commented on MAPREDUCE-1198:
------------------------------------------

+1, looks good. I've committed the patch. Thanks Scott!

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch, MAPREDUCE-1198-v4.patch, MAPREDUCE-1198-v5.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Updated: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Scott Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Chen updated MAPREDUCE-1198:
----------------------------------

    Status: Patch Available  (was: Open)

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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


[jira] Commented: (MAPREDUCE-1198) Alternatively schedule different types of tasks in fair share scheduler

Posted by "Matei Zaharia (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780477#action_12780477 ] 

Matei Zaharia commented on MAPREDUCE-1198:
------------------------------------------

This looks good, the two hashsets are a good idea. I'll take another quick look at it tomorrow and commit it.

> Alternatively schedule different types of tasks in fair share scheduler
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1198
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1198
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>    Affects Versions: 0.22.0
>            Reporter: Scott Chen
>            Assignee: Scott Chen
>             Fix For: 0.22.0
>
>         Attachments: MAPREDUCE-1198-v1.patch, MAPREDUCE-1198-v2.patch, MAPREDUCE-1198-v3.patch, MAPREDUCE-1198-v4.patch, MAPREDUCE-1198-v5.patch
>
>
> Matei has mentioned in MAPREDUCE-961 that the current scheduler will first try to launch map tasks until canLaunthTask() returns false then look for reduce tasks. This might starve reduce task. He also mention that alternatively schedule different types of tasks can solve this problem.

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