You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by "Shuai Ma (Jira)" <ji...@apache.org> on 2020/03/23 10:07:00 UTC
[jira] [Created] (ZEPPELIN-4692) zeppelin pyspark call custom jar
not working while it works well in pyspark shell
Shuai Ma created ZEPPELIN-4692:
----------------------------------
Summary: zeppelin pyspark call custom jar not working while it works well in pyspark shell
Key: ZEPPELIN-4692
URL: https://issues.apache.org/jira/browse/ZEPPELIN-4692
Project: Zeppelin
Issue Type: Bug
Components: pySpark
Affects Versions: 0.8.2
Environment: *Env*:
Zeppelin: 0.8.2
Spark 2.4.4
Scala: 2.11.7
Python 3.7.2
Reporter: Shuai Ma
Attachments: image-2020-03-23-17-51-39-226.png, image-2020-03-23-17-57-22-868.png, image-2020-03-23-18-04-59-789.png
*Problem description:*
i created a custom jar file my-test-1.0-SNAPSHOT.jar with following java code:
{code:java}
package com.mycompany.app;
import java.util.LinkedList; import java.util.List;
public class Stack {
public void my_open() { System.out.println("calling open file"); }
public void my_close() { System.out.println("calling close file"); }
}{code}
when i use pyspark shell, it works well.
pyspark --driver-class-path my-test-1.0-SNAPSHOT.jar
!image-2020-03-23-17-51-39-226.png!
but when i use pyspark in zeppelin, it works only for the first time, with proper output "calling open file". But after then, as following shows the method 'my_open' failed to execute with 'None' returned.
!image-2020-03-23-17-57-22-868.png!
*more actions:*
then i tried to use Scala in Zeppelin to do the same, it worked well.
!image-2020-03-23-18-04-59-789.png!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)