Переглянути джерело

YARN-1575. Public localizer crashes with "Localized unkown resource". Contributed by Jason Lowe

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1561113 13f79535-47bb-0310-9956-ffa450edef68
Jason Darrell Lowe 11 роки тому
батько
коміт
30c778a23d

+ 3 - 0
hadoop-yarn-project/CHANGES.txt

@@ -24,6 +24,9 @@ Release 0.23.11 - UNRELEASED
     YARN-1592. CapacityScheduler tries to reserve more than a node's total
     memory on branch-0.23 (Omkar Vinit Joshi and Thomas Graves via jlowe)
 
+    YARN-1575. Public localizer crashes with "Localized unkown resource"
+    (jlowe)
+
 Release 0.23.10 - 2013-12-09
 
   INCOMPATIBLE CHANGES

+ 4 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java

@@ -635,7 +635,10 @@ public class ResourceLocalizationService extends CompositeService
         while (!Thread.currentThread().isInterrupted()) {
           try {
             Future<Path> completed = queue.take();
-            LocalizerResourceRequestEvent assoc = pending.remove(completed);
+            LocalizerResourceRequestEvent assoc;
+            synchronized (attempts) {
+              assoc = pending.remove(completed);
+            }
             try {
               Path local = completed.get();
               if (null == assoc) {