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 2017/01/23 09:48:47 UTC

zeppelin git commit: [ZEPPELIN-1843] Error on invoking the REST API to run paragraph synchronously

Repository: zeppelin
Updated Branches:
  refs/heads/master de659a5ed -> e49fb47de


[ZEPPELIN-1843] Error on invoking the REST API to run paragraph synchronously

### What is this PR for?
This fixes the validation check of paragraph's note id to match with the Note instance id.

### What type of PR is it?
Bug Fix

### Todos
NA

### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1843

### How should this be tested?
The run para synchronous REST API should be successful.

### 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: Kavin <ka...@imaginea.com>

Closes #1808 from kavinkumarks/zeppelin-1843-run-para-sync-api-error and squashes the following commits:

b5f2927 [Kavin] Throw IAE only when the note id of the instance and paragraph's note id doesn't match.


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/e49fb47d
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/e49fb47d
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/e49fb47d

Branch: refs/heads/master
Commit: e49fb47de88897427b915ffec3f8936deebb5dc6
Parents: de659a5
Author: Kavin <ka...@imaginea.com>
Authored: Wed Dec 28 13:09:19 2016 +0530
Committer: Lee moon soo <mo...@apache.org>
Committed: Mon Jan 23 01:48:44 2017 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/zeppelin/notebook/Note.java           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e49fb47d/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java
index 22934d3..f0eae73 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java
@@ -222,7 +222,7 @@ public class Note implements Serializable, ParagraphJobListener {
 
   public void initializeJobListenerForParagraph(Paragraph paragraph) {
     final Note paragraphNote = paragraph.getNote();
-    if (paragraphNote.getId().equals(this.getId())) {
+    if (!paragraphNote.getId().equals(this.getId())) {
       throw new IllegalArgumentException(
           format("The paragraph %s from note %s " + "does not belong to note %s", paragraph.getId(),
               paragraphNote.getId(), this.getId()));