hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ramkrishna.s.vasudevan (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HBASE-13451) Make the HFileBlockIndex blockKeys to Cells so that it could be easy to use in the CellComparators
Date Wed, 03 Jun 2015 16:13:38 GMT

    [ https://issues.apache.org/jira/browse/HBASE-13451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14571247#comment-14571247
] 

ramkrishna.s.vasudevan edited comment on HBASE-13451 at 6/3/15 4:12 PM:
------------------------------------------------------------------------

The HFileBlockIndex's BlockReader is now an abstract class and we create two types of Block
Index Readers.  One is the ByteArrayBasedKeyBlockReader and CellBasedBlockIndexReader.
The code path is now clearly seperated out for index blocks that operate on byte[] and those
which can operate on the serialized key of the KV format.
The meta blocks and the ROW bloom come under the byte[] based index and the data blocks and
ROW_COL bloom come under the cell based index.  The advantage we get is that the Cell related
comparison and byte[] based comparisons can be easily distinguished and the CellComparator
can be used effectively.
The main perf benefit we get is that we avoid creating the KeyOnlyKV every time when we do
the binary search.  Bonus we get is that Bytes.binarySearch() will now have only two flavours
- a pure byte[] based binarySearch and another with Cell based binary search.


was (Author: ram_krish):
The HFileBlockIndex's BlockReader is now an abstract class and we create two types of Block
Index Readers.  One is the ByteArrayBasedKeyBlockReader and CellBasedBlockIndexReader.
The code path is now clearly seperated out for index blocks that operate on byte[] and those
which can operate on the serialized key of the KV format.
The meta blocks and the ROW bloom come under the byte[] based index and the data blocks and
ROW_COL bloom come under the cell based index.  The advantage we get is that the Cell related
comparison and byte[] based comparisons can be easily distinguished and the CellComparator
can be used effectively.
The main perf benefit we get is that we avoid creating the KeyOnlyKV every time when we do
the binary search.  Bonus we get is that Bytes.binarySearch() will now have one two flavours
- a pure byte[] based binarySearch and another with Cell based binary search.

> Make the HFileBlockIndex blockKeys to Cells so that it could be easy to use in the CellComparators
> --------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-13451
>                 URL: https://issues.apache.org/jira/browse/HBASE-13451
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 2.0.0
>
>         Attachments: HBASE-13451.patch
>
>
> After HBASE-10800 we could ensure that all the blockKeys in the BlockReader are converted
to Cells (KeyOnlyKeyValue) so that we could use CellComparators. Note that this can be done
only for the keys that are written using CellComparators and not for the ones using RawBytesComparator.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message