hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r499998 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/mapred/ReduceTask.java
Date Thu, 25 Jan 2007 21:28:47 GMT
Author: cutting
Date: Thu Jan 25 13:28:46 2007
New Revision: 499998

URL: http://svn.apache.org/viewvc?view=rev&rev=499998
Log:
HADOOP-758.  Fix exception handling during reduce so that root exceptions are not masked by
exceptions in cleanups.  Contributed by Raghu.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ReduceTask.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=499998&r1=499997&r2=499998
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Thu Jan 25 13:28:46 2007
@@ -111,6 +111,10 @@
     currently usable.  Locking should eventually provided as an
     independent service.  (Raghu Angadi via cutting)
 
+16. HADOOP-758.  Fix exception handling during reduce so that root
+    exceptions are not masked by exceptions in cleanups.
+    (Raghu Angadi via cutting)
+
 
 Release 0.10.0 - 2007-01-05
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ReduceTask.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ReduceTask.java?view=diff&rev=499998&r1=499997&r2=499998
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ReduceTask.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ReduceTask.java Thu Jan 25 13:28:46
2007
@@ -326,12 +326,24 @@
         values.informReduceProgress();
       }
 
-    } finally {
+      //Clean up: repeated in catch block below
       reducer.close();
       out.close(reporter);
+      //End of clean up.
+      
       if( runSpeculative ){
         ((PhasedFileSystem)fs).commit(); 
-       }
+      }
+    } catch ( IOException ioe ) {
+      try {
+        reducer.close();
+      } catch ( IOException ignored ) {}
+        
+      try {
+        out.close(reporter);
+      } catch ( IOException ignored ) {}
+      
+      throw ioe;
     }
     done(umbilical);
   }



Mime
View raw message