I have an issue with initialization of SparklySession instance.
The problem is that, by the time I want to create SparklySession instance SparkContext is already initialized by other service and just calling SparklySession constructor fails on the line spark_context = SparkContext() (due to trying create multiple SparkContext's).
To give more context on the issue here is the link https://docs.databricks.com/user-guide/jobs.html#use-the-shared-sparkcontext
Is there any advices on how to address this issue? I would like to be able using features of SparklySession along with SparklyTest.
I would probably think about having SparkContext().getOrCreate() inside of SparklySession constructor. Or as an optional spark_context parameter which if defined, SparkContext do not have to be initialized.
I have an issue with initialization of
SparklySessioninstance.The problem is that, by the time I want to create
SparklySessioninstanceSparkContextis already initialized by other service and just callingSparklySessionconstructor fails on the linespark_context = SparkContext()(due to trying create multiple SparkContext's).To give more context on the issue here is the link https://docs.databricks.com/user-guide/jobs.html#use-the-shared-sparkcontext
Is there any advices on how to address this issue? I would like to be able using features of
SparklySessionalong withSparklyTest.I would probably think about having
SparkContext().getOrCreate()inside ofSparklySessionconstructor. Or as an optionalspark_contextparameter which if defined,SparkContextdo not have to be initialized.