hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r538318 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/DFSClient.java
Date Tue, 15 May 2007 21:03:45 GMT
Author: cutting
Date: Tue May 15 14:03:44 2007
New Revision: 538318

URL: http://svn.apache.org/viewvc?view=rev&rev=538318
Log:
HADOOP-1358.  Fix a potential bug when DFSClient calls skipBytes.  Contributed by Hairong.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=538318&r1=538317&r2=538318
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Tue May 15 14:03:44 2007
@@ -401,6 +401,9 @@
 115. HADOOP-1354.  Fix a potential NullPointerException in FsShell.
      (Hairong Kuang via cutting)
 
+116. HADOOP-1358.  Fix a potential bug when DFSClient calls skipBytes.
+     (Hairong Kuang via cutting)
+
 
 Release 0.12.3 - 2007-04-06
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java?view=diff&rev=538318&r1=538317&r2=538318
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java Tue May 15 14:03:44
2007
@@ -926,10 +926,11 @@
         //
         int diff = (int)(targetPos - pos);
         if (diff <= TCP_WINDOW_SIZE) {
-          blockStream.skipBytes(diff);
-          pos += diff;
-          assert(pos == targetPos);
-          done = true;
+          int adiff = blockStream.skipBytes(diff);
+          pos += adiff;
+          if (pos == targetPos) {
+            done = true;
+          }
         }
       }
       if (!done) {



Mime
View raw message