[ 
https://issues.apache.org/jira/browse/YARN-4975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15838792#comment-15838792
 ] 

Daniel Templeton commented on YARN-4975:
----------------------------------------

Changes look good to me.  Couple of nits:

* This message: "Can't mark <reservation> to a parent queue: " could be 
clearer; maybe "The configuration settings for " + queue + " are invalid.  A 
queue element that contains child queue elements or that has the type="parent" 
attribute cannot also include a reservation element."
* I'm not a huge fan of expected exceptions in tests.  I'd rather you catch the 
exception and make sure the exception text is from the right exception.  With 
expected exceptions, you could get the exception for the wrong reason and still 
pass.
* In the last test, it would be nice to do a couple of basic asserts to confirm 
that the config was instantiated correctly, i.e. check that the parent and 
child queues exist.  It's redundant, but better to be safe.

> Fair Scheduler: exception thrown when a parent queue marked 'parent' has 
> configured child queues
> ------------------------------------------------------------------------------------------------
>
>                 Key: YARN-4975
>                 URL: https://issues.apache.org/jira/browse/YARN-4975
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: fairscheduler
>    Affects Versions: 2.7.2
>            Reporter: Ashwin Shankar
>            Assignee: Yufei Gu
>         Attachments: YARN-4975.001.patch
>
>
> We upgraded our clusters to 2.7.2 from 2.4.1 and saw the following exception 
> in RM logs :
> {code}
> Caused by: 
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.AllocationConfigurationException:
>  Both <reservation> and type="parent" found for queue root.adhoc which is 
> unsupported
>         at 
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.AllocationFileLoaderService.loadQueue(AllocationFileLoaderService.java:519)
>         at 
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.AllocationFileLoaderService.reloadAllocations(AllocationFileLoaderService.java:352)
>         at 
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler.initScheduler(FairScheduler.java:1440)
> {code}
> From the exception, it looks like we've configured 'reservation', but we've 
> not. The issue is that AllocationFileLoaderService#loadQueue assumes that a 
> parent queue marked as 'type=parent' cannot have configured child queues. 
> That can be a problem in cases where we mark a queue as 'parent' which has no 
> configured child queues to start with, but we can add child queues later on.
> Also the exception message is kind of misleading since we haven't configured 
> 'reservation'. 
> How to reproduce:
> Run fair scheduler with following queue config:
> {code}
> <queue name="p" type="parent">
>         <weight>10</weight>
>         <maxRunningApps>300</maxRunningApps>
>         <queue name="c">
>             <weight>3</weight>
>          </queue>
> </queue>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to