Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • capacity scheduler
    • None
    • Reviewed

    Description

      ProportionalCapacityPreemptionPolicy selects the potential LeafQueues to be preempted by this logic:

      private Set<String> getLeafQueueNames(TempQueuePerPartition q) {
          // If its a ManagedParentQueue, it might not have any children
          if ((q.children == null || q.children.isEmpty())
              && !(q.parentQueue instanceof ManagedParentQueue)) {
            return ImmutableSet.of(q.queueName);
          }
      
          Set<String> leafQueueNames = new HashSet<>();
          for (TempQueuePerPartition child : q.children) {
            leafQueueNames.addAll(getLeafQueueNames(child));
          }
      
          return leafQueueNames;
        }
      

      This, however does not take childless ParentQueues (which was introduced in YARN-10596) into account. 

      A childless ParentQueue will throw a NPE in FifoCandidatesSelector#selectCandidates:

              LeafQueue leafQueue = preemptionContext.getQueueByPartition(queueName,
                RMNodeLabelsManager.NO_LABEL).leafQueue;
      

      TempQueuePerPartition has a leafQueue member variable, which is null, if the queue is not a LeafQueue. In case of childless ParentQueue, it is null, but its name is present in the leafQueueNames as stated before.
       

      Attachments

        1. YARN-10622.001.patch
          6 kB
          Andras Gyori

        Activity

          People

            gandras Andras Gyori
            gandras Andras Gyori
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: