You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2018/01/31 16:28:53 UTC
zeppelin git commit: [ZEPPELIN-3189] NPE on paragraph run via API
Repository: zeppelin
Updated Branches:
refs/heads/master 7fbb5985f -> e7e9e19cf
[ZEPPELIN-3189] NPE on paragraph run via API
### What is this PR for?
Bugfix over NPE when running REST API command to run paragraph synchronously.
### What type of PR is it?
[Bug Fix]
### Todos
* [ ] - Task
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-3189
### How should this be tested?
1. Build Zep (mvn clean package -DskipTests)
2. Start Zep
3. Run curl command in shell (curl -i -X POST http://localhost:8080/api/notebook/run/{noteId}/{paragraphId}
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? N
* Is there breaking changes for older versions? N
* Does this needs documentation? N
Author: Nelson Costa <ne...@gmail.com>
Closes #2745 from necosta/zeppelin3189 and squashes the following commits:
9d1e2a569 [Nelson Costa] [ZEPPELIN-3189] NPE on paragraph run via API
Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/e7e9e19c
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/e7e9e19c
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/e7e9e19c
Branch: refs/heads/master
Commit: e7e9e19cf1be6ada5b5e8d56fc2a7d8809f85f79
Parents: 7fbb598
Author: Nelson Costa <ne...@gmail.com>
Authored: Wed Jan 24 15:46:14 2018 +0000
Committer: Lee moon soo <mo...@apache.org>
Committed: Wed Jan 31 08:28:48 2018 -0800
----------------------------------------------------------------------
.../src/main/java/org/apache/zeppelin/rest/NotebookRestApi.java | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e7e9e19c/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRestApi.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRestApi.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRestApi.java
index 8835984..2042c4c 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRestApi.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRestApi.java
@@ -797,6 +797,9 @@ public class NotebookRestApi {
note.initializeJobListenerForParagraph(paragraph);
}
+ AuthenticationInfo subject = new AuthenticationInfo(SecurityUtils.getPrincipal());
+ paragraph.setAuthenticationInfo(subject);
+
paragraph.run();
final InterpreterResult result = paragraph.getResult();