You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2021/09/02 13:17:50 UTC

[GitHub] [zeppelin] zjffdu opened a new pull request #4214: [ZEPPELIN-5499] NPE in IPySparkInterpreter

zjffdu opened a new pull request #4214:
URL: https://github.com/apache/zeppelin/pull/4214


   ### What is this PR for?
   
   The root cause is the `SparkConf` in PySparkInterpreter is null when IPySparkInterpreter#open is called because SparkInterpreter is not opened yet at that time. This PR would pass `SparkConf` explicitly to avoid this issue. 
   
   ### What type of PR is it?
   [Bug Fix ]
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   * https://issues.apache.org/jira/browse/ZEPPELIN-5499
   
   ### How should this be tested?
   * CI pass
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * Does the licenses files need update? No
   * Is there breaking changes for older versions? No
   * Does this needs documentation? No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zeppelin] asfgit closed pull request #4214: [ZEPPELIN-5499] NPE in IPySparkInterpreter

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #4214:
URL: https://github.com/apache/zeppelin/pull/4214


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zeppelin] zjffdu commented on a change in pull request #4214: [ZEPPELIN-5499] NPE in IPySparkInterpreter

Posted by GitBox <gi...@apache.org>.
zjffdu commented on a change in pull request #4214:
URL: https://github.com/apache/zeppelin/pull/4214#discussion_r705864562



##########
File path: spark/interpreter/src/main/java/org/apache/zeppelin/spark/PySparkInterpreter.java
##########
@@ -172,6 +172,10 @@ public void setInterpreterContextInPython() {
   @Override
   protected String getPythonExec() {
     SparkConf sparkConf = getSparkConf();
+    return getPythonExec(sparkConf);
+  }
+
+  String getPythonExec(SparkConf sparkConf) {

Review comment:
       Only package level is needed, so I didn't specify access modifier 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zeppelin] Reamer commented on pull request #4214: [ZEPPELIN-5499] NPE in IPySparkInterpreter

Posted by GitBox <gi...@apache.org>.
Reamer commented on pull request #4214:
URL: https://github.com/apache/zeppelin/pull/4214#issuecomment-916858094


   @zjffdu I have tested the PR in my environment and it works without NPE.
   It would be nice if we could merge this quickly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zeppelin] Reamer commented on a change in pull request #4214: [ZEPPELIN-5499] NPE in IPySparkInterpreter

Posted by GitBox <gi...@apache.org>.
Reamer commented on a change in pull request #4214:
URL: https://github.com/apache/zeppelin/pull/4214#discussion_r701109323



##########
File path: spark/interpreter/src/main/java/org/apache/zeppelin/spark/PySparkInterpreter.java
##########
@@ -172,6 +172,10 @@ public void setInterpreterContextInPython() {
   @Override
   protected String getPythonExec() {
     SparkConf sparkConf = getSparkConf();
+    return getPythonExec(sparkConf);
+  }
+
+  String getPythonExec(SparkConf sparkConf) {

Review comment:
       Please add a access modifier (e.g. `public`, `private`)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org