Explorar el Código

MAPREDUCE-5450. Unnecessary Configuration instantiation in IFileInputStream slows down merge. Contributed by Stanislav Barton.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.2@1511943 13f79535-47bb-0310-9956-ffa450edef68
Arun Murthy hace 11 años
padre
commit
dbee3fb87b

+ 15 - 0
CHANGES.txt

@@ -1,5 +1,20 @@
 Hadoop Change Log
 
+Release 1.2.2 - unreleased
+
+  INCOMPATIBLE CHANGES
+
+  NEW FEATURES
+
+  IMPROVEMENTS
+
+  OPTIMIZATIONS
+
+  BUG FIXES 
+
+    MAPREDUCE-5450. Unnecessary Configuration instantiation in IFileInputStream
+    slows down merge. (Stanislav Barton and Ted Yu via Sandy Ryza)
+
 Release 1.2.1 - 2013.07.15
 
   INCOMPATIBLE CHANGES

+ 2 - 2
src/mapred/org/apache/hadoop/mapred/IFile.java

@@ -462,9 +462,9 @@ class IFile {
     TaskAttemptID taskAttemptId;
     
     public InMemoryReader(RamManager ramManager, TaskAttemptID taskAttemptId,
-                          byte[] data, int start, int length)
+                          byte[] data, int start, int length, Configuration conf)
                           throws IOException {
-      super(null, null, length - start, null, null);
+      super(conf, null, length - start, null, null);
       this.ramManager = ramManager;
       this.taskAttemptId = taskAttemptId;
       

+ 1 - 1
src/mapred/org/apache/hadoop/mapred/ReduceTask.java

@@ -2417,7 +2417,7 @@ class ReduceTask extends Task {
           fullSize -= mo.data.length;
           Reader<K, V> reader = 
             new InMemoryReader<K, V>(ramManager, mo.mapAttemptId,
-                                     mo.data, 0, mo.data.length);
+                                     mo.data, 0, mo.data.length, conf);
           Segment<K, V> segment = 
             new Segment<K, V>(reader, true);
           inMemorySegments.add(segment);