Re: intermittent Kryo serialization failures in Spark

2019-09-25 Thread Jerry Vinokurov
Hi Julien, Thanks for the suggestion. If we don't do a broadcast, that would presumably affect the performance of the job, as the model that is failing to be broadcast is something that we need to be shared across the cluster. But it may be worth it if the trade-off is not having things run

Re: intermittent Kryo serialization failures in Spark

2019-09-20 Thread Julien Laurenceau
Hi, Did you try without the broadcast ? Regards JL Le jeu. 19 sept. 2019 à 06:41, Vadim Semenov a écrit : > Pre-register your classes: > > ``` > import com.esotericsoftware.kryo.Kryo > import org.apache.spark.serializer.KryoRegistrator > > class MyKryoRegistrator extends KryoRegistrator { >

Re: intermittent Kryo serialization failures in Spark

2019-09-18 Thread Vadim Semenov
I remember it not working for us when we were setting it from the inside and needed to actually pass it On Wed, Sep 18, 2019 at 10:38 AM Jerry Vinokurov wrote: > Hi Vadim, > > Thanks for your suggestion. We do preregister the classes, like so: > > object KryoRegistrar { >> >> val

Re: intermittent Kryo serialization failures in Spark

2019-09-18 Thread Jerry Vinokurov
Hi Vadim, Thanks for your suggestion. We do preregister the classes, like so: object KryoRegistrar { > > val classesToRegister: Array[Class[_]] = Array( > classOf[MyModel], >[etc] > ) } > And then we do: val sparkConf = new SparkConf() >

Re: intermittent Kryo serialization failures in Spark

2019-09-17 Thread Vadim Semenov
Pre-register your classes: ``` import com.esotericsoftware.kryo.Kryo import org.apache.spark.serializer.KryoRegistrator class MyKryoRegistrator extends KryoRegistrator { override def registerClasses(kryo: Kryo): Unit = { kryo.register(Class.forName("[[B")) // byte[][]

Re: intermittent Kryo serialization failures in Spark

2019-09-17 Thread Jerry Vinokurov
Hi folks, Posted this some time ago but the problem continues to bedevil us. I'm including a (slightly edited) stack trace that results from this error. If anyone can shed any light on what exactly is happening here and what we can do to avoid it, that would be much appreciated.

intermittent Kryo serialization failures in Spark

2019-07-10 Thread Jerry Vinokurov
Hi all, I am experiencing a strange intermittent failure of my Spark job that results from serialization issues in Kryo. Here is the stack trace: Caused by: java.lang.ClassNotFoundException: com.mycompany.models.MyModel > at java.net.URLClassLoader.findClass(URLClassLoader.java:382) >