eddard.stark eddard.stark - 1 year ago 153
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?

Answer Source

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

getOrCreate(SparkContext sparkContext)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download