hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r644914 - in /hadoop/core/branches/branch-0.16: CHANGES.txt src/java/org/apache/hadoop/mapred/MapTask.java
Date Fri, 04 Apr 2008 20:59:13 GMT
Author: cdouglas
Date: Fri Apr  4 13:59:09 2008
New Revision: 644914

URL: http://svn.apache.org/viewvc?rev=644914&view=rev
Log:
HADOOP-3154. Catch all Throwables from the SpillThread in MapTask, rather
than IOExceptions only. Contributed by Devaraj Das.


Modified:
    hadoop/core/branches/branch-0.16/CHANGES.txt
    hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/mapred/MapTask.java

Modified: hadoop/core/branches/branch-0.16/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/CHANGES.txt?rev=644914&r1=644913&r2=644914&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.16/CHANGES.txt Fri Apr  4 13:59:09 2008
@@ -2,8 +2,13 @@
 
 Release 0.16.3 - Unreleased
 
+  BUG FIXES
+
     HADOOP-3010. Fix ConcurrentModificationException in ipc.Server.Responder.
     (rangadi)
+
+    HADOOP-3154. Catch all Throwables from the SpillThread in MapTask, rather
+    than IOExceptions only. (ddas via cdouglas)
 
 Release 0.16.2 - 2008-04-02
 

Modified: hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/mapred/MapTask.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/mapred/MapTask.java?rev=644914&r1=644913&r2=644914&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/mapred/MapTask.java (original)
+++ hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/mapred/MapTask.java Fri Apr
 4 13:59:09 2008
@@ -277,7 +277,7 @@
     private final Object pendingKeyvalBufferLock = new Object();
     // since sort-spill and collect are done concurrently, exceptions are 
     // passed through shared variable
-    private volatile IOException sortSpillException; 
+    private volatile Throwable sortSpillException; 
     private int maxBufferSize; //the max amount of in-memory space after which
                                //we will spill the keyValBuffer to disk
     private int numSpills; //maintains the no. of spills to disk done so far
@@ -373,7 +373,7 @@
       
       // check if the earlier sort-spill generated an exception
       if (sortSpillException != null) {
-        throw sortSpillException;
+        throw (IOException) new IOException().initCause(sortSpillException);
       }
       
       if (keyValBuffer == null) {
@@ -426,7 +426,7 @@
 
         // check if the earlier sort-spill thread generated an exception
         if (sortSpillException != null) {
-          throw sortSpillException;
+          throw (IOException) new IOException().initCause(sortSpillException);
         }
         
         // Start the sort-spill thread. While the sort and spill takes place 
@@ -501,8 +501,8 @@
         numSpills++;
         out.close();
         indexOut.close();
-      } catch (IOException ioe) {
-        sortSpillException = ioe;
+      } catch (Throwable t) {
+        sortSpillException = t;
       } finally { // make sure that the collector never waits indefinitely
         pendingKeyvalBuffer = null;
         for (int i = 0; i < partitions; i++) {
@@ -700,7 +700,7 @@
       
       // check if the earlier sort-spill thread generated an exception
       if (sortSpillException != null) {
-        throw sortSpillException;
+        throw (IOException) new IOException().initCause(sortSpillException);
       }
       
       if (keyValBuffer != null && keyValBuffer.getLength() > 0) {
@@ -716,7 +716,7 @@
       
       // check if the last sort-spill thread generated an exception
       if (sortSpillException != null) {
-        throw sortSpillException;
+        throw (IOException) new IOException().initCause(sortSpillException);
       }
       mergeParts();
     }



Mime
View raw message