hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1077665 - /hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
Date Fri, 04 Mar 2011 04:41:52 GMT
Author: omalley
Date: Fri Mar  4 04:41:52 2011
New Revision: 1077665

URL: http://svn.apache.org/viewvc?rev=1077665&view=rev
Log:
commit cfa25eafadb089a7a9de44a5b0837ede9286c0e2
Author: Luke Lu <llu@yahoo-inc.com>
Date:   Fri Sep 3 14:32:43 2010 -0700

    MAPREDUCE:1233 Fix waiting map/reduces metrics
    
    when jobs are killed.

Modified:
    hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobInProgress.java

Modified: hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobInProgress.java?rev=1077665&r1=1077664&r2=1077665&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
Fri Mar  4 04:41:52 2011
@@ -2829,6 +2829,7 @@ public class JobInProgress {
    
     boolean isRunning = tip.isRunning();
     boolean isComplete = tip.isComplete();
+    boolean metricsDone = isComplete(); // job metrics garbage collected
     
     if (wasAttemptRunning) {
       // We are decrementing counters without looking for isRunning ,
@@ -2840,11 +2841,12 @@ public class JobInProgress {
       //.........
       //      metrics.launchMap(id);
       // hence we are decrementing the same set.
+      // Except after garbageCollect in a different thread.
       if (!tip.isJobCleanupTask() && !tip.isJobSetupTask()) {
-        if (tip.isMapTask()) {
+        if (tip.isMapTask() && !metricsDone) {
           runningMapTasks -= 1;
           metrics.failedMap(taskid);
-        } else {
+        } else if (!metricsDone) {
           runningReduceTasks -= 1;
           metrics.failedReduce(taskid);
         }



Mime
View raw message