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

ramkrishna.s.vasudevan commented on HBASE-19112:
------------------------------------------------

Some discussions offline with [~chia7712] and [~anoopsamjohn]. Thanks for the 
discussions.
Few points that were considered
-> removing the getType from Cell - what are the alternatives for that?
We need that for the proto layer where we do Put#add(Cell) and 
Delete#add(Cell). and the next is for the client APIs.
Currently if RawCell has getTypeByte() then if a cell has to use that it has to 
do a typecast. And the other concern is that the core server code does not have 
RawCell/ExtendedCell and it has only Cells so we need to ensure there is some 
way we expose the type.
#1  Expose getType (like a constant/enum) in Cell
#2 Introduce DeleteFamily, DeleteColumns, DeleteColumn etc as Public interfaces 
for clients to create specific delete types. Use this information at the proto 
layer to decide the type of delete.
#3 Add addColumn(Cell), addFamily(Cell), addColumns(Cell) in delete and 
deprecate Delete#add(Cell) in 2.0. 
#4 Expose RawCell

#2 -  the con is that currently clients can add Deletecolumn,deleteFamily, 
deletecolumns on the same row wit the  same Delete() object. That would not be 
allowed.
#3 - adding new APIs for 2.0 in client side is too late now and user cannot use 
the actual cell being passed and he has to always convert to KeyValue type 
before adding the cell to the new addColumn(cell), addColumns(Cell), 
addFamily(Cell) APIs.
#4 Exposing RawCell is more work for hbase2 time frame.

So then #1 is the option and if we do that we need constants to be exposed 
outside. Or expose with the Cellbuilder's DataType only. If we do that I think 
lets have getTypeByte() in extendedCell and let RawCell keep using Cell's 
getType (that returns the enum DataType)? Lets decide and take it to closure so 
that we can get this in beta1.

> Suspect methods on Cell to be deprecated
> ----------------------------------------
>
>                 Key: HBASE-19112
>                 URL: https://issues.apache.org/jira/browse/HBASE-19112
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>            Reporter: Josh Elser
>            Assignee: ramkrishna.s.vasudevan
>            Priority: Blocker
>             Fix For: 2.0.0-beta-1
>
>         Attachments: HBASE-19112_branch-2.patch
>
>
> [~chia7712] suggested on the [mailing 
> list|https://lists.apache.org/thread.html/e6de9af26d9b888a358ba48bf74655ccd893573087c032c0fcf01585@%3Cdev.hbase.apache.org%3E]
>  that we have some methods on Cell which should be deprecated for removal:
> * {{#getType()}}
> * {{#getTimestamp()}}
> * {{#getTag()}}
> * {{#getSequenceId()}}
> Let's make a pass over these (and maybe the rest) to make sure that there 
> aren't others which are either implementation details or methods returning 
> now-private-marked classes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to