hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r720460 - in /hadoop/core/trunk: CHANGES.txt src/core/org/apache/hadoop/fs/kfs/KosmosFileSystem.java
Date Tue, 25 Nov 2008 10:33:04 GMT
Author: cdouglas
Date: Tue Nov 25 02:33:04 2008
New Revision: 720460

URL: http://svn.apache.org/viewvc?rev=720460&view=rev
Log:
HADOOP-4697. Fix getBlockLocations in KosmosFileSystem to handle multiple
blocks correctly. Contributed by Sriram Rao.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/core/org/apache/hadoop/fs/kfs/KosmosFileSystem.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=720460&r1=720459&r2=720460&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Tue Nov 25 02:33:04 2008
@@ -209,6 +209,13 @@
     HADOOP-4676. Fix broken URL in blacklisted tasktrackers page. (Amareshwari
     Sriramadasu via cdouglas)
 
+Release 0.19.1 - Unreleased
+
+  BUG FIXES
+
+    HADOOP-4697. Fix getBlockLocations in KosmosFileSystem to handle multiple
+    blocks correctly. (Sriram Rao via cdouglas)
+
 Release 0.19.0 - 2008-11-18
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/fs/kfs/KosmosFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/fs/kfs/KosmosFileSystem.java?rev=720460&r1=720459&r2=720460&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/fs/kfs/KosmosFileSystem.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/fs/kfs/KosmosFileSystem.java Tue Nov 25 02:33:04
2008
@@ -300,9 +300,11 @@
       BlockLocation[] result = new BlockLocation[hints.length];
       long blockSize = getDefaultBlockSize();
       long length = len;
+      long blockStart = start;
       for(int i=0; i < result.length; ++i) {
-        result[i] = new BlockLocation(null, hints[i], start, 
+        result[i] = new BlockLocation(null, hints[i], blockStart, 
                                       length < blockSize ? length : blockSize);
+        blockStart += blockSize;
         length -= blockSize;
       }
       return result;



Mime
View raw message