From 19af2289571b68d1d474462cd06fb87450732e16 Mon Sep 17 00:00:00 2001 From: Weiwei Yang Date: Mon, 29 Oct 2018 11:53:10 +0800 Subject: [PATCH] YARN-8944. TestContainerAllocation.testUserLimitAllocationMultipleContainers failure after YARN-8896. Contributed by Wilfred Spiegelenburg. (cherry picked from commit 1d90a0dd23c5d1bd52d04c303506806d0dc61cd2) (cherry picked from commit 70efe253f369f579f05d833d45e6a1bae3e41dfe) (cherry picked from commit cd8e9fa80b2903935ca9c337631e60161a6053b3) --- .../scheduler/capacity/TestContainerAllocation.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestContainerAllocation.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestContainerAllocation.java index c1fcda86fe4..51647381796 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestContainerAllocation.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestContainerAllocation.java @@ -67,6 +67,7 @@ import org.junit.Before; import org.junit.Test; import static org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration.MAXIMUM_ALLOCATION_MB; +import static org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration.MAX_ASSIGN_PER_HEARTBEAT; public class TestContainerAllocation { @@ -902,6 +903,9 @@ public class TestContainerAllocation { CapacitySchedulerConfiguration newConf = (CapacitySchedulerConfiguration) TestUtils .getConfigurationWithMultipleQueues(conf); + // make sure an unlimited number of containers can be assigned, + // overriding the default of 100 after YARN-8896 + newConf.set(MAX_ASSIGN_PER_HEARTBEAT, "-1"); newConf.setUserLimit("root.c", 50); MockRM rm1 = new MockRM(newConf);