YARN-3145. Fixed ConcurrentModificationException on CapacityScheduler ParentQueue#getQueueUserAclInfo. Contributed by Tsuyoshi OZAWA
(cherry picked from commit 4641196fe0
)
This commit is contained in:
parent
096ba583fa
commit
b109051145
|
@ -457,6 +457,9 @@ Release 2.7.0 - UNRELEASED
|
||||||
YARN-3149. Fix typo in message for invalid application id.
|
YARN-3149. Fix typo in message for invalid application id.
|
||||||
(Bibin A Chundatt via xgong)
|
(Bibin A Chundatt via xgong)
|
||||||
|
|
||||||
|
YARN-3145. Fixed ConcurrentModificationException on CapacityScheduler
|
||||||
|
ParentQueue#getQueueUserAclInfo. (Tsuyoshi OZAWA via jianhe)
|
||||||
|
|
||||||
Release 2.6.0 - 2014-11-18
|
Release 2.6.0 - 2014-11-18
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -158,7 +158,7 @@ public class ParentQueue extends AbstractCSQueue {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static float PRECISION = 0.0005f; // 0.05% precision
|
private static float PRECISION = 0.0005f; // 0.05% precision
|
||||||
void setChildQueues(Collection<CSQueue> childQueues) {
|
synchronized void setChildQueues(Collection<CSQueue> childQueues) {
|
||||||
// Validate
|
// Validate
|
||||||
float childCapacities = 0;
|
float childCapacities = 0;
|
||||||
for (CSQueue queue : childQueues) {
|
for (CSQueue queue : childQueues) {
|
||||||
|
@ -644,17 +644,16 @@ public class ParentQueue extends AbstractCSQueue {
|
||||||
" absoluteUsedCapacity=" + getAbsoluteUsedCapacity() +
|
" absoluteUsedCapacity=" + getAbsoluteUsedCapacity() +
|
||||||
" used=" + queueUsage.getUsed() +
|
" used=" + queueUsage.getUsed() +
|
||||||
" cluster=" + clusterResource);
|
" cluster=" + clusterResource);
|
||||||
}
|
|
||||||
|
|
||||||
// Note that this is using an iterator on the childQueues so this can't be
|
// Note that this is using an iterator on the childQueues so this can't
|
||||||
// called if already within an iterator for the childQueues. Like
|
// be called if already within an iterator for the childQueues. Like
|
||||||
// from assignContainersToChildQueues.
|
// from assignContainersToChildQueues.
|
||||||
if (sortQueues) {
|
if (sortQueues) {
|
||||||
// reinsert the updated queue
|
// reinsert the updated queue
|
||||||
for (Iterator<CSQueue> iter=childQueues.iterator(); iter.hasNext();) {
|
for (Iterator<CSQueue> iter = childQueues.iterator();
|
||||||
|
iter.hasNext();) {
|
||||||
CSQueue csqueue = iter.next();
|
CSQueue csqueue = iter.next();
|
||||||
if(csqueue.equals(completedChildQueue))
|
if(csqueue.equals(completedChildQueue)) {
|
||||||
{
|
|
||||||
iter.remove();
|
iter.remove();
|
||||||
LOG.info("Re-sorting completed queue: " + csqueue.getQueuePath() +
|
LOG.info("Re-sorting completed queue: " + csqueue.getQueuePath() +
|
||||||
" stats: " + csqueue);
|
" stats: " + csqueue);
|
||||||
|
@ -663,6 +662,7 @@ public class ParentQueue extends AbstractCSQueue {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Inform the parent
|
// Inform the parent
|
||||||
if (parent != null) {
|
if (parent != null) {
|
||||||
|
@ -715,7 +715,7 @@ public class ParentQueue extends AbstractCSQueue {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collectSchedulerApplications(
|
public synchronized void collectSchedulerApplications(
|
||||||
Collection<ApplicationAttemptId> apps) {
|
Collection<ApplicationAttemptId> apps) {
|
||||||
for (CSQueue queue : childQueues) {
|
for (CSQueue queue : childQueues) {
|
||||||
queue.collectSchedulerApplications(apps);
|
queue.collectSchedulerApplications(apps);
|
||||||
|
|
Loading…
Reference in New Issue