hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject hadoop git commit: HDFS-10935. TestFileChecksum fails in some cases. Contributed by Sammi Chen
Date Wed, 26 Oct 2016 03:41:32 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 9dce9011a -> 287effff9


HDFS-10935. TestFileChecksum fails in some cases. Contributed by Sammi Chen


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/287effff
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/287effff
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/287effff

Branch: refs/heads/trunk
Commit: 287effff9327450240d65e27e31bed2649a7a100
Parents: 9dce901
Author: Kai Zheng <kai.zheng@intel.com>
Authored: Wed Oct 26 09:40:31 2016 +0600
Committer: Kai Zheng <kai.zheng@intel.com>
Committed: Wed Oct 26 09:40:31 2016 +0600

----------------------------------------------------------------------
 .../datanode/erasurecode/StripedBlockChecksumReconstructor.java     | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/287effff/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/StripedBlockChecksumReconstructor.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/StripedBlockChecksumReconstructor.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/StripedBlockChecksumReconstructor.java
index 944ed9d..9555618 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/StripedBlockChecksumReconstructor.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/StripedBlockChecksumReconstructor.java
@@ -132,6 +132,7 @@ public class StripedBlockChecksumReconstructor extends StripedReconstructor
{
       // case-2) length of data bytes which is less than bytesPerCRC
       if (partialLength > 0) {
         byte[] partialCrc = new byte[getChecksum().getChecksumSize()];
+        getChecksum().reset();
         getChecksum().update(outputData, dataOffset, partialLength);
         getChecksum().writeValue(partialCrc, 0, true);
         digester.update(partialCrc);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message