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:
parent
334de8d211
commit
079ed1c9e1
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue