[ 
https://issues.apache.org/jira/browse/FLINK-6363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flink Jira Bot updated FLINK-6363:
----------------------------------
      Labels: auto-deprioritized-major auto-unassigned  (was: auto-unassigned 
stale-major)
    Priority: Minor  (was: Major)

This issue was labeled "stale-major" 7 days ago and has not received any 
updates so it is being deprioritized. If this ticket is actually Major, please 
raise the priority and ask a committer to assign you the issue or revive the 
public discussion.


> Document precedence rules of Kryo serializer registrations
> ----------------------------------------------------------
>
>                 Key: FLINK-6363
>                 URL: https://issues.apache.org/jira/browse/FLINK-6363
>             Project: Flink
>          Issue Type: Improvement
>          Components: API / Type Serialization System, Documentation
>            Reporter: Tzu-Li (Gordon) Tai
>            Priority: Minor
>              Labels: auto-deprioritized-major, auto-unassigned
>
> Currently, there is no documentation / Javadoc mentioning the precedence 
> rules of Kryo registrations via the register methods in 
> {{StreamExecutionEnvironment}} / {{ExecutionEnvironment}}.
> It is important for the user to be notified of the precedence because the 
> {{KryoSerializer}} applies the configurations in a specific order that is not 
> visible from the public API.
> For example:
> {code}
> env.addDefaultKryoSerializer(SomeClass.class, SerializerA.class);
> env.addDefaultKryoSerializer(SomeClass.class, new SerializerB());
> {code}
> from this API usage, it may seem as if {{SerializerA}} will be used as the 
> default serializer for {{SomeClass}} (or the other way around, depends really 
> on how the user perceives this).
> However, whatever the called order in this example, {{SerializerB}} will 
> always be used because in the case of defining default serializers, due to 
> the ordering that the internal {{KryoSerializer}} applies these 
> configurations, defining default serializer by instance has a higher 
> precedence than defining by class. Since the existence of this precedence is 
> not due to Kryo's behaviour, but due to the applied ordering in 
> {{KryoSerializer}}, users that are familiar with Kryo will be surprised by 
> the unexpected results.
> These methods are also subject to the same issue:
> {code}
> env.registerType(SomeClass.class, SerializerA.class);
> env.registerTypeWithKryoSerializer(SomeClass.class, SerializerA.class);
> env.registerTypeWithKryoSerializer(SomeClass.class, new SerializerB());
> {code}



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

Reply via email to