Wei Yan commented on YARN-2083:

[~tianyi], here are some comments.
1. The tab size should be 2 characters .
public static boolean fitsInWithoutEqual(Resource smaller, Resource bigger) {
    return smaller.getMemory() < bigger.getMemory() &&
            smaller.getVirtualCores() < bigger.getVirtualCores();

2. Some lines in testAssignContainerPreCheck function are over 80 characters. 
We like to keep lines to max 80 characters.

3. IMO, the objective of testAssignContainerPreCheck function is used to verify 
whether the preCheck can work well when resourceUsage is smaller/euqal/larger 
than maxResource. We may need to add some testcases in this function.

4. Another nitty comment: there is one unnecessary line at the end of the 

> 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
>         Attachments: 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