Tzu-Li (Gordon) Tai created FLINK-11917:
-------------------------------------------
Summary: Allow state schema migration from Kryo to POJO / Avro
Key: FLINK-11917
URL:
https://issues.apache.org/jira/browse/FLINK-11917 Project: Flink
Issue Type: Improvement
Components: API / Type Serialization System
Reporter: Tzu-Li (Gordon) Tai
In Flink, it has been commonly advertised that users should try to avoid Kryo for state serialization since it doesn't work out-of-the-box well for schema evolution stories. Kryo, in the first place, wasn't designed with that in mind.
In light of this, Flink should provide a migration path for state that were default to be serialized by the {{KryoSerializer}} to other serializers that now support better schema evolution capabilities, such as {{PojoSerializer}} and {{AvroSerializer}}.
Essentially, what this means is that in the {{KryoSerializerSnapshot}} class's {{resolveSchemaCompatibility}} method, we identify if the new serializer is either {{PojoSerializer}} or {{AvroSerializer}}; if so, we return {{TypeSerializerSchemaCompatibility.compatibleAfterMigration()}} as the result.
For the user, this would allow them to simply upgrade their state types to be Avro-generated {{SpecificRecord}} or a qualified POJO.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)