In spark I want to save RDD objects to hive table. I am trying to use createDataFrame but that is throwing
Exception in thread "main" java.lang.NullPointerException
val products=sc.parallelize(evaluatedProducts.toList);
//here products are RDD[Product]
val productdf = hiveContext.createDataFrame(products, classOf[Product])
I am using Spark 1.5 version.