http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/state-schema-evolution-for-case-classes-tp33058p33752.html
Hi Apoorv,
Flink currently does not natively support schema evolution for state types using Scala case classes [1].
So, as Roman has pointed out, there are 2 possible ways for you to do that:
- Implementing a custom serializer that support schema evolution for your specific Scala case classes, as Roman suggested.
- or, using the State Processor API [2] to migrate your case classes offline as a batch job
For your question on how to implement a schema-evolution supporting serializer, can you share with me the problems you have met so far?
Otherwise, if you take a look at the PojoSerializerSnapshot class, that would be a starting point to implement something similar for your case classes.
As you will quickly realize, it's not simple, so I would strongly suggest trying out the approach of using the State Processor API.
Either way, if you bump into any problems, feel free to let me know.
Cheers,
Gordon
[1]
https://issues.apache.org/jira/browse/FLINK-10896[2]
https://ci.apache.org/projects/flink/flink-docs-stable/dev/libs/state_processor_api.html