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 2015/12/01 23:16:30 UTC
incubator-zeppelin git commit: [ZEPPELIN-475] NullPointerException
when run notebook generated before ZEPPELIN-387
Repository: incubator-zeppelin
Updated Branches:
refs/heads/master c39bdb836 -> a54a3ac18
[ZEPPELIN-475] NullPointerException when run notebook generated before ZEPPELIN-387
`p.getConfig().get("enabled")` can be null when Zeppelin load notebook generated before ZEPPELIN-387.
This PR fixes ZEPPELIN-475 by assuming "true" when `p.getConfig().get("enabled")` is null.
Author: Lee moon soo <mo...@apache.org>
Closes #491 from Leemoonsoo/ZEPPELIN-475 and squashes the following commits:
e6a459f [Lee moon soo] Assume "enabled" is true, when it is not defined.
Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/a54a3ac1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/a54a3ac1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/a54a3ac1
Branch: refs/heads/master
Commit: a54a3ac181fa34a0ff1c3c423cac07f9e1013a33
Parents: c39bdb8
Author: Lee moon soo <mo...@apache.org>
Authored: Mon Nov 30 21:37:15 2015 +0900
Committer: Lee moon soo <mo...@apache.org>
Committed: Wed Dec 2 07:17:24 2015 +0900
----------------------------------------------------------------------
.../src/main/java/org/apache/zeppelin/notebook/Note.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/a54a3ac1/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 4271a73..66a63c8 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
@@ -93,7 +93,7 @@ public class Note implements Serializable, JobListener {
public String id() {
return id;
}
-
+
public String getId() {
return id;
}
@@ -174,7 +174,7 @@ public class Note implements Serializable, JobListener {
paragraphs.add(newParagraph);
}
}
-
+
/**
* Insert paragraph in given index.
*
@@ -323,7 +323,7 @@ public class Note implements Serializable, JobListener {
if (intp == null) {
throw new InterpreterException("Interpreter " + p.getRequiredReplName() + " not found");
}
- if ((Boolean) p.getConfig().get("enabled")) {
+ if (p.getConfig().get("enabled") == null || (Boolean) p.getConfig().get("enabled")) {
intp.getScheduler().submit(p);
}
}