Wei Yan commented on YARN-2083:

Thanks, [~tianyi]. Here are more comments.
Could we move the test code to a new file TestFSQueue.java, as the evaluated 
function is located in FSQueue.

    boolean couldAssignMoreContainer = schedulable.assignContainerPreCheck(
        new FSSchedulerNode(fakeNode, true));
We don't need to create a new FSSchedulerNode each time. Just create one.

some nitty comments: (1) for comment style, I may much prefer "// Test the..." 
instead of "//test the...". You can check the other comments in the code.
(2) Not need to create "couldAssignMoreContainer", just directly put the 
assignContainerPreCheck function inside the assertTrue/False.

> In fair scheduler, Queue should not been assigned more containers when its 
> usedResource had reach the maxResource limit
> -----------------------------------------------------------------------------------------------------------------------
>                 Key: YARN-2083
>                 URL: https://issues.apache.org/jira/browse/YARN-2083
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: scheduler
>    Affects Versions: 2.3.0
>            Reporter: Yi Tian
>              Labels: assignContainer, fair, scheduler
>             Fix For: 2.4.1
>         Attachments: YARN-2083-1.patch, YARN-2083.patch
> In fair scheduler, FSParentQueue and FSLeafQueue do an 
> assignContainerPreCheck to guaranty this queue is not over its limit.
> But the fitsIn function in Resource.java did not return false when the 
> usedResource equals the maxResource.
> I think we should create a new Function "fitsInWithoutEqual" instead of 
> "fitsIn" in this case.

This message was sent by Atlassian JIRA

Reply via email to