[zeppelin] branch master updated: [ZEPPELIN-4026] document anonymous access

2019-03-03 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
 new 05fdfe5  [ZEPPELIN-4026] document anonymous access
05fdfe5 is described below

commit 05fdfe5162bb9f38eb927fc68d754370b316a133
Author: Felix Cheung 
AuthorDate: Sun Mar 3 23:42:11 2019 -0500

[ZEPPELIN-4026] document anonymous access

### What is this PR for?
doc update

### What type of PR is it?
[Documentation]

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

### Questions:
* Does the licenses files need update? N
* Is there breaking changes for older versions? N
* Does this needs documentation? N
---
 docs/setup/security/shiro_authentication.md | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/docs/setup/security/shiro_authentication.md 
b/docs/setup/security/shiro_authentication.md
index c9bf905..40b6e53 100644
--- a/docs/setup/security/shiro_authentication.md
+++ b/docs/setup/security/shiro_authentication.md
@@ -28,6 +28,9 @@ limitations under the License.
 
 When you connect to Apache Zeppelin, you will be asked to enter your 
credentials. Once you logged in, then you have access to all notes including 
other user's notes.
 
+## Important Note
+By default, Zeppelin allows anonymous access. It is strongly recommended that 
you consider setting up Apache Shiro for authentication (as described in this 
document, see 2 Secure the Websocket channel), or only deploy and use Zeppelin 
in a secured and trusted environment.
+
 ## Security Setup
 You can setup **Zeppelin notebook authentication** in some simple steps.
 



[zeppelin] branch master updated: [ZEPPELIN-4012] Save paragraphs after clone

2019-02-26 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
 new dd624a6  [ZEPPELIN-4012] Save paragraphs after clone
dd624a6 is described below

commit dd624a67a4cf27e1778be260d964abc3df96e345
Author: Egor Klimov 
AuthorDate: Wed Feb 27 08:25:23 2019 +0300

[ZEPPELIN-4012] Save paragraphs after clone

### What is this PR for?
Paragraphs in cloned note disappear after zeppelin restart if they weren't 
executed
* Bug:

![clone_bug](https://user-images.githubusercontent.com/6136993/52918382-5ed02e00-3307-11e9-888e-5eb4dce756f1.gif)
* Fix:

![clone_fix](https://user-images.githubusercontent.com/6136993/52918383-6263b500-3307-11e9-83e3-e851f65c34b8.gif)

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

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

### How should this be tested?
* CI pass

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
---
 .../src/main/java/org/apache/zeppelin/notebook/Notebook.java | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Notebook.java 
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Notebook.java
index ccb9b95..ab32059 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Notebook.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Notebook.java
@@ -244,6 +244,7 @@ public class Notebook {
 for (Paragraph p : paragraphs) {
   newNote.addCloneParagraph(p, subject);
 }
+saveNote(newNote, subject);
 return newNote;
   }
 



[zeppelin] branch master updated: [ZEPPELIN-4011] Fix note path

2019-02-26 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
 new 6dcc2ab  [ZEPPELIN-4011] Fix note path
6dcc2ab is described below

commit 6dcc2ab49c1f3d0c9ad4c8d68b005e37690faa7a
Author: Egor Klimov 
AuthorDate: Wed Feb 27 08:24:01 2019 +0300

[ZEPPELIN-4011] Fix note path

### What is this PR for?
Now note may move to the root directory after enabling cron in it. It 
caused by `Note#setName`

* Bug:
 
![notepath](https://user-images.githubusercontent.com/6136993/52917693-87542a00-32ff-11e9-9fb1-82d21c0942f8.gif)
* Fix:

![notepath_fix](https://user-images.githubusercontent.com/6136993/52917704-abb00680-32ff-11e9-8f50-0e8908e4edc0.gif)

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

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-4011
### How should this be tested?
* CI pass

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
---
 zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 403db06..2632e7d 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
@@ -232,7 +232,7 @@ public class Note implements JsonSerializable {
 this.path = "/" + name;
   }
 } else {
-  int pos = this.path.indexOf("/");
+  int pos = this.path.lastIndexOf("/");
   this.path = this.path.substring(0, pos + 1) + this.name;
 }
   }



[zeppelin] branch branch-0.7 updated: formatting fix for LDAP realm documentation

2019-02-09 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch branch-0.7
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/branch-0.7 by this push:
 new 7906a5c  formatting fix for LDAP realm documentation
7906a5c is described below

commit 7906a5c9443a33f4a21e3e93dccf06844649ce7f
Author: Jake Maul <1141442+superawes...@users.noreply.github.com>
AuthorDate: Sat Feb 9 22:37:26 2019 -0700

formatting fix for LDAP realm documentation

spacing of "```" block causing it to be ignored, and the rest of the 
contents to be rendered incorrectly.

### What is this PR for?
The LDAP section of the documentation for zeppelin-0.7.3 renders 
incorrectly, here:

http://zeppelin.apache.org/docs/0.7.3/security/shiroauthentication.html

It looks correct on GitHub, but not on the standalone site. This should fix 
it.

### What type of PR is it?
[Documentation | Bug Fix]

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? none known
* Does this needs documentation? no
---
 docs/security/shiroauthentication.md | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/docs/security/shiroauthentication.md 
b/docs/security/shiroauthentication.md
index 75a52e1..bf5e8e3 100644
--- a/docs/security/shiroauthentication.md
+++ b/docs/security/shiroauthentication.md
@@ -143,7 +143,8 @@ ldapRealm.contextFactory.authenticationMechanism = simple
 
 The other more flexible option is to use the LdapRealm. It allows for mapping 
of ldapgroups to roles and also allows for
  role/group based authentication into the zeppelin server. Sample 
configuration for this realm is given below.
- ```
+
+```
 [main] 
 ldapRealm=org.apache.zeppelin.realm.LdapRealm
 
@@ -179,7 +180,7 @@ ldapRealm.allowedRolesForAuthentication = 
admin_role,user_role
 ldapRealm.permissionsByRole= user_role = *:ToDoItemsJdo:*:*, *:ToDoItem:*:*; 
admin_role = *
 securityManager.sessionManager = $sessionManager
 securityManager.realms = $ldapRealm
- ```
+```
 
 ### PAM
 [PAM](https://en.wikipedia.org/wiki/Pluggable_authentication_module) 
authentication support allows the reuse of existing authentication 



[zeppelin] branch master updated: [ZEPPELIN-3944] Update Dockerfiles of spark_standalone and spark_yarn_cluster (#3282)

2019-01-16 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
 new 966a392  [ZEPPELIN-3944] Update Dockerfiles of spark_standalone and 
spark_yarn_cluster (#3282)
966a392 is described below

commit 966a39240237edfd72b067afe867a244fae6474a
Author: keineahnung2345 
AuthorDate: Wed Jan 16 16:10:05 2019 +0800

[ZEPPELIN-3944] Update Dockerfiles of spark_standalone and 
spark_yarn_cluster (#3282)

### What is this PR for?
Upgrade the Dockerfiles of spark_standalone and spark_yarn_cluster to 
CentOS7 and Spark 2.4.0.
Java remains in version 7 since hadoop 2.x depends on Java7.

### What type of PR is it?
Improvement

### What is the Jira issue?
* [ZEPPELIN-3944](https://issues.apache.org/jira/browse/ZEPPELIN-3944)

### How should this be tested?
* Follow the instructions here: 
[spark-standalone](https://zeppelin.apache.org/docs/0.8.0/setup/deployment/spark_cluster_mode.html#spark-standalone-mode)
 and 
[spark-yarn-cluster](https://zeppelin.apache.org/docs/0.8.0/setup/deployment/spark_cluster_mode.html#spark-on-yarn-mode)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

* Update spark_standalone Dockerfile

* update yarn dockerfile

* back to java 7

since hadoop 2.x depends on java 7

* back to java7

hadoop 2.x depends on java 7

* change the path to /xxx/.../jre-1.7.0-openjdk
---
 scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile   |  4 ++--
 .../docker/spark-cluster-managers/spark_standalone/Dockerfile  | 10 +-
 .../spark-cluster-managers/spark_yarn_cluster/Dockerfile   |  8 
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile 
b/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile
index 0eb26ca..b87838e 100644
--- a/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile
+++ b/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile
@@ -36,8 +36,8 @@ yum clean all
 # Remove old jdk
 RUN yum remove java; yum remove jdk
 
-# install jdk8
-RUN yum install -y java-1.8.0-openjdk-devel
+# install jdk7
+RUN yum install -y java-1.7.0-openjdk-devel
 ENV JAVA_HOME /usr/lib/jvm/java
 ENV PATH $PATH:$JAVA_HOME/bin
 
diff --git a/scripts/docker/spark-cluster-managers/spark_standalone/Dockerfile 
b/scripts/docker/spark-cluster-managers/spark_standalone/Dockerfile
index 8bf0f8d..e4fb780 100644
--- a/scripts/docker/spark-cluster-managers/spark_standalone/Dockerfile
+++ b/scripts/docker/spark-cluster-managers/spark_standalone/Dockerfile
@@ -12,10 +12,10 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-FROM centos:centos6
+FROM centos:centos7
 
-ENV SPARK_PROFILE 2.1
-ENV SPARK_VERSION 2.1.2
+ENV SPARK_PROFILE 2.4
+ENV SPARK_VERSION 2.4.0
 ENV HADOOP_PROFILE 2.7
 ENV SPARK_HOME /usr/local/spark
 
@@ -33,13 +33,13 @@ yum clean all
 # Remove old jdk
 RUN yum remove java; yum remove jdk
 
-# install jdk7 
+# install jdk7
 RUN yum install -y java-1.7.0-openjdk-devel
 ENV JAVA_HOME /usr/lib/jvm/java
 ENV PATH $PATH:$JAVA_HOME/bin
 
 # install spark
-RUN curl -s 
http://apache.mirror.cdnetworks.com/spark/spark-$SPARK_VERSION/spark-$SPARK_VERSION-bin-hadoop$HADOOP_PROFILE.tgz
 | tar -xz -C /usr/local/
+RUN curl -s 
http://www.apache.org/dist/spark/spark-$SPARK_VERSION/spark-$SPARK_VERSION-bin-hadoop$HADOOP_PROFILE.tgz
 | tar -xz -C /usr/local/
 RUN cd /usr/local && ln -s spark-$SPARK_VERSION-bin-hadoop$HADOOP_PROFILE spark
 
 # update boot script
diff --git 
a/scripts/docker/spark-cluster-managers/spark_yarn_cluster/Dockerfile 
b/scripts/docker/spark-cluster-managers/spark_yarn_cluster/Dockerfile
index cbbda20..da3df1c 100644
--- a/scripts/docker/spark-cluster-managers/spark_yarn_cluster/Dockerfile
+++ b/scripts/docker/spark-cluster-managers/spark_yarn_cluster/Dockerfile
@@ -12,10 +12,10 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-FROM centos:centos6
+FROM centos:centos7
 
-ENV SPARK_PROFILE 2.1
-ENV SPARK_VERSION 2.1.2
+ENV SPARK_PROFILE 2.4
+ENV SPARK_VERSION 2.4.0
 ENV HADOOP_PROFILE 2.7
 ENV HADOOP_VERSION 2.7.0
 
@@ -52,7 +52,7 @@ ENV HADOOP_MAPRED_HOME /usr/local/hadoop
 ENV HADOOP_YARN_HOME /usr/local/hadoop
 ENV HADOOP_CONF_DIR /usr/local/hadoop/etc/hadoop
 
-RUN sed -i '/^export JAVA_HOME/ s:.*:export 
JAVA_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64\nexport 
HADOOP_PREFIX=/usr/local/hadoop\nexport HADOOP_H

[zeppelin] branch master updated: [ZEPPELIN-3932] spark_mesos Dockerfile should be updated (#3279)

2019-01-04 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
 new 7bf79d8  [ZEPPELIN-3932] spark_mesos Dockerfile should be updated 
(#3279)
7bf79d8 is described below

commit 7bf79d80f5beaaafa3c0e18a96654e43a20a41f9
Author: keineahnung2345 
AuthorDate: Sat Jan 5 13:15:03 2019 +0800

[ZEPPELIN-3932] spark_mesos Dockerfile should be updated (#3279)

### What is this PR for?
In the [spark_mesos example - 
Dockerfile](https://github.com/apache/zeppelin/blob/master/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile),
 there are some issues.

1. The original used SPARK_VERSION=2.1.2 is not available now, update it to 
2.4.0
2. There is no package named libevent2-devel, it should be corrected to 
libevent-devel
3. Update from centos6 to centos7
4. Update from jdk7 to jdk8

 In the [spark_mesos example - 
entrypoint.sh](https://github.com/apache/zeppelin/blob/master/scripts/docker/spark-cluster-managers/spark_mesos/entrypoint.sh):

1. Follow the instructions: [zeppelin on spark mesos mode - configure spark 
interpreter in 
zeppelin](https://zeppelin.apache.org/docs/0.8.0/setup/deployment/spark_cluster_mode.html#4-configure-spark-interpreter-in-zeppelin-1)
 add the two environment variables.
2. add --hostname flag to the command mesos-master. This solves the problem 
of "Failed to connect to xx.xx.xx.xx:5050"(screenshot).


### What type of PR is

- Bug Fix

- Improvement


### What is the Jira issue?
* [ZEPPELIN-3932](https://issues.apache.org/jira/browse/ZEPPELIN-3932)

### How should this be tested?
* Follow the instructions here: 
[spark-on-mesos-mode](https://zeppelin.apache.org/docs/0.8.0/setup/deployment/spark_cluster_mode.html#spark-on-mesos-mode)

### Screenshots (if appropriate)

![image](https://user-images.githubusercontent.com/18047300/50578759-fa513080-0e78-11e9-8459-3a2aa5881a2c.png)

* update mesos Dockerfile

1. SPARK_VERSION 2.1.2 is not available anymore
2. centos cannot find libevent2-devel, but libevent-devel
3. update to centos7 and jdk8

* update entrypoint.sh according to tutorial

1. add environment variables MASTER and MESOS_NATIVE_JAVA_LIBRARY(from 
https://zeppelin.apache.org/docs/0.8.0/setup/deployment/spark_cluster_mode.html#4-configure-spark-interpreter-in-zeppelin-1)
2. add --hostname after mesos-master to solve the problem of "Failed to 
connect to xx.xx.xx.xx:5050"
---
 .../spark-cluster-managers/spark_mesos/Dockerfile  | 26 +++---
 .../spark_mesos/entrypoint.sh  |  4 +++-
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile 
b/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile
index 0afda57..0eb26ca 100644
--- a/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile
+++ b/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile
@@ -12,10 +12,10 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-FROM centos:centos6
+FROM centos:centos7
 
-ENV SPARK_PROFILE 2.1
-ENV SPARK_VERSION 2.1.2
+ENV SPARK_PROFILE 2.4
+ENV SPARK_VERSION 2.4.0
 ENV HADOOP_PROFILE 2.7
 ENV HADOOP_VERSION 2.7.0
 
@@ -29,15 +29,15 @@ tar \
 curl \
 svn \
 cyrus-sasl-md5 \
-libevent2-devel \
+libevent-devel \
 && \
 yum clean all
 
 # Remove old jdk
 RUN yum remove java; yum remove jdk
 
-# install jdk7
-RUN yum install -y java-1.7.0-openjdk-devel
+# install jdk8
+RUN yum install -y java-1.8.0-openjdk-devel
 ENV JAVA_HOME /usr/lib/jvm/java
 ENV PATH $PATH:$JAVA_HOME/bin
 
@@ -45,14 +45,9 @@ ENV PATH $PATH:$JAVA_HOME/bin
 RUN curl -s 
http://www.apache.org/dist/spark/spark-$SPARK_VERSION/spark-$SPARK_VERSION-bin-hadoop$HADOOP_PROFILE.tgz
 | tar -xz -C /usr/local/
 RUN cd /usr/local && ln -s spark-$SPARK_VERSION-bin-hadoop$HADOOP_PROFILE spark
 
-# update boot script
-COPY entrypoint.sh /etc/entrypoint.sh
-RUN chown root.root /etc/entrypoint.sh
-RUN chmod 700 /etc/entrypoint.sh
-
 # install mesos
-RUN wget 
http://repos.mesosphere.com/el/6/x86_64/RPMS/mesos-1.0.0-2.0.89.centos65.x86_64.rpm
-RUN rpm -Uvh mesos-1.0.0-2.0.89.centos65.x86_64.rpm
+RUN wget 
http://repos.mesosphere.com/el/7/x86_64/RPMS/mesos-1.7.0-2.0.1.el7.x86_64.rpm
+RUN rpm -Uvh mesos-1.7.0-2.0.1.el7.x86_64.rpm
 
 #spark
 EXPOSE 8080 7077 7072 8081 8082
@@ -60,4 +55,9 @@ EXPOSE 8080 7077 7072 8081 8082
 #mesos
 EXPOSE 5050 5051
 
+# update boot script
+COPY entrypoint.sh /etc/entrypoint.sh
+RUN chown root.root /etc/entrypoint.sh
+RUN chmod 700 /etc/entrypoint.sh
+
 ENTRYPOINT ["/etc/en

[zeppelin] branch master updated: [ZEPPELIN-3914] upgrade Flink to 1.7.1 (#3266)

2018-12-31 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
 new 13fd50e  [ZEPPELIN-3914] upgrade Flink to 1.7.1 (#3266)
13fd50e is described below

commit 13fd50ee535cd28b237cb4af740d0f893dbff3ae
Author: Xue Yu <278006...@qq.com>
AuthorDate: Tue Jan 1 09:22:42 2019 +0800

[ZEPPELIN-3914] upgrade Flink to 1.7.1 (#3266)

### What is this PR for?
This PR is for upgrading current Flink to 1.7.1

### What type of PR is it?
[Improvement]

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

### How should this be tested?
*manual

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update?
no
* Is there breaking changes for older versions?
no
* Does this needs documentation?
no
---
 docs/interpreter/flink.md   |  2 +-
 flink/pom.xml   |  2 +-
 .../apache/zeppelin/flink/FlinkSQLScalaInterpreter.scala|  2 +-
 .../org/apache/zeppelin/flink/FlinkScalaInterpreter.scala   | 13 -
 4 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/docs/interpreter/flink.md b/docs/interpreter/flink.md
index 2cf3125..d3f2223 100644
--- a/docs/interpreter/flink.md
+++ b/docs/interpreter/flink.md
@@ -50,7 +50,7 @@ At the "Interpreters" menu, you have to create a new Flink 
interpreter and provi
   
 
 
-For more information about Flink configuration, you can find it 
[here](https://ci.apache.org/projects/flink/flink-docs-release-1.0/setup/config.html).
+For more information about Flink configuration, you can find it 
[here](https://ci.apache.org/projects/flink/flink-docs-release-1.7/ops/config.html).
 
 ## How to test it's working
 You can find an example of Flink usage in the Zeppelin Tutorial folder or try 
the following word count example, by using the [Zeppelin 
notebook](https://www.zeppelinhub.com/viewer/notebooks/aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL05GTGFicy96ZXBwZWxpbi1ub3RlYm9va3MvbWFzdGVyL25vdGVib29rcy8yQVFFREs1UEMvbm90ZS5qc29u)
 from Till Rohrmann's presentation [Interactive data analysis with Apache 
Flink](http://www.slideshare.net/tillrohrmann/data-analysis-49806564) for 
Apache Flink Meetup.
diff --git a/flink/pom.xml b/flink/pom.xml
index 7a374f2..331e19c 100644
--- a/flink/pom.xml
+++ b/flink/pom.xml
@@ -36,7 +36,7 @@
   
 
 flink
-1.5.2
+1.7.1
 2.3.7
 2.0.1
 2.11
diff --git 
a/flink/src/main/scala/org/apache/zeppelin/flink/FlinkSQLScalaInterpreter.scala 
b/flink/src/main/scala/org/apache/zeppelin/flink/FlinkSQLScalaInterpreter.scala
index 1694a44..b2d8d16 100644
--- 
a/flink/src/main/scala/org/apache/zeppelin/flink/FlinkSQLScalaInterpreter.scala
+++ 
b/flink/src/main/scala/org/apache/zeppelin/flink/FlinkSQLScalaInterpreter.scala
@@ -30,7 +30,7 @@ class FlinkSQLScalaInterpreter(scalaInterpreter: 
FlinkScalaInterpreter,
 
   def interpret(code: String, context: InterpreterContext): InterpreterResult 
= {
 try {
-  val table: Table = this.btenv.sql(code)
+  val table: Table = this.btenv.sqlQuery(code)
   val result = z.showData(table)
   return new InterpreterResult(InterpreterResult.Code.SUCCESS, result)
 } catch {
diff --git 
a/flink/src/main/scala/org/apache/zeppelin/flink/FlinkScalaInterpreter.scala 
b/flink/src/main/scala/org/apache/zeppelin/flink/FlinkScalaInterpreter.scala
index 14f8959..1d8b27e 100644
--- a/flink/src/main/scala/org/apache/zeppelin/flink/FlinkScalaInterpreter.scala
+++ b/flink/src/main/scala/org/apache/zeppelin/flink/FlinkScalaInterpreter.scala
@@ -26,7 +26,7 @@ import org.apache.flink.api.scala.FlinkShell._
 import org.apache.flink.api.scala.{ExecutionEnvironment, FlinkILoop}
 import org.apache.flink.client.program.ClusterClient
 import org.apache.flink.configuration.GlobalConfiguration
-import org.apache.flink.runtime.minicluster.{MiniCluster, 
StandaloneMiniCluster}
+import org.apache.flink.runtime.minicluster.MiniCluster
 import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment
 import org.apache.flink.table.api.TableEnvironment
 import org.apache.flink.table.api.scala.{BatchTableEnvironment, 
StreamTableEnvironment}
@@ -45,8 +45,7 @@ class FlinkScalaInterpreter(val properties: Properties) {
   lazy val LOGGER: Logger = LoggerFactory.getLogger(getClass)
 
   private var flinkILoop: FlinkILoop = _
-  private var cluster: Option[Either[Either[StandaloneMiniCluster, 
MiniCluster],
-ClusterClient[_]]] = _
+  private var cluster: Option[Either[MiniCluster, ClusterClient[_]]] = _
   private var scalaCompleter: ScalaCompleter = _
   private val interpreterOutput = new InterpreterOutputStream(LOGGER)
 
@@ -68,8 +67,7 @@ class FlinkScalaInterpreter(val properties: Proper

[zeppelin] branch master updated: docs: fix punctuation (#3197)

2018-12-30 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
 new c20c830  docs: fix punctuation (#3197)
c20c830 is described below

commit c20c8304bdc9cce2edd931f0d58d6f40a8fed39a
Author: Gerard de Melo 
AuthorDate: Mon Dec 31 00:07:19 2018 +0100

docs: fix punctuation (#3197)

### What is this PR for?
Minor update to fix punctuation-related typos in 
docs/usage/interpreter/overview.md

### What type of PR is it?
Documentation
---
 docs/usage/interpreter/overview.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/usage/interpreter/overview.md 
b/docs/usage/interpreter/overview.md
index 6580a59..da59076 100644
--- a/docs/usage/interpreter/overview.md
+++ b/docs/usage/interpreter/overview.md
@@ -139,8 +139,8 @@ This approach works, but is not particularly convenient. 
`ConfInterpreter` can p
 
 `ConfInterpreter` is a generic interpreter that can be used by any 
interpreter. The input format should be the property file format.
 It can be used to make custom settings for any interpreter. However, 
`ConfInterpreter` needs to be run before that interpreter process is launched. 
When that interpreter process is launched is determined by the interpreter mode 
setting.
-So users need to understand the ([interpreter mode setting 
](../usage/interpreter/interpreter_bindings_mode.html) of Zeppelin and be aware 
of when the interpreter process is launched. E.g., if we set the Spark 
interpreter setting as isolated per note, then, under this setting, each note 
will launch one interpreter process. 
-In this scenario, users need to put `ConfInterpreter` as the first paragraph 
as in the below example. Otherwise, the customized setting cannot be applied 
(actually it would report ERROR)
+So users need to understand the [interpreter mode 
setting](../usage/interpreter/interpreter_bindings_mode.html) of Zeppelin and 
be aware of when the interpreter process is launched. E.g., if we set the Spark 
interpreter setting as isolated per note, then, under this setting, each note 
will launch one interpreter process. 
+In this scenario, users need to put `ConfInterpreter` as the first paragraph 
as in the below example. Otherwise, the customized setting cannot be applied 
(actually it would report ERROR).
 
 
 



[zeppelin] branch master updated: [ZEPPELIN-3864] Fix Travis tests

2018-12-25 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
 new 6639025  [ZEPPELIN-3864] Fix Travis tests
6639025 is described below

commit 663902518762cbad2fdc4efa3d552ad13effe4b0
Author: Savalek - Aleksey Savelenko <30798933+sava...@users.noreply.github.com>
AuthorDate: Tue Dec 25 22:35:45 2018 +0300

[ZEPPELIN-3864] Fix Travis tests

### What is this PR for?
Maven `frontend plugin v1.4` incorrectly processed `npm` messages with 
error.
This PR update `frontend plugin` to 1.6 from 1.4.

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

### What is the Jira issue?
[ZEPPELIN-3864](https://issues.apache.org/jira/browse/ZEPPELIN-3864),
[ZP-70]

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
---
 pom.xml|  2 +-
 zeppelin-web/e2e/searchBlock.spec.js   |  2 ++
 zeppelin-web/package.json  | 12 
 zeppelin-web/pom.xml   |  2 +-
 .../src/app/notebook/notebook.controller.js| 22 +++--
 .../src/app/notebook/notebook.controller.test.js   |  1 +
 .../note-create/note-create.controller.test.js | 10 +++---
 .../components/note-list/note-list.factory.test.js | 36 +++---
 zeppelin-web/webpack.config.js |  5 +--
 9 files changed, 49 insertions(+), 43 deletions(-)

diff --git a/pom.xml b/pom.xml
index 2465009..04a6ad8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -102,7 +102,7 @@
 
 v8.9.3
 5.5.1
-1.4
+1.6
 
 
 1.7.10
diff --git a/zeppelin-web/e2e/searchBlock.spec.js 
b/zeppelin-web/e2e/searchBlock.spec.js
index 570673b..a146e47 100644
--- a/zeppelin-web/e2e/searchBlock.spec.js
+++ b/zeppelin-web/e2e/searchBlock.spec.js
@@ -20,6 +20,8 @@ describe('Search block e2e Test', function() {
 
   beforeEach(function() {
 browser.get('http://localhost:8080')
+browser.sleep(500);
+waitVisibility(element(by.linkText('Create new note')))
 clickOn(element(by.linkText('Create new note')))
 waitVisibility(element(by.id('noteCreateModal')))
 clickAndWait(element(by.id('createNoteButton')))
diff --git a/zeppelin-web/package.json b/zeppelin-web/package.json
index 69248c6..de83a62 100644
--- a/zeppelin-web/package.json
+++ b/zeppelin-web/package.json
@@ -22,7 +22,7 @@
 "pree2e": "webdriver-manager update --gecko false --versions.chrome=2.35",
 "e2e": "protractor protractor.conf.js",
 "pretest": "npm rebuild phantomjs-prebuilt",
-"test": "karma start karma.conf.js"
+"karma-test": "karma start karma.conf.js"
   },
   "dependencies": {
 "angular-ui-grid": "4.4.6",
@@ -78,15 +78,15 @@
 "html-webpack-plugin": "^3.2.0",
 "imports-loader": "^0.7.1",
 "istanbul-instrumenter-loader": "^0.2.0",
-"jasmine-core": "^2.5.2",
-"jasmine-spec-reporter": "^4.1.1",
-"karma": "~1.3.0",
+"jasmine-core": "^3.3.0",
+"jasmine-spec-reporter": "^4.2.1",
+"karma": "~3.1.3",
 "karma-coverage": "^1.1.2",
-"karma-jasmine": "~1.0.2",
+"karma-jasmine": "~2.0.1",
 "karma-phantomjs-launcher": "^1.0.4",
 "karma-sourcemap-loader": "^0.3.7",
 "karma-spec-reporter": "0.0.31",
-"karma-webpack": "^1.8.1",
+"karma-webpack": "^3.0.5",
 "load-grunt-tasks": "^0.4.0",
 "mini-css-extract-plugin": "^0.4.4",
 "ng-annotate-loader": "^0.2.0",
diff --git a/zeppelin-web/pom.xml b/zeppelin-web/pom.xml
index 498803b..7de15dc 100644
--- a/zeppelin-web/pom.xml
+++ b/zeppelin-web/pom.xml
@@ -111,7 +111,7 @@
 test
 
   ${web.e2e.disabled}
-  run test
+  run karma-test
 
   
 
diff --git a/zeppelin-web/src/app/notebook/notebook.controller.js 
b/zeppelin-web/src/app/notebook/notebook.controller.js
index 2f1437d..426667d 100644
--- a/zeppelin-web/src/app/notebook/notebook.controller.js
+++ b/zeppelin-web/src/app/notebook/notebook.controller.js
@@ -1579,14 +1579,16 @@ function NotebookCtrl($scope, $route, $routeParams, 
$location, $rootScope,
   });
 
   let content = document.getElementById('content');
-  $scope.addEvent({
-eventID: co

[zeppelin] branch branch-0.8 updated: [ZEPPELIN-3553] Fix URLs on "Multi-user Support" page

2018-12-25 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch branch-0.8
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/branch-0.8 by this push:
 new 2c2deb1  [ZEPPELIN-3553] Fix URLs on "Multi-user Support" page
2c2deb1 is described below

commit 2c2deb1891b8700d3d9d68695891e09e3139a48d
Author: mebelousov 
AuthorDate: Tue Jun 19 16:38:10 2018 +0300

[ZEPPELIN-3553] Fix URLs on "Multi-user Support" page

### What is this PR for?
On page Setup > Multi-user Support 
http://zeppelin.apache.org/docs/0.8.0-SNAPSHOT/setup/basics/multi_user_support.html
there are two urls:
* Shiro Authentication - 
http://zeppelin.apache.org/docs/0.8.0-SNAPSHOT/setup/setup/security/shiro_authentication.html
* Notebook Permission - 
http://zeppelin.apache.org/docs/0.8.0-SNAPSHOT/setup/setup/security/notebook_authorization.html

Need to remove one of the "setup"

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

### What is the Jira issue?
[ZEPPELIN-3553](https://issues.apache.org/jira/browse/ZEPPELIN-3553)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: mebelousov 

Closes #3035 from mebelousov/ZEPPELIN-3553 and squashes the following 
commits:

100a2af06 [mebelousov] ZEPPELIN-3553 Fix URLs for "Notebook Permission" and 
"Shiro Authentication"

(cherry picked from commit efdc16d71c1c66e46ea67de21a4b1185f85c10f5)
Signed-off-by: Felix Cheung 
---
 docs/setup/basics/multi_user_support.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/setup/basics/multi_user_support.md 
b/docs/setup/basics/multi_user_support.md
index 15d911c..e61b723 100644
--- a/docs/setup/basics/multi_user_support.md
+++ b/docs/setup/basics/multi_user_support.md
@@ -25,8 +25,8 @@ limitations under the License.
 
 This page describes about multi-user support.
 
-- multiple users login / logout using [Shiro 
Authentication](../setup/security/shiro_authentication.html)
-- managing [Notebook Permission](../setup/security/notebook_authorization.html)
+- multiple users login / logout using [Shiro 
Authentication](../security/shiro_authentication.html)
+- managing [Notebook Permission](../security/notebook_authorization.html)
 - how to setup [impersonation for 
interpreters](../../usage/interpreter/user_impersonation.html)
 - different contexts per user / note using [Interpreter Binding 
Mode](../../usage/interpreter/interpreter_binding_mode.html)
 - a paragraph in a notebook can be 
[Personalized](../../usage/other_features/personalized_mode.html) 



[zeppelin] branch master updated: Revert "[ZEPPELIN-3882] Neo4jInterpreter - Support Point and Date Types" (#3270)

2018-12-20 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
 new 45fa3fd  Revert "[ZEPPELIN-3882] Neo4jInterpreter - Support Point and 
Date Types" (#3270)
45fa3fd is described below

commit 45fa3fdac0c79f78f6d0416e1bbfce281ef4e0df
Author: Felix Cheung 
AuthorDate: Fri Dec 21 02:03:48 2018 -0500

Revert "[ZEPPELIN-3882] Neo4jInterpreter - Support Point and Date Types" 
(#3270)

* Revert "fix checkstyle"

This reverts commit 5542262568b3532fd11e2832d3168b386f35b3d6.

* Revert "Added support for Neo4j temporal and point types"

This reverts commit b98ccea98996eda183382a332379f3cfc428c0e9.

* Revert "Added support for Neo4j temporal and point types"

This reverts commit 0fbcddae980ff245eead964e8a5e0ee0f1a6.
---
 docs/interpreter/neo4j.md  |   3 -
 neo4j/pom.xml  |   6 +-
 .../graph/neo4j/Neo4jCypherInterpreter.java|  14 ---
 .../graph/neo4j/Neo4jCypherInterpreterTest.java| 105 -
 4 files changed, 20 insertions(+), 108 deletions(-)

diff --git a/docs/interpreter/neo4j.md b/docs/interpreter/neo4j.md
index eec9e07..1b14127 100644
--- a/docs/interpreter/neo4j.md
+++ b/docs/interpreter/neo4j.md
@@ -26,9 +26,6 @@ limitations under the License.
 ## Overview
 [Neo4j](https://neo4j.com/product/) is a native graph database, designed to 
store and process graphs from bottom to top.
 
-### Supported Version
-
-The Neo4j Interpreter supports all Neo4j versions since v3 via the official 
[Neo4j Java Driver](https://github.com/neo4j/neo4j-java-driver)
 
 ![Neo4j - Interpreter - 
Video]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/neo4j-interpreter-video.gif)
 
diff --git a/neo4j/pom.xml b/neo4j/pom.xml
index cc39fdc..b8a89ad 100644
--- a/neo4j/pom.xml
+++ b/neo4j/pom.xml
@@ -33,9 +33,9 @@
   Zeppelin: Neo4j interpreter
   
   
-   1.7.1
-   3.4.10
-   3.4.10
+   1.4.3
+   3.2.3
+   3.2.3
2.8.9
 neo4j
   
diff --git 
a/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreter.java
 
b/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreter.java
index d7f8485..bcb9d7b 100644
--- 
a/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreter.java
+++ 
b/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreter.java
@@ -201,20 +201,6 @@ public class Neo4jCypherInterpreter extends Interpreter {
   value = val.asList();
 } else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.MAP())) {
   value = val.asMap();
-} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.POINT())) {
-  value = val.asPoint();
-} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.DATE())) {
-  value = val.asLocalDate();
-} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.TIME())) {
-  value = val.asOffsetTime();
-} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.LOCAL_TIME())) {
-  value = val.asLocalTime();
-} else if 
(val.hasType(InternalTypeSystem.TYPE_SYSTEM.LOCAL_DATE_TIME())) {
-  value = val.asLocalDateTime();
-} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.DATE_TIME())) {
-  value = val.asZonedDateTime();
-} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.DURATION())) {
-  value = val.asIsoDuration();
 }
   }
   if (value instanceof Collection) {
diff --git 
a/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
 
b/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
index 7940d5f..24bd513 100644
--- 
a/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
+++ 
b/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
@@ -55,15 +55,10 @@ public class Neo4jCypherInterpreterTest {
   private static final String REL_KNOWS = "KNOWS";
 
   private static final String CYPHER_FOREACH =
-  "FOREACH (x in range(1,100) | CREATE (:%s{name: \"name\" + x, age: 
%s, " +
-  "address: point({ longitude: 56.7, latitude: 12.78, height: 
8 }), " +
-  "birth: date('1984-04-04')}))";
-  private static final String CHPHER_UNWIND = "UNWIND range(1,100) as x "
-+ "MATCH (n), (m) WHERE id(n) = x AND id(m) = toInt(rand() * 100) "
+  "FOREACH (x in range(1,1000) | CREATE (:%s{name: \"name\" + x, age: 
%s}))";
+  private static final String CHPHER_UNWIND = "UNWIND range(1,1000) as x "
++ "MATCH (n), (m) WHERE id(n) = x AND id(m) = to

[zeppelin] branch revert-3244-update-neo4j-datatypes created (now 7ae0e41)

2018-12-20 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a change to branch revert-3244-update-neo4j-datatypes
in repository https://gitbox.apache.org/repos/asf/zeppelin.git.


  at 7ae0e41  Revert "Added support for Neo4j temporal and point types"

This branch includes the following new commits:

 new 4ddee85  Revert "fix checkstyle"
 new 0193be5  Revert "Added support for Neo4j temporal and point types"
 new 7ae0e41  Revert "Added support for Neo4j temporal and point types"

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[zeppelin] 01/03: Revert "fix checkstyle"

2018-12-20 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch revert-3244-update-neo4j-datatypes
in repository https://gitbox.apache.org/repos/asf/zeppelin.git

commit 4ddee8579401c4bbf59f714a9972538684f555e5
Author: Felix Cheung 
AuthorDate: Thu Dec 20 23:03:14 2018 -0800

Revert "fix checkstyle"

This reverts commit 5542262568b3532fd11e2832d3168b386f35b3d6.
---
 .../graph/neo4j/Neo4jCypherInterpreter.java|  14 ---
 .../graph/neo4j/Neo4jCypherInterpreterTest.java| 101 +++--
 2 files changed, 15 insertions(+), 100 deletions(-)

diff --git 
a/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreter.java
 
b/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreter.java
index d7f8485..bcb9d7b 100644
--- 
a/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreter.java
+++ 
b/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreter.java
@@ -201,20 +201,6 @@ public class Neo4jCypherInterpreter extends Interpreter {
   value = val.asList();
 } else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.MAP())) {
   value = val.asMap();
-} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.POINT())) {
-  value = val.asPoint();
-} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.DATE())) {
-  value = val.asLocalDate();
-} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.TIME())) {
-  value = val.asOffsetTime();
-} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.LOCAL_TIME())) {
-  value = val.asLocalTime();
-} else if 
(val.hasType(InternalTypeSystem.TYPE_SYSTEM.LOCAL_DATE_TIME())) {
-  value = val.asLocalDateTime();
-} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.DATE_TIME())) {
-  value = val.asZonedDateTime();
-} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.DURATION())) {
-  value = val.asIsoDuration();
 }
   }
   if (value instanceof Collection) {
diff --git 
a/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
 
b/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
index 7940d5f..f44cd77 100644
--- 
a/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
+++ 
b/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
@@ -55,15 +55,10 @@ public class Neo4jCypherInterpreterTest {
   private static final String REL_KNOWS = "KNOWS";
 
   private static final String CYPHER_FOREACH =
-  "FOREACH (x in range(1,100) | CREATE (:%s{name: \"name\" + x, age: 
%s, " +
-  "address: point({ longitude: 56.7, latitude: 12.78, height: 
8 }), " +
-  "birth: date('1984-04-04')}))";
+  "FOREACH (x in range(1,100) | CREATE (:%s{name: \"name\" + x, age: 
%s, address: point({ longitude: 56.7, latitude: 12.78, height: 8 }), birth: 
date('1984-04-04')}))";
   private static final String CHPHER_UNWIND = "UNWIND range(1,100) as x "
 + "MATCH (n), (m) WHERE id(n) = x AND id(m) = toInt(rand() * 100) "
 + "CREATE (n)-[:%s]->(m)";
-  
-  private static final String TABLE_RESULT_PREFIX = "%table ";
-  private static final String NETWORK_RESULT_PREFIX = "%network ";
 
   @BeforeClass
   public static void setUpNeo4jServer() throws Exception {
@@ -78,7 +73,7 @@ public class Neo4jCypherInterpreterTest {
   public static void tearDownNeo4jServer() throws Exception {
 server.close();
   }
-
+  
   @Before
   public void setUpZeppelin() {
 Properties p = new Properties();
@@ -88,7 +83,7 @@ public class Neo4jCypherInterpreterTest {
 interpreter = new Neo4jCypherInterpreter(p);
 context = InterpreterContext.builder()
 .setInterpreterOut(new InterpreterOutput(null))
-.build();
+.build();;
   }
 
   @After
@@ -103,15 +98,14 @@ public class Neo4jCypherInterpreterTest {
 "return 'a' as colA, 'b' as colB, [1, 2, 3] as colC", context);
 assertEquals(Code.SUCCESS, result.code());
 final String tableResult = "colA\tcolB\tcolC\n\"a\"\t\"b\"\t[1,2,3]\n";
-assertEquals(tableResult, result.toString().replace(TABLE_RESULT_PREFIX, 
StringUtils.EMPTY));
-
+assertEquals(tableResult, result.toString().replace("%table ", 
StringUtils.EMPTY));
+
 result = interpreter.interpret(
 "return 'a' as colA, 'b' as colB, [{key: \"value\"}, {key: 1}] as 
colC", context);
 assertEquals(Code.SUCCESS, result.code());
 final String tableResultWithMap =
 
"colA\tcolB\tcolC\n\"a\"\t\"b\"\t[{\"key\":\"value\"},{\"key\":1

[zeppelin] 02/03: Revert "Added support for Neo4j temporal and point types"

2018-12-20 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch revert-3244-update-neo4j-datatypes
in repository https://gitbox.apache.org/repos/asf/zeppelin.git

commit 0193be5b312845f4ea4fed737a0441b001e1b403
Author: Felix Cheung 
AuthorDate: Thu Dec 20 23:03:14 2018 -0800

Revert "Added support for Neo4j temporal and point types"

This reverts commit b98ccea98996eda183382a332379f3cfc428c0e9.
---
 docs/interpreter/neo4j.md | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/docs/interpreter/neo4j.md b/docs/interpreter/neo4j.md
index eec9e07..1b14127 100644
--- a/docs/interpreter/neo4j.md
+++ b/docs/interpreter/neo4j.md
@@ -26,9 +26,6 @@ limitations under the License.
 ## Overview
 [Neo4j](https://neo4j.com/product/) is a native graph database, designed to 
store and process graphs from bottom to top.
 
-### Supported Version
-
-The Neo4j Interpreter supports all Neo4j versions since v3 via the official 
[Neo4j Java Driver](https://github.com/neo4j/neo4j-java-driver)
 
 ![Neo4j - Interpreter - 
Video]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/neo4j-interpreter-video.gif)
 



[zeppelin] 03/03: Revert "Added support for Neo4j temporal and point types"

2018-12-20 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch revert-3244-update-neo4j-datatypes
in repository https://gitbox.apache.org/repos/asf/zeppelin.git

commit 7ae0e418a15540fffb2402391d122219e6819234
Author: Felix Cheung 
AuthorDate: Thu Dec 20 23:03:14 2018 -0800

Revert "Added support for Neo4j temporal and point types"

This reverts commit 0fbcddae980ff245eead964e8a5e0ee0f1a6.
---
 neo4j/pom.xml   | 6 +++---
 .../org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/neo4j/pom.xml b/neo4j/pom.xml
index cc39fdc..b8a89ad 100644
--- a/neo4j/pom.xml
+++ b/neo4j/pom.xml
@@ -33,9 +33,9 @@
   Zeppelin: Neo4j interpreter
   
   
-   1.7.1
-   3.4.10
-   3.4.10
+   1.4.3
+   3.2.3
+   3.2.3
2.8.9
 neo4j
   
diff --git 
a/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
 
b/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
index f44cd77..24bd513 100644
--- 
a/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
+++ 
b/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
@@ -55,9 +55,9 @@ public class Neo4jCypherInterpreterTest {
   private static final String REL_KNOWS = "KNOWS";
 
   private static final String CYPHER_FOREACH =
-  "FOREACH (x in range(1,100) | CREATE (:%s{name: \"name\" + x, age: 
%s, address: point({ longitude: 56.7, latitude: 12.78, height: 8 }), birth: 
date('1984-04-04')}))";
-  private static final String CHPHER_UNWIND = "UNWIND range(1,100) as x "
-+ "MATCH (n), (m) WHERE id(n) = x AND id(m) = toInt(rand() * 100) "
+  "FOREACH (x in range(1,1000) | CREATE (:%s{name: \"name\" + x, age: 
%s}))";
+  private static final String CHPHER_UNWIND = "UNWIND range(1,1000) as x "
++ "MATCH (n), (m) WHERE id(n) = x AND id(m) = toInt(rand() * 1000) "
 + "CREATE (n)-[:%s]->(m)";
 
   @BeforeClass



[zeppelin] 02/03: Added support for Neo4j temporal and point types

2018-12-19 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git

commit b98ccea98996eda183382a332379f3cfc428c0e9
Author: Andrea Santurbano 
AuthorDate: Mon Nov 26 23:48:06 2018 +0100

Added support for Neo4j temporal and point types
---
 docs/interpreter/neo4j.md | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/docs/interpreter/neo4j.md b/docs/interpreter/neo4j.md
index 1b14127..eec9e07 100644
--- a/docs/interpreter/neo4j.md
+++ b/docs/interpreter/neo4j.md
@@ -26,6 +26,9 @@ limitations under the License.
 ## Overview
 [Neo4j](https://neo4j.com/product/) is a native graph database, designed to 
store and process graphs from bottom to top.
 
+### Supported Version
+
+The Neo4j Interpreter supports all Neo4j versions since v3 via the official 
[Neo4j Java Driver](https://github.com/neo4j/neo4j-java-driver)
 
 ![Neo4j - Interpreter - 
Video]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/neo4j-interpreter-video.gif)
 



[zeppelin] branch master updated (a6f4562 -> 5542262)

2018-12-19 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git.


from a6f4562  [ZEPPELIN-3902]upgrade jetty version
 new 0fbcd11  Added support for Neo4j temporal and point types
 new b98ccea  Added support for Neo4j temporal and point types
 new 5542262  fix checkstyle

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/interpreter/neo4j.md  |   3 +
 neo4j/pom.xml  |   6 +-
 .../graph/neo4j/Neo4jCypherInterpreter.java|  14 +++
 .../graph/neo4j/Neo4jCypherInterpreterTest.java| 105 +
 4 files changed, 108 insertions(+), 20 deletions(-)



[zeppelin] 03/03: fix checkstyle

2018-12-19 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git

commit 5542262568b3532fd11e2832d3168b386f35b3d6
Author: Andrea Santurbano 
AuthorDate: Thu Nov 29 09:44:11 2018 +0100

fix checkstyle
---
 .../graph/neo4j/Neo4jCypherInterpreter.java|  14 +++
 .../graph/neo4j/Neo4jCypherInterpreterTest.java| 101 ++---
 2 files changed, 100 insertions(+), 15 deletions(-)

diff --git 
a/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreter.java
 
b/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreter.java
index bcb9d7b..d7f8485 100644
--- 
a/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreter.java
+++ 
b/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreter.java
@@ -201,6 +201,20 @@ public class Neo4jCypherInterpreter extends Interpreter {
   value = val.asList();
 } else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.MAP())) {
   value = val.asMap();
+} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.POINT())) {
+  value = val.asPoint();
+} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.DATE())) {
+  value = val.asLocalDate();
+} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.TIME())) {
+  value = val.asOffsetTime();
+} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.LOCAL_TIME())) {
+  value = val.asLocalTime();
+} else if 
(val.hasType(InternalTypeSystem.TYPE_SYSTEM.LOCAL_DATE_TIME())) {
+  value = val.asLocalDateTime();
+} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.DATE_TIME())) {
+  value = val.asZonedDateTime();
+} else if (val.hasType(InternalTypeSystem.TYPE_SYSTEM.DURATION())) {
+  value = val.asIsoDuration();
 }
   }
   if (value instanceof Collection) {
diff --git 
a/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
 
b/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
index f44cd77..7940d5f 100644
--- 
a/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
+++ 
b/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
@@ -55,10 +55,15 @@ public class Neo4jCypherInterpreterTest {
   private static final String REL_KNOWS = "KNOWS";
 
   private static final String CYPHER_FOREACH =
-  "FOREACH (x in range(1,100) | CREATE (:%s{name: \"name\" + x, age: 
%s, address: point({ longitude: 56.7, latitude: 12.78, height: 8 }), birth: 
date('1984-04-04')}))";
+  "FOREACH (x in range(1,100) | CREATE (:%s{name: \"name\" + x, age: 
%s, " +
+  "address: point({ longitude: 56.7, latitude: 12.78, height: 
8 }), " +
+  "birth: date('1984-04-04')}))";
   private static final String CHPHER_UNWIND = "UNWIND range(1,100) as x "
 + "MATCH (n), (m) WHERE id(n) = x AND id(m) = toInt(rand() * 100) "
 + "CREATE (n)-[:%s]->(m)";
+  
+  private static final String TABLE_RESULT_PREFIX = "%table ";
+  private static final String NETWORK_RESULT_PREFIX = "%network ";
 
   @BeforeClass
   public static void setUpNeo4jServer() throws Exception {
@@ -73,7 +78,7 @@ public class Neo4jCypherInterpreterTest {
   public static void tearDownNeo4jServer() throws Exception {
 server.close();
   }
-  
+
   @Before
   public void setUpZeppelin() {
 Properties p = new Properties();
@@ -83,7 +88,7 @@ public class Neo4jCypherInterpreterTest {
 interpreter = new Neo4jCypherInterpreter(p);
 context = InterpreterContext.builder()
 .setInterpreterOut(new InterpreterOutput(null))
-.build();;
+.build();
   }
 
   @After
@@ -98,14 +103,15 @@ public class Neo4jCypherInterpreterTest {
 "return 'a' as colA, 'b' as colB, [1, 2, 3] as colC", context);
 assertEquals(Code.SUCCESS, result.code());
 final String tableResult = "colA\tcolB\tcolC\n\"a\"\t\"b\"\t[1,2,3]\n";
-assertEquals(tableResult, result.toString().replace("%table ", 
StringUtils.EMPTY));
-
+assertEquals(tableResult, result.toString().replace(TABLE_RESULT_PREFIX, 
StringUtils.EMPTY));
+
 result = interpreter.interpret(
 "return 'a' as colA, 'b' as colB, [{key: \"value\"}, {key: 1}] as 
colC", context);
 assertEquals(Code.SUCCESS, result.code());
 final String tableResultWithMap =
 
"colA\tcolB\tcolC\n\"a\"\t\"b\"\t[{\"key\":\"value\"},{\"key\":1}]\n";
-assertEquals(tableResultWithMap, result.toString().replace("%table ", 
StringUtils.

[zeppelin] 01/03: Added support for Neo4j temporal and point types

2018-12-19 Thread felixcheung
This is an automated email from the ASF dual-hosted git repository.

felixcheung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git

commit 0fbcddae980ff245eead964e8a5e0ee0f1a6
Author: Andrea Santurbano 
AuthorDate: Mon Nov 26 23:48:06 2018 +0100

Added support for Neo4j temporal and point types
---
 neo4j/pom.xml   | 6 +++---
 .../org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/neo4j/pom.xml b/neo4j/pom.xml
index b8a89ad..cc39fdc 100644
--- a/neo4j/pom.xml
+++ b/neo4j/pom.xml
@@ -33,9 +33,9 @@
   Zeppelin: Neo4j interpreter
   
   
-   1.4.3
-   3.2.3
-   3.2.3
+   1.7.1
+   3.4.10
+   3.4.10
2.8.9
 neo4j
   
diff --git 
a/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
 
b/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
index 24bd513..f44cd77 100644
--- 
a/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
+++ 
b/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
@@ -55,9 +55,9 @@ public class Neo4jCypherInterpreterTest {
   private static final String REL_KNOWS = "KNOWS";
 
   private static final String CYPHER_FOREACH =
-  "FOREACH (x in range(1,1000) | CREATE (:%s{name: \"name\" + x, age: 
%s}))";
-  private static final String CHPHER_UNWIND = "UNWIND range(1,1000) as x "
-+ "MATCH (n), (m) WHERE id(n) = x AND id(m) = toInt(rand() * 1000) "
+  "FOREACH (x in range(1,100) | CREATE (:%s{name: \"name\" + x, age: 
%s, address: point({ longitude: 56.7, latitude: 12.78, height: 8 }), birth: 
date('1984-04-04')}))";
+  private static final String CHPHER_UNWIND = "UNWIND range(1,100) as x "
++ "MATCH (n), (m) WHERE id(n) = x AND id(m) = toInt(rand() * 100) "
 + "CREATE (n)-[:%s]->(m)";
 
   @BeforeClass



zeppelin git commit: Copy-editing overview.md

2018-09-24 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 86ee813e4 -> 6c623d323


Copy-editing overview.md

Extensive grammar revisions for zeppelin/docs/usage/interpreter/overview.md

### What is this PR for?
The documentation at zeppelin/docs/usage/interpreter/overview.md contained 
numerous instances of bad grammar. This PR improves it.

### What type of PR is it?
Documentation

Author: Gerard de Melo 
Author: User 

Closes #3185 from gdemelo/patch-1 and squashes the following commits:

b16ddf2 [User] Minor changes to wording
8b7773b [Gerard de Melo] Copy-editing overview.md


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

Branch: refs/heads/master
Commit: 6c623d323fa04350d89b076cd2b3a760433370fc
Parents: 86ee813
Author: Gerard de Melo 
Authored: Sun Sep 23 20:37:51 2018 -0400
Committer: Felix Cheung 
Committed: Mon Sep 24 17:59:52 2018 -0700

--
 docs/usage/interpreter/overview.md | 80 -
 1 file changed, 39 insertions(+), 41 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6c623d32/docs/usage/interpreter/overview.md
--
diff --git a/docs/usage/interpreter/overview.md 
b/docs/usage/interpreter/overview.md
index 5b567c7..6580a59 100644
--- a/docs/usage/interpreter/overview.md
+++ b/docs/usage/interpreter/overview.md
@@ -1,7 +1,7 @@
 ---
 layout: page
 title: "Interpreter in Apache Zeppelin"
-description: "This document explains about the role of interpreters, 
interpreters group and interpreter settings in Apache Zeppelin. The concept of 
Zeppelin interpreter allows any language/data-processing-backend to be plugged 
into Zeppelin."
+description: "This document explains the role of interpreters, interpreter 
groups and interpreter settings in Apache Zeppelin. The concept of Zeppelin 
interpreters allows any language or data-processing backend to be plugged into 
Zeppelin."
 group: usage/interpreter 
 ---
 

zeppelin git commit: [ZEPPELIN-3753] Fix indent with TAB

2018-09-02 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 26b554d64 -> 57601f819


[ZEPPELIN-3753] Fix indent with TAB

### What is this PR for?
Now when you select multiline text and press TAB, text replaces with "\t" char.
With this PR text just shift right if TAB have been pressed.

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

### What is the Jira issue?
 
[ZEPPELIN-3753](https://issues.apache.org/jira/projects/ZEPPELIN/issues/ZEPPELIN-3753)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: oxygen311 

Closes #3168 from oxygen311/DW-18011 and squashes the following commits:

941b832 [oxygen311] Fix indent with TAB


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

Branch: refs/heads/master
Commit: 57601f819977063d622e3acbcc2f2b8710087697
Parents: 26b554d
Author: oxygen311 
Authored: Wed Aug 29 17:33:51 2018 +0300
Committer: Felix Cheung 
Committed: Sat Sep 1 23:50:32 2018 -0700

--
 zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/57601f81/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
--
diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js 
b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
index 9a766de..1a1569a 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -930,7 +930,7 @@ function ParagraphCtrl($scope, $rootScope, $route, $window, 
$routeParams, $locat
 $scope.editor.execCommand('startAutocomplete');
   } else {
 ace.config.loadModule('ace/ext/language_tools', function() {
-  $scope.editor.insertSnippet('\t');
+  $scope.editor.indent();
 });
   }
 },



zeppelin git commit: [ZEPPELIN-3701].Missing first several '0' and losing digital accuracy in result table

2018-08-17 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 09d44d504 -> 1267e33a0


[ZEPPELIN-3701].Missing first several '0' and losing digital accuracy in result 
table

### What is this PR for?

Improvements:
-Datas like '00058806' will be displayed correctly instead of '58806'.
-Datas like '5880658806' will be displayed correctly instead of '5.880659E9'.

### What type of PR is it?
[Refactoring]

### Todos
* [ ] - Task

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

### 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: heguozi 

Author: 和果子 <>

Closes #3132 from Deegue/master and squashes the following commits:

f539a9a [和果子] add '+' validation
09fc45d [和果子] hardcoding fixed
a5f9a8a [和果子] [ZEPPELIN-3701].Missing first several '0' and losing 
digital accuracy in result table


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

Branch: refs/heads/master
Commit: 1267e33a0ce1bfc7b38bddaa066f89a5f98e8857
Parents: 09d44d5
Author: 和果子 <>
Authored: Mon Aug 13 18:52:50 2018 +0800
Committer: Felix Cheung 
Committed: Thu Aug 16 23:49:03 2018 -0700

--
 zeppelin-web/src/app/tabledata/tabledata.js | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1267e33a/zeppelin-web/src/app/tabledata/tabledata.js
--
diff --git a/zeppelin-web/src/app/tabledata/tabledata.js 
b/zeppelin-web/src/app/tabledata/tabledata.js
index 1f01bca..67c47be 100644
--- a/zeppelin-web/src/app/tabledata/tabledata.js
+++ b/zeppelin-web/src/app/tabledata/tabledata.js
@@ -36,6 +36,7 @@ export default class TableData extends Dataset {
 let textRows = paragraphResult.msg.split('\n');
 let comment = '';
 let commentRow = false;
+const float64MaxDigits = 16;
 
 for (let i = 0; i < textRows.length; i++) {
   let textRow = textRows[i];
@@ -60,8 +61,10 @@ export default class TableData extends Dataset {
   columnNames.push({name: col, index: j, aggr: 'sum'});
 } else {
   let valueOfCol;
-  if (!isNaN(valueOfCol = parseFloat(col)) && isFinite(col)) {
-col = valueOfCol;
+  if (!(col[0] === '0' || col[0] === '+' || col.length > 
float64MaxDigits)) {
+if (!isNaN(valueOfCol = parseFloat(col)) && isFinite(col)) {
+  col = valueOfCol;
+}
   }
   cols.push(col);
   cols2.push({key: (columnNames[i]) ? columnNames[i].name : undefined, 
value: col});



zeppelin git commit: [ZEPPELIN-3665] fix notebook name

2018-08-05 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 2eac6872e -> cbf222848


[ZEPPELIN-3665] fix notebook name

### What is this PR for?
Name of notebook incorrectly displayed due to text direction.

Bug Fix

### What is the Jira issue?
[ZEPPELIN-3665](https://issues.apache.org/jira/browse/ZEPPELIN-3665)

### example:
Path: `2_Folder/NoteName`
 Before
![before](https://user-images.githubusercontent.com/30798933/43382664-2caf8c6a-93e1-11e8-9bef-be271573a858.png)

 After
![after](https://user-images.githubusercontent.com/30798933/43382674-3323e1b8-93e1-11e8-9ab9-fbfc88671042.png)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Savalek 

Closes #3099 from Savalek/ZEPPELIN-3665 and squashes the following commits:

cd77f59 [Savalek] [ZEPPELIN-3665] fix notebook name. add 'unicode-bidi: 
plaintext'
f59f09e [Savalek] [ZEPPELIN-3665] fix notebook name


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

Branch: refs/heads/master
Commit: cbf22284834e52f718c8dbf29afd35d40ba39db8
Parents: 2eac687
Author: Savalek 
Authored: Fri Jul 27 11:05:16 2018 +0300
Committer: Felix Cheung 
Committed: Sun Aug 5 11:44:21 2018 -0700

--
 zeppelin-web/src/app/notebook/notebook.css | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/cbf22284/zeppelin-web/src/app/notebook/notebook.css
--
diff --git a/zeppelin-web/src/app/notebook/notebook.css 
b/zeppelin-web/src/app/notebook/notebook.css
index c72745b..2f6ff9a 100644
--- a/zeppelin-web/src/app/notebook/notebook.css
+++ b/zeppelin-web/src/app/notebook/notebook.css
@@ -185,6 +185,7 @@
   overflow: hidden;
   text-overflow: ellipsis;
   direction: rtl;
+  unicode-bidi: plaintext;
   text-align: left;
   font-size: 29px;
   padding-top: 7px;



zeppelin git commit: [Zeppelin 3388] Correcting documentation link to zeppelin-context documentation

2018-05-10 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.8 de1a25c73 -> 1b4d37639


[Zeppelin 3388] Correcting documentation link to zeppelin-context documentation

### What is this PR for?
A small change was needed in the documentation of the JDBC interpreter also, 
but had been missed.

The change required is the same as the change made in the documentation of the 
Shell interpreter (as seen 
[here](https://github.com/apache/zeppelin/commit/0c3260e91f4c1ec58e67856d466ea9cba89d0085#diff-5a017ebfb7e890a2b475f9c8c7844fb0))

### What type of PR is it?
[Documentation]

### Todos
* [ ] - Task

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

### How should this be tested?
Documentation only.

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No, this _is_ documentation.

Author: Sanjay Dasgupta 

Closes #2960 from sanjaydasgupta/z-3388-jdbc and squashes the following commits:

b43ff21 [Sanjay Dasgupta] Correcting link to zeppelin-context documentation

(cherry picked from commit 941ccbbbdb6c2ca11f09f54bf0ddd31d6ba25d1c)
Signed-off-by: Felix Cheung 


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

Branch: refs/heads/branch-0.8
Commit: 1b4d376394b7a2d3345394c1fcf2f776c1bab5d7
Parents: de1a25c
Author: Sanjay Dasgupta 
Authored: Sat May 5 08:31:14 2018 +0530
Committer: Felix Cheung 
Committed: Thu May 10 20:52:05 2018 -0700

--
 docs/interpreter/jdbc.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1b4d3763/docs/interpreter/jdbc.md
--
diff --git a/docs/interpreter/jdbc.md b/docs/interpreter/jdbc.md
index 2f64da9..aee9c4e 100644
--- a/docs/interpreter/jdbc.md
+++ b/docs/interpreter/jdbc.md
@@ -753,7 +753,7 @@ z.put("country_code", "KR")
 Object interpolation is disabled by default, and can be enabled for all 
instances of the JDBC interpreter by 
 setting the value of the property `zeppelin.jdbc.interpolation` to `true` (see 
_More Properties_ above). 
 More details of this feature can be found in the Spark interpreter 
documentation under 
-[Object Interpolation](spark.html#object-interpolation)
+[Zeppelin-Context](../usage/other_features/zeppelin_context.html)
 
 ## Bug reporting
 If you find a bug using JDBC interpreter, please create a 
[JIRA](https://issues.apache.org/jira/browse/ZEPPELIN) ticket.



zeppelin git commit: [Zeppelin 3388] Correcting documentation link to zeppelin-context documentation

2018-05-10 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 3712ce697 -> 941ccbbbd


[Zeppelin 3388] Correcting documentation link to zeppelin-context documentation

### What is this PR for?
A small change was needed in the documentation of the JDBC interpreter also, 
but had been missed.

The change required is the same as the change made in the documentation of the 
Shell interpreter (as seen 
[here](https://github.com/apache/zeppelin/commit/0c3260e91f4c1ec58e67856d466ea9cba89d0085#diff-5a017ebfb7e890a2b475f9c8c7844fb0))

### What type of PR is it?
[Documentation]

### Todos
* [ ] - Task

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

### How should this be tested?
Documentation only.

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No, this _is_ documentation.

Author: Sanjay Dasgupta 

Closes #2960 from sanjaydasgupta/z-3388-jdbc and squashes the following commits:

b43ff21 [Sanjay Dasgupta] Correcting link to zeppelin-context documentation


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

Branch: refs/heads/master
Commit: 941ccbbbdb6c2ca11f09f54bf0ddd31d6ba25d1c
Parents: 3712ce6
Author: Sanjay Dasgupta 
Authored: Sat May 5 08:31:14 2018 +0530
Committer: Felix Cheung 
Committed: Thu May 10 20:51:50 2018 -0700

--
 docs/interpreter/jdbc.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/941ccbbb/docs/interpreter/jdbc.md
--
diff --git a/docs/interpreter/jdbc.md b/docs/interpreter/jdbc.md
index 2f64da9..aee9c4e 100644
--- a/docs/interpreter/jdbc.md
+++ b/docs/interpreter/jdbc.md
@@ -753,7 +753,7 @@ z.put("country_code", "KR")
 Object interpolation is disabled by default, and can be enabled for all 
instances of the JDBC interpreter by 
 setting the value of the property `zeppelin.jdbc.interpolation` to `true` (see 
_More Properties_ above). 
 More details of this feature can be found in the Spark interpreter 
documentation under 
-[Object Interpolation](spark.html#object-interpolation)
+[Zeppelin-Context](../usage/other_features/zeppelin_context.html)
 
 ## Bug reporting
 If you find a bug using JDBC interpreter, please create a 
[JIRA](https://issues.apache.org/jira/browse/ZEPPELIN) ticket.



zeppelin git commit: [ZEPPELIN-3431] - Fix links, images in docs

2018-04-28 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 0c3b446a5 -> 468cea290


[ZEPPELIN-3431] - Fix links, images in docs

### What is this PR for?
Page 
http://zeppelin.apache.org/docs/0.8.0-SNAPSHOT/usage/other_features/notebook_actions.html
contains errors.
Some images are missing and three links does not work.

### What type of PR is it?
[Bug Fix | Documentation]

### What is the Jira issue?
[ZEPPELIN-3431](https://issues.apache.org/jira/browse/ZEPPELIN-3431)

### Screenshots (if appropriate)
![screen](https://user-images.githubusercontent.com/30798933/39301412-a6c43232-4957-11e8-8f59-9737c6455aa5.png)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Savalek 

Closes #2947 from Savalek/ZEPPELIN-3431 and squashes the following commits:

6993dbf [Savalek] [ZEPPELIN-3431] - Fix links, images in docs


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

Branch: refs/heads/master
Commit: 468cea29070c2fb12fa31a24d321a9653e929ae7
Parents: 0c3b446
Author: Savalek 
Authored: Thu Apr 26 13:37:38 2018 +0300
Committer: Felix Cheung 
Committed: Fri Apr 27 23:28:40 2018 -0700

--
 docs/_includes/themes/zeppelin/_navigation.html|   6 +++---
 .../img/docs-img/revisions-comparator-button.png   | Bin 0 -> 19092 bytes
 .../img/docs-img/revisions-comparator-diff.png | Bin 0 -> 61883 bytes
 .../docs-img/revisions-comparator-paragraph.png| Bin 0 -> 66939 bytes
 .../img/docs-img/revisions_comparator_button.png   | Bin 19092 -> 0 bytes
 .../img/docs-img/revisions_comparator_diff.png | Bin 61883 -> 0 bytes
 .../docs-img/revisions_comparator_paragraph.png| Bin 66939 -> 0 bytes
 7 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/468cea29/docs/_includes/themes/zeppelin/_navigation.html
--
diff --git a/docs/_includes/themes/zeppelin/_navigation.html 
b/docs/_includes/themes/zeppelin/_navigation.html
index 796b8bc..071e754 100644
--- a/docs/_includes/themes/zeppelin/_navigation.html
+++ b/docs/_includes/themes/zeppelin/_navigation.html
@@ -168,9 +168,9 @@
 How
 to Contribute (website)
 
 External Resources
-Mailing List
-Apache Zeppelin Wiki
-Stackoverflow Questions about 
Zeppelin
+https://zeppelin.apache.org/community.html;>Mailing List
+https://cwiki.apache.org/confluence/display/ZEPPELIN/Zeppelin+Home;>Apache
 Zeppelin Wiki
+http://stackoverflow.com/questions/tagged/apache-zeppelin;>Stackoverflow 
Questions about Zeppelin
   
 
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/468cea29/docs/assets/themes/zeppelin/img/docs-img/revisions-comparator-button.png
--
diff --git 
a/docs/assets/themes/zeppelin/img/docs-img/revisions-comparator-button.png 
b/docs/assets/themes/zeppelin/img/docs-img/revisions-comparator-button.png
new file mode 100644
index 000..168809c
Binary files /dev/null and 
b/docs/assets/themes/zeppelin/img/docs-img/revisions-comparator-button.png 
differ

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/468cea29/docs/assets/themes/zeppelin/img/docs-img/revisions-comparator-diff.png
--
diff --git 
a/docs/assets/themes/zeppelin/img/docs-img/revisions-comparator-diff.png 
b/docs/assets/themes/zeppelin/img/docs-img/revisions-comparator-diff.png
new file mode 100644
index 000..c1092e9
Binary files /dev/null and 
b/docs/assets/themes/zeppelin/img/docs-img/revisions-comparator-diff.png differ

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/468cea29/docs/assets/themes/zeppelin/img/docs-img/revisions-comparator-paragraph.png
--
diff --git 
a/docs/assets/themes/zeppelin/img/docs-img/revisions-comparator-paragraph.png 
b/docs/assets/themes/zeppelin/img/docs-img/revisions-comparator-paragraph.png
new file mode 100644
index 000..c559c45
Binary files /dev/null and 
b/docs/assets/themes/zeppelin/img/docs-img/revisions-comparator-paragraph.png 
differ

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/468cea29/docs/assets/themes/zeppelin/img/docs-img/revisions_comparator_button.png
--
diff --git 

zeppelin git commit: ZEPPELIN-3412 Enable query prefix syntax in bigquery interpreter

2018-04-28 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.8 ddf0fd5f7 -> 71e9ca2dc


ZEPPELIN-3412 Enable query prefix syntax in bigquery interpreter

- interpreter
Enable query prefix syntax in bigquery interpreter.
Bigquery has a convenient query prefix syntax #standardSQL and #legacySQL.
This enable to switch between standardSQL and legacySQL without changing 
UseLegacySql option.
Currently (v0.8.0 or later), bigquery interpreter definitely runs with 
UseLegacySql option.
As described in the 
[docs](https://cloud.google.com/bigquery/docs/reference/standard-sql/enabling-standard-sql?hl=en#sql-prefix),
 when this option is set to true or false, the query prefix cannot be used.

- documentation
Removed some contents from README.md. They are duplicated with interpreter 
documentation.

Improvement

https://issues.apache.org/jira/browse/ZEPPELIN-3412

- Unit test should pass

* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? Yes

Author: iijima_satoshi 

Closes #2929 from iijima-satoshi/bigquery-sql-prefix and squashes the following 
commits:

e5b1acd [iijima_satoshi] Address comments
f88cc42 [iijima_satoshi] Address comments
809f561 [iijima_satoshi] Address comments
4e2a6b2 [iijima_satoshi] Enable query prefix syntax in bigquery interpreter

(cherry picked from commit 0c3b446a5304df3f3c0d665d2df926cca2dcddb7)
Signed-off-by: Felix Cheung 


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

Branch: refs/heads/branch-0.8
Commit: 71e9ca2dc4659c3c59ffd4aade70073392a0ea82
Parents: ddf0fd5
Author: iijima_satoshi 
Authored: Fri Apr 27 16:47:40 2018 +0900
Committer: Felix Cheung 
Committed: Fri Apr 27 23:21:59 2018 -0700

--
 bigquery/README.md  | 85 
 .../zeppelin/bigquery/BigQueryInterpreter.java  | 19 -
 .../src/main/resources/interpreter-setting.json | 13 +--
 .../bigquery/BigQueryInterpreterTest.java   | 19 -
 docs/interpreter/bigquery.md|  5 ++
 5 files changed, 44 insertions(+), 97 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/71e9ca2d/bigquery/README.md
--
diff --git a/bigquery/README.md b/bigquery/README.md
index fc09763..0dff5fe 100644
--- a/bigquery/README.md
+++ b/bigquery/README.md
@@ -1,10 +1,6 @@
 # Overview
 BigQuery interpreter for Apache Zeppelin
 
-# Pre requisities
-You can follow the instructions at [Apache Zeppelin on 
Dataproc](https://github.com/GoogleCloudPlatform/dataproc-initialization-actions/blob/master/apache-zeppelin/README.MD)
 to bring up Zeppelin on Google dataproc. 
-You could also install and bring up Zeppelin on Google compute Engine.
-
 # Unit Tests
 BigQuery Unit tests are excluded as these tests depend on the BigQuery 
external service. This is because BigQuery does not have a local mock at this 
point.
 
@@ -14,34 +10,6 @@ If you like to run these tests manually, please follow the 
following steps:
 * Copy the project ID that you created and add it to the property "projectId" 
in `resources/constants.json`
 * Run the command mvn  -Dbigquery.text.exclude='' test -pl bigquery 
-am
 
-
-# Interpreter Configuration
-
-Configure the following properties during Interpreter creation.
-
-
-  
-Name
-Default Value
-Description
-  
-  
-zeppelin.bigquery.project_id
-  
-Google Project Id
-  
-  
-zeppelin.bigquery.wait_time
-5000
-Query Timeout in Milliseconds
-  
-  
-zeppelin.bigquery.max_no_of_rows
-10
-Max result set size
-  
-
-
 # Connection
 The Interpreter opens a connection with the BigQuery Service using the 
supplied Google project ID and the compute environment variables.
 
@@ -51,59 +19,6 @@ The Interpreter opens a connection with the BigQuery Service 
using the supplied
 
 We have used the curated veneer version of the Java APIs versus [Idiomatic 
Java client] 
(https://github.com/GoogleCloudPlatform/gcloud-java/tree/master/gcloud-java-bigquery)
 to build the interpreter. This is mainly for usability reasons.
 
-# Enabling the BigQuery Interpreter
-
-In a notebook, to enable the **BigQuery** interpreter, click the **Gear** icon 
and select **bigquery**.
-
-# Using the BigQuery Interpreter
-
-In a paragraph, use `%bigquery.sql` to select the **BigQuery** interpreter and 
then input SQL statements against your datasets stored in BigQuery.
-You can use [BigQuery SQL 

zeppelin git commit: ZEPPELIN-3412 Enable query prefix syntax in bigquery interpreter

2018-04-28 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master e65f73066 -> 0c3b446a5


ZEPPELIN-3412 Enable query prefix syntax in bigquery interpreter

### What is this PR for?
- interpreter
Enable query prefix syntax in bigquery interpreter.
Bigquery has a convenient query prefix syntax #standardSQL and #legacySQL.
This enable to switch between standardSQL and legacySQL without changing 
UseLegacySql option.
Currently (v0.8.0 or later), bigquery interpreter definitely runs with 
UseLegacySql option.
As described in the 
[docs](https://cloud.google.com/bigquery/docs/reference/standard-sql/enabling-standard-sql?hl=en#sql-prefix),
 when this option is set to true or false, the query prefix cannot be used.

- documentation
Removed some contents from README.md. They are duplicated with interpreter 
documentation.

### What type of PR is it?
Improvement

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

### How should this be tested?
- Unit test should pass

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? Yes

Author: iijima_satoshi 

Closes #2929 from iijima-satoshi/bigquery-sql-prefix and squashes the following 
commits:

e5b1acd [iijima_satoshi] Address comments
f88cc42 [iijima_satoshi] Address comments
809f561 [iijima_satoshi] Address comments
4e2a6b2 [iijima_satoshi] Enable query prefix syntax in bigquery interpreter


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

Branch: refs/heads/master
Commit: 0c3b446a5304df3f3c0d665d2df926cca2dcddb7
Parents: e65f730
Author: iijima_satoshi 
Authored: Fri Apr 27 16:47:40 2018 +0900
Committer: Felix Cheung 
Committed: Fri Apr 27 23:14:54 2018 -0700

--
 bigquery/README.md  | 85 
 .../zeppelin/bigquery/BigQueryInterpreter.java  | 19 -
 .../src/main/resources/interpreter-setting.json | 13 +--
 .../bigquery/BigQueryInterpreterTest.java   | 11 ++-
 docs/interpreter/bigquery.md|  5 ++
 5 files changed, 35 insertions(+), 98 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0c3b446a/bigquery/README.md
--
diff --git a/bigquery/README.md b/bigquery/README.md
index fc09763..0dff5fe 100644
--- a/bigquery/README.md
+++ b/bigquery/README.md
@@ -1,10 +1,6 @@
 # Overview
 BigQuery interpreter for Apache Zeppelin
 
-# Pre requisities
-You can follow the instructions at [Apache Zeppelin on 
Dataproc](https://github.com/GoogleCloudPlatform/dataproc-initialization-actions/blob/master/apache-zeppelin/README.MD)
 to bring up Zeppelin on Google dataproc. 
-You could also install and bring up Zeppelin on Google compute Engine.
-
 # Unit Tests
 BigQuery Unit tests are excluded as these tests depend on the BigQuery 
external service. This is because BigQuery does not have a local mock at this 
point.
 
@@ -14,34 +10,6 @@ If you like to run these tests manually, please follow the 
following steps:
 * Copy the project ID that you created and add it to the property "projectId" 
in `resources/constants.json`
 * Run the command mvn  -Dbigquery.text.exclude='' test -pl bigquery 
-am
 
-
-# Interpreter Configuration
-
-Configure the following properties during Interpreter creation.
-
-
-  
-Name
-Default Value
-Description
-  
-  
-zeppelin.bigquery.project_id
-  
-Google Project Id
-  
-  
-zeppelin.bigquery.wait_time
-5000
-Query Timeout in Milliseconds
-  
-  
-zeppelin.bigquery.max_no_of_rows
-10
-Max result set size
-  
-
-
 # Connection
 The Interpreter opens a connection with the BigQuery Service using the 
supplied Google project ID and the compute environment variables.
 
@@ -51,59 +19,6 @@ The Interpreter opens a connection with the BigQuery Service 
using the supplied
 
 We have used the curated veneer version of the Java APIs versus [Idiomatic 
Java client] 
(https://github.com/GoogleCloudPlatform/gcloud-java/tree/master/gcloud-java-bigquery)
 to build the interpreter. This is mainly for usability reasons.
 
-# Enabling the BigQuery Interpreter
-
-In a notebook, to enable the **BigQuery** interpreter, click the **Gear** icon 
and select **bigquery**.
-
-# Using the BigQuery Interpreter
-
-In a paragraph, use `%bigquery.sql` to select the **BigQuery** interpreter and 
then input SQL statements against your datasets stored in BigQuery.
-You can use [BigQuery SQL 

zeppelin git commit: [ZEPPELIN-3377] Passing Z variables to JDBC interpreter

2018-04-28 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.8 4d4e415a4 -> ddf0fd5f7


[ZEPPELIN-3377] Passing Z variables to JDBC interpreter

### What is this PR for?
This PR enables the interpolation of ZeppelinContext objects into the paragraph 
text of JDBC cells. It also introduces a new interpreter-level configuration 
parameter named _zeppelin.jdbc.interpolation_. This new parameter is _false_ by 
default, and must be set to _true_ to enable object interpolation. The default 
value of _false_ guarantees backward compatibility for users who are not aware 
of the new feature.

The implementation takes the same approach that was followed in 
[PR-2898](https://github.com/apache/zeppelin/pull/2898).

I have also taken the liberty to correct a preexisting error in the description 
of the use of Dynamic Forms in the associated documentation (_jdbc.md_).

### What type of PR is it?
[Feature]

### Todos
* [ ] - Task

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

### How should this be tested?
CI Pass.

The code in this PR merely causes the JDBC interpreter to "opt-in" to the 
implementation already existing in the `Interpreter` base class - described in 
[PR-2898](https://github.com/apache/zeppelin/pull/2898). The unit tests 
necessary are already present in PR-2898

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? Yes, documentation has been added to the file 
_jdbc.md_. I have also taken the liberty to correct a preexisting error in the 
description of the use of Dynamic Forms in the associated documentation.

Author: Sanjay Dasgupta 
Author: Sanjay Dasgupta 

Closes #2903 from sanjaydasgupta/zeppelin-3342-jdbc and squashes the following 
commits:

9947d36 [Sanjay Dasgupta] Expanded * imports to remove check-style errors
094d3ce [Sanjay Dasgupta] Reduced indentation to remove check-style errors
07561f5 [Sanjay Dasgupta] Revisions after Felix Cheung's review 
https://github.com/apache/zeppelin/pull/2903#pullrequestreview-110276872
df99ab0 [Sanjay Dasgupta] Revisions after Felix Cheung's review 
https://github.com/apache/zeppelin/pull/2903#pullrequestreview-110276872
315a9ad [Sanjay Dasgupta] Corrected use of rlike in SQL statement
eb9194d [Sanjay Dasgupta] ZEPPELIN-3377 Updates Initial Load
0f49867 [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into zeppelin-3342-hdfs
a19e998 [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
77738aa [Sanjay Dasgupta] Changes to comply with Felix Cheung's comment at 
https://github.com/apache/zeppelin/pull/2834#discussion_r176976263 and Jeff 
Zhang's subsequent clarification
5f8505b [Sanjay Dasgupta] Changes due to Felix Cheung's comments at 
https://github.com/apache/zeppelin/pull/2834#pullrequestreview-106738198
d600d86 [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
cc3727f [Sanjay Dasgupta] Changes due the Jeff Zhang's comments at 
https://github.com/apache/zeppelin/pull/2834/files/1e2c87dd36dc091ca898baf8e9f178d6d1a5e600#r176930418
1e2c87d [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
3dd3dd8 [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
a1703b8 [Sanjay Dasgupta] Changes suggested in Felix Cheung's review 
https://github.com/apache/zeppelin/pull/2834#pullrequestreview-104805661
b7ddf6b [Sanjay Dasgupta] Implementing configuration (global enable/disable 
interpolation) following 
https://github.com/apache/zeppelin/pull/2834#issuecomment-373948398
5268803 [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
1718e79 [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
3b30ea2 [Sanjay Dasgupta] Reversing previous incorrect update
3beebce [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
f43fd99 [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
a3215fc [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
ced295c [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
b461c82 [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
2868825 [Sanjay Dasgupta] ZEPPELIN-1967: Initial updates

(cherry picked from commit e65f73066c5741878177f45c283521868c775b7a)
Signed-off-by: Felix Cheung 


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

zeppelin git commit: [ZEPPELIN-3377] Passing Z variables to JDBC interpreter

2018-04-28 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 9e18159d4 -> e65f73066


[ZEPPELIN-3377] Passing Z variables to JDBC interpreter

### What is this PR for?
This PR enables the interpolation of ZeppelinContext objects into the paragraph 
text of JDBC cells. It also introduces a new interpreter-level configuration 
parameter named _zeppelin.jdbc.interpolation_. This new parameter is _false_ by 
default, and must be set to _true_ to enable object interpolation. The default 
value of _false_ guarantees backward compatibility for users who are not aware 
of the new feature.

The implementation takes the same approach that was followed in 
[PR-2898](https://github.com/apache/zeppelin/pull/2898).

I have also taken the liberty to correct a preexisting error in the description 
of the use of Dynamic Forms in the associated documentation (_jdbc.md_).

### What type of PR is it?
[Feature]

### Todos
* [ ] - Task

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

### How should this be tested?
CI Pass.

The code in this PR merely causes the JDBC interpreter to "opt-in" to the 
implementation already existing in the `Interpreter` base class - described in 
[PR-2898](https://github.com/apache/zeppelin/pull/2898). The unit tests 
necessary are already present in PR-2898

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? Yes, documentation has been added to the file 
_jdbc.md_. I have also taken the liberty to correct a preexisting error in the 
description of the use of Dynamic Forms in the associated documentation.

Author: Sanjay Dasgupta 
Author: Sanjay Dasgupta 

Closes #2903 from sanjaydasgupta/zeppelin-3342-jdbc and squashes the following 
commits:

9947d36 [Sanjay Dasgupta] Expanded * imports to remove check-style errors
094d3ce [Sanjay Dasgupta] Reduced indentation to remove check-style errors
07561f5 [Sanjay Dasgupta] Revisions after Felix Cheung's review 
https://github.com/apache/zeppelin/pull/2903#pullrequestreview-110276872
df99ab0 [Sanjay Dasgupta] Revisions after Felix Cheung's review 
https://github.com/apache/zeppelin/pull/2903#pullrequestreview-110276872
315a9ad [Sanjay Dasgupta] Corrected use of rlike in SQL statement
eb9194d [Sanjay Dasgupta] ZEPPELIN-3377 Updates Initial Load
0f49867 [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into zeppelin-3342-hdfs
a19e998 [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
77738aa [Sanjay Dasgupta] Changes to comply with Felix Cheung's comment at 
https://github.com/apache/zeppelin/pull/2834#discussion_r176976263 and Jeff 
Zhang's subsequent clarification
5f8505b [Sanjay Dasgupta] Changes due to Felix Cheung's comments at 
https://github.com/apache/zeppelin/pull/2834#pullrequestreview-106738198
d600d86 [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
cc3727f [Sanjay Dasgupta] Changes due the Jeff Zhang's comments at 
https://github.com/apache/zeppelin/pull/2834/files/1e2c87dd36dc091ca898baf8e9f178d6d1a5e600#r176930418
1e2c87d [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
3dd3dd8 [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
a1703b8 [Sanjay Dasgupta] Changes suggested in Felix Cheung's review 
https://github.com/apache/zeppelin/pull/2834#pullrequestreview-104805661
b7ddf6b [Sanjay Dasgupta] Implementing configuration (global enable/disable 
interpolation) following 
https://github.com/apache/zeppelin/pull/2834#issuecomment-373948398
5268803 [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
1718e79 [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
3b30ea2 [Sanjay Dasgupta] Reversing previous incorrect update
3beebce [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
f43fd99 [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
a3215fc [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
ced295c [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
b461c82 [Sanjay Dasgupta] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-1967
2868825 [Sanjay Dasgupta] ZEPPELIN-1967: Initial updates


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

Branch: refs/heads/master
Commit: 

zeppelin git commit: ZEPPELIN-3115 Fix bigquery interpreter to remove TAB at end-of-line

2018-04-09 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 7a67138a9 -> 36a5a9173


ZEPPELIN-3115 Fix bigquery interpreter to remove TAB at end-of-line

### What is this PR for?
Fix bigquery interpreter layout.
The current layout is broken due to a tab character at end-of-line.

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

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

### How should this be tested?
* Run bigquery interpreter and check the result (Please see below screenshots).

### Screenshots
Before (from JIRA issues):
![before](https://issues.apache.org/jira/secure/attachment/12903316/Screen%20Shot%202017-12-21%20at%204.58.58%20PM.png)

After:
![after](https://raw.githubusercontent.com/iijima-satoshi/okhttp/master/fixed_bigquery_layout.png)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: iijima_satoshi 

Closes #2912 from iijima-satoshi/fix-bigquery-layout and squashes the following 
commits:

f193f6a [iijima_satoshi] ZEPPELIN-3115 Add test for bigquery interpreter output
dd2a198 [iijima_satoshi] ZEPPELIN-3115 BigQuery interpreter does not render the 
output of a sql query (only shows column names)


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

Branch: refs/heads/master
Commit: 36a5a917371a47eb257e8cfdc44930c0eb65560e
Parents: 7a67138
Author: iijima_satoshi 
Authored: Sat Apr 7 05:32:52 2018 +0900
Committer: Felix Cheung 
Committed: Mon Apr 9 00:20:22 2018 -0700

--
 .../zeppelin/bigquery/BigQueryInterpreter.java  | 16 +---
 .../zeppelin/bigquery/BigQueryInterpreterTest.java  | 10 ++
 2 files changed, 19 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/36a5a917/bigquery/src/main/java/org/apache/zeppelin/bigquery/BigQueryInterpreter.java
--
diff --git 
a/bigquery/src/main/java/org/apache/zeppelin/bigquery/BigQueryInterpreter.java 
b/bigquery/src/main/java/org/apache/zeppelin/bigquery/BigQueryInterpreter.java
index 2cd6d47..b56f63c 100644
--- 
a/bigquery/src/main/java/org/apache/zeppelin/bigquery/BigQueryInterpreter.java
+++ 
b/bigquery/src/main/java/org/apache/zeppelin/bigquery/BigQueryInterpreter.java
@@ -22,6 +22,7 @@ import com.google.api.client.http.javanet.NetHttpTransport;
 import com.google.api.client.json.GenericJson;
 import com.google.api.client.json.JsonFactory;
 import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.util.Joiner;
 import com.google.api.services.bigquery.Bigquery;
 import com.google.api.services.bigquery.Bigquery.Jobs.GetQueryResults;
 import com.google.api.services.bigquery.BigqueryRequest;
@@ -144,19 +145,20 @@ public class BigQueryInterpreter extends Interpreter {
 
   //Function that generates and returns the schema and the rows as string
   public static String printRows(final GetQueryResultsResponse response) {
-StringBuilder msg = null;
-msg = new StringBuilder();
+StringBuilder msg = new StringBuilder();
 try {
+  List schemNames = new ArrayList();
   for (TableFieldSchema schem: response.getSchema().getFields()) {
-msg.append(schem.getName());
-msg.append(TAB);
-  }  
+schemNames.add(schem.getName());
+  }
+  msg.append(Joiner.on(TAB).join(schemNames));
   msg.append(NEWLINE);
   for (TableRow row : response.getRows()) {
+List fieldValues = new ArrayList();
 for (TableCell field : row.getF()) {
-  msg.append(field.getV().toString());
-  msg.append(TAB);
+  fieldValues.add(field.getV().toString());
 }
+msg.append(Joiner.on(TAB).join(fieldValues));
 msg.append(NEWLINE);
   }
   return msg.toString();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/36a5a917/bigquery/src/test/java/org/apache/zeppelin/bigquery/BigQueryInterpreterTest.java
--
diff --git 
a/bigquery/src/test/java/org/apache/zeppelin/bigquery/BigQueryInterpreterTest.java
 
b/bigquery/src/test/java/org/apache/zeppelin/bigquery/BigQueryInterpreterTest.java
index 2ffc67b..04676ab 100644
--- 
a/bigquery/src/test/java/org/apache/zeppelin/bigquery/BigQueryInterpreterTest.java
+++ 
b/bigquery/src/test/java/org/apache/zeppelin/bigquery/BigQueryInterpreterTest.java
@@ -96,4 +96,14 @@ public class BigQueryInterpreterTest {
 
 assertEquals(InterpreterResult.Code.ERROR, 

[5/5] zeppelin git commit: ZEPPELIN-3140. Fixed Checkstyle issues in zeppelin-server

2018-04-05 Thread felixcheung
ZEPPELIN-3140. Fixed Checkstyle issues in zeppelin-server

### What is this PR for?
Fixed Checkstyle issues in zeppelin-server module.

### What type of PR is it?
Improvement

### Todos
* [ ] - Task

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

### 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: Jan Hentschel 

Closes #2902 from HorizonNet/ZEPPELIN-3140 and squashes the following commits:

98ceb92 [Jan Hentschel] ZEPPELIN-3140. Addressed review comment
c75b693 [Jan Hentschel] ZEPPELIN-3140. Fixed review comments
23a3a4d [Jan Hentschel] ZEPPELIN-3140. Fixed Checkstyle issues in 
zeppelin-server


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

Branch: refs/heads/master
Commit: 1add74b4b2a1c7fb63b8249b9574ac3e148d3b81
Parents: fe07e5a
Author: Jan Hentschel 
Authored: Mon Apr 2 15:07:48 2018 +0200
Committer: Felix Cheung 
Committed: Wed Apr 4 23:09:44 2018 -0700

--
 zeppelin-server/pom.xml |   7 +
 .../realm/ActiveDirectoryGroupRealm.java|  63 ++--
 .../apache/zeppelin/realm/LdapGroupRealm.java   |  21 +-
 .../org/apache/zeppelin/realm/LdapRealm.java|  54 ++-
 .../org/apache/zeppelin/realm/PamRealm.java |  11 +-
 .../apache/zeppelin/realm/UserPrincipal.java|   2 +-
 .../apache/zeppelin/realm/ZeppelinHubRealm.java |  48 +--
 .../realm/jwt/JWTAuthenticationToken.java   |   3 +-
 .../realm/jwt/KnoxAuthenticationFilter.java |  13 +-
 .../apache/zeppelin/realm/jwt/KnoxJwtRealm.java |  60 ++--
 .../zeppelin/realm/jwt/PrincipalMapper.java |  13 +-
 .../realm/jwt/PrincipalMappingException.java|   5 +-
 .../zeppelin/rest/ConfigurationsRestApi.java|  16 +-
 .../apache/zeppelin/rest/CredentialRestApi.java |  64 ++--
 .../org/apache/zeppelin/rest/GetUserList.java   |  52 +--
 .../org/apache/zeppelin/rest/HeliumRestApi.java |  72 ++--
 .../zeppelin/rest/InterpreterRestApi.java   |  38 +--
 .../org/apache/zeppelin/rest/LoginRestApi.java  |  29 +-
 .../zeppelin/rest/NotebookRepoRestApi.java  |  20 +-
 .../apache/zeppelin/rest/NotebookRestApi.java   | 212 ++--
 .../apache/zeppelin/rest/SecurityRestApi.java   |  39 ++-
 .../apache/zeppelin/rest/ZeppelinRestApi.java   |  12 +-
 .../rest/exception/BadRequestException.java |   6 +-
 .../rest/exception/ForbiddenException.java  |   3 -
 .../zeppelin/rest/message/CronRequest.java  |   9 +-
 .../message/NewInterpreterSettingRequest.java   |   7 +-
 .../zeppelin/rest/message/NewNoteRequest.java   |  10 +-
 .../rest/message/NewParagraphRequest.java   |   9 +-
 .../message/NotebookRepoSettingsRequest.java|   6 +-
 .../rest/message/RestartInterpreterRequest.java |   5 +-
 .../RunParagraphWithParametersRequest.java  |   7 +-
 .../UpdateInterpreterSettingRequest.java|   6 +-
 .../rest/message/UpdateParagraphRequest.java|   6 +-
 .../org/apache/zeppelin/server/CorsFilter.java  |  10 +-
 .../zeppelin/server/JsonExclusionStrategy.java  |   6 -
 .../apache/zeppelin/server/JsonResponse.java|   8 +-
 .../apache/zeppelin/server/ZeppelinServer.java  |  65 ++--
 .../apache/zeppelin/socket/NotebookServer.java  | 335 +--
 .../apache/zeppelin/socket/NotebookSocket.java  |  12 +-
 .../zeppelin/socket/NotebookSocketListener.java |   2 +-
 .../zeppelin/types/InterpreterSettingsList.java |   3 +-
 .../utils/AnyOfRolesAuthorizationFilter.java|   7 +-
 .../apache/zeppelin/utils/CommandLineUtils.java |   6 +-
 .../zeppelin/utils/InterpreterBindingUtils.java |  10 +-
 .../apache/zeppelin/utils/SecurityUtils.java|  38 +--
 .../org/apache/zeppelin/ZeppelinITUtils.java|   7 +-
 .../configuration/RequestHeaderSizeTest.java|  65 ++--
 .../zeppelin/display/AngularObjectBuilder.java  |   4 +-
 .../apache/zeppelin/realm/LdapRealmTest.java|  81 ++---
 .../org/apache/zeppelin/realm/PamRealmTest.java |  30 +-
 .../apache/zeppelin/recovery/RecoveryTest.java  |  37 +-
 .../zeppelin/rest/AbstractTestRestApi.java  | 151 +
 .../rest/ConfigurationsRestApiTest.java |   6 +-
 .../zeppelin/rest/CredentialsRestApiTest.java   |  31 +-
 .../apache/zeppelin/rest/HeliumRestApiTest.java | 333 +-
 .../zeppelin/rest/InterpreterRestApiTest.java   |  98 +++---
 .../apache/zeppelin/rest/KnoxRestApiTest.java   |  16 +-
 .../zeppelin/rest/NotebookRepoRestApiTest.java  |  44 ++-
 .../zeppelin/rest/NotebookRestApiTest.java  |  74 ++--
 

[3/5] zeppelin git commit: ZEPPELIN-3140. Fixed Checkstyle issues in zeppelin-server

2018-04-05 Thread felixcheung
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1add74b4/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
--
diff --git 
a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java 
b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
index 2178006..ef43625 100644
--- 
a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
+++ 
b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
@@ -16,12 +16,39 @@
  */
 package org.apache.zeppelin.socket;
 
+import com.google.common.base.Strings;
+import com.google.common.collect.Queues;
+import com.google.common.collect.Sets;
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.reflect.TypeToken;
+
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.jetty.websocket.servlet.WebSocketServlet;
+import org.eclipse.jetty.websocket.servlet.WebSocketServletFactory;
+import org.joda.time.DateTime;
+import org.joda.time.format.DateTimeFormat;
+import org.joda.time.format.DateTimeFormatter;
+import org.quartz.SchedulerException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.IOException;
 import java.net.URISyntaxException;
 import java.net.UnknownHostException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Queue;
+import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.regex.Matcher;
@@ -29,13 +56,22 @@ import java.util.regex.Pattern;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars;
-import org.apache.zeppelin.display.*;
+import org.apache.zeppelin.display.AngularObject;
+import org.apache.zeppelin.display.AngularObjectRegistry;
+import org.apache.zeppelin.display.AngularObjectRegistryListener;
+import org.apache.zeppelin.display.GUI;
+import org.apache.zeppelin.display.Input;
 import org.apache.zeppelin.helium.ApplicationEventListener;
 import org.apache.zeppelin.helium.HeliumPackage;
-import org.apache.zeppelin.interpreter.*;
+import org.apache.zeppelin.interpreter.Interpreter;
+import org.apache.zeppelin.interpreter.InterpreterContextRunner;
+import org.apache.zeppelin.interpreter.InterpreterGroup;
+import org.apache.zeppelin.interpreter.InterpreterNotFoundException;
+import org.apache.zeppelin.interpreter.InterpreterResult;
+import org.apache.zeppelin.interpreter.InterpreterResultMessage;
+import org.apache.zeppelin.interpreter.InterpreterSetting;
 import org.apache.zeppelin.interpreter.remote.RemoteAngularObjectRegistry;
 import org.apache.zeppelin.interpreter.remote.RemoteInterpreterProcessListener;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
@@ -62,21 +98,6 @@ import org.apache.zeppelin.user.AuthenticationInfo;
 import org.apache.zeppelin.util.WatcherSecurityKey;
 import org.apache.zeppelin.utils.InterpreterBindingUtils;
 import org.apache.zeppelin.utils.SecurityUtils;
-import org.eclipse.jetty.websocket.servlet.WebSocketServlet;
-import org.eclipse.jetty.websocket.servlet.WebSocketServletFactory;
-import org.joda.time.DateTime;
-import org.joda.time.format.DateTimeFormat;
-import org.joda.time.format.DateTimeFormatter;
-import org.quartz.SchedulerException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Strings;
-import com.google.common.collect.Queues;
-import com.google.common.collect.Sets;
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-import com.google.gson.reflect.TypeToken;
 
 /**
  * Zeppelin websocket service.
@@ -86,13 +107,13 @@ public class NotebookServer extends WebSocketServlet
 RemoteInterpreterProcessListener, ApplicationEventListener {
 
   /**
-   * Job manager service type
+   * Job manager service type.
*/
-  protected enum JOB_MANAGER_SERVICE {
+  protected enum JobManagerService {
 JOB_MANAGER_PAGE("JOB_MANAGER_PAGE");
 private String serviceTypeKey;
 
-JOB_MANAGER_SERVICE(String serviceType) {
+JobManagerService(String serviceType) {
   this.serviceTypeKey = serviceType;
 }
 
@@ -133,9 +154,7 @@ public class NotebookServer extends WebSocketServlet
   public boolean checkOrigin(HttpServletRequest request, String origin) {
 try {
   return SecurityUtils.isValidOrigin(origin, 
ZeppelinConfiguration.create());
-} catch (UnknownHostException e) {
-  LOG.error(e.toString(), e);
-} catch 

[4/5] zeppelin git commit: ZEPPELIN-3140. Fixed Checkstyle issues in zeppelin-server

2018-04-05 Thread felixcheung
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1add74b4/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 8bfaef5..a679502 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
@@ -14,11 +14,23 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.zeppelin.rest;
 
+import com.google.common.collect.Sets;
+import com.google.common.reflect.TypeToken;
+import com.google.gson.Gson;
+
+import org.apache.commons.lang3.StringUtils;
+import org.quartz.CronExpression;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.IOException;
-import java.util.*;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 import javax.ws.rs.DELETE;
 import javax.ws.rs.GET;
@@ -31,18 +43,20 @@ import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.Status;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.zeppelin.annotation.ZeppelinApi;
-import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.notebook.Note;
 import org.apache.zeppelin.notebook.Notebook;
 import org.apache.zeppelin.notebook.NotebookAuthorization;
 import org.apache.zeppelin.notebook.Paragraph;
 import org.apache.zeppelin.rest.exception.BadRequestException;
-import org.apache.zeppelin.rest.exception.NotFoundException;
 import org.apache.zeppelin.rest.exception.ForbiddenException;
-import org.apache.zeppelin.rest.message.*;
+import org.apache.zeppelin.rest.exception.NotFoundException;
+import org.apache.zeppelin.rest.message.CronRequest;
+import org.apache.zeppelin.rest.message.NewNoteRequest;
+import org.apache.zeppelin.rest.message.NewParagraphRequest;
+import org.apache.zeppelin.rest.message.RunParagraphWithParametersRequest;
+import org.apache.zeppelin.rest.message.UpdateParagraphRequest;
 import org.apache.zeppelin.search.SearchService;
 import org.apache.zeppelin.server.JsonResponse;
 import org.apache.zeppelin.socket.NotebookServer;
@@ -50,13 +64,6 @@ import org.apache.zeppelin.types.InterpreterSettingsList;
 import org.apache.zeppelin.user.AuthenticationInfo;
 import org.apache.zeppelin.utils.InterpreterBindingUtils;
 import org.apache.zeppelin.utils.SecurityUtils;
-import org.quartz.CronExpression;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.Sets;
-import com.google.common.reflect.TypeToken;
-import com.google.gson.Gson;
 
 /**
  * Rest api endpoint for the notebook.
@@ -82,13 +89,12 @@ public class NotebookRestApi {
   }
 
   /**
-   * get note authorization information
+   * Get note authorization information.
*/
   @GET
   @Path("{noteId}/permissions")
   @ZeppelinApi
   public Response getNotePermissions(@PathParam("noteId") String noteId) 
throws IOException {
-
 checkIfUserIsAnon(getBlockNotAuthenticatedUserErrorMsg());
 checkIfUserCanRead(noteId,
 "Insufficient privileges you cannot get the list of permissions for 
this note");
@@ -100,7 +106,7 @@ public class NotebookRestApi {
 return new JsonResponse<>(Status.OK, "", permissionsMap).build();
   }
 
-  private String ownerPermissionError(Set current, Set 
allowed) throws IOException {
+  private String ownerPermissionError(Set current, Set 
allowed) {
 LOG.info("Cannot change permissions. Connection owners {}. Allowed owners 
{}",
 current.toString(), allowed.toString());
 return "Insufficient privileges to change permissions.\n\n" +
@@ -108,18 +114,18 @@ public class NotebookRestApi {
 "User belongs to: " + current.toString();
   }
 
-  private String getBlockNotAuthenticatedUserErrorMsg() throws IOException {
+  private String getBlockNotAuthenticatedUserErrorMsg() {
 return  "Only authenticated user can set the permission.";
   }
 
-  /**
+  /*
* Set of utils method to check if current user can perform action to the 
note.
* Since we only have security on notebook level, from now we keep this 
logic in this class.
* In the future we might want to generalize this for the rest of the api 
enmdpoints.
*/
 
   /**
-   * Check if the current user is not authenticated(anonymous user) or not
+   * Check if the current user is not authenticated(anonymous user) or not.
*/
   private void checkIfUserIsAnon(String errorMsg) {
 boolean isAuthenticated = SecurityUtils.isAuthenticated();
@@ -197,13 +203,13 @@ public class NotebookRestApi {
   }
 
   /**
-   * set note 

[2/5] zeppelin git commit: ZEPPELIN-3140. Fixed Checkstyle issues in zeppelin-server

2018-04-05 Thread felixcheung
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1add74b4/zeppelin-server/src/test/java/org/apache/zeppelin/rest/AbstractTestRestApi.java
--
diff --git 
a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/AbstractTestRestApi.java
 
b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/AbstractTestRestApi.java
index dfb5ac2..172f117 100644
--- 
a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/AbstractTestRestApi.java
+++ 
b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/AbstractTestRestApi.java
@@ -14,22 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.zeppelin.rest;
 
 import com.google.gson.JsonElement;
 import com.google.gson.JsonParseException;
 import com.google.gson.JsonParser;
-import java.io.File;
-import java.io.IOException;
-import java.lang.ref.WeakReference;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.regex.Pattern;
+
 import org.apache.commons.exec.CommandLine;
 import org.apache.commons.exec.DefaultExecutor;
 import org.apache.commons.exec.PumpStreamHandler;
@@ -45,24 +35,32 @@ import org.apache.commons.httpclient.methods.PutMethod;
 import org.apache.commons.httpclient.methods.RequestEntity;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.zeppelin.conf.ZeppelinConfiguration;
-import org.apache.zeppelin.interpreter.InterpreterProperty;
-import org.apache.zeppelin.interpreter.InterpreterPropertyType;
-import org.apache.zeppelin.interpreter.InterpreterSetting;
-import org.apache.zeppelin.server.ZeppelinServer;
 import org.hamcrest.Description;
 import org.hamcrest.Matcher;
 import org.hamcrest.TypeSafeMatcher;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public abstract class AbstractTestRestApi {
+import java.io.File;
+import java.io.IOException;
+import java.lang.ref.WeakReference;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.regex.Pattern;
+
+import org.apache.zeppelin.conf.ZeppelinConfiguration;
+import org.apache.zeppelin.interpreter.InterpreterSetting;
+import org.apache.zeppelin.server.ZeppelinServer;
 
+public abstract class AbstractTestRestApi {
   protected static final Logger LOG = 
LoggerFactory.getLogger(AbstractTestRestApi.class);
 
-  static final String restApiUrl = "/api";
-  static final String url = getUrlToTest();
-  protected static final boolean wasRunning = checkIfServerIsRunning();
+  static final String REST_API_URL = "/api";
+  static final String URL = getUrlToTest();
+  protected static final boolean WAS_RUNNING = checkIfServerIsRunning();
   static boolean isRunningWithAuth = false;
 
   private static File shiroIni = null;
@@ -110,7 +108,7 @@ public abstract class AbstractTestRestApi {
   "/** = authc";
 
   private static File knoxSsoPem = null;
-  private static String KNOX_SSO_PEM =
+  private static String knoxSsoPemCertificate =
   "-BEGIN CERTIFICATE-\n"
   + 
"MIIChjCCAe+gAwIBAgIJALYrdDEXKwcqMA0GCSqGSIb3DQEBBQUAMIGEMQswCQYD\n"
   + 
"VQQGEwJVUzENMAsGA1UECBMEVGVzdDENMAsGA1UEBxMEVGVzdDEPMA0GA1UEChMG\n"
@@ -138,14 +136,16 @@ public abstract class AbstractTestRestApi {
 } else {
   url = "http://localhost:8080;;
 }
-url += restApiUrl;
-if (path != null)
+url += REST_API_URL;
+if (path != null) {
   url += path;
+}
+
 return url;
   }
 
   protected static String getUrlToTest() {
-String url = "http://localhost:8080; + restApiUrl;
+String url = "http://localhost:8080; + REST_API_URL;
 if (System.getProperty("url") != null) {
   url = System.getProperty("url");
 }
@@ -153,7 +153,7 @@ public abstract class AbstractTestRestApi {
   }
 
   static ExecutorService executor;
-  protected static final Runnable server = new Runnable() {
+  protected static final Runnable SERVER = new Runnable() {
 @Override
 public void run() {
   try {
@@ -165,17 +165,21 @@ public abstract class AbstractTestRestApi {
 }
   };
 
-  private static void start(boolean withAuth, String testClassName, boolean 
withKnox) throws Exception {
-if (!wasRunning) {
+  private static void start(boolean withAuth, String testClassName, boolean 
withKnox)
+  throws Exception {
+if (!WAS_RUNNING) {
   // copy the resources files to a temp folder
   zeppelinHome = new File("..");
   LOG.info("ZEPPELIN_HOME: " + zeppelinHome.getAbsolutePath());
   confDir = new File(zeppelinHome, "conf_" + testClassName);
   confDir.mkdirs();
 
-  

[1/5] zeppelin git commit: ZEPPELIN-3140. Fixed Checkstyle issues in zeppelin-server

2018-04-05 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master fe07e5a49 -> 1add74b4b


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1add74b4/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinRestApiTest.java
--
diff --git 
a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinRestApiTest.java
 
b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinRestApiTest.java
index da68087..1747c36 100644
--- 
a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinRestApiTest.java
+++ 
b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinRestApiTest.java
@@ -14,26 +14,24 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.zeppelin.rest;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
 
 import com.google.common.collect.Sets;
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+
 import org.apache.commons.httpclient.methods.DeleteMethod;
 import org.apache.commons.httpclient.methods.GetMethod;
 import org.apache.commons.httpclient.methods.PostMethod;
 import org.apache.commons.httpclient.methods.PutMethod;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars;
-import org.apache.zeppelin.notebook.Note;
-import org.apache.zeppelin.notebook.Paragraph;
-import org.apache.zeppelin.server.ZeppelinServer;
-import org.apache.zeppelin.user.AuthenticationInfo;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -41,14 +39,20 @@ import org.junit.FixMethodOrder;
 import org.junit.Test;
 import org.junit.runners.MethodSorters;
 
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
 
-import static org.junit.Assert.*;
+import org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars;
+import org.apache.zeppelin.notebook.Note;
+import org.apache.zeppelin.notebook.Paragraph;
+import org.apache.zeppelin.server.ZeppelinServer;
+import org.apache.zeppelin.user.AuthenticationInfo;
 
 /**
- * BASIC Zeppelin rest api tests
- *
+ * BASIC Zeppelin rest api tests.
  */
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 public class ZeppelinRestApiTest extends AbstractTestRestApi {
@@ -70,9 +74,9 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
 anonymous = new AuthenticationInfo("anonymous");
   }
 
-  /***
-   * ROOT API TEST
-   ***/
+  /**
+   * ROOT API TEST.
+   **/
   @Test
   public void getApiRoot() throws IOException {
 // when
@@ -102,8 +106,8 @@ public class ZeppelinRestApiTest extends 
AbstractTestRestApi {
 LOG.info("testGetNoteInfo \n" + get.getResponseBodyAsString());
 assertThat("test note get method:", get, isAllowed());
 
-Map resp = gson.fromJson(get.getResponseBodyAsString(), 
new TypeToken>() {
-}.getType());
+Map resp = gson.fromJson(get.getResponseBodyAsString(),
+new TypeToken>() {}.getType());
 
 assertNotNull(resp);
 assertEquals("OK", resp.get("status"));
@@ -136,15 +140,15 @@ public class ZeppelinRestApiTest extends 
AbstractTestRestApi {
 "{\"title\": \"title1\", \"text\": \"text1\"}," +
 "{\"title\": \"title2\", \"text\": \"text2\"}," +
 "{\"title\": \"titleConfig\", \"text\": \"text3\", " +
-"\"config\": {\"colWidth\": 9.0, \"title\": true, "+
-"\"results\": [{\"graph\": {\"mode\": \"pieChart\"}}] "+
+"\"config\": {\"colWidth\": 9.0, \"title\": true, " +
+"\"results\": [{\"graph\": {\"mode\": \"pieChart\"}}] " +
 "}}]} ";
 PostMethod post = httpPost("/notebook/", jsonRequest);
 LOG.info("testNoteCreate \n" + post.getResponseBodyAsString());
 assertThat("test note create method:", post, isAllowed());
 
-Map resp = gson.fromJson(post.getResponseBodyAsString(), 
new TypeToken>() {
-}.getType());
+Map resp = gson.fromJson(post.getResponseBodyAsString(),
+new TypeToken>() {}.getType());
 
 String newNoteId =  (String) resp.get("body");
 LOG.info("newNoteId:=" + newNoteId);
@@ -165,11 +169,11 @@ public class ZeppelinRestApiTest extends 
AbstractTestRestApi {
   }
   assertTrue("paragraph title check failed", 
p.getTitle().startsWith("title"));
   assertTrue("paragraph text 

zeppelin git commit: ZEPPELIN-3161. Fixed Checkstyle issues in lens module

2018-03-30 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 1d3e94a43 -> 0164cd90e


ZEPPELIN-3161. Fixed Checkstyle issues in lens module

### What is this PR for?
Fixes the Checkstyle issues in the lens module.

### What type of PR is it?
Improvement

### Todos
* [ ] - Task

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

### 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: Jan Hentschel 

Closes #2893 from HorizonNet/ZEPPELIN-3161 and squashes the following commits:

ba7aa79 [Jan Hentschel] ZEPPELIN-3161. Reverted package-lock.json
d1eba0d [Jan Hentschel] ZEPPELIN-3161. Removed package-lock.json file
037f0ba [Jan Hentschel] ZEPPELIN-3161. Fixed Checkstyle issues in lens module


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

Branch: refs/heads/master
Commit: 0164cd90e3108d4afdec70df399b9873eff95b17
Parents: 1d3e94a
Author: Jan Hentschel 
Authored: Tue Mar 27 12:12:03 2018 +0200
Committer: Felix Cheung 
Committed: Thu Mar 29 23:39:27 2018 -0700

--
 lens/pom.xml|  10 +-
 .../apache/zeppelin/lens/ExecutionDetail.java   |   8 +-
 .../org/apache/zeppelin/lens/LensBootstrap.java |   5 +-
 .../apache/zeppelin/lens/LensInterpreter.java   | 227 +--
 .../zeppelin/lens/LensJLineShellComponent.java  |  56 ++---
 .../lens/LensSimpleExecutionStrategy.java   |  14 +-
 .../zeppelin/lens/LensInterpreterTest.java  |  21 +-
 7 files changed, 173 insertions(+), 168 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0164cd90/lens/pom.xml
--
diff --git a/lens/pom.xml b/lens/pom.xml
index 828e8f3..5eb81c2 100644
--- a/lens/pom.xml
+++ b/lens/pom.xml
@@ -171,7 +171,13 @@
   
 maven-resources-plugin
   
+  
+org.apache.maven.plugins
+maven-checkstyle-plugin
+
+  false
+
+  
 
   
-
-
+
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0164cd90/lens/src/main/java/org/apache/zeppelin/lens/ExecutionDetail.java
--
diff --git a/lens/src/main/java/org/apache/zeppelin/lens/ExecutionDetail.java 
b/lens/src/main/java/org/apache/zeppelin/lens/ExecutionDetail.java
index 3f8b9ab..081c3e5 100644
--- a/lens/src/main/java/org/apache/zeppelin/lens/ExecutionDetail.java
+++ b/lens/src/main/java/org/apache/zeppelin/lens/ExecutionDetail.java
@@ -19,25 +19,29 @@ package org.apache.zeppelin.lens;
 
 import org.apache.lens.client.LensClient;
 import org.springframework.shell.core.JLineShell;
+
 /**
- * Pojo tracking query execution details
- * Used to cancel the query
+ * Pojo tracking query execution details. Used to cancel the query.
  */
 public class ExecutionDetail {
   private String queryHandle;
   private LensClient lensClient;
   private JLineShell shell;
+
   ExecutionDetail(String qh, LensClient lensClient, JLineShell shell) {
 this.queryHandle = qh;
 this.lensClient = lensClient;
 this.shell = shell;
   }
+
   public JLineShell getShell() {
 return shell;
   }
+
   public String getQueryHandle() {
 return queryHandle;
   }
+
   public LensClient getLensClient() {
 return lensClient;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0164cd90/lens/src/main/java/org/apache/zeppelin/lens/LensBootstrap.java
--
diff --git a/lens/src/main/java/org/apache/zeppelin/lens/LensBootstrap.java 
b/lens/src/main/java/org/apache/zeppelin/lens/LensBootstrap.java
index 2ce9c57..670ed33 100644
--- a/lens/src/main/java/org/apache/zeppelin/lens/LensBootstrap.java
+++ b/lens/src/main/java/org/apache/zeppelin/lens/LensBootstrap.java
@@ -16,15 +16,12 @@
 
 package org.apache.zeppelin.lens;
 
-import java.util.Properties;
-
 import org.springframework.beans.factory.support.DefaultListableBeanFactory;
 import org.springframework.beans.factory.support.RootBeanDefinition;
 import org.springframework.context.support.GenericApplicationContext;
-import org.springframework.shell.core.Shell;
  
 /**
- * workaround for https://github.com/spring-projects/spring-shell/issues/73
+ * workaround for https://github.com/spring-projects/spring-shell/issues/73.
  */
 public class LensBootstrap extends 

zeppelin git commit: ZEPPELIN-3162. Fixed Checkstyle issues in neo4j module

2018-03-30 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master b9d6056b7 -> 1d3e94a43


ZEPPELIN-3162. Fixed Checkstyle issues in neo4j module

### What is this PR for?
Fixed the Checkstyle errors and warnings in the neo4j module.

### What type of PR is it?
Improvement

### Todos
* [ ] - Task

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

### 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: Jan Hentschel 

Closes #2892 from HorizonNet/ZEPPELIN-3162 and squashes the following commits:

d8c2f49 [Jan Hentschel] ZEPPELIN-3162. Reverted package-lock.json
2d628c9 [Jan Hentschel] Merge branch 'master' into ZEPPELIN-3162
cf95110 [Jan Hentschel] ZEPPELIN-3162. Incorporated review feedback
819a1a2 [Jan Hentschel] ZEPPELIN-3162. Fixed Checkstyle issues in neo4j module


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

Branch: refs/heads/master
Commit: 1d3e94a43eb1930fe2e9816debe23fe9e721ba07
Parents: b9d6056
Author: Jan Hentschel 
Authored: Tue Mar 27 12:24:44 2018 +0200
Committer: Felix Cheung 
Committed: Thu Mar 29 23:27:23 2018 -0700

--
 neo4j/pom.xml   |   7 ++
 .../graph/neo4j/Neo4jConnectionManager.java |  26 +++--
 .../graph/neo4j/Neo4jCypherInterpreter.java |  30 +++---
 .../graph/neo4j/utils/Neo4jConversionUtils.java |  12 +--
 .../graph/neo4j/Neo4jCypherInterpreterTest.java | 101 +++
 5 files changed, 99 insertions(+), 77 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1d3e94a4/neo4j/pom.xml
--
diff --git a/neo4j/pom.xml b/neo4j/pom.xml
index 2bf9e9a..906939c 100644
--- a/neo4j/pom.xml
+++ b/neo4j/pom.xml
@@ -138,6 +138,13 @@
   
 
   
+  
+org.apache.maven.plugins
+maven-checkstyle-plugin
+
+  false
+
+  
 
   
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1d3e94a4/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jConnectionManager.java
--
diff --git 
a/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jConnectionManager.java
 
b/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jConnectionManager.java
index 7cd504e..208d142 100644
--- 
a/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jConnectionManager.java
+++ 
b/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jConnectionManager.java
@@ -17,6 +17,17 @@
 
 package org.apache.zeppelin.graph.neo4j;
 
+import org.apache.commons.lang.StringUtils;
+import org.neo4j.driver.v1.AuthToken;
+import org.neo4j.driver.v1.AuthTokens;
+import org.neo4j.driver.v1.Config;
+import org.neo4j.driver.v1.Driver;
+import org.neo4j.driver.v1.GraphDatabase;
+import org.neo4j.driver.v1.Session;
+import org.neo4j.driver.v1.StatementResult;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
@@ -25,19 +36,9 @@ import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.resource.Resource;
 import org.apache.zeppelin.resource.ResourcePool;
-import org.neo4j.driver.v1.AuthToken;
-import org.neo4j.driver.v1.AuthTokens;
-import org.neo4j.driver.v1.Config;
-import org.neo4j.driver.v1.Driver;
-import org.neo4j.driver.v1.GraphDatabase;
-import org.neo4j.driver.v1.Session;
-import org.neo4j.driver.v1.StatementResult;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Neo4j connection manager for Zeppelin.
@@ -66,9 +67,7 @@ public class Neo4jConnectionManager {
   private final AuthToken authToken;
 
   /**
-   * 
-   * Enum type for the AuthToken 
-   *
+   * Enum type for the AuthToken.
*/
   public enum Neo4jAuthType {NONE, BASIC}
 
@@ -147,5 +146,4 @@ public class Neo4jConnectionManager {
 }
 return keys;
   }
-
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1d3e94a4/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreter.java
--
diff --git 
a/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreter.java
 

zeppelin git commit: ZEPPELIN-3160. Fixed Checkstyle issues in kylin module

2018-03-29 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 930907959 -> d19b35abe


ZEPPELIN-3160. Fixed Checkstyle issues in kylin module

### What is this PR for?
Fixed the Checkstyle issues in the kylin module.

### What type of PR is it?
Improvement

### Todos
* [ ] - Task

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

### 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: Jan Hentschel 

Closes #2895 from HorizonNet/ZEPPELIN-3160 and squashes the following commits:

d01830b [Jan Hentschel] ZEPPELIN-3160. Reverted package-lock.json
455c54d [Jan Hentschel] ZEPPELIN-3160. Fixed Checkstyle issues in kylin module


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

Branch: refs/heads/master
Commit: d19b35abe256513a07ebae1e63cc1e17b8091dd3
Parents: 9309079
Author: Jan Hentschel 
Authored: Tue Mar 27 12:22:44 2018 +0200
Committer: Felix Cheung 
Committed: Wed Mar 28 23:39:33 2018 -0700

--
 kylin/pom.xml   |  10 +-
 .../zeppelin/kylin/KylinErrorResponse.java  |   3 +-
 .../apache/zeppelin/kylin/KylinInterpreter.java |  10 +-
 .../zeppelin/kylin/KylinInterpreterTest.java| 160 ++-
 4 files changed, 95 insertions(+), 88 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d19b35ab/kylin/pom.xml
--
diff --git a/kylin/pom.xml b/kylin/pom.xml
index 6d78fdf..b70bfb2 100644
--- a/kylin/pom.xml
+++ b/kylin/pom.xml
@@ -73,7 +73,13 @@
 
 maven-resources-plugin
 
+
+org.apache.maven.plugins
+maven-checkstyle-plugin
+
+false
+
+
 
 
-
-
+
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d19b35ab/kylin/src/main/java/org/apache/zeppelin/kylin/KylinErrorResponse.java
--
diff --git 
a/kylin/src/main/java/org/apache/zeppelin/kylin/KylinErrorResponse.java 
b/kylin/src/main/java/org/apache/zeppelin/kylin/KylinErrorResponse.java
index 00439e8..04d0479 100644
--- a/kylin/src/main/java/org/apache/zeppelin/kylin/KylinErrorResponse.java
+++ b/kylin/src/main/java/org/apache/zeppelin/kylin/KylinErrorResponse.java
@@ -34,7 +34,7 @@ class KylinErrorResponse implements JsonSerializable {
   private Object data;
   private String msg;
 
-  public KylinErrorResponse(String stacktrace, String exception, String url,
+  KylinErrorResponse(String stacktrace, String exception, String url,
   String code, Object data, String msg) {
 this.stacktrace = stacktrace;
 this.exception = exception;
@@ -59,5 +59,4 @@ class KylinErrorResponse implements JsonSerializable {
   return null;
 }
   }
-
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d19b35ab/kylin/src/main/java/org/apache/zeppelin/kylin/KylinInterpreter.java
--
diff --git 
a/kylin/src/main/java/org/apache/zeppelin/kylin/KylinInterpreter.java 
b/kylin/src/main/java/org/apache/zeppelin/kylin/KylinInterpreter.java
index c7cd689..444f5cb 100755
--- a/kylin/src/main/java/org/apache/zeppelin/kylin/KylinInterpreter.java
+++ b/kylin/src/main/java/org/apache/zeppelin/kylin/KylinInterpreter.java
@@ -24,10 +24,6 @@ import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.entity.StringEntity;
 import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.zeppelin.interpreter.Interpreter;
-import org.apache.zeppelin.interpreter.InterpreterContext;
-import org.apache.zeppelin.interpreter.InterpreterResult;
-import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -37,6 +33,11 @@ import java.util.Properties;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.zeppelin.interpreter.Interpreter;
+import org.apache.zeppelin.interpreter.InterpreterContext;
+import org.apache.zeppelin.interpreter.InterpreterResult;
+import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
+
 /**
  * Kylin interpreter for Zeppelin. (http://kylin.apache.org)
  */
@@ -233,5 +234,4 @@ public class 

zeppelin git commit: ZEPPELIN-3310. Scio interpreter layout is broken

2018-03-19 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 7dc4dbea5 -> 2a5960bd5


ZEPPELIN-3310. Scio interpreter layout is broken

### What is this PR for?
Fix scio interpreter layout. The current scio interpreter layout is broken 
because there is not a newline between %table part and %text part in this 
interpreter output.

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

### What is the Jira issue?
[ZEPPELIN-3310](https://issues.apache.org/jira/browse/ZEPPELIN-3310)

### How should this be tested?
* CI should pass
* View the snapshot

### Screenshots (if appropriate)
[Before applied this change]
 ![Interceptors 
Diagram](https://raw.githubusercontent.com/iijima-satoshi/okhttp/master/scio_interpreter_layout_is_broken.png)

[Ater applied this change]
 ![Interceptors 
Diagram](https://raw.githubusercontent.com/iijima-satoshi/okhttp/master/screenshot_applied_patch.png)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: iijima_satoshi 

Closes #2854 from iijima-satoshi/fix-scio-interpreter-layout and squashes the 
following commits:

2b4fd68 [iijima_satoshi] ZEPPELIN-3310. Scio interpreter layout is broken


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

Branch: refs/heads/master
Commit: 2a5960bd50ea29ce7b925a6ac3288c0fd5ae7ddd
Parents: 7dc4dbe
Author: iijima_satoshi 
Authored: Fri Mar 9 19:15:24 2018 +0900
Committer: Felix Cheung 
Committed: Mon Mar 19 10:24:44 2018 -0700

--
 .../apache/zeppelin/scio/DisplayHelpers.scala   |   2 +-
 .../zeppelin/scio/DisplayHelpersTest.scala  | 103 +--
 2 files changed, 47 insertions(+), 58 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/2a5960bd/scio/src/main/scala/org/apache/zeppelin/scio/DisplayHelpers.scala
--
diff --git a/scio/src/main/scala/org/apache/zeppelin/scio/DisplayHelpers.scala 
b/scio/src/main/scala/org/apache/zeppelin/scio/DisplayHelpers.scala
index 8dee3ab..bfb4f9c 100644
--- a/scio/src/main/scala/org/apache/zeppelin/scio/DisplayHelpers.scala
+++ b/scio/src/main/scala/org/apache/zeppelin/scio/DisplayHelpers.scala
@@ -35,7 +35,7 @@ private[scio] object DisplayHelpers {
   private[scio] val tab = "\t"
   private[scio] val newline = "\n"
   private[scio] val table = "%table"
-  private[scio] val endTable = "%text"
+  private[scio] val endTable = "\n%text"
   private[scio] val rowLimitReachedMsg =
 s"$newlineResults are limited to " + maxResults + s" 
rows.$newline"
   private[scio] val bQSchemaIncomplete =

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/2a5960bd/scio/src/test/scala/org/apache/zeppelin/scio/DisplayHelpersTest.scala
--
diff --git 
a/scio/src/test/scala/org/apache/zeppelin/scio/DisplayHelpersTest.scala 
b/scio/src/test/scala/org/apache/zeppelin/scio/DisplayHelpersTest.scala
index 6dd05ab..a197faf 100644
--- a/scio/src/test/scala/org/apache/zeppelin/scio/DisplayHelpersTest.scala
+++ b/scio/src/test/scala/org/apache/zeppelin/scio/DisplayHelpersTest.scala
@@ -48,7 +48,8 @@ class DisplayHelpersTest extends FlatSpec with Matchers {
   // 
---
 
   private val anyValHeader = s"$table value"
-  private val endTable = DisplayHelpers.endTable
+  private val endTableFooter = DisplayHelpers.endTable.split("\\n").last
+  private val endTableSeq = Seq("", endTableFooter)
 
   "DisplayHelpers" should "support Integer SCollection via AnyVal" in {
 import 
org.apache.zeppelin.scio.DisplaySCollectionImplicits.ZeppelinSCollection
@@ -60,10 +61,9 @@ class DisplayHelpersTest extends FlatSpec with Matchers {
 o should contain theSameElementsAs Seq(anyValHeader,
"1",
"2",
-   "3",
-   endTable)
+   "3") ++ endTableSeq
 o.head should be(anyValHeader)
-o.last should be(endTable)
+o.last should be(endTableFooter)
   }
 
   it should "support Long SCollection via AnyVal" in {
@@ -76,10 +76,9 @@ class DisplayHelpersTest extends FlatSpec with Matchers {
 o should contain theSameElementsAs Seq(anyValHeader,
"1",
"2",
-

zeppelin git commit: [ZEPPELIN-3180] BUGFIX - save operation on interpreter add whitespace to permissions

2018-03-08 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.8 5f2a69a5f -> bea86c650


[ZEPPELIN-3180] BUGFIX - save operation on interpreter add whitespace to 
permissions

### What is this PR for?
This PR fixes a bug when unnecessary spaces are added to the permissions.

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

### What is the Jira issue?
[ZEPPELIN-3180](https://issues.apache.org/jira/browse/ZEPPELIN-3180)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Savalek 

Closes #2749 from Savalek/ZEPPELIN-3180 and squashes the following commits:

b24f1d4 [Savalek] Merge branch 'master' into ZEPPELIN-3180
b2f58fb [Savalek] Merge remote-tracking branch 'upstream/master' into 
ZEPPELIN-3180
84ee2cb [Savalek] Merge remote-tracking branch 'upstream/master' into 
ZEPPELIN-3180
28c537e [Savalek] [ZEPPELIN-3212] add test
0d4a900 [Savalek] [ZEPPELIN-3180] FIX - interpreter add whitespace to 
permissions

(cherry picked from commit 4fc0482385a150ab6712d7f44e00e37d16cd4bdf)
Signed-off-by: Felix Cheung 


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

Branch: refs/heads/branch-0.8
Commit: bea86c65093602bda6ce240a4d35b8fbde64d1d8
Parents: 5f2a69a
Author: Savalek 
Authored: Tue Feb 27 14:08:18 2018 +0300
Committer: Felix Cheung 
Committed: Thu Mar 8 23:09:14 2018 -0800

--
 zeppelin-web/e2e/home.spec.js   | 48 
 .../app/interpreter/interpreter.controller.js   |  3 ++
 2 files changed, 51 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/bea86c65/zeppelin-web/e2e/home.spec.js
--
diff --git a/zeppelin-web/e2e/home.spec.js b/zeppelin-web/e2e/home.spec.js
index 7fc9499..299fbb5 100644
--- a/zeppelin-web/e2e/home.spec.js
+++ b/zeppelin-web/e2e/home.spec.js
@@ -1,4 +1,26 @@
 describe('Home e2e Test', function() {
+  /*Common methods for interact with elements*/
+  let clickOn = function(elem) {
+browser.actions().mouseMove(elem).click().perform()
+  }
+
+  let sendKeysToInput = function(input, keys) {
+cleanInput(input)
+input.sendKeys(keys)
+  }
+
+  let cleanInput = function(inputElem) {
+inputElem.sendKeys(protractor.Key.chord(protractor.Key.CONTROL, "a"))
+inputElem.sendKeys(protractor.Key.BACK_SPACE)
+  }
+
+  let scrollToElementAndClick = function(elem) {
+browser.executeScript("arguments[0].scrollIntoView(false);", 
elem.getWebElement())
+browser.sleep(100)
+clickOn(elem)
+  }
+
+  //tests
   it('should have a welcome message', function() {
 browser.get('http://localhost:8080');
 var welcomeElem = element(by.id('welcome'))
@@ -15,4 +37,30 @@ describe('Home e2e Test', function() {
 var btn = element(by.cssContainingText('a', 'Create new note'))
 expect(btn.isPresent()).toBe(true)
   })
+
+  it('correct save permission in interpreter', function() {
+var ownerName = 'admin'
+var interpreterName = 'interpreter_e2e_test'
+clickOn(element(by.xpath('//span[@class="username ng-binding"]')))
+clickOn(element(by.xpath('//a[@href="#/interpreter"]')))
+clickOn(element(by.xpath('//button[@ng-click="showAddNewSetting = 
!showAddNewSetting"]')))
+
sendKeysToInput(element(by.xpath('//input[@id="newInterpreterSettingName"]')), 
interpreterName)
+
clickOn(element(by.xpath('//select[@ng-model="newInterpreterSetting.group"]')))
+browser.sleep(500)
+browser.actions().sendKeys(protractor.Key.ARROW_DOWN).perform()
+browser.actions().sendKeys(protractor.Key.ENTER).perform()
+
clickOn(element(by.xpath('//div[@ng-show="showAddNewSetting"]//input[@id="idShowPermission"]')))
+
sendKeysToInput(element(by.xpath('//div[@ng-show="showAddNewSetting"]//input[@class="select2-search__field"]')),
 ownerName)
+browser.sleep(500)
+browser.actions().sendKeys(protractor.Key.ENTER).perform()
+
scrollToElementAndClick(element(by.xpath('//span[@ng-click="addNewInterpreterSetting()"]')))
+scrollToElementAndClick(element(by.xpath('//*[@id="' + interpreterName + 
'"]//span[@class="fa fa-pencil"]')))
+scrollToElementAndClick(element(by.xpath('//*[@id="' + interpreterName + 
'"]//button[@type="submit"]')))
+
clickOn(element(by.xpath('//div[@class="bootstrap-dialog-footer-buttons"]//button[contains(text(),
 \'OK\')]')))
+browser.get('http://localhost:8080/#/interpreter');
+var text = element(by.xpath('//*[@id="' + interpreterName + 
'"]//li[contains(text(), \'admin\')]')).getText()
+

zeppelin git commit: [ZEPPELIN-3180] BUGFIX - save operation on interpreter add whitespace to permissions

2018-03-08 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 0267ecf76 -> 4fc048238


[ZEPPELIN-3180] BUGFIX - save operation on interpreter add whitespace to 
permissions

### What is this PR for?
This PR fixes a bug when unnecessary spaces are added to the permissions.

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

### What is the Jira issue?
[ZEPPELIN-3180](https://issues.apache.org/jira/browse/ZEPPELIN-3180)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Savalek 

Closes #2749 from Savalek/ZEPPELIN-3180 and squashes the following commits:

b24f1d4 [Savalek] Merge branch 'master' into ZEPPELIN-3180
b2f58fb [Savalek] Merge remote-tracking branch 'upstream/master' into 
ZEPPELIN-3180
84ee2cb [Savalek] Merge remote-tracking branch 'upstream/master' into 
ZEPPELIN-3180
28c537e [Savalek] [ZEPPELIN-3212] add test
0d4a900 [Savalek] [ZEPPELIN-3180] FIX - interpreter add whitespace to 
permissions


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

Branch: refs/heads/master
Commit: 4fc0482385a150ab6712d7f44e00e37d16cd4bdf
Parents: 0267ecf
Author: Savalek 
Authored: Tue Feb 27 14:08:18 2018 +0300
Committer: Felix Cheung 
Committed: Thu Mar 8 23:08:46 2018 -0800

--
 zeppelin-web/e2e/home.spec.js   | 48 
 .../app/interpreter/interpreter.controller.js   |  3 ++
 2 files changed, 51 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/4fc04823/zeppelin-web/e2e/home.spec.js
--
diff --git a/zeppelin-web/e2e/home.spec.js b/zeppelin-web/e2e/home.spec.js
index 7fc9499..299fbb5 100644
--- a/zeppelin-web/e2e/home.spec.js
+++ b/zeppelin-web/e2e/home.spec.js
@@ -1,4 +1,26 @@
 describe('Home e2e Test', function() {
+  /*Common methods for interact with elements*/
+  let clickOn = function(elem) {
+browser.actions().mouseMove(elem).click().perform()
+  }
+
+  let sendKeysToInput = function(input, keys) {
+cleanInput(input)
+input.sendKeys(keys)
+  }
+
+  let cleanInput = function(inputElem) {
+inputElem.sendKeys(protractor.Key.chord(protractor.Key.CONTROL, "a"))
+inputElem.sendKeys(protractor.Key.BACK_SPACE)
+  }
+
+  let scrollToElementAndClick = function(elem) {
+browser.executeScript("arguments[0].scrollIntoView(false);", 
elem.getWebElement())
+browser.sleep(100)
+clickOn(elem)
+  }
+
+  //tests
   it('should have a welcome message', function() {
 browser.get('http://localhost:8080');
 var welcomeElem = element(by.id('welcome'))
@@ -15,4 +37,30 @@ describe('Home e2e Test', function() {
 var btn = element(by.cssContainingText('a', 'Create new note'))
 expect(btn.isPresent()).toBe(true)
   })
+
+  it('correct save permission in interpreter', function() {
+var ownerName = 'admin'
+var interpreterName = 'interpreter_e2e_test'
+clickOn(element(by.xpath('//span[@class="username ng-binding"]')))
+clickOn(element(by.xpath('//a[@href="#/interpreter"]')))
+clickOn(element(by.xpath('//button[@ng-click="showAddNewSetting = 
!showAddNewSetting"]')))
+
sendKeysToInput(element(by.xpath('//input[@id="newInterpreterSettingName"]')), 
interpreterName)
+
clickOn(element(by.xpath('//select[@ng-model="newInterpreterSetting.group"]')))
+browser.sleep(500)
+browser.actions().sendKeys(protractor.Key.ARROW_DOWN).perform()
+browser.actions().sendKeys(protractor.Key.ENTER).perform()
+
clickOn(element(by.xpath('//div[@ng-show="showAddNewSetting"]//input[@id="idShowPermission"]')))
+
sendKeysToInput(element(by.xpath('//div[@ng-show="showAddNewSetting"]//input[@class="select2-search__field"]')),
 ownerName)
+browser.sleep(500)
+browser.actions().sendKeys(protractor.Key.ENTER).perform()
+
scrollToElementAndClick(element(by.xpath('//span[@ng-click="addNewInterpreterSetting()"]')))
+scrollToElementAndClick(element(by.xpath('//*[@id="' + interpreterName + 
'"]//span[@class="fa fa-pencil"]')))
+scrollToElementAndClick(element(by.xpath('//*[@id="' + interpreterName + 
'"]//button[@type="submit"]')))
+
clickOn(element(by.xpath('//div[@class="bootstrap-dialog-footer-buttons"]//button[contains(text(),
 \'OK\')]')))
+browser.get('http://localhost:8080/#/interpreter');
+var text = element(by.xpath('//*[@id="' + interpreterName + 
'"]//li[contains(text(), \'admin\')]')).getText()
+scrollToElementAndClick(element(by.xpath('//*[@id="' + interpreterName + 
'"]//span//span[@class="fa fa-trash"]')))
+

zeppelin git commit: ZEPPELIN-3202. Added missing test dependencies in the scio module

2018-02-06 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 6f4f0ff96 -> cb174ffc6


ZEPPELIN-3202. Added missing test dependencies in the scio module

### What is this PR for?

Added missing test dependencies for the **scio** module to prevent test 
failures when running `mvn clean install`.

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

### Todos
* [ ] - Task

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

### 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: Jan Hentschel 

Closes #2759 from HorizonNet/ZEPPELIN-3202 and squashes the following commits:

2d9ffdf [Jan Hentschel] ZEPPELIN-3202. Added missing test dependencies in the 
scio module


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

Branch: refs/heads/master
Commit: cb174ffc6a4464e75342b809edc59273d3b4af6a
Parents: 6f4f0ff
Author: Jan Hentschel 
Authored: Thu Feb 1 15:53:29 2018 +0100
Committer: Felix Cheung 
Committed: Tue Feb 6 21:15:27 2018 -0800

--
 scio/pom.xml | 22 ++
 1 file changed, 22 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/cb174ffc/scio/pom.xml
--
diff --git a/scio/pom.xml b/scio/pom.xml
index a62ff2b..08d0696 100644
--- a/scio/pom.xml
+++ b/scio/pom.xml
@@ -43,6 +43,9 @@
 2.3
 2.15.2
 1.7.7
+
+
+1.3
   
 
   
@@ -101,6 +104,25 @@
   test
 
 
+
+  org.hamcrest
+  hamcrest-all
+  ${hamcrest.all.version}
+  test
+
+
+
+  com.google.code.gson
+  gson
+  test
+
+
+
+  commons-lang
+  commons-lang
+  test
+
+
   
 
   



zeppelin git commit: [Zeppelin-2964] Stop execution on schedule if the note has been moved to the trash

2017-12-28 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 851dcb1a3 -> dd1be03de


[Zeppelin-2964] Stop execution on schedule if the note has been moved to the 
trash

### What is this PR for?
When you put the note (or folder) in the trash, the note continues to run on 
schedule.
This PR fixes this. Now when you put the note into the trash, the task is 
removed, and when you restore the note, it runs again.

### What type of PR is it?
Improvement

### What is the Jira issue?
[ZEPPELIN-3007](https://issues.apache.org/jira/browse/ZEPPELIN-3007)

### How should this be tested?
- Create a scheduled launch for the note.
- Put the note in the trash.
- Look through the logs.
- Note must stop running.
- Restore the note from the trash.
- Running on a schedule should continue again.

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: tinkoff-dwh 

Closes #2697 from tinkoff-dwh/ZEPPELIN-2964 and squashes the following commits:

b12ae4c [tinkoff-dwh] [ZEPPELIN-2964] add if statement
3db4a8e [tinkoff-dwh] [ZEPPELIN-2964] restore cron together note/folder
3906b9e [tinkoff-dwh] [ZEPPELIN-2964] drop cron when note placed in the trash


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

Branch: refs/heads/master
Commit: dd1be03dee9428ade92b8fd47d148c2325179d19
Parents: 851dcb1
Author: tinkoff-dwh 
Authored: Tue Dec 5 15:23:43 2017 +0300
Committer: Felix Cheung 
Committed: Thu Dec 28 00:40:06 2017 -0800

--
 .../apache/zeppelin/socket/NotebookServer.java  | 31 
 .../src/app/notebook/notebook-actionBar.html|  2 +-
 .../org/apache/zeppelin/notebook/Notebook.java  |  2 +-
 3 files changed, 33 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/dd1be03d/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
--
diff --git 
a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java 
b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
index 184735a..56aa50a 100644
--- 
a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
+++ 
b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
@@ -1108,6 +1108,13 @@ public class NotebookServer extends WebSocketServlet
 }
 
 Note note = notebook.getNote(noteId);
+
+// drop cron
+Map config = note.getConfig();
+if (config.get("cron") != null) {
+  notebook.removeCron(note.getId());
+}
+
 if (note != null && !note.isTrash()){
   fromMessage.put("name", Folder.TRASH_FOLDER_ID + "/" + note.getName());
   renameNote(conn, userAndRoles, notebook, fromMessage, "move");
@@ -1132,6 +1139,14 @@ public class NotebookServer extends WebSocketServlet
 trashFolderId += Folder.TRASH_FOLDER_CONFLICT_INFIX + 
formatter.print(currentDate);
   }
 
+  List noteList = folder.getNotesRecursively();
+  for (Note note: noteList) {
+Map config = note.getConfig();
+if (config.get("cron") != null) {
+  notebook.removeCron(note.getId());
+}
+  }
+
   fromMessage.put("name", trashFolderId);
   renameFolder(conn, userAndRoles, notebook, fromMessage, "move");
 }
@@ -1147,6 +1162,13 @@ public class NotebookServer extends WebSocketServlet
 }
 
 Note note = notebook.getNote(noteId);
+
+//restore cron
+Map config = note.getConfig();
+if (config.get("cron") != null) {
+  notebook.refreshCron(note.getId());
+}
+
 if (note != null && note.isTrash()) {
   fromMessage.put("name", 
note.getName().replaceFirst(Folder.TRASH_FOLDER_ID + "/", ""));
   renameNote(conn, userAndRoles, notebook, fromMessage, "restore");
@@ -1166,6 +1188,15 @@ public class NotebookServer extends WebSocketServlet
 if (folder != null && folder.isTrash()) {
   String restoreName = folder.getId().replaceFirst(Folder.TRASH_FOLDER_ID 
+ "/", "").trim();
 
+  //restore cron for each paragraph
+  List noteList = folder.getNotesRecursively();
+  for (Note note : noteList) {
+Map config = note.getConfig();
+if (config.get("cron") != null) {
+  notebook.refreshCron(note.getId());
+}
+  }
+
   // if the folder had conflict when it had moved to trash before
   Pattern p = Pattern.compile("\\d{4}-\\d{2}-\\d{2} 
\\d{2}:\\d{2}:\\d{2}$");
   

zeppelin git commit: [ZEPPELIN-3038] Network visualization not show "source" and "target" node/edge properties

2017-12-23 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 53e6f743d -> 851dcb1a3


[ZEPPELIN-3038] Network visualization not show "source" and "target" node/edge 
properties

### What is this PR for?
The Network visualization not show "source" and "target" node/edge properties 
when the graph is flattened to create the table representation.

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

### Todos
* [x] - Fixed

### Screenshot
Before:
![zeppelin 
before](https://user-images.githubusercontent.com/185/32510305-6ee266c8-c3f0-11e7-9e28-7ed1f304ebcb.PNG)

After:
![zeppelin 
after](https://user-images.githubusercontent.com/185/32510324-8121cc3e-c3f0-11e7-9f1f-84bba563aebc.PNG)

### What is the Jira issue?
[ZEPPELIN-3038](https://issues.apache.org/jira/browse/ZEPPELIN-3038)

### How should this be tested?
Please use this 
[notebook](https://gist.github.com/conker84/9574127c2389d08164423894aa93b67f)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Andrea Santurbano 

Closes #2653 from conker84/network-fix and squashes the following commits:

d4f19b6 [Andrea Santurbano] removed unused property
44100c6 [Andrea Santurbano] Removed semicolons
273c88f [Andrea Santurbano] added test on edges prevent double rendering
5eeabc2 [Andrea Santurbano] networkdata class now shows fields "source" and 
"target" + added test case moved the logic related to the visualization from 
networkdata to visualization-d3network added some optimization


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

Branch: refs/heads/master
Commit: 851dcb1a392a3b720501982c6c2c4a3d30468a7e
Parents: 53e6f74
Author: Andrea Santurbano 
Authored: Tue Nov 7 18:39:58 2017 +0100
Committer: Felix Cheung 
Committed: Sat Dec 23 10:34:39 2017 -0800

--
 zeppelin-web/src/app/tabledata/networkdata.js   | 104 +++---
 .../src/app/tabledata/networkdata.test.js   |  27 +++-
 .../builtins/visualization-d3network.js | 135 ++-
 3 files changed, 150 insertions(+), 116 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/851dcb1a/zeppelin-web/src/app/tabledata/networkdata.js
--
diff --git a/zeppelin-web/src/app/tabledata/networkdata.js 
b/zeppelin-web/src/app/tabledata/networkdata.js
index 7983d82..70cd86b 100644
--- a/zeppelin-web/src/app/tabledata/networkdata.js
+++ b/zeppelin-web/src/app/tabledata/networkdata.js
@@ -40,42 +40,40 @@ export default class NetworkData extends TableData {
   return
 }
 
-this.setNodesDefaults()
-this.setEdgesDefaults()
-
+this.graph.edges = this.graph.edges || []
 this.networkNodes = angular.equals({}, this.graph.labels || {})
 ? null : {count: this.graph.nodes.length, labels: 
this.graph.labels}
 this.networkRelationships = angular.equals([], this.graph.types || [])
 ? null : {count: this.graph.edges.length, types: this.graph.types}
 
-let rows = []
-let comment = ''
-let entities = this.graph.nodes.concat(this.graph.edges)
-let baseColumnNames = [{name: 'id', index: 0, aggr: 'sum'},
-   {name: 'label', index: 1, aggr: 'sum'}]
-let internalFieldsToJump = ['count', 'size', 'totalCount',
-  'data', 'x', 'y', 'labels']
-let baseCols = _.map(baseColumnNames, function(col) { return col.name })
-let keys = _.map(entities, function(elem) { return Object.keys(elem.data 
|| {}) })
+const rows = []
+const comment = ''
+const entities = this.graph.nodes.concat(this.graph.edges)
+const baseColumnNames = [{name: 'id', index: 0, aggr: 'sum'}]
+const containsLabelField = _.find(entities, (entity) => 'label' in entity) 
!= null
+if (this.graph.labels || this.graph.types || containsLabelField) {
+  baseColumnNames.push({name: 'label', index: 1, aggr: 'sum'})
+}
+const internalFieldsToJump = ['count', 'size', 'totalCount',
+  'data', 'x', 'y', 'labels', 'source', 'target']
+const baseCols = _.map(baseColumnNames, (col) => col.name)
+let keys = _.map(entities, (elem) => Object.keys(elem.data || {}))
 keys = _.flatten(keys)
-keys = _.uniq(keys).filter(function(key) {
-  return baseCols.indexOf(key) === -1
-})
-let columnNames = baseColumnNames.concat(_.map(keys, function(elem, i) {
+keys = _.uniq(keys).filter((key) => baseCols.indexOf(key) === -1)
+const entityColumnNames = _.map(keys, (elem, i) => {
   return {name: elem, index: i + 

zeppelin git commit: ZEPPELIN-3037 Configure Http Request Header Size Limit for Jetty

2017-11-26 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master acc1a7cfe -> 83164c843


ZEPPELIN-3037 Configure Http Request Header Size Limit for Jetty

### What is this PR for?
In some deployment scenarios it is necessary to increase 
jetty.request.header.size, which default value is 8192. This will reduce the 
chance of HTTP Error 413 Request entity too large.
There should be a mechanism to configure this setting.

### What type of PR is it?
[Feature]

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

### How should this be tested?
* There is an integration test (automated unit test included) for testing this 
feature.
* To test manually, after increasing setting, make any http request to zeppelin 
with a request header bigger than 8K , you should not get an HTTP Error 413 
Request entity too large.

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? Yes.

Author: byamthev 

Closes #2663 from byamthev/zeppelin3037 and squashes the following commits:

8ff2620 [byamthev] [ZEPPELIN-3037] Configure Http Request Header Size Limit for 
Jetty


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

Branch: refs/heads/master
Commit: 83164c84313a4594baa3127c05f83411dd3f05d6
Parents: acc1a7c
Author: byamthev 
Authored: Tue Nov 14 13:42:18 2017 +0200
Committer: Felix Cheung 
Committed: Sun Nov 26 16:01:47 2017 -0800

--
 conf/zeppelin-site.xml.template |  9 +++
 .../zeppelin/conf/ZeppelinConfiguration.java|  5 ++
 .../apache/zeppelin/server/ZeppelinServer.java  | 17 ++---
 .../configuration/RequestHeaderSizeTest.java| 66 
 .../conf/ZeppelinConfigurationTest.java |  7 +++
 5 files changed, 97 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/83164c84/conf/zeppelin-site.xml.template
--
diff --git a/conf/zeppelin-site.xml.template b/conf/zeppelin-site.xml.template
index b59d878..3c5bbea 100755
--- a/conf/zeppelin-site.xml.template
+++ b/conf/zeppelin-site.xml.template
@@ -443,6 +443,15 @@
 Hardcoding Application Server name to Prevent 
Fingerprinting
 
 -->
+
+
+
 

zeppelin git commit: Add missing build dependencies.

2017-11-26 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 4f9ed -> acc1a7cfe


Add missing build dependencies.

Add `apt-get install` lines for R dependencies that are needed to build
successfully.

### What is this PR for?
This pull request adds installation instructions for building which relate to 
missing dependencies resulting in failing to build (if using R).

### What type of PR is it?
[Documentation]

Author: Jens Grassel 

Closes #2674 from jan0sch/docs-missing-build-deps and squashes the following 
commits:

aa581c1 [Jens Grassel] Add missing build dependencies.


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

Branch: refs/heads/master
Commit: acc1a7cfe78d0d8f69eff68ebb8f5249977e2634
Parents: 4f9
Author: Jens Grassel 
Authored: Thu Nov 16 12:09:35 2017 +0100
Committer: Felix Cheung 
Committed: Sun Nov 26 16:00:22 2017 -0800

--
 docs/setup/basics/how_to_build.md | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/acc1a7cf/docs/setup/basics/how_to_build.md
--
diff --git a/docs/setup/basics/how_to_build.md 
b/docs/setup/basics/how_to_build.md
index f5eb969..f78c631 100644
--- a/docs/setup/basics/how_to_build.md
+++ b/docs/setup/basics/how_to_build.md
@@ -254,6 +254,8 @@ sudo apt-get install git
 sudo apt-get install openjdk-7-jdk
 sudo apt-get install npm
 sudo apt-get install libfontconfig
+sudo apt-get install r-base-dev
+sudo apt-get install r-cran-evaluate
 ```
 
 



zeppelin git commit: [ZEPPELIN-2647] Bypass auth logic when a user logins as admin role

2017-11-14 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 951544a74 -> 717a8c1e7


[ZEPPELIN-2647] Bypass auth logic when a user logins as admin role

### What is this PR for?
For administrator, make new admin role that assigned user can see all notebooks.

### What type of PR is it?
Improvement

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

### How should this be tested?
1. Set role name to use as admin through ZEPPELIN_OWNER_ROLE =  or 
zeppelin.owner.role = .
Default role name is admin
2. Login as user who is not assigned as admin and create notebook.
3. Logout the user and login another user who is assigned as admin, open the 
created notebook.

### Questions:
* Does the licenses files need update? N
* Is there breaking changes for older versions? Y/N
* Does this needs documentation? Y

Author: Yuta Hongo 

Closes #2585 from yu74n/bypass-auth-logic and squashes the following commits:

c706302 [Yuta Hongo] Use StringUtils isBlank()
f6c6345 [Yuta Hongo] Remove description mentioned about private mode
c6e1382 [Yuta Hongo] Disable admin role by default
0170b3f [Yuta Hongo] Check if admin role is valid or not
532a49f [Yuta Hongo] Set blank as default.owner.username default value
98a9de0 [Yuta Hongo] Rename property name
26b818c [Yuta Hongo] Make admin role to bypass auth logic


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

Branch: refs/heads/master
Commit: 717a8c1e796818ab2494a87afcaf811c42e016fa
Parents: 951544a
Author: Yuta Hongo 
Authored: Thu Nov 9 17:16:28 2017 +0900
Committer: Felix Cheung 
Committed: Tue Nov 14 23:48:30 2017 -0800

--
 conf/zeppelin-site.xml.template |  6 +
 .../zeppelin/conf/ZeppelinConfiguration.java|  5 +++-
 .../notebook/NotebookAuthorization.java | 28 ++--
 3 files changed, 30 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/717a8c1e/conf/zeppelin-site.xml.template
--
diff --git a/conf/zeppelin-site.xml.template b/conf/zeppelin-site.xml.template
index 8a2a60e..b59d878 100755
--- a/conf/zeppelin-site.xml.template
+++ b/conf/zeppelin-site.xml.template
@@ -394,6 +394,12 @@
 
 
 
+  zeppelin.notebook.default.owner.username
+  
+  Set owner role by default
+
+
+
   zeppelin.notebook.public
   true
   Make notebook public by default when created, private 
otherwise

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/717a8c1e/zeppelin-interpreter/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
--
diff --git 
a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
 
b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
index 1bc242d..f45e27b 100644
--- 
a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
+++ 
b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
@@ -716,7 +716,10 @@ public class ZeppelinConfiguration extends 
XMLConfiguration {
 ZEPPELIN_INTERPRETER_LIFECYCLE_MANAGER_TIMEOUT_CHECK_INTERVAL(
 "zeppelin.interpreter.lifecyclemanager.timeout.checkinterval", 6000L),
 ZEPPELIN_INTERPRETER_LIFECYCLE_MANAGER_TIMEOUT_THRESHOLD(
-"zeppelin.interpreter.lifecyclemanager.timeout.threshold", 360L);
+"zeppelin.interpreter.lifecyclemanager.timeout.threshold", 360L),
+
+ZEPPELIN_OWNER_ROLE("zeppelin.notebook.default.owner.username", "");
+
 
 private String varName;
 @SuppressWarnings("rawtypes")

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/717a8c1e/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookAuthorization.java
--
diff --git 
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookAuthorization.java
 
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookAuthorization.java
index 69ba891..5f0f066 100644
--- 
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookAuthorization.java
+++ 
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookAuthorization.java
@@ -24,7 +24,6 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
@@ -35,6 +34,7 @@ import 

zeppelin git commit: [ZEPPELIN-3017] fix Spark version in Dockerfiles

2017-11-06 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 4054320a4 -> 2674291d6


[ZEPPELIN-3017] fix Spark version in Dockerfiles

### What is this PR for?

The PR updates Spark version to the current 2.1.2, since the one which is 
present now (2.1.1) is not available anymore.

### What type of PR is it?
Fix

### What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-3017

### How should this be tested?

manually

Author: mark91 

Closes #2636 from mgaido91/ZEPPELIN-3017 and squashes the following commits:

b3cfb44 [mark91] [ZEPPELIN-3017] fix Spark version in Dockerfiles


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

Branch: refs/heads/master
Commit: 2674291d6835f57b1132474e7e91fa3926b2973f
Parents: 4054320
Author: mark91 
Authored: Mon Oct 30 19:06:57 2017 +0100
Committer: Felix Cheung 
Committed: Mon Nov 6 01:02:16 2017 -0800

--
 scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile   | 2 +-
 scripts/docker/spark-cluster-managers/spark_standalone/Dockerfile  | 2 +-
 .../docker/spark-cluster-managers/spark_yarn_cluster/Dockerfile| 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/2674291d/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile
--
diff --git a/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile 
b/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile
index f47b16d..0afda57 100644
--- a/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile
+++ b/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile
@@ -15,7 +15,7 @@
 FROM centos:centos6
 
 ENV SPARK_PROFILE 2.1
-ENV SPARK_VERSION 2.1.1
+ENV SPARK_VERSION 2.1.2
 ENV HADOOP_PROFILE 2.7
 ENV HADOOP_VERSION 2.7.0
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/2674291d/scripts/docker/spark-cluster-managers/spark_standalone/Dockerfile
--
diff --git a/scripts/docker/spark-cluster-managers/spark_standalone/Dockerfile 
b/scripts/docker/spark-cluster-managers/spark_standalone/Dockerfile
index 19391d0..8bf0f8d 100644
--- a/scripts/docker/spark-cluster-managers/spark_standalone/Dockerfile
+++ b/scripts/docker/spark-cluster-managers/spark_standalone/Dockerfile
@@ -15,7 +15,7 @@
 FROM centos:centos6
 
 ENV SPARK_PROFILE 2.1
-ENV SPARK_VERSION 2.1.1
+ENV SPARK_VERSION 2.1.2
 ENV HADOOP_PROFILE 2.7
 ENV SPARK_HOME /usr/local/spark
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/2674291d/scripts/docker/spark-cluster-managers/spark_yarn_cluster/Dockerfile
--
diff --git 
a/scripts/docker/spark-cluster-managers/spark_yarn_cluster/Dockerfile 
b/scripts/docker/spark-cluster-managers/spark_yarn_cluster/Dockerfile
index 116d4c3..cbbda20 100644
--- a/scripts/docker/spark-cluster-managers/spark_yarn_cluster/Dockerfile
+++ b/scripts/docker/spark-cluster-managers/spark_yarn_cluster/Dockerfile
@@ -15,7 +15,7 @@
 FROM centos:centos6
 
 ENV SPARK_PROFILE 2.1
-ENV SPARK_VERSION 2.1.1
+ENV SPARK_VERSION 2.1.2
 ENV HADOOP_PROFILE 2.7
 ENV HADOOP_VERSION 2.7.0
 



zeppelin git commit: [ZEPPELIN-2949] Allow custom Spark UI URL

2017-10-24 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 84cb4b5fb -> c45128e79


[ZEPPELIN-2949] Allow custom Spark UI URL

### What is this PR for?
Allow an override of default Spark logic in building the URL path and redirect 
the Zeppelin user directly to a configured reverse proxy path

### What type of PR is it?
[Improvement]

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

### How should this be tested?
* Set "zeppelin.spark.uiWebUrl" to http://localhost/spark-reverse-proxy-path
* Run Spark code
* Open Spark UI
* Expected to be redirected to http://localhost/spark-reverse-proxy-path

### 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 

Closes #2596 from necosta/zeppelin2949 and squashes the following commits:

2ae8f2d [Nelson Costa] [ZEPPELIN-2949] Last amendments
118339f [Nelson Costa] [ZEPPELIN-2949] Updated documentation
826bad4 [Nelson Costa] [ZEPPELIN-2949] Updated documentation
0a56299 [Nelson Costa] [ZEPPELIN-2949] Allow custom Spark UI URL


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

Branch: refs/heads/master
Commit: c45128e79f619e6f2d927176a440ec44a2d588ed
Parents: 84cb4b5
Author: Nelson Costa 
Authored: Thu Oct 19 10:21:54 2017 +0100
Committer: Felix Cheung 
Committed: Mon Oct 23 23:24:55 2017 -0700

--
 docs/interpreter/spark.md   | 21 
 .../apache/zeppelin/spark/SparkInterpreter.java | 11 +-
 .../src/main/resources/interpreter-setting.json |  7 +++
 .../zeppelin/spark/SparkInterpreterTest.java|  2 +-
 4 files changed, 27 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/c45128e7/docs/interpreter/spark.md
--
diff --git a/docs/interpreter/spark.md b/docs/interpreter/spark.md
index bbd9065..da957c6 100644
--- a/docs/interpreter/spark.md
+++ b/docs/interpreter/spark.md
@@ -145,6 +145,11 @@ You can also set other Spark properties which are not 
listed in the table. For a
 true
 Do not change - developer only setting, not for production use
   
+  
+  zeppelin.spark.uiWebUrl
+
+Overrides Spark UI default URL. Value should be a full URL (ex: 
http://{hostName}/{uniquePath}
+  
 
 
 Without any configuration, Spark interpreter works out of box in local mode. 
But if you want to connect to your Spark cluster, you'll need to follow below 
two simple steps.
@@ -184,7 +189,7 @@ For example,
  * **yarn-cluster** in Yarn cluster mode
  * **mesos://host:5050** in Mesos cluster
 
-That's it. Zeppelin will work with any version of Spark and any deployment 
type without rebuilding Zeppelin in this way. 
+That's it. Zeppelin will work with any version of Spark and any deployment 
type without rebuilding Zeppelin in this way.
 For the further information about Spark & Zeppelin version compatibility, 
please refer to "Available Interpreters" section in [Zeppelin download 
page](https://zeppelin.apache.org/download.html).
 
 > Note that without exporting `SPARK_HOME`, it's running in local mode with 
 > included version of Spark. The included version may vary depending on the 
 > build profile.
@@ -216,7 +221,7 @@ There are two ways to load external libraries in Spark 
interpreter. First is usi
 Please see [Dependency 
Management](../usage/interpreter/dependency_management.html) for the details.
 
 ### 2. Loading Spark Properties
-Once `SPARK_HOME` is set in `conf/zeppelin-env.sh`, Zeppelin uses 
`spark-submit` as spark interpreter runner. `spark-submit` supports two ways to 
load configurations. 
+Once `SPARK_HOME` is set in `conf/zeppelin-env.sh`, Zeppelin uses 
`spark-submit` as spark interpreter runner. `spark-submit` supports two ways to 
load configurations.
 The first is command line options such as --master and Zeppelin can pass these 
options to `spark-submit` by exporting `SPARK_SUBMIT_OPTIONS` in 
`conf/zeppelin-env.sh`. Second is reading configuration options from 
`SPARK_HOME/conf/spark-defaults.conf`. Spark properties that user can set to 
distribute libraries are:
 
 
@@ -249,7 +254,7 @@ Here are few examples:
   ```bash
 export SPARK_SUBMIT_OPTIONS="--packages 
com.databricks:spark-csv_2.10:1.2.0 --jars /path/mylib1.jar,/path/mylib2.jar 
--files /path/mylib1.py,/path/mylib2.zip,/path/mylib3.egg"
   ```
-
+
 * `SPARK_HOME/conf/spark-defaults.conf`
 
   ```
@@ -414,17 +419,17 @@ To learn more about 

zeppelin git commit: [ZEPPELIN-2761] - Neo4j Interpreter

2017-10-11 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 0c64d9ca6 -> e0fafac75


[ZEPPELIN-2761] - Neo4j Interpreter

### What is this PR for?
This contribution would to introduce Neo4j Cypher intepreter and at the same 
time provides base APIs that enable other graph databases (or graph framworks 
such as GraphX or Giraph).

### What type of PR is it?
[Feature]

### Todos
* [x] - Provide base APIs to manage graph results (under: 
org.apache.zeppelin.interpreter.graph.*)
* [x] - Create the Neo4j intepreter

### What is the Jira issue?
[[ZEPPELIN-2761]](https://issues.apache.org/jira/browse/ZEPPELIN-2761)

### How should this be tested?
Donwload and execute [Neo4j](https://neo4j.com/download/?ref=home) v3.x, you 
can also pull a [Docker image](https://neo4j.com/developer/docker/).

In order to execute test cases, if you are running Java 7, you need to also 
provide an environment variable telling the tests where to find Java 8, because 
Neo4j-the-database needs it to run.
```bash
export NEO4J_JAVA=
```

Use this statement to create a dummy dataset
```bash
%neo4j
UNWIND range(1,100) as id
CREATE (p:Person {id:id, name: "Name " + id, age: id % 3}) WITH collect(p) as 
people
UNWIND people as p1
UNWIND range(1,10) as friend
WITH p1, people[(p1.id + friend) % size(people)] as p2
CREATE (p1)-[:KNOWS {years: abs(p2.id - p2.id)}]->(p2)
```

Then you can write some simple queries like:
```bash
%neo4j
MATCH (p:Person)-[r:KNOWS]-(p1:Person)
RETURN p, r, p1
LIMIT 10;
```

```bash
%neo4j
MATCH (p:Person)-[r:KNOWS]-(p1:Person)
RETURN p.id AS ID_A, p.name AS NAME_A, r.years AS YEARS, p1.id AS ID_B, p1.name 
AS NAME_B
LIMIT 20;
```

### Video
![zeppelin query 
examples](https://user-images.githubusercontent.com/185/28041473-daaa1f02-65c9-11e7-9445-c45478669d66.gif)

### Questions:
* Does the licenses files need update? **Yes**
* Is there breaking changes for older versions? **No**
* Does this needs documentation? **Yes**

Author: conker84 <sant...@gmail.com>

Closes #2478 from conker84/master and squashes the following commits:

5fb97ce [conker84] review by felixcheung 18/09
1e3d611 [conker84] Review by felixcheung (09/08)
aaf618e [conker84] Review by 1ambda 26/07
b5c2c66 [conker84] Added docs
9eb568d [conker84] Final behavior after discussion
2f88e98 [conker84] Moved business logic to the connection manager
8e4690e [conker84] Create connection manager class
35b4e29 [conker84] First commit


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

Branch: refs/heads/master
Commit: e0fafac75c3e64bf48960501b2776933e9119c65
Parents: 0c64d9c
Author: conker84 <sant...@gmail.com>
Authored: Tue Sep 26 19:54:10 2017 +0200
Committer: Felix Cheung <felixche...@apache.org>
Committed: Tue Oct 10 23:44:02 2017 -0700

--
 docs/_includes/themes/zeppelin/_navigation.html |   1 +
 .../zeppelin/img/docs-img/neo4j-config.png  | Bin 0 -> 21282 bytes
 .../img/docs-img/neo4j-dynamic-forms.png| Bin 0 -> 26003 bytes
 .../zeppelin/img/docs-img/neo4j-graph.png   | Bin 0 -> 30119 bytes
 .../img/docs-img/neo4j-interpreter-video.gif| Bin 0 -> 1577800 bytes
 docs/index.md   |   1 +
 docs/interpreter/neo4j.md   | 117 
 neo4j/pom.xml   | 144 ++
 .../graph/neo4j/Neo4jConnectionManager.java | 151 ++
 .../graph/neo4j/Neo4jCypherInterpreter.java | 274 +++
 .../graph/neo4j/utils/Neo4jConversionUtils.java |  66 +
 .../src/main/resources/interpreter-setting.json |  42 +++
 .../graph/neo4j/Neo4jCypherInterpreterTest.java | 249 +
 pom.xml |   1 +
 zeppelin-distribution/src/bin_license/LICENSE   |   1 +
 .../zeppelin/interpreter/graph/GraphResult.java | 122 +
 .../apache/zeppelin/tabledata/GraphEntity.java  |  74 +
 .../org/apache/zeppelin/tabledata/Node.java |  49 
 .../apache/zeppelin/tabledata/Relationship.java |  63 +
 .../zeppelin/conf/ZeppelinConfiguration.java|   5 +-
 20 files changed, 1358 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e0fafac7/docs/_includes/themes/zeppelin/_navigation.html
--
diff --git a/docs/_includes/themes/zeppelin/_navigation.html 
b/docs/_includes/themes/zeppelin/_navigation.html
index ecdccbd..215c944 100644
--- a/docs/_includes/themes/zeppelin/_navigation.html
+++ b/docs/_includes/themes/zeppelin/_navigation.html
@@ -137,6 +137,7 @@
 Lens
 Livy
  

zeppelin git commit: [ZEPPELIN-2979] Fix links to zeppelin website in README

2017-10-09 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 3eeb2282b -> e28712c48


[ZEPPELIN-2979] Fix links to zeppelin website in README

### What is this PR for?
Fixes the broken links in the README under the sections "Install binary 
package" and "Build from Source" . Also changes http to https for all links to 
the zeppelin website

### What type of PR is it?
[Documentation]

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

### Questions:
* Does the licenses files need update? **no**
* Is there breaking changes for older versions? **no**
* Does this needs documentation? **no**

Author: Adriano Pagano 

Closes #2610 from a-pagano/ZEPPELIN-2979 and squashes the following commits:

970477f [Adriano Pagano] Fix links to zeppelin website in README


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

Branch: refs/heads/master
Commit: e28712c48dcb22af3bf586c223941062cc85b1d1
Parents: 3eeb228
Author: Adriano Pagano 
Authored: Fri Oct 6 16:17:21 2017 +0200
Committer: Felix Cheung 
Committed: Mon Oct 9 09:44:45 2017 -0700

--
 README.md | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e28712c4/README.md
--
diff --git a/README.md b/README.md
index e12d2ae..126520a 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 # Apache Zeppelin
 
-**Documentation:** [User 
Guide](http://zeppelin.apache.org/docs/latest/index.html)
-**Mailing Lists:** [User and Dev mailing 
list](http://zeppelin.apache.org/community.html)
+**Documentation:** [User 
Guide](https://zeppelin.apache.org/docs/latest/index.html)
+**Mailing Lists:** [User and Dev mailing 
list](https://zeppelin.apache.org/community.html)
 **Continuous Integration:** [![Build 
Status](https://travis-ci.org/apache/zeppelin.svg?branch=master)](https://travis-ci.org/apache/zeppelin)
 
 **Contributing:** [Contribution 
Guide](https://zeppelin.apache.org/contribution/contributions.html)
 **Issue Tracker:** [Jira](https://issues.apache.org/jira/browse/ZEPPELIN)
@@ -15,15 +15,15 @@ Core feature:
* Built-in Apache Spark support
 
 
-To know more about Zeppelin, visit our web site 
[http://zeppelin.apache.org](http://zeppelin.apache.org)
+To know more about Zeppelin, visit our web site 
[http://zeppelin.apache.org](https://zeppelin.apache.org)
 
 
 ## Getting Started
 
 ### Install binary package
-Please go to 
[install](http://zeppelin.apache.org/docs/snapshot/install/install.html) to 
install Apache Zeppelin from binary package.
+Please go to 
[install](https://zeppelin.apache.org/docs/latest/install/install.html) to 
install Apache Zeppelin from binary package.
 
 ### Build from source
-Please check [Build from 
source](http://zeppelin.apache.org/docs/snapshot/install/build.html) to build 
Zeppelin from source.
+Please check [Build from 
source](https://zeppelin.apache.org/docs/latest/install/build.html) to build 
Zeppelin from source.
 
 



zeppelin git commit: Update github PR template to include link to setup travis CI

2017-10-04 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 300c9ef16 -> b05a1b699


Update github PR template to include link to setup travis CI

### What is this PR for?

Add to the github PR template

### What type of PR is it?
[Improvement]

Author: Felix Cheung <felixcheun...@hotmail.com>

Closes #2608 from felixcheung/traviscontri and squashes the following commits:

70c81d7 [Felix Cheung] type
b52c028 [Felix Cheung] update


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

Branch: refs/heads/master
Commit: b05a1b699fd788ac8a4c73d2354a9e96f25e7035
Parents: 300c9ef
Author: Felix Cheung <felixcheun...@hotmail.com>
Authored: Wed Oct 4 10:12:23 2017 -0700
Committer: Felix Cheung <felixche...@apache.org>
Committed: Wed Oct 4 22:21:39 2017 -0700

--
 .github/PULL_REQUEST_TEMPLATE | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/b05a1b69/.github/PULL_REQUEST_TEMPLATE
--
diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE
index 526b414..25b263a 100644
--- a/.github/PULL_REQUEST_TEMPLATE
+++ b/.github/PULL_REQUEST_TEMPLATE
@@ -14,7 +14,9 @@ First time? Check out the contributing guide - 
https://zeppelin.apache.org/contr
 * Put link here, and add [ZEPPELIN-*Jira number*] in PR title, eg. 
[ZEPPELIN-533]
 
 ### How should this be tested?
-Outline the steps to test the PR here.
+* First time? Setup Travis CI as described on 
https://zeppelin.apache.org/contribution/contributions.html#continuous-integration
+* Strongly recommended: add automated unit tests for any new or changed 
behavior
+* Outline any manual steps to test the PR here.
 
 ### Screenshots (if appropriate)
 



zeppelin git commit: [ZEPPELIN-2944] Cannot launch Spark interpreter for non-local mode

2017-09-25 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master a6a8b0298 -> 184283c4c


[ZEPPELIN-2944] Cannot launch Spark interpreter for non-local mode

### What is this PR for?
When I used Spark interpreter for non-local mode, I got
```
java.lang.RuntimeException: SPARK_HOME is not specified for non-local mode
at 
org.apache.zeppelin.interpreter.InterpreterSetting.setupPropertiesForSparkR(InterpreterSetting.java:783)
at 
org.apache.zeppelin.interpreter.InterpreterSetting.getEnvFromInterpreterProperty(InterpreterSetting.java:741)
at 
org.apache.zeppelin.interpreter.InterpreterSetting.createInterpreterProcess(InterpreterSetting.java:712)
at 
org.apache.zeppelin.interpreter.ManagedInterpreterGroup.getOrCreateInterpreterProcess(ManagedInterpreterGroup.java:58)
at 
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getOrCreateInterpreterProcess(RemoteInterpreter.java:98)
at 
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.internal_create(RemoteInterpreter.java:153)
at 
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.open(RemoteInterpreter.java:126)
at 
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getFormType(RemoteInterpreter.java:265)
at org.apache.zeppelin.notebook.Paragraph.jobRun(Paragraph.java:423)
at org.apache.zeppelin.scheduler.Job.run(Job.java:182)
at 
org.apache.zeppelin.scheduler.RemoteScheduler$JobRunner.run(RemoteScheduler.java:307)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
```
And I fixed it! 😄

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

### What is the Jira issue?
[ZEPPELIN-2944](https://issues.apache.org/jira/browse/ZEPPELIN-2944)

### How should this be tested?
Build and launch Spark interpreter

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jun Kim 

Closes #2594 from tae-jun/patch-6 and squashes the following commits:

2b2d147 [Jun Kim] Correctly get SPARK_HOME


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

Branch: refs/heads/master
Commit: 184283c4cf204f4be51c6260a50ccb7581461bfc
Parents: a6a8b02
Author: Jun Kim 
Authored: Wed Sep 20 22:20:47 2017 +0900
Committer: Felix Cheung 
Committed: Mon Sep 25 22:38:01 2017 -0700

--
 .../java/org/apache/zeppelin/interpreter/InterpreterSetting.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/184283c4/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSetting.java
--
diff --git 
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSetting.java
 
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSetting.java
index 9a453d8..3a808c5 100644
--- 
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSetting.java
+++ 
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSetting.java
@@ -738,7 +738,7 @@ public class InterpreterSetting {
 }
 
 setupPropertiesForPySpark(sparkProperties);
-setupPropertiesForSparkR(sparkProperties, 
javaProperties.getProperty("SPARK_HOME"));
+setupPropertiesForSparkR(sparkProperties, System.getenv("SPARK_HOME"));
 if (isYarnMode() && getDeployMode().equals("cluster")) {
   env.put("SPARK_YARN_CLUSTER", "true");
 }



zeppelin git commit: [ZEPPELIN-2880] - Fix username output when OIDC is enabled

2017-09-25 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 84e9bd96d -> a6a8b0298


[ZEPPELIN-2880] - Fix username output when OIDC is enabled

### What is this PR for?
When OIDC is enabled, user's roles/permissions/tokens are sent to Zeppelin's 
client via websocket and appears in the web browser when running a paragraph in 
a notebook.

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

### What is the Jira issue?
* [ZEPPELIN-2880](https://issues.apache.org/jira/browse/ZEPPELIN-2880)

### How should this be tested?
Enable OIDC , login to Zeppelin and run a paragraph.  Check the text "Last 
updated by".

### Questions:
* Does the licenses files need update?  N/A
* Is there breaking changes for older versions?  N/A
* Does this needs documentation?  N/A

Author: byamthev 

Closes #2551 from byamthev/zeppelin_2880 and squashes the following commits:

cb6ec70 [byamthev] [ZEPPELIN-2880] - Fix username output when OIDC is enabled
11d0729 [byamthev] [ZEPPELIN-2880] - Fix username output when OIDC is enabled
7263689 [byamthev] [ZEPPELIN-2880] - Fix username output when OIDC is enabled


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

Branch: refs/heads/master
Commit: a6a8b0298f2f52c541ed6753806f12174edcd326
Parents: 84e9bd9
Author: byamthev 
Authored: Fri Sep 8 10:09:51 2017 +0300
Committer: Felix Cheung 
Committed: Mon Sep 25 22:35:09 2017 -0700

--
 zeppelin-server/pom.xml | 30 +++-
 .../apache/zeppelin/utils/SecurityUtils.java| 14 -
 .../zeppelin/security/SecurityUtilsTest.java| 27 +-
 3 files changed, 68 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a6a8b029/zeppelin-server/pom.xml
--
diff --git a/zeppelin-server/pom.xml b/zeppelin-server/pom.xml
index e8db0c5..08ede29 100644
--- a/zeppelin-server/pom.xml
+++ b/zeppelin-server/pom.xml
@@ -47,6 +47,7 @@
 
 2.48.2
 1.4.01
+1.6.6
 
 
 2.16
@@ -301,8 +302,35 @@
   test
 
 
+  
+org.powermock
+powermock-module-junit4
+${powermock.version}
+test
+
+  
+org.javassist
+javassist
+  
+
+  
+  
+org.powermock
+powermock-api-mockito
+${powermock.version}
+test
+
+  
+org.hamcrest
+hamcrest-core
+  
+  
+org.objenesis
+objenesis
+  
+
+  
   
-
   
 
   

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a6a8b029/zeppelin-server/src/main/java/org/apache/zeppelin/utils/SecurityUtils.java
--
diff --git 
a/zeppelin-server/src/main/java/org/apache/zeppelin/utils/SecurityUtils.java 
b/zeppelin-server/src/main/java/org/apache/zeppelin/utils/SecurityUtils.java
index b2029ec..2098681 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/utils/SecurityUtils.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/utils/SecurityUtils.java
@@ -20,6 +20,7 @@ import java.net.InetAddress;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.UnknownHostException;
+import java.security.Principal;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
@@ -88,13 +89,24 @@ public class SecurityUtils {
 
 String principal;
 if (subject.isAuthenticated()) {
-  principal = subject.getPrincipal().toString();
+  principal = extractPrincipal(subject);
 } else {
   principal = ANONYMOUS;
 }
 return principal;
   }
 
+  private static String extractPrincipal(Subject subject) {
+String principal;
+Object principalObject = subject.getPrincipal();
+if (principalObject instanceof Principal) {
+  principal = ((Principal) principalObject).getName();
+} else {
+  principal = String.valueOf(principalObject);
+}
+return principal;
+  }
+
   public static Collection getRealmsList() {
 if (!isEnabled) {
   return Collections.emptyList();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a6a8b029/zeppelin-server/src/test/java/org/apache/zeppelin/security/SecurityUtilsTest.java
--
diff --git 
a/zeppelin-server/src/test/java/org/apache/zeppelin/security/SecurityUtilsTest.java
 
b/zeppelin-server/src/test/java/org/apache/zeppelin/security/SecurityUtilsTest.java
index 9d902c8..1527816 

zeppelin git commit: [ZEPPELIN-2848] Added new type of user to only run notebook

2017-08-29 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 2a3791020 -> e47b30a88


[ZEPPELIN-2848] Added new type of user to only run notebook

### What is this PR for?

The idea of this PR is to provide a new kind of user : Runner.

Basically, what it does is that it just removes write authorization and allow 
user to read and run note.

### What type of PR is it?
[Feature]

### Todos
* [ ] - Task

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

### How should this be tested?
- Log in as admin
- Create new notebook and create a paragraph with the interpreter you want
- Assign runner right to user1
- Log in as user1
- Try to run the paragraph (should work)
- Try to modify the paragraph (should fail)
- Log in as user2
- Try to run the paragraph (should fail)

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? Yes
* Does this needs documentation? No

Author: Paolo Genissel 
Author: gfalcone 
Author: Paolo Genissel 

Closes #2526 from gfalcone/new_type_runner and squashes the following commits:

96bba66 [gfalcone] Fix typo on notebook_authorization.md
8ab4512 [gfalcone] Update notebook_authorization.md
22a1eb3 [Paolo Genissel] Fixed typo
d621792 [Paolo Genissel] Fix NotebookSecurityRestApiTest
a67af0f [Paolo Genissel] Fix test
5c43ca9 [Paolo Genissel] Added new type of user


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

Branch: refs/heads/master
Commit: e47b30a88f09434cd266946d3858cf34275be6a6
Parents: 2a37910
Author: Paolo Genissel 
Authored: Sun Aug 20 09:28:46 2017 +0200
Committer: Felix Cheung 
Committed: Tue Aug 29 10:05:55 2017 -0700

--
 docs/setup/security/notebook_authorization.md   | 10 +++-
 docs/usage/rest_api/notebook.md |  6 ++
 .../apache/zeppelin/rest/NotebookRestApi.java   | 58 ++
 .../apache/zeppelin/socket/NotebookServer.java  | 27 +++--
 .../zeppelin/integration/AuthenticationIT.java  |  2 +
 .../rest/NotebookSecurityRestApiTest.java   | 11 ++--
 .../src/app/notebook/notebook.controller.js |  6 +-
 zeppelin-web/src/app/notebook/notebook.css  |  5 ++
 zeppelin-web/src/app/notebook/notebook.html | 10 +++-
 .../notebook/NotebookAuthorization.java | 62 +++-
 .../notebook/repo/NotebookRepoSync.java |  4 ++
 .../apache/zeppelin/notebook/NotebookTest.java  | 33 +--
 .../notebook/repo/NotebookRepoSyncTest.java |  5 ++
 13 files changed, 203 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e47b30a8/docs/setup/security/notebook_authorization.md
--
diff --git a/docs/setup/security/notebook_authorization.md 
b/docs/setup/security/notebook_authorization.md
index 0d55104..fe0e27a 100644
--- a/docs/setup/security/notebook_authorization.md
+++ b/docs/setup/security/notebook_authorization.md
@@ -36,13 +36,17 @@ As you can see, each Zeppelin notebooks has 3 entities :
 * Owners ( users or groups )
 * Readers ( users or groups )
 * Writers ( users or groups )
+* Runners ( users or groups )
 
 
 
 Fill out the each forms with comma seperated **users** and **groups** 
configured in `conf/shiro.ini` file.
 If the form is empty (*), it means that any users can perform that operation.
 
-If someone who doesn't have **read** permission is trying to access the 
notebook or someone who doesn't have **write** permission is trying to edit the 
notebook, Zeppelin will ask to login or block the user.
+If someone who doesn't have **read** permission is trying to access the 
notebook or someone who doesn't have **write** permission is trying to edit the 
notebook,
+or someone who doesn't have **run** permission is trying to run a paragraph 
Zeppelin will ask to login or block the user.
+
+By default, owners and writers have **write** permission, owners, writers and 
runners have **run** permission, owners, writers, runners and readers have 
**read** permission
 
 
 
@@ -63,13 +67,13 @@ or set `zeppelin.notebook.public` property to `false` in 
`conf/zeppelin-site.xml
 
 ```
 
-Behind the scenes, when you create a new note only the `owners` field is 
filled with current user, leaving `readers` and `writers` fields empty. All the 
notes with at least one empty authorization field are considered to be in 
`public` workspace. Thus when setting `zeppelin.notebook.public` (or 

zeppelin git commit: [ZEPPELIN-2714] Soft-code Spark UI button visualization

2017-07-09 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 86bc9332e -> 96d78ee57


[ZEPPELIN-2714] Soft-code Spark UI button visualization

### What is this PR for?
When "spark.ui.enabled" property is set to "false" we should not show the Spark 
UI button.
We keep the same behaviour when this property does not exist or when it exists 
and it's set to true.

### What type of PR is it?
[ Improvement]

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

### How should this be tested?
1. Open Zeppelin, go to Interpreter > Spark
1. Click spark ui > msg: "No spark application running"
1. Go to a paragraph, run "sc.parallelize(1 to 100).count()", check "SPARK JOB" 
button
1. Go to Interpreter > Spark > Set "spark.ui.enabled" to "false"
1. Rerun paragraph > "SPARK JOB" button not visible
1. Go to Interpreter > Spark > "spark ui" button not visible
Also, test with "spark.ui.enabled"="true" and other workflow combinations

### Questions:
* Does the licenses files need update? N
* Is there breaking changes for older versions? N
* Does this needs documentation? N

Author: Nelson Costa 

Closes #2456 from necosta/zeppelin2714 and squashes the following commits:

278a23e [Nelson Costa] [ZEPPELIN-2714] Fixed broken unit-test
edf29cc [Nelson Costa] [ZEPPELIN-2714] Minor final fix
294dea8 [Nelson Costa] [ZEPPELIN-2714] Improvements to change request
a85864c [Nelson Costa] [ZEPPELIN-2714] Soft-code Spark UI button visualization


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

Branch: refs/heads/master
Commit: 96d78ee57b5340b2441a1b8fd866d327d998913b
Parents: 86bc933
Author: Nelson Costa 
Authored: Thu Jul 6 15:04:04 2017 +0100
Committer: Felix Cheung 
Committed: Sun Jul 9 00:43:54 2017 -0700

--
 docs/usage/rest_api/interpreter.md  | 23 
 .../apache/zeppelin/spark/SparkInterpreter.java | 37 ---
 .../zeppelin/rest/InterpreterRestApi.java   | 23 
 .../zeppelin/rest/InterpreterRestApiTest.java   | 39 +---
 .../app/interpreter/interpreter.controller.js   | 13 +--
 5 files changed, 96 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/96d78ee5/docs/usage/rest_api/interpreter.md
--
diff --git a/docs/usage/rest_api/interpreter.md 
b/docs/usage/rest_api/interpreter.md
index 4869866..23a7c66 100644
--- a/docs/usage/rest_api/interpreter.md
+++ b/docs/usage/rest_api/interpreter.md
@@ -604,3 +604,26 @@ The role of registered interpreters, settings and 
interpreters group are describ
 
 
   
+
+### Get interpreter settings metadata info
+
+  
+
+
+  Description
+  This ```GET``` method returns interpreter settings metadata info. 

+
+
+  URL
+  
```http://[zeppelin-server]:[zeppelin-port]/api/interpreter/metadata/[setting
 ID]```
+
+
+  Success code
+  200
+
+
+  Fail code
+   500 
+
+  
+  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/96d78ee5/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
--
diff --git 
a/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java 
b/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
index c170e4e..dd1fa11 100644
--- a/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
+++ b/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
@@ -184,11 +184,14 @@ public class SparkInterpreter extends Interpreter {
 super.onJobStart(jobStart);
 int jobId = jobStart.jobId();
 String jobGroupId = 
jobStart.properties().getProperty("spark.jobGroup.id");
+String uiEnabled = 
jobStart.properties().getProperty("spark.ui.enabled");
 String jobUrl = getJobUrl(jobId);
 String noteId = Utils.getNoteId(jobGroupId);
 String paragraphId = Utils.getParagraphId(jobGroupId);
-
-if (jobUrl != null && noteId != null && paragraphId != null) {
+// Button visible if Spark UI property not set, set as invalid boolean 
or true
+java.lang.Boolean showSparkUI =
+uiEnabled == null || 
!uiEnabled.trim().toLowerCase().equals("false");
+if (showSparkUI && jobUrl != null) {
   RemoteEventClientWrapper eventClient = 
BaseZeppelinContext.getEventClient();
   Map infos = new java.util.HashMap<>();
   

zeppelin git commit: [ZEPPELIN-2598] Securing Zeppelin with OpenID Connect

2017-06-28 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master c59f77dce -> a9ea68cf1


[ZEPPELIN-2598] Securing Zeppelin with OpenID Connect

### What is this PR for?
Integrating Open ID connect login into Zeppelin leveraging Shiro(already 
present) and Pac4J( that needs to be in the classpath).
Modifications done here should not affect any existing mechanisms but simply 
integrates and enable new once.

### What type of PR is it?
[Improvement]

### What is the Jira issue?
[ZEPPELIN-2598]

### Questions:
* Does the licenses files need update?
* Is there breaking changes for older versions?
* Does this needs documentation?

Author: andrea 

Closes #2373 from andreaTP/keycloak and squashes the following commits:

2d5af6d [andrea] merge with master
31270f2 [andrea] Merge remote-tracking branch 'apache/master' into keycloak
80c375d [andrea] fixed style issues on master
7ec8cdd [andrea] reverted to a minimum
545686d [andrea] fix username after direct login
03bbe30 [andrea] updates
4ce9121 [andrea] Enabling authentication with OpenId connect


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

Branch: refs/heads/master
Commit: a9ea68cf10bb8b65c8e118fd9c119302f56654df
Parents: c59f77d
Author: andrea 
Authored: Mon Jun 26 09:38:46 2017 +0100
Committer: Felix Cheung 
Committed: Wed Jun 28 20:01:41 2017 -0700

--
 docs/setup/security/shiro_authentication.md  | 15 +++
 pom.xml  |  2 +-
 zeppelin-distribution/src/bin_license/LICENSE|  4 ++--
 zeppelin-server/pom.xml  |  1 -
 zeppelin-web/src/app/app.js  | 15 ++-
 .../src/components/navbar/navbar.controller.js   |  2 ++
 zeppelin-web/src/components/navbar/navbar.html   |  2 +-
 7 files changed, 27 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a9ea68cf/docs/setup/security/shiro_authentication.md
--
diff --git a/docs/setup/security/shiro_authentication.md 
b/docs/setup/security/shiro_authentication.md
index d267007..347f694 100644
--- a/docs/setup/security/shiro_authentication.md
+++ b/docs/setup/security/shiro_authentication.md
@@ -128,7 +128,7 @@ Change the following values in the Shiro.ini file, and 
uncomment the line:
 
 ### LDAP
 
-Two options exist for configuring an LDAP Realm. The simpler to use is the 
LdapGroupRealm. How ever it has limited 
+Two options exist for configuring an LDAP Realm. The simpler to use is the 
LdapGroupRealm. How ever it has limited
 flexibility with mapping of ldap groups to users and for authorization for 
user groups. A sample configuration file for
 this realm is given below.
 
@@ -144,7 +144,7 @@ ldapRealm.contextFactory.authenticationMechanism = simple
 The other more flexible option is to use the LdapRealm. It allows for mapping 
of ldapgroups to roles and also allows for
  role/group based authentication into the zeppelin server. Sample 
configuration for this realm is given below.
  ```
-[main] 
+[main]
 ldapRealm=org.apache.zeppelin.realm.LdapRealm
 
 ldapRealm.contextFactory.authenticationMechanism=simple
@@ -162,18 +162,18 @@ ldapRealm.groupObjectClass=groupofnames
 ldapRealm.userSearchAttributeName = sAMAccountName
 ldapRealm.memberAttribute=member
 # force usernames returned from ldap to lowercase useful for AD
-ldapRealm.userLowerCase = true 
+ldapRealm.userLowerCase = true
 # ability set searchScopes subtree (default), one, base
 ldapRealm.userSearchScope = subtree;
 ldapRealm.groupSearchScope = subtree;
 
ldapRealm.memberAttributeValueTemplate=cn={0},ou=people,dc=hadoop,dc=apache,dc=org
-ldapRealm.contextFactory.systemUsername=uid=guest,ou=people,dc=hadoop,dc=apache,dc=org
 
+ldapRealm.contextFactory.systemUsername=uid=guest,ou=people,dc=hadoop,dc=apache,dc=org
 ldapRealm.contextFactory.systemPassword=S{ALIAS=ldcSystemPassword}
 # enable support for nested groups using the LDAP_MATCHING_RULE_IN_CHAIN 
operator
 ldapRealm.groupSearchEnableMatchingRuleInChain = true
 # optional mapping from physical groups to logical application roles
 ldapRealm.rolesByGroup = LDN_USERS: user_role, NYK_USERS: user_role, 
HKG_USERS: user_role, GLOBAL_ADMIN: admin_role
-# optional list of roles that are allowed to authenticate. Incase not present 
all groups are allowed to authenticate (login). 
+# optional list of roles that are allowed to authenticate. Incase not present 
all groups are allowed to authenticate (login).
 # This changes nothing for url specific 

zeppelin git commit: [ZEPPELIN-1965] Livy SQL Interpreter: Should use df.show(1000, false)…

2017-04-02 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 9e8d7eb90 -> 1135fb61d


[ZEPPELIN-1965] Livy SQL Interpreter: Should use df.show(1000, false)…

… to display results

### What is this PR for?
Livy SQL interpreter truncate result strings of size greater than 20. In some 
cases, we like to see the full string. We are adding a interpreter property 
**zeppelin.livy.spark.sql.field.truncate** to control whether to truncate 
strings or not. By default, **zeppelin.livy.spark.sql.field.truncate** is set 
to **true**.

### What type of PR is it?
Improvement

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

### How should this be tested?
Set zeppelin.livy.spark.sql.field.truncate to true or false
Run a SQL query which produces string values of length greater than 20.
Depending on the value of zeppelin.livy.spark.sql.field.truncate, the strings 
will either get truncated or not.

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Benoy Antony 

Closes #2201 from benoyantony/master and squashes the following commits:

bb006c0 [Benoy Antony] changed field name and description
9eae68b [Benoy Antony] added a null check to avoid testcase failures, another 
nullcheck for backward compatibility and added two new testcases
ab1ead2 [Benoy Antony] documented zeppelin.livy.spark.sql.truncate
b6252be [Benoy Antony] [ZEPPELIN-1965] Livy SQL Interpreter: Should use 
df.show(1000, false) to display results


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

Branch: refs/heads/master
Commit: 1135fb61d24e4a7baa82d1442e683eecb5de33d2
Parents: 9e8d7eb
Author: Benoy Antony 
Authored: Fri Mar 31 01:04:08 2017 -0700
Committer: Felix Cheung 
Committed: Sun Apr 2 11:53:49 2017 -0700

--
 docs/interpreter/livy.md|   7 +-
 .../zeppelin/livy/BaseLivyInterprereter.java|   4 +-
 .../zeppelin/livy/LivySparkSQLInterpreter.java  |  19 ++-
 .../src/main/resources/interpreter-setting.json |   5 +
 .../apache/zeppelin/livy/LivyInterpreterIT.java | 127 ++-
 5 files changed, 155 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1135fb61/docs/interpreter/livy.md
--
diff --git a/docs/interpreter/livy.md b/docs/interpreter/livy.md
index ce1c34a..a7b776c 100644
--- a/docs/interpreter/livy.md
+++ b/docs/interpreter/livy.md
@@ -56,11 +56,16 @@ Example: `spark.driver.memory` to `livy.spark.driver.memory`
 URL where livy server is running
   
   
-zeppelin.livy.spark.maxResult
+zeppelin.livy.spark.sql.maxResult
 1000
 Max number of Spark SQL result to display.
   
   
+zeppelin.livy.spark.sql.field.truncate
+true
+Whether to truncate field values longer than 20 characters or not
+  
+  
 zeppelin.livy.session.create_timeout
 120
 Timeout in seconds for session creation

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1135fb61/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
--
diff --git 
a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java 
b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
index d29d20c..26342a2 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
@@ -272,7 +272,9 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
   throw new LivyException(e);
 }
 stmtInfo = getStatementInfo(stmtInfo.id);
-paragraphId2StmtProgressMap.put(paragraphId, (int) (stmtInfo.progress 
* 100));
+if (paragraphId != null) {
+  paragraphId2StmtProgressMap.put(paragraphId, (int) 
(stmtInfo.progress * 100));
+}
   }
   if (appendSessionExpired) {
 return appendSessionExpire(getResultFromStatementInfo(stmtInfo, 
displayAppInfo),

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1135fb61/livy/src/main/java/org/apache/zeppelin/livy/LivySparkSQLInterpreter.java
--
diff --git 
a/livy/src/main/java/org/apache/zeppelin/livy/LivySparkSQLInterpreter.java 
b/livy/src/main/java/org/apache/zeppelin/livy/LivySparkSQLInterpreter.java
index 48e4967..2eaf79c 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/LivySparkSQLInterpreter.java

zeppelin git commit: [ZEPPELIN-2211] Too many WARN logs: "Couldn't get interpreter editor setting"

2017-03-26 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 15641d098 -> 78e2e912b


[ZEPPELIN-2211] Too many WARN logs: "Couldn't get interpreter editor setting"

### What is this PR for?

every time we insert invalid backend magic (e.g `sparc`), 
`InterpreterSettingManager` throws WARN log.

I changed the log level to debug because

- WARN level should not be used for this kind of situation.
- This log doesn't provide any useful information for user.  So info level is 
not proper as well.

I attached a screenshot.

### What type of PR is it?
[Improvement]

### Todos

NONE

### What is the Jira issue?

[ZEPPELIN-2211](https://issues.apache.org/jira/browse/ZEPPELIN-2211)

### How should this be tested?

- Insert invalid magic in your paragraph. For example `sparc` or `marcdown`

### Screenshots (if appropriate)

![interpreter_setting_manager](https://cloud.githubusercontent.com/assets/4968473/24235266/cbecbbf4-0fdf-11e7-9fcc-f1a95a5e82ab.gif)

### Questions:
* Does the licenses files need update? - NO
* Is there breaking changes for older versions? - NO
* Does this needs documentation? - NO

Author: 1ambda <1am...@gmail.com>

Closes #2179 from 1ambda/ZEPPELIN-2211/change-log-level-ISM-NPE and squashes 
the following commits:

e333c1c [1ambda] fix: Change log level to debug from warn


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

Branch: refs/heads/master
Commit: 78e2e912b6f9014e9a83c929cde339dcb8459bdc
Parents: 15641d0
Author: 1ambda <1am...@gmail.com>
Authored: Thu Mar 23 15:39:39 2017 +0900
Committer: Felix Cheung 
Committed: Sun Mar 26 12:34:37 2017 -0700

--
 .../apache/zeppelin/interpreter/InterpreterSettingManager.java| 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/78e2e912/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
--
diff --git 
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
 
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
index 32db89b..f031591 100644
--- 
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
+++ 
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
@@ -514,7 +514,8 @@ public class InterpreterSettingManager {
 }
   }
 } catch (NullPointerException e) {
-  logger.warn("Couldn't get interpreter editor setting");
+  // Use `debug` level because this log occurs frequently
+  logger.debug("Couldn't get interpreter editor setting");
 }
 return editor;
   }



zeppelin git commit: Fix trivial typo

2017-03-26 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.7 87cec72a3 -> 91d69c47f


Fix trivial typo

Fixes a trivial typo in exception message, replacing comit by commit

Author: Bruno P. Kinoshita 

Closes #2190 from kinow/kinow-patch-1 and squashes the following commits:

e660773 [Bruno P. Kinoshita] Fix trivial typo

(cherry picked from commit 15641d0981395a0b52b1d05de7a81e6261dedd2d)
Signed-off-by: Felix Cheung 


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

Branch: refs/heads/branch-0.7
Commit: 91d69c47fd85505093a3cd85169dfe06819d951a
Parents: 87cec72
Author: Bruno P. Kinoshita 
Authored: Sun Mar 26 22:13:37 2017 +1300
Committer: Felix Cheung 
Committed: Sun Mar 26 12:30:36 2017 -0700

--
 .../java/org/apache/zeppelin/notebook/repo/GitNotebookRepo.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/91d69c47/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/GitNotebookRepo.java
--
diff --git 
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/GitNotebookRepo.java
 
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/GitNotebookRepo.java
index 9637149..21183da 100644
--- 
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/GitNotebookRepo.java
+++ 
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/GitNotebookRepo.java
@@ -95,7 +95,7 @@ public class GitNotebookRepo extends VFSNotebookRepo {
 LOG.debug("No changes found {}", pattern);
   }
 } catch (GitAPIException e) {
-  LOG.error("Failed to add+comit {} to Git", pattern, e);
+  LOG.error("Failed to add+commit {} to Git", pattern, e);
 }
 return revision;
   }



zeppelin git commit: ZEPPELIN-2261. Support to connect with livy through https

2017-03-23 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master e3315b2d2 -> 9d40013a9


ZEPPELIN-2261. Support to connect with livy through https

### What is this PR for?
Livy server support https, but the currently livy interpreter doesn't support 
it. This PR is for for the supporting to connect with livy through https

### What type of PR is it?
[Improvement]

### Todos
* [ ] - Task

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

### How should this be tested?
Tested manually on livy server with ssl enabled.

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang 

Closes #2139 from zjffdu/ZEPPELIN-2261 and squashes the following commits:

52fc204 [Jeff Zhang] address comment
53230c3 [Jeff Zhang] [ZEPPELIN-2261]. Support to connect with livy through https


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

Branch: refs/heads/master
Commit: 9d40013a994ca65f99831a416fb235d15ee17fdb
Parents: e3315b2
Author: Jeff Zhang 
Authored: Mon Mar 20 16:11:38 2017 +0800
Committer: Felix Cheung 
Committed: Wed Mar 22 23:57:55 2017 -0700

--
 docs/interpreter/livy.md| 10 +++
 .../zeppelin/livy/BaseLivyInterprereter.java| 83 
 .../zeppelin/livy/LivySQLInterpreterTest.java   |  1 +
 3 files changed, 79 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/9d40013a/docs/interpreter/livy.md
--
diff --git a/docs/interpreter/livy.md b/docs/interpreter/livy.md
index 6f04244..ce1c34a 100644
--- a/docs/interpreter/livy.md
+++ b/docs/interpreter/livy.md
@@ -130,6 +130,16 @@ Example: `spark.driver.memory` to 
`livy.spark.driver.memory`
   
   Adding extra libraries to livy interpreter
 
+  
+zeppelin.livy.ssl.trustStore
+
+client trustStore file. Used when livy ssl is enabled
+  
+  
+zeppelin.livy.ssl.trustStorePassword
+
+password for trustStore file. Used when livy ssl is enabled
+
 
 
 **We remove livy.spark.master in zeppelin-0.7. Because we sugguest user to use 
livy 0.3 in zeppelin-0.7. And livy 0.3 don't allow to specify 
livy.spark.master, it enfornce yarn-cluster mode.**

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/9d40013a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
--
diff --git 
a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java 
b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
index c580901..d29d20c 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
@@ -21,6 +21,10 @@ import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.annotations.SerializedName;
 import org.apache.commons.lang.StringUtils;
+import org.apache.http.client.HttpClient;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.conn.ssl.SSLContexts;
+import org.apache.http.impl.client.HttpClients;
 import org.apache.zeppelin.interpreter.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -28,11 +32,16 @@ import org.springframework.http.HttpEntity;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpMethod;
 import org.springframework.http.ResponseEntity;
+import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
 import org.springframework.security.kerberos.client.KerberosRestTemplate;
 import org.springframework.web.client.HttpClientErrorException;
 import org.springframework.web.client.RestClientException;
 import org.springframework.web.client.RestTemplate;
 
+import javax.net.ssl.SSLContext;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.security.KeyStore;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -56,6 +65,7 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
   protected boolean displayAppInfo;
   private AtomicBoolean sessionExpired = new AtomicBoolean(false);
   protected LivyVersion livyVersion;
+  private RestTemplate restTemplate;
 
   // keep tracking the mapping between paragraphId and statementId, so that we 
can cancel the
   // statement after we execute it.
@@ -72,6 +82,7 @@ public abstract class BaseLivyInterprereter extends 

zeppelin git commit: ZEPPELIN-2251. Support getProgress for livy interpreter

2017-03-23 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 621c5be2d -> e3315b2d2


ZEPPELIN-2251. Support getProgress for livy interpreter

### What is this PR for?
Livy 0.4 will support getting progress from statement, this PR would integrate 
this feature into livy interpreter.

### What type of PR is it?
[Improvement | Feature]

### Todos
* [ ] - Task

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

### How should this be tested?
Tested with latest livy 0.4-SNAPSHOT

### Screenshots (if appropriate)
![zeppelin_livy_progress](https://cloud.githubusercontent.com/assets/164491/23883496/4ae31dee-08a2-11e7-8ffd-86b989ad1a6a.gif)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang 

Closes #2130 from zjffdu/ZEPPELIN-2251 and squashes the following commits:

509432a [Jeff Zhang] ZEPPELIN-2251. Support getProgress for livy interpreter


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

Branch: refs/heads/master
Commit: e3315b2d201d07d6f573237261e58bf89a51a391
Parents: 621c5be
Author: Jeff Zhang 
Authored: Tue Mar 14 10:31:12 2017 +0800
Committer: Felix Cheung 
Committed: Wed Mar 22 23:53:18 2017 -0700

--
 .../zeppelin/livy/BaseLivyInterprereter.java| 20 +++-
 .../org/apache/zeppelin/livy/LivyVersion.java   |  5 +
 2 files changed, 20 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e3315b2d/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
--
diff --git 
a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java 
b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
index ecb5d77..c580901 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
@@ -59,7 +59,9 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
 
   // keep tracking the mapping between paragraphId and statementId, so that we 
can cancel the
   // statement after we execute it.
-  private ConcurrentHashMap paragraphId2StmtIdMapping = new 
ConcurrentHashMap<>();
+  private ConcurrentHashMap paragraphId2StmtIdMap = new 
ConcurrentHashMap<>();
+  private ConcurrentHashMap paragraphId2StmtProgressMap =
+  new ConcurrentHashMap<>();
 
   public BaseLivyInterprereter(Properties property) {
 super(property);
@@ -151,7 +153,7 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
   public void cancel(InterpreterContext context) {
 if (livyVersion.isCancelSupported()) {
   String paraId = context.getParagraphId();
-  Integer stmtId = paragraphId2StmtIdMapping.get(paraId);
+  Integer stmtId = paragraphId2StmtIdMap.get(paraId);
   try {
 if (stmtId != null) {
   cancelStatement(stmtId);
@@ -159,7 +161,7 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
   } catch (LivyException e) {
 LOGGER.error("Fail to cancel statement " + stmtId + " for paragraph " 
+ paraId, e);
   } finally {
-paragraphId2StmtIdMapping.remove(paraId);
+paragraphId2StmtIdMap.remove(paraId);
   }
 } else {
   LOGGER.warn("cancel is not supported for this version of livy: " + 
livyVersion);
@@ -173,6 +175,11 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
 
   @Override
   public int getProgress(InterpreterContext context) {
+if (livyVersion.isGetProgressSupported()) {
+  String paraId = context.getParagraphId();
+  Integer progress = paragraphId2StmtProgressMap.get(paraId);
+  return progress == null ? 0 : progress;
+}
 return 0;
   }
 
@@ -243,7 +250,7 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
 stmtInfo = executeStatement(new ExecuteRequest(code));
   }
   if (paragraphId != null) {
-paragraphId2StmtIdMapping.put(paragraphId, stmtInfo.id);
+paragraphId2StmtIdMap.put(paragraphId, stmtInfo.id);
   }
   // pull the statement status
   while (!stmtInfo.isAvailable()) {
@@ -254,6 +261,7 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
   throw new LivyException(e);
 }
 stmtInfo = getStatementInfo(stmtInfo.id);
+paragraphId2StmtProgressMap.put(paragraphId, (int) (stmtInfo.progress 
* 100));

zeppelin git commit: ZEPPELIN-2151. Add integration test for livy cancel api

2017-03-12 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master df1c654e0 -> 152147122


ZEPPELIN-2151. Add integration test for livy cancel api

### What is this PR for?

Just add integration test for livy cancel api. Only do it for livy 0.3 as the 
cancel api is only available in livy 0.3

### What type of PR is it?
[ Improvement]

### Todos
* [ ] - Task

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

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang 

Closes #2056 from zjffdu/ZEPPELIN-2151 and squashes the following commits:

b7ca7b3 [Jeff Zhang] ZEPPELIN-2151. Add integration test for livy cancel api


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

Branch: refs/heads/master
Commit: 152147122b9797baef20a382eb880eadcf7cdc0f
Parents: df1c654
Author: Jeff Zhang 
Authored: Wed Feb 22 19:59:47 2017 +0800
Committer: Felix Cheung 
Committed: Sun Mar 12 11:06:58 2017 -0700

--
 .../zeppelin/livy/BaseLivyInterprereter.java|  2 +-
 .../apache/zeppelin/livy/LivyInterpreterIT.java | 85 ++--
 2 files changed, 80 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/15214712/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
--
diff --git 
a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java 
b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
index 7f92127..ecb5d77 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
@@ -55,7 +55,7 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
   private int pullStatusInterval;
   protected boolean displayAppInfo;
   private AtomicBoolean sessionExpired = new AtomicBoolean(false);
-  private LivyVersion livyVersion;
+  protected LivyVersion livyVersion;
 
   // keep tracking the mapping between paragraphId and statementId, so that we 
can cancel the
   // statement after we execute it.

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/15214712/livy/src/test/java/org/apache/zeppelin/livy/LivyInterpreterIT.java
--
diff --git a/livy/src/test/java/org/apache/zeppelin/livy/LivyInterpreterIT.java 
b/livy/src/test/java/org/apache/zeppelin/livy/LivyInterpreterIT.java
index c8f355c..1a8e8df 100644
--- a/livy/src/test/java/org/apache/zeppelin/livy/LivyInterpreterIT.java
+++ b/livy/src/test/java/org/apache/zeppelin/livy/LivyInterpreterIT.java
@@ -82,13 +82,13 @@ public class LivyInterpreterIT {
 }
 InterpreterGroup interpreterGroup = new InterpreterGroup("group_1");
 interpreterGroup.put("session_1", new ArrayList());
-LivySparkInterpreter sparkInterpreter = new 
LivySparkInterpreter(properties);
+final LivySparkInterpreter sparkInterpreter = new 
LivySparkInterpreter(properties);
 sparkInterpreter.setInterpreterGroup(interpreterGroup);
 interpreterGroup.get("session_1").add(sparkInterpreter);
 AuthenticationInfo authInfo = new AuthenticationInfo("user1");
 MyInterpreterOutputListener outputListener = new 
MyInterpreterOutputListener();
 InterpreterOutput output = new InterpreterOutput(outputListener);
-InterpreterContext context = new InterpreterContext("noteId", 
"paragraphId", "livy.spark",
+final InterpreterContext context = new InterpreterContext("noteId", 
"paragraphId", "livy.spark",
 "title", "text", authInfo, null, null, null, null, null, output);
 sparkInterpreter.open();
 
@@ -158,6 +158,31 @@ public class LivyInterpreterIT {
   assertEquals(InterpreterResult.Code.ERROR, result.code());
   assertEquals(InterpreterResult.Type.TEXT, 
result.message().get(0).getType());
   assertTrue(result.message().get(0).getData().contains("incomplete 
statement"));
+
+  // cancel
+  if 
(sparkInterpreter.livyVersion.newerThanEquals(LivyVersion.LIVY_0_3_0)) {
+Thread cancelThread = new Thread() {
+  @Override
+  public void run() {
+// invoke cancel after 3 seconds to wait job starting
+try {
+  Thread.sleep(3000);
+} catch (InterruptedException e) {
+  e.printStackTrace();
+}
+sparkInterpreter.cancel(context);
+  }
+};
+cancelThread.start();
+

zeppelin git commit: ZEPPELIN-2199: Fix lapply issue in sparkR

2017-03-07 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.7 c7847c119 -> 6d72db34f


ZEPPELIN-2199: Fix lapply issue in sparkR

### What is this PR for?
Function createRDDFromArray used for creating R RDD expects a JavaSparkContext 
object instead of spark context. This PR address that concern.

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

### Todos
* [ ] - Task

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

### How should this be tested?
Build Zeppelin and Run
%r
families <- c("gaussian", "poisson")
df <- createDataFrame(iris)
train <- function(family)
{
model <- glm(Sepal.Length ~ Sepal.Width + Species, iris, family = family)
summary(model)
}
model.summaries <- spark.lapply(families, train)
print(model.summaries)

It fails in current master but will pass in this branch.

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update?
No
* Is there breaking changes for older versions?
Not completely sure about this.
* Does this needs documentation?
No.

Author: Vipul Modi 
Author: Vipul Modi 

Closes #2090 from vipul1409/ZEPPELIN-2199 and squashes the following commits:

8fccad4 [Vipul Modi] Trigger build 2
f351a7a [Vipul Modi] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-2199
c89ed1e [Vipul Modi] Trigger build 2
509faf7 [Vipul Modi] Trigger build
b83121e [Vipul Modi] Nullify jsc on close and remove file:/ changes
1d5bd5b [Vipul Modi] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-2199
cebf970 [Vipul Modi] Removing dummy file.txt
39e8144 [Vipul Modi] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-2199
8a0651d [Vipul Modi] Dummy commit
70b19c1 [Vipul Modi] ZEPPELIN-2199: Fix lapply issue in sparkR

(cherry picked from commit 0e1964877654c56c72473ad07dac1de6f9646816)
Signed-off-by: Felix Cheung 


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

Branch: refs/heads/branch-0.7
Commit: 6d72db34fa67504bb7d528c799fba58aa48f4a12
Parents: c7847c1
Author: Vipul Modi 
Authored: Tue Mar 7 09:10:30 2017 +0530
Committer: Felix Cheung 
Committed: Tue Mar 7 23:26:18 2017 -0800

--
 .../org/apache/zeppelin/spark/SparkInterpreter.java | 12 
 .../org/apache/zeppelin/spark/SparkRInterpreter.java|  4 
 .../org/apache/zeppelin/spark/ZeppelinRContext.java |  6 ++
 spark/src/main/resources/R/zeppelin_sparkr.R|  2 +-
 4 files changed, 23 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6d72db34/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
--
diff --git 
a/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java 
b/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
index 1aecec4..47f8080 100644
--- a/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
+++ b/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
@@ -38,6 +38,7 @@ import org.apache.spark.SparkContext;
 import org.apache.spark.SparkEnv;
 
 import org.apache.spark.SecurityManager;
+import org.apache.spark.api.java.JavaSparkContext;
 import org.apache.spark.repl.SparkILoop;
 import org.apache.spark.scheduler.ActiveJob;
 import org.apache.spark.scheduler.DAGScheduler;
@@ -123,6 +124,7 @@ public class SparkInterpreter extends Interpreter {
   private SparkVersion sparkVersion;
   private static File outputDir;  // class outputdir for scala 2.11
   private Object classServer;  // classserver for scala 2.11
+  private JavaSparkContext jsc;
 
 
   public SparkInterpreter(Properties property) {
@@ -149,6 +151,15 @@ public class SparkInterpreter extends Interpreter {
 }
   }
 
+  public JavaSparkContext getJavaSparkContext() {
+synchronized (sharedInterpreterLock) {
+  if (jsc == null) {
+jsc = JavaSparkContext.fromSparkContext(sc);
+  }
+  return jsc;
+}
+  }
+
   public boolean isSparkContextInitialized() {
 synchronized (sharedInterpreterLock) {
   return sc != null;
@@ -1390,6 +1401,7 @@ public class SparkInterpreter extends Interpreter {
   }
   sparkSession = null;
   sc = null;
+  jsc = null;
   if (classServer != null) {
 Utils.invokeMethod(classServer, "stop");
 classServer = null;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6d72db34/spark/src/main/java/org/apache/zeppelin/spark/SparkRInterpreter.java

zeppelin git commit: ZEPPELIN-2199: Fix lapply issue in sparkR

2017-03-07 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master b41997850 -> 0e1964877


ZEPPELIN-2199: Fix lapply issue in sparkR

### What is this PR for?
Function createRDDFromArray used for creating R RDD expects a JavaSparkContext 
object instead of spark context. This PR address that concern.

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

### Todos
* [ ] - Task

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

### How should this be tested?
Build Zeppelin and Run
%r
families <- c("gaussian", "poisson")
df <- createDataFrame(iris)
train <- function(family)
{
model <- glm(Sepal.Length ~ Sepal.Width + Species, iris, family = family)
summary(model)
}
model.summaries <- spark.lapply(families, train)
print(model.summaries)

It fails in current master but will pass in this branch.

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update?
No
* Is there breaking changes for older versions?
Not completely sure about this.
* Does this needs documentation?
No.

Author: Vipul Modi 
Author: Vipul Modi 

Closes #2090 from vipul1409/ZEPPELIN-2199 and squashes the following commits:

8fccad4 [Vipul Modi] Trigger build 2
f351a7a [Vipul Modi] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-2199
c89ed1e [Vipul Modi] Trigger build 2
509faf7 [Vipul Modi] Trigger build
b83121e [Vipul Modi] Nullify jsc on close and remove file:/ changes
1d5bd5b [Vipul Modi] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-2199
cebf970 [Vipul Modi] Removing dummy file.txt
39e8144 [Vipul Modi] Merge branch 'master' of 
https://github.com/apache/zeppelin into ZEPPELIN-2199
8a0651d [Vipul Modi] Dummy commit
70b19c1 [Vipul Modi] ZEPPELIN-2199: Fix lapply issue in sparkR


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

Branch: refs/heads/master
Commit: 0e1964877654c56c72473ad07dac1de6f9646816
Parents: b419978
Author: Vipul Modi 
Authored: Tue Mar 7 09:10:30 2017 +0530
Committer: Felix Cheung 
Committed: Tue Mar 7 23:25:31 2017 -0800

--
 .../org/apache/zeppelin/spark/SparkInterpreter.java | 12 
 .../org/apache/zeppelin/spark/SparkRInterpreter.java|  4 
 .../org/apache/zeppelin/spark/ZeppelinRContext.java |  6 ++
 spark/src/main/resources/R/zeppelin_sparkr.R|  2 +-
 4 files changed, 23 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0e196487/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
--
diff --git 
a/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java 
b/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
index 30ff4bc..f1c5676 100644
--- a/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
+++ b/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
@@ -38,6 +38,7 @@ import org.apache.spark.SparkContext;
 import org.apache.spark.SparkEnv;
 
 import org.apache.spark.SecurityManager;
+import org.apache.spark.api.java.JavaSparkContext;
 import org.apache.spark.repl.SparkILoop;
 import org.apache.spark.scheduler.ActiveJob;
 import org.apache.spark.scheduler.DAGScheduler;
@@ -126,6 +127,7 @@ public class SparkInterpreter extends Interpreter {
   private SparkVersion sparkVersion;
   private static File outputDir;  // class outputdir for scala 2.11
   private Object classServer;  // classserver for scala 2.11
+  private JavaSparkContext jsc;
 
 
   public SparkInterpreter(Properties property) {
@@ -152,6 +154,15 @@ public class SparkInterpreter extends Interpreter {
 }
   }
 
+  public JavaSparkContext getJavaSparkContext() {
+synchronized (sharedInterpreterLock) {
+  if (jsc == null) {
+jsc = JavaSparkContext.fromSparkContext(sc);
+  }
+  return jsc;
+}
+  }
+
   public boolean isSparkContextInitialized() {
 synchronized (sharedInterpreterLock) {
   return sc != null;
@@ -1422,6 +1433,7 @@ public class SparkInterpreter extends Interpreter {
   }
   sparkSession = null;
   sc = null;
+  jsc = null;
   if (classServer != null) {
 Utils.invokeMethod(classServer, "stop");
 classServer = null;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0e196487/spark/src/main/java/org/apache/zeppelin/spark/SparkRInterpreter.java
--
diff --git 

zeppelin git commit: [MINOR] Use standard java API to interrupt thread

2017-03-07 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 142597bcf -> b41997850


[MINOR] Use standard java API to interrupt thread

### What is this PR for?
Use java `Thread.interrupt` method to stop job progress polling thread.

Standard API is:
* proper synchronized
* able to interrupt `Thread.sleep` with any interval

### What type of PR is it?
[Refactoring]

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Igor Drozdov 

Closes #2039 from DrIgor/refactor-progress-poller and squashes the following 
commits:

895787f [Igor Drozdov] Use standard java API to interrupt thread


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

Branch: refs/heads/master
Commit: b41997850990c8ed99bb8d3d67c9a64371da7b84
Parents: 142597b
Author: Igor Drozdov 
Authored: Mon Feb 20 10:04:12 2017 +0300
Committer: Felix Cheung 
Committed: Tue Mar 7 23:22:06 2017 -0800

--
 .../java/org/apache/zeppelin/scheduler/Job.java | 12 ++---
 .../zeppelin/scheduler/JobProgressPoller.java   | 49 +---
 2 files changed, 26 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/b4199785/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/Job.java
--
diff --git 
a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/Job.java 
b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/Job.java
index 76d90b9..0e9dbeb 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/Job.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/Job.java
@@ -182,22 +182,16 @@ public abstract class Job {
   this.exception = null;
   errorMessage = null;
   dateFinished = new Date();
-  progressUpdator.terminate();
-} catch (NullPointerException e) {
-  LOGGER.error("Job failed", e);
-  progressUpdator.terminate();
-  this.exception = e;
-  setResult(e.getMessage());
-  errorMessage = getStack(e);
-  dateFinished = new Date();
 } catch (Throwable e) {
   LOGGER.error("Job failed", e);
-  progressUpdator.terminate();
   this.exception = e;
   setResult(e.getMessage());
   errorMessage = getStack(e);
   dateFinished = new Date();
 } finally {
+  if (progressUpdator != null) {
+progressUpdator.interrupt();
+  }
   //aborted = false;
 }
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/b4199785/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/JobProgressPoller.java
--
diff --git 
a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/JobProgressPoller.java
 
b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/JobProgressPoller.java
index 967702a..8b8cda0 100644
--- 
a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/JobProgressPoller.java
+++ 
b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/JobProgressPoller.java
@@ -21,48 +21,45 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
+ * Polls job progress with given interval
+ *
+ * @see Job#progress()
+ * @see JobListener#onProgressUpdate(org.apache.zeppelin.scheduler.Job, int)
+ *
  * TODO(moon) : add description.
  */
 public class JobProgressPoller extends Thread {
   public static final long DEFAULT_INTERVAL_MSEC = 500;
-  Logger logger = LoggerFactory.getLogger(JobProgressPoller.class);
+  private static final Logger logger = 
LoggerFactory.getLogger(JobProgressPoller.class);
+
   private Job job;
   private long intervalMs;
-  boolean terminate = false;
 
   public JobProgressPoller(Job job, long intervalMs) {
+super("JobProgressPoller, jobId=" + job.getId());
 this.job = job;
-this.intervalMs = intervalMs;
+if (intervalMs < 0) {
+  throw new IllegalArgumentException("polling interval can't be " + 
intervalMs);
+}
+this.intervalMs = intervalMs == 0 ? DEFAULT_INTERVAL_MSEC : intervalMs;
   }
 
   @Override
   public void run() {
-if (intervalMs < 0) {
-  return;
-} else if (intervalMs == 0) {
-  intervalMs = DEFAULT_INTERVAL_MSEC;
-}
-
-while (terminate == false) {
-  JobListener listener = job.getListener();
-  if (listener != null) {
-try {
-  if (job.isRunning()) {
-listener.onProgressUpdate(job, job.progress());
+try {
+  while 

zeppelin git commit: [ZEPPELIN-1988] add property "precode" to JDBCInterpreter

2017-03-06 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 616301ae4 -> ebd5e1e9b


[ZEPPELIN-1988] add property "precode" to JDBCInterpreter

### What is this PR for?
Adds property "precode". Value of property contains SQL which executes while 
opening connection.

### What type of PR is it?
Improvement

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

### How should this be tested?
1) Set property zeppelin.interpreter.precode =` set search_path='test, public' `
2) Execute `%jdbc show search_path`

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Tinkoff DWH 

Closes #2078 from tinkoff-dwh/ZEPPELIN-1988 and squashes the following commits:

cd46cce [Tinkoff DWH] [ZEPPELIN-1988] trim precode
42ffcb7 [Tinkoff DWH] [ZEPPELIN-1988] fix condition
7636b3f [Tinkoff DWH] Merge remote-tracking branch 'origin/master' into 
ZEPPELIN-1988
66d6ae4 [Tinkoff DWH] [ZEPPELIN-1988] fixes of review items
9d37bc4 [Tinkoff DWH] [ZEPPELIN-1988] fix
ba3477a [Tinkoff DWH] [ZEPPELIN-1988] add property "precode" to JDBCInterpreter


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

Branch: refs/heads/master
Commit: ebd5e1e9b6fa763859e378d1c4ad79f80a19b432
Parents: 616301a
Author: Tinkoff DWH 
Authored: Sun Mar 5 13:00:21 2017 +0500
Committer: Felix Cheung 
Committed: Mon Mar 6 23:15:44 2017 -0800

--
 docs/interpreter/jdbc.md|  4 ++
 .../apache/zeppelin/jdbc/JDBCInterpreter.java   | 41 +--
 .../src/main/resources/interpreter-setting.json |  6 +++
 .../zeppelin/jdbc/JDBCInterpreterTest.java  | 42 
 4 files changed, 81 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ebd5e1e9/docs/interpreter/jdbc.md
--
diff --git a/docs/interpreter/jdbc.md b/docs/interpreter/jdbc.md
index 32adcba..346fcbb 100644
--- a/docs/interpreter/jdbc.md
+++ b/docs/interpreter/jdbc.md
@@ -167,6 +167,10 @@ There are more JDBC interpreter properties you can specify 
like below.
 default.jceks.credentialKey
 jceks credential key
   
+  
+zeppelin.jdbc.precode
+Some SQL which executes while opening connection
+  
 
 
 You can also add more properties by using this 
[method](http://docs.oracle.com/javase/7/docs/api/java/sql/DriverManager.html#getConnection%28java.lang.String,%20java.util.Properties%29).

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ebd5e1e9/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
--
diff --git a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java 
b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
index c43e392..d495224 100644
--- a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
+++ b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
@@ -14,14 +14,7 @@
  */
 package org.apache.zeppelin.jdbc;
 
-import static org.apache.commons.lang.StringUtils.containsIgnoreCase;
-import static org.apache.commons.lang.StringUtils.isEmpty;
-import static org.apache.commons.lang.StringUtils.isNotEmpty;
-import static 
org.apache.hadoop.security.UserGroupInformation.AuthenticationMethod.KERBEROS;
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
 import java.io.IOException;
-import java.nio.charset.StandardCharsets;
 import java.security.PrivilegedExceptionAction;
 import java.sql.Connection;
 import java.sql.DriverManager;
@@ -37,11 +30,11 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
-import com.google.common.base.Throwables;
 import org.apache.commons.dbcp2.ConnectionFactory;
 import org.apache.commons.dbcp2.DriverManagerConnectionFactory;
 import org.apache.commons.dbcp2.PoolableConnectionFactory;
 import org.apache.commons.dbcp2.PoolingDriver;
+import org.apache.commons.lang.StringUtils;
 import org.apache.commons.pool2.ObjectPool;
 import org.apache.commons.pool2.impl.GenericObjectPool;
 import org.apache.hadoop.conf.Configuration;
@@ -49,7 +42,10 @@ import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.alias.CredentialProvider;
 import org.apache.hadoop.security.alias.CredentialProviderFactory;
 import org.apache.thrift.transport.TTransportException;
-import org.apache.zeppelin.interpreter.*;
+import org.apache.zeppelin.interpreter.Interpreter;
+import 

zeppelin git commit: [ZEPPELIN-791] Build infra: move all RAT to root pom.xml

2017-03-05 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master e4d488b3a -> 95c56f064


[ZEPPELIN-791] Build infra: move all RAT to root pom.xml

What is this PR for?
It is better have a single place where we manage project-wise RAT exclusions 
for a contributions under licenses different from Apache, then let maven 
sub-modules have them as we do now (makes things harder to track)
What type of PR is it?
[Improvement]
Todos
N/A
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-791
How should this be tested?
mvn verify -DskipTests
Screenshots (if appropriate)
Questions:
Does the licenses files need update? - No
Is there breaking changes for older versions? - No
Does this needs documentation? - No
### Questions:
* Does the licenses files need update?
* Is there breaking changes for older versions?
* Does this needs documentation?

Author: DmytroShkvyra 

Closes #2089 from DmytroShkvyra/ZEPPELIN-791-1 and squashes the following 
commits:

296662a [DmytroShkvyra] [ZEPPELIN-791] add widcard
2c27342 [DmytroShkvyra] [ZEPPELIN-791] Exclude **.test.js
398fb62 [DmytroShkvyra] [ZEPPELIN-791] Build infra: move all RAT to root pom.xml


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

Branch: refs/heads/master
Commit: 95c56f0647f412315cc10a5a4dcb563a81b19dcd
Parents: e4d488b
Author: DmytroShkvyra 
Authored: Thu Mar 2 11:34:53 2017 +0200
Committer: Felix Cheung 
Committed: Sun Mar 5 12:42:20 2017 -0800

--
 pom.xml  | 67 ---
 r/pom.xml| 37 --
 zeppelin-web/pom.xml | 46 
 3 files changed, 51 insertions(+), 99 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/95c56f06/pom.xml
--
diff --git a/pom.xml b/pom.xml
index de27178..aef1e82 100644
--- a/pom.xml
+++ b/pom.xml
@@ -898,6 +898,39 @@
   **/interpreter-setting.json
   **/constants.json
   scripts/**
+  **/**/*.log 
+  **/**/logs/** 
+
+   
+  **/test/karma.conf.js 
+  **/test/spec/**  
+  **/.babelrc 
+  **/.bowerrc 
+  .editorconfig 
+  .eslintrc 
+  **/.tmp/** 
+  **/target/** 
+  **/node/** 
+  **/node_modules/** 
+  **/bower_components/** 
+  **/dist/** 
+  **/.buildignore 
+  **/.npmignore 
+  **/.jshintrc 
+  **/yarn.lock 
+  **/bower.json 
+  **/src/fonts/Patua-One* 
+  **/src/fonts/patua-one* 
+  **/src/fonts/Roboto* 
+  **/src/fonts/roboto* 
+  **/src/fonts/fontawesome* 
+  **/src/fonts/font-awesome* 
+  **/src/styles/font-awesome* 
+  **/src/fonts/Simple-Line* 
+  **/src/fonts/simple-line* 
+  **/src/fonts/Source-Code-Pro* 
+  **/src/fonts/source-code-pro*
+  **/src/**/**.test.js   
 
   
   
**/src/main/java/org/apache/zeppelin/jdbc/SqlCompleter.java
@@ -947,22 +980,24 @@
   **/package.json
 
   
-  R/lib/**
-  r/lib/**
-
-  
-  r/R/rzeppelin/R/globals.R
-  r/R/rzeppelin/R/common.R
-  r/R/rzeppelin/R/protocol.R
-  r/R/rzeppelin/R/rServer.R
-  r/R/rzeppelin/R/scalaInterpreter.R
-  r/R/rzeppelin/R/zzz.R
-  r/src/main/scala/scala/Console.scala
-  
r/src/main/scala/org/apache/zeppelin/rinterpreter/rscala/Package.scala
-  
r/src/main/scala/org/apache/zeppelin/rinterpreter/rscala/RClient.scala
-  
-  r/R/rzeppelin/DESCRIPTION
-  r/R/rzeppelin/NAMESPACE
+  **/R/lib/** 
+  **/r/lib/** 
+ 
+
+
+  **/R/rzeppelin/R/globals.R 
+  **/R/rzeppelin/R/common.R 
+  **/R/rzeppelin/R/protocol.R 
+  **/R/rzeppelin/R/rServer.R 
+  **/R/rzeppelin/R/scalaInterpreter.R 
+  **/R/rzeppelin/R/zzz.R 
+  **/src/main/scala/scala/Console.scala 
+  
**/src/main/scala/org/apache/zeppelin/rinterpreter/rscala/Package.scala
 
+  
**/src/main/scala/org/apache/zeppelin/rinterpreter/rscala/RClient.scala
 
+ 
+
+  

zeppelin git commit: ZEPPELIN-2137 Changed "show line chart with focus" to "zoom"

2017-02-23 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master ac1e73c50 -> 32840e656


ZEPPELIN-2137 Changed "show line chart with focus" to "zoom"

https://issues.apache.org/jira/browse/ZEPPELIN-2137

Improvement

### How should this be tested?
Run it, look at it (UX change)

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update?
* Is there breaking changes for older versions?
* Does this needs documentation?

Author: samthebest 

Closes #2050 from samthebest/master and squashes the following commits:

9f68fcd [samthebest] ZEPPELIN-2137 WS commit to try to force rerun of CI checks
89467ab [samthebest] ZEPPELIN-2137 WS commit to try to force rerun of CI checks
96362ab [samthebest] ZEPPELIN-2137 Changed "show line chart with focus" to 
"zoom"


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

Branch: refs/heads/master
Commit: 32840e656d091b984f4c5ece655bc5af6be5c0ae
Parents: ac1e73c
Author: samthebest 
Authored: Wed Feb 22 13:19:21 2017 +
Committer: Felix Cheung 
Committed: Thu Feb 23 11:33:06 2017 -0800

--
 .../src/app/visualization/builtins/visualization-linechart.js  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/32840e65/zeppelin-web/src/app/visualization/builtins/visualization-linechart.js
--
diff --git 
a/zeppelin-web/src/app/visualization/builtins/visualization-linechart.js 
b/zeppelin-web/src/app/visualization/builtins/visualization-linechart.js
index aab51f8..90db33f 100644
--- a/zeppelin-web/src/app/visualization/builtins/visualization-linechart.js
+++ b/zeppelin-web/src/app/visualization/builtins/visualization-linechart.js
@@ -100,7 +100,7 @@ export default class LinechartVisualization extends 
Nvd3ChartVisualization {
   
-  show line chart with focus
+  zoom
 
   `,
   scope: {



zeppelin git commit: [ZEPPELIN-2116]. livy interpreter needs to restart after previous session timeout in secured cluster

2017-02-20 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.7 937bd5f74 -> 20cb030fc


[ZEPPELIN-2116]. livy interpreter needs to restart after previous session 
timeout in secured cluster

What is this PR for?

It throw different exception in secured cluster. This PR fix the issue in 
secured cluster

What type of PR is it?

[Bug Fix]

Todos

 - Task
What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-2116
How should this be tested?

Tested manually.

Questions:

Does the licenses files need update? No
Is there breaking changes for older versions? No
Does this needs documentation? no

Author: Jeff Zhang 

Closes #2021 from zjffdu/ZEPPELIN-2116 and squashes the following commits:

05e6a3c [Jeff Zhang] address comments
96a7cfe [Jeff Zhang] update
63c693b [Jeff Zhang] add more acurrate detection for session expire
7949b51 [Jeff Zhang] [ZEPPELIN-2116]. livy interpreter needs to restart after 
previous session timeout in secured cluster

(cherry picked from commit 6418d770b23ddf877a7117fffe5d61ddb2d846b0)
Signed-off-by: Felix Cheung 


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

Branch: refs/heads/branch-0.7
Commit: 20cb030fcc19b0fb7dc645816eeea419901d1f9f
Parents: 937bd5f
Author: Jeff Zhang 
Authored: Sat Feb 18 17:13:10 2017 +0800
Committer: Felix Cheung 
Committed: Mon Feb 20 10:45:31 2017 -0800

--
 .../apache/zeppelin/livy/BaseLivyInterprereter.java| 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/20cb030f/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
--
diff --git 
a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java 
b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
index 92c5f12..2b43e4a 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
@@ -30,6 +30,7 @@ import org.springframework.http.HttpMethod;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.kerberos.client.KerberosRestTemplate;
 import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.RestClientException;
 import org.springframework.web.client.RestTemplate;
 
 import java.util.HashMap;
@@ -46,6 +47,7 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
 
   protected static final Logger LOGGER = 
LoggerFactory.getLogger(BaseLivyInterprereter.class);
   private static Gson gson = new 
GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create();
+  private static String SESSION_NOT_FOUND_PATTERN = "\"Session '\\d+' not 
found.\"";
 
   protected volatile SessionInfo sessionInfo;
   private String livyURL;
@@ -413,6 +415,15 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
   response = new ResponseEntity(e.getResponseBodyAsString(), 
e.getStatusCode());
   LOGGER.error(String.format("Error with %s StatusCode: %s",
   response.getStatusCode().value(), e.getResponseBodyAsString()));
+} catch (RestClientException e) {
+  // Exception happens when kerberos is enabled.
+  if (e.getCause() instanceof HttpClientErrorException) {
+HttpClientErrorException cause = (HttpClientErrorException) 
e.getCause();
+if 
(cause.getResponseBodyAsString().matches(SESSION_NOT_FOUND_PATTERN)) {
+  throw new SessionNotFoundException(cause.getResponseBodyAsString());
+}
+  }
+  throw new LivyException(e);
 }
 if (response == null) {
   throw new LivyException("No http response returned");
@@ -423,7 +434,7 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
 || response.getStatusCode().value() == 201) {
   return response.getBody();
 } else if (response.getStatusCode().value() == 404) {
-  if (response.getBody().matches("\"Session '\\d+' not found.\"")) {
+  if (response.getBody().matches(SESSION_NOT_FOUND_PATTERN)) {
 throw new SessionNotFoundException(response.getBody());
   } else {
 throw new APINotFoundException("No rest api found for " + targetURL +



zeppelin git commit: ZEPPELIN-2108. Livy interpreter job cancellation throws NPE

2017-02-19 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master d55058b05 -> eb88b0b9e


ZEPPELIN-2108. Livy interpreter job cancellation throws NPE

### What is this PR for?
It happens in some corner cases where output is null when statement is 
cancelled.

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

### Todos
* [ ] - Task

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

### How should this be tested?
Tested manually
![livy_cancelled](https://cloud.githubusercontent.com/assets/164491/23003509/2fb0fc9c-f42c-11e6-8cba-ae654a4e5c08.png)
.

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang 

Closes #2025 from zjffdu/ZEPPELIN-2108 and squashes the following commits:

191b18a [Jeff Zhang] ZEPPELIN-2108. Livy interpreter job cancellation throws NPE


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

Branch: refs/heads/master
Commit: eb88b0b9e7b711c1a2003fe4a91164976fc61fcd
Parents: d55058b
Author: Jeff Zhang 
Authored: Tue Feb 14 13:34:38 2017 +0800
Committer: Felix Cheung 
Committed: Sun Feb 19 10:20:58 2017 -0800

--
 .../org/apache/zeppelin/livy/BaseLivyInterprereter.java | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/eb88b0b9/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
--
diff --git 
a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java 
b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
index fd533ab..27e8aaf 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
@@ -299,8 +299,14 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
 
   private InterpreterResult getResultFromStatementInfo(StatementInfo stmtInfo,
boolean displayAppInfo) 
{
-if (stmtInfo.output.isError()) {
+if (stmtInfo.output != null && stmtInfo.output.isError()) {
   return new InterpreterResult(InterpreterResult.Code.ERROR, 
stmtInfo.output.evalue);
+} else if (stmtInfo.isCancelled()) {
+  // corner case, output might be null if it is cancelled.
+  return new InterpreterResult(InterpreterResult.Code.ERROR, "Job is 
cancelled");
+} else if (stmtInfo.output == null) {
+  // This case should never happen, just in case
+  return new InterpreterResult(InterpreterResult.Code.ERROR, "Empty 
output");
 } else {
   //TODO(zjffdu) support other types of data (like json, image and etc)
   String result = stmtInfo.output.data.plain_text;
@@ -533,6 +539,10 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
   return state.equals("available") || state.equals("cancelled");
 }
 
+public boolean isCancelled() {
+  return state.equals("cancelled");
+}
+
 private static class StatementOutput {
   public String status;
   public String execution_count;



zeppelin git commit: ZEPPELIN-2079. Upgrade livy to 0.3 in livy interpreter

2017-02-19 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master bc8e190f9 -> d55058b05


ZEPPELIN-2079. Upgrade livy to 0.3 in livy interpreter

### What is this PR for?
Upgrade livy to 0.3.

* Add new tests for livy 0.3
* Add 2 livy build in travis. (livy 0.2 + spark 1.6.3 and livy 0.3 + spark 
2.1.0, unfortunately livy 0.3 has some packaging issue which cause some issues 
for integration test for livy 0.3 + spark 1.6.3). I also merge the livy build 
into spark build in travis but has to set `sudo` as `required` for more memory.

### What type of PR is it?
[Improvement]

### Todos
* [ ] - Task

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

### How should this be tested?
Tested is added

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang 

Closes #2010 from zjffdu/ZEPPELIN-2079 and squashes the following commits:

e9d1042 [Jeff Zhang] update travis
2695d7c [Jeff Zhang] ZEPPELIN-2079. Upgrade livy to 0.3 in livy interpreter


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

Branch: refs/heads/master
Commit: d55058b05d41ef212ec556b2ce762ccc66e407cb
Parents: bc8e190
Author: Jeff Zhang 
Authored: Mon Feb 13 09:06:39 2017 +0800
Committer: Felix Cheung 
Committed: Sun Feb 19 10:19:27 2017 -0800

--
 .travis.yml |  18 +-
 livy/pom.xml| 185 +--
 .../zeppelin/livy/BaseLivyInterprereter.java|   2 +-
 .../zeppelin/livy/LivySparkInterpreter.java |   2 +-
 .../org/apache/zeppelin/livy/LivyVersion.java   |   4 +-
 .../apache/zeppelin/livy/LivyInterpreterIT.java | 168 +
 6 files changed, 279 insertions(+), 100 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d55058b0/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index c597340..3972a70 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -41,16 +41,18 @@ matrix:
   env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" PROFILE="-Prat" 
BUILD_FLAG="clean" TEST_FLAG="org.apache.rat:apache-rat-plugin:check" 
TEST_PROJECTS=""
 
 # Test all modules with spark 2.1.0 and scala 2.11
-- jdk: "oraclejdk7"
-  env: SCALA_VER="2.11" SPARK_VER="2.1.0" HADOOP_VER="2.6" 
PROFILE="-Pspark-2.1 -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Phelium-dev 
-Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" 
TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
+- sudo: required
+  jdk: "oraclejdk7"
+  env: SCALA_VER="2.11" SPARK_VER="2.1.0" HADOOP_VER="2.6" 
LIVY_VER="0.3.0" PROFILE="-Pspark-2.1 -Phadoop-2.6 -Ppyspark -Psparkr 
-Pscalding -Phelium-dev -Pexamples -Pscala-2.11 -Plivy-0.3" BUILD_FLAG="package 
-Pbuild-distr -DskipRat" TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" 
TEST_PROJECTS=""
 
 # Test all modules with spark 2.0.2 and scala 2.11
 - jdk: "oraclejdk7"
   env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" 
PROFILE="-Pspark-2.0 -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Phelium-dev 
-Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" 
TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
 
 # Test spark module for 1.6.3 with scala 2.10
-- jdk: "oraclejdk7"
-  env: SCALA_VER="2.10" SPARK_VER="1.6.3" HADOOP_VER="2.6" 
PROFILE="-Pspark-1.6 -Phadoop-2.6 -Ppyspark -Psparkr -Pscala-2.10" 
BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="test -DskipRat" 
MODULES="-pl 
zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark"
 TEST_PROJECTS="-Dtest=ZeppelinSparkClusterTest,org.apache.zeppelin.spark.* 
-DfailIfNoTests=false"
+- sudo: required
+  jdk: "oraclejdk7"
+  env: SCALA_VER="2.10" SPARK_VER="1.6.3" HADOOP_VER="2.6" 
LIVY_VER="0.2.0" PROFILE="-Pspark-1.6 -Phadoop-2.6 -Ppyspark -Psparkr 
-Pscala-2.10 -Plivy-0.2" BUILD_FLAG="package -DskipTests -DskipRat" 
TEST_FLAG="test -DskipRat" MODULES="-pl 
zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark"
 TEST_PROJECTS="-Dtest=ZeppelinSparkClusterTest,org.apache.zeppelin.spark.* 
-DfailIfNoTests=false"
 
 # Test spark module for 1.6.3 with scala 2.11
 - jdk: "oraclejdk7"
@@ -68,10 +70,6 @@ matrix:
 - jdk: "oraclejdk7"
   env: PYTHON="3" SCALA_VER="2.11" SPARK_VER="2.0.0" HADOOP_VER="2.6" 
PROFILE="-Pspark-2.0 -Phadoop-2.6 -Ppyspark 

zeppelin git commit: [ZEPPELIN-525] Test failing in zeppelin-interpreter

2017-01-29 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master e763b3bf3 -> 65e1d3645


[ZEPPELIN-525] Test failing in zeppelin-interpreter

`RemoteSchedulerTest.test` was fall when CPU switched `RemoteScheduler` 
execution (which executes a job in a separate thread) back to test main thread 
execution after changing job status to `Status.FINISHED` but before updating 
running jobs list:
```
job.setStatus(lastStatus);

// if thread execution is switched here to the main thread test will fall

synchronized (queue) {
running.remove(job);
queue.notify();
}
```
Test checked job status, saw that job was terminated and expected to see an 
empty jobs runing list.
```
while (!job.isTerminated() && cycles < MAX_WAIT_CYCLES) {
Thread.sleep(TICK_WAIT);
cycles++;
}

// this assert will fail because a job was not removed from running list yet
assertEquals(0, scheduler.getJobsRunning().size());
```
But `scheduler.running` list still contained the last job and the assertion 
failed.

### What is this PR for?
The goal is to synchronize updating of a job status and a scheduler running 
jobs list when a job is terminated.

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

### What is the Jira issue?
[ZEPPELIN-525](https://issues.apache.org/jira/browse/ZEPPELIN-525)

### How should this be tested?
You may place a `Thread.sleep(1000);` code to the `RemoteScheduler.java` class 
after the `job.setStatus(lastStatus);` (line number 354). This will increase 
probability of threads switching after this line. Test should not fail.

### Questions:
* Does the licenses files need update? **no**
* Is there breaking changes for older versions? **no**
* Does this needs documentation? **no**

Author: Alexander Shoshin 

Closes #1954 from AlexanderShoshin/ZEPPELIN-525 and squashes the following 
commits:

8a0f4af [Alexander Shoshin] synchronized a job status and a list of running jobs


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

Branch: refs/heads/master
Commit: 65e1d364583ac8fb822aa00ebee5b7cfcd842fed
Parents: e763b3b
Author: Alexander Shoshin 
Authored: Fri Jan 27 11:30:11 2017 +0300
Committer: Felix Cheung 
Committed: Sun Jan 29 23:35:53 2017 -0800

--
 .../zeppelin/scheduler/RemoteScheduler.java | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/65e1d364/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/RemoteScheduler.java
--
diff --git 
a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/RemoteScheduler.java
 
b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/RemoteScheduler.java
index 0101b18..a4ab00e 100644
--- 
a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/RemoteScheduler.java
+++ 
b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/RemoteScheduler.java
@@ -307,10 +307,10 @@ public class RemoteScheduler implements Scheduler {
 @Override
 public void run() {
   if (job.isAborted()) {
-job.setStatus(Status.ABORT);
-job.aborted = false;
-
 synchronized (queue) {
+  job.setStatus(Status.ABORT);
+  job.aborted = false;
+
   running.remove(job);
   queue.notify();
 }
@@ -350,16 +350,16 @@ public class RemoteScheduler implements Scheduler {
 lastStatus = Status.ERROR;
   }
 
-  job.setStatus(lastStatus);
+  synchronized (queue) {
+job.setStatus(lastStatus);
 
-  if (listener != null) {
-listener.jobFinished(scheduler, job);
-  }
+if (listener != null) {
+  listener.jobFinished(scheduler, job);
+}
 
-  // reset aborted flag to allow retry
-  job.aborted = false;
+// reset aborted flag to allow retry
+job.aborted = false;
 
-  synchronized (queue) {
 running.remove(job);
 queue.notify();
   }



zeppelin git commit: ZEPPELIN-1852. Use multiple InterpreterResult for displaying appInfo

2017-01-17 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.7 350cf9c29 -> 2665d709a


ZEPPELIN-1852. Use multiple InterpreterResult for displaying appInfo

### What is this PR for?
Refactor the livy interpreter to use multiple `InterpreterResult` for 
displaying appInfo.

### What type of PR is it?
[Refactoring]

### Todos
* [ ] - Task

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

### How should this be tested?
Add integration test and also test it manually

### Screenshots (if appropriate)
![image](https://cloud.githubusercontent.com/assets/164491/21446774/691b84fe-c905-11e6-91a1-9dcc57c75f3c.png)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang 

Closes #1796 from zjffdu/ZEPPELIN-1852 and squashes the following commits:

724f22e [Jeff Zhang] update doc
e1c2eb9 [Jeff Zhang] ZEPPELIN-1852. Use multiple InterpreterResult for 
displaying appInfo

(cherry picked from commit 69b866adca5ecac00b26dfd3573013eaae133102)
Signed-off-by: Felix Cheung 


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

Branch: refs/heads/branch-0.7
Commit: 2665d709a9f7888a644e3eed4df6ae115044268f
Parents: 350cf9c
Author: Jeff Zhang 
Authored: Wed Dec 28 19:08:22 2016 +0800
Committer: Felix Cheung 
Committed: Tue Jan 17 23:18:20 2017 -0800

--
 docs/interpreter/livy.md|  5 +++
 .../zeppelin/livy/BaseLivyInterprereter.java| 34 +---
 .../src/main/resources/interpreter-setting.json |  8 ++---
 .../apache/zeppelin/livy/LivyInterpreterIT.java | 34 +++-
 4 files changed, 58 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/2665d709/docs/interpreter/livy.md
--
diff --git a/docs/interpreter/livy.md b/docs/interpreter/livy.md
index 47ebc46..6f04244 100644
--- a/docs/interpreter/livy.md
+++ b/docs/interpreter/livy.md
@@ -61,6 +61,11 @@ Example: `spark.driver.memory` to `livy.spark.driver.memory`
 Max number of Spark SQL result to display.
   
   
+zeppelin.livy.session.create_timeout
+120
+Timeout in seconds for session creation
+  
+  
 zeppelin.livy.displayAppInfo
 false
 Whether to display app info

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/2665d709/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
--
diff --git 
a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java 
b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
index 3d84363..f0591fd 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
@@ -62,8 +62,10 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
   public BaseLivyInterprereter(Properties property) {
 super(property);
 this.livyURL = property.getProperty("zeppelin.livy.url");
+this.displayAppInfo = Boolean.parseBoolean(
+property.getProperty("zeppelin.livy.displayAppInfo", "false"));
 this.sessionCreationTimeout = Integer.parseInt(
-property.getProperty("zeppelin.livy.create.session.timeout", 120 + 
""));
+property.getProperty("zeppelin.livy.session.create_timeout", 120 + 
""));
 this.pullStatusInterval = Integer.parseInt(
 property.getProperty("zeppelin.livy.pull_status.interval.millis", 1000 
+ ""));
   }
@@ -77,7 +79,6 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
 } catch (LivyException e) {
   String msg = "Fail to create session, please check livy interpreter log 
and " +
   "livy server log";
-  LOGGER.error(msg);
   throw new RuntimeException(msg, e);
 }
   }
@@ -102,10 +103,11 @@ public abstract class BaseLivyInterprereter extends 
Interpreter {
 .get(0).getData());
   }
 
-  interpret(
-  "val 
webui=sc.getClass.getMethod(\"ui\").invoke(sc).asInstanceOf[Some[_]].get",
-  null, false, false);
-  if (StringUtils.isEmpty(sessionInfo.appInfo.get("sparkUiUrl"))) {
+  if (sessionInfo.appInfo == null ||
+  StringUtils.isEmpty(sessionInfo.appInfo.get("sparkUiUrl"))) {
+interpret(
+"val 
webui=sc.getClass.getMethod(\"ui\").invoke(sc).asInstanceOf[Some[_]].get",
+null, false, false);
 

zeppelin git commit: ZEPPELIN-1432. Support cancellation of paragraph execution

2017-01-16 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 04d34547a -> 2fcfaa8c7


ZEPPELIN-1432. Support cancellation of paragraph execution

### What is this PR for?
Livy 0.3 support cancel operation, this PR is to support cancel in livy 
interpreter. First we would check the livy version, then based on the livy 
version, we would call the livy rest api to cancel the statement.

### What type of PR is it?
 Improvement | Feature ]

### Todos
* [ ] - Task

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

### How should this be tested?
Tested manually, because cancel is only avaible in livy 0.3 which is not 
released yet.

### Screenshots (if appropriate)
![image](https://cloud.githubusercontent.com/assets/164491/21712520/3ed292ec-d430-11e6-8829-581e1bba1a9c.png)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang 

Closes #1859 from zjffdu/ZEPPELIN-1432 and squashes the following commits:

83eaf83 [Jeff Zhang] minor update
200ca71 [Jeff Zhang] address comments
1cbeb26 [Jeff Zhang] add zeppelin.livy.pull_status.interval.millis
070fea0 [Jeff Zhang] ZEPPELIN-1432. Support cancellation of paragraph execution


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

Branch: refs/heads/master
Commit: 2fcfaa8c74cad5adf9adcdf76987e4ffbe5983c7
Parents: 04d3454
Author: Jeff Zhang 
Authored: Mon Jan 16 09:01:54 2017 +0800
Committer: Felix Cheung 
Committed: Mon Jan 16 21:01:53 2017 -0800

--
 docs/interpreter/livy.md|   5 +
 .../zeppelin/livy/APINotFoundException.java |  43 +
 .../zeppelin/livy/BaseLivyInterprereter.java| 156 +--
 .../zeppelin/livy/LivySparkSQLInterpreter.java  |   9 +-
 .../org/apache/zeppelin/livy/LivyVersion.java   |  96 
 .../src/main/resources/interpreter-setting.json |   5 +
 6 files changed, 264 insertions(+), 50 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/2fcfaa8c/docs/interpreter/livy.md
--
diff --git a/docs/interpreter/livy.md b/docs/interpreter/livy.md
index 067a317..47ebc46 100644
--- a/docs/interpreter/livy.md
+++ b/docs/interpreter/livy.md
@@ -66,6 +66,11 @@ Example: `spark.driver.memory` to `livy.spark.driver.memory`
 Whether to display app info
   
   
+zeppelin.livy.pull_status.interval.millis
+1000
+The interval for checking paragraph execution status
+  
+  
 livy.spark.driver.cores
 
 Driver cores. ex) 1, 2.

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/2fcfaa8c/livy/src/main/java/org/apache/zeppelin/livy/APINotFoundException.java
--
diff --git 
a/livy/src/main/java/org/apache/zeppelin/livy/APINotFoundException.java 
b/livy/src/main/java/org/apache/zeppelin/livy/APINotFoundException.java
new file mode 100644
index 000..3c4b714
--- /dev/null
+++ b/livy/src/main/java/org/apache/zeppelin/livy/APINotFoundException.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zeppelin.livy;
+
+/**
+ * APINotFoundException happens because we may introduce new apis in new livy 
version.
+ */
+public class APINotFoundException extends LivyException {
+  public APINotFoundException() {
+  }
+
+  public APINotFoundException(String message) {
+super(message);
+  }
+
+  public APINotFoundException(String message, Throwable cause) {
+super(message, cause);
+  }
+
+  public APINotFoundException(Throwable cause) {
+super(cause);
+  }
+
+  public APINotFoundException(String message, Throwable cause, boolean 
enableSuppression,
+  boolean writableStackTrace) {
+ 

zeppelin git commit: ZEPPELIN-1918. Fix build with Spark 2.1.0

2017-01-16 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master ae1cb0527 -> 9bc4dce98


ZEPPELIN-1918. Fix build with Spark 2.1.0

### What is this PR for?
It's my misunderstanding of `SPARK_VER` in travis. It is only used for 
downloading spark distribution. We need to specify spark profile explicitly for 
building with specific version of spark. This PR add new profile for spark 2.1 
and fix the build issue with spark 2.1.0 because `SecurityManager` changes its 
constructor signature in spark 2.1

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

### Todos
* [ ] - Task

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

### How should this be tested?
Build with spark 2.1.0 and tested it manually as below screenshot.

### Screenshots (if appropriate)
![image](https://cloud.githubusercontent.com/assets/164491/21797414/d586aa04-d749-11e6-8c6f-3b12e9e2ae2d.png)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang 

Closes #1880 from zjffdu/ZEPPELIN-1918 and squashes the following commits:

8f87459 [Jeff Zhang] update release script
34772e0 [Jeff Zhang] update build doc for spark 2.1
5efdb11 [Jeff Zhang] fix unit test and address comments
def502f [Jeff Zhang] ZEPPELIN-1918. Fix build with Spark 2.1.0


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

Branch: refs/heads/master
Commit: 9bc4dce9884ec4011f677560f708286968549374
Parents: ae1cb05
Author: Jeff Zhang 
Authored: Wed Jan 11 10:56:53 2017 +0800
Committer: Felix Cheung 
Committed: Mon Jan 16 09:28:41 2017 -0800

--
 .travis.yml |  8 ++--
 dev/create_release.sh   |  4 +-
 dev/publish_release.sh  |  2 +-
 docs/install/build.md   |  5 +++
 spark-dependencies/pom.xml  | 14 ++-
 spark/pom.xml   | 14 ++-
 .../apache/zeppelin/spark/SparkInterpreter.java | 41 ++--
 7 files changed, 73 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/9bc4dce9/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index 48e8aa7..5b3371d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -40,13 +40,13 @@ matrix:
 - jdk: "oraclejdk7"
   env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" PROFILE="-Prat" 
BUILD_FLAG="clean" TEST_FLAG="org.apache.rat:apache-rat-plugin:check" 
TEST_PROJECTS=""
 
-# Test all modules with spark 2.0.2 and scala 2.11
+# Test all modules with spark 2.1.0 and scala 2.11
 - jdk: "oraclejdk7"
-  env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" 
PROFILE="-Pspark-2.0 -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Phelium-dev 
-Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" 
TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
+  env: SCALA_VER="2.11" SPARK_VER="2.1.0" HADOOP_VER="2.6" 
PROFILE="-Pspark-2.1 -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Phelium-dev 
-Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" 
TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
 
-# Test all modules with spark 2.1.0 and scala 2.11
+# Test all modules with spark 2.0.2 and scala 2.11
 - jdk: "oraclejdk7"
-  env: SCALA_VER="2.11" SPARK_VER="2.1.0" HADOOP_VER="2.6" 
PROFILE="-Pspark-2.0 -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Phelium-dev 
-Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" 
TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
+  env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" 
PROFILE="-Pspark-2.0 -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Phelium-dev 
-Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" 
TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
 
 # Test all modules with scala 2.10
 - jdk: "oraclejdk7"

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/9bc4dce9/dev/create_release.sh
--
diff --git a/dev/create_release.sh b/dev/create_release.sh
index 9b0b231..873bb10 100755
--- a/dev/create_release.sh
+++ b/dev/create_release.sh
@@ -124,8 +124,8 @@ function make_binary_release() {
 build_docker_base
 git_clone
 make_source_package
-make_binary_release all "-Pspark-2.0 -Phadoop-2.6 -Pyarn -Ppyspark -Psparkr 
-Pscala-${SCALA_VERSION}"

zeppelin git commit: ZEPPELIN-1918. Fix build with Spark 2.1.0

2017-01-16 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.7 2a869c80e -> 20ebb6cc1


ZEPPELIN-1918. Fix build with Spark 2.1.0

### What is this PR for?
It's my misunderstanding of `SPARK_VER` in travis. It is only used for 
downloading spark distribution. We need to specify spark profile explicitly for 
building with specific version of spark. This PR add new profile for spark 2.1 
and fix the build issue with spark 2.1.0 because `SecurityManager` changes its 
constructor signature in spark 2.1

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

### Todos
* [ ] - Task

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

### How should this be tested?
Build with spark 2.1.0 and tested it manually as below screenshot.

### Screenshots (if appropriate)
![image](https://cloud.githubusercontent.com/assets/164491/21797414/d586aa04-d749-11e6-8c6f-3b12e9e2ae2d.png)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang 

Closes #1880 from zjffdu/ZEPPELIN-1918 and squashes the following commits:

8f87459 [Jeff Zhang] update release script
34772e0 [Jeff Zhang] update build doc for spark 2.1
5efdb11 [Jeff Zhang] fix unit test and address comments
def502f [Jeff Zhang] ZEPPELIN-1918. Fix build with Spark 2.1.0

(cherry picked from commit 9bc4dce9884ec4011f677560f708286968549374)
Signed-off-by: Felix Cheung 


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

Branch: refs/heads/branch-0.7
Commit: 20ebb6cc1e8246f72e74af36fa286761a79c53f4
Parents: 2a869c8
Author: Jeff Zhang 
Authored: Wed Jan 11 10:56:53 2017 +0800
Committer: Felix Cheung 
Committed: Mon Jan 16 09:29:08 2017 -0800

--
 .travis.yml |  8 ++--
 dev/create_release.sh   |  4 +-
 dev/publish_release.sh  |  2 +-
 docs/install/build.md   |  5 +++
 spark-dependencies/pom.xml  | 14 ++-
 spark/pom.xml   | 14 ++-
 .../apache/zeppelin/spark/SparkInterpreter.java | 41 ++--
 7 files changed, 73 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/20ebb6cc/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index 48e8aa7..5b3371d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -40,13 +40,13 @@ matrix:
 - jdk: "oraclejdk7"
   env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" PROFILE="-Prat" 
BUILD_FLAG="clean" TEST_FLAG="org.apache.rat:apache-rat-plugin:check" 
TEST_PROJECTS=""
 
-# Test all modules with spark 2.0.2 and scala 2.11
+# Test all modules with spark 2.1.0 and scala 2.11
 - jdk: "oraclejdk7"
-  env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" 
PROFILE="-Pspark-2.0 -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Phelium-dev 
-Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" 
TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
+  env: SCALA_VER="2.11" SPARK_VER="2.1.0" HADOOP_VER="2.6" 
PROFILE="-Pspark-2.1 -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Phelium-dev 
-Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" 
TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
 
-# Test all modules with spark 2.1.0 and scala 2.11
+# Test all modules with spark 2.0.2 and scala 2.11
 - jdk: "oraclejdk7"
-  env: SCALA_VER="2.11" SPARK_VER="2.1.0" HADOOP_VER="2.6" 
PROFILE="-Pspark-2.0 -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Phelium-dev 
-Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" 
TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
+  env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" 
PROFILE="-Pspark-2.0 -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Phelium-dev 
-Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" 
TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
 
 # Test all modules with scala 2.10
 - jdk: "oraclejdk7"

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/20ebb6cc/dev/create_release.sh
--
diff --git a/dev/create_release.sh b/dev/create_release.sh
index 9b0b231..873bb10 100755
--- a/dev/create_release.sh
+++ b/dev/create_release.sh
@@ -124,8 +124,8 @@ function make_binary_release() {
 build_docker_base
 git_clone
 

zeppelin git commit: ZEPPELIN-1933. Set pig job name and allow to set pig property in pig interpreter setting

2017-01-15 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.7 8956d682f -> 835e9e21f


ZEPPELIN-1933. Set pig job name and allow to set pig property in pig 
interpreter setting

### What is this PR for?
Two improvements for pig interpreter.
* Set job name via paragraph title if it exists, otherwise use the last line of 
pig script
* Allow to set any pig property in interpreter setting

### What type of PR is it?
[ Improvement]

### Todos
* [ ] - Task

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

### How should this be tested?
Unit tested and manually tested.

### Screenshots (if appropriate)
![image](https://cloud.githubusercontent.com/assets/164491/21840291/a6af18b4-d817-11e6-9778-02e12ec02be1.png)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang 

Closes #1885 from zjffdu/ZEPPELIN-1933 and squashes the following commits:

d2e1cd4 [Jeff Zhang] address comments
9cee380 [Jeff Zhang] ZEPPELIN-1933. Set pig job name and allow to set pig 
property in pig interpreter setting

(cherry picked from commit 41f9fd921d77f5112107ba76c8794213cf3af929)
Signed-off-by: Felix Cheung 


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

Branch: refs/heads/branch-0.7
Commit: 835e9e21f7a94066313af98c44de9b793b1ba54d
Parents: 8956d68
Author: Jeff Zhang 
Authored: Thu Jan 12 15:39:17 2017 +0800
Committer: Felix Cheung 
Committed: Sun Jan 15 11:09:34 2017 -0800

--
 docs/interpreter/pig.md | 12 ++
 .../apache/zeppelin/pig/BasePigInterpreter.java | 24 
 .../org/apache/zeppelin/pig/PigInterpreter.java |  8 +++
 .../zeppelin/pig/PigQueryInterpreter.java   |  1 +
 .../zeppelin/pig/PigInterpreterTezTest.java |  5 
 5 files changed, 50 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/835e9e21/docs/interpreter/pig.md
--
diff --git a/docs/interpreter/pig.md b/docs/interpreter/pig.md
index a778169..ad2e80a 100644
--- a/docs/interpreter/pig.md
+++ b/docs/interpreter/pig.md
@@ -52,6 +52,8 @@ group: manual
 ### How to configure interpreter
 
 At the Interpreters menu, you have to create a new Pig interpreter. Pig 
interpreter has below properties by default.
+And you can set any pig properties here which will be passed to pig engine. 
(like tez.queue.name & mapred.job.queue.name).
+Besides, we use paragraph title as job name if it exists, else use the last 
line of pig script. So you can use that to find app running in YARN RM UI.
 
 
 
@@ -74,6 +76,16 @@ At the Interpreters menu, you have to create a new Pig 
interpreter. Pig interpre
 1000
 max row number displayed in %pig.query
 
+
+tez.queue.name
+default
+queue name for tez engine
+
+
+mapred.job.queue.name
+default
+queue name for mapreduce engine
+
   
 
 ### Example

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/835e9e21/pig/src/main/java/org/apache/zeppelin/pig/BasePigInterpreter.java
--
diff --git a/pig/src/main/java/org/apache/zeppelin/pig/BasePigInterpreter.java 
b/pig/src/main/java/org/apache/zeppelin/pig/BasePigInterpreter.java
index 0aa8a20..a9bb2ce 100644
--- a/pig/src/main/java/org/apache/zeppelin/pig/BasePigInterpreter.java
+++ b/pig/src/main/java/org/apache/zeppelin/pig/BasePigInterpreter.java
@@ -17,6 +17,7 @@
 
 package org.apache.zeppelin.pig;
 
+import org.apache.commons.lang3.StringUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.pig.PigServer;
 import org.apache.pig.backend.BackendException;
@@ -97,4 +98,27 @@ public abstract class BasePigInterpreter extends Interpreter 
{
   }
 
   public abstract PigServer getPigServer();
+
+  /**
+   * Use paragraph title if it exists, else use the last line of pig script.
+   * @param cmd
+   * @param context
+   * @return
+   */
+  protected String createJobName(String cmd, InterpreterContext context) {
+String pTitle = context.getParagraphTitle();
+if (!StringUtils.isBlank(pTitle)) {
+  return pTitle;
+} else {
+  // use the last non-empty line of pig script as the job name.
+  String[] lines = cmd.split("\n");
+  for (int i = lines.length - 1; i >= 0; --i) {
+if (!StringUtils.isBlank(lines[i])) {
+  return lines[i];
+}
+  }
+  // in case all 

zeppelin git commit: remove org.apache.spark.sql.hive.HiveSharedState class check

2017-01-07 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master a6d01aaf3 -> 0f6571452


remove org.apache.spark.sql.hive.HiveSharedState class check

### What is this PR for?
remove org.apache.spark.sql.hive.HiveSharedState class check
because it has been removed since spark 2.1.x

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

### What is the Jira issue?
[ZEPPELIN-1909](https://issues.apache.org/jira/browse/ZEPPELIN-1909)

Author: lichenglin 

Closes #1856 from lichenglin/master and squashes the following commits:

60c3c04 [lichenglin] Merge pull request #1 from lichenglin/lichenglin-patch-1
3f90485 [lichenglin] make hive enable under spark 2.1.0


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

Branch: refs/heads/master
Commit: 0f6571452fff5ea889b96cfdb885774f8af560b0
Parents: a6d01aa
Author: lichenglin 
Authored: Fri Jan 6 14:54:25 2017 +0800
Committer: Felix Cheung 
Committed: Sat Jan 7 10:34:03 2017 -0800

--
 .../src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0f657145/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
--
diff --git 
a/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java 
b/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
index e8c76bc..301dd23 100644
--- a/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
+++ b/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
@@ -205,7 +205,6 @@ public class SparkInterpreter extends Interpreter {
   private boolean hiveClassesArePresent() {
 try {
   this.getClass().forName("org.apache.spark.sql.hive.HiveSessionState");
-  this.getClass().forName("org.apache.spark.sql.hive.HiveSharedState");
   this.getClass().forName("org.apache.hadoop.hive.conf.HiveConf");
   return true;
 } catch (ClassNotFoundException | NoClassDefFoundError e) {
@@ -355,7 +354,7 @@ public class SparkInterpreter extends Interpreter {
 new Class[]{ String.class, String.class},
 new Object[]{ "spark.sql.catalogImplementation", "in-memory"});
 sparkSession = Utils.invokeMethod(builder, "getOrCreate");
-logger.info("Created Spark session with Hive support");
+logger.info("Created Spark session with Hive support use in-memory 
catalogImplementation");
   }
 } else {
   sparkSession = Utils.invokeMethod(builder, "getOrCreate");



zeppelin git commit: ZEPPELIN-1901. Output schema might be null for PigQueryInterpreter

2017-01-07 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 13168e668 -> a6d01aaf3


ZEPPELIN-1901. Output schema might be null for PigQueryInterpreter

### What is this PR for?
The output schema might be null if user doesn't specify it explicitly. In this 
PR, I will use 'col_{pos}' to replace the column name if it is null.

### What type of PR is it?
[Improvement]

### Todos
* [ ] - Task

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

### How should this be tested?
Unit test is added.

### 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 

Closes #1837 from zjffdu/ZEPPELIN-1901 and squashes the following commits:

81cb093 [Jeff Zhang] ZEPPELIN-1901. Output schema might be null for 
PigQueryInterpreter


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

Branch: refs/heads/master
Commit: a6d01aaf36270b571b3b1cd0d4454375972b1cfd
Parents: 13168e6
Author: Jeff Zhang 
Authored: Wed Jan 4 16:29:50 2017 +0800
Committer: Felix Cheung 
Committed: Sat Jan 7 10:31:09 2017 -0800

--
 .../java/org/apache/zeppelin/pig/PigQueryInterpreter.java | 2 +-
 .../java/org/apache/zeppelin/pig/PigQueryInterpreterTest.java | 7 +++
 2 files changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a6d01aaf/pig/src/main/java/org/apache/zeppelin/pig/PigQueryInterpreter.java
--
diff --git a/pig/src/main/java/org/apache/zeppelin/pig/PigQueryInterpreter.java 
b/pig/src/main/java/org/apache/zeppelin/pig/PigQueryInterpreter.java
index 1a7634a..77632a7 100644
--- a/pig/src/main/java/org/apache/zeppelin/pig/PigQueryInterpreter.java
+++ b/pig/src/main/java/org/apache/zeppelin/pig/PigQueryInterpreter.java
@@ -93,7 +93,7 @@ public class PigQueryInterpreter extends BasePigInterpreter {
   if (schemaKnown) {
 for (int i = 0; i < schema.size(); ++i) {
   Schema.FieldSchema field = schema.getField(i);
-  resultBuilder.append(field.alias);
+  resultBuilder.append(field.alias != null ? field.alias : "col_" + i);
   if (i != schema.size() - 1) {
 resultBuilder.append("\t");
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a6d01aaf/pig/src/test/java/org/apache/zeppelin/pig/PigQueryInterpreterTest.java
--
diff --git 
a/pig/src/test/java/org/apache/zeppelin/pig/PigQueryInterpreterTest.java 
b/pig/src/test/java/org/apache/zeppelin/pig/PigQueryInterpreterTest.java
index d9ad7aa..aa6bb08 100644
--- a/pig/src/test/java/org/apache/zeppelin/pig/PigQueryInterpreterTest.java
+++ b/pig/src/test/java/org/apache/zeppelin/pig/PigQueryInterpreterTest.java
@@ -108,6 +108,13 @@ public class PigQueryInterpreterTest {
 assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 assertEquals("gender\tcount\nmale\t2\nfemale\t1\n", 
result.message().get(0).getData());
 
+// generate alias with unknown schema
+query = "b = group a by gender;\nforeach b generate group, COUNT($1);";
+result = pigQueryInterpreter.interpret(query, context);
+assertEquals(InterpreterResult.Type.TABLE, 
result.message().get(0).getType());
+assertEquals(InterpreterResult.Code.SUCCESS, result.code());
+assertEquals("group\tcol_1\nmale\t2\nfemale\t1\n", 
result.message().get(0).getData());
+
 // syntax error in PigQueryInterpereter
 query = "b = group a by invalid_column;\nforeach b generate group as 
gender, COUNT($1) as count;";
 result = pigQueryInterpreter.interpret(query, context);



zeppelin git commit: [ZEPPELIN-1801] To force end table - append %text

2016-12-19 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master ba4418d00 -> 82d836fd5


[ZEPPELIN-1801] To force end table - append %text

### What is this PR for?
It seems there is a bug in scio introduced by recent changes. Table rendered 
from scio helper methods would include interpreter results as well as the data.

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

### Todos

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

### How should this be tested?
Try:
```
%beam.scio
val (sc, args) = ContextAndArgs(argz)
sc.parallelize(Seq("foo", "foo", "bar")).countByValue.closeAndDisplay()
```
before and after the change - and notice extra meaningless columns before the 
fix.

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Rafal Wojdyla 

Closes #1755 from ravwojdyla/fix_1801 and squashes the following commits:

00ffdea [Rafal Wojdyla] To force end table - append %text in scio helpers


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

Branch: refs/heads/master
Commit: 82d836fd5a2c045f8f79d65f78396bf9c4818e85
Parents: ba4418d
Author: Rafal Wojdyla 
Authored: Tue Dec 13 11:58:56 2016 -0500
Committer: Felix Cheung 
Committed: Mon Dec 19 19:38:07 2016 -0800

--
 .../apache/zeppelin/scio/DisplayHelpers.scala   |  7 ++
 .../zeppelin/scio/DisplayHelpersTest.scala  | 71 ++--
 2 files changed, 59 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/82d836fd/scio/src/main/scala/org/apache/zeppelin/scio/DisplayHelpers.scala
--
diff --git a/scio/src/main/scala/org/apache/zeppelin/scio/DisplayHelpers.scala 
b/scio/src/main/scala/org/apache/zeppelin/scio/DisplayHelpers.scala
index cdf718c..8dee3ab 100644
--- a/scio/src/main/scala/org/apache/zeppelin/scio/DisplayHelpers.scala
+++ b/scio/src/main/scala/org/apache/zeppelin/scio/DisplayHelpers.scala
@@ -35,6 +35,7 @@ private[scio] object DisplayHelpers {
   private[scio] val tab = "\t"
   private[scio] val newline = "\n"
   private[scio] val table = "%table"
+  private[scio] val endTable = "%text"
   private[scio] val rowLimitReachedMsg =
 s"$newlineResults are limited to " + maxResults + s" 
rows.$newline"
   private[scio] val bQSchemaIncomplete =
@@ -52,6 +53,7 @@ private[scio] object DisplayHelpers {
   println(sCollectionEmptyMsg)
 } else {
   println(s"$table 
value$newline${it.take(maxResults).map(printer).mkString(newline)}")
+  println(endTable)
   notifyIfTruncated(it)
 }
   }
@@ -64,6 +66,7 @@ private[scio] object DisplayHelpers {
   println(sCollectionEmptyMsg)
 } else {
   println(s"$table 
value$newline${it.take(maxResults).map(printer).mkString(newline)}")
+  println(endTable)
   notifyIfTruncated(it)
 }
   }
@@ -77,6 +80,7 @@ private[scio] object DisplayHelpers {
 } else {
   val content = it.take(maxResults).map{ case (k, v) => s"$k$tab$v" 
}.mkString(newline)
   println(s"$table key${tab}value$newline$content")
+  println(endTable)
   notifyIfTruncated(it)
 }
   }
@@ -97,6 +101,7 @@ private[scio] object DisplayHelpers {
   val firstStr = first.productIterator.mkString(tab)
   val content = it.take(maxResults - 
1).map(_.productIterator.mkString(tab)).mkString(newline)
   println(s"$table $header$newline$firstStr$newline$content")
+  println(endTable)
   notifyIfTruncated(it)
 }
   }
@@ -125,6 +130,7 @@ private[scio] object DisplayHelpers {
 .map(r => fieldNames.map(r.get).mkString(tab))
 .mkString(newline)
   println(s"$table $header$newline$firstStr$newline$content")
+  println(endTable)
   notifyIfTruncated(it)
 }
   }
@@ -151,6 +157,7 @@ private[scio] object DisplayHelpers {
 .mkString(newline)
 
   println(s"$table $header$newline$content")
+  println(endTable)
   notifyIfTruncated(it)
 }
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/82d836fd/scio/src/test/scala/org/apache/zeppelin/scio/DisplayHelpersTest.scala
--
diff --git 
a/scio/src/test/scala/org/apache/zeppelin/scio/DisplayHelpersTest.scala 
b/scio/src/test/scala/org/apache/zeppelin/scio/DisplayHelpersTest.scala
index 1ba4c7e..6dd05ab 100644
--- a/scio/src/test/scala/org/apache/zeppelin/scio/DisplayHelpersTest.scala
+++ b/scio/src/test/scala/org/apache/zeppelin/scio/DisplayHelpersTest.scala
@@ 

zeppelin git commit: [HOTFIX][ZEPPELIN-1779]Flaky test: PySparkInterpreterMatplotlibTest

2016-12-13 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master e733bb59f -> 9b346de6a


[HOTFIX][ZEPPELIN-1779]Flaky test: PySparkInterpreterMatplotlibTest

### What is this PR for?
The matplotlib tests have stalled as a result of conda downloading version 
2.0.0b1. While this was an old beta version and the issue has been fixed 
upstream (https://github.com/conda-forge/matplotlib-feedstock/issues/86), we 
still have not tested the inline backend for 2.0.0 which will be a release with 
a lot of major changes, hence this PR should be made anyway. I am also 
partially undoing one of the changes made in #1709 which suppressed the output 
of the dependency installation from conda. This change was very puzzling to me 
since dependency info isn't that verbose. I ended up determining the cause of 
this issue because I reverted this change and was then able to see the 
dependency versions in the log. I could see suppressing this being necessary 
for the R packages in case they aren't cached and a wall of compiler output 
gets printed out, but I see no real justification to mute it for python 
packages, especially given that they will only be installed for two short 
profiles.

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

### What is the Jira issue?
[ZEPPELIN-1779](https://issues.apache.org/jira/browse/ZEPPELIN-1779)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Alex Goodman 

Closes #1741 from agoodm/ZEPPELIN-1779 and squashes the following commits:

1211a2f [Alex Goodman] Ensure matplotlib version is 1.5.3


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

Branch: refs/heads/master
Commit: 9b346de6a0dd74cd15dd8f548823dbb1eb3e34df
Parents: e733bb5
Author: Alex Goodman 
Authored: Fri Dec 9 02:29:31 2016 -0800
Committer: Felix Cheung 
Committed: Tue Dec 13 09:25:15 2016 -0800

--
 .travis.yml  | 2 +-
 testing/install_external_dependencies.sh | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/9b346de6/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index b82c387..ab70628 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -80,7 +80,7 @@ matrix:
 
 before_install:
   - echo "MAVEN_OPTS='-Xms1024M -Xmx2048M -XX:MaxPermSize=1024m 
-XX:-UseGCOverheadLimit -Dorg.slf4j.simpleLogger.defaultLogLevel=warn'" >> 
~/.mavenrc
-  - ./testing/install_external_dependencies.sh > /dev/null 2>&1
+  - ./testing/install_external_dependencies.sh
   - ls -la .spark-dist ${HOME}/.m2/repository/.cache/maven-download-plugin || 
true
   - ls .node_modules && cp -r .node_modules zeppelin-web/node_modules || echo 
"node_modules are not cached"
   - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid 
--make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 
1600x1024x16"

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/9b346de6/testing/install_external_dependencies.sh
--
diff --git a/testing/install_external_dependencies.sh 
b/testing/install_external_dependencies.sh
index 7ea52e6..d2cef07 100755
--- a/testing/install_external_dependencies.sh
+++ b/testing/install_external_dependencies.sh
@@ -27,7 +27,7 @@ if [[ ${PROFILE/"-Pr "} != $PROFILE ]] || [[ 
${PROFILE/"-Psparkr "} != $PROFILE
   source ~/.environ
   if [[ ! -d "$HOME/R/knitr" ]] ; then
 mkdir -p ~/R
-R -e "install.packages('knitr', repos = 'http://cran.us.r-project.org', 
lib='~/R')"
+R -e "install.packages('knitr', repos = 'http://cran.us.r-project.org', 
lib='~/R')"  > /dev/null 2>&1
   fi
 fi
 
@@ -42,5 +42,5 @@ if [[ -n "$PYTHON" ]] ; then
   conda update -q conda
   conda info -a
   conda config --add channels conda-forge
-  conda install -q matplotlib pandasql
+  conda install -q matplotlib=1.5.3 pandasql
 fi



zeppelin git commit: ZEPPELIN-1477. Add Integration Test for LivyInterpreter

2016-10-26 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master ba2b90c2a -> 0af86e393


ZEPPELIN-1477. Add Integration Test for LivyInterpreter

### What is this PR for?
This PR fix several issues of LivyInterpeter test.
* Livy interpreter's test code is not in the right place, so it never runs.
* LivyHelperTest would fail.
* No Integration test for LivyInterpreter so any following change is not easy 
to be tested.

This PR would fix the above issues. Regarding the integration test, some of 
livy's artifact is not available in repository, so I have to copy them to 
livy/local-maven-repo as local repository.  And LivyInterperter's integration 
test require spark and livy to be installed. For now you have to download spark 
and livy manually. Please use spark 1.5.x and livy 0.2 which is currently 
supported. Download livy 0.2.0 from here 
[https://github.com/cloudera/livy/releases](https://github.com/cloudera/livy/releases)

And use the following command to execute the LivyIntegrationTest.
```
export SPARK_HOME=
export LIVY_HOME=
mvn clean package -pl 'livy' -Dtest=LivyIntegrationTest
```
If you hit any issues, you can check logs under `livy/target/tmp`.

### What type of PR is it?
[Bug Fix | Improvement]

### Todos
* [ ] - Task

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

### Screenshots (if appropriate)
![image](https://cloud.githubusercontent.com/assets/164491/18861677/b1389622-84b9-11e6-8b0a-424457ded975.png)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang 

Closes #1462 from zjffdu/ZEPPELIN-1477 and squashes the following commits:

75914b9 [Jeff Zhang] remove livy local jars
fee61f9 [Jeff Zhang] add more test
1b9fbbc [Jeff Zhang] add missing dependencies
e8ceff5 [Jeff Zhang] add missing livy jars
8632466 [Jeff Zhang] fix rat check
f560a92 [Jeff Zhang] ZEPPELIN-1477. Add Integration Test for LivyInterpreter


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

Branch: refs/heads/master
Commit: 0af86e3934255272c96bbf44a0ed7383dfe0145b
Parents: ba2b90c
Author: Jeff Zhang 
Authored: Thu Oct 20 14:08:16 2016 +0800
Committer: Felix Cheung 
Committed: Wed Oct 26 12:33:26 2016 -0700

--
 livy/pom.xml| 106 
 .../org/apache/zeppelin/livy/LivyHelper.java|   1 +
 .../apache/zeppelin/livy/LivyHelperTest.java| 114 -
 .../zeppelin/livy/LivyInterpreterTest.java  |  86 ---
 .../apache/zeppelin/livy/LivyHelperTest.java| 115 +
 .../zeppelin/livy/LivyIntegrationTest.java  | 242 +++
 .../zeppelin/livy/LivyInterpreterTest.java  |  86 +++
 livy/src/test/resources/log4j.properties|  24 ++
 8 files changed, 574 insertions(+), 200 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0af86e39/livy/pom.xml
--
diff --git a/livy/pom.xml b/livy/pom.xml
index 8accaa6..df2bf77 100644
--- a/livy/pom.xml
+++ b/livy/pom.xml
@@ -40,6 +40,7 @@
 3.2.4-Zeppelin
 1.7.0
 1.9.5
+0.2.0
 
 
 
@@ -106,8 +107,58 @@
 4.3.0.RELEASE
 
 
+
+com.cloudera.livy
+livy-integration-test
+${livy.version}
+compile
+
+
+org.xerial.snappy
+snappy-java
+
+
+
+
+com.cloudera.livy
+livy-test-lib
+${livy.version}
+compile
+
+
+org.xerial.snappy
+snappy-java
+
+
+
+
+com.cloudera.livy
+livy-core
+${livy.version}
+compile
+
+
+org.xerial.snappy
+snappy-java
+
+
+
 
 
+
+
+ossrh
+ossrh repository
+https://oss.sonatype.org/content/repositories/releases/
+
+true
+
+
+false
+
+
+
+
 
 
 
@@ -165,6 +216,61 @@
 
 
 
+
+
+maven-failsafe-plugin
+2.16
+
+
+
+

zeppelin git commit: ZEPPELIN-335. Pig Interpreter

2016-10-15 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 5d5d758ce -> 465c51a41


ZEPPELIN-335. Pig Interpreter

### What is this PR for?
Based on #338 , I refactor most of pig interpreter. As I don't think the 
approach in #338 is the best approach. In #338, we use script `bin/pig` to 
launch pig script, it is different to control that job (hard to kill and get 
progress and stats info).  In this PR, I use pig api to launch pig script. 
Besides that I implement another interpreter type `%pig.query` to leverage the 
display system of zeppelin. For the details you can check `pig.md`

### What type of PR is it?
[Feature]

### Todos
* Syntax Highlight
* new interpreter type `%pig.udf`, so that user can write pig udf in zeppelin 
directly and don't need to build udf jar manually.

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

### How should this be tested?
Unit test is added and also manual test is done

### Screenshots (if appropriate)

![image](https://cloud.githubusercontent.com/assets/164491/18986649/54217b4c-8730-11e6-9e33-25f98a98a9b6.png)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang 
Author: Ali Bajwa 
Author: AhyoungRyu 
Author: Jeff Zhang 

Closes #1476 from zjffdu/ZEPPELIN-335 and squashes the following commits:

73a07f0 [Jeff Zhang] minor update
a1b742b [Jeff Zhang] minor update on doc
e858301 [Jeff Zhang] address comments
c85a090 [Jeff Zhang] add license
58b4b2f [Jeff Zhang] minor update of docs
1ae7db2 [Jeff Zhang] Merge pull request #2 from AhyoungRyu/ZEPPELIN-335/docs
fe014a7 [AhyoungRyu] Fix docs title in front matter
df7a6db [AhyoungRyu] Add pig.md to dropdown menu
5e2e222 [AhyoungRyu] Minor update for pig.md
39f161a [Jeff Zhang] address comments
05a3b9b [Jeff Zhang] add pig.md
a09a7f7 [Jeff Zhang] refactor pig Interpreter
c28beb5 [Ali Bajwa] Updated based on comments: 1. Documentation: added pig.md 
with interpreter documentation and added pig entry to index.md 2. Added test 
junit test based on passwd file parsing example here 
https://pig.apache.org/docs/r0.10.0/start.html#run 3. Removed author tag from 
comment (this was copied from shell interpreter 
https://github.com/apache/incubator-zeppelin/blob/master/shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java#L42)
 4. Implemented cancel functionality 5. Display output stream in case of error
2586336 [Ali Bajwa] exposed timeout and pig executable via interpreter and 
added comments
7abad20 [Ali Bajwa] initial commit of pig interpreter


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

Branch: refs/heads/master
Commit: 465c51a419347f89a7d73c8014b3b46f27f1d5b8
Parents: 5d5d758
Author: Jeff Zhang 
Authored: Tue Oct 11 10:27:39 2016 +0800
Committer: Felix Cheung 
Committed: Sat Oct 15 12:26:50 2016 -0700

--
 bin/interpreter.sh  |  22 ++
 conf/interpreter-list   |   1 +
 conf/zeppelin-site.xml.template |   2 +-
 docs/_includes/themes/zeppelin/_navigation.html |   1 +
 docs/interpreter/pig.md |  97 ++
 pig/pom.xml | 184 
 .../apache/zeppelin/pig/BasePigInterpreter.java | 100 +++
 .../org/apache/zeppelin/pig/PigInterpreter.java | 137 +
 .../zeppelin/pig/PigQueryInterpreter.java   | 172 +++
 .../apache/zeppelin/pig/PigScriptListener.java  |  94 ++
 .../java/org/apache/zeppelin/pig/PigUtils.java  | 292 +++
 pig/src/main/resources/interpreter-setting.json |  46 +++
 .../apache/zeppelin/pig/PigInterpreterTest.java | 155 ++
 .../zeppelin/pig/PigQueryInterpreterTest.java   | 153 ++
 pig/src/test/resources/log4j.properties |  22 ++
 pom.xml |   1 +
 zeppelin-distribution/src/bin_license/LICENSE   |  10 +-
 .../zeppelin/conf/ZeppelinConfiguration.java|   4 +-
 18 files changed, 1490 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/465c51a4/bin/interpreter.sh
--
diff --git a/bin/interpreter.sh b/bin/interpreter.sh
index a81c8f2..4fb4b26 100755
--- a/bin/interpreter.sh
+++ b/bin/interpreter.sh
@@ -149,6 +149,28 @@ elif [[ "${INTERPRETER_ID}" == "hbase" ]]; then
   else
 echo "HBASE_HOME and HBASE_CONF_DIR are not set, configuration might not 
be 

zeppelin git commit: [MINOR] Remove duplicated dependency declaration

2016-09-06 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 09870cc6c -> b8051970a


[MINOR] Remove duplicated dependency declaration

### What is this PR for?
Remove duplicated declaration of maven dependency

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

Author: Luciano Resende 

Closes #1402 from lresende/maven-artifact-duplicated and squashes the following 
commits:

cd18347 [Luciano Resende] [MINOR] Remove duplicated dependency declaration


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

Branch: refs/heads/master
Commit: b8051970adcb651449d15e407febf9ebebd1a4a6
Parents: 09870cc
Author: Luciano Resende 
Authored: Sun Sep 4 22:10:12 2016 -0700
Committer: Felix Cheung 
Committed: Tue Sep 6 16:52:58 2016 -0700

--
 zeppelin-zengine/pom.xml | 6 --
 1 file changed, 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/b8051970/zeppelin-zengine/pom.xml
--
diff --git a/zeppelin-zengine/pom.xml b/zeppelin-zengine/pom.xml
index b7e1938..2c56b4d 100644
--- a/zeppelin-zengine/pom.xml
+++ b/zeppelin-zengine/pom.xml
@@ -129,12 +129,6 @@
 
 
 
-  org.eclipse.jetty.websocket
-  websocket-client
-  ${jetty.version}
-
-
-
   org.quartz-scheduler
   quartz
   2.2.1



zeppelin git commit: [ZEPPELIN-1379] Flink interpreter is missing scala libraries

2016-09-01 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 7e2a1b5d4 -> df2e77de9


[ZEPPELIN-1379] Flink interpreter is missing scala libraries

### What is this PR for?
On Flink interpreter, remove provided scope from scala libraries to enable 
copying them to interpreter location.

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

### What is the Jira issue?
[ZEPPELIN-1379](https://issues.apache.org/jira/browse/ZEPPELIN-1379)

Author: Luciano Resende 

Closes #1370 from lresende/flink-dependencies and squashes the following 
commits:

8e2ea20 [Luciano Resende] [ZEPPELIN-1379] Flink interpreter is missing scala 
libraries


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

Branch: refs/heads/master
Commit: df2e77de9631cbed14f91993f7fa4a840e871c92
Parents: 7e2a1b5
Author: Luciano Resende 
Authored: Fri Aug 26 12:49:19 2016 -0700
Committer: Felix Cheung 
Committed: Thu Sep 1 00:21:01 2016 -0700

--
 flink/pom.xml  | 7 ++-
 ignite/pom.xml | 2 +-
 2 files changed, 3 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/df2e77de/flink/pom.xml
--
diff --git a/flink/pom.xml b/flink/pom.xml
index f4c12d5..98713e6 100644
--- a/flink/pom.xml
+++ b/flink/pom.xml
@@ -120,21 +120,18 @@
   org.scala-lang
   scala-library
   ${scala.version}
-  provided
 
 
 
   org.scala-lang
   scala-compiler
   ${scala.version}
-  provided
 
 
 
   org.scala-lang
   scala-reflect
   ${scala.version}
-  provided
 
 
 
@@ -319,7 +316,6 @@
   
 org.apache.maven.plugins
 maven-dependency-plugin
-2.4
 
   
 copy-dependencies
@@ -339,10 +335,11 @@
   
 
   
+org.apache.maven.plugins
 maven-dependency-plugin
-2.8
 
   
+copy-artifact
 package
 
   copy

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/df2e77de/ignite/pom.xml
--
diff --git a/ignite/pom.xml b/ignite/pom.xml
index 465dbc6..d70c488 100644
--- a/ignite/pom.xml
+++ b/ignite/pom.xml
@@ -116,8 +116,8 @@
   
 
   
+org.apache.maven.plugins
 maven-dependency-plugin
-2.8
 
   
 copy-dependencies



zeppelin git commit: [ZEPPELIN-699] Add new synchronous paragraph run REST API

2016-09-01 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 9dc9c7512 -> 7e2a1b5d4


[ZEPPELIN-699] Add new synchronous paragraph run REST API

### What is this PR for?
Right now, when calling the REST API 
`http://:/api/notebook/job//` Zeppelin always 
returns **OK** as shown by this source code: 
https://github.com/apache/incubator-zeppelin/blob/master/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRestApi.java#L477

This ticket will update the behavior so that Zeppelin also return the result of 
the paragraph execution

### What type of PR is it?
[Improvement]

### Todos
* [ ] - Code Review
* [ ] - Simple Test

### Is there a relevant Jira issue?
**[ZEPPELIN-699]**

### How should this be tested?
* `git fetch origin pull/746/head:ParagraphExecutionRESTAPI`
* `git checkout ParagraphExecutionRESTAPI`
* `mvn clean package -DskipTests`
* `bin/zeppelin-daemon.sh restart`
* Create a new note
* In the first paragraph, put the following code

```scala
%sh

echo "Current time = "`date +"%T"
```

* Retrieve the current note id in the URL
* Retrieve the current paragraph id
* Use a REST Client like **[POSTman]** to create a HTTP POST query 
`http://:/api/notebook/run//`
* You should receive something similar as follow for answer

```
{
"status": "OK",
"body": {
"code": "SUCCESS",
"type": "TEXT",
"msg": "Current time = 16:14:18\n"
}
}
```

### Screenshots (if appropriate)
![zeppelin_synchronous_rest_api](https://cloud.githubusercontent.com/assets/1532977/15748069/b4a26a46-28dd-11e6-8f51-aa13ddba3f1c.gif)

API Documentation update

**Existing asynchronous API**
![image](https://cloud.githubusercontent.com/assets/1532977/15773274/5b508cae-2976-11e6-9e52-14d8b7e7828e.png)

**New synchronous API**
![image](https://cloud.githubusercontent.com/assets/1532977/15773309/84965a94-2976-11e6-9719-81d8b555c3c4.png)

### Questions:
* Does the licenses files need update? --> **No**
* Is there breaking changes for older versions? --> **No**
* Does this needs documentation? --> **Yes**

[ZEPPELIN-699]: https://issues.apache.org/jira/browse/ZEPPELIN-699
[POSTman]: https://www.getpostman.com/

Author: DuyHai DOAN 

Closes #746 from doanduyhai/ZEPPELIN-699 and squashes the following commits:

fb0570c [DuyHai DOAN] [ZEPPELIN-699] Update Notebook REST API documentation
8367acf [DuyHai DOAN] [ZEPPELIN-699] Add new synchronous paragraph run REST API


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

Branch: refs/heads/master
Commit: 7e2a1b5d4f134489428a24c7c5502f189224b506
Parents: 9dc9c75
Author: DuyHai DOAN 
Authored: Thu Jun 2 16:24:38 2016 +0200
Committer: Felix Cheung 
Committed: Wed Aug 31 23:56:39 2016 -0700

--
 docs/rest-api/rest-notebook.md  | 55 -
 .../apache/zeppelin/rest/NotebookRestApi.java   | 81 
 .../java/org/apache/zeppelin/notebook/Note.java | 26 ++-
 3 files changed, 145 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7e2a1b5d/docs/rest-api/rest-notebook.md
--
diff --git a/docs/rest-api/rest-notebook.md b/docs/rest-api/rest-notebook.md
index c7e17ea..ed39a4f 100644
--- a/docs/rest-api/rest-notebook.md
+++ b/docs/rest-api/rest-notebook.md
@@ -450,12 +450,12 @@ If you work with Apache Zeppelin and find a need for an 
additional REST API, ple
   
 
 
-### Run a paragraph
+### Run a paragraph asynchronously
   
 
 
   Description
-  This ```POST``` method runs the paragraph by given notebook and 
paragraph id.
+  This ```POST``` method runs the paragraph asynchronously by given 
notebook and paragraph id. This API always return SUCCESS even if the execution 
of the paragraph fails later because the API is asynchronous
   
 
 
@@ -488,6 +488,56 @@ If you work with Apache Zeppelin and find a need for an 
additional REST API, ple
   
 
 
+### Run a paragraph synchronously
+  
+
+
+  Description
+   This ```POST``` method runs the paragraph synchronously by given 
notebook and paragraph id. This API can return SUCCESS or ERROR depending on 
the outcome of the paragraph execution
+  
+
+
+  URL
+  
```http://[zeppelin-server]:[zeppelin-port]/api/notebook/job/[notebookId]/[paragraphId]```
+
+
+  Success code
+  200
+
+
+   Fail code
+   500 
+
+
+   sample JSON input (optional, only needed when if you want to update 
dynamic form's value) 
+  
+{
+  "name": "name of new notebook",
+  

zeppelin git commit: [ZEPPELIN-1258] Add Spark packages support to Livy interpreter

2016-08-15 Thread felixcheung
Repository: zeppelin
Updated Branches:
  refs/heads/master 8b40268d1 -> b619699d1


[ZEPPELIN-1258] Add Spark packages support to Livy interpreter

### What is this PR for?
Adding extra libraries to livy interpreter which isn't exist by default.

### What type of PR is it?
[ Improvement ]

### Todos
* [Test case ] - Task

### What is the Jira issue?
*  [ZEPPELIN-1258]

### How should this be tested?
- Create new livy interpreter or modify the default.
- Set `livy.spark.jars.packages` to list of maven coordinates of jars. The 
format for the coordinates should be groupId:artifactId:version.

### Screenshots (if appropriate)
![](https://s31.postimg.org/px78l7ql7/Screenshot_from_2016_08_03_16_59_00.png)
![](https://s32.postimg.org/96ucb5rb9/Screenshot_from_2016_08_03_17_00_30.png)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? yes

Author: mahmoudelgamal 
Author: mfelgamal 
Author: Fouad 

Closes #1255 from mfelgamal/feature/modifying-livy-doc and squashes the 
following commits:

5411a2f [mahmoudelgamal] changeing default to example
d7f6818 [mahmoudelgamal] Adding livy.spark.jars.packages property
98090ab [mahmoudelgamal] Adding external libraries to livy
03a1e80 [mfelgamal] Merge pull request #4 from apache/master
2586651 [Fouad] Merge pull request #2 from apache/master


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

Branch: refs/heads/master
Commit: b619699d186fba6a8d81896d7212b4cfeac50024
Parents: 8b40268
Author: mahmoudelgamal 
Authored: Mon Aug 8 10:42:31 2016 +0200
Committer: Felix Cheung 
Committed: Mon Aug 15 13:53:56 2016 -0700

--
 docs/interpreter/livy.md| 25 +++-
 .../src/main/resources/interpreter-setting.json |  5 
 2 files changed, 29 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/b619699d/docs/interpreter/livy.md
--
diff --git a/docs/interpreter/livy.md b/docs/interpreter/livy.md
index a30ba7b..1c040b9 100644
--- a/docs/interpreter/livy.md
+++ b/docs/interpreter/livy.md
@@ -43,7 +43,7 @@ We added some common configurations for spark, and you can 
set any configuration
 This link contains all spark configurations: 
http://spark.apache.org/docs/latest/configuration.html#available-properties.
 And instead of starting property with `spark.` it should be replaced with 
`livy.spark.`.
 Example: `spark.master` to `livy.spark.master`
-
+  
 
   
 Property
@@ -115,8 +115,31 @@ Example: `spark.master` to `livy.spark.master`
 
 Upper bound for the number of executors.
   
+
+  livy.spark.jars.packages
+  
+  Adding extra libraries to livy interpreter
+
 
 
+## Adding External libraries
+You can load dynamic library to livy interpreter by set 
`livy.spark.jars.packages` property to comma-separated list of maven 
coordinates of jars to include on the driver and executor classpaths. The 
format for the coordinates should be groupId:artifactId:version. 
+
+Example
+
+
+  
+Property
+Example
+Description
+  
+  
+  livy.spark.jars.packages
+  io.spray:spray-json_2.10:1.3.1
+  Adding extra libraries to livy interpreter
+
+  
+  
 ## How to use
 Basically, you can use
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/b619699d/livy/src/main/resources/interpreter-setting.json
--
diff --git a/livy/src/main/resources/interpreter-setting.json 
b/livy/src/main/resources/interpreter-setting.json
index 28fb280..bc5a275 100644
--- a/livy/src/main/resources/interpreter-setting.json
+++ b/livy/src/main/resources/interpreter-setting.json
@@ -81,6 +81,11 @@
 "propertyName": "zeppelin.livy.keytab",
 "defaultValue": "",
 "description": "Kerberos keytab to authenticate livy"
+  },
+  "livy.spark.jars.packages": {
+"propertyName": "livy.spark.jars.packages",
+"defaultValue": "",
+"description": "Adding extra libraries to livy interpreter"
   }
 }
   },