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

Anoop Sam John commented on HBASE-12282:
----------------------------------------

Instead of adding new buffer based APIs to Cell, we can have a new Interface 
extension to Cell and let server side Cells in read path implement this new 
interface. Add getxxxBuffer() APIs in new interface

We should avoid adding new fields to KeyValue which increases the heap usage.

getxxxBuffer() API returning the ref to actual buffer can be problematic. We 
might need to pass this to CP hooks even. Any op causing change in the position 
in buffer can be an issue. This buffer will be the same buffer HFileBlock 
backs. Every time we duplicate/slice the actual buffer can cause too many 
objects creation. So we can do one thing
Cell impl refers to a wrapper BB object which wraps the actual buffer. The 
wrapper should allow absolute positioned read only APIs only and other APIs 
should be Illegal ops.

Based on the type of the Cell the CellComparator can use the buffer based APIs 
or array based APIs. 


> 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)

Reply via email to