[jira] [Commented] (KAFKA-12849) Consider migrating TaskMetadata to interface with internal implementation

2021-06-11 Thread Josep Prat (Jira)


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

Josep Prat commented on KAFKA-12849:


Just for documentation purposes on Jira. KIP was approved and PR available at 
https://github.com/apache/kafka/pull/10840

> Consider migrating TaskMetadata to interface with internal implementation
> -
>
> Key: KAFKA-12849
> URL: https://issues.apache.org/jira/browse/KAFKA-12849
> Project: Kafka
>  Issue Type: Improvement
>  Components: streams
>Reporter: A. Sophie Blee-Goldman
>Assignee: Josep Prat
>Priority: Major
>  Labels: needs-kip, newbie, newbie++
> Fix For: 3.0.0
>
>
> In KIP-740 we had to go through a deprecation cycle in order to change the 
> constructor from the original one which accepted the taskId parameter as a 
> string, to the new one which takes a TaskId object directly. We had 
> considered just changing the signature directly without deprecation as this 
> was never intended to be instantiated by users, rather it just acts as a 
> pass-through metadata class. Sort of by definition if there is no reason to 
> ever instantiate it, this seems to indicate it may be better suited as a 
> public interface with the implementation and constructor as internal APIs.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KAFKA-12849) Consider migrating TaskMetadata to interface with internal implementation

2021-05-27 Thread Josep Prat (Jira)


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

Josep Prat commented on KAFKA-12849:


KIP created https://cwiki.apache.org/confluence/x/XIrOCg

> Consider migrating TaskMetadata to interface with internal implementation
> -
>
> Key: KAFKA-12849
> URL: https://issues.apache.org/jira/browse/KAFKA-12849
> Project: Kafka
>  Issue Type: Improvement
>  Components: streams
>Reporter: A. Sophie Blee-Goldman
>Assignee: Josep Prat
>Priority: Major
>  Labels: needs-kip, newbie, newbie++
>
> In KIP-740 we had to go through a deprecation cycle in order to change the 
> constructor from the original one which accepted the taskId parameter as a 
> string, to the new one which takes a TaskId object directly. We had 
> considered just changing the signature directly without deprecation as this 
> was never intended to be instantiated by users, rather it just acts as a 
> pass-through metadata class. Sort of by definition if there is no reason to 
> ever instantiate it, this seems to indicate it may be better suited as a 
> public interface with the implementation and constructor as internal APIs.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KAFKA-12849) Consider migrating TaskMetadata to interface with internal implementation

2021-05-26 Thread Josep Prat (Jira)


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

Josep Prat commented on KAFKA-12849:


Thanks a lot for the explanation! It's all clear now.

I keep forgetting that Kafka uses source compatibility instead of binary 
compatibility (like for example Akka does)

> Consider migrating TaskMetadata to interface with internal implementation
> -
>
> Key: KAFKA-12849
> URL: https://issues.apache.org/jira/browse/KAFKA-12849
> Project: Kafka
>  Issue Type: Improvement
>  Components: streams
>Reporter: A. Sophie Blee-Goldman
>Assignee: Josep Prat
>Priority: Major
>  Labels: needs-kip, newbie, newbie++
>
> In KIP-740 we had to go through a deprecation cycle in order to change the 
> constructor from the original one which accepted the taskId parameter as a 
> string, to the new one which takes a TaskId object directly. We had 
> considered just changing the signature directly without deprecation as this 
> was never intended to be instantiated by users, rather it just acts as a 
> pass-through metadata class. Sort of by definition if there is no reason to 
> ever instantiate it, this seems to indicate it may be better suited as a 
> public interface with the implementation and constructor as internal APIs.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KAFKA-12849) Consider migrating TaskMetadata to interface with internal implementation

2021-05-26 Thread A. Sophie Blee-Goldman (Jira)


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

A. Sophie Blee-Goldman commented on KAFKA-12849:


That's something we'll need to consider during the KIP discussion. Just 
changing it from a class to an interface is source compatible (though not 
binary compatible, which is ok under our policy), however the only thing that 
would "break" is if the user was calling the constructor. In KIP-740 we 
ultimately decided to deprecate this constructor in 3.0, but we had considered 
just changing it directly instead, so I would try to gauge how people feel 
about this change. Personally I find it unlikely that anyone was invoking the 
constructor, and the constructor itself was not intended to be public, but it 
is still possible. So it may be that we need to follow a different approach, 
for example by introducing a new interface and just deprecating the entire 
class.

We can keep the same name if we just put the interface in the o.a.k.streams 
package, which imo makes more sense anyways. Taking this approach would 
actually fix one of the messy parts of KIP-740, as we can just start out with a 
`public TaskId taskId()` method on the new interface, and remove the `public 
TaskId getTaskId()` method on the current TaskMetadata class, which we had to 
introduce since the name `taskInfo()` was already taken by a method that just 
returned it as a string.

Does all that make sense? Happy to clarify further, but I recommend reading 
KIP-740 if you haven't already as it should clear some things up

> Consider migrating TaskMetadata to interface with internal implementation
> -
>
> Key: KAFKA-12849
> URL: https://issues.apache.org/jira/browse/KAFKA-12849
> Project: Kafka
>  Issue Type: Improvement
>  Components: streams
>Reporter: A. Sophie Blee-Goldman
>Assignee: Josep Prat
>Priority: Major
>  Labels: needs-kip, newbie, newbie++
>
> In KIP-740 we had to go through a deprecation cycle in order to change the 
> constructor from the original one which accepted the taskId parameter as a 
> string, to the new one which takes a TaskId object directly. We had 
> considered just changing the signature directly without deprecation as this 
> was never intended to be instantiated by users, rather it just acts as a 
> pass-through metadata class. Sort of by definition if there is no reason to 
> ever instantiate it, this seems to indicate it may be better suited as a 
> public interface with the implementation and constructor as internal APIs.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KAFKA-12849) Consider migrating TaskMetadata to interface with internal implementation

2021-05-26 Thread Josep Prat (Jira)


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

Josep Prat commented on KAFKA-12849:


Just to be sure, the intention is to convert TaskMetadata into an interface 
directly, without the deprecation cycles, right?

Reasoning behind this is that TaskMetadata was never meant to be public and 
with this KIP we can break compatibility.

 

Am I right to assume this?

> Consider migrating TaskMetadata to interface with internal implementation
> -
>
> Key: KAFKA-12849
> URL: https://issues.apache.org/jira/browse/KAFKA-12849
> Project: Kafka
>  Issue Type: Improvement
>  Components: streams
>Reporter: A. Sophie Blee-Goldman
>Assignee: Josep Prat
>Priority: Major
>  Labels: needs-kip, newbie, newbie++
>
> In KIP-740 we had to go through a deprecation cycle in order to change the 
> constructor from the original one which accepted the taskId parameter as a 
> string, to the new one which takes a TaskId object directly. We had 
> considered just changing the signature directly without deprecation as this 
> was never intended to be instantiated by users, rather it just acts as a 
> pass-through metadata class. Sort of by definition if there is no reason to 
> ever instantiate it, this seems to indicate it may be better suited as a 
> public interface with the implementation and constructor as internal APIs.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KAFKA-12849) Consider migrating TaskMetadata to interface with internal implementation

2021-05-26 Thread Josep Prat (Jira)


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

Josep Prat commented on KAFKA-12849:


I'll prepare the KIP tomorrow

> Consider migrating TaskMetadata to interface with internal implementation
> -
>
> Key: KAFKA-12849
> URL: https://issues.apache.org/jira/browse/KAFKA-12849
> Project: Kafka
>  Issue Type: Improvement
>  Components: streams
>Reporter: A. Sophie Blee-Goldman
>Assignee: Josep Prat
>Priority: Major
>  Labels: needs-kip, newbie, newbie++
>
> In KIP-740 we had to go through a deprecation cycle in order to change the 
> constructor from the original one which accepted the taskId parameter as a 
> string, to the new one which takes a TaskId object directly. We had 
> considered just changing the signature directly without deprecation as this 
> was never intended to be instantiated by users, rather it just acts as a 
> pass-through metadata class. Sort of by definition if there is no reason to 
> ever instantiate it, this seems to indicate it may be better suited as a 
> public interface with the implementation and constructor as internal APIs.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KAFKA-12849) Consider migrating TaskMetadata to interface with internal implementation

2021-05-26 Thread A. Sophie Blee-Goldman (Jira)


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

A. Sophie Blee-Goldman commented on KAFKA-12849:


Yep – it _should_ be relatively straightforward, so I bet we can get this in to 
3.0, but be aware that KIP freeze is in two weeks (June 9th). As long as you 
kick off the voting by Monday June 7th you should be good

> Consider migrating TaskMetadata to interface with internal implementation
> -
>
> Key: KAFKA-12849
> URL: https://issues.apache.org/jira/browse/KAFKA-12849
> Project: Kafka
>  Issue Type: Improvement
>  Components: streams
>Reporter: A. Sophie Blee-Goldman
>Assignee: Josep Prat
>Priority: Major
>  Labels: needs-kip, newbie, newbie++
>
> In KIP-740 we had to go through a deprecation cycle in order to change the 
> constructor from the original one which accepted the taskId parameter as a 
> string, to the new one which takes a TaskId object directly. We had 
> considered just changing the signature directly without deprecation as this 
> was never intended to be instantiated by users, rather it just acts as a 
> pass-through metadata class. Sort of by definition if there is no reason to 
> ever instantiate it, this seems to indicate it may be better suited as a 
> public interface with the implementation and constructor as internal APIs.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KAFKA-12849) Consider migrating TaskMetadata to interface with internal implementation

2021-05-26 Thread Josep Prat (Jira)


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

Josep Prat commented on KAFKA-12849:


I would like to work on this one. Shall I create the KIP first?

> Consider migrating TaskMetadata to interface with internal implementation
> -
>
> Key: KAFKA-12849
> URL: https://issues.apache.org/jira/browse/KAFKA-12849
> Project: Kafka
>  Issue Type: Improvement
>  Components: streams
>Reporter: A. Sophie Blee-Goldman
>Priority: Major
>  Labels: needs-kip, newbie, newbie++
>
> In KIP-740 we had to go through a deprecation cycle in order to change the 
> constructor from the original one which accepted the taskId parameter as a 
> string, to the new one which takes a TaskId object directly. We had 
> considered just changing the signature directly without deprecation as this 
> was never intended to be instantiated by users, rather it just acts as a 
> pass-through metadata class. Sort of by definition if there is no reason to 
> ever instantiate it, this seems to indicate it may be better suited as a 
> public interface with the implementation and constructor as internal APIs.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KAFKA-12849) Consider migrating TaskMetadata to interface with internal implementation

2021-05-26 Thread Josep Prat (Jira)


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

Josep Prat commented on KAFKA-12849:


I would like to work on this one. Shall I first create the KIP?

> Consider migrating TaskMetadata to interface with internal implementation
> -
>
> Key: KAFKA-12849
> URL: https://issues.apache.org/jira/browse/KAFKA-12849
> Project: Kafka
>  Issue Type: Improvement
>  Components: streams
>Reporter: A. Sophie Blee-Goldman
>Priority: Major
>  Labels: needs-kip, newbie, newbie++
>
> In KIP-740 we had to go through a deprecation cycle in order to change the 
> constructor from the original one which accepted the taskId parameter as a 
> string, to the new one which takes a TaskId object directly. We had 
> considered just changing the signature directly without deprecation as this 
> was never intended to be instantiated by users, rather it just acts as a 
> pass-through metadata class. Sort of by definition if there is no reason to 
> ever instantiate it, this seems to indicate it may be better suited as a 
> public interface with the implementation and constructor as internal APIs.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KAFKA-12849) Consider migrating TaskMetadata to interface with internal implementation

2021-05-25 Thread A. Sophie Blee-Goldman (Jira)


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

A. Sophie Blee-Goldman commented on KAFKA-12849:


Though we went through a similar discussion with TaskId and ultimately decided 
it needed to be an actual class and not an interface, imo those arguments and 
conditions do not really apply to the TaskMetadata class. So I would propose to 
move this to an interface, though I didn't want to get into it during KIP-740 
which had already dragged on for quite long enough :) 

> Consider migrating TaskMetadata to interface with internal implementation
> -
>
> Key: KAFKA-12849
> URL: https://issues.apache.org/jira/browse/KAFKA-12849
> Project: Kafka
>  Issue Type: Improvement
>  Components: streams
>Reporter: A. Sophie Blee-Goldman
>Priority: Major
>
> In KIP-740 we had to go through a deprecation cycle in order to change the 
> constructor from the original one which accepted the taskId parameter as a 
> string, to the new one which takes a TaskId object directly. We had 
> considered just changing the signature directly without deprecation as this 
> was never intended to be instantiated by users, rather it just acts as a 
> pass-through metadata class. Sort of by definition if there is no reason to 
> ever instantiate it, this seems to indicate it may be better suited as a 
> public interface with the implementation and constructor as internal APIs.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)