You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-dev@hadoop.apache.org by "Benjamin Teke (Jira)" <ji...@apache.org> on 2022/02/22 16:14:00 UTC
[jira] [Created] (YARN-11079) Make an AbstractParentQueue to store common ParentQueue and ManagedParentQueue functionality
Benjamin Teke created YARN-11079:
------------------------------------
Summary: 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: Szilard Nemeth
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 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).
{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.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-dev-help@hadoop.apache.org