[
https://issues.apache.org/jira/browse/HBASE-10800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ramkrishna.s.vasudevan updated HBASE-10800:
-------------------------------------------
Attachment: HBASE-10800_3.patch
Attaching a rebased patch with some additional changes (addresses some of the
review comments posted in RB and on the JIRA).
Why we need this patch is because over in HBASE-11425, Stack had concerns on
having BB based compare APIs in the KeyValue.KVComparator.
In case of BB backed cells we will definitely have cases to handle BB
components of the Cell.
So it is better to move all the comparator things to CellComparator and let
them be non static methods. The reason being KVComparator and MetaComparator
sort of comparison needs. This patch removes all the comparator code from KV
and moves over to CellComparator.
CellComparator and MetaCellComparator are the new Comparators.
The patch also contains certain TODOs to show how the BB backed cell related
compare methods would be added in the CellComparator methods.
Also pls note that few compare APIS like compareRows() has been added that
takes Cell along with rowOffset and rowLength so that if BB backed Cells are
coming we could use the same API and handle them with hasArray condition.
The patch with BB backed Cell can do further refactoring in certain places
where the Cells could be directly passed to the CellComparator so that
comparisons could be done on Cells using hasArray() check.
The getLegacyClassName() is bit of a hack. I think the intention is to remove
them but using the String we try to instantiate the respective Comparator
Classes. I think that should work even now except that the String that is used
for the name would have an odd package name (Interestingly the KeyComparator
and MetaKeyComparator was no longer in the code base).
> Use CellComparator instead of KVComparator
> ------------------------------------------
>
> Key: HBASE-10800
> URL: https://issues.apache.org/jira/browse/HBASE-10800
> Project: HBase
> Issue Type: Sub-task
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Fix For: 1.1.0
>
> Attachments: HBASE-10800_1.patch, HBASE-10800_2.patch,
> HBASE-10800_3.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)