Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-10889 [Umbrella] Queue Creation in Capacity Scheduler - Tech debts
  3. YARN-11079

Make an AbstractParentQueue to store common ParentQueue and ManagedParentQueue functionality

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersStop watchingWatchersConvert to IssueMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      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).

        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;
        }
      

      Similarly to YARN-11024 an AbstractParentQueue class should be created to completely separate the managed parents from the instantiable ParentQueue class.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            susheel.gupta Susheel Gupta Assign to me
            bteke Benjamin Teke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment