pyspark.SparkContext.getOrCreate [Deprecated]

classmethod SparkContext.getOrCreate(conf: Optional[pyspark.conf.SparkConf] = None) → pyspark.context.SparkContext

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

Note: This class is deprecated in 3.0.0. Use pyspark.sql.SparkSession.builder.getOrCreate() instead.

Parameters
confpyspark.SparkConf, optional