Skip to content

[SPARK-32160][CORE][PYSPARK][3.0] Add a config to switch allow/disallow to create SparkContext in executors. - #29294

Closed
ueshin wants to merge 2 commits into
apache:branch-3.0from
ueshin:issues/SPARK-32160/3.0/add_configs
Closed

[SPARK-32160][CORE][PYSPARK][3.0] Add a config to switch allow/disallow to create SparkContext in executors.#29294
ueshin wants to merge 2 commits into
apache:branch-3.0from
ueshin:issues/SPARK-32160/3.0/add_configs

Conversation

@ueshin

@ueshinueshin commented Jul 29, 2020

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

This is a backport of #29278, but with allowing to create SparkContext in executors by default.

This PR adds a config to switch allow/disallow to create SparkContext in executors.

  • spark.driver.allowSparkContextInExecutors

Why are the changes needed?

Some users or libraries actually create SparkContext in executors.
We shouldn't break their workloads.

Does this PR introduce any user-facing change?

Yes, users will be able to disallow to create SparkContext in executors with the config disabled.

How was this patch tested?

More tests are added.

@SparkQA

Copy link
Copy Markdown

Test build #126794 has finished for PR 29294 at commit d350f2c.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@ueshinueshin changed the title [SPARK-32160][CORE][PYSPARK][3.0] Add configs to switch allow/disallow to create SparkContext in executors.[SPARK-32160][CORE][PYSPARK][3.0] Add a config to switch allow/disallow to create SparkContext in executors.Jul 30, 2020
@SparkQA

Copy link
Copy Markdown

Test build #126809 has finished for PR 29294 at commit 4531bad.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@ueshin

Copy link
Copy Markdown
MemberAuthor

Jenkins, retest this please.

@SparkQA

Copy link
Copy Markdown

Test build #126833 has finished for PR 29294 at commit 4531bad.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@ueshin

Copy link
Copy Markdown
MemberAuthor

Jenkins, retest this please.

@SparkQA

Copy link
Copy Markdown

Test build #126861 has finished for PR 29294 at commit 4531bad.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon

Copy link
Copy Markdown
Member

retest this please

1 similar comment
@HyukjinKwon

Copy link
Copy Markdown
Member

retest this please

@SparkQA

Copy link
Copy Markdown

Test build #126885 has finished for PR 29294 at commit 4531bad.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon

Copy link
Copy Markdown
Member

Merged to branch-3.0.

HyukjinKwon pushed a commit that referenced this pull request Aug 3, 2020
…ow to create SparkContext in executors
### What changes were proposed in this pull request?
This is a backport of #29278, but with allowing to create `SparkContext` in executors by default.
This PR adds a config to switch allow/disallow to create `SparkContext` in executors.
- `spark.driver.allowSparkContextInExecutors`
### Why are the changes needed?
Some users or libraries actually create `SparkContext` in executors.
We shouldn't break their workloads.
### Does this PR introduce _any_ user-facing change?
Yes, users will be able to disallow to create `SparkContext` in executors with the config disabled.
### How was this patch tested?
More tests are added.
Closes#29294 from ueshin/issues/SPARK-32160/3.0/add_configs.
Authored-by: Takuya UESHIN <ueshin@databricks.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
@dongjoon-hyun

Copy link
Copy Markdown
Member

For the configuration namespace, I have a question about that. Please see the original PR.
#29278 (review)

@HyukjinKwon

Copy link
Copy Markdown
Member

Yeah, it makes sense. Thanks for pointing that out.

HyukjinKwon pushed a commit that referenced this pull request Aug 4, 2020
… switch allow/disallow SparkContext in executors
### What changes were proposed in this pull request?
This is a follow-up of #29294.
This PR changes the config name to switch allow/disallow `SparkContext` in executors as per the comment #29278 (review).
### Why are the changes needed?
The config name `spark.executor.allowSparkContext` is more reasonable.
### Does this PR introduce _any_ user-facing change?
Yes, the config name is changed.
### How was this patch tested?
Updated tests.
Closes#29341 from ueshin/issues/SPARK-32160/3.0/change_config_name.
Authored-by: Takuya UESHIN <ueshin@databricks.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
@ueshin
ueshin deleted the issues/SPARK-32160/3.0/add_configs branch August 3, 2026 22:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@ueshin@SparkQA@HyukjinKwon@dongjoon-hyun