Przeglądaj źródła

HADOOP-947. Disable in-memory merging during shuffle, as this is causing data corruption. Contributed by Devaraj.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@508625 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 lat temu
rodzic
commit
9421455f3f

+ 4 - 1
CHANGES.txt

@@ -75,11 +75,14 @@ Trunk (unreleased changes)
     (Dhruba Borthakur via cutting)
 
 
-Branch 0.11 (unreleased)
+Release 0.11.2 - 2007-02-16
 
  1. HADOOP-1009.  Fix an infinite loop in the HDFS namenode.
     (Dhruba Borthakur via cutting) 
 
+ 2. HADOOP-947.  Disable in-memory merging during shuffle, as this is
+    causing data corruption.  (Devaraj Das via cutting)
+
 
 Release 0.11.1 - 2007-02-09
 

+ 1 - 1
conf/hadoop-default.xml

@@ -132,7 +132,7 @@ creations/deletions), or "all".</description>
 
 <property>
   <name>fs.inmemory.size.mb</name>
-  <value>75</value>
+  <value>0</value>
   <description>The size of the in-memory filsystem instance in MB</description>
 </property>
 

+ 3 - 1
src/java/org/apache/hadoop/fs/InMemoryFileSystem.java

@@ -386,7 +386,9 @@ public class InMemoryFileSystem extends FileSystem {
   }
   
   public float getPercentUsed() {
-    return (float)totalUsed/fsSize;
+    if (fsSize > 0)
+      return (float)totalUsed/fsSize;
+    else return 0.1f;
   }
  
   private boolean canFitInMemory(int size) {

+ 3 - 2
src/java/org/apache/hadoop/mapred/MapOutputLocation.java

@@ -208,8 +208,9 @@ class MapOutputLocation implements Writable, MRConstants {
       int inMemFSSize = inMemFileSys.getFSSize();
       int checksumLength = inMemFileSys.getChecksumFileLength(length);
         
-      boolean createInMem = 
-        (((float)(length + checksumLength) / inMemFSSize <= 
+      boolean createInMem = false; 
+      if (inMemFSSize > 0)  
+        createInMem = (((float)(length + checksumLength) / inMemFSSize <= 
         MAX_INMEM_FILESIZE_FRACTION) && 
         inMemFileSys.reserveSpaceWithCheckSum(localFilename, length));