MAPREDUCE-5310. MRAM should not normalize allocation request capabilities. (tucu)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1493207 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Alejandro Abdelnur 2013-06-14 19:06:50 +00:00
parent 334de8d211
commit 079ed1c9e1
4 changed files with 3 additions and 21 deletions

View File

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

View File

@ -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<ApplicationAccessType, String> 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;
}

View File

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

View File

@ -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);