hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r1432243 - in /hadoop/common/branches/branch-1: CHANGES.txt src/mapred/org/apache/hadoop/mapred/ReduceTask.java
Date Fri, 11 Jan 2013 19:26:29 GMT
Author: bobby
Date: Fri Jan 11 19:26:29 2013
New Revision: 1432243

URL: http://svn.apache.org/viewvc?rev=1432243&view=rev
Log:
MAPREDUCE-4933. MR1 final merge asks for length of file it just wrote before flushing it.
Contributed by Sandy Ryza

Modified:
    hadoop/common/branches/branch-1/CHANGES.txt
    hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/ReduceTask.java

Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1432243&r1=1432242&r2=1432243&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Fri Jan 11 19:26:29 2013
@@ -425,6 +425,9 @@ Release 1.2.0 - unreleased
     MAPREDUCE-4850. Job recovery may fail if staging directory has been
     deleted. (tomwhite)
 
+    MAPREDUCE-4933. MR1 final merge asks for length of file it just wrote
+    before flushing it. (Sandy Ryza via bobby)
+
 Release 1.1.2 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/ReduceTask.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/ReduceTask.java?rev=1432243&r1=1432242&r2=1432243&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/ReduceTask.java (original)
+++ hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/ReduceTask.java Fri
Jan 11 19:26:29 2013
@@ -2465,10 +2465,12 @@ class ReduceTask extends Task {
           final RawKeyValueIterator rIter = Merger.merge(job, fs,
               keyClass, valueClass, memDiskSegments, numMemDiskSegments,
               tmpDir, comparator, reporter, spilledRecordsCounter, null);
-          final Writer writer = new Writer(job, fs, outputPath,
+          Writer writer = new Writer(job, fs, outputPath,
               keyClass, valueClass, codec, null);
           try {
             Merger.writeFile(rIter, writer, reporter, job);
+            writer.close();
+            writer = null;
             addToMapOutputFilesOnDisk(fs.getFileStatus(outputPath));
           } catch (Exception e) {
             if (null != outputPath) {



Mime
View raw message