Accept Avro object in ListCheckpointed interface

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Accept Avro object in ListCheckpointed interface

Kien Truong
Hi,

ListCheckpointed only accept Serializable object at the moment, which make it cumbersome to checkpoint avro objects (have to convert them to byte arrays first). Is there any plan to support avro object directly?

Best regards,
Kien
Reply | Threaded
Open this post in threaded view
|

Re: Accept Avro object in ListCheckpointed interface

Stefan Richter
Hi,

ListCheckpointed is just a simplified/shortcut version of the more powerful interface CheckpointedFunction. If Serializable does not cover your use case, I suggest you to go with CheckpointedFunction and create your states in initialize(…) via the initializationContext.getOperatorStateStore().getListState(…). You can pass in type serializers (e.g. Avro) via the state descriptor. Hope this helps.

Best,
Stefan

> Am 21.07.2017 um 09:53 schrieb Kien Truong <[hidden email]>:
>
> Hi,
>
> ListCheckpointed only accept Serializable object at the moment, which make it cumbersome to checkpoint avro objects (have to convert them to byte arrays first). Is there any plan to support avro object directly?
>
> Best regards,
> Kien