Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.0.0
-
None
Description
It would be nice to have a method in SparkConf that makes it really easy to turn on Kryo serialization and register a set of classes.
Using Kryo currently requires all this:
import com.esotericsoftware.kryo.Kryo import org.apache.spark.serializer.KryoRegistrator class MyRegistrator extends KryoRegistrator { override def registerClasses(kryo: Kryo) { kryo.register(classOf[MyClass1]) kryo.register(classOf[MyClass2]) } } val conf = new SparkConf().setMaster(...).setAppName(...) conf.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer") conf.set("spark.kryo.registrator", "mypackage.MyRegistrator") val sc = new SparkContext(conf)
It would be nice if it just required this:
SparkConf.setKryo(Array(classOf[MyClass1], classOf[MyClass2]))
Attachments
Issue Links
- is duplicated by
-
SPARK-4164 spark.kryo.registrator shall use comma separated value to support multiple registrator
- Resolved
- links to