Reputation: 691
I understand that you create a SparkSession from a SparkConf object but does that mean the SparkSession.conf is the same as SparkConf()?
Upvotes: 0
Views: 279
Reputation: 426
Yes, if (SparkSession.builder.config(conf=SparkConf())
) you create your SparkSessioin with SparkConf object
You can confirm this from PySpark source code
here is the code for SparkSession.conf , which returns self._conf
and if you back track this you can see that it's getting set or created in getOrCreate
method link
In getOrCreate
method you can observe that SparkConf set with options that are passed at the creation time of SparkSession
You can further check that self._options
set with values in config
method link which in our case passing SparkConf object's (key, value)
Upvotes: 2