ramkrish86 commented on a change in pull request #2582:
URL: https://github.com/apache/hbase/pull/2582#discussion_r518546426
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java
##########
@@ -790,23 +797,28 @@ public Cell getCell() {
// we can handle the 'no tags' case.
if (currTagsLen > 0) {
ret = new SizeCachedKeyValue(blockBuffer.array(),
- blockBuffer.arrayOffset() + blockBuffer.position(), cellBufSize,
seqId);
+ blockBuffer.arrayOffset() + blockBuffer.position(), cellBufSize,
seqId, currKeyLen,
+ rowLen);
} else {
ret = new SizeCachedNoTagsKeyValue(blockBuffer.array(),
- blockBuffer.arrayOffset() + blockBuffer.position(), cellBufSize,
seqId);
+ blockBuffer.arrayOffset() + blockBuffer.position(), cellBufSize,
seqId, currKeyLen,
+ rowLen);
}
} else {
ByteBuffer buf = blockBuffer.asSubByteBuffer(cellBufSize);
if (buf.isDirect()) {
- ret = currTagsLen > 0 ? new ByteBufferKeyValue(buf, buf.position(),
cellBufSize, seqId)
- : new NoTagsByteBufferKeyValue(buf, buf.position(), cellBufSize,
seqId);
+ ret = currTagsLen > 0
+ ? new SizeCachedByteBufferKeyValue(buf, buf.position(),
cellBufSize, seqId,
+ currKeyLen, rowLen)
+ : new SizeCachedNoTagsByteBufferKeyValue(buf, buf.position(),
cellBufSize, seqId,
+ currKeyLen, rowLen);
} else {
if (currTagsLen > 0) {
ret = new SizeCachedKeyValue(buf.array(), buf.arrayOffset() +
buf.position(),
- cellBufSize, seqId);
+ cellBufSize, seqId, currKeyLen, rowLen);
Review comment:
If you see my previous commit - I got the rowLen also in blockSeek and
the readKeyValue() method to pass it to the SizeCachedKV variants. That was
mainly just to ensure that we get rowLen while doing the KV parsing itself
rather than KV creation. Now in the last commit since I was already doing that
rowLen related change I changed the BBKV also so that we don't need to parse it
there.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]