hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r705393 - in /hadoop/core/branches/branch-0.19: ./ CHANGES.txt src/mapred/org/apache/hadoop/mapred/TaskTracker.java
Date Thu, 16 Oct 2008 22:56:34 GMT
Author: acmurthy
Date: Thu Oct 16 15:56:34 2008
New Revision: 705393

URL: http://svn.apache.org/viewvc?rev=705393&view=rev
Log:
Merge -r 705390:705391 from trunk to branch-0.19 to fix HADOOP-3155.

Modified:
    hadoop/core/branches/branch-0.19/   (props changed)
    hadoop/core/branches/branch-0.19/CHANGES.txt
    hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/TaskTracker.java

Propchange: hadoop/core/branches/branch-0.19/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Oct 16 15:56:34 2008
@@ -1 +1 @@
-/hadoop/core/trunk:697306,698176,699056,699098,699415,699424,699444,699490,699517,700163,700628,700923,701273,701398,703923,704203,704261,704701,704703,704707,704712,704732,704748,704989
+/hadoop/core/trunk:697306,698176,699056,699098,699415,699424,699444,699490,699517,700163,700628,700923,701273,701398,703923,704203,704261,704701,704703,704707,704712,704732,704748,704989,705391

Modified: hadoop/core/branches/branch-0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/CHANGES.txt?rev=705393&r1=705392&r2=705393&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.19/CHANGES.txt Thu Oct 16 15:56:34 2008
@@ -887,6 +887,10 @@
     HADOOP-4418. Updates documentation in forrest for Mapred, streaming and pipes.
     (Amareshwari Sriramadasu via ddas)
 
+    HADOOP-3155. Ensure that there is only one thread fetching 
+    TaskCompletionEvents on TaskTracker re-init. (Dhruba Borthakur via
+    acmurthy) 
+
 Release 0.18.2 - Unreleased
 
   BUG FIXES

Modified: hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/TaskTracker.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/TaskTracker.java?rev=705393&r1=705392&r2=705393&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/TaskTracker.java
(original)
+++ hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/TaskTracker.java
Thu Oct 16 15:56:34 2008
@@ -118,7 +118,7 @@
   public static final Log ClientTraceLog =
     LogFactory.getLog(TaskTracker.class.getName() + ".clienttrace");
 
-  private boolean running = true;
+  volatile boolean running = true;
 
   private LocalDirAllocator localDirAllocator;
   String taskTrackerName;
@@ -553,7 +553,7 @@
     public void run() {
       LOG.info("Starting thread: " + getName());
         
-      while (true) {
+      while (running) {
         try {
           List <FetchStatus> fList = null;
           synchronized (runningJobs) {
@@ -584,6 +584,9 @@
                        " events threw for " + f.jobId + " threw: " +
                        StringUtils.stringifyException(e)); 
             }
+            if (!running) {
+              break;
+            }
           }
           synchronized (waitingOn) {
             try {
@@ -867,6 +870,15 @@
     
     // shutdown RPC connections
     RPC.stopProxy(jobClient);
+
+    // wait for the fetcher thread to exit
+    for (boolean done = false; !done; ) {
+      try {
+        this.mapEventsFetcher.join();
+        done = true;
+      } catch (InterruptedException e) {
+      }
+    }
   }
 
   /**



Mime
View raw message