-
Couldn't load subscription status.
- Fork 455
Pyspark3 compatibility livy0.4+ #507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pyspark3 compatibility livy0.4+ #507
Conversation
|
I think this patch is not robust in case you lose the reference of the httpclient instance or if you want to share the same session across clients. |
|
FYI - Livy 0.5+ has session kind is actually useless
So this could be both a notebook-level property (just as a default for newly created cells), and a cell-level property. %%spark -l python
# .. some pyspark code..
df = spark.sql("select * from universe")%%spark -l scala
// .. some Scala code..
var df = spark.sql("select * from universe")on the same (shared) backend Spark session. |
|
Q? Any plans for this to be merged? |
|
^ Hi guys, any chance of this getting merged soon? Would really appreciate if sparkmagic started to be compatible with livy0.5, as these are also the defaults AWS EMR ships with now. Thanks! |
|
Btw, Livy 0.6 was released last week https://goo.gl/h64tzY This fix is still applicable for the 0.6 release . @gm-spacagna - any chance this can be fixed soon ? Thanks!! |
|
Hey @apetresc, any chance merging this PR in the near future? Compatibility with Livy 0.5+ seem to be desired by a fair few people. |
This is necessary to test livy compatibility, because newer versions of livy don't work without Hive support in the Spark session, which isn't included in the default binary distribution.
|
@apetresc Can we merge this anytime soon? |
|
Hey @apetresc, any chance merging this PR? |
|
Adding rest of Is it possible somebody would help with pushing some pull request Sparkmagic has broken Python 3 support for over a year, and doesn't support several latest Apache Livy releases.. also there are a lot of PRs that don't get attention from committers for since January. |
|
Getting this merged soon would be great if that is possible! |
|
I currently do not use (nor deploy) sparkmagic for users, though I have been supportive of the folks leading it. If PRs are not being merged and support for Python3 is lacking, we may want to consider the livelihood of the project. I'll see about reaching out to maintainers. |
|
@gm-spacagna -- I want to thank you for making your first contribution to this repository. Before I take any action on this PR I'd like to see what @apetresc thinks, since they were the last to merge code and make a release. |
|
I now have commit bit. Going to review this and see if I can get it (or some other variant) merged. |
|
Notes from skimming the PR and issue:
|
I have tried a different implementation for fixing the compatibility of PySpark3 on Livy0.4+ as described in #421.
For me the major problem was the mapping 1-1 between the specified language and corresponding Livy kind variable.
Since that starting from Livy 0.4 the kinds supported are " spark", "pyspark" and "sparkr", the choice between pyspark (python 2) and pyspark3 (python 3) is given by the config parameters instead or the default setting in the Livy server environment.
I have added the field lang to the Session object such that in both the sql query and remote commands we now have available both the kind and desired language as part of the context information. We can discriminate between the two python versions and encoding or not encoding the results serialized in JSON.