Skip to content

Initialization of SparklySession when SparkContext is already exists #66

@kosteev

Description

@kosteev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions