Re: ClassCastException when redeploying Flink job on running cluster

2016-06-09 Thread Till Rohrmann
Great to hear :-) On Wed, Jun 8, 2016 at 7:45 PM, Josh wrote: > Thanks Till, your suggestion worked! > > I actually just created a new SpecificData for each > AvroDeserializationSchema instance, so I think it's still just as efficient. > > Josh > > On Wed, Jun 8, 2016 at 4:41

Re: ClassCastException when redeploying Flink job on running cluster

2016-06-08 Thread Josh
Thanks Till, your suggestion worked! I actually just created a new SpecificData for each AvroDeserializationSchema instance, so I think it's still just as efficient. Josh On Wed, Jun 8, 2016 at 4:41 PM, Till Rohrmann wrote: > The only thing I could think of is to not use

Re: ClassCastException when redeploying Flink job on running cluster

2016-06-08 Thread Till Rohrmann
The only thing I could think of is to not use the SpecificData singleton but instead creating a new SpecificData object for each SpecificDatumReader (you can pass it as a third argument to the constructor). This, of course, is not really efficient. But you could try it out to see whether it solves

Re: ClassCastException when redeploying Flink job on running cluster

2016-06-08 Thread Josh
Sorry - I forgot to include my stack trace too. Here it is: The program finished with the following exception: org.apache.flink.client.program.ProgramInvocationException: The program execution failed: Job execution failed. at org.apache.flink.client.program.Client.runBlocking(Client.java:381) at

Re: ClassCastException when redeploying Flink job on running cluster

2016-06-08 Thread Josh
Hi Till, Thanks for the reply! I see - yes it does sound very much like FLINK-1390. Please see my AvroDeserializationSchema implementation here: http://pastebin.com/mK7SfBQ8 I think perhaps the problem is caused by this line: val readerSchema =

Re: ClassCastException when redeploying Flink job on running cluster

2016-06-08 Thread Till Rohrmann
Hi Josh, the error message you've posted usually indicates that there is a class loader issue. When you first run your program the class com.me.avro.MyAvroType will be first loaded (by the user code class loader). I suspect that this class is now somewhere cached (e.g. the avro serializer) and

ClassCastException when redeploying Flink job on running cluster

2016-06-08 Thread Josh
Hi all, Currently I have to relaunch my Flink cluster every time I want to upgrade/redeploy my Flink job, because otherwise I get a ClassCastException: java.lang.ClassCastException: com.me.avro.MyAvroType cannot be cast to com.me.avro.MyAvroType It's related to MyAvroType which is an class