hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jia...@apache.org
Subject hadoop git commit: YARN-3145. Fixed ConcurrentModificationException on CapacityScheduler ParentQueue#getQueueUserAclInfo. Contributed by Tsuyoshi OZAWA
Date Fri, 06 Feb 2015 00:13:08 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk b77ff3768 -> 4641196fe


YARN-3145. Fixed ConcurrentModificationException on CapacityScheduler ParentQueue#getQueueUserAclInfo.
Contributed by Tsuyoshi OZAWA


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/4641196f
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/4641196f
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/4641196f

Branch: refs/heads/trunk
Commit: 4641196fe02af5cab3d56a9f3c78875c495dbe03
Parents: b77ff37
Author: Jian He <jianhe@apache.org>
Authored: Thu Feb 5 16:12:53 2015 -0800
Committer: Jian He <jianhe@apache.org>
Committed: Thu Feb 5 16:12:53 2015 -0800

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                 |  3 ++
 .../scheduler/capacity/ParentQueue.java         | 38 ++++++++++----------
 2 files changed, 22 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/4641196f/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 6ecaff3..805ec66 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -491,6 +491,9 @@ Release 2.7.0 - UNRELEASED
     YARN-3149. Fix typo in message for invalid application id.
     (Bibin A Chundatt via xgong)
 
+    YARN-3145. Fixed ConcurrentModificationException on CapacityScheduler
+    ParentQueue#getQueueUserAclInfo. (Tsuyoshi OZAWA via jianhe)
+
 Release 2.6.0 - 2014-11-18
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/4641196f/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ParentQueue.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ParentQueue.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ParentQueue.java
index d66c06a..5a2e234 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ParentQueue.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ParentQueue.java
@@ -158,7 +158,7 @@ public class ParentQueue extends AbstractCSQueue {
   }
 
   private static float PRECISION = 0.0005f; // 0.05% precision
-  void setChildQueues(Collection<CSQueue> childQueues) {
+  synchronized void setChildQueues(Collection<CSQueue> childQueues) {
     // Validate
     float childCapacities = 0;
     for (CSQueue queue : childQueues) {
@@ -574,7 +574,7 @@ public class ParentQueue extends AbstractCSQueue {
     printChildQueues();
 
     // Try to assign to most 'under-served' sub-queue
-    for (Iterator<CSQueue> iter=childQueues.iterator(); iter.hasNext();) {
+    for (Iterator<CSQueue> iter = childQueues.iterator(); iter.hasNext();) {
       CSQueue childQueue = iter.next();
       if(LOG.isDebugEnabled()) {
         LOG.debug("Trying to assign to queue: " + childQueue.getQueuePath()
@@ -644,26 +644,26 @@ public class ParentQueue extends AbstractCSQueue {
             " absoluteUsedCapacity=" + getAbsoluteUsedCapacity() +
             " used=" + queueUsage.getUsed() + 
             " cluster=" + clusterResource);
-      }
 
-      // Note that this is using an iterator on the childQueues so this can't be
-      // called if already within an iterator for the childQueues. Like  
-      // from assignContainersToChildQueues.
-      if (sortQueues) {
-        // reinsert the updated queue
-        for (Iterator<CSQueue> iter=childQueues.iterator(); iter.hasNext();) {
-          CSQueue csqueue = iter.next();
-          if(csqueue.equals(completedChildQueue))
-          {
-            iter.remove();
-            LOG.info("Re-sorting completed queue: " + csqueue.getQueuePath() + 
-                " stats: " + csqueue);
-            childQueues.add(csqueue);
-            break;
+        // Note that this is using an iterator on the childQueues so this can't
+        // be called if already within an iterator for the childQueues. Like
+        // from assignContainersToChildQueues.
+        if (sortQueues) {
+          // reinsert the updated queue
+          for (Iterator<CSQueue> iter = childQueues.iterator();
+               iter.hasNext();) {
+            CSQueue csqueue = iter.next();
+            if(csqueue.equals(completedChildQueue)) {
+              iter.remove();
+              LOG.info("Re-sorting completed queue: " + csqueue.getQueuePath() +
+                  " stats: " + csqueue);
+              childQueues.add(csqueue);
+              break;
+            }
           }
         }
       }
-      
+
       // Inform the parent
       if (parent != null) {
         // complete my parent
@@ -715,7 +715,7 @@ public class ParentQueue extends AbstractCSQueue {
   }
 
   @Override
-  public void collectSchedulerApplications(
+  public synchronized void collectSchedulerApplications(
       Collection<ApplicationAttemptId> apps) {
     for (CSQueue queue : childQueues) {
       queue.collectSchedulerApplications(apps);


Mime
View raw message