hadoop-yarn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ka...@apache.org
Subject svn commit: r1585895 - in /hadoop/common/branches/branch-2/hadoop-yarn-project: ./ hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/
Date Wed, 09 Apr 2014 05:55:11 GMT
Author: kasha
Date: Wed Apr  9 05:55:11 2014
New Revision: 1585895

URL: http://svn.apache.org/r1585895
Log:
YARN-1784. TestContainerAllocation assumes CapacityScheduler. (Robert Kanter via kasha)

Modified:
    hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt
    hadoop/common/branches/branch-2/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

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt?rev=1585895&r1=1585894&r2=1585895&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt Wed Apr  9 05:55:11 2014
@@ -50,6 +50,9 @@ Release 2.5.0 - UNRELEASED
 
     YARN-1790. Fair Scheduler UI not showing apps table (bc Wong via Sandy Ryza)
 
+    YARN-1784. TestContainerAllocation assumes CapacityScheduler.
+    (Robert Kanter via kasha)
+
 Release 2.4.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-2/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
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/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?rev=1585895&r1=1585894&r2=1585895&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/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
(original)
+++ hadoop/common/branches/branch-2/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
Wed Apr  9 05:55:11 2014
@@ -48,6 +48,7 @@ import org.apache.hadoop.yarn.server.res
 import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainerState;
 import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceScheduler;
 import org.apache.hadoop.yarn.server.resourcemanager.security.RMContainerTokenSecretManager;
+import org.junit.Before;
 import org.junit.Test;
 
 
@@ -57,9 +58,17 @@ public class TestContainerAllocation {
 
   private final int GB = 1024;
 
+  private YarnConfiguration conf;
+
+  @Before
+  public void setUp() throws Exception {
+    conf = new YarnConfiguration();
+    conf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class,
+      ResourceScheduler.class);
+  }
+
   @Test(timeout = 3000000)
   public void testExcessReservationThanNodeManagerCapacity() throws Exception {
-    YarnConfiguration conf = new YarnConfiguration();
     MockRM rm = new MockRM(conf);
     rm.start();
 
@@ -129,9 +138,6 @@ public class TestContainerAllocation {
   // acquired by the AM, not when the containers are allocated
   @Test
   public void testContainerTokenGeneratedOnPullRequest() throws Exception {
-    YarnConfiguration conf = new YarnConfiguration();
-    conf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class,
-      ResourceScheduler.class);
     MockRM rm1 = new MockRM(conf);
     rm1.start();
     MockNM nm1 = rm1.registerNode("127.0.0.1:1234", 8000);
@@ -161,7 +167,6 @@ public class TestContainerAllocation {
 
   @Test
   public void testNormalContainerAllocationWhenDNSUnavailable() throws Exception{
-    YarnConfiguration conf = new YarnConfiguration();
     MockRM rm1 = new MockRM(conf);
     rm1.start();
     MockNM nm1 = rm1.registerNode("unknownhost:1234", 8000);
@@ -218,7 +223,6 @@ public class TestContainerAllocation {
   // creation failure.
   @Test(timeout = 20000)
   public void testAMContainerAllocationWhenDNSUnavailable() throws Exception {
-    final YarnConfiguration conf = new YarnConfiguration();
     MockRM rm1 = new MockRM(conf) {
       @Override
       protected RMSecretManagerService createRMSecretManagerService() {



Mime
View raw message