pyspark.SparkContext.getOrCreate

classmethod SparkContext.getOrCreate(conf=None)[source]

Get or instantiate a SparkContext and register it as a singleton object.

Parameters
confpyspark.SparkConf, optional