hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vvasu...@apache.org
Subject [10/21] hadoop git commit: YARN-4844. Add getMemoryLong/getVirtualCoreLong to o.a.h.y.api.records.Resource. Contributed by Wangda Tan.
Date Sun, 29 May 2016 15:30:10 GMT
http://git-wip-us.apache.org/repos/asf/hadoop/blob/4f36c3d2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestContainerResizing.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/TestContainerResizing.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/TestContainerResizing.java
index 5edc36a..499e041 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/TestContainerResizing.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/TestContainerResizing.java
@@ -147,7 +147,7 @@ public class TestContainerResizing {
 
     checkPendingResource(rm1, "default", 2 * GB, null);
     Assert.assertEquals(2 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
 
     // NM1 do 1 heartbeats
     CapacityScheduler cs = (CapacityScheduler) rm1.getResourceScheduler();
@@ -157,7 +157,7 @@ public class TestContainerResizing {
     // Pending resource should be deducted
     checkPendingResource(rm1, "default", 0 * GB, null);
     Assert.assertEquals(0 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
 
     verifyContainerIncreased(am1.allocate(null, null), containerId1, 3 * GB);
     verifyAvailableResourceOfSchedulerNode(rm1, nm1.getNodeId(), 17 * GB);
@@ -188,7 +188,7 @@ public class TestContainerResizing {
 
     checkUsedResource(rm1, "default", 3 * GB, null);
     Assert.assertEquals(3 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
 
     ContainerId containerId1 =
         ContainerId.newContainerId(am1.getApplicationAttemptId(), 1);
@@ -202,7 +202,7 @@ public class TestContainerResizing {
     verifyContainerDecreased(response, containerId1, 1 * GB);
     checkUsedResource(rm1, "default", 1 * GB, null);
     Assert.assertEquals(1 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
 
     // Check if decreased containers added to RMNode
     RMNodeImpl rmNode =
@@ -272,7 +272,7 @@ public class TestContainerResizing {
 
     checkPendingResource(rm1, "default", 6 * GB, null);
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
 
     // NM1 do 1 heartbeats
     CapacityScheduler cs = (CapacityScheduler) rm1.getResourceScheduler();
@@ -284,21 +284,21 @@ public class TestContainerResizing {
     /* Check reservation statuses */
     // Increase request should be reserved
     Assert.assertTrue(rmContainer1.hasIncreaseReservation());
-    Assert.assertEquals(6 * GB, rmContainer1.getReservedResource().getMemory());
+    Assert.assertEquals(6 * GB, rmContainer1.getReservedResource().getMemorySize());
     Assert.assertFalse(app.getReservedContainers().isEmpty());
     Assert.assertNotNull(cs.getNode(nm1.getNodeId()).getReservedContainer());
     // Pending resource will not be changed since it's not satisfied
     checkPendingResource(rm1, "default", 6 * GB, null);
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
     // Queue/user/application's usage will be updated
     checkUsedResource(rm1, "default", 9 * GB, null);
     Assert.assertEquals(9 * GB, ((LeafQueue) cs.getQueue("default"))
-        .getUser("user").getUsed().getMemory());
+        .getUser("user").getUsed().getMemorySize());
     Assert.assertEquals(3 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getReserved().getMemory());
+        app.getAppAttemptResourceUsage().getReserved().getMemorySize());
 
     // Complete one container and do another allocation
     am1.allocate(null, Arrays.asList(containerId2));
@@ -315,15 +315,15 @@ public class TestContainerResizing {
     // Pending resource will be changed since it's satisfied
     checkPendingResource(rm1, "default", 0 * GB, null);
     Assert.assertEquals(0 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
     // Queue/user/application's usage will be updated
     checkUsedResource(rm1, "default", 7 * GB, null);
     Assert.assertEquals(7 * GB, ((LeafQueue) cs.getQueue("default"))
-        .getUser("user").getUsed().getMemory());
+        .getUser("user").getUsed().getMemorySize());
     Assert.assertEquals(0 * GB,
-        app.getAppAttemptResourceUsage().getReserved().getMemory());
+        app.getAppAttemptResourceUsage().getReserved().getMemorySize());
     Assert.assertEquals(7 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
     verifyAvailableResourceOfSchedulerNode(rm1, nm1.getNodeId(), 1 * GB);
 
     rm1.close();
@@ -373,7 +373,7 @@ public class TestContainerResizing {
 
     checkPendingResource(rm1, "default", 6 * GB, null);
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
 
     // NM1 do 1 heartbeats
     CapacityScheduler cs = (CapacityScheduler) rm1.getResourceScheduler();
@@ -390,15 +390,15 @@ public class TestContainerResizing {
     // Pending resource will not be changed since it's not satisfied
     checkPendingResource(rm1, "default", 6 * GB, null);
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
     // Queue/user/application's usage will *NOT* be updated
     checkUsedResource(rm1, "default", 3 * GB, null);
     Assert.assertEquals(3 * GB, ((LeafQueue) cs.getQueue("default"))
-            .getUser("user").getUsed().getMemory());
+            .getUser("user").getUsed().getMemorySize());
     Assert.assertEquals(3 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
     Assert.assertEquals(0 * GB,
-        app.getAppAttemptResourceUsage().getReserved().getMemory());
+        app.getAppAttemptResourceUsage().getReserved().getMemorySize());
     rm1.close();
   }
 
@@ -453,7 +453,7 @@ public class TestContainerResizing {
 
     checkPendingResource(rm1, "default", 6 * GB, null);
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
 
     // NM1 do 1 heartbeats
     CapacityScheduler cs = (CapacityScheduler) rm1.getResourceScheduler();
@@ -465,21 +465,21 @@ public class TestContainerResizing {
     /* Check reservation statuses */
     // Increase request should be reserved
     Assert.assertTrue(rmContainer1.hasIncreaseReservation());
-    Assert.assertEquals(6 * GB, rmContainer1.getReservedResource().getMemory());
+    Assert.assertEquals(6 * GB, rmContainer1.getReservedResource().getMemorySize());
     Assert.assertFalse(app.getReservedContainers().isEmpty());
     Assert.assertNotNull(cs.getNode(nm1.getNodeId()).getReservedContainer());
     // Pending resource will not be changed since it's not satisfied
     checkPendingResource(rm1, "default", 6 * GB, null);
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
     // Queue/user/application's usage will be updated
     checkUsedResource(rm1, "default", 9 * GB, null);
     Assert.assertEquals(9 * GB, ((LeafQueue) cs.getQueue("default"))
-        .getUser("user").getUsed().getMemory());
+        .getUser("user").getUsed().getMemorySize());
     Assert.assertEquals(3 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getReserved().getMemory());
+        app.getAppAttemptResourceUsage().getReserved().getMemorySize());
 
     // Complete one container and cancel increase request (via send a increase
     // request, make target_capacity=existing_capacity)
@@ -501,15 +501,15 @@ public class TestContainerResizing {
     // Pending resource will be changed since it's satisfied
     checkPendingResource(rm1, "default", 0 * GB, null);
     Assert.assertEquals(0 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
     // Queue/user/application's usage will be updated
     checkUsedResource(rm1, "default", 1 * GB, null);
     Assert.assertEquals(1 * GB, ((LeafQueue) cs.getQueue("default"))
-        .getUser("user").getUsed().getMemory());
+        .getUser("user").getUsed().getMemorySize());
     Assert.assertEquals(0 * GB,
-        app.getAppAttemptResourceUsage().getReserved().getMemory());
+        app.getAppAttemptResourceUsage().getReserved().getMemorySize());
     Assert.assertEquals(1 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
 
     rm1.close();
   }
@@ -565,7 +565,7 @@ public class TestContainerResizing {
 
     checkPendingResource(rm1, "default", 6 * GB, null);
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
 
     // NM1 do 1 heartbeats
     CapacityScheduler cs = (CapacityScheduler) rm1.getResourceScheduler();
@@ -577,21 +577,21 @@ public class TestContainerResizing {
     /* Check reservation statuses */
     // Increase request should be reserved
     Assert.assertTrue(rmContainer1.hasIncreaseReservation());
-    Assert.assertEquals(6 * GB, rmContainer1.getReservedResource().getMemory());
+    Assert.assertEquals(6 * GB, rmContainer1.getReservedResource().getMemorySize());
     Assert.assertFalse(app.getReservedContainers().isEmpty());
     Assert.assertNotNull(cs.getNode(nm1.getNodeId()).getReservedContainer());
     // Pending resource will not be changed since it's not satisfied
     checkPendingResource(rm1, "default", 6 * GB, null);
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
     // Queue/user/application's usage will be updated
     checkUsedResource(rm1, "default", 10 * GB, null);
     Assert.assertEquals(10 * GB, ((LeafQueue) cs.getQueue("default"))
-        .getUser("user").getUsed().getMemory());
+        .getUser("user").getUsed().getMemorySize());
     Assert.assertEquals(4 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getReserved().getMemory());
+        app.getAppAttemptResourceUsage().getReserved().getMemorySize());
 
     // Complete one container and cancel increase request (via send a increase
     // request, make target_capacity=existing_capacity)
@@ -611,15 +611,15 @@ public class TestContainerResizing {
     // Pending resource will be changed since it's satisfied
     checkPendingResource(rm1, "default", 0 * GB, null);
     Assert.assertEquals(0 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
     // Queue/user/application's usage will be updated
     checkUsedResource(rm1, "default", 1 * GB, null);
     Assert.assertEquals(1 * GB, ((LeafQueue) cs.getQueue("default"))
-        .getUser("user").getUsed().getMemory());
+        .getUser("user").getUsed().getMemorySize());
     Assert.assertEquals(0 * GB,
-        app.getAppAttemptResourceUsage().getReserved().getMemory());
+        app.getAppAttemptResourceUsage().getReserved().getMemorySize());
     Assert.assertEquals(1 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
 
     rm1.close();
   }
@@ -674,7 +674,7 @@ public class TestContainerResizing {
 
     checkPendingResource(rm1, "default", 6 * GB, null);
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
 
     // NM1 do 1 heartbeats
     CapacityScheduler cs = (CapacityScheduler) rm1.getResourceScheduler();
@@ -686,21 +686,21 @@ public class TestContainerResizing {
     /* Check reservation statuses */
     // Increase request should be reserved
     Assert.assertTrue(rmContainer2.hasIncreaseReservation());
-    Assert.assertEquals(6 * GB, rmContainer2.getReservedResource().getMemory());
+    Assert.assertEquals(6 * GB, rmContainer2.getReservedResource().getMemorySize());
     Assert.assertFalse(app.getReservedContainers().isEmpty());
     Assert.assertNotNull(cs.getNode(nm1.getNodeId()).getReservedContainer());
     // Pending resource will not be changed since it's not satisfied
     checkPendingResource(rm1, "default", 6 * GB, null);
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
     // Queue/user/application's usage will be updated
     checkUsedResource(rm1, "default", 9 * GB, null);
     Assert.assertEquals(9 * GB, ((LeafQueue) cs.getQueue("default"))
-        .getUser("user").getUsed().getMemory());
+        .getUser("user").getUsed().getMemorySize());
     Assert.assertEquals(3 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getReserved().getMemory());
+        app.getAppAttemptResourceUsage().getReserved().getMemorySize());
 
     // Complete container2, container will be unreserved and completed
     am1.allocate(null, Arrays.asList(containerId2));
@@ -713,15 +713,15 @@ public class TestContainerResizing {
     // Pending resource will be changed since it's satisfied
     checkPendingResource(rm1, "default", 0 * GB, null);
     Assert.assertEquals(0 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
     // Queue/user/application's usage will be updated
     checkUsedResource(rm1, "default", 1 * GB, null);
     Assert.assertEquals(1 * GB, ((LeafQueue) cs.getQueue("default"))
-        .getUser("user").getUsed().getMemory());
+        .getUser("user").getUsed().getMemorySize());
     Assert.assertEquals(0 * GB,
-        app.getAppAttemptResourceUsage().getReserved().getMemory());
+        app.getAppAttemptResourceUsage().getReserved().getMemorySize());
     Assert.assertEquals(1 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
 
     rm1.close();
   }
@@ -771,7 +771,7 @@ public class TestContainerResizing {
 
     checkPendingResource(rm1, "default", 6 * GB, null);
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
 
     // NM1 do 1 heartbeats
     CapacityScheduler cs = (CapacityScheduler) rm1.getResourceScheduler();
@@ -783,21 +783,21 @@ public class TestContainerResizing {
     /* Check reservation statuses */
     // Increase request should be reserved
     Assert.assertTrue(rmContainer2.hasIncreaseReservation());
-    Assert.assertEquals(6 * GB, rmContainer2.getReservedResource().getMemory());
+    Assert.assertEquals(6 * GB, rmContainer2.getReservedResource().getMemorySize());
     Assert.assertFalse(app.getReservedContainers().isEmpty());
     Assert.assertNotNull(cs.getNode(nm1.getNodeId()).getReservedContainer());
     // Pending resource will not be changed since it's not satisfied
     checkPendingResource(rm1, "default", 6 * GB, null);
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
     // Queue/user/application's usage will be updated
     checkUsedResource(rm1, "default", 9 * GB, null);
     Assert.assertEquals(9 * GB, ((LeafQueue) cs.getQueue("default"))
-        .getUser("user").getUsed().getMemory());
+        .getUser("user").getUsed().getMemorySize());
     Assert.assertEquals(3 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getReserved().getMemory());
+        app.getAppAttemptResourceUsage().getReserved().getMemorySize());
 
     // Kill the application
     cs.handle(new AppAttemptRemovedSchedulerEvent(am1.getApplicationAttemptId(),
@@ -811,15 +811,15 @@ public class TestContainerResizing {
     // Pending resource will be changed since it's satisfied
     checkPendingResource(rm1, "default", 0 * GB, null);
     Assert.assertEquals(0 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
     // Queue/user/application's usage will be updated
     checkUsedResource(rm1, "default", 0 * GB, null);
     Assert.assertEquals(0 * GB, ((LeafQueue) cs.getQueue("default"))
-        .getUser("user").getUsed().getMemory());
+        .getUser("user").getUsed().getMemorySize());
     Assert.assertEquals(0 * GB,
-        app.getAppAttemptResourceUsage().getReserved().getMemory());
+        app.getAppAttemptResourceUsage().getReserved().getMemorySize());
     Assert.assertEquals(0 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
 
     rm1.close();
   }
@@ -894,7 +894,7 @@ public class TestContainerResizing {
 
     checkPendingResource(rm1, "default", 6 * GB, null);
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
 
     // Get rmNode1
     CapacityScheduler cs = (CapacityScheduler) rm1.getResourceScheduler();
@@ -916,15 +916,15 @@ public class TestContainerResizing {
     // There're still 3 pending increase requests
     checkPendingResource(rm1, "default", 3 * GB, null);
     Assert.assertEquals(3 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
     // Queue/user/application's usage will be updated
     checkUsedResource(rm1, "default", 10 * GB, null);
     Assert.assertEquals(10 * GB, ((LeafQueue) cs.getQueue("default"))
-        .getUser("user").getUsed().getMemory());
+        .getUser("user").getUsed().getMemorySize());
     Assert.assertEquals(0 * GB,
-        app.getAppAttemptResourceUsage().getReserved().getMemory());
+        app.getAppAttemptResourceUsage().getReserved().getMemorySize());
     Assert.assertEquals(10 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
 
     rm1.close();
   }
@@ -975,7 +975,7 @@ public class TestContainerResizing {
 
     checkPendingResource(rm1, "default", 6 * GB, null);
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
 
     // Get rmNode1
     CapacityScheduler cs = (CapacityScheduler) rm1.getResourceScheduler();
@@ -997,15 +997,15 @@ public class TestContainerResizing {
     // There're still 3 pending increase requests
     checkPendingResource(rm1, "default", 3 * GB, null);
     Assert.assertEquals(3 * GB,
-        app.getAppAttemptResourceUsage().getPending().getMemory());
+        app.getAppAttemptResourceUsage().getPending().getMemorySize());
     // Queue/user/application's usage will be updated
     checkUsedResource(rm1, "default", 10 * GB, null);
     Assert.assertEquals(10 * GB, ((LeafQueue) cs.getQueue("default"))
-        .getUser("user").getUsed().getMemory());
+        .getUser("user").getUsed().getMemorySize());
     Assert.assertEquals(0 * GB,
-        app.getAppAttemptResourceUsage().getReserved().getMemory());
+        app.getAppAttemptResourceUsage().getReserved().getMemorySize());
     Assert.assertEquals(10 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
 
     rm1.close();
   }
@@ -1033,7 +1033,7 @@ public class TestContainerResizing {
     FiCaSchedulerApp app = TestUtils.getFiCaSchedulerApp(
         rm, app1.getApplicationId());
     Assert.assertEquals(3 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
     // making sure container is launched
     ContainerId containerId1 =
         ContainerId.newContainerId(am1.getApplicationAttemptId(), 1);
@@ -1062,7 +1062,7 @@ public class TestContainerResizing {
     Assert.assertEquals(memory,
         queue.getQueueResourceUsage()
             .getPending(label == null ? RMNodeLabelsManager.NO_LABEL : label)
-            .getMemory());
+            .getMemorySize());
   }
 
   private void checkUsedResource(MockRM rm, String queueName, int memory,
@@ -1072,7 +1072,7 @@ public class TestContainerResizing {
     Assert.assertEquals(memory,
         queue.getQueueResourceUsage()
             .getUsed(label == null ? RMNodeLabelsManager.NO_LABEL : label)
-            .getMemory());
+            .getMemorySize());
   }
 
   private void verifyContainerIncreased(AllocateResponse response,
@@ -1082,7 +1082,7 @@ public class TestContainerResizing {
     for (Container c : increasedContainers) {
       if (c.getId().equals(containerId)) {
         found = true;
-        Assert.assertEquals(mem, c.getResource().getMemory());
+        Assert.assertEquals(mem, c.getResource().getMemorySize());
       }
     }
     if (!found) {
@@ -1097,7 +1097,7 @@ public class TestContainerResizing {
     for (Container c : decreasedContainers) {
       if (c.getId().equals(containerId)) {
         found = true;
-        Assert.assertEquals(mem, c.getResource().getMemory());
+        Assert.assertEquals(mem, c.getResource().getMemorySize());
       }
     }
     if (!found) {
@@ -1121,6 +1121,6 @@ public class TestContainerResizing {
     CapacityScheduler cs = (CapacityScheduler) rm.getResourceScheduler();
     SchedulerNode node = cs.getNode(nodeId);
     Assert
-        .assertEquals(expectedMemory, node.getUnallocatedResource().getMemory());
+        .assertEquals(expectedMemory, node.getUnallocatedResource().getMemorySize());
   }
 }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/4f36c3d2/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 645086d..d388172 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
@@ -98,7 +98,7 @@ public class TestIncreaseAllocationExpirer {
     FiCaSchedulerApp app = TestUtils.getFiCaSchedulerApp(
         rm1, app1.getApplicationId());
     Assert.assertEquals(2 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
     verifyAvailableResourceOfSchedulerNode(rm1, nm1.getNodeId(), 18 * GB);
     // Report container status
     nm1.nodeHeartbeat(
@@ -129,11 +129,11 @@ public class TestIncreaseAllocationExpirer {
     // Verify container size is 3G
     Assert.assertEquals(
         3 * GB, rm1.getResourceScheduler().getRMContainer(containerId2)
-            .getAllocatedResource().getMemory());
+            .getAllocatedResource().getMemorySize());
     // Verify total resource usage
     checkUsedResource(rm1, "default", 4 * GB, null);
     Assert.assertEquals(4 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
     // Verify available resource
     verifyAvailableResourceOfSchedulerNode(rm1, nm1.getNodeId(), 16 * GB);
     rm1.stop();
@@ -172,7 +172,7 @@ public class TestIncreaseAllocationExpirer {
     FiCaSchedulerApp app = TestUtils.getFiCaSchedulerApp(
         rm1, app1.getApplicationId());
     Assert.assertEquals(2 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
     verifyAvailableResourceOfSchedulerNode(rm1, nm1.getNodeId(), 18 * GB);
     nm1.nodeHeartbeat(
         app1.getCurrentAppAttempt()
@@ -190,7 +190,7 @@ public class TestIncreaseAllocationExpirer {
     // Verify resource usage
     checkUsedResource(rm1, "default", 4 * GB, null);
     Assert.assertEquals(4 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
     verifyAvailableResourceOfSchedulerNode(rm1, nm1.getNodeId(), 16 * GB);
     // Wait long enough for the increase token to expire, and for the roll
     // back action to complete
@@ -198,11 +198,11 @@ public class TestIncreaseAllocationExpirer {
     // Verify container size is 1G
     Assert.assertEquals(
         1 * GB, rm1.getResourceScheduler().getRMContainer(containerId2)
-            .getAllocatedResource().getMemory());
+            .getAllocatedResource().getMemorySize());
     // Verify total resource usage is 2G
     checkUsedResource(rm1, "default", 2 * GB, null);
     Assert.assertEquals(2 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
     // Verify available resource is rolled back to 18GB
     verifyAvailableResourceOfSchedulerNode(rm1, nm1.getNodeId(), 18 * GB);
     rm1.stop();
@@ -276,7 +276,7 @@ public class TestIncreaseAllocationExpirer {
     FiCaSchedulerApp app = TestUtils.getFiCaSchedulerApp(
         rm1, app1.getApplicationId());
     Assert.assertEquals(6 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
     // Verify available resource is now reduced to 14GB
     verifyAvailableResourceOfSchedulerNode(rm1, nm1.getNodeId(), 14 * GB);
     // Use the first token (3G)
@@ -287,11 +287,11 @@ public class TestIncreaseAllocationExpirer {
     // Verify container size is rolled back to 3G
     Assert.assertEquals(
         3 * GB, rm1.getResourceScheduler().getRMContainer(containerId2)
-            .getAllocatedResource().getMemory());
+            .getAllocatedResource().getMemorySize());
     // Verify total resource usage is 4G
     checkUsedResource(rm1, "default", 4 * GB, null);
     Assert.assertEquals(4 * GB,
-        app.getAppAttemptResourceUsage().getUsed().getMemory());
+        app.getAppAttemptResourceUsage().getUsed().getMemorySize());
     // Verify available resource is rolled back to 14GB
     verifyAvailableResourceOfSchedulerNode(rm1, nm1.getNodeId(), 16 * GB);
     // Verify NM receives the decrease message (3G)
@@ -299,7 +299,7 @@ public class TestIncreaseAllocationExpirer {
         nm1.nodeHeartbeat(true).getContainersToDecrease();
     Assert.assertEquals(1, containersToDecrease.size());
     Assert.assertEquals(
-        3 * GB, containersToDecrease.get(0).getResource().getMemory());
+        3 * GB, containersToDecrease.get(0).getResource().getMemorySize());
     rm1.stop();
   }
 
@@ -394,13 +394,13 @@ public class TestIncreaseAllocationExpirer {
     Thread.sleep(10000);
     Assert.assertEquals(
         2 * GB, rm1.getResourceScheduler().getRMContainer(containerId2)
-            .getAllocatedResource().getMemory());
+            .getAllocatedResource().getMemorySize());
     Assert.assertEquals(
         3 * GB, rm1.getResourceScheduler().getRMContainer(containerId3)
-            .getAllocatedResource().getMemory());
+            .getAllocatedResource().getMemorySize());
     Assert.assertEquals(
         4 * GB, rm1.getResourceScheduler().getRMContainer(containerId4)
-            .getAllocatedResource().getMemory());
+            .getAllocatedResource().getMemorySize());
     // Verify NM receives 2 decrease message
     List<Container> containersToDecrease =
         nm1.nodeHeartbeat(true).getContainersToDecrease();
@@ -408,9 +408,9 @@ public class TestIncreaseAllocationExpirer {
     // Sort the list to make sure containerId3 is the first
     Collections.sort(containersToDecrease);
     Assert.assertEquals(
-        3 * GB, containersToDecrease.get(0).getResource().getMemory());
+        3 * GB, containersToDecrease.get(0).getResource().getMemorySize());
     Assert.assertEquals(
-        4 * GB, containersToDecrease.get(1).getResource().getMemory());
+        4 * GB, containersToDecrease.get(1).getResource().getMemorySize());
     rm1.stop();
   }
 
@@ -421,7 +421,7 @@ public class TestIncreaseAllocationExpirer {
     Assert.assertEquals(memory,
         queue.getQueueResourceUsage()
             .getUsed(label == null ? RMNodeLabelsManager.NO_LABEL : label)
-            .getMemory());
+            .getMemorySize());
   }
 
   private void verifyAvailableResourceOfSchedulerNode(MockRM rm, NodeId nodeId,
@@ -429,7 +429,7 @@ public class TestIncreaseAllocationExpirer {
     CapacityScheduler cs = (CapacityScheduler) rm.getResourceScheduler();
     SchedulerNode node = cs.getNode(nodeId);
     Assert
-        .assertEquals(expectedMemory, node.getUnallocatedResource().getMemory());
+        .assertEquals(expectedMemory, node.getUnallocatedResource().getMemorySize());
   }
 
   private Container getContainer(

http://git-wip-us.apache.org/repos/asf/hadoop/blob/4f36c3d2/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 263b95b..48e6f0e 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
@@ -326,7 +326,7 @@ public class TestLeafQueue {
     a.assignContainers(clusterResource, node_0, new ResourceLimits(
         clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
     assertEquals(
-        (int)(node_0.getTotalResource().getMemory() * a.getCapacity()) - (1*GB),
+        (int)(node_0.getTotalResource().getMemorySize() * a.getCapacity()) - (1*GB),
         a.getMetrics().getAvailableMB());
   }
 
@@ -408,7 +408,7 @@ public class TestLeafQueue {
     assertEquals(1, a.getMetrics().getAppsSubmitted());
     assertEquals(1, a.getMetrics().getAppsPending());
     assertEquals(1, a.getUser(user_0).getActiveApplications());
-    assertEquals(app_1.getAMResource().getMemory(), a.getMetrics()
+    assertEquals(app_1.getAMResource().getMemorySize(), a.getMetrics()
         .getUsedAMResourceMB());
     assertEquals(app_1.getAMResource().getVirtualCores(), a.getMetrics()
         .getUsedAMResourceVCores());
@@ -516,9 +516,9 @@ public class TestLeafQueue {
     // Only 1 container
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(1*GB, a.getUsedResources().getMemory());
-    assertEquals(1*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(1*GB, a.getUsedResources().getMemorySize());
+    assertEquals(1*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     assertEquals(0*GB, a.getMetrics().getReservedMB());
     assertEquals(1*GB, a.getMetrics().getAllocatedMB());
     assertEquals(0*GB, a.getMetrics().getAvailableMB());
@@ -527,18 +527,18 @@ public class TestLeafQueue {
     // you can get one container more than user-limit
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(2*GB, a.getUsedResources().getMemory());
-    assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(2*GB, a.getUsedResources().getMemorySize());
+    assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     assertEquals(0*GB, a.getMetrics().getReservedMB());
     assertEquals(2*GB, a.getMetrics().getAllocatedMB());
     
     // Can't allocate 3rd due to user-limit
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(2*GB, a.getUsedResources().getMemory());
-    assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(2*GB, a.getUsedResources().getMemorySize());
+    assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     assertEquals(0*GB, a.getMetrics().getReservedMB());
     assertEquals(2*GB, a.getMetrics().getAllocatedMB());
     
@@ -546,18 +546,18 @@ public class TestLeafQueue {
     a.setUserLimitFactor(10);
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(3*GB, a.getUsedResources().getMemory());
-    assertEquals(3*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(3*GB, a.getUsedResources().getMemorySize());
+    assertEquals(3*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     assertEquals(0*GB, a.getMetrics().getReservedMB());
     assertEquals(3*GB, a.getMetrics().getAllocatedMB());
 
     // One more should work, for app_1, due to user-limit-factor
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(4*GB, a.getUsedResources().getMemory());
-    assertEquals(3*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(1*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(4*GB, a.getUsedResources().getMemorySize());
+    assertEquals(3*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(1*GB, app_1.getCurrentConsumption().getMemorySize());
     assertEquals(0*GB, a.getMetrics().getReservedMB());
     assertEquals(4*GB, a.getMetrics().getAllocatedMB());
 
@@ -566,9 +566,9 @@ public class TestLeafQueue {
     a.setMaxCapacity(0.5f);
     a.assignContainers(clusterResource, node_0, new ResourceLimits(
         clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(4*GB, a.getUsedResources().getMemory());
-    assertEquals(3*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(1*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(4*GB, a.getUsedResources().getMemorySize());
+    assertEquals(3*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(1*GB, app_1.getCurrentConsumption().getMemorySize());
     assertEquals(0*GB, a.getMetrics().getReservedMB());
     assertEquals(4*GB, a.getMetrics().getAllocatedMB());
     
@@ -580,9 +580,9 @@ public class TestLeafQueue {
               ContainerExitStatus.KILLED_BY_RESOURCEMANAGER),
           RMContainerEventType.KILL, null, true);
     }
-    assertEquals(1*GB, a.getUsedResources().getMemory());
-    assertEquals(0*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(1*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(1*GB, a.getUsedResources().getMemorySize());
+    assertEquals(0*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(1*GB, app_1.getCurrentConsumption().getMemorySize());
     assertEquals(0*GB, a.getMetrics().getReservedMB());
     assertEquals(1*GB, a.getMetrics().getAllocatedMB());
     
@@ -595,12 +595,12 @@ public class TestLeafQueue {
           RMContainerEventType.KILL, null, true);
     }
 
-    assertEquals(0*GB, a.getUsedResources().getMemory());
-    assertEquals(0*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(0*GB, a.getUsedResources().getMemorySize());
+    assertEquals(0*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     assertEquals(0*GB, a.getMetrics().getReservedMB());
     assertEquals(0*GB, a.getMetrics().getAllocatedMB());
-    assertEquals((int)(a.getCapacity() * node_0.getTotalResource().getMemory()),
+    assertEquals((int)(a.getCapacity() * node_0.getTotalResource().getMemorySize()),
         a.getMetrics().getAvailableMB());
   }
   
@@ -665,27 +665,27 @@ public class TestLeafQueue {
     // 1 container to user_0
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(3*GB, a.getUsedResources().getMemory());
-    assertEquals(3*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(3*GB, a.getUsedResources().getMemorySize());
+    assertEquals(3*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
 
     // Allocate one container to app_1. Even if app_0
     // submit earlier, it cannot get this container assigned since user_0
     // exceeded user-limit already. 
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(4*GB, a.getUsedResources().getMemory());
-    assertEquals(3*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(1*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(4*GB, a.getUsedResources().getMemorySize());
+    assertEquals(3*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(1*GB, app_1.getCurrentConsumption().getMemorySize());
 
     // Allocate one container to app_0, before allocating this container,
     // user-limit = ceil((4 + 1) / 2) = 3G. app_0's used resource (3G) <=
     // user-limit.
     a.assignContainers(clusterResource, node_1,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(7*GB, a.getUsedResources().getMemory());
-    assertEquals(6*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(1*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(7*GB, a.getUsedResources().getMemorySize());
+    assertEquals(6*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(1*GB, app_1.getCurrentConsumption().getMemorySize());
 
     // app_0 doesn't have outstanding resources, there's only one active user.
     assertEquals("There should only be 1 active user!", 
@@ -744,7 +744,7 @@ public class TestLeafQueue {
         "", SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
 
     //maxqueue 16G, userlimit 13G, - 4G used = 9G
-    assertEquals(9*GB,app_0.getHeadroom().getMemory());
+    assertEquals(9*GB,app_0.getHeadroom().getMemorySize());
 
     //test case 2
     final ApplicationAttemptId appAttemptId_2 =
@@ -762,13 +762,13 @@ public class TestLeafQueue {
     qb.computeUserLimitAndSetHeadroom(app_0, clusterResource,
         "", SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
 
-    assertEquals(8*GB, qb.getUsedResources().getMemory());
-    assertEquals(4*GB, app_0.getCurrentConsumption().getMemory());
+    assertEquals(8*GB, qb.getUsedResources().getMemorySize());
+    assertEquals(4*GB, app_0.getCurrentConsumption().getMemorySize());
     //maxqueue 16G, userlimit 13G, - 4G used = 9G BUT
     //maxqueue 16G - used 8G (4 each app/user) = 8G max headroom (the new logic)
-    assertEquals(8*GB, app_0.getHeadroom().getMemory());
-    assertEquals(4*GB, app_2.getCurrentConsumption().getMemory());
-    assertEquals(8*GB, app_2.getHeadroom().getMemory());
+    assertEquals(8*GB, app_0.getHeadroom().getMemorySize());
+    assertEquals(4*GB, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(8*GB, app_2.getHeadroom().getMemorySize());
 
     //test case 3
     qb.finishApplication(app_0.getApplicationId(), user_0);
@@ -805,10 +805,10 @@ public class TestLeafQueue {
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
     qb.computeUserLimitAndSetHeadroom(app_3, clusterResource,
         "", SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(4*GB, qb.getUsedResources().getMemory());
+    assertEquals(4*GB, qb.getUsedResources().getMemorySize());
     //maxqueue 16G, userlimit 7G, used (by each user) 2G, headroom 5G (both)
-    assertEquals(5*GB, app_3.getHeadroom().getMemory());
-    assertEquals(5*GB, app_1.getHeadroom().getMemory());
+    assertEquals(5*GB, app_3.getHeadroom().getMemorySize());
+    assertEquals(5*GB, app_1.getHeadroom().getMemorySize());
     //test case 4
     final ApplicationAttemptId appAttemptId_4 =
               TestUtils.getMockApplicationAttemptId(4, 0);
@@ -830,13 +830,13 @@ public class TestLeafQueue {
     //app3 is user1, active from last test case
     //maxqueue 16G, userlimit 13G, used 2G, would be headroom 10G BUT
     //10G in use, so max possible headroom is 6G (new logic)
-    assertEquals(6*GB, app_3.getHeadroom().getMemory());
+    assertEquals(6*GB, app_3.getHeadroom().getMemorySize());
     //testcase3 still active - 2+2+6=10
-    assertEquals(10*GB, qb.getUsedResources().getMemory());
+    assertEquals(10*GB, qb.getUsedResources().getMemorySize());
     //app4 is user 0
     //maxqueue 16G, userlimit 13G, used 8G, headroom 5G
     //(8G used is 6G from this test case - app4, 2 from last test case, app_1)
-    assertEquals(5*GB, app_4.getHeadroom().getMemory());
+    assertEquals(5*GB, app_4.getHeadroom().getMemorySize());
   }
 
   @Test
@@ -892,16 +892,16 @@ public class TestLeafQueue {
 
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(1*GB, a.getUsedResources().getMemory());
-    assertEquals(1*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(1*GB, a.getUsedResources().getMemorySize());
+    assertEquals(1*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     //Now, headroom is the same for all apps for a given user + queue combo
     //and a change to any app's headroom is reflected for all the user's apps
     //once those apps are active/have themselves calculated headroom for 
     //allocation at least one time
-    assertEquals(2*GB, app_0.getHeadroom().getMemory());
-    assertEquals(0*GB, app_1.getHeadroom().getMemory());//not yet active
-    assertEquals(0*GB, app_2.getHeadroom().getMemory());//not yet active
+    assertEquals(2*GB, app_0.getHeadroom().getMemorySize());
+    assertEquals(0*GB, app_1.getHeadroom().getMemorySize());//not yet active
+    assertEquals(0*GB, app_2.getHeadroom().getMemorySize());//not yet active
 
     app_1.updateResourceRequests(Collections.singletonList(
         TestUtils.createResourceRequest(ResourceRequest.ANY, 1*GB, 2, true,
@@ -909,12 +909,12 @@ public class TestLeafQueue {
 
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(2*GB, a.getUsedResources().getMemory());
-    assertEquals(1*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(1*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(1*GB, app_0.getHeadroom().getMemory());
-    assertEquals(1*GB, app_1.getHeadroom().getMemory());//now active
-    assertEquals(0*GB, app_2.getHeadroom().getMemory());//not yet active
+    assertEquals(2*GB, a.getUsedResources().getMemorySize());
+    assertEquals(1*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(1*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(1*GB, app_0.getHeadroom().getMemorySize());
+    assertEquals(1*GB, app_1.getHeadroom().getMemorySize());//now active
+    assertEquals(0*GB, app_2.getHeadroom().getMemorySize());//not yet active
 
     //Complete container and verify that headroom is updated, for both apps 
     //for the user
@@ -925,8 +925,8 @@ public class TestLeafQueue {
 	ContainerExitStatus.KILLED_BY_RESOURCEMANAGER),
     RMContainerEventType.KILL, null, true);
 
-    assertEquals(2*GB, app_0.getHeadroom().getMemory());
-    assertEquals(2*GB, app_1.getHeadroom().getMemory());
+    assertEquals(2*GB, app_0.getHeadroom().getMemorySize());
+    assertEquals(2*GB, app_1.getHeadroom().getMemorySize());
   }
 
   @Test
@@ -998,23 +998,23 @@ public class TestLeafQueue {
     // 1 container to user_0
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(2*GB, a.getUsedResources().getMemory());
-    assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(2*GB, a.getUsedResources().getMemorySize());
+    assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     // TODO, fix headroom in the future patch
-    assertEquals(1*GB, app_0.getHeadroom().getMemory());
+    assertEquals(1*GB, app_0.getHeadroom().getMemorySize());
       // User limit = 4G, 2 in use
-    assertEquals(0*GB, app_1.getHeadroom().getMemory()); 
+    assertEquals(0*GB, app_1.getHeadroom().getMemorySize());
       // the application is not yet active
 
     // Again one to user_0 since he hasn't exceeded user limit yet
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(3*GB, a.getUsedResources().getMemory());
-    assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(1*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(1*GB, app_0.getHeadroom().getMemory()); // 4G - 3G
-    assertEquals(1*GB, app_1.getHeadroom().getMemory()); // 4G - 3G
+    assertEquals(3*GB, a.getUsedResources().getMemorySize());
+    assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(1*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(1*GB, app_0.getHeadroom().getMemorySize()); // 4G - 3G
+    assertEquals(1*GB, app_1.getHeadroom().getMemorySize()); // 4G - 3G
     
     // Submit requests for app_1 and set max-cap
     a.setMaxCapacity(.1f);
@@ -1027,12 +1027,12 @@ public class TestLeafQueue {
     // and no more containers to queue since it's already at max-cap
     a.assignContainers(clusterResource, node_1,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(3*GB, a.getUsedResources().getMemory());
-    assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(1*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_2.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_0.getHeadroom().getMemory());
-    assertEquals(0*GB, app_1.getHeadroom().getMemory());
+    assertEquals(3*GB, a.getUsedResources().getMemorySize());
+    assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(1*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_0.getHeadroom().getMemorySize());
+    assertEquals(0*GB, app_1.getHeadroom().getMemorySize());
     
     // Check headroom for app_2 
     app_1.updateResourceRequests(Collections.singletonList(     // unset
@@ -1041,7 +1041,7 @@ public class TestLeafQueue {
     assertEquals(1, a.getActiveUsersManager().getNumActiveUsers());
     a.assignContainers(clusterResource, node_1,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(0*GB, app_2.getHeadroom().getMemory());   // hit queue max-cap 
+    assertEquals(0*GB, app_2.getHeadroom().getMemorySize());   // hit queue max-cap
   }
 
   @Test
@@ -1112,25 +1112,25 @@ public class TestLeafQueue {
     // Only 1 container
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(1*GB, a.getUsedResources().getMemory());
-    assertEquals(1*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(1*GB, a.getUsedResources().getMemorySize());
+    assertEquals(1*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
 
     // Also 2nd -> minCapacity = 1024 since (.1 * 8G) < minAlloc, also
     // you can get one container more than user-limit
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(2*GB, a.getUsedResources().getMemory());
-    assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(2*GB, a.getUsedResources().getMemorySize());
+    assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     
     // Can't allocate 3rd due to user-limit
     a.setUserLimit(25);
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(2*GB, a.getUsedResources().getMemory());
-    assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(2*GB, a.getUsedResources().getMemorySize());
+    assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     
     // Submit resource requests for other apps now to 'activate' them
     
@@ -1147,32 +1147,32 @@ public class TestLeafQueue {
     a.setUserLimitFactor(10);
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(5*GB, a.getUsedResources().getMemory());
-    assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(3*GB, app_2.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_3.getCurrentConsumption().getMemory());
+    assertEquals(5*GB, a.getUsedResources().getMemorySize());
+    assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(3*GB, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_3.getCurrentConsumption().getMemorySize());
 
     // Now allocations should goto app_0 since 
     // user_0 is at user-limit not above it
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(6*GB, a.getUsedResources().getMemory());
-    assertEquals(3*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(3*GB, app_2.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_3.getCurrentConsumption().getMemory());
+    assertEquals(6*GB, a.getUsedResources().getMemorySize());
+    assertEquals(3*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(3*GB, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_3.getCurrentConsumption().getMemorySize());
     
     // Test max-capacity
     // Now - no more allocs since we are at max-cap
     a.setMaxCapacity(0.5f);
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(6*GB, a.getUsedResources().getMemory());
-    assertEquals(3*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(3*GB, app_2.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_3.getCurrentConsumption().getMemory());
+    assertEquals(6*GB, a.getUsedResources().getMemorySize());
+    assertEquals(3*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(3*GB, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_3.getCurrentConsumption().getMemorySize());
     
     // Revert max-capacity and user-limit-factor
     // Now, allocations should goto app_3 since it's under user-limit 
@@ -1180,20 +1180,20 @@ public class TestLeafQueue {
     a.setUserLimitFactor(1);
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(7*GB, a.getUsedResources().getMemory()); 
-    assertEquals(3*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(3*GB, app_2.getCurrentConsumption().getMemory());
-    assertEquals(1*GB, app_3.getCurrentConsumption().getMemory());
+    assertEquals(7*GB, a.getUsedResources().getMemorySize());
+    assertEquals(3*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(3*GB, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(1*GB, app_3.getCurrentConsumption().getMemorySize());
 
     // Now we should assign to app_3 again since user_2 is under user-limit
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(8*GB, a.getUsedResources().getMemory()); 
-    assertEquals(3*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(3*GB, app_2.getCurrentConsumption().getMemory());
-    assertEquals(2*GB, app_3.getCurrentConsumption().getMemory());
+    assertEquals(8*GB, a.getUsedResources().getMemorySize());
+    assertEquals(3*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(3*GB, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(2*GB, app_3.getCurrentConsumption().getMemorySize());
 
     // 8. Release each container from app_0
     for (RMContainer rmContainer : app_0.getLiveContainers()) {
@@ -1203,11 +1203,11 @@ public class TestLeafQueue {
               ContainerExitStatus.KILLED_BY_RESOURCEMANAGER),
           RMContainerEventType.KILL, null, true);
     }
-    assertEquals(5*GB, a.getUsedResources().getMemory());
-    assertEquals(0*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(3*GB, app_2.getCurrentConsumption().getMemory());
-    assertEquals(2*GB, app_3.getCurrentConsumption().getMemory());
+    assertEquals(5*GB, a.getUsedResources().getMemorySize());
+    assertEquals(0*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(3*GB, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(2*GB, app_3.getCurrentConsumption().getMemorySize());
     
     // 9. Release each container from app_2
     for (RMContainer rmContainer : app_2.getLiveContainers()) {
@@ -1217,11 +1217,11 @@ public class TestLeafQueue {
               ContainerExitStatus.KILLED_BY_RESOURCEMANAGER),
           RMContainerEventType.KILL, null, true);
     }
-    assertEquals(2*GB, a.getUsedResources().getMemory());
-    assertEquals(0*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_2.getCurrentConsumption().getMemory());
-    assertEquals(2*GB, app_3.getCurrentConsumption().getMemory());
+    assertEquals(2*GB, a.getUsedResources().getMemorySize());
+    assertEquals(0*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(2*GB, app_3.getCurrentConsumption().getMemorySize());
 
     // 10. Release each container from app_3
     for (RMContainer rmContainer : app_3.getLiveContainers()) {
@@ -1231,11 +1231,11 @@ public class TestLeafQueue {
               ContainerExitStatus.KILLED_BY_RESOURCEMANAGER),
           RMContainerEventType.KILL, null, true);
     }
-    assertEquals(0*GB, a.getUsedResources().getMemory());
-    assertEquals(0*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_2.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_3.getCurrentConsumption().getMemory());
+    assertEquals(0*GB, a.getUsedResources().getMemorySize());
+    assertEquals(0*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_3.getCurrentConsumption().getMemorySize());
   }
   
   @Test
@@ -1289,9 +1289,9 @@ public class TestLeafQueue {
     // Only 1 container
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(1*GB, a.getUsedResources().getMemory());
-    assertEquals(1*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(1*GB, a.getUsedResources().getMemorySize());
+    assertEquals(1*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     assertEquals(0*GB, a.getMetrics().getReservedMB());
     assertEquals(1*GB, a.getMetrics().getAllocatedMB());
     assertEquals(0*GB, a.getMetrics().getAvailableMB());
@@ -1300,20 +1300,20 @@ public class TestLeafQueue {
     // you can get one container more than user-limit
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(2*GB, a.getUsedResources().getMemory());
-    assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(2*GB, a.getUsedResources().getMemorySize());
+    assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     assertEquals(0*GB, a.getMetrics().getReservedMB());
     assertEquals(2*GB, a.getMetrics().getAllocatedMB());
     
     // Now, reservation should kick in for app_1
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(6*GB, a.getUsedResources().getMemory()); 
-    assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(4*GB, app_1.getCurrentReservation().getMemory());
-    assertEquals(2*GB, node_0.getAllocatedResource().getMemory());
+    assertEquals(6*GB, a.getUsedResources().getMemorySize());
+    assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(4*GB, app_1.getCurrentReservation().getMemorySize());
+    assertEquals(2*GB, node_0.getAllocatedResource().getMemorySize());
     assertEquals(4*GB, a.getMetrics().getReservedMB());
     assertEquals(2*GB, a.getMetrics().getAllocatedMB());
     
@@ -1326,11 +1326,11 @@ public class TestLeafQueue {
         RMContainerEventType.KILL, null, true);
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(5*GB, a.getUsedResources().getMemory()); 
-    assertEquals(1*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(4*GB, app_1.getCurrentReservation().getMemory());
-    assertEquals(1*GB, node_0.getAllocatedResource().getMemory());
+    assertEquals(5*GB, a.getUsedResources().getMemorySize());
+    assertEquals(1*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(4*GB, app_1.getCurrentReservation().getMemorySize());
+    assertEquals(1*GB, node_0.getAllocatedResource().getMemorySize());
     assertEquals(4*GB, a.getMetrics().getReservedMB());
     assertEquals(1*GB, a.getMetrics().getAllocatedMB());
 
@@ -1343,11 +1343,11 @@ public class TestLeafQueue {
         RMContainerEventType.KILL, null, true);
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(4*GB, a.getUsedResources().getMemory());
-    assertEquals(0*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(4*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentReservation().getMemory());
-    assertEquals(4*GB, node_0.getAllocatedResource().getMemory());
+    assertEquals(4*GB, a.getUsedResources().getMemorySize());
+    assertEquals(0*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(4*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentReservation().getMemorySize());
+    assertEquals(4*GB, node_0.getAllocatedResource().getMemorySize());
     assertEquals(0*GB, a.getMetrics().getReservedMB());
     assertEquals(4*GB, a.getMetrics().getAllocatedMB());
   }
@@ -1417,26 +1417,26 @@ public class TestLeafQueue {
     // Only 1 container
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(1*GB, a.getUsedResources().getMemory());
-    assertEquals(1*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(1*GB, a.getUsedResources().getMemorySize());
+    assertEquals(1*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
 
     // Also 2nd -> minCapacity = 1024 since (.1 * 8G) < minAlloc, also
     // you can get one container more than user-limit
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(2*GB, a.getUsedResources().getMemory());
-    assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(2*GB, a.getUsedResources().getMemorySize());
+    assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     
     // Now, reservation should kick in for app_1
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(6*GB, a.getUsedResources().getMemory()); 
-    assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(4*GB, app_1.getCurrentReservation().getMemory());
-    assertEquals(2*GB, node_0.getAllocatedResource().getMemory());
+    assertEquals(6*GB, a.getUsedResources().getMemorySize());
+    assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(4*GB, app_1.getCurrentReservation().getMemorySize());
+    assertEquals(2*GB, node_0.getAllocatedResource().getMemorySize());
     
     // Now free 1 container from app_0 i.e. 1G, and re-reserve it
     RMContainer rmContainer = app_0.getLiveContainers().iterator().next();
@@ -1447,31 +1447,31 @@ public class TestLeafQueue {
         RMContainerEventType.KILL, null, true);
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(5*GB, a.getUsedResources().getMemory()); 
-    assertEquals(1*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(4*GB, app_1.getCurrentReservation().getMemory());
-    assertEquals(1*GB, node_0.getAllocatedResource().getMemory());
+    assertEquals(5*GB, a.getUsedResources().getMemorySize());
+    assertEquals(1*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(4*GB, app_1.getCurrentReservation().getMemorySize());
+    assertEquals(1*GB, node_0.getAllocatedResource().getMemorySize());
     assertEquals(1, app_1.getReReservations(priority));
 
     // Re-reserve
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(5*GB, a.getUsedResources().getMemory()); 
-    assertEquals(1*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(4*GB, app_1.getCurrentReservation().getMemory());
-    assertEquals(1*GB, node_0.getAllocatedResource().getMemory());
+    assertEquals(5*GB, a.getUsedResources().getMemorySize());
+    assertEquals(1*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(4*GB, app_1.getCurrentReservation().getMemorySize());
+    assertEquals(1*GB, node_0.getAllocatedResource().getMemorySize());
     assertEquals(2, app_1.getReReservations(priority));
     
     // Try to schedule on node_1 now, should *move* the reservation
     a.assignContainers(clusterResource, node_1,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(9*GB, a.getUsedResources().getMemory()); 
-    assertEquals(1*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(4*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(4*GB, app_1.getCurrentReservation().getMemory());
-    assertEquals(4*GB, node_1.getAllocatedResource().getMemory());
+    assertEquals(9*GB, a.getUsedResources().getMemorySize());
+    assertEquals(1*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(4*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(4*GB, app_1.getCurrentReservation().getMemorySize());
+    assertEquals(4*GB, node_1.getAllocatedResource().getMemorySize());
     // Doesn't change yet... only when reservation is cancelled or a different
     // container is reserved
     assertEquals(2, app_1.getReReservations(priority)); 
@@ -1485,11 +1485,11 @@ public class TestLeafQueue {
         RMContainerEventType.KILL, null, true);
     a.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(4*GB, a.getUsedResources().getMemory());
-    assertEquals(0*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(4*GB, app_1.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentReservation().getMemory());
-    assertEquals(0*GB, node_0.getAllocatedResource().getMemory());
+    assertEquals(4*GB, a.getUsedResources().getMemorySize());
+    assertEquals(0*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(4*GB, app_1.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentReservation().getMemorySize());
+    assertEquals(0*GB, node_0.getAllocatedResource().getMemorySize());
   }
   
   private void verifyContainerAllocated(CSAssignment assignment, NodeType nodeType) {
@@ -2447,9 +2447,9 @@ public class TestLeafQueue {
 
     // app_1 will get containers as it has high priority
     a.assignContainers(clusterResource, node_0_0, new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    Assert.assertEquals(1*GB, app_1.getCurrentConsumption().getMemory());
+    Assert.assertEquals(1*GB, app_1.getCurrentConsumption().getMemorySize());
     a.assignContainers(clusterResource, node_0_0, new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    Assert.assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
+    Assert.assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
 
     app_0_requests_0.clear();
     app_0_requests_0.add(
@@ -2465,12 +2465,12 @@ public class TestLeafQueue {
 
     //app_1 will still get assigned first as priority is more.
     a.assignContainers(clusterResource, node_0_0, new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    Assert.assertEquals(2*GB, app_1.getCurrentConsumption().getMemory());
-    Assert.assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
+    Assert.assertEquals(2*GB, app_1.getCurrentConsumption().getMemorySize());
+    Assert.assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
 
     //and only then will app_2
     a.assignContainers(clusterResource, node_0_0, new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    Assert.assertEquals(3*GB, app_0.getCurrentConsumption().getMemory());
+    Assert.assertEquals(3*GB, app_0.getCurrentConsumption().getMemorySize());
 }
   @Test
   public void testConcurrentAccess() throws Exception {
@@ -2594,9 +2594,9 @@ public class TestLeafQueue {
 
     // app_0 will get containers as its submitted first.
     a.assignContainers(clusterResource, node_0_0, new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    Assert.assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
+    Assert.assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
     a.assignContainers(clusterResource, node_0_0, new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    Assert.assertEquals(1*GB, app_1.getCurrentConsumption().getMemory());
+    Assert.assertEquals(1*GB, app_1.getCurrentConsumption().getMemorySize());
 
     app_0_requests_0.clear();
     app_0_requests_0.add(
@@ -2613,12 +2613,12 @@ public class TestLeafQueue {
     //Since it already has more resources, app_0 will not get
     //assigned first, but app_1 will
     a.assignContainers(clusterResource, node_0_0, new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    Assert.assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
-    Assert.assertEquals(2*GB, app_1.getCurrentConsumption().getMemory());
+    Assert.assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
+    Assert.assertEquals(2*GB, app_1.getCurrentConsumption().getMemorySize());
 
     //and only then will app_0
     a.assignContainers(clusterResource, node_0_0, new ResourceLimits(clusterResource), SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    Assert.assertEquals(3*GB, app_0.getCurrentConsumption().getMemory());
+    Assert.assertEquals(3*GB, app_0.getCurrentConsumption().getMemorySize());
 
   }
   
@@ -2773,10 +2773,10 @@ public class TestLeafQueue {
     // all users (only user_0) queue 'e' should be able to consume 1GB.
     // The first container should be assigned to app_0 with no headroom left
     // even though user_0's apps are still asking for a total of 4GB.
-    assertEquals(1*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(1*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     assertEquals(0*GB, e.getTotalPendingResourcesConsideringUserLimit(
-                   clusterResource, RMNodeLabelsManager.NO_LABEL).getMemory());
+                   clusterResource, RMNodeLabelsManager.NO_LABEL).getMemorySize());
 
     // Assign 2nd container of 1GB
     e.assignContainers(clusterResource, node_0,
@@ -2786,19 +2786,19 @@ public class TestLeafQueue {
     // scheduler will assign one container more than user-limit-factor.
     // This container also went to app_0. Still with no neadroom even though
     // app_0 and app_1 are asking for a cumulative 3GB.
-    assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     assertEquals(0*GB, e.getTotalPendingResourcesConsideringUserLimit(
-        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemory());
+        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemorySize());
 
     // Can't allocate 3rd container due to user-limit. Headroom still 0.
     e.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource),
         SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(2*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(2*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     assertEquals(0*GB, e.getTotalPendingResourcesConsideringUserLimit(
-        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemory());
+        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemorySize());
 
     // Increase user-limit-factor from 1GB to 10GB (1% * 10 * 100GB = 10GB).
     // Pending for both app_0 and app_1 are still 3GB, so user-limit-factor
@@ -2806,16 +2806,16 @@ public class TestLeafQueue {
     // getTotalPendingResourcesConsideringUserLimit()
     e.setUserLimitFactor(10.0f);
     assertEquals(3*GB, e.getTotalPendingResourcesConsideringUserLimit(
-        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemory());
+        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemorySize());
 
     e.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource),
         SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
     // app_0 is now satisified, app_1 is still asking for 2GB.
-    assertEquals(3*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(3*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     assertEquals(2*GB, e.getTotalPendingResourcesConsideringUserLimit(
-        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemory());
+        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemorySize());
 
     // Get the last 2 containers for app_1, no more pending requests.
     e.assignContainers(clusterResource, node_0,
@@ -2824,10 +2824,10 @@ public class TestLeafQueue {
     e.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource),
         SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
-    assertEquals(3*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(2*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(3*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(2*GB, app_1.getCurrentConsumption().getMemorySize());
     assertEquals(0*GB, e.getTotalPendingResourcesConsideringUserLimit(
-        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemory());
+        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemorySize());
 
     // Release each container from app_0
     for (RMContainer rmContainer : app_0.getLiveContainers()) {
@@ -2929,14 +2929,14 @@ public class TestLeafQueue {
     // With queue capacity set at 1% of 100GB and user-limit-factor set to 1.0,
     // queue 'e' should be able to consume 1GB per user.
     assertEquals(2*GB, e.getTotalPendingResourcesConsideringUserLimit(
-        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemory());
+        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemorySize());
     // None of the apps have assigned resources
     // user_0's apps:
-    assertEquals(0*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(0*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     // user_1's apps:
-    assertEquals(0*GB, app_2.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_3.getCurrentConsumption().getMemory());
+    assertEquals(0*GB, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_3.getCurrentConsumption().getMemorySize());
 
     // Assign 1st Container of 1GB
     e.assignContainers(clusterResource, node_0,
@@ -2945,13 +2945,13 @@ public class TestLeafQueue {
    // The first container was assigned to user_0's app_0. Queues total headroom
     // has 1GB left for user_1.
     assertEquals(1*GB, e.getTotalPendingResourcesConsideringUserLimit(
-        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemory());
+        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemorySize());
     // user_0's apps:
-    assertEquals(1*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(1*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_1.getCurrentConsumption().getMemorySize());
     // user_1's apps:
-    assertEquals(0*GB, app_2.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_3.getCurrentConsumption().getMemory());
+    assertEquals(0*GB, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_3.getCurrentConsumption().getMemorySize());
 
     // Assign 2nd container of 1GB
     e.assignContainers(clusterResource, node_0,
@@ -2962,13 +2962,13 @@ public class TestLeafQueue {
     // this container went to user_0's app_1. so, headroom for queue 'e'e is
     // still 1GB for user_1
     assertEquals(1*GB, e.getTotalPendingResourcesConsideringUserLimit(
-        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemory());
+        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemorySize());
     // user_0's apps:
-    assertEquals(1*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(1*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(1*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(1*GB, app_1.getCurrentConsumption().getMemorySize());
     // user_1's apps:
-    assertEquals(0*GB, app_2.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_3.getCurrentConsumption().getMemory());
+    assertEquals(0*GB, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_3.getCurrentConsumption().getMemorySize());
 
     // Assign 3rd container.
     e.assignContainers(clusterResource, node_0,
@@ -2977,13 +2977,13 @@ public class TestLeafQueue {
     // Container was allocated to user_1's app_2 since user_1, Now, no headroom
     // is left.
     assertEquals(0*GB, e.getTotalPendingResourcesConsideringUserLimit(
-        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemory());
+        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemorySize());
     // user_0's apps:
-    assertEquals(1*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(1*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(1*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(1*GB, app_1.getCurrentConsumption().getMemorySize());
     // user_1's apps:
-    assertEquals(1*GB, app_2.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_3.getCurrentConsumption().getMemory());
+    assertEquals(1*GB, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_3.getCurrentConsumption().getMemorySize());
 
     // Assign 4th container.
     e.assignContainers(clusterResource, node_0,
@@ -2992,16 +2992,16 @@ public class TestLeafQueue {
     // Allocated to user_1's app_2 since scheduler allocates 1 container
     // above user resource limit. Available headroom still 0.
     assertEquals(0*GB, e.getTotalPendingResourcesConsideringUserLimit(
-        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemory());
+        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemorySize());
     // user_0's apps:
-    int app_0_consumption = app_0.getCurrentConsumption().getMemory();
+    long app_0_consumption = app_0.getCurrentConsumption().getMemorySize();
     assertEquals(1*GB, app_0_consumption);
-    int app_1_consumption = app_1.getCurrentConsumption().getMemory();
+    long app_1_consumption = app_1.getCurrentConsumption().getMemorySize();
     assertEquals(1*GB, app_1_consumption);
     // user_1's apps:
-    int app_2_consumption = app_2.getCurrentConsumption().getMemory();
+    long app_2_consumption = app_2.getCurrentConsumption().getMemorySize();
     assertEquals(2*GB, app_2_consumption);
-    int app_3_consumption = app_3.getCurrentConsumption().getMemory();
+    long app_3_consumption = app_3.getCurrentConsumption().getMemorySize();
     assertEquals(0*GB, app_3_consumption);
 
     // Attempt to assign 5th container. Will be a no-op.
@@ -3011,13 +3011,13 @@ public class TestLeafQueue {
     // Cannot allocate 5th container because both users are above their allowed
     // user resource limit. Values should be the same as previously.
     assertEquals(0*GB, e.getTotalPendingResourcesConsideringUserLimit(
-        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemory());
+        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemorySize());
     // user_0's apps:
-    assertEquals(app_0_consumption, app_0.getCurrentConsumption().getMemory());
-    assertEquals(app_1_consumption, app_1.getCurrentConsumption().getMemory());
+    assertEquals(app_0_consumption, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(app_1_consumption, app_1.getCurrentConsumption().getMemorySize());
     // user_1's apps:
-    assertEquals(app_2_consumption, app_2.getCurrentConsumption().getMemory());
-    assertEquals(app_3_consumption, app_3.getCurrentConsumption().getMemory());
+    assertEquals(app_2_consumption, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(app_3_consumption, app_3.getCurrentConsumption().getMemorySize());
 
     // Increase user-limit-factor from 1GB to 10GB (1% * 10 * 100GB = 10GB).
     // Pending for both user_0 and user_1 are still 1GB each, so user-limit-
@@ -3029,13 +3029,13 @@ public class TestLeafQueue {
         SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
     // Next container goes to user_0's app_1, since it still wanted 1GB.
     assertEquals(1*GB, e.getTotalPendingResourcesConsideringUserLimit(
-        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemory());
+        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemorySize());
     // user_0's apps:
-    assertEquals(1*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(2*GB, app_1.getCurrentConsumption().getMemory());
+    assertEquals(1*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(2*GB, app_1.getCurrentConsumption().getMemorySize());
     // user_1's apps:
-    assertEquals(2*GB, app_2.getCurrentConsumption().getMemory());
-    assertEquals(0*GB, app_3.getCurrentConsumption().getMemory());
+    assertEquals(2*GB, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(0*GB, app_3.getCurrentConsumption().getMemorySize());
 
     e.assignContainers(clusterResource, node_0,
         new ResourceLimits(clusterResource),
@@ -3043,12 +3043,12 @@ public class TestLeafQueue {
     // Last container goes to user_1's app_3, since it still wanted 1GB.
     // user_0's apps:
     assertEquals(0*GB, e.getTotalPendingResourcesConsideringUserLimit(
-        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemory());
-    assertEquals(1*GB, app_0.getCurrentConsumption().getMemory());
-    assertEquals(2*GB, app_1.getCurrentConsumption().getMemory());
+        clusterResource, RMNodeLabelsManager.NO_LABEL).getMemorySize());
+    assertEquals(1*GB, app_0.getCurrentConsumption().getMemorySize());
+    assertEquals(2*GB, app_1.getCurrentConsumption().getMemorySize());
     // user_1's apps:
-    assertEquals(2*GB, app_2.getCurrentConsumption().getMemory());
-    assertEquals(1*GB, app_3.getCurrentConsumption().getMemory());
+    assertEquals(2*GB, app_2.getCurrentConsumption().getMemorySize());
+    assertEquals(1*GB, app_3.getCurrentConsumption().getMemorySize());
 
     // Release each container from app_0
     for (RMContainer rmContainer : app_0.getLiveContainers()) {


---------------------------------------------------------------------
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