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

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

[~stack]  Pls note that, the getXXXArray APIs will throw Exception in case of 
buffer backed Cells.  So writers of Filter/CP has to do the instance of check 
always.  
Yes we must give CellUtil APIs for retrieving the values or check the qualifier 
etc for a Cell.  The util can do type check and all.. This can take the pain 
from users.
If we are not having the restriction of getXXXArray() APIs throwing Exception 
in case of buffer backed cells, it looks ok to pass Cell only to Filter/CPs.  
If writer calls them with out type check and all,  there is a pref hit but 
functionally no issue.  Giving the CellUtil APIs we can help users of doing 
this in better way.

In that regard (and also considering we are not leaking new APIs in public Cell 
API), can we have separate getXXXOffset() methods for getting offset in buffer? 
 This was discussed in dev@ mail chain.  In a public Cell API this looks ugly 
but on a ServerCell this is fine?

> Add ServerCell an extension to Cell
> -----------------------------------
>
>                 Key: HBASE-13387
>                 URL: https://issues.apache.org/jira/browse/HBASE-13387
>             Project: HBase
>          Issue Type: Sub-task
>          Components: regionserver, Scanners
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>         Attachments: WIP_ServerCell.patch
>
>
> This came in btw the discussion abt the parent Jira and recently Stack added 
> as a comment on the E2E patch on the parent Jira.
> The idea is to add a new Interface 'ServerCell'  in which we can add new 
> buffer based getter APIs, hasArray API etc.  We will keep this interface 
> @InterfaceAudience.Private
> Also we have to change the timestamp and seqId on Cells in server side. We 
> have added new interfaces SettableSequenceId, SettableTimestamp for this. Now 
> if we can add a ServerCell we can add the setter APIs there.



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

Reply via email to