diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 8a988258916..75dca8f6321 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -557,6 +557,9 @@ Release 2.1.0-beta - UNRELEASED MAPREDUCE-5319. Set user.name in job.xml. (Xuan Gong via acmurthy) + MAPREDUCE-5310. MRAM should not normalize allocation request capabilities. + (tucu) + Release 2.0.5-alpha - 06/06/2013 INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/rm/RMCommunicator.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/rm/RMCommunicator.java index 27f2b27a3d8..72fc4cab26c 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/rm/RMCommunicator.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/rm/RMCommunicator.java @@ -72,7 +72,6 @@ public abstract class RMCommunicator extends AbstractService protected AMRMProtocol scheduler; private final ClientService clientService; protected int lastResponseID; - private Resource minContainerCapability; private Resource maxContainerCapability; protected Map applicationACLs; private volatile long lastHeartbeatTime; @@ -152,14 +151,10 @@ public abstract class RMCommunicator extends AbstractService } RegisterApplicationMasterResponse response = scheduler.registerApplicationMaster(request); - minContainerCapability = response.getMinimumResourceCapability(); maxContainerCapability = response.getMaximumResourceCapability(); - this.context.getClusterInfo().setMinContainerCapability( - minContainerCapability); this.context.getClusterInfo().setMaxContainerCapability( maxContainerCapability); this.applicationACLs = response.getApplicationACLs(); - LOG.info("minContainerCapability: " + minContainerCapability.getMemory()); LOG.info("maxContainerCapability: " + maxContainerCapability.getMemory()); } catch (Exception are) { LOG.error("Exception while registering", are); @@ -202,10 +197,6 @@ public abstract class RMCommunicator extends AbstractService } } - protected Resource getMinContainerCapability() { - return minContainerCapability; - } - protected Resource getMaxContainerCapability() { return maxContainerCapability; } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/rm/RMContainerAllocator.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/rm/RMContainerAllocator.java index 2799e9292cb..ec8480a59b6 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/rm/RMContainerAllocator.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/rm/RMContainerAllocator.java @@ -291,9 +291,6 @@ public class RMContainerAllocator extends RMContainerRequestor if (reqEvent.getAttemptID().getTaskId().getTaskType().equals(TaskType.MAP)) { if (mapResourceReqt == 0) { mapResourceReqt = reqEvent.getCapability().getMemory(); - int minSlotMemSize = getMinContainerCapability().getMemory(); - mapResourceReqt = (int) Math.ceil((float) mapResourceReqt/minSlotMemSize) - * minSlotMemSize; eventHandler.handle(new JobHistoryEvent(jobId, new NormalizedResourceEvent(org.apache.hadoop.mapreduce.TaskType.MAP, mapResourceReqt))); @@ -314,10 +311,6 @@ public class RMContainerAllocator extends RMContainerRequestor } else { if (reduceResourceReqt == 0) { reduceResourceReqt = reqEvent.getCapability().getMemory(); - int minSlotMemSize = getMinContainerCapability().getMemory(); - //round off on slotsize - reduceResourceReqt = (int) Math.ceil((float) - reduceResourceReqt/minSlotMemSize) * minSlotMemSize; eventHandler.handle(new JobHistoryEvent(jobId, new NormalizedResourceEvent( org.apache.hadoop.mapreduce.TaskType.REDUCE, diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRMContainerAllocator.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRMContainerAllocator.java index 9286b6ad8bb..4bda49e5d88 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRMContainerAllocator.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRMContainerAllocator.java @@ -1401,11 +1401,6 @@ public class TestRMContainerAllocator { protected void unregister() { } - @Override - protected Resource getMinContainerCapability() { - return Resource.newInstance(1024, 1); - } - @Override protected Resource getMaxContainerCapability() { return Resource.newInstance(10240, 1);