Explorar o código

HADOOP-547. Fix reduce tasks to ping tasktracker while copying data, rather than only between copies, avoiding task timeouts. Contributed by Sanjay.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@449853 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting %!s(int64=19) %!d(string=hai) anos
pai
achega
dd5825a9b6
Modificáronse 2 ficheiros con 6 adicións e 1 borrados
  1. 4 0
      CHANGES.txt
  2. 2 1
      src/java/org/apache/hadoop/mapred/ReduceTaskRunner.java

+ 4 - 0
CHANGES.txt

@@ -65,6 +65,10 @@ Trunk (unreleased changes)
     tracker every 10 seconds rather than every 100 records, to avoid
     task timeouts.  (Michel Tourn via cutting)
 
+17. HADOOP-547.  Fix reduce tasks to ping tasktracker while copying
+    data, rather than only between copies, avoiding task timeouts.
+    (Sanjay Dahiya via cutting)
+
 
 Release 0.6.2 (unreleased)
 

+ 2 - 1
src/java/org/apache/hadoop/mapred/ReduceTaskRunner.java

@@ -116,7 +116,7 @@ class ReduceTaskRunner extends TaskRunner {
     public MapOutputLocation getLocation() { return loc; }
   }
 
-  private static class PingTimer implements Progressable {
+  private class PingTimer implements Progressable {
     private long pingTime;
     
     public synchronized void reset() {
@@ -130,6 +130,7 @@ class ReduceTaskRunner extends TaskRunner {
     public void progress() {
       synchronized (this) {
         pingTime = System.currentTimeMillis();
+        getTask().reportProgress(getTracker());
       }
     }
   }