[
https://issues.apache.org/jira/browse/HBASE-12296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14625885#comment-14625885
]
Anoop Sam John commented on HBASE-12296:
----------------------------------------
Thanks for the review Ram
We have all compare methods in CellComparator. That is why I thought to keep
it there. In fact in my first version (internal) I kept it in CellUtil and
later changed my mind. Here the compare methods are bit different as it take
Comparators. I agree.. But still they are comparing the passed cells fields.
wdyt?
Regarding the new API which takes BB in ByteArrayComparable. We have
ByteArrayComparable implements Comparable<byte[]>
For the comparable as such the type is byte[]. But we are not using that
standard compare(byte[]) method.
We have compare(byte,int,int) as special to avoid bytes copy. So similar
lines I though a method which takes BB instead of byte[] is ok. Agree if the
name as like BytesComparable it would have been less confusing. So what you
say is add this new abstract class and deprecated ByteArrayComparable in favor
of the new one ? Am ok with both ways.
> Filters should work with ByteBufferedCell
> -----------------------------------------
>
> Key: HBASE-12296
> URL: https://issues.apache.org/jira/browse/HBASE-12296
> Project: HBase
> Issue Type: Sub-task
> Components: regionserver, Scanners
> Reporter: ramkrishna.s.vasudevan
> Assignee: Anoop Sam John
> Fix For: 2.0.0
>
> Attachments: HBASE-12296_v1.patch
>
>
> Now we have added an extension for Cell in server side, ByteBufferedCell,
> where Cells are backed by BB (on heap or off heap). When the Cell is backed
> by off heap buffer, the getXXXArray() APIs has to create temp byte[] and do
> data copy and return that. This will be bit costly. We have avoided this in
> areas like CellComparator/SQM etc. Filter area was not touched in that patch.
> This Jira aims at doing it in Filter area.
> Eg : SCVF checking the cell value for the given value condition. It uses
> getValueArray() to get cell value bytes. When the cell is BB backed, it has
> to use getValueByteBuffer() API instead.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)