hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ka...@apache.org
Subject git commit: YARN-2453. TestProportionalCapacityPreemptionPolicy fails with FairScheduler. (Zhihai Xu via kasha)
Date Mon, 22 Sep 2014 06:18:16 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 1fe3086bd -> c1a3819a4


YARN-2453. TestProportionalCapacityPreemptionPolicy fails with FairScheduler. (Zhihai Xu via
kasha)

(cherry picked from commit 9721e2c1feb5aecea3a6dab5bda96af1cd0f8de3)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/c1a3819a
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/c1a3819a
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/c1a3819a

Branch: refs/heads/branch-2
Commit: c1a3819a4d8cfa2ecee8d326c469caf7c1a42e93
Parents: 1fe3086
Author: Karthik Kambatla <kasha@apache.org>
Authored: Sun Sep 21 23:13:45 2014 -0700
Committer: Karthik Kambatla <kasha@apache.org>
Committed: Sun Sep 21 23:14:27 2014 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                         |  3 +++
 .../TestProportionalCapacityPreemptionPolicy.java       | 12 +++++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/c1a3819a/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 66ce55c..26902cf 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -379,6 +379,9 @@ Release 2.6.0 - UNRELEASED
     YARN-2452. TestRMApplicationHistoryWriter fails with FairScheduler. 
     (Zhihai Xu via kasha)
 
+    YARN-2453. TestProportionalCapacityPreemptionPolicy fails with 
+    FairScheduler. (Zhihai Xu via kasha)
+
 Release 2.5.1 - 2014-09-05
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/c1a3819a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/TestProportionalCapacityPreemptionPolicy.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/TestProportionalCapacityPreemptionPolicy.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/TestProportionalCapacityPreemptionPolicy.java
index 8a2840e..a0c2b01 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/TestProportionalCapacityPreemptionPolicy.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/TestProportionalCapacityPreemptionPolicy.java
@@ -112,6 +112,13 @@ public class TestProportionalCapacityPreemptionPolicy {
     // report "ideal" preempt
     conf.setFloat(TOTAL_PREEMPTION_PER_ROUND, (float) 1.0);
     conf.setFloat(NATURAL_TERMINATION_FACTOR, (float) 1.0);
+    conf.set(YarnConfiguration.RM_SCHEDULER_MONITOR_POLICIES,
+        ProportionalCapacityPreemptionPolicy.class.getCanonicalName());
+    conf.setBoolean(YarnConfiguration.RM_SCHEDULER_ENABLE_MONITORS, true);
+    // FairScheduler doesn't support this test,
+    // Set CapacityScheduler as the scheduler for this test.
+    conf.set("yarn.resourcemanager.scheduler.class",
+        CapacityScheduler.class.getName());
 
     mClock = mock(Clock.class);
     mCS = mock(CapacityScheduler.class);
@@ -441,11 +448,6 @@ public class TestProportionalCapacityPreemptionPolicy {
   
   @Test
   public void testPolicyInitializeAfterSchedulerInitialized() {
-    Configuration conf = new Configuration();
-    conf.set(YarnConfiguration.RM_SCHEDULER_MONITOR_POLICIES,
-        ProportionalCapacityPreemptionPolicy.class.getCanonicalName());
-    conf.setBoolean(YarnConfiguration.RM_SCHEDULER_ENABLE_MONITORS, true);
-    
     @SuppressWarnings("resource")
     MockRM rm = new MockRM(conf);
     rm.init(conf);


Mime
View raw message