Просмотр исходного кода

Merge -r 728675:728676 from trunk onto 0.18 branch. Fixes HADOOP-4924.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.18@736250 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 16 лет назад
Родитель
Сommit
b878c445d7
2 измененных файлов с 8 добавлено и 15 удалено
  1. 2 0
      CHANGES.txt
  2. 6 15
      src/mapred/org/apache/hadoop/mapred/TaskTracker.java

+ 2 - 0
CHANGES.txt

@@ -144,6 +144,8 @@ Release 0.18.3 - Unreleased
     HADOOP-4983. Fixes a problem in updating Counters in the status reporting.
     (Amareshwari Sriramadasu via ddas)
 
+    HADOOP-4924. Fixes a race condition in TaskTracker re-init. (ddas)
+
 Release 0.18.2 - 2008-11-03
 
   BUG FIXES

+ 6 - 15
src/mapred/org/apache/hadoop/mapred/TaskTracker.java

@@ -769,21 +769,7 @@ public class TaskTracker
     for (TaskInProgress tip : tasksToClose.values()) {
       tip.jobHasFinished(false);
     }
-
-    // Shutdown local RPC servers.  Do them
-    // in parallel, as RPC servers can take a long
-    // time to shutdown.  (They need to wait a full
-    // RPC timeout, which might be 10-30 seconds.)
-    new Thread("RPC shutdown") {
-      @Override
-      public void run() {
-        if (taskReportServer != null) {
-          taskReportServer.stop();
-          taskReportServer = null;
-        }
-      }
-    }.start();
-
+    
     this.running = false;
         
     // Clear local storage
@@ -794,6 +780,11 @@ public class TaskTracker
     
     // shutdown RPC connections
     RPC.stopProxy(jobClient);
+    
+    if (taskReportServer != null) {
+      taskReportServer.stop();
+      taskReportServer = null;
+    }
   }
 
   /**