Github user yuqi1129 commented on a diff in the pull request: https://github.com/apache/flink/pull/5910#discussion_r184044453 --- Diff: flink-core/src/main/java/org/apache/flink/util/InstantiationUtil.java --- @@ -221,6 +226,52 @@ protected ObjectStreamClass readClassDescriptor() throws IOException, ClassNotFo } } + /** + * A mapping between the full path of a deprecated serializer and its equivalent. + * These mappings are hardcoded and fixed. + * + * <p>IMPORTANT: mappings can be removed after 1 release as there will be a "migration path". + * As an example, a serializer is removed in 1.5-SNAPSHOT, then the mapping should be added for 1.5, + * and it can be removed in 1.6, as the path would be Flink-{< 1.5} -> Flink-1.5 -> Flink-{>= 1.6}. + */ + private enum MigrationUtil { + + // To add a new mapping just pick a name and add an entry as the following: + + GENERIC_DATA_ARRAY_SERIALIZER( + "org.apache.avro.generic.GenericData$Array", + ObjectStreamClass.lookup(KryoRegistrationSerializerConfigSnapshot.DummyRegisteredClass.class)), + HASH_MAP_SERIALIZER( + "org.apache.flink.runtime.state.HashMapSerializer", + ObjectStreamClass.lookup(MapSerializer.class)); // added in 1.5 + + /** An internal unmoddifiable map containing the mappings between deprecated and new serialzers. */ --- End diff -- `unmoddifiable`, `serialzers ` spelling mistake
---