Reputation: 21
I have a trait named as Strategy and then I have multiple scala singleton objects implementing this trait. Can we register the trait Strategy with KryoSerializer?
I tried using this but it doesn't work
val conf = new SparkConf()
.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer")
.set("spark.kryo.registrationRequired", "true")
.registerKryoClasses(Array(classOf[Strategy]))
Upvotes: 0
Views: 31