[
https://issues.apache.org/jira/browse/HBASE-12282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14188074#comment-14188074
]
ramkrishna.s.vasudevan commented on HBASE-12282:
------------------------------------------------
bq. then we do stuff like Anoop is doing to do compares of DBBs where unsafe or
by offset into the DBB rather than array references?
These changes are all based on the BB that we currently have in refernce. On
the BB try to use unsafe or go without unsafe. The util methods will check for
hasArray or not.
bq.CellComparator is still byte [] based in this patch? Still gets the arrays
from Cell.
The comparators are changed for few cases to make some specific cases to work.
Just to show how we need the changes and where we need the changes.
bq.ByteBuffer wrapBuf = ByteBuffer.wrap(buf);
They are all just hacks to get buff on a KV so that the comparators can be
changed and made to work with buffers.
bq. rather than change Cell, could we do something like hasArray from BB in
Cell and if it does not have array (because it DBB)
How can we do this now? Already the cell API is accepting a byte[] and
returning as byte[]. So currently all Cell are hasArray as true only right?
Unless Cell returns a BB or something other than byte[] we cannot use hasArray
inside a Cell.
> Ensure Cells and its implementations work with Buffers also
> -----------------------------------------------------------
>
> Key: HBASE-12282
> URL: https://issues.apache.org/jira/browse/HBASE-12282
> Project: HBase
> Issue Type: Sub-task
> Components: regionserver, Scanners
> Affects Versions: 0.99.1
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Fix For: 2.0.0, 0.99.2
>
> Attachments: HBASE-12224_2.patch
>
>
> This issue can be used to brainstorm and then do the necessary changes for
> the offheap work. All impl of cells deal with byte[] but when we change the
> Hfileblocks/Readers to work purely with Buffers then the byte[] usage would
> mean that always the data is copied to the onheap. Cell may need some
> interface change to implement this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)