Hello friends. I recently noticed that one of our ...
# troubleshooting
j
Hello friends. I recently noticed that one of our state classes was falling back to kryo serialization. This was because it is using a java
Map
as one of the fields and flink is unable to derive the types. To resolve the issue, I defined a
TypeInfoFactory
and annotated the class
@TypeInfo(classOf[MyNewTypeInfoFactory])
. Unit tests confirmed that the class would now appropriately use the
PojoSerializer
. However, when I test deploying and loading from a snapshot, I receive the error:
The new state serializer must not be incompatible with the old state serializer.
Does anyone have suggestions regarding how to debug why the serializers are incompatible? None of the underlying data structures have been modified. Is it possible to write a unit test for this kind of thing?
d
j
Thanks friend. Reading through this now.
Makes sense. Based on that link, we'll have to run a state migration. Thanks again for sharing @David Anderson
Finished the migration and everything is looking good. One thing that stands out is that the checkpoints are smaller now that we're using the POJO serializer. I assume it has to store less metadata than the kryo serializer, so maybe that's expected?
d
Happy to hear you got it working! The Kryo serializer can be rather verbose, especially if you haven't registered your types.