hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r524200 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/mapred/MapTask.java
Date Fri, 30 Mar 2007 17:42:20 GMT
Author: cutting
Date: Fri Mar 30 10:42:19 2007
New Revision: 524200

URL: http://svn.apache.org/viewvc?view=rev&rev=524200
Log:
HADOOP-1110.  Fix an off-by-one error counting map inputs.  Contributed by David Bowen.

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?view=diff&rev=524200&r1=524199&r2=524200
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Fri Mar 30 10:42:19 2007
@@ -67,17 +67,20 @@
 20. HADOOP-1167.  Remove extra synchronization in InMemoryFileSystem.
     (omalley via cutting)
 
+21. HADOOP-1110.  Fix an off-by-one error counting map inputs.
+    (David Bowen via cutting)
+
 
 Release 0.12.3 (not yet released)
 
-15. HADOOP-1162.  Fix bug in record CSV and XML serialization of
+ 1. HADOOP-1162.  Fix bug in record CSV and XML serialization of
     binary values.  (Milind Bhandarkar via cutting)
 
-16. HADOOP-1123.  Fix NullPointerException in LocalFileSystem when
+ 2. HADOOP-1123.  Fix NullPointerException in LocalFileSystem when
     trying to recover from a checksum error.
     (Hairong Kuang & Nigel Daley via tomwhite)
 
-17. HADOOP-1177.  Fix bug where IOException in MapOutputLocation.getFile
+ 3. HADOOP-1177.  Fix bug where IOException in MapOutputLocation.getFile
     was not being logged.  (Devaraj Das via tomwhite)
 
 

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?view=diff&rev=524200&r1=524199&r2=524200
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/MapTask.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/MapTask.java Fri Mar 30 10:42:19
2007
@@ -155,8 +155,10 @@
           setProgress(getProgress());
           long beforePos = getPos();
           boolean ret = rawIn.next(key, value);
-          reporter.incrCounter(MAP_INPUT_RECORDS, 1);
-          reporter.incrCounter(MAP_INPUT_BYTES, (getPos() - beforePos));
+          if (ret) {
+            reporter.incrCounter(MAP_INPUT_RECORDS, 1);
+            reporter.incrCounter(MAP_INPUT_BYTES, (getPos() - beforePos));
+          }
           return ret;
         }
         public long getPos() throws IOException { return rawIn.getPos(); }



Mime
View raw message