[ZEPPELIN-4829] NPE in RemoteInterpreterServer#getStatus when interpreter is not opened yet#3776
Closed
zjffdu wants to merge 1 commit intoapache:masterfrom
Closed
[ZEPPELIN-4829] NPE in RemoteInterpreterServer#getStatus when interpreter is not opened yet#3776zjffdu wants to merge 1 commit intoapache:masterfrom
zjffdu wants to merge 1 commit intoapache:masterfrom
Conversation
Member
|
LGTM |
Reamer
reviewed
May 24, 2020
| Job job = intp.getScheduler().getJob(jobId); | ||
| if (job != null) { | ||
| return job.getStatus().name(); | ||
| if (((LazyOpenInterpreter) intp).isOpen()) { |
Contributor
There was a problem hiding this comment.
At the moment I can't view the whole source code. A instanceof should avoid a ClassCastException.
Contributor
Author
There was a problem hiding this comment.
@Reamer I use another approach which don't need class cast
381bd99 to
1203b7b
Compare
…reter is not opened yet
asfgit
pushed a commit
that referenced
this pull request
Jun 1, 2020
…eter is not opened yet ### What is this PR for? The NPE happens because the scheduler of interpreter is null. This is because the interpreter is not opened yet. (https://github.com/apache/zeppelin/blob/v0.9.0-preview1/livy/src/main/java/org/apache/zeppelin/livy/LivySparkSQLInterpreter.java#L232) This PR would check wether interpreter is opened before using its scheduler. ### What type of PR is it? [Bug Fix ] ### Todos * [ ] - Task ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-4829 ### 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 Author: Jeff Zhang <zjffdu@apache.org> Closes #3776 from zjffdu/ZEPPELIN-4829 and squashes the following commits: 1203b7b [Jeff Zhang] [ZEPPELIN-4829]. NPE in RemoteInterpreterServer#getStatus when interpreter is not opened yet (cherry picked from commit 2608005) Signed-off-by: Jeff Zhang <zjffdu@apache.org>
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 NPE happens because the scheduler of interpreter is null. This is because the interpreter is not opened yet. (https://github.com/apache/zeppelin/blob/v0.9.0-preview1/livy/src/main/java/org/apache/zeppelin/livy/LivySparkSQLInterpreter.java#L232)
This PR would check wether interpreter is opened before using its scheduler.
What type of PR is it?
[Bug Fix ]
Todos
What is the Jira issue?
How should this be tested?
Screenshots (if appropriate)
Questions: