MAPREDUCE-3345. Fixed a race condition in ResourceManager that was causing TestContainerManagerSecurity to fail sometimes. Contributed by Hitesh Shah.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1199144 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9fe9f42c8f
commit
80cc8e9486
@ -89,6 +89,9 @@ Release 0.23.1 - Unreleased
|
|||||||
MAPREDUCE-3342. Fixed JobHistoryServer to also show the job's queue
|
MAPREDUCE-3342. Fixed JobHistoryServer to also show the job's queue
|
||||||
name. (Jonathan Eagles via vinodkv)
|
name. (Jonathan Eagles via vinodkv)
|
||||||
|
|
||||||
|
MAPREDUCE-3345. Fixed a race condition in ResourceManager that was causing
|
||||||
|
TestContainerManagerSecurity to fail sometimes. (Hitesh Shah via vinodkv)
|
||||||
|
|
||||||
Release 0.23.0 - 2011-11-01
|
Release 0.23.0 - 2011-11-01
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -595,8 +595,13 @@ public void transition(RMAppAttemptImpl appAttempt,
|
|||||||
AM_CONTAINER_PRIORITY, "*", appAttempt.submissionContext
|
AM_CONTAINER_PRIORITY, "*", appAttempt.submissionContext
|
||||||
.getAMContainerSpec().getResource(), 1);
|
.getAMContainerSpec().getResource(), 1);
|
||||||
|
|
||||||
|
Allocation amContainerAllocation =
|
||||||
appAttempt.scheduler.allocate(appAttempt.applicationAttemptId,
|
appAttempt.scheduler.allocate(appAttempt.applicationAttemptId,
|
||||||
Collections.singletonList(request), EMPTY_CONTAINER_RELEASE_LIST);
|
Collections.singletonList(request), EMPTY_CONTAINER_RELEASE_LIST);
|
||||||
|
if (amContainerAllocation != null
|
||||||
|
&& amContainerAllocation.getContainers() != null) {
|
||||||
|
assert(amContainerAllocation.getContainers().size() == 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -236,6 +236,7 @@ public Allocation allocate(
|
|||||||
RMContainerEventType.RELEASED);
|
RMContainerEventType.RELEASED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
synchronized (application) {
|
||||||
if (!ask.isEmpty()) {
|
if (!ask.isEmpty()) {
|
||||||
LOG.debug("allocate: pre-update" +
|
LOG.debug("allocate: pre-update" +
|
||||||
" applicationId=" + applicationAttemptId +
|
" applicationId=" + applicationAttemptId +
|
||||||
@ -259,6 +260,7 @@ public Allocation allocate(
|
|||||||
application.pullNewlyAllocatedContainers(),
|
application.pullNewlyAllocatedContainers(),
|
||||||
application.getHeadroom());
|
application.getHeadroom());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private SchedulerApp getApplication(
|
private SchedulerApp getApplication(
|
||||||
ApplicationAttemptId applicationAttemptId) {
|
ApplicationAttemptId applicationAttemptId) {
|
||||||
|
Loading…
Reference in New Issue
Block a user