Prechádzať zdrojové kódy

commit 608ac20bc1d81d10a3e9cf01fd42eeb13d471d76
Author: Arun C Murthy <acmurthy@apache.org>
Date: Fri Dec 11 13:31:45 2009 +0530

MAPREDUCE-1171. Allow the read-error notification in shuffle to be configurable. Contributed by Amareshwari Sriramadasu.

From https://issues.apache.org/jira/secure/attachment/12427571/patch-1171-1-ydist.txt

+++ b/YAHOO-CHANGES.txt
+ MAPREDUCE-1171. Allow the read-error notification in shuffle to be
+ configurable. (Amareshwari Sriramadasu via acmurthy)
+


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1077073 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 rokov pred
rodič
commit
196e35c777

+ 7 - 2
src/mapred/org/apache/hadoop/mapred/ReduceTask.java

@@ -895,6 +895,7 @@ class ReduceTask extends Task {
     }
     
     private int nextMapOutputCopierId = 0;
+    private boolean reportReadErrorImmediately;
     
     /**
      * Abstraction to track a map-output.
@@ -1836,6 +1837,8 @@ class ReduceTask extends Task {
                                       );
       this.random = new Random(randomSeed);
       this.maxMapRuntime = 0;
+      this.reportReadErrorImmediately = 
+        conf.getBoolean("mapreduce.reduce.shuffle.notify.readerror", true);
     }
     
     private boolean busyEnough(int numInFlight) {
@@ -2109,8 +2112,10 @@ class ReduceTask extends Task {
               // using a hybrid technique for notifying the jobtracker.
               //   a. the first notification is sent after max-retries 
               //   b. subsequent notifications are sent after 2 retries.   
-              //   c. send notification immediately if it is a read error.   
-              if (cr.getError().equals(CopyOutputErrorType.READ_ERROR) ||
+              //   c. send notification immediately if it is a read error and 
+              //       "mapreduce.reduce.shuffle.notify.readerror" set true.   
+              if ((reportReadErrorImmediately && cr.getError().equals(
+                  CopyOutputErrorType.READ_ERROR)) ||
                  ((noFailedFetches >= fetchRetriesPerMap) 
                   && ((noFailedFetches - fetchRetriesPerMap) % 2) == 0)) {
                 synchronized (ReduceTask.this) {