hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asur...@apache.org
Subject [1/3] hadoop git commit: YARN-6216. Unify Container Resizing code paths with Container Updates making it scheduler agnostic. (Arun Suresh via wangda)
Date Fri, 14 Apr 2017 02:27:40 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 408d23477 -> 575625628


http://git-wip-us.apache.org/repos/asf/hadoop/blob/57562562/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestIncreaseAllocationExpirer.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/scheduler/capacity/TestIncreaseAllocationExpirer.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/TestIncreaseAllocationExpirer.java
index c5829cf..0707470 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/TestIncreaseAllocationExpirer.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/TestIncreaseAllocationExpirer.java
@@ -200,6 +200,7 @@ public class TestIncreaseAllocationExpirer {
     // back action to complete
     Thread.sleep(10000);
     // Verify container size is 1G
+    am1.allocate(null, null);
     Assert.assertEquals(
         1 * GB, rm1.getResourceScheduler().getRMContainer(containerId2)
             .getAllocatedResource().getMemorySize());
@@ -302,6 +303,8 @@ public class TestIncreaseAllocationExpirer {
     // Wait long enough for the second token (5G) to expire, and verify that
     // the roll back action is completed as expected
     Thread.sleep(10000);
+    am1.allocate(null, null);
+    Thread.sleep(2000);
     // Verify container size is rolled back to 3G
     Assert.assertEquals(
         3 * GB, rm1.getResourceScheduler().getRMContainer(containerId2)
@@ -398,13 +401,13 @@ public class TestIncreaseAllocationExpirer {
     // Decrease containers
     List<UpdateContainerRequest> decreaseRequests = new ArrayList<>();
     decreaseRequests.add(UpdateContainerRequest.newInstance(1, containerId2,
-        ContainerUpdateType.INCREASE_RESOURCE,
+        ContainerUpdateType.DECREASE_RESOURCE,
         Resources.createResource(2 * GB), null));
     decreaseRequests.add(UpdateContainerRequest.newInstance(1, containerId3,
-        ContainerUpdateType.INCREASE_RESOURCE,
+        ContainerUpdateType.DECREASE_RESOURCE,
         Resources.createResource(4 * GB), null));
     decreaseRequests.add(UpdateContainerRequest.newInstance(1, containerId4,
-        ContainerUpdateType.INCREASE_RESOURCE,
+        ContainerUpdateType.DECREASE_RESOURCE,
         Resources.createResource(4 * GB), null));
     AllocateResponse response =
         am1.sendContainerResizingRequest(decreaseRequests);
@@ -416,6 +419,9 @@ public class TestIncreaseAllocationExpirer {
         rm1, containerId4, Resources.createResource(6 * GB)));
     // Wait for containerId3 token to expire,
     Thread.sleep(10000);
+
+    am1.allocate(null, null);
+
     Assert.assertEquals(
         2 * GB, rm1.getResourceScheduler().getRMContainer(containerId2)
             .getAllocatedResource().getMemorySize());

http://git-wip-us.apache.org/repos/asf/hadoop/blob/57562562/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestLeafQueue.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/scheduler/capacity/TestLeafQueue.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/TestLeafQueue.java
index 0c8f1b2..c00e938 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/TestLeafQueue.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/TestLeafQueue.java
@@ -1056,11 +1056,11 @@ public class TestLeafQueue {
     qb.releaseResource(clusterResource, app_0,
         app_0.getAppSchedulingInfo().getPendingAsk(u0SchedKey)
             .getPerAllocationResource(),
-        null, null, false);
+        null, null);
     qb.releaseResource(clusterResource, app_2,
         app_2.getAppSchedulingInfo().getPendingAsk(u1SchedKey)
             .getPerAllocationResource(),
-        null, null, false);
+        null, null);
 
     qb.setUserLimit(50);
     qb.setUserLimitFactor(1);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/57562562/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestParentQueue.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/scheduler/capacity/TestParentQueue.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/TestParentQueue.java
index 11fea82..c4b7a0d 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/TestParentQueue.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/TestParentQueue.java
@@ -171,11 +171,11 @@ public class TestParentQueue {
         final Resource allocatedResource = Resources.createResource(allocation);
         if (queue instanceof ParentQueue) {
           ((ParentQueue)queue).allocateResource(clusterResource, 
-              allocatedResource, RMNodeLabelsManager.NO_LABEL, false);
+              allocatedResource, RMNodeLabelsManager.NO_LABEL);
         } else {
           FiCaSchedulerApp app1 = getMockApplication(0, "");
           ((LeafQueue)queue).allocateResource(clusterResource, app1, 
-              allocatedResource, null, null, false);
+              allocatedResource, null, null);
         }
         
         // Next call - nothing


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message