[
https://issues.apache.org/jira/browse/HBASE-13451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ramkrishna.s.vasudevan updated HBASE-13451:
-------------------------------------------
Attachment: HBASE-13451.patch
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)