If I upgrade my flink job, and add a field in "MyObject" class. Will the restore fail? If so, how to handle such scenarios? Should I convert the "MyObject" instance in json and store the string?
Jayant Ameta On Wed, Nov 28, 2018 at 1:26 PM bupt_ljy <bupt_...@163.com> wrote: > Hi Jayant, > > If you change the “MyObject” class and influence the serialized value, > then the “MyObject” instance can’t be deserialized when restoring, which > causes a failure of restoring. You can just use the default > serialVersionUID instead defining it explicitly(it makes no difference if > you do it). > > > Best, > > Jiayi Liao > > Original Message > *Sender:* Jayant Ameta<wittyam...@gmail.com> > *Recipient:* bupt_ljy<bupt_...@163.com> > *Cc:* user<user@flink.apache.org> > *Date:* Wednesday, Nov 28, 2018 15:46 > *Subject:* Re: Flink operator UUID and serialVersionUID > > Thanks for clarifying Jiayi. > If there is a change in "MyObject" class, would it help to have a > serialVersionUID defined? > > Thanks, > Jayant > > > On Wed, Nov 28, 2018 at 12:52 PM bupt_ljy <bupt_...@163.com> wrote: > >> Hi, Jayant >> >> 1. The uuid is an unique identifier for a specific operator, which >> means that Flink uses the uuid to recognize the operator when restoring. >> >> 2. The operator has already implemented the Serializable interface so >> you don’t need to do it explicitly. >> >> 3. The type information of “MyObject” should be defined in the >> MapStateDescriptor, so no need to worry about it. >> >> >> Best, >> >> Jiayi Liao >> >> Original Message >> *Sender:* Jayant Ameta<wittyam...@gmail.com> >> *Recipient:* user<user@flink.apache.org> >> *Date:* Wednesday, Nov 28, 2018 15:09 >> *Subject:* Flink operator UUID and serialVersionUID >> >> Hi all, I've a few questions regarding serial version: >> >> 1. The production ready checklist mentions using uuids >> <https://ci.apache.org/projects/flink/flink-docs-release-1.6/ops/production_ready.html#set-uuids-for-operators> >> for >> operators. How is it different from setting a serialVersionUID on an >> operator? >> >> 2. Which operators need to have a serialVersionUID present (or implement >> Serializable interface)? >> >> 3. If I have a MapState<String, MyObject>, does MyObject need to have a >> serialVersionUID and does it need to implement Serializable interface? >> >> Thanks, >> Jayant >> >