Skip to content

Commit 4531bad

Browse files
committed
Use a single config.
1 parent d350f2c commit 4531bad

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

python/pyspark/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def __init__(self, master=None, appName=None, sparkHome=None, pyFiles=None,
120120
ValueError:...
121121
"""
122122
if (conf is not None and
123-
conf.get("spark.python.allowSparkContextInExecutors", "true").lower() != "true"):
123+
conf.get("spark.driver.allowSparkContextInExecutors", "true").lower() != "true"):
124124
# In order to prevent SparkContext from being created in executors.
125125
SparkContext._assert_on_driver()
126126

python/pyspark/tests/test_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def test_disallow_to_create_spark_context_in_executors(self):
271271
# SPARK-32160: SparkContext should not created in executors if the config is set.
272272

273273
def create_spark_context():
274-
conf = SparkConf().set("spark.python.allowSparkContextInExecutors", "false")
274+
conf = SparkConf().set("spark.driver.allowSparkContextInExecutors", "false")
275275
with SparkContext(conf=conf):
276276
pass
277277

0 commit comments

Comments
 (0)