susheelgupta7 commented on code in PR #7607: URL: https://github.com/apache/hadoop/pull/7607#discussion_r2053932024
########## hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/ProportionalCapacityPreemptionPolicy.java: ########## @@ -430,12 +430,14 @@ private void cleanupStaledPreemptionCandidates(long currentTime) { } private Set<String> getLeafQueueNames(TempQueuePerPartition q) { - // Also exclude ParentQueues, which might be without children - if (CollectionUtils.isEmpty(q.children) - && !(q.parentQueue instanceof ManagedParentQueue) - && (q.parentQueue == null - || !q.parentQueue.isEligibleForAutoQueueCreation())) { - return ImmutableSet.of(q.queueName); + // Only consider this a leaf queue if: + // It is a concrete leaf queue (not a childless parent) + if (CollectionUtils.isEmpty(q.children)) { + CSQueue queue = scheduler.getQueue(q.queueName); + if (queue instanceof LeafQueue || queue instanceof AutoCreatedLeafQueue) { Review Comment: Yes, we need to add AbstractLeafQueue instead of LeafQueue or AutoCreatedLeafQueue . Inheritance Hierarchy of AbstractLeafQueue: >LeafQueue >AutoCreatedLeafQueue >ReservationQueue Then checking for AbstractLeafQueue will includes all its subclasses. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org