MAPREDUCE-5689. MRAppMaster does not preempt reducers when scheduled maps cannot be fulfilled. (lohit via kasha)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1555162 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8e135fc73c
commit
2bbd22bbd5
@ -121,6 +121,9 @@ Release 2.4.0 - UNRELEASED
|
|||||||
MAPREDUCE-5685. Fixed a bug with JobContext getCacheFiles API inside the
|
MAPREDUCE-5685. Fixed a bug with JobContext getCacheFiles API inside the
|
||||||
WrappedReducer class. (Yi Song via vinodkv)
|
WrappedReducer class. (Yi Song via vinodkv)
|
||||||
|
|
||||||
|
MAPREDUCE-5689. MRAppMaster does not preempt reducers when scheduled maps
|
||||||
|
cannot be fulfilled. (lohit via kasha)
|
||||||
|
|
||||||
Release 2.3.0 - UNRELEASED
|
Release 2.3.0 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -223,7 +223,8 @@ protected synchronized void heartbeat() throws Exception {
|
|||||||
|
|
||||||
int completedMaps = getJob().getCompletedMaps();
|
int completedMaps = getJob().getCompletedMaps();
|
||||||
int completedTasks = completedMaps + getJob().getCompletedReduces();
|
int completedTasks = completedMaps + getJob().getCompletedReduces();
|
||||||
if (lastCompletedTasks != completedTasks) {
|
if ((lastCompletedTasks != completedTasks) ||
|
||||||
|
(scheduledRequests.maps.size() > 0)) {
|
||||||
lastCompletedTasks = completedTasks;
|
lastCompletedTasks = completedTasks;
|
||||||
recalculateReduceSchedule = true;
|
recalculateReduceSchedule = true;
|
||||||
}
|
}
|
||||||
|
@ -1600,6 +1600,21 @@ public void testReduceScheduling() throws Exception {
|
|||||||
numPendingReduces,
|
numPendingReduces,
|
||||||
maxReduceRampupLimit, reduceSlowStart);
|
maxReduceRampupLimit, reduceSlowStart);
|
||||||
verify(allocator).rampDownReduces(anyInt());
|
verify(allocator).rampDownReduces(anyInt());
|
||||||
|
|
||||||
|
// Test reduce ramp-down for when there are scheduled maps
|
||||||
|
// Since we have two scheduled Maps, rampDownReducers
|
||||||
|
// should be invoked twice.
|
||||||
|
scheduledMaps = 2;
|
||||||
|
assignedReduces = 2;
|
||||||
|
doReturn(10 * 1024).when(allocator).getMemLimit();
|
||||||
|
allocator.scheduleReduces(
|
||||||
|
totalMaps, succeededMaps,
|
||||||
|
scheduledMaps, scheduledReduces,
|
||||||
|
assignedMaps, assignedReduces,
|
||||||
|
mapResourceReqt, reduceResourceReqt,
|
||||||
|
numPendingReduces,
|
||||||
|
maxReduceRampupLimit, reduceSlowStart);
|
||||||
|
verify(allocator, times(2)).rampDownReduces(anyInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class RecalculateContainerAllocator extends MyContainerAllocator {
|
private static class RecalculateContainerAllocator extends MyContainerAllocator {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user