flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Ewen <se...@apache.org>
Subject Re: Guava immutable collection kryo serialization
Date Thu, 21 Jul 2016 08:59:47 GMT
Hi!

Custom Kryo Serializers can be shipped either as objects (must be
serializable) or as classes (can be non serializable, must have a default
constructor).

For non-serializable serializers, try to use: ExecutionConfig.
registerTypeWithKryoSerializer(Class<?> type, Class<? extends Serializer<?>>
serializerClass)

Stephan


On Thu, Jul 21, 2016 at 10:36 AM, Stefan Richter <
s.richter@data-artisans.com> wrote:

> Hi,
>
> to answer this question, it would be helpful if you could provide the
> stacktrace of your exception and the code you use to register the
> serializer.
>
> Best,
> Stefan
>
> Am 21.07.2016 um 05:28 schrieb Shaosu Liu <shu@uber.com>:
>
>
> Hi,
>
> How do I do Guava Immutable collections serialization in Flink?
>
> I am getting error
>
> Caused by: java.io.NotSerializableException:
> de.javakaffee.kryoserializers.guava.ImmutableMapSerializer
>
> when I register ImmutableMap to be serialized by the
> ImmutableMapSerializer. I am using the latest version of 0.38.
>
> --
> Cheers,
> Shaosu
>
>
>

Mime
View raw message