You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Anoop Sam John (JIRA)" <ji...@apache.org> on 2015/07/17 15:25:05 UTC
[jira] [Commented] (HBASE-14117) Check DBEs where fields are being
read from Bytebuffers but unused.
[ https://issues.apache.org/jira/browse/HBASE-14117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14631332#comment-14631332 ]
Anoop Sam John commented on HBASE-14117:
----------------------------------------
We read compressed int. That is why we are not able to simply skip. Unless we read each byte and check we can not know how many bytes this int took to store in compressed form. May be we can have a variant of method where the read just read bytes and skips until the compressed int bytes are over but it will NOT compute the int value. So can save some ops. But direct skip like for int/long we can not do right (?)
> Check DBEs where fields are being read from Bytebuffers but unused.
> -------------------------------------------------------------------
>
> Key: HBASE-14117
> URL: https://issues.apache.org/jira/browse/HBASE-14117
> Project: HBase
> Issue Type: Improvement
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
>
> {code}
> public Cell getFirstKeyCellInBlock(ByteBuff block) {
> block.mark();
> block.position(Bytes.SIZEOF_INT);
> int keyLength = ByteBuff.readCompressedInt(block);
> // TODO : See if we can avoid these reads as the read values are not getting used
> ByteBuff.readCompressedInt(block);
> {code}
> In DBEs many a places we read the integers just to skip them. This JIRA is to see if we can avoid this and rather go position based, as per a review comment in HBASE-12213.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)