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



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java
##########
@@ -554,8 +559,10 @@ protected int blockSeek(Cell key, boolean seekBefore) {
               + " path=" + reader.getPath());
         }
         offsetFromPos += Bytes.SIZEOF_LONG;
+        rowLen = ((blockBuffer.getByteAfterPosition(offsetFromPos) & 0xff) << 
8)
+            ^ (blockBuffer.getByteAfterPosition(offsetFromPos + 1) & 0xff);
         blockBuffer.asSubByteBuffer(blockBuffer.position() + offsetFromPos, 
klen, pair);
-        bufBackedKeyOnlyKv.setKey(pair.getFirst(), pair.getSecond(), klen);
+        bufBackedKeyOnlyKv.setKey(pair.getFirst(), pair.getSecond(), klen, 
(short)rowLen);

Review comment:
       `Use BB#getShortAfterPosition() instead of having extra logic here. that 
will be even perf wise better both in MBB and SBB`
   
   You mean instead of getByteAfterPosition getting called 2 times just use 
getShortAfterPosition()?




----------------------------------------------------------------
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]


Reply via email to