[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-04-24 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-19746:


[~lars_francke] Any updates? I feel this issue is a good example used to review 
our compatibility rule again.

> 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)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-04-22 Thread Chia-Ping Tsai (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-19746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-04-22 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-19746:


{quote}I do not understand your comments about API compatibility. What exactly 
do you mean here?
{quote}
You can compile your code without any changing after updating the hbase version 
from 1.x to 2.0. It means you can change the version of hbase dependencies and 
then still succeed to build the project. 
{quote}It's a major version so we are allowed to break API. We do this either 
in 2.0 by _not_ adding a default or in 3.0 by adding the _default_ method and 
removing it later. So for me that's not an argument.
{quote}
Pardon me. I just catch your point. :(  So you prefer to remove the default 
impl (The API is break here) to enforce user to implement the #getType in 2.0 
rather than delaying the break to 3.0? If so, I'm fine to revert this patch.
{quote}It's getting late here so I'll wait until the US wakes up on Monday and 
will see if anyone else has an opinion. If no one jumps in I'll ping the dev 
list.
{quote}
:)

 

> 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)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-04-22 Thread Lars Francke (JIRA)

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

Lars Francke commented on HBASE-19746:
--

Ha, I thought we had it but apparently not :)

I do not understand your comments about API compatibility. What exactly do you 
mean here? It's a major version so we are allowed to break API. We do this 
either in 2.0 by _not_ adding a default or in 3.0 by adding the _default_ 
method and removing it later. So for me that's not an argument.

I think we just disagree on how to proceed?

It's getting late here so I'll wait until the US wakes up on Monday and will 
see if anyone else has an opinion. If no one jumps in I'll ping the dev list.

> 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)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-04-22 Thread Chia-Ping Tsai (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-19746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-04-22 Thread Lars Francke (JIRA)

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

Lars Francke commented on HBASE-19746:
--

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.

> 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)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-04-22 Thread Lars Francke (JIRA)

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

Lars Francke commented on HBASE-19746:
--

Sorry, I didn't make myself clear.

I'm not advocating removing getTypeByte for 2.0, this one can go in 3.0. We're 
both agreeing on that one :)

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.

I know this is anecdotal (just like yours I assume?) but I haven't seen a 
single customer who's implemented their own version of Cell but I agree with 
your reasoning.

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.

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?

> 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)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-04-22 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-19746:


{quote}I'd even be happy to try and provide a patch to remove it for 2.0 but 
it's probably already too late for that?
{quote}
This is what I tried to do...Unfortunately, we encouraged user to write their 
Cell impl for a long time since all of Put, Delete, Increment and Append have 
the method - add(Cell). Hence, many users who had built custom Cell will be 
hurt if we remove the #getTypeByte from Cell in 2.0. For example, our 
application have 1x Cell impl so the compile error burst my build when I just 
updated the hbase version from 1.x to 2.0-snapshot. By contrast, we don't 
encourage user to build their custom Table so adding a new stuff to Table is 
ok. The inheritance to Cell is a ambiguous stuff against our compatibility 
rule. That is why I raised HBASE-18519 to add the cell builder to prevent user 
from writing custom Cell impl, and the purpose of HBASE-19535 is to write the 
new compatibility rule...

The deprecated cycle applied to Cell is weird I think. However, it approve us 
to remove the #getTypeByte in 3.0 and this behavior doesn't break our rule 
totally...

> 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)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-04-22 Thread Lars Francke (JIRA)

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

Lars Francke commented on HBASE-19746:
--

Thanks for helping clarify. In that case my -0 stands. In Table for example we 
also added stuff (checkAndMutate) without adding a default.

I'd even be happy to try and provide a patch to remove it for 2.0 but it's 
probably already too late for that?

> 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)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-04-22 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-19746:


{quote}In 3.0 we need to remove the default implementation, right? Because we 
can't get to getTypeByte anymore which we need for the implementation.
{quote}
Yep.
{quote}So we'll break BC in 3.0 for two different reasons.
{quote}
You are right.
{quote}I still don't like it but that is also not documented anywhere. Either 
we undeprecate getTypeByte or we need to mark getType as deprecated somehow 
because it will effectively change in 3.0.
{quote}
Agreed. Perhaps we should file a Jira to doc how to update from 1.x to 2.0? 
IIRC, there are some issues but I'm not sure whether the Cell changes are 
included.
{quote}You're saying that you suggested the user to implement getType but 
that's not the case as far as I can tell. There's no such suggestion. And 
unlike a "@deprecation" tag we cannot really enforce such a thing at compile 
time.
{quote}
You are right again. Are there any better way to reduce the pain of removing 
methods from Public class?
{quote}What are we gaining by including the default implementation?
{quote}
API compatibility? IIRC, recompiling should work when updating to next major 
release.
{quote}The alternative is to implement it in all our implementing classes in 
2.0 (which we'll otherwise have to do in 3.0), right?
{quote}
Yep. But it will introduce many duplicate code.
{quote}The BC issue doesn't really matter as we'll have to do it anyway, 
whether we do it in 2.0 or 3.0 doesn't really make a difference, no?
{quote}
Ya... the cell impl user must update their code for either 2.0 or 3.0 since we 
will do remove a method from Cell in 3.0. The API compatibility will break in 
3.0 but it is valid since we have deprecated the getTypeByte...ya, it is a 
unfriendly way...

> 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)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-04-22 Thread Lars Francke (JIRA)

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

Lars Francke commented on HBASE-19746:
--

Thanks. Understood.

That brings me back to the original question though.
In 3.0 we need to remove the default implementation, right? Because we can't 
get to getTypeByte anymore which we need for the implementation.

So we'll break BC in 3.0 for two different reasons. I still don't like it but 
that is also not documented anywhere. Either we undeprecate getTypeByte or we 
need to mark getType as deprecated somehow because it will effectively change 
in 3.0.

You're saying that you suggested the user to implement getType but that's not 
the case as far as I can tell. There's no such suggestion. And unlike a 
"@deprecation" tag we cannot really enforce such a thing at compile time.

What are we gaining by including the default implementation? The alternative is 
to implement it in all our implementing classes in 2.0 (which we'll otherwise 
have to do in 3.0), right? The BC issue doesn't really matter as we'll have to 
do it anyway, whether we do it in 2.0 or 3.0 doesn't really make a difference, 
no?

> 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)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-04-22 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-19746:


{quote}In that case we'd need to deprecate `Cell#getType()` in 2.0 but that has 
not happened. It's not marked as deprecated. If that's the intention I can 
provide a patch to do so hoping [~stack] can still include it in 2.0.
{quote}
My bad. It is typo. The method should be removed in 3.0 is Cell#getTypeByte.

> 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)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-04-22 Thread Lars Francke (JIRA)

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

Lars Francke commented on HBASE-19746:
--

Thanks for the quick reply. Unfortunately I still don't get it.

{quote}Not really. The API which will be removed in 3.0 is Cell#getType. We 
have deprecated the Cell#getTypeByte and suggested user to implement the 
Cell#getType also in 2.0. Hence, we can remove Cell#getTypeByte in 3.0.{quote}

A few things:
In that case we'd need to deprecate `Cell#getType()` in 2.0 but that has not 
happened. It's not marked as deprecated. If that's the intention I can provide 
a patch to do so hoping [~stack] can still include it in 2.0.

So we remove both #getTypeByte and #getType in 3.0?

And I don't see a suggestion to implement getType anywhere tbh.

{quote}Yep. this issue is to keep the bc of Public class (Cell).{quote}

But we _won't_ keep it, no? With your plan we'll break BC with 3.0 anyway?

{quote}IIRC, our rules to Public class is we must deprecate the API in a whole 
major release before we really remove them in next major release.  Also, we 
should introduce the replacement for deprecated APIs.{quote}

We discussed this at length last time I did a round of deprecation removals 
(see HBASE-13462 and ) and we found out that the rules are ambiguous and that 
everyone reads them differently. So we have both options.

{quote}I expect that hbase user should check the doc of deprecated API to find 
out the replacement. The comment is shown below.{quote}

True! For getCellByte there's a deprecation tag but there's nothing in there 
noting that the default implementation - or indeed the whole method - of 
getType will go away.

Reading all of this I'm still at -0 on this. If I read you correctly the 
_least_ we need to do is add a @deprecated tag to getType and an explanatory 
note. But to be honest...why remove one method in favor of another just to 
immediately deprecate that other method. I don't see how breaking BC in 3.0 for 
a single method (removal of getTypeByte) is better than for two (getTypeByte + 
getType), granted it's also not much worth but if we're going to take it away 
anyway I'd rather not expose a new method that people then might rely on.

> 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)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-04-22 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-19746:


hi [~lars_francke] Thanks for the nice question.
{quote}So for 3.0 we remove the default implementation again?
{quote}
Not really. The API which will be removed in 3.0 is Cell#getType. We have 
deprecated the Cell#getTypeByte and suggested user to implement the 
Cell#getType also in 2.0. Hence, we can remove Cell#getTypeByte in 3.0.
{quote}And you do this to not break API compatibility between 1.x and 2.x?
{quote}
Yep. this issue is to keep the bc of Public class (Cell).
{quote}As far as I understand the compatibility rules in the book (which I 
still have on my todo list to clarify) we don't guarantee any compatibility 
between Major releases. 
{quote}
IIRC, our rules to Public class is we must deprecate the API in a whole major 
release before we really remove them in next major release.  Also, we should 
introduce the replacement for deprecated APIs.
{quote}Otherwise how would we ever add new methods to interfaces for which we 
cannot provide a default implementation?
{quote}
Ya, we have discussed this issue before - how we keep the bc for the 
inheritance. see HBASE-19535. If we can introduce an annotation to say the bc 
of inheritance to specified Public class isn't guaranteed, our life will be 
more easier.  BTW, the BC is fine if the impl is from hbase.
{quote}If this is the case I'm -0 to include this. Doesn't this just shift the 
problem to the next version? 
{quote}
Not really. We create a room to remove the Cell#getType in 3.0.
{quote} There's nothing notifying implementors of the Cell interface of this 
new default method (unlike with @deprecated things)
{quote}
I expect that hbase user should check the doc of deprecated API to find out the 
replacement. The comment is shown below.
{code:java}
/**
 * @return The byte representation of the KeyValue.TYPE of this cell: one of 
Put, Delete, etc
 * @deprecated As of HBase-2.0. Will be removed in HBase-3.0. Use {@link 
#getType()}.
 */{code}
Of course, it would be better to have a more readable way to reminder user to 
use new APIs.
{quote}There's also nothing in the release notes and the Javadoc for getType 
also doesn't notify users about what's going to happen.
{quote}
You are right.  We make a considerable change to Cell APIs (RawCell, 
ExtendedCell, CelBuilder, and so on) but no fat docs are added. I can file a 
Jira to write the use case to hbase doc for the new usage of Cell.

> 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)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-04-21 Thread Lars Francke (JIRA)

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

Lars Francke commented on HBASE-19746:
--

[~chia7712] can you elaborate on what the plan is here? (Sorry for being late 
to the party, I'm only now stumbling across this)

This in particular I don't understand:

{quote}yep, it is a workaround to keep our API compatibility. We have suggested 
user to impl the {{getType}} in 2.0 so it is ok to remove the impl of 
{{getType}} (make it abstract) in 3.0 I think.{quote}

So for 3.0 we remove the default implementation again? And you do this to not 
break API compatibility between 1.x and 2.x?

As far as I understand the compatibility rules in the book (which I still have 
on my todo list to clarify) we don't guarantee any compatibility between Major 
releases. Otherwise how would we ever add new methods to interfaces for which 
we cannot provide a default implementation?

If this is the case I'm -0 to include this. Doesn't this just shift the problem 
to the next version? There's nothing notifying implementors of the Cell 
interface of this new default method (unlike with @deprecated things). There's 
also nothing in the release notes and the Javadoc for getType also doesn't 
notify users about what's going to happen.

> 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)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-01-11 Thread ramkrishna.s.vasudevan (JIRA)

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

ramkrishna.s.vasudevan commented on HBASE-19746:


+1 .  Belated.

> 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
(v6.4.14#64029)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-01-11 Thread Hudson (JIRA)

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

Hudson commented on HBASE-19746:


FAILURE: Integrated in Jenkins build HBase-Trunk_matrix #4385 (See 
[https://builds.apache.org/job/HBase-Trunk_matrix/4385/])
HBASE-19746 Add default impl to Cell#getType (stack: rev 
4bd6ac3e1028c3d9c6c3884b01e875806508ea7a)
* (edit) hbase-common/src/main/java/org/apache/hadoop/hbase/ExtendedCell.java
* (edit) hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java
* (edit) hbase-common/src/main/java/org/apache/hadoop/hbase/Cell.java
* (edit) hbase-common/src/test/java/org/apache/hadoop/hbase/TestCellUtil.java
* (edit) 
hbase-common/src/main/java/org/apache/hadoop/hbase/ByteBufferKeyOnlyKeyValue.java
* (edit) hbase-common/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java


> 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
(v6.4.14#64029)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-01-11 Thread Anoop Sam John (JIRA)

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

Anoop Sam John commented on HBASE-19746:


Looks good.

> 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
(v6.4.14#64029)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-01-11 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HBASE-19746:
---

| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
10s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  0m  
1s{color} | {color:blue} Findbugs executables are not available. {color} |
| {color:green}+1{color} | {color:green} hbaseanti {color} | {color:green}  0m  
0s{color} | {color:green} Patch does not have any anti-patterns. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 2 new or modified test 
files. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
13s{color} | {color:blue} Maven dependency ordering for branch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  5m 
19s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
9s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  1m 
41s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} shadedjars {color} | {color:green}  6m 
54s{color} | {color:green} branch has no errors when building our shaded 
downstream artifacts. {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
57s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
19s{color} | {color:blue} Maven dependency ordering for patch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  5m 
45s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m 
25s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m 
25s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  1m 
48s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} shadedjars {color} | {color:green}  5m 
 5s{color} | {color:green} patch has no errors when building our shaded 
downstream artifacts. {color} |
| {color:green}+1{color} | {color:green} hadoopcheck {color} | {color:green} 
22m  1s{color} | {color:green} Patch does not cause any errors with Hadoop 
2.6.5 2.7.4 or 3.0.0. {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
44s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  2m 
13s{color} | {color:green} hbase-common in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 95m 
38s{color} | {color:green} hbase-server in the patch passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
31s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black}145m 29s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/hbase:eee3b01 |
| JIRA Issue | HBASE-19746 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12905617/HBASE-19746.v1.qa.patch
 |
| Optional Tests |  asflicense  javac  javadoc  unit  findbugs  shadedjars  
hadoopcheck  hbaseanti  checkstyle  compile  |
| uname | Linux 122342fb081d 3.13.0-129-generic #178-Ubuntu SMP Fri Aug 11 
12:48:20 UTC 2017 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build/component/dev-support/hbase-personality.sh
 |
| git revision | master / 62a8188946 |
| maven | version: Apache Maven 3.5.2 
(138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T07:58:13Z) |
| Default Java | 1.8.0_151 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-HBASE-Build/11012/testReport/ |
| modules | C: hbase-common 

[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-01-10 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HBASE-19746:
---

| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
11s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  0m  
0s{color} | {color:blue} Findbugs executables are not available. {color} |
| {color:green}+1{color} | {color:green} hbaseanti {color} | {color:green}  0m  
0s{color} | {color:green} Patch does not have any anti-patterns. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 2 new or modified test 
files. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  4m 
46s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
19s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
23s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} shadedjars {color} | {color:green}  5m 
18s{color} | {color:green} branch has no errors when building our shaded 
downstream artifacts. {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
23s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  5m 
32s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
20s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 
20s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
25s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} shadedjars {color} | {color:green}  5m 
30s{color} | {color:green} patch has no errors when building our shaded 
downstream artifacts. {color} |
| {color:green}+1{color} | {color:green} hadoopcheck {color} | {color:green} 
23m 52s{color} | {color:green} Patch does not cause any errors with Hadoop 
2.6.5 2.7.4 or 3.0.0. {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
20s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  2m 
34s{color} | {color:green} hbase-common in the patch passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
11s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 44m 23s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/hbase:eee3b01 |
| JIRA Issue | HBASE-19746 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12905612/HBASE-19746.v1.patch |
| Optional Tests |  asflicense  javac  javadoc  unit  findbugs  shadedjars  
hadoopcheck  hbaseanti  checkstyle  compile  |
| uname | Linux e73f8e5b7917 3.13.0-129-generic #178-Ubuntu SMP Fri Aug 11 
12:48:20 UTC 2017 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build/component/dev-support/hbase-personality.sh
 |
| git revision | master / 62a8188946 |
| maven | version: Apache Maven 3.5.2 
(138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T07:58:13Z) |
| Default Java | 1.8.0_151 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-HBASE-Build/11011/testReport/ |
| modules | C: hbase-common U: hbase-common |
| Console output | 
https://builds.apache.org/job/PreCommit-HBASE-Build/11011/console |
| Powered by | Apache Yetus 0.6.0   http://yetus.apache.org |


This message was automatically generated.



> Add default impl to Cell#getType
> 
>
> Key: HBASE-19746
> URL: https://issues.apache.org/jira/browse/HBASE-19746
> Project: HBase
>  Issue Type: 

[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-01-10 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-19746:


Thanks to [~sergey.soldatov] for the great input. I do the similar jmh and then 
get the similar result.

bq. We'll be doing KeyValue#getType under the covers, right? This default 
Cell#getType won't be used (perhaps in tests/mockito?).
Currently, Cell#getType isn't used in production. But ProtobufUtil should use 
it to replace the {{getTypeByte}} since the getTypeByte will be removed.

Will add a small cache to speed up the seek in next patch.

> 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
>
>
> 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
(v6.4.14#64029)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-01-10 Thread stack (JIRA)

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

stack commented on HBASE-19746:
---

Excellent [~sergey.soldatov]!

[~chia7712] We'll be doing KeyValue#getType under the covers, right? This 
default Cell#getType won't be used (perhaps in tests/mockito?).

Thanks.

> 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
>
>
> 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
(v6.4.14#64029)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-01-10 Thread Sergey Soldatov (JIRA)

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

Sergey Soldatov commented on HBASE-19746:
-

My concern is whether it's reasonable to use functional stuff here (Stream plus 
filters). Quick benchmarks results:
{noformat}
MyBenchmark.testUsingExtendedCellGetType  avgt   15   1.074 ± 0.030  ns/op
MyBenchmark.testUsingKeyValueGetType  avgt   15   0.620 ± 0.019  ns/op
MyBenchmark.testUsingNewGetType   avgt   15  44.002 ± 1.690  ns/op
{noformat}
As we can see functional version is 40 times slower than the one we have in 
ExtendedCell and almost 70 times slower than the original version that we have 
in KeyValue. 

> 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
>
>
> 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
(v6.4.14#64029)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-01-10 Thread stack (JIRA)

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

stack commented on HBASE-19746:
---

+1 Lets get it in.

> 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
>
>
> 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
(v6.4.14#64029)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-01-10 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-19746:


bq. Now the new default impl uses the getTypeByte() of the Cell which we try to 
deprecate? 
yep, it is a workaround to keep our API compatibility. We have suggested user 
to impl the {{getType}} in 2.0 so it is ok to remove the impl of {{getType}} 
(make it abstract) in 3.0 I think.

> 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
>
>
> 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
(v6.4.14#64029)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-01-10 Thread ramkrishna.s.vasudevan (JIRA)

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

ramkrishna.s.vasudevan commented on HBASE-19746:


Even previously when getTypeByte() was there we were not giving default impl.  
Now the new default impl uses the getTypeByte() of the Cell which we try to 
deprecate? But the same when we do in ExtendedCell it is ok because we have 
that getTypeByte() over there.

> 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
>
>
> 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
(v6.4.14#64029)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-01-09 Thread stack (JIRA)

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

stack commented on HBASE-19746:
---

bq. The Cell#getType is an new method in branch-2 so all of our variants of 
cell get the error saying "you overlook a method, boss".

+1 then on default. Good one.

bq. Not sure. I'm just about to do the application migration. I hope the most 
hard work is to update the version of hbase from the pom file. 

If that is all you have to do, you will miss out on all that nice API fixup 
you've added... smile.



> 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
>
>
> 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
(v6.4.14#64029)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-01-09 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-19746:


bq. Say more please
The Cell#getType is an new method in branch-2 so all of our variants of cell 
get the error saying "you overlook a method, boss".

bq. how hard has it been migrating?
Not sure. I'm just about to do the application migration. I hope the most hard 
work is to update the version of hbase from the pom file. :P

> 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
>
>
> 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
(v6.4.14#64029)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-01-09 Thread stack (JIRA)

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

stack commented on HBASE-19746:
---

Say more please [~chia7712]. I'm kinda slow... Thanks sir. Sounds important.

> 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
>
>
> 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
(v6.4.14#64029)


[jira] [Commented] (HBASE-19746) Add default impl to Cell#getType

2018-01-09 Thread stack (JIRA)

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

stack commented on HBASE-19746:
---

Oh, how hard has it been migrating? Can we make it easier anyhow?

> 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
>
>
> 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
(v6.4.14#64029)