From 783cc3eda0a9a6f73b155ae183b949afed8feb2a Mon Sep 17 00:00:00 2001 From: Junfan Zhang Date: Fri, 15 Mar 2024 08:14:38 +0800 Subject: [PATCH] YARN-11660. Fix performance regression for SingleConstraintAppPlacementAllocator (#6623) Contributed by Junfan Zhang. Reviewed-by: Shilun Fan Reviewed-by: Dinesh Chitlangia Signed-off-by: Shilun Fan --- .../placement/SingleConstraintAppPlacementAllocator.java | 2 ++ 1 file changed, 2 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/placement/SingleConstraintAppPlacementAllocator.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/placement/SingleConstraintAppPlacementAllocator.java index 27e116660f..bc523826a7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/placement/SingleConstraintAppPlacementAllocator.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/placement/SingleConstraintAppPlacementAllocator.java @@ -309,6 +309,8 @@ private void decreasePendingNumAllocation() { // Deduct pending #allocations by 1 ResourceSizing sizing = schedulingRequest.getResourceSizing(); sizing.setNumAllocations(sizing.getNumAllocations() - 1); + + appSchedulingInfo.decPendingResource(targetNodePartition, sizing.getResources()); } @Override