ramkrish86 commented on a change in pull request #2582:
URL: https://github.com/apache/hbase/pull/2582#discussion_r518036683



##########
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:
       Here too the rowLen is already there. Any specific reason you feel this 
need not be decoded. 




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to