public static void registerKryoClasses ( SparkConf conf ) { List < Class < ? > > classes = Arrays . < Class < ? > > asList ( BooleanWritable . class , ByteWritable . class , DoubleWritable . class , FloatWritable . class , IntWritable . class , LongWritable . class , NullWritable . class , Text . class ) ; conf . registerKryoClasses ( ( Class < ? > [ ] ) classes . toArray ( ) ) ; }
Register the DataVec writable classes for Kryo