Re: Providing Custom Serializer for Generic Type

2019-07-05 Thread Andrea Spina
Hi Gordon, thank you. The involved data structure is a complex abstraction owning a schema and values, it declares private fields which should not be edited directly from users. I'd say it's really akin to an Avro GenericRecord. How would you approach the problem if you have to

Re: Providing Custom Serializer for Generic Type

2019-07-04 Thread Tzu-Li (Gordon) Tai
Hi Andrea, Is there a specific reason you want to use a custom TypeInformation / TypeSerializer for your type? >From the description in the original post, this part wasn't clear to me. If the only reason is because it is generally suggested to avoid generic type serialization via Kryo, both for

Re: Providing Custom Serializer for Generic Type

2019-07-04 Thread Andrea Spina
Hi JingsongLee, thank you for your answer. I wanted to explore it as the last chance honestly. Anyway if defining custom serializers and types information involves quite a big effort, I would reconsider my guess. Cheers, Il giorno gio 4 lug 2019 alle ore 08:46 JingsongLee ha scritto: > Hi

Re: Providing Custom Serializer for Generic Type

2019-07-04 Thread JingsongLee
Hi Andrea: Why not make your MyClass POJO? [1] If it is a POJO, then flink will use PojoTypeInfo and PojoSerializer that have a good implementation already. [1] https://ci.apache.org/projects/flink/flink-docs-release-1.8/dev/types_serialization.html#rules-for-pojo-types Best, JingsongLee

Providing Custom Serializer for Generic Type

2019-07-04 Thread Andrea Spina
Dear community, in my job, I run with a custom event type *MyClass* which is a sort of "generic event" that I handle all along my streaming flow both as an event (DataStream[MyClass]) and as a managed state. I see that Flink warns me about generic serialization of *MyClass* INFO [run-main-0]