eddard.stark eddard.stark - 11 months ago 100
Java Question

How to use the method getOrCreate of SparkContext class in spark-core version 1.6.0?

I am using the SparkContext class in spark-core library version 1.6.0. There is no getOrCreate method in the class. But it was in 1.5.0 version. How can I still use the method?


It is the method of SQLContext not of SparkContext and is still available in 1.6.0 version.

getOrCreate(SparkContext sparkContext)