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

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

bq.CP would be exposed with both type of cells. Can we have annotations in the 
API that are exposed to cells and filters that tells which one to use and which 
one to use? That may be confusing but if we can have a cleaner way of showing 
which APIs are in the read and which one in write then may be it may make sense 
to extend Cell only for the new BB based cell.
If we continue to pass Cell in read path.. every where we need buffers, we will 
end up in casting. That is ugly. Can we change all places in read path to new 
interface BBBackedCell or some other better name.
Like what we pass to Filter, to cps, what StoreScanner, InternalScanner, 
RegionScanner returns.. etc...   It can land in 2.0 only I believe.
One option as Stack suggested have a hasArray() in Cell and based on decide 
which API to call in places like Comparators. (where we deal with Cells only).  
Here the impls should throw Exception out of getxxxArray() API if hasArray() is 
false. (like BB impls)
Or else not make BBBackedCell to extend Cell at all. So we will see only 
getxxxBuffer() in read path. One adv is there is no diff in Public exposed 
Cell. It might not make much sense for hasArray() at client side because there 
we deal with Cells backed by Array only. Only in read path it make sense.


> Create ByteBuffer backed Cell
> -----------------------------
>
>                 Key: HBASE-12358
>                 URL: https://issues.apache.org/jira/browse/HBASE-12358
>             Project: HBase
>          Issue Type: Sub-task
>          Components: regionserver, Scanners
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 2.0.0, 0.99.2
>
>         Attachments: HBASE-12358.patch
>
>
> As part of HBASE-12224 and HBASE-12282 we wanted a Cell that is backed by BB. 
>  Changing the core Cell impl would not be needed as it is used in server 
> only.  So we will create a BB backed Cell and use it in the Server side read 
> path. This JIRA just creates an interface that extends Cell and adds the 
> needed API.
> The getTimeStamp and getTypebyte() can still refer to the original Cell API 
> only.  The getXXxOffset() and getXXXLength() can also refer to the original 
> Cell only.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to