瀏覽代碼

HADOOP-1514. Make reducers report progress while waiting for map output, so they're not killed. Contributed by Vivek.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@550932 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 年之前
父節點
當前提交
da05424124
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 3 0
      CHANGES.txt
  2. 3 0
      src/java/org/apache/hadoop/mapred/ReduceTask.java

+ 3 - 0
CHANGES.txt

@@ -254,6 +254,9 @@ Trunk (unreleased changes)
  77. HADOOP-1515.  Add MultiFileInputFormat, which can pack multiple,
  77. HADOOP-1515.  Add MultiFileInputFormat, which can pack multiple,
      typically small, input files into each split.  (Enis Soztutar via cutting)
      typically small, input files into each split.  (Enis Soztutar via cutting)
 
 
+ 78. HADOOP-1514.  Make reducers report progress while waiting for map
+     outputs, so they're not killed.  (Vivek Ratan via cutting)
+
 
 
 Release 0.13.0 - 2007-06-08
 Release 0.13.0 - 2007-06-08
 
 

+ 3 - 0
src/java/org/apache/hadoop/mapred/ReduceTask.java

@@ -872,6 +872,9 @@ class ReduceTask extends Task {
           // new, just wait for a bit
           // new, just wait for a bit
           try {
           try {
             if (numInFlight == 0 && numScheduled == 0) {
             if (numInFlight == 0 && numScheduled == 0) {
+              // we should indicate progress as we don't want TT to think
+              // we're stuck and kill us
+              reporter.progress();
               Thread.sleep(5000);
               Thread.sleep(5000);
             }
             }
           } catch (InterruptedException e) { } // IGNORE
           } catch (InterruptedException e) { } // IGNORE