Skip to content

Conversation

@andrewor14
Copy link
Contributor

@andrewor14 andrewor14 commented May 19, 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.

@andrewor14
Copy link
Contributor Author

@davies @gatorsmile

@SparkQA
Copy link

SparkQA commented May 19, 2016

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
Contributor Author

retest this please

@davies
Copy link
Contributor

davies commented May 19, 2016

@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

SparkQA commented May 19, 2016

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
Copy link
Contributor Author

andrewor14 commented May 20, 2016

@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
Member

LGTM

@andrewor14
Copy link
Contributor Author

OK I'm merging this into master 2.0 thanks.

@asfgit asfgit closed this in c32b1b1 May 20, 2016
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 <[email protected]>

Closes #13203 from andrewor14/fix-pyspark-shell.

(cherry picked from commit c32b1b1)
Signed-off-by: Andrew Or <[email protected]>
@andrewor14 andrewor14 deleted the fix-pyspark-shell branch May 20, 2016 17:56
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.

4 participants