Closed aniket02k closed 4 years ago
Hi @aniket02k - thank you for opening this issue.
Although you list Enterprise Gateway and nb2kg, I'm not sure if you're conflating the presence of Gateway in the traceback information with Enterprise Gateway. The py4j.Gateway
stuff is a Spark thing and nothing related to EG.
Which kernel image are you using for the kernel you're launching in kubernetes? I would recommend using elyra/kernel-spark-py or a derivation thereof for work in Spark since the launcher will automatically create the SparkContext for you.
Also, is this issue only happening when shell escaping !pytest -v /home/aniket/mnt/test.ipynb
, yet does not occur when running the same code within the notebook cell?
Now that 2.0.0 (and 2.1.0) is available, I would recommend moving to that. In addition, if your Notebook server is >= 6.0, NB2KG is built into Notebook and is no longer necessary. Simply invoke Notebook with --gateway-url=<URL to EG instance>
(among other options if necessary) and you're good to go.
[Surya] Thx for the reply kevin. Answers inline.
Hi @aniket02k - thank you for opening this issue.
Although you list Enterprise Gateway and nb2kg, I'm not sure if you're conflating the presence of Gateway in the traceback information with Enterprise Gateway. The
py4j.Gateway
stuff is a Spark thing and nothing related to EG.Which kernel image are you using for the kernel you're launching in kubernetes? I would recommend using elyra/kernel-spark-py or a derivation thereof for work in Spark since the launcher will automatically create the SparkContext for you. [Surya] Yes we are using a derivative of same.
Also, is this issue only happening when shell escaping
!pytest -v /home/aniket/mnt/test.ipynb
, yet does not occur when running the same code within the notebook cell? [Surya] Correct, happens only with pytest.Now that 2.0.0 (and 2.1.0) is available, I would recommend moving to that. In addition, if your Notebook server is >= 6.0, NB2KG is built into Notebook and is no longer necessary. Simply invoke Notebook with
--gateway-url=<URL to EG instance>
(among other options if necessary) and you're good to go. [Surya] we are in planning phase to upgrade to same
Also, is this issue only happening when shell escaping !pytest -v /home/aniket/mnt/test.ipynb, yet does not occur when running the same code within the notebook cell?
[Aniket] This issue is also observed when I tired to run pyspark notebook using papermill package.
!papermill /home/aniket/mnt/test.ipynb /opt/spark/work-dir/output.ipynb -p a 9 -k python3
After running the above command , observed the same traceback.
[Aniket] This issue is also observed when I tired to run pyspark notebook using papermill package.
!papermill /home/aniket/mnt/test.ipynb /opt/spark/work-dir/output.ipynb -p a 9 -k python3
After running the above command , observed the same traceback.
Thanks @aniket02k. Yeah, my feeling is that this is more of an environmental thing relative to the spark environment, particularly since it can be reproduced w/o Enterprise Gateway entirely. As such, I'm inclined to close this issue.
I find shell-escaping out of a cell to run pytest
very strange anyway. I suspect this is causing conflicts and confusion in spark and the "parent" context (from which the shell escape is taking place).
Based on the information (and lack of response), I'm going to close this issue. We can re-open if that proves necessary.
Description
Hi, I have created a spark python ipynb file through jupyterhub UI, in which I've added an example for writing to hdfs. I am able execute the example through UI. But, when I am trying to execute the same ipynb file using pytest-ipynb package using the command : !pytest -v /home/aniket/mnt/test.ipynb , observed the below error:
Traceback:
Py4JJavaError Traceback (most recent call last)