HBASE-15908 Checksum verification is broken due to incorrect passing of ByteBuffers in DataChecksum (Mikhail Antonov and Appy)

This commit is contained in:
Mikhail Antonov 2016-05-28 03:14:03 -07:00
parent 36bd7d03fc
commit 60c8f76a9d
1 changed files with 1 additions and 1 deletions

View File

@ -1712,7 +1712,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.