[jira] [Commented] (FLINK-4645) Hard to register Kryo Serializers due to generics

2016-09-20 Thread Stephan Ewen (JIRA)

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

Stephan Ewen commented on FLINK-4645:
-

I think both methods have the same erasure (binary signature): {{public void 
registerTypeWithKryoSerializer(Class type, Class serializerClass)}}.
The japicmp plugin also classifies them as equivalent.

Interestingly, this is a case where binary compatibility is preserved, but 
whether source compatibility is more tricky to answer. I think it is, though, 
because {{Class}} is strictly more generic than {{Class>}}.


> Hard to register Kryo Serializers due to generics
> -
>
> Key: FLINK-4645
> URL: https://issues.apache.org/jira/browse/FLINK-4645
> Project: Flink
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 1.1.2
>Reporter: Stephan Ewen
>Assignee: Stephan Ewen
> Fix For: 1.2.0
>
>
> It currently does not work to do this:
> {code}
> env.registerTypeWithKryoSerializer(TreeMultimap.class, JavaSerializer.class);
> {code}
> instead on needs to do that:
> {code}
> env.registerTypeWithKryoSerializer(TreeMultimap.class, (Class Serializer>) JavaSerializer.class);
> {code}
> The fix would be to change the signature of the environment method from
> {code}
> public void registerTypeWithKryoSerializer(Class type, Class Serializer> serializerClass)
> {code}
> to
> {code}
> public void registerTypeWithKryoSerializer(Class type, Class Serializer> serializerClass)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-4645) Hard to register Kryo Serializers due to generics

2016-09-20 Thread Greg Hogan (JIRA)

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

Greg Hogan commented on FLINK-4645:
---

{{registerTypeWithKryoSerializer}} is in the public API. Is this not a breaking 
change?

> Hard to register Kryo Serializers due to generics
> -
>
> Key: FLINK-4645
> URL: https://issues.apache.org/jira/browse/FLINK-4645
> Project: Flink
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 1.1.2
>Reporter: Stephan Ewen
>Assignee: Stephan Ewen
> Fix For: 1.2.0
>
>
> It currently does not work to do this:
> {code}
> env.registerTypeWithKryoSerializer(TreeMultimap.class, JavaSerializer.class);
> {code}
> instead on needs to do that:
> {code}
> env.registerTypeWithKryoSerializer(TreeMultimap.class, (Class Serializer>) JavaSerializer.class);
> {code}
> The fix would be to change the signature of the environment method from
> {code}
> public void registerTypeWithKryoSerializer(Class type, Class Serializer> serializerClass)
> {code}
> to
> {code}
> public void registerTypeWithKryoSerializer(Class type, Class Serializer> serializerClass)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)