flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Till Rohrmann <trohrm...@apache.org>
Subject Re: Pass not serializable objects to Flink transformation functions
Date Mon, 27 Jul 2015 08:30:34 GMT
Hi Flavio,

for the user code logic Flink uses exclusively Java serialization. What you
can do, though, is to override the readObject and writeObject methods which
are used by Java serialization. Within the methods you can serialize the
other object you’re referencing.


On Mon, Jul 27, 2015 at 10:05 AM, Flavio Pompermaier <pompermaier@okkam.it>

> Hi to all,
> in my Flink job I initialize some java object that doesn't implement
> serializable to use it within some Flink function (i.e. map or flatMap). At
> the moment the only way to achieve that is to keep those operators as
> private classes in the main one and reference to static fields or implement
> them as inner classes and reference to final parameters of the containing
> function.
> Is there any way to move those classes to a normal class at the moment
> (e.g. forcing kryo serialization)?
> Best,
> Flavio

View raw message