Repository: hbase Updated Branches: refs/heads/branch-1.3 e266f104d -> 1c21c4970
HBASE-15908 Checksum verification is broken due to incorrect passing of ByteBuffers in DataChecksum (Mikhail Antonov and Appy) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/1c21c497 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/1c21c497 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/1c21c497 Branch: refs/heads/branch-1.3 Commit: 1c21c4970596e419a917d63c32acf44e0c4017fd Parents: e266f10 Author: Mikhail Antonov <anto...@apache.org> Authored: Sat May 28 03:14:03 2016 -0700 Committer: Mikhail Antonov <anto...@apache.org> Committed: Sat May 28 03:17:38 2016 -0700 ---------------------------------------------------------------------- .../src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/1c21c497/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java index a61038e..b2ed8d4 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java @@ -1725,7 +1725,7 @@ public class HFileBlock implements Cacheable { ByteBuffer onDiskBlockByteBuffer = ByteBuffer.wrap(onDiskBlock, 0, onDiskSizeWithHeader); // Verify checksum of the data before using it for building HFileBlock. if (verifyChecksum && - !validateChecksum(offset, onDiskBlockByteBuffer.asReadOnlyBuffer(), hdrSize)) { + !validateChecksum(offset, onDiskBlockByteBuffer, hdrSize)) { return null; } // The onDiskBlock will become the headerAndDataBuffer for this block.