From 8af7856fd1b36da1c059cbd8eb71d6b28f0cd23e Mon Sep 17 00:00:00 2001 From: CloverHearts Date: Fri, 21 Oct 2016 14:40:01 +0900 Subject: [PATCH 1/2] [ Hotfix ] Incorrect (per user) setup ui for "create new interpreter component" ### What is this PR for? A few sentences describing the overall goals of the pull request's commits. First time? Check out the contributing guide - https://zeppelin.apache.org/contribution/contributions.html ### What type of PR is it? Bug Fix ### Todos - [x] fix to text margin top - [x] implement to (per note / per user) setup feature of create new insterpreter ### How should this be tested? 1. on click interpreter menu. 2. on click interpreter menu. 3. check per user and per note setting. (`per user` setting must be shiro is activated) 4. save and check to result. ### Screenshots (if appropriate) #### - Create new Interpreter - before ![pernotebefore](https://cloud.githubusercontent.com/assets/10525473/19588103/6d1236a4-979e-11e6-972b-bb6d35f83ac5.png) #### - Create new Interpreter - after ![new create interpreter](https://cloud.githubusercontent.com/assets/10525473/19588118/87ad23ca-979e-11e6-9a2b-4ec8be27c74f.png) #### - fix margin for interpreter settings - before ![pernotebefore](https://cloud.githubusercontent.com/assets/10525473/19588140/a8b701ee-979e-11e6-804b-4e39c063281d.png) #### - fix margin for interpreter settings - after ![margin](https://cloud.githubusercontent.com/assets/10525473/19588145/b13ca8f0-979e-11e6-9a02-186b92a0dad1.png) ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: CloverHearts Closes #1546 from cloverhearts/hotfix-inerpreterRunningModeUIFix and squashes the following commits: ebf1d81 [CloverHearts] hotfix - change setup ui for interpreter setting components --- .../interpreter-create.html | 196 ++++++++++++++---- .../src/app/interpreter/interpreter.html | 104 +++++----- 2 files changed, 210 insertions(+), 90 deletions(-) diff --git a/zeppelin-web/src/app/interpreter/interpreter-create/interpreter-create.html b/zeppelin-web/src/app/interpreter/interpreter-create/interpreter-create.html index 2638dd84e3..9013aabf66 100644 --- a/zeppelin-web/src/app/interpreter/interpreter-create/interpreter-create.html +++ b/zeppelin-web/src/app/interpreter/interpreter-create/interpreter-create.html @@ -37,45 +37,165 @@ limitations under the License.
Option
- - - - - - - - - - -
+
+
+ The interpreter will be instantiated + + + + + in + + + + + process. + + + + + +
+
+   +
+
+
+
+ + + And + + + + in + + + + + process. + + +
+
+
diff --git a/zeppelin-web/src/app/interpreter/interpreter.html b/zeppelin-web/src/app/interpreter/interpreter.html index e0e861343b..ce716d5341 100644 --- a/zeppelin-web/src/app/interpreter/interpreter.html +++ b/zeppelin-web/src/app/interpreter/interpreter.html @@ -250,62 +250,62 @@ limitations under the License.  
-
-
- - - - And - - - - in - - - - - process. - + in + + + + + process. +
-
-   -
From 5cc7cc56c59590d7af7f7d199f6a8dca8858a64f Mon Sep 17 00:00:00 2001 From: rajarajan-g Date: Tue, 18 Oct 2016 17:03:40 +0530 Subject: [PATCH 2/2] [ZEPPELIN-1488] JDBC Interpreter throws error while the interpreter is downloading dependencies ### What is this PR for? For first time, when we add dependencies for JDBC interpreter, dependencies will start getting downloaded in background. During that time, if user runs a paragraph of JDBC interpreter now user getting error , But instead paragraph execution should be put on 'PENDING' state and wait for dependencies to get downloaded and then run the paragraph ### What type of PR is it? Bug Fix ### Todos ### What is the Jira issue? [ZEPPELIN-1488] https://issues.apache.org/jira/browse/ZEPPELIN-1488 ### How should this be tested? prerequisites: 1. Any DB setup.(For my testing, i considered hive) Steps: 1. Delete the local-repo folder under zeppelin project, if it exists 2. Go to interpreter settings page, provide hive connection details under JDBC interprepreter 3. For hive interpreter to run, it needs some dependencies to be added in interpreter settings page For hive below dependencies needs to added 1. org.apache.hive:hive-jdbc:0.14.0 2. org.apache.hadoop:hadoop-common:2.6.0 4. Once the settings for JDBC interpreter is saved, dependencies will start getting downloaded in background. 5. Run any paragraph with JDBC as interpreter, paragraph should not throw error, status of the paragraph should change to 'pending' while the dependencies are getting downloaded in background. 6. Once the downloading of dependencies is done, the paragraph which were in pending will start executing in order depending on the execution mode of the interpreter (i.e Shared, Scoped, Isolated) ### 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: rajarajan-g Closes #1467 from rajarajan-g/ZEPPELIN-1488 and squashes the following commits: b069328 [rajarajan-g] removed unnecessary method call ee98a84 [rajarajan-g] checkstyle fix c412dd6 [rajarajan-g] review fix 4f7b938 [rajarajan-g] code fix for ZEPPELIN-1488 --- .../main/java/org/apache/zeppelin/notebook/Paragraph.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java index 955ba2dd00..ad580ed950 100644 --- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java +++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java @@ -293,9 +293,12 @@ public class Paragraph extends Job implements Serializable, Cloneable { logger.error("Can not find interpreter name " + repl); throw new RuntimeException("Can not find interpreter for " + getRequiredReplName()); } - + InterpreterSetting intp = getInterpreterSettingById(repl.getInterpreterGroup().getId()); + while (intp.getStatus().equals( + org.apache.zeppelin.interpreter.InterpreterSetting.Status.DOWNLOADING_DEPENDENCIES)) { + Thread.sleep(200); + } if (this.noteHasUser() && this.noteHasInterpreters()) { - InterpreterSetting intp = getInterpreterSettingById(repl.getInterpreterGroup().getId()); if (intp != null && interpreterHasUser(intp) && isUserAuthorizedToAccessInterpreter(intp.getOption()) == false) {