You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by ApoorvK <ap...@razorpay.com> on 2019/10/16 14:17:40 UTC

Flink State Migration Version 1.8.2

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/

Re: Flink State Migration Version 1.8.2

Posted by ApoorvK <ap...@razorpay.com>.
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/

Re: Flink State Migration Version 1.8.2

Posted by Paul Lam <pa...@gmail.com>.
Hi,

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

Best,
Paul Lam

> 在 2019年10月17日,21:34,ApoorvK <ap...@razorpay.com> 写道:
> 
> 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/


Re: Flink State Migration Version 1.8.2

Posted by ApoorvK <ap...@razorpay.com>.
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/

Re: Flink State Migration Version 1.8.2

Posted by ApoorvK <ap...@razorpay.com>.
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/

Re: Flink State Migration Version 1.8.2

Posted by miki haiat <mi...@gmail.com>.
Can you try to add the new variables as option ?


On Wed, Oct 16, 2019, 17:17 ApoorvK <ap...@razorpay.com> 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/
>