Returns the SQLContext singleton, or throws an exception if Spark was not initialized.
Returns the SQLContext singleton, or throws an exception if Spark was not initialized.
IllegalStateException
if Spark was not already initialized
Returns the SparkContext singleton, or throws an exception if Spark was not initialized.
Returns the SparkContext singleton, or throws an exception if Spark was not initialized.
IllegalStateException
if Spark was not already initialized
Returns the SparkSession singleton, or throws an exception if Spark was not initialized.
Returns the SparkSession singleton, or throws an exception if Spark was not initialized.
IllegalStateException
if Spark was not already initialized
Try to initialize the SparkSession in the SparkSingleton with the provided configuration.
Try to initialize the SparkSession in the SparkSingleton with the provided configuration.
If it does not exist, it will be created using the settings from
sparkConfigModel
and true will be returned.
If the SparkSession already exists, nothing will be done, and false will be returned.
IllegalStateException
if Spark was already initialized but not by using this method
Singletons an initialization code related to Spark.
While Spark provides various getOrCreate methods, this allows WASP to initialize Spark in a cleaner way and in just a few places and access the various entry points in a much more straightforward way.