General solution for state/schema migration is under development and it might be released with Flink 1.6.0.
Before that, you need to manually handle the state migration in your operator’s open method. Lets assume that your OperatorV1 has a state field “stateV1”. Your OperatorV2 defines field “stateV2”, which is incompatible with previous version. What you can do, is to add a logic in open method, to check:
1. If “stateV2” is non empty, do nothing
2. If there is no “stateV2”, iterate over all of the keys and manually migrate “stateV1” to “stateV2”
In your OperatorV3 you could drop the support for “stateV1”.
I have once implemented something like that here:
Hope that helps!