From 759d7d58fa41e460c95313488af26426b95f2e5b Mon Sep 17 00:00:00 2001 From: Robert Kanter Date: Tue, 10 Oct 2017 10:14:42 -0700 Subject: [PATCH] YARN-7309. TestClientRMService#testUpdateApplicationPriorityRequest and TestClientRMService#testUpdatePriorityAndKillAppWithZeroClusterResource test functionality not supported by FairScheduler (rkanter) (cherry picked from commit ec8bf9e48ac4dc675516a57c06a29890b5138548) --- .../yarn/server/resourcemanager/TestClientRMService.java | 8 ++++++++ 1 file changed, 8 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/TestClientRMService.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestClientRMService.java index 34166f6e23f..df5fae37c2b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestClientRMService.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestClientRMService.java @@ -142,6 +142,7 @@ import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerAppRepor import org.apache.hadoop.yarn.server.resourcemanager.scheduler.YarnScheduler; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration; +import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler; import org.apache.hadoop.yarn.server.resourcemanager.security.QueueACLsManager; import org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey; @@ -152,6 +153,7 @@ import org.apache.hadoop.yarn.util.UTCClock; import org.apache.hadoop.yarn.util.resource.ResourceCalculator; import org.apache.hadoop.yarn.util.resource.Resources; import org.junit.Assert; +import org.junit.Assume; import org.junit.Test; import com.google.common.collect.ImmutableSet; @@ -1675,6 +1677,9 @@ public class TestClientRMService { int maxPriority = 10; int appPriority = 5; YarnConfiguration conf = new YarnConfiguration(); + Assume.assumeFalse("FairScheduler does not support Application Priorities", + conf.get(YarnConfiguration.RM_SCHEDULER) + .equals(FairScheduler.class.getName())); conf.setInt(YarnConfiguration.MAX_CLUSTER_LEVEL_APPLICATION_PRIORITY, maxPriority); MockRM rm = new MockRM(conf); @@ -1693,6 +1698,9 @@ public class TestClientRMService { int maxPriority = 10; int appPriority = 5; YarnConfiguration conf = new YarnConfiguration(); + Assume.assumeFalse("FairScheduler does not support Application Priorities", + conf.get(YarnConfiguration.RM_SCHEDULER) + .equals(FairScheduler.class.getName())); conf.setInt(YarnConfiguration.MAX_CLUSTER_LEVEL_APPLICATION_PRIORITY, maxPriority); MockRM rm = new MockRM(conf);