Author: cnauroth Date: Thu Jun 12 20:02:45 2014 New Revision: 1602282 URL: http://svn.apache.org/r1602282 Log: MAPREDUCE-5912. Task.calculateOutputSize does not handle Windows files after MAPREDUCE-5196. Contributed by Remus Rusanu.
Modified: hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Task.java Modified: hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt?rev=1602282&r1=1602281&r2=1602282&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt (original) +++ hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt Thu Jun 12 20:02:45 2014 @@ -77,6 +77,9 @@ Trunk (Unreleased) MAPREDUCE-5196. Add bookkeeping for managing checkpoints of task state. (Carlo Curino via cdouglas) + MAPREDUCE-5912. Task.calculateOutputSize does not handle Windows files after + MAPREDUCE-5196. (Remus Rusanu via cnauroth) + BUG FIXES MAPREDUCE-5714. Removed forceful JVM exit in shutDownJob. Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Task.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Task.java?rev=1602282&r1=1602281&r2=1602282&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Task.java (original) +++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Task.java Thu Jun 12 20:02:45 2014 @@ -1120,8 +1120,8 @@ abstract public class Task implements Wr if (isMapTask() && conf.getNumReduceTasks() > 0) { try { Path mapOutput = mapOutputFile.getOutputFile(); - FileSystem fs = mapOutput.getFileSystem(conf); - return fs.getFileStatus(mapOutput).getLen(); + FileSystem localFS = FileSystem.getLocal(conf); + return localFS.getFileStatus(mapOutput).getLen(); } catch (IOException e) { LOG.warn ("Could not find output size " , e); }