[ 
https://issues.apache.org/jira/browse/FLINK-1390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Metzger resolved FLINK-1390.
-----------------------------------
    Resolution: Invalid
      Assignee: Robert Metzger

The issue wasn't an issue in Flink itself.

The user was doing serialization copies using the AvroSerializer, which is (if 
instantiated with the Schema instead of the class) caching the classes in a map 
with String-keys.
When running a job a second time, the same class will be loaded by a different 
classloader and java will fail with an ClassCastException.

Changing the creation of Avro's ReflectDatumWriter from Schema to class 
resolved the issue.

>  java.lang.ClassCastException: X cannot be cast to X
> ----------------------------------------------------
>
>                 Key: FLINK-1390
>                 URL: https://issues.apache.org/jira/browse/FLINK-1390
>             Project: Flink
>          Issue Type: Bug
>          Components: YARN Client
>    Affects Versions: 0.8.0
>            Reporter: Robert Metzger
>            Assignee: Robert Metzger
>
> A user is affected by an issue, which is probably caused by different 
> classloaders being used for loading user classes.
> Current state of investigation:
> - the error happens in yarn sessions (there is only a YARN environment 
> available)
> - the error doesn't happen on the first time the job is being executed. It 
> only happens on subsequent executions.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to