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

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

{quote}I'm advocating removing the default implementation of getType for 2.0. 
Basically reverting this patch and instead implementing getType in all the Cell 
implementations.
{quote}
As you mentioned, it's probably already too late for that. Also, I'm not sure 
whether breaking the API compatibility for inheritance is right. 
{quote}That said: If I understand this correctly then all we're disagreeing on 
is whether we want to break BC from 1 -> 2 or from 2 ->3. In my opinion it 
should be sooner rather than later and if I understand you correctly you'd 
rather do it later and leave the default implementation in there.
{quote}
I prefer to remove the default impl in 3.0 because removing it in 2.0 breaks 
not only BC but also API compatibility. Breaking the BC in major version is 
acceptable. Breaking API compatibility make user fail to compile their code 
without any changes after updating hbase from 1.x to 2.0.
{quote}My reasoning for doing it sooner rather than later is that we have no 
way to add a compile-time warning that warns of the impeding removal of the 
default implementation. To be honest I have no idea how to proceed.

What we do agree on is that the Javadoc for getType needs to be clarified, 
right?
{quote}
You're absolutely right.
{quote}Actually I thought of one thing: We could add @deprecated to getType() 
with an explanation. It's a bit ambiguous but it would warn users at least. And 
then in 3.0 remove the default implementation along with the @deprecated tag.
{quote}
This workaround is ok to me if we can add clear comment to getType()

> 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