hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1135920 - in /hadoop/common/branches/MR-279/mapreduce: ./ yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ yarn/yarn-server/yarn-server-resourcemanager/src/main/j...
Date Wed, 15 Jun 2011 05:13:04 GMT
Author: mahadev
Date: Wed Jun 15 05:13:04 2011
New Revision: 1135920

URL: http://svn.apache.org/viewvc?rev=1135920&view=rev
Log:
Fix concurrent modification exception in the Capacity Scheduler (mahadev)

Modified:
    hadoop/common/branches/MR-279/mapreduce/CHANGES.txt
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AMTracker.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java

Modified: hadoop/common/branches/MR-279/mapreduce/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/CHANGES.txt?rev=1135920&r1=1135919&r2=1135920&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/CHANGES.txt (original)
+++ hadoop/common/branches/MR-279/mapreduce/CHANGES.txt Wed Jun 15 05:13:04 2011
@@ -5,6 +5,8 @@ Trunk (unreleased changes)
 
     MAPREDUCE-279
 
+    Fix concurrent modification exception in the Capacity Scheduler (mahadev)
+
     Changes for invoking rack resolution in the RM and in the AM (ddas)
 
     Fix ClassCastException in JobHistoryServer for certain jobs.

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AMTracker.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AMTracker.java?rev=1135920&r1=1135919&r2=1135920&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AMTracker.java
(original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AMTracker.java
Wed Jun 15 05:13:04 2011
@@ -262,7 +262,7 @@ public class AMTracker extends AbstractS
     masterInfo.getMaster().setDiagnostics(
         remoteApplicationMaster.getDiagnostics());
 
-    rmContext.getDispatcher().getSyncHandler().handle(
+    rmContext.getDispatcher().getEventHandler().handle(
         new ApplicationFinishEvent(masterInfo, remoteApplicationMaster
             .getState()));
   }

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java?rev=1135920&r1=1135919&r2=1135920&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java
(original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java
Wed Jun 15 05:13:04 2011
@@ -27,6 +27,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeMap;
+import java.util.TreeSet;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.commons.logging.Log;
@@ -556,7 +557,7 @@ implements ResourceScheduler, CapacitySc
     Map<Priority, Set<NodeInfo>> reservations = application.getAllReservations();
     for (Map.Entry<Priority, Set<NodeInfo>> e : reservations.entrySet()) {
       Priority priority = e.getKey();
-      Set<NodeInfo> reservedNodes = e.getValue();
+      Set<NodeInfo> reservedNodes = new TreeSet<NodeInfo>(e.getValue());
       for (NodeInfo node : reservedNodes) {
         Resource allocatedResource = 
           application.getResourceRequest(priority, NodeManagerImpl.ANY).getCapability();



Mime
View raw message