Anubhav Dhoot commented on YARN-3101:

YARN-2811 added the following
private boolean fitInMaxShare(FSQueue queue) {
    if (Resources.fitsIn(queue.getResourceUsage(), queue.getMaxShare())) {
      return false;

This should have been
if (!Resources.fitsIn(queue.getResourceUsage(), queue.getMaxShare()))

Because of this we would always reject reservations and hence the test was 
Adding a new patch that shows this via a negative test case (reservation should 
not be dropped when not exceeding). This fails without the new fix.

> FairScheduler#fitInMaxShare was added to validate reservations but it does 
> not consider it 
> -------------------------------------------------------------------------------------------
>                 Key: YARN-3101
>                 URL: https://issues.apache.org/jira/browse/YARN-3101
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: fairscheduler
>            Reporter: Anubhav Dhoot
>            Assignee: Anubhav Dhoot
>         Attachments: YARN-3101.001.patch, YARN-3101.002.patch
> YARN-2811 added fitInMaxShare to validate reservations on a queue, but did 
> not count it during its calculations. It also had the condition reversed so 
> the test was still passing because both cancelled each other. 

This message was sent by Atlassian JIRA

Reply via email to