From 991100b9af69adef6520085df398245b7480ab9e Mon Sep 17 00:00:00 2001 From: Junfan Zhang Date: Tue, 24 Dec 2024 15:57:53 +0800 Subject: [PATCH] YARN-11747. Skip the empty requests with specified scheduling key in RegularContainerAllocator --- .../capacity/allocator/RegularContainerAllocator.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/allocator/RegularContainerAllocator.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/allocator/RegularContainerAllocator.java index 2fde382b8e8e7..37c1f7c9a0a23 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/allocator/RegularContainerAllocator.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/allocator/RegularContainerAllocator.java @@ -951,6 +951,10 @@ public CSAssignment assignContainers(Resource clusterResource, // Schedule in priority order for (SchedulerRequestKey schedulerKey : application.getSchedulerKeys()) { + if (application.getOutstandingAsksCount(schedulerKey) <= 0) { + continue; + } + ContainerAllocation result = allocate(clusterResource, candidates, schedulingMode, resourceLimits, schedulerKey, null);