Flink State Migration Version 1.8.2

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Flink State Migration Version 1.8.2

ApoorvK
I have been trying to alter the current state case class (scala) which has
250 variables, now when I add 10 more variables to the class, and when I run
my flink application from the save point taken before(Some of the variables
are object which are also maintained as state). It fails to migrate the
state  error : "The new state typeSerializer for operator state must not be
incompatible. "

Please suggest what I can do to avoid that error



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Flink State Migration Version 1.8.2

miki haiat
Can you try to add the new variables as option ?


On Wed, Oct 16, 2019, 17:17 ApoorvK <[hidden email]> wrote:
I have been trying to alter the current state case class (scala) which has
250 variables, now when I add 10 more variables to the class, and when I run
my flink application from the save point taken before(Some of the variables
are object which are also maintained as state). It fails to migrate the
state  error : "The new state typeSerializer for operator state must not be
incompatible. "

Please suggest what I can do to avoid that error



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Flink State Migration Version 1.8.2

ApoorvK
Yes, I have tried giving it as option, also the case class has default
constructor (this) still unable to migrate



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Flink State Migration Version 1.8.2

ApoorvK
It is throwing below error ,
the class I am adding variables have other variable as an object of class
which are also in state.

Caused by: org.apache.flink.util.StateMigrationException: The new state
typeSerializer for operator state must not be incompatible.
        at
org.apache.flink.runtime.state.DefaultOperatorStateBackend.getListState(DefaultOperatorStateBackend.java:323)
        at
org.apache.flink.runtime.state.DefaultOperatorStateBackend.getListState(DefaultOperatorStateBackend.java:214)
        at
org.apache.flink.streaming.api.operators.async.AsyncWaitOperator.initializeState(AsyncWaitOperator.java:268)
        at
org.apache.flink.streaming.api.operators.AbstractStreamOperator.initializeState(AbstractStreamOperator.java:278)
        at
org.apache.flink.streaming.runtime.tasks.StreamTask.initializeState(StreamTask.java:740)
        at
org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:291)
        at org.apache.flink.runtime.taskmanager.Task.run(Task.java:711)
        at java.lang.Thread.run(Thread.java:748)



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Flink State Migration Version 1.8.2

Paul Lam
Hi,

Could you confirm that you’re using POJOSerializer before and after migration? 

Best,
Paul Lam

在 2019年10月17日,21:34,ApoorvK <[hidden email]> 写道:

It is throwing below error ,
the class I am adding variables have other variable as an object of class
which are also in state.

Caused by: org.apache.flink.util.StateMigrationException: The new state
typeSerializer for operator state must not be incompatible.
at
org.apache.flink.runtime.state.DefaultOperatorStateBackend.getListState(DefaultOperatorStateBackend.java:323)
at
org.apache.flink.runtime.state.DefaultOperatorStateBackend.getListState(DefaultOperatorStateBackend.java:214)
at
org.apache.flink.streaming.api.operators.async.AsyncWaitOperator.initializeState(AsyncWaitOperator.java:268)
at
org.apache.flink.streaming.api.operators.AbstractStreamOperator.initializeState(AbstractStreamOperator.java:278)
at
org.apache.flink.streaming.runtime.tasks.StreamTask.initializeState(StreamTask.java:740)
at
org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:291)
at org.apache.flink.runtime.taskmanager.Task.run(Task.java:711)
at java.lang.Thread.run(Thread.java:748)



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Flink State Migration Version 1.8.2

ApoorvK
I am not using any custom serialisation, but pojo is composite type, the pojo
I am trying to modify has variables which are other pojo defined by me, is
ther any example for TypeSerialization for this kind please share



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/