hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r992161 - in /hadoop/mapreduce/trunk: CHANGES.txt src/test/mapred/org/apache/hadoop/fs/TestDFSIO.java
Date Fri, 03 Sep 2010 01:05:52 GMT
Author: szetszwo
Date: Fri Sep  3 01:05:51 2010
New Revision: 992161

URL: http://svn.apache.org/viewvc?rev=992161&view=rev
Log:
MAPREDUCE-2023. TestDFSIO should not stop reading if curSize != bufferSize.  Contributed by
Hong Tang

Modified:
    hadoop/mapreduce/trunk/CHANGES.txt
    hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/fs/TestDFSIO.java

Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=992161&r1=992160&r2=992161&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Fri Sep  3 01:05:51 2010
@@ -271,6 +271,9 @@ Trunk (unreleased changes)
     MAPREDUCE-1375. Fixes flaky test TestFileArgs. (Todd Lipcon via
     amareshwari)
 
+    MAPREDUCE-2023. TestDFSIO should not stop reading if curSize != bufferSize.
+    (Hong Tang via szetszwo)
+
 Release 0.21.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/fs/TestDFSIO.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/fs/TestDFSIO.java?rev=992161&r1=992160&r2=992161&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/fs/TestDFSIO.java (original)
+++ hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/fs/TestDFSIO.java Fri Sep  3
01:05:51 2010
@@ -397,9 +397,8 @@ public class TestDFSIO extends TestCase 
       DataInputStream in = fs.open(new Path(getDataDir(getConf()), name));
       long actualSize = 0;
       try {
-        for(int curSize = bufferSize;
-                curSize == bufferSize && actualSize < totalSize;) {
-          curSize = in.read(buffer, 0, bufferSize);
+        while (actualSize < totalSize) {
+          int curSize = in.read(buffer, 0, bufferSize);
           if(curSize < 0) break;
           actualSize += curSize;
           reporter.setStatus("reading " + name + "@" + 



Mime
View raw message