Browse Source

HADOOP-3933. DataNode sometimes sends up to io.byte.per.checksum bytes
more than required to client. (Ning Li via rangadi)


git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@686362 13f79535-47bb-0310-9956-ffa450edef68

Raghu Angadi 17 years ago
parent
commit
04132a3187
2 changed files with 4 additions and 1 deletions
  1. 3 0
      CHANGES.txt
  2. 1 1
      src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockSender.java

+ 3 - 0
CHANGES.txt

@@ -324,6 +324,9 @@ Trunk (unreleased changes)
 
     HADOOP-3949. Remove duplicate jars from Chukwa. (Jerome Boulon via omalley)
 
+    HADOOP-3933. DataNode sometimes sends up to io.byte.per.checksum bytes 
+    more than required to client. (Ning Li via rangadi)
+
 Release 0.18.0 - 2008-08-19
 
   INCOMPATIBLE CHANGES

+ 1 - 1
src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockSender.java

@@ -133,7 +133,7 @@ class BlockSender implements java.io.Closeable, FSConstants {
       offset = (startOffset - (startOffset % bytesPerChecksum));
       if (length >= 0) {
         // Make sure endOffset points to end of a checksumed chunk.
-        long tmpLen = startOffset + length + (startOffset - offset);
+        long tmpLen = startOffset + length;
         if (tmpLen % bytesPerChecksum != 0) {
           tmpLen += (bytesPerChecksum - tmpLen % bytesPerChecksum);
         }