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

Chia-Ping Tsai commented on HBASE-19746:
----------------------------------------

Assume we remove the default impl of getType() in 2.0. User who implemented 
their own version of Cell need to revise their code (extend the getType()) in 
order to succeed to update hbase from 1.x to 2.0. (and I assume this change 
break the API compatibility)

If we keep default impl of getType() in 2.0, user will be doable to compile 
their code without adding impl to getType() after updating hbase from 1 to 2. 
And then they must impl the getType() in 3.0 because getType() will be abstract 
in 3.0. I think this scenario is reasonable because updating from 1 to 3 have 
no any compatibility guarantee. I mean we can't expect the code based on hbase 
1.x is compatible with hbase 3.0 API. Of course, we need to add more clear 
comment to getTypeByte to suggest user to implement getType() and remove the 
"override" annotation from getTypeByte if they want to migrate code from 2 to 3 
smoothly.

[~lars_francke] Please correct me if i misunderstand the API compatibility of 
hbase. If there are no other users who have their variant of Cell, reverting 
this patch won't hurt hbase I'd say.

 

> Add default impl to Cell#getType
> --------------------------------
>
>                 Key: HBASE-19746
>                 URL: https://issues.apache.org/jira/browse/HBASE-19746
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>            Priority: Critical
>             Fix For: 2.0.0
>
>         Attachments: HBASE-19746.v0.patch, HBASE-19746.v1.patch, 
> HBASE-19746.v1.qa.patch
>
>
> Noticed this issue when migrating the app to branch-2.
> {{Cell}} is IA.Public so it should obey our compatibility rules. Not sure 
> whether any related discussion had be in HBASE-19112. It worthwhile, however, 
> to raise this issue again.
> FYI [~anoopsamjohn] [~ram_krish] [~stack]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to