ZEPPELIN-1442. UDF can not be found due to 2 instances of SparkSession is created#1452
Closed
zjffdu wants to merge 2 commits intoapache:masterfrom
Closed
ZEPPELIN-1442. UDF can not be found due to 2 instances of SparkSession is created#1452zjffdu wants to merge 2 commits intoapache:masterfrom
zjffdu wants to merge 2 commits intoapache:masterfrom
Conversation
Member
|
LGTM |
Member
|
LGTM |
Member
|
@zjffdu could you rebase and resolve conflicts? |
66ec1b9 to
a15e3c6
Compare
Contributor
Author
|
@minahlee PR is rebased, and the failed test is irrelevant. |
Member
|
@zjffdu Thank you! Merging to master and branch-0.6 if there is no more discussion |
asfgit
pushed a commit
that referenced
this pull request
Sep 27, 2016
…n is created ### What is this PR for? The issue is that we create 2 SparkSession in zeppelin_pyspark.py (Because we create SQLContext first which will create SparkSession underlying). This cause 2 instances of SparkSession in JVM side and this means we have 2 instances of Catalog as well. So udf registered in SQLContext can not be used in SparkSession. This PR will create SparkSession first and then assign its internal SQLContext to sqlContext in pyspark. ### What type of PR is it? [Bug Fix] ### Todos * [ ] - Task ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-1442 ### How should this be tested? Integration test is added. ### Screenshots (if appropriate)  ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No … Author: Jeff Zhang <[email protected]> Closes #1452 from zjffdu/ZEPPELIN-1442 and squashes the following commits: a15e3c6 [Jeff Zhang] fix unit test 93060b6 [Jeff Zhang] ZEPPELIN-1442. UDF can not be found due to 2 instances of SparkSession is created (cherry picked from commit 89cf826) Signed-off-by: Mina Lee <[email protected]>
pedrozatta
pushed a commit
to pedrozatta/zeppelin
that referenced
this pull request
Oct 27, 2016
…n is created ### What is this PR for? The issue is that we create 2 SparkSession in zeppelin_pyspark.py (Because we create SQLContext first which will create SparkSession underlying). This cause 2 instances of SparkSession in JVM side and this means we have 2 instances of Catalog as well. So udf registered in SQLContext can not be used in SparkSession. This PR will create SparkSession first and then assign its internal SQLContext to sqlContext in pyspark. ### What type of PR is it? [Bug Fix] ### Todos * [ ] - Task ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-1442 ### How should this be tested? Integration test is added. ### Screenshots (if appropriate)  ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No … Author: Jeff Zhang <[email protected]> Closes apache#1452 from zjffdu/ZEPPELIN-1442 and squashes the following commits: a15e3c6 [Jeff Zhang] fix unit test 93060b6 [Jeff Zhang] ZEPPELIN-1442. UDF can not be found due to 2 instances of SparkSession is created
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR for?
The issue is that we create 2 SparkSession in zeppelin_pyspark.py (Because we create SQLContext first which will create SparkSession underlying). This cause 2 instances of SparkSession in JVM side and this means we have 2 instances of Catalog as well. So udf registered in SQLContext can not be used in SparkSession. This PR will create SparkSession first and then assign its internal SQLContext to sqlContext in pyspark.
What type of PR is it?
[Bug Fix]
Todos
What is the Jira issue?
How should this be tested?
Integration test is added.
Screenshots (if appropriate)
Questions:
…