hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1076977 - in /hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop: mapred/JobTracker.java mapreduce/server/jobtracker/TaskTracker.java
Date Fri, 04 Mar 2011 03:27:36 GMT
Author: omalley
Date: Fri Mar  4 03:27:35 2011
New Revision: 1076977

URL: http://svn.apache.org/viewvc?rev=1076977&view=rev
Log:
commit b7b8dac3a29d1dc2dee941a0b8825df50bbd1821
Author: Yahoo\! <ltucker@yahoo-inc.com>
Date:   Tue Aug 18 09:16:07 2009 -0700

    Apply patch for MAPREDUCE:682 from: http://issues.apache.org/jira/secure/attachment/12414313/mapreduce-682-ydist.patch

Modified:
    hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobTracker.java
    hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapreduce/server/jobtracker/TaskTracker.java

Modified: hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobTracker.java?rev=1076977&r1=1076976&r2=1076977&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobTracker.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobTracker.java
Fri Mar  4 03:27:35 2011
@@ -711,6 +711,13 @@ public class JobTracker implements MRCon
       } else {
         LOG.info("Blacklisting tracker : " + hostName 
             + " Reason for blacklisting is : " + rfb);
+        Set<TaskTracker> trackers = 
+          hostnameToTaskTracker.get(hostName);
+        synchronized (trackers) {
+          for (TaskTracker tracker : trackers) {
+            tracker.cancelAllReservations();
+          }
+        }
         removeHostCapacity(hostName);
         fi.setBlacklist(rfb, reason);
       }
@@ -4147,7 +4154,7 @@ public class JobTracker implements MRCon
       }
 
       // Cleanup
-      taskTracker.lost();
+      taskTracker.cancelAllReservations();
 
       // Purge 'marked' tasks, needs to be done  
       // here to prevent hanging references!

Modified: hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapreduce/server/jobtracker/TaskTracker.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapreduce/server/jobtracker/TaskTracker.java?rev=1076977&r1=1076976&r2=1076977&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapreduce/server/jobtracker/TaskTracker.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapreduce/server/jobtracker/TaskTracker.java
Fri Mar  4 03:27:35 2011
@@ -183,10 +183,13 @@ public class TaskTracker {
   }
   
   /**
-   * Cleanup when the {@link TaskTracker} is declared as 'lost' by the 
-   * JobTracker.
+   * Cleanup when the {@link TaskTracker} is declared as 'lost/blacklisted'
+   * by the JobTracker.
+   * 
+   * The method assumes that the lock on the {@link JobTracker} is obtained
+   * by the caller.
    */
-  public void lost() {
+  public void cancelAllReservations() {
     // Inform jobs which have reserved slots on this tasktracker
     if (jobForFallowMapSlot != null) {
       unreserveSlots(TaskType.MAP, jobForFallowMapSlot);



Mime
View raw message