Skip to content

[SPARK-15417][SQL][Python] PySpark shell always uses in-memory catalog - #13203

Closed
andrewor14 wants to merge 1 commit into
apache:masterfrom
andrewor14:fix-pyspark-shell
Closed

[SPARK-15417][SQL][Python] PySpark shell always uses in-memory catalog#13203
andrewor14 wants to merge 1 commit into
apache:masterfrom
andrewor14:fix-pyspark-shell

Conversation

@andrewor14

@andrewor14andrewor14 commented May 19, 2016

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

There is no way to use the Hive catalog in pyspark-shell. This is because we used to create a SparkContext before calling SparkSession.enableHiveSupport().getOrCreate(), which just gets the existing SparkContext instead of creating a new one. As a result, spark.sql.catalogImplementation was never propagated.

How was this patch tested?

Manual.

@andrewor14

Copy link
Copy Markdown
ContributorAuthor

@davies@gatorsmile

@SparkQA

Copy link
Copy Markdown

Test build #58904 has finished for PR 13203 at commit a7a1027.

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

@andrewor14

Copy link
Copy Markdown
ContributorAuthor

retest this please

@davies

Copy link
Copy Markdown
Contributor

@andrewor14 So the problem is that getOrCreate() is not aware of the configuration (which could be different from the existing one), should we show an warning on that?

@SparkQA

Copy link
Copy Markdown

Test build #58906 has finished for PR 13203 at commit a7a1027.

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

@andrewor14

andrewor14 commented May 20, 2016

Copy link
Copy Markdown
ContributorAuthor

@davies yes that was the issue. Do you mean a warning for SparkSession.getOrCreate in general? I think it's not necessary because that's just the behavior of getOrCreate. We also don't log a warning for SparkContext.getOrCreate and SQLContext.getOrCreate.

@gatorsmile

Copy link
Copy Markdown
Member

LGTM

@andrewor14

Copy link
Copy Markdown
ContributorAuthor

OK I'm merging this into master 2.0 thanks.

asfgit pushed a commit that referenced this pull request May 20, 2016
## What changes were proposed in this pull request?
There is no way to use the Hive catalog in `pyspark-shell`. This is because we used to create a `SparkContext` before calling `SparkSession.enableHiveSupport().getOrCreate()`, which just gets the existing `SparkContext` instead of creating a new one. As a result, `spark.sql.catalogImplementation` was never propagated.
## How was this patch tested?
Manual.
Author: Andrew Or <andrew@databricks.com>
Closes#13203 from andrewor14/fix-pyspark-shell.
(cherry picked from commit c32b1b1)
Signed-off-by: Andrew Or <andrew@databricks.com>
@andrewor14
andrewor14 deleted the fix-pyspark-shell branch May 20, 2016 17:56
Sign up for freeto 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.

4 participants

@andrewor14@SparkQA@davies@gatorsmile