-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-32160][CORE][PYSPARK] Add a config to switch allow/disallow to create SparkContext in executors. #29278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| private[spark] val ALLOW_SPARK_CONTEXT_IN_EXECUTORS = | ||
| ConfigBuilder("spark.driver.allowSparkContextInExecutors") | ||
| .doc("If set to true, SparkContext can be created in executors.") | ||
| .version("3.0.1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll submit another PR with the opposite default value against branch-3.0 when this is good to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I'll add a migration guide later.
|
Test build #126746 has finished for PR 29278 at commit
|
|
Test build #126790 has finished for PR 29278 at commit
|
|
Test build #126792 has finished for PR 29278 at commit
|
|
hmm. A test is still failing in https://github.com/apache/spark/pull/29278/checks?check_run_id=928797731: but I can see the failure in other PRs, e.g., https://github.com/apache/spark/pull/29276/checks?check_run_id=924258317. I'll rerun the tests. |
|
Test build #126812 has finished for PR 29278 at commit
|
|
Test build #126839 has finished for PR 29278 at commit
|
|
Jenkins, retest this please. |
|
GitHub Actiosn build passed. Merged to master. |
|
Test build #126869 has finished for PR 29278 at commit
|
…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 <[email protected]> Signed-off-by: HyukjinKwon <[email protected]>
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @ueshin . Why do we use spark.driver namespace in this new configuration? Can we use spark.executor namespace instead because this is irrelevant to Spark Driver.
spark.driver.allowSparkContextInExecutors
Since this is a configuration namespace issue, cc @cloud-fan and @gatorsmile .
I guess we can change like this simply.
- spark.driver.allowSparkContextInExecutors
+ spark.executor.allowSparkContext
|
@Dooyoung-Hwang The name was inspired by the old config |
|
Thanks, @ueshin . BTW, my name is |
|
Oops, sorry @dongjoon-hyun and @Dooyoung-Hwang. I mistakenly pick up the id from the suggested id list. 🙏 |
|
Actually, what @dongjoon-hyun pointed out makes sense to me. Why don't we just change? |
|
oh the PRs are already open. |
… 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 <[email protected]> Signed-off-by: HyukjinKwon <[email protected]>
…ch allow/disallow SparkContext in executors ### What changes were proposed in this pull request? This is a follow-up of #29278. 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 #29340 from ueshin/issues/SPARK-32160/change_config_name. Authored-by: Takuya UESHIN <[email protected]> Signed-off-by: HyukjinKwon <[email protected]>
What changes were proposed in this pull request?
This is a follow-up of #28986.
This PR adds a config to switch allow/disallow to create
SparkContextin executors.spark.driver.allowSparkContextInExecutorsWhy are the changes needed?
Some users or libraries actually create
SparkContextin executors.We shouldn't break their workloads.
Does this PR introduce any user-facing change?
Yes, users will be able to create
SparkContextin executors with the config enabled.How was this patch tested?
More tests are added.