You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Stephan Ewen (JIRA)" <ji...@apache.org> on 2018/03/22 15:25:00 UTC

[jira] [Resolved] (FLINK-9034) State Descriptors drop TypeInformation on serialization

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

Stephan Ewen resolved FLINK-9034.
---------------------------------
       Resolution: Fixed
    Fix Version/s:     (was: 1.6.0)
                   1.5.0

Fixed in
  - 1.5.0 via 586eb10084f56524f0bf14fb90c16e696b6a941f
  - 1.6.0 via 87d31f5cf76fa796b89201ed8c55890e7d36fc81

> State Descriptors drop TypeInformation on serialization
> -------------------------------------------------------
>
>                 Key: FLINK-9034
>                 URL: https://issues.apache.org/jira/browse/FLINK-9034
>             Project: Flink
>          Issue Type: Bug
>          Components: State Backends, Checkpointing
>    Affects Versions: 1.5.0, 1.4.2
>            Reporter: Stephan Ewen
>            Assignee: Stephan Ewen
>            Priority: Major
>             Fix For: 1.5.0
>
>
> The following code currently causes problems
> {code}
> public class MyFunction extends RichMapFunction<A, B>  {
>     private final ValueStateDescriptor<MyType> descr = new ValueStateDescriptor<>("state name", MyType.class);
>     private ValueState<MyType> state;
>     @Override
>     public void open() {
>         state = getRuntimeContext().getValueState(descr);
>     }
> }
> {code}
> The problem is that the state descriptor drops the type information and creates a serializer before serialization as part of shipping the function in the cluster. To do that, it initializes the serializer with an empty execution config, making serialization inconsistent.
> This is mainly an artifact from the days when dropping the type information before shipping was necessary, because the type info was not serializable. It now is, and we can fix that bug.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)