hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1153743 - in /hadoop/common/branches/MR-279/mapreduce: CHANGES.txt yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java
Date Thu, 04 Aug 2011 03:55:37 GMT
Author: mahadev
Date: Thu Aug  4 03:55:37 2011
New Revision: 1153743

URL: http://svn.apache.org/viewvc?rev=1153743&view=rev
Log:
Fix NPE in FifoScheduler. (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/scheduler/fifo/FifoScheduler.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=1153743&r1=1153742&r2=1153743&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/CHANGES.txt (original)
+++ hadoop/common/branches/MR-279/mapreduce/CHANGES.txt Thu Aug  4 03:55:37 2011
@@ -4,6 +4,8 @@ Trunk (unreleased changes)
 
   MAPREDUCE-279
 
+    Fix NPE in FifoScheduler. (mahadev)
+
     Harmonize slf4j versions. (llu)
 
     MAPREDUCE-2772. Fix MR-279 build after common mavenization, part 2.

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.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/fifo/FifoScheduler.java?rev=1153743&r1=1153742&r2=1153743&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java
(original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java
Thu Aug  4 03:55:37 2011
@@ -540,11 +540,17 @@ public class FifoScheduler implements Re
     
     for (List<Container> appContainers : remoteContainers.values()) {
       for (Container container : appContainers) {
-        if (container.getState() == ContainerState.RUNNING) {
-          containerLaunchedOnNode(container, node);
-        } else { // has to COMPLETE
-          containerCompleted(getRMContainer(container.getId()), 
-              RMContainerEventType.FINISHED);
+        /* make sure the scheduler hasnt already removed the applications */
+        if (getApplication(container.getId().getAppAttemptId()) != null) {
+          if (container.getState() == ContainerState.RUNNING) {
+            containerLaunchedOnNode(container, node);
+          } else { // has to COMPLETE
+            containerCompleted(getRMContainer(container.getId()), 
+                RMContainerEventType.FINISHED);
+          }
+        }
+        else {
+          LOG.warn("Scheduler not tracking application " + container.getId().getAppAttemptId());
         }
       }
     }



Mime
View raw message