Hi Sandeep What I understand is that you want to manipulate the state. So I think you could use the old schema to read the state first, and then write it to a new schema, instead of using a new schema to read an old schema format data. In addition, I would like to ask, if you want to do "State Schema Evolution" ? Flink currently supports avro+pojo's schema evolution[1], and you don't need to do this manually.
[1] https://ci.apache.org/projects/flink/flink-docs-master/docs/dev/datastream/fault-tolerance/serialization/schema_evolution/#supported-data-types-for-schema-evolution Best, Guowei On Fri, Jun 25, 2021 at 3:04 AM Sandeep khanzode <sand...@shiftright.ai> wrote: > Hello, > > 1.] Can someone please share a working example of how to read > ValueState<POJO> and MapState<POJO> from a checkpoint and update it? I > tried to assemble a working Java example but there are bit and pieces of > info around. > > 2.] I am using Avro 1.7.7 with Flink for state entities since versions > belong Avro 1.7.7 add a serialVersionUid and then I cannot replace the > class with a new Avro schema seamlessly. If I update the Avro schema, and > the Avro Maven plugin runs, a new class with a new serialVersionUid is > created and that cannot be replaced in the state with the Java exception > stating that local and state copies are different. Any example would be > really appreciated. > > Thanks, > Sandip