hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r519425 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/mapred/LineRecordReader.java src/java/org/apache/hadoop/mapred/SequenceFileRecordReader.java
Date Sat, 17 Mar 2007 19:26:27 GMT
Author: tomwhite
Date: Sat Mar 17 12:26:27 2007
New Revision: 519425

URL: http://svn.apache.org/viewvc?view=rev&rev=519425
Log:
HADOOP-1128.  Fix missing progress information in map tasks.  Contributed by Espen Amble Kolstad,
Andrzej Bialecki, and Owen O'Malley.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LineRecordReader.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/SequenceFileRecordReader.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=519425&r1=519424&r2=519425
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Sat Mar 17 12:26:27 2007
@@ -69,6 +69,10 @@
 20. HADOOP-1096.  Rename InputArchive and OutputArchive and
     make them public. (Milind Bhandarkar via tomwhite)
 
+21. HADOOP-1128.  Fix missing progress information in map tasks.
+    (Espen Amble Kolstad, Andrzej Bialecki, and Owen O'Malley
+    via tomwhite)
+
 
 Release 0.12.0 - 2007-03-02
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LineRecordReader.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LineRecordReader.java?view=diff&rev=519425&r1=519424&r2=519425
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LineRecordReader.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LineRecordReader.java Sat Mar 17
12:26:27 2007
@@ -113,7 +113,7 @@
     if (start == end) {
       return 0.0f;
     } else {
-      return (pos - start) / (end - start);
+      return Math.min(1.0f, (pos - start) / (float)(end - start));
     }
   }
   

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/SequenceFileRecordReader.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/SequenceFileRecordReader.java?view=diff&rev=519425&r1=519424&r2=519425
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/SequenceFileRecordReader.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/SequenceFileRecordReader.java Sat
Mar 17 12:26:27 2007
@@ -44,7 +44,8 @@
     if (split.getStart() > in.getPosition())
       in.sync(split.getStart());                  // sync to start
 
-    more = in.getPosition() < end;
+    this.start = in.getPosition();
+    more = start < end;
   }
 
 
@@ -104,7 +105,7 @@
     if (end == start) {
       return 0.0f;
     } else {
-      return (in.getPosition() - start) / (end - start);
+      return Math.min(1.0f, (in.getPosition() - start) / (float)(end - start));
     }
   }
   



Mime
View raw message