bbeaudreault commented on code in PR #4502:
URL: https://github.com/apache/hbase/pull/4502#discussion_r917436917
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java:
##########
@@ -625,11 +625,12 @@ HFileBlock unpack(HFileContext fileContext, FSReader
reader) throws IOException
: reader.getDefaultBlockDecodingContext();
// Create a duplicated buffer without the header part.
ByteBuff dup = this.buf.duplicate();
- dup.position(this.headerSize());
+ int totalChecksumBytes = totalChecksumBytes();
+ dup.position(this.headerSize()).limit(dup.limit() - totalChecksumBytes);
dup = dup.slice();
// Decode the dup into unpacked#buf
- ctx.prepareDecoding(unpacked.getOnDiskSizeWithoutHeader(),
- unpacked.getUncompressedSizeWithoutHeader(),
unpacked.getBufferWithoutHeader(true), dup);
+ ctx.prepareDecoding(unpacked.getOnDiskSizeWithoutHeader() -
totalChecksumBytes,
Review Comment:
actually, i was thinking of the uncompressed size, which doesn't include
checksum. you're correct that on-disk size does.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]