GitHub user dawidwys opened a pull request: https://github.com/apache/flink/pull/6059
[Flink-9418] Migrate SharedBuffer to use MapState ## What is the purpose of the change Migrate `SharedBuffer` to `MapState` so to improve memory managment and decrease the amount of data that is deserialized. It is based on #5960. Only the last two commits apply to this change. ## Verifying this change This change is already covered by existing tests. Added a test that checks number of state accesses to keep track if we do not degrade performance in the future. You can merge this pull request into a Git repository by running: $ git pull https://github.com/dawidwys/flink cep-sharedbuffer-reworked Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/6059.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 #6059 ---- commit 849692eec7576264292a8feaf4f127ad6c47601d Author: Aljoscha Krettek <aljoscha.krettek@...> Date: 2018-02-07T12:55:11Z [FLINK-8725] Separate state from NFA in CEP library This also changes the serialization of state to not include the static NFA parts and to also not include any user code. commit 07f588678cf08422eb12d2ab415d9becc9273144 Author: Dawid Wysakowicz <dwysakowicz@...> Date: 2018-05-04T13:41:27Z Reverted backward compatibility with <=1.5 commit d3d11d9d4c474c2ff84183d8db8c77045a7771d9 Author: Dawid Wysakowicz <dwysakowicz@...> Date: 2018-05-16T12:08:13Z [FLINK-9418] Added SharedBuffer v2 commit 515ebba0d90722940e95542a5e9bab8cd9f22939 Author: Dawid Wysakowicz <dwysakowicz@...> Date: 2018-05-23T08:04:37Z [FLINK-9418] Switched to SharedBuffer v2 ---- ---