hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r570186 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/mapred/MapTask.java
Date Mon, 27 Aug 2007 17:12:21 GMT
Author: omalley
Date: Mon Aug 27 10:12:21 2007
New Revision: 570186

URL: http://svn.apache.org/viewvc?rev=570186&view=rev
Log:
HADOOP-1740 Fix null pointer exception during map output sorting. Contributed 
by Devaraj Das.

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

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?rev=570186&r1=570185&r2=570186&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Mon Aug 27 10:12:21 2007
@@ -61,6 +61,8 @@
     HADOOP-1772.  Fix hadoop-daemon.sh script to get correct hostname
     under Cygwin.  (Tsz Wo (Nicholas), SZE via cutting)
 
+    HADOOP-1740.  Fix null pointer exception in sorting map outputs. (Devaraj
+    Das via omalley)
 
   IMPROVEMENTS
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/MapTask.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/MapTask.java?rev=570186&r1=570185&r2=570186&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/MapTask.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/MapTask.java Mon Aug 27 10:12:21
2007
@@ -599,8 +599,10 @@
       //check whether the length of the key/value buffer is 0. If not, then
       //we need to spill that to disk. Note that we reset the key/val buffer
       //upon each spill (so a length > 0 means that we have not spilled yet)
-      if (keyValBuffer.getLength() > 0) {
-        sortAndSpillToDisk();
+      synchronized (this) {
+        if (keyValBuffer != null && keyValBuffer.getLength() > 0) {
+          sortAndSpillToDisk();
+        }
       }
       mergeParts();
     }



Mime
View raw message