Does Flink support a way to handle the migration o...
# troubleshooting
r
Does Flink support a way to handle the migration of state for a minor change such as a package name changing? For example, during some refactoring a class was changed from
com.foo.infra
to
com.foo.infra.domain
. Are there any ways to help hint to Flink that this is the same class during the restoration of state?
Copy code
package com.foo.infra.domain

data class MyClass(
    ...
)
I’m thinking something like an alias or hint that could be used? Just trying to see if I can restore without blowing everything away.
👀 1
This could potentially impact multiple classes so I was curious how situations like this are commonly handled? Duplicating the classes to retain both formats? Some type of serialization/mapping? etc.
p
I heard there is a way of doing so. But I’ve never done it before
r
I eventually just reverted the package name to the original one, but it’d be nice if there was a way to hint at serialization via class name. Something like a:
Copy code
config.registerLegacyTypeInfo("com.foo.infra.MyClass", "com.foo.infra.domain.MyClass")
💡 1
p
Indeed