hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hair...@apache.org
Subject svn commit: r807432 - in /hadoop/hdfs/branches/HDFS-265: CHANGES.txt src/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
Date Mon, 24 Aug 2009 23:50:37 GMT
Author: hairong
Date: Mon Aug 24 23:50:36 2009
New Revision: 807432

URL: http://svn.apache.org/viewvc?rev=807432&view=rev
Log:
HDFS-553. BlockSender reports wrong failed position in ChecksumException. Contributed by Hairong
Kuang.

Modified:
    hadoop/hdfs/branches/HDFS-265/CHANGES.txt
    hadoop/hdfs/branches/HDFS-265/src/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java

Modified: hadoop/hdfs/branches/HDFS-265/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-265/CHANGES.txt?rev=807432&r1=807431&r2=807432&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-265/CHANGES.txt (original)
+++ hadoop/hdfs/branches/HDFS-265/CHANGES.txt Mon Aug 24 23:50:36 2009
@@ -166,6 +166,9 @@
     HDFS-547. TestHDFSFileSystemContract#testOutputStreamClosedTwice
     sometimes fails with CloseByInterruptException. (hairong)
 
+    HDFS-553. BlockSender reports wrong failed position in ChecksumException.
+    (hairong)
+
 Release 0.20.1 - Unreleased
 
   IMPROVEMENTS

Modified: hadoop/hdfs/branches/HDFS-265/src/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-265/src/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java?rev=807432&r1=807431&r2=807432&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-265/src/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
(original)
+++ hadoop/hdfs/branches/HDFS-265/src/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
Mon Aug 24 23:50:36 2009
@@ -290,8 +290,9 @@
           int dLen = Math.min(dLeft, bytesPerChecksum);
           checksum.update(buf, dOff, dLen);
           if (!checksum.compare(buf, cOff)) {
+            long failedPos = offset + len -dLeft;
             throw new ChecksumException("Checksum failed at " + 
-                                        (offset + len - dLeft), len);
+                                        failedPos, failedPos);
           }
           dLeft -= dLen;
           dOff += dLen;



Mime
View raw message