GitHub user kl0u opened a pull request: https://github.com/apache/flink/pull/5910
[FLINK-8841] [state] Remove HashMapSerializer and use MapSerializer instead. ## What is the purpose of the change So far we had the `MapSerializer` and the `HashMapSerializer`. The two had almost identical code and the second was only used on the `HeapStateBackend`/`FSStateBackend` when creating a `MapState`. This PR removes the `HashMapSerializer` and replaces its uses with the `MapSerializer`. It also guarantees backwards compatibility. ## Brief change log It introduces the `MigrationUtil` as an inner class of the `InstantiationUtil`. This class contains mapping between deprecated/deleted serializers and their replacements. Also the removal of the `HashMapSerializer` uniformizes a bit the `HeapMapState` and the `RocksDBMapState`. ## Verifying this change Added the `HeapKeyedStateBackendSnapshotMigrationTest#testMapStateMigrationAfterHashMapSerRemoval()`. ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): no - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no - The serializers: yes - The runtime per-record code paths (performance sensitive): no - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: no - The S3 file system connector: no ## Documentation - Does this pull request introduce a new feature? no - If yes, how is the feature documented? not applicable R @StefanRRichter or @aljoscha You can merge this pull request into a Git repository by running: $ git pull https://github.com/kl0u/flink map-serializer-inv Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/5910.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #5910 ---- commit 7de83de4765384080cea6d94b64a81e1584ce82e Author: kkloudas <kkloudas@...> Date: 2018-04-24T12:48:34Z [FLINK-8841] Remove HashMapSerializer and use MapSerializer instead. ---- ---