HBASE-15908 Checksum verification is broken due to incorrect passing of ByteBuffers in DataChecksum (Mikhail Antonov and Appy)
This commit is contained in:
parent
36bd7d03fc
commit
60c8f76a9d
|
@ -1712,7 +1712,7 @@ public class HFileBlock implements Cacheable {
|
||||||
ByteBuffer onDiskBlockByteBuffer = ByteBuffer.wrap(onDiskBlock, 0, onDiskSizeWithHeader);
|
ByteBuffer onDiskBlockByteBuffer = ByteBuffer.wrap(onDiskBlock, 0, onDiskSizeWithHeader);
|
||||||
// Verify checksum of the data before using it for building HFileBlock.
|
// Verify checksum of the data before using it for building HFileBlock.
|
||||||
if (verifyChecksum &&
|
if (verifyChecksum &&
|
||||||
!validateChecksum(offset, onDiskBlockByteBuffer.asReadOnlyBuffer(), hdrSize)) {
|
!validateChecksum(offset, onDiskBlockByteBuffer, hdrSize)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// The onDiskBlock will become the headerAndDataBuffer for this block.
|
// The onDiskBlock will become the headerAndDataBuffer for this block.
|
||||||
|
|
Loading…
Reference in New Issue