Skip to content

Conversation

@ericl
Copy link
Contributor

@ericl ericl commented May 25, 2016

What changes were proposed in this pull request?

This fixes the python SparkSession builder to allow setting confs correctly. This was a leftover TODO from #13200.

How was this patch tested?

Python doc tests.

cc @andrewor14

@SparkQA
Copy link

SparkQA commented May 25, 2016

Test build #59247 has finished for PR 13289 at commit 636e5a6.

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

@SparkQA
Copy link

SparkQA commented May 25, 2016

Test build #59248 has finished for PR 13289 at commit d972a4a.

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

@andrewor14
Copy link
Contributor

Looks good. Merging into master 2.0.

asfgit pushed a commit that referenced this pull request May 25, 2016
…verriding confs of existing sessions

## What changes were proposed in this pull request?

This fixes the python SparkSession builder to allow setting confs correctly. This was a leftover TODO from #13200.

## How was this patch tested?

Python doc tests.

cc andrewor14

Author: Eric Liang <ekl@databricks.com>

Closes #13289 from ericl/spark-15520.

(cherry picked from commit 8239fdc)
Signed-off-by: Andrew Or <andrew@databricks.com>
for key, value in self._options.items():
sparkConf.set(key, value)
sc = SparkContext.getOrCreate(sparkConf)
session = SparkSession(sc)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually before this line we might have to explicitly set the confs through sc.conf.set, since the SparkContext may be an existing one. There was a patch that did this for scala recently: 01e7b9c

@asfgit asfgit closed this in 8239fdc May 25, 2016
asfgit pushed a commit that referenced this pull request May 26, 2016
…n builder in pyspark

## What changes were proposed in this pull request?

Also sets confs in the underlying sc when using SparkSession.builder.getOrCreate(). This is a bug-fix from a post-merge comment in #13289

## How was this patch tested?

Python doc-tests.

Author: Eric Liang <ekl@databricks.com>

Closes #13309 from ericl/spark-15520-1.

(cherry picked from commit 594a1bf)
Signed-off-by: Andrew Or <andrew@databricks.com>
asfgit pushed a commit that referenced this pull request May 26, 2016
…n builder in pyspark

## What changes were proposed in this pull request?

Also sets confs in the underlying sc when using SparkSession.builder.getOrCreate(). This is a bug-fix from a post-merge comment in #13289

## How was this patch tested?

Python doc-tests.

Author: Eric Liang <ekl@databricks.com>

Closes #13309 from ericl/spark-15520-1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants