SparkContext.GetOrCreate(SparkConf) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This function may be used to get or instantiate a SparkContext and register it as a singleton object. Because we can only have one active SparkContext per JVM, this is useful when applications may wish to share a SparkContext.
public static Microsoft.Spark.SparkContext GetOrCreate (Microsoft.Spark.SparkConf conf);
static member GetOrCreate : Microsoft.Spark.SparkConf -> Microsoft.Spark.SparkContext
Public Shared Function GetOrCreate (conf As SparkConf) As SparkContext
Parameters
Returns
Current SparkContext (or a new one if it wasn't created before the function call)