Hi Shannon,

Thanks a lot for providing the example, it was very helpful in reproducing the 
problem.

I think this is actually a Kryo bug, that was just recently fixed: 
https://github.com/EsotericSoftware/kryo/pull/483
It will be available in Kryo 4.0.1, which unfortunately doesn’t seem to be 
released yet.

The problem is that when Kryo defaults to Java serialization for the exception 
instance, the `ObjectInputStream` used to read the object does not correctly 
use Kryo’s configured class loader (i.e., the user code class loader). That’s 
why it's complaining that the class cannot be found.

We can “workaround” this by registering our own `JavaSerializer` as the 
serializer for Throwables in Kryo, but I’m not sure if we should actually do 
this, or just wait for the Kryo fix to be released.

- Gordon


On March 11, 2017 at 9:54:03 AM, Shannon Carey (sca...@expedia.com) wrote:

Here ya go (see attached).


From: Robert Metzger <rmetz...@apache.org>
Date: Friday, March 10, 2017 at 1:18 PM
To: "user@flink.apache.org" <user@flink.apache.org>
Subject: Re: AWS exception serialization problem

Can one of you guys provide us with a minimal example to reproduce the issue? 
(Ideally locally, not using EMR?)
I think once we can reproduce the issue its easy to fix.

On Thu, Mar 9, 2017 at 1:24 AM, Bruno Aranda <brunoara...@gmail.com> wrote:
Hi Stephan, we are running Flink 1.2.0 on Yarn (AWS EMR cluster)


On Wed, 8 Mar 2017, 21:41 Stephan Ewen, <se...@apache.org> wrote:
@Bruno: How are you running Flink? On yarn, standalone, mesos, docker?

On Wed, Mar 8, 2017 at 2:13 PM, Bruno Aranda <brunoara...@gmail.com> wrote:
Hi,

We have seen something similar in Flink 1.2. We have an operation that parses 
some JSON, and when it fails to parse it, we can see the ClassNotFoundException 
for the relevant exception (in our case JsResultException from the play-json 
library). The library is indeed in the shaded JAR, otherwise we would not be 
able to parse the JSON.

Cheers,

Bruno

On Wed, 8 Mar 2017 at 12:57 Tzu-Li (Gordon) Tai <tzuli...@apache.org> wrote:
Hi Shannon,

Just to clarify:

From the error trace, it seems like that the messages fetched from Kafka are 
serialized `AmazonS3Exception`s, and you’re emitting a stream of 
`AmazonS3Exception` as records from FlinkKafkaConsumer?
Is this correct? If so, I think we should just make sure that the 
`com.amazonaws.services.s3.model.AmazonS3Exception` class exists in the user 
fat jar.

Also, what is the Flink version you are using?

Cheers,
Gordon


Reply via email to