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

ASF GitHub Bot commented on YARN-11079:
---------------------------------------

susheel-gupta opened a new pull request, #5380:
URL: https://github.com/apache/hadoop/pull/5380

   Change-Id: Icb90fc5887fc282a671c92980733aed3fd7ce85f
   
   <!--
     Thanks for sending a pull request!
       1. If this is your first time, please read our contributor guidelines: 
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
       2. Make sure your PR title starts with JIRA issue id, e.g., 
'HADOOP-17799. Your PR title ...'.
   -->
   
   ### Description of PR
   
   
   ### How was this patch tested?
   
   
   ### For code changes:
   
   - [ ] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   




> Make an AbstractParentQueue to store common ParentQueue and 
> ManagedParentQueue functionality
> --------------------------------------------------------------------------------------------
>
>                 Key: YARN-11079
>                 URL: https://issues.apache.org/jira/browse/YARN-11079
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: capacity scheduler
>            Reporter: Benjamin Teke
>            Assignee: Susheel Gupta
>            Priority: Major
>
> ParentQueue is an instantiable class which stores the necessary functionality 
> of parent queues, however it is also extended by the 
> AbstractManagedParentQueue, which is an abstract class for storing managed 
> parent queue functionality. Since legacy AQC doesn't allow dynamic queues 
> next to static ones, managed parent queues technically behave like leaf 
> queues by not having any static child queues when created. This structure and 
> behaviour is really error prone, as for example if someone is not completely 
> aware of this and simply changes the checking order by first checking if the 
> queue in question is a ParentQueue in a method like 
> MappingRuleValidationContextImpl.isDynamicParent can result a completely 
> wrong return value (as a ManagedParent is a dynamic parent, but currently 
> it's also a ParentQueue, and ManagedParent cannot have the 
> isEligibleForAutoQueueCreation as true, so the method will return false). 
> {code:java}
>   private boolean isDynamicParent(CSQueue queue) {
>     if (queue == null) {
>       return false;
>     }
>     if (queue instanceof ManagedParentQueue) {
>       return true;
>     }
>     if (queue instanceof ParentQueue) {
>       return ((ParentQueue)queue).isEligibleForAutoQueueCreation();
>     }
>     return false;
>   }
> {code}
> Similarly to YARN-11024 an AbstractParentQueue class should be created to 
> completely separate the managed parents from the instantiable ParentQueue 
> class.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to