瀏覽代碼

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 年之前
父節點
當前提交
04132a3187
共有 2 個文件被更改,包括 4 次插入1 次删除
  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-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
 Release 0.18.0 - 2008-08-19
 
 
   INCOMPATIBLE CHANGES
   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));
       offset = (startOffset - (startOffset % bytesPerChecksum));
       if (length >= 0) {
       if (length >= 0) {
         // Make sure endOffset points to end of a checksumed chunk.
         // Make sure endOffset points to end of a checksumed chunk.
-        long tmpLen = startOffset + length + (startOffset - offset);
+        long tmpLen = startOffset + length;
         if (tmpLen % bytesPerChecksum != 0) {
         if (tmpLen % bytesPerChecksum != 0) {
           tmpLen += (bytesPerChecksum - tmpLen % bytesPerChecksum);
           tmpLen += (bytesPerChecksum - tmpLen % bytesPerChecksum);
         }
         }