When I use spark streaming and kafka integration with kafka broker version 0.10.1
ConsumerRecord does not implement serialization, when performing operations that require serialization, ie persist or window, print. You need to add the below config to avoid the error.
sparkConf.set("spark.serializer","org.apache.spark.serializer.KryoSerialize");
sparkConf.registerKryoClasses((Class[] )Arrays.asList(ConsumerRecord.class).toArray());