You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by jo...@apache.org on 2018/08/29 10:06:57 UTC

[01/50] [abbrv] zeppelin git commit: Revert "[MINOR] Add `fmt:check` to check style"

Repository: zeppelin
Updated Branches:
  refs/heads/master 6d0863e1a -> 0d746fa2e


Revert "[MINOR] Add `fmt:check` to check style"

This reverts commit 1fc210f313ffbc20d7991b75e8cb88769ec5b04e.


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

Branch: refs/heads/master
Commit: dad1e8cd5dcfd6d96f41ba96840eda40fa799a82
Parents: c2b34b6
Author: Jongyoul Lee <jo...@apache.org>
Authored: Wed Aug 29 19:05:48 2018 +0900
Committer: Jongyoul Lee <jo...@apache.org>
Committed: Wed Aug 29 19:05:48 2018 +0900

----------------------------------------------------------------------
 .travis.yml                                     |  7 --
 pom.xml                                         |  1 +
 .../org/apache/zeppelin/rinterpreter/KnitR.java | 19 ++---
 .../org/apache/zeppelin/rinterpreter/RRepl.java | 19 ++---
 .../apache/zeppelin/rinterpreter/RStatics.java  |  7 +-
 testing/travis_settings.xml                     | 85 --------------------
 6 files changed, 25 insertions(+), 113 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/dad1e8cd/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 74201c9..6f7f6b1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -50,11 +50,6 @@ matrix:
       dist: trusty
       env: BUILD_PLUGINS="false" SCALA_VER="2.11" PROFILE="-Prat" BUILD_FLAG="clean" TEST_FLAG="org.apache.rat:apache-rat-plugin:check" TEST_PROJECTS=""
 
-    # Check style fast
-    - jdk: "oraclejdk8"
-      dist: trusty
-      env: BUILD_PLUGINS="true" SCALA_VER="2.11" PROFILE="-Pr,integration,examples" BUILD_FLAG="clean" TEST_FLAG="fmt:check" TEST_PROJECTS=""
-
     # Run e2e tests (in zeppelin-web)
     # chrome dropped the support for precise (ubuntu 12.04), so need to use trusty
     # also, can't use JDK 7 in trusty: https://github.com/travis-ci/travis-ci/issues/7884
@@ -126,8 +121,6 @@ matrix:
       env: BUILD_PLUGINS="false" PYTHON="3" SPARK_VER="2.2.0" HADOOP_VER="2.6" LIVY_VER="0.5.0-incubating" PROFILE="" BUILD_FLAG="install -am -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" MODULES="-pl livy" TEST_PROJECTS=""
 
 before_install:
-  - cp ./testing/travis_settings.xml $HOME/.m2/settings.xml
-  - cat $HOME/.m2/settings.xml
   # check files included in commit range, clear bower_components if a bower.json file has changed.
   # bower cache clearing can also be forced by putting "bower clear" or "clear bower" in a commit message
   - changedfiles=$(git diff --name-only $TRAVIS_COMMIT_RANGE 2>/dev/null) || changedfiles=""

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/dad1e8cd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 319d669..a9d3cc0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1070,4 +1070,5 @@
       </build>
     </profile>
   </profiles>
+
 </project>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/dad1e8cd/r/src/main/java/org/apache/zeppelin/rinterpreter/KnitR.java
----------------------------------------------------------------------
diff --git a/r/src/main/java/org/apache/zeppelin/rinterpreter/KnitR.java b/r/src/main/java/org/apache/zeppelin/rinterpreter/KnitR.java
index 1bcfbb3..ab29efe 100644
--- a/r/src/main/java/org/apache/zeppelin/rinterpreter/KnitR.java
+++ b/r/src/main/java/org/apache/zeppelin/rinterpreter/KnitR.java
@@ -17,17 +17,19 @@
 
 package org.apache.zeppelin.rinterpreter;
 
-import java.net.URL;
-import java.util.List;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.*;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 
+import java.net.URL;
+import java.util.List;
+import java.util.Properties;
+
 /**
- * KnitR is a simple wrapper around KnitRInterpreter to handle that Zeppelin prefers to load
- * interpreters through classes defined in Java with static methods that run when the class is
- * loaded.
+ * KnitR is a simple wrapper around KnitRInterpreter to handle that Zeppelin prefers
+ * to load interpreters through classes defined in Java with static methods that run
+ * when the class is loaded.
+ *
  */
 public class KnitR extends Interpreter implements WrappedInterpreter {
   KnitRInterpreter intp;
@@ -36,7 +38,6 @@ public class KnitR extends Interpreter implements WrappedInterpreter {
     super(properties);
     intp = new KnitRInterpreter(properties, startSpark);
   }
-
   public KnitR(Properties properties) {
     this(properties, true);
   }
@@ -77,8 +78,8 @@ public class KnitR extends Interpreter implements WrappedInterpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String s, int i, InterpreterContext interpreterContext) throws InterpreterException {
+  public List<InterpreterCompletion> completion(String s, int i,
+      InterpreterContext interpreterContext) throws InterpreterException {
     List completion = intp.completion(s, i, interpreterContext);
     return completion;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/dad1e8cd/r/src/main/java/org/apache/zeppelin/rinterpreter/RRepl.java
----------------------------------------------------------------------
diff --git a/r/src/main/java/org/apache/zeppelin/rinterpreter/RRepl.java b/r/src/main/java/org/apache/zeppelin/rinterpreter/RRepl.java
index 7588b21..bdf7dae 100644
--- a/r/src/main/java/org/apache/zeppelin/rinterpreter/RRepl.java
+++ b/r/src/main/java/org/apache/zeppelin/rinterpreter/RRepl.java
@@ -17,17 +17,19 @@
 
 package org.apache.zeppelin.rinterpreter;
 
-import java.net.URL;
-import java.util.List;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.*;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 
+import java.net.URL;
+import java.util.List;
+import java.util.Properties;
+
 /**
- * RRepl is a simple wrapper around RReplInterpreter to handle that Zeppelin prefers to load
- * interpreters through classes defined in Java with static methods that run when the class is
- * loaded.
+ * RRepl is a simple wrapper around RReplInterpreter to handle that Zeppelin prefers
+ * to load interpreters through classes defined in Java with static methods that run
+ * when the class is loaded.
+ *
  */
 public class RRepl extends Interpreter implements WrappedInterpreter {
   RReplInterpreter intp;
@@ -36,7 +38,6 @@ public class RRepl extends Interpreter implements WrappedInterpreter {
     super(properties);
     intp = new RReplInterpreter(properties, startSpark);
   }
-
   public RRepl(Properties properties) {
     this(properties, true);
   }
@@ -77,8 +78,8 @@ public class RRepl extends Interpreter implements WrappedInterpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String s, int i, InterpreterContext interpreterContext) throws InterpreterException {
+  public List<InterpreterCompletion> completion(String s, int i,
+      InterpreterContext interpreterContext) throws InterpreterException {
     List completion = intp.completion(s, i, interpreterContext);
     return completion;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/dad1e8cd/r/src/main/java/org/apache/zeppelin/rinterpreter/RStatics.java
----------------------------------------------------------------------
diff --git a/r/src/main/java/org/apache/zeppelin/rinterpreter/RStatics.java b/r/src/main/java/org/apache/zeppelin/rinterpreter/RStatics.java
index 3f2370d..1ea35ce 100644
--- a/r/src/main/java/org/apache/zeppelin/rinterpreter/RStatics.java
+++ b/r/src/main/java/org/apache/zeppelin/rinterpreter/RStatics.java
@@ -27,7 +27,10 @@ import org.apache.spark.api.java.JavaSparkContext;
 import org.apache.spark.sql.SQLContext;
 import org.apache.zeppelin.spark.SparkZeppelinContext;
 
-/** RStatics provides static class methods that can be accessed through the SparkR bridge */
+/**
+ * RStatics provides static class methods that can be accessed through the SparkR bridge
+ *
+ */
 public class RStatics {
   private static SparkContext sc = null;
   private static SparkZeppelinContext z = null;
@@ -72,12 +75,10 @@ public class RStatics {
   public static RContext getRCon() {
     return rCon;
   }
-
   public static RContext setrCon(RContext newrCon) {
     rCon = newrCon;
     return rCon;
   }
-
   public static Boolean testRDD(String name) {
     Object x = z.get(name);
     return (x instanceof org.apache.spark.api.java.JavaRDD);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/dad1e8cd/testing/travis_settings.xml
----------------------------------------------------------------------
diff --git a/testing/travis_settings.xml b/testing/travis_settings.xml
deleted file mode 100644
index ba7606b..0000000
--- a/testing/travis_settings.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<!--
-  ~ 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.
-  -->
-
-<settings>
-  <profiles>
-    <profile>
-      <id>standard-with-extra-repos</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
-      <repositories>
-        <repository>
-          <id>central</id>
-          <name>Central Repository</name>
-          <url>http://repo.maven.apache.org/maven2</url>
-          <releases>
-            <enabled>true</enabled>
-          </releases>
-          <snapshots>
-            <enabled>false</enabled>
-          </snapshots>
-        </repository>
-        <repository>
-          <id>sonatype</id>
-          <name>OSS Sonatype repo (releases)</name>
-          <releases>
-            <enabled>true</enabled>
-            <updatePolicy>always</updatePolicy>
-            <checksumPolicy>warn</checksumPolicy>
-          </releases>
-          <snapshots>
-            <enabled>false</enabled>
-            <updatePolicy>never</updatePolicy>
-            <checksumPolicy>fail</checksumPolicy>
-          </snapshots>
-          <url>https://oss.sonatype.org/content/repositories/releases/</url>
-        </repository>
-        <repository>
-          <id>sonatype-apache</id>
-          <name>Apache repo (releases)</name>
-          <releases>
-            <enabled>true</enabled>
-            <updatePolicy>always</updatePolicy>
-            <checksumPolicy>warn</checksumPolicy>
-          </releases>
-          <snapshots>
-            <enabled>false</enabled>
-            <updatePolicy>never</updatePolicy>
-            <checksumPolicy>fail</checksumPolicy>
-          </snapshots>
-          <url>https://repository.apache.org/releases/</url>
-        </repository>
-        <repository>
-          <id>apache-snapshots</id>
-          <name>ASF repo (snapshots)</name>
-          <releases>
-            <enabled>false</enabled>
-            <updatePolicy>never</updatePolicy>
-            <checksumPolicy>warn</checksumPolicy>
-          </releases>
-          <snapshots>
-            <enabled>true</enabled>
-            <updatePolicy>always</updatePolicy>
-            <checksumPolicy>fail</checksumPolicy>
-          </snapshots>
-          <url>https://repository.apache.org/snapshots/</url>
-        </repository>
-      </repositories>
-    </profile>
-  </profiles>
-</settings>
\ No newline at end of file


[22/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterService.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterService.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterService.java
index d1c9d08..3dd8875 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterService.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterService.java
@@ -1,46 +1,52 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -50,40 +56,21 @@ public class RemoteInterpreterService {
 
   public interface Iface {
 
-    public void createInterpreter(
-        String intpGroupId,
-        String sessionId,
-        String className,
-        Map<String, String> properties,
-        String userName)
-        throws org.apache.thrift.TException;
+    public void createInterpreter(String intpGroupId, String sessionId, String className, Map<String,String> properties, String userName) throws org.apache.thrift.TException;
 
     public void open(String sessionId, String className) throws org.apache.thrift.TException;
 
     public void close(String sessionId, String className) throws org.apache.thrift.TException;
 
-    public RemoteInterpreterResult interpret(
-        String sessionId, String className, String st, RemoteInterpreterContext interpreterContext)
-        throws org.apache.thrift.TException;
+    public RemoteInterpreterResult interpret(String sessionId, String className, String st, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException;
 
-    public void cancel(
-        String sessionId, String className, RemoteInterpreterContext interpreterContext)
-        throws org.apache.thrift.TException;
+    public void cancel(String sessionId, String className, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException;
 
-    public int getProgress(
-        String sessionId, String className, RemoteInterpreterContext interpreterContext)
-        throws org.apache.thrift.TException;
+    public int getProgress(String sessionId, String className, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException;
 
-    public String getFormType(String sessionId, String className)
-        throws org.apache.thrift.TException;
+    public String getFormType(String sessionId, String className) throws org.apache.thrift.TException;
 
-    public List<InterpreterCompletion> completion(
-        String sessionId,
-        String className,
-        String buf,
-        int cursor,
-        RemoteInterpreterContext interpreterContext)
-        throws org.apache.thrift.TException;
+    public List<InterpreterCompletion> completion(String sessionId, String className, String buf, int cursor, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException;
 
     public void shutdown() throws org.apache.thrift.TException;
 
@@ -91,216 +78,102 @@ public class RemoteInterpreterService {
 
     public List<String> resourcePoolGetAll() throws org.apache.thrift.TException;
 
-    public ByteBuffer resourceGet(String sessionId, String paragraphId, String resourceName)
-        throws org.apache.thrift.TException;
+    public ByteBuffer resourceGet(String sessionId, String paragraphId, String resourceName) throws org.apache.thrift.TException;
 
-    public boolean resourceRemove(String sessionId, String paragraphId, String resourceName)
-        throws org.apache.thrift.TException;
+    public boolean resourceRemove(String sessionId, String paragraphId, String resourceName) throws org.apache.thrift.TException;
 
-    public ByteBuffer resourceInvokeMethod(
-        String sessionId, String paragraphId, String resourceName, String invokeMessage)
-        throws org.apache.thrift.TException;
+    public ByteBuffer resourceInvokeMethod(String sessionId, String paragraphId, String resourceName, String invokeMessage) throws org.apache.thrift.TException;
 
-    public void angularObjectUpdate(
-        String name, String sessionId, String paragraphId, String object)
-        throws org.apache.thrift.TException;
+    public void angularObjectUpdate(String name, String sessionId, String paragraphId, String object) throws org.apache.thrift.TException;
 
-    public void angularObjectAdd(String name, String sessionId, String paragraphId, String object)
-        throws org.apache.thrift.TException;
+    public void angularObjectAdd(String name, String sessionId, String paragraphId, String object) throws org.apache.thrift.TException;
 
-    public void angularObjectRemove(String name, String sessionId, String paragraphId)
-        throws org.apache.thrift.TException;
+    public void angularObjectRemove(String name, String sessionId, String paragraphId) throws org.apache.thrift.TException;
 
     public void angularRegistryPush(String registry) throws org.apache.thrift.TException;
 
-    public RemoteApplicationResult loadApplication(
-        String applicationInstanceId, String packageInfo, String sessionId, String paragraphId)
-        throws org.apache.thrift.TException;
+    public RemoteApplicationResult loadApplication(String applicationInstanceId, String packageInfo, String sessionId, String paragraphId) throws org.apache.thrift.TException;
 
-    public RemoteApplicationResult unloadApplication(String applicationInstanceId)
-        throws org.apache.thrift.TException;
+    public RemoteApplicationResult unloadApplication(String applicationInstanceId) throws org.apache.thrift.TException;
+
+    public RemoteApplicationResult runApplication(String applicationInstanceId) throws org.apache.thrift.TException;
 
-    public RemoteApplicationResult runApplication(String applicationInstanceId)
-        throws org.apache.thrift.TException;
   }
 
   public interface AsyncIface {
 
-    public void createInterpreter(
-        String intpGroupId,
-        String sessionId,
-        String className,
-        Map<String, String> properties,
-        String userName,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void open(
-        String sessionId,
-        String className,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void close(
-        String sessionId,
-        String className,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void interpret(
-        String sessionId,
-        String className,
-        String st,
-        RemoteInterpreterContext interpreterContext,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void cancel(
-        String sessionId,
-        String className,
-        RemoteInterpreterContext interpreterContext,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void getProgress(
-        String sessionId,
-        String className,
-        RemoteInterpreterContext interpreterContext,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void getFormType(
-        String sessionId,
-        String className,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void completion(
-        String sessionId,
-        String className,
-        String buf,
-        int cursor,
-        RemoteInterpreterContext interpreterContext,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void shutdown(org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void getStatus(
-        String sessionId, String jobId, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void resourcePoolGetAll(org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void resourceGet(
-        String sessionId,
-        String paragraphId,
-        String resourceName,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void resourceRemove(
-        String sessionId,
-        String paragraphId,
-        String resourceName,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void resourceInvokeMethod(
-        String sessionId,
-        String paragraphId,
-        String resourceName,
-        String invokeMessage,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void angularObjectUpdate(
-        String name,
-        String sessionId,
-        String paragraphId,
-        String object,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void angularObjectAdd(
-        String name,
-        String sessionId,
-        String paragraphId,
-        String object,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void angularObjectRemove(
-        String name,
-        String sessionId,
-        String paragraphId,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void angularRegistryPush(
-        String registry, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void loadApplication(
-        String applicationInstanceId,
-        String packageInfo,
-        String sessionId,
-        String paragraphId,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void unloadApplication(
-        String applicationInstanceId, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void runApplication(
-        String applicationInstanceId, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
+    public void createInterpreter(String intpGroupId, String sessionId, String className, Map<String,String> properties, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void open(String sessionId, String className, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void close(String sessionId, String className, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void interpret(String sessionId, String className, String st, RemoteInterpreterContext interpreterContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void cancel(String sessionId, String className, RemoteInterpreterContext interpreterContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getProgress(String sessionId, String className, RemoteInterpreterContext interpreterContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getFormType(String sessionId, String className, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void completion(String sessionId, String className, String buf, int cursor, RemoteInterpreterContext interpreterContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void shutdown(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getStatus(String sessionId, String jobId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void resourcePoolGetAll(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void resourceGet(String sessionId, String paragraphId, String resourceName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void resourceRemove(String sessionId, String paragraphId, String resourceName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void resourceInvokeMethod(String sessionId, String paragraphId, String resourceName, String invokeMessage, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void angularObjectUpdate(String name, String sessionId, String paragraphId, String object, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void angularObjectAdd(String name, String sessionId, String paragraphId, String object, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void angularObjectRemove(String name, String sessionId, String paragraphId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void angularRegistryPush(String registry, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void loadApplication(String applicationInstanceId, String packageInfo, String sessionId, String paragraphId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void unloadApplication(String applicationInstanceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void runApplication(String applicationInstanceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
   }
 
   public static class Client extends org.apache.thrift.TServiceClient implements Iface {
     public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
       public Factory() {}
-
       public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
         return new Client(prot);
       }
-
-      public Client getClient(
-          org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
         return new Client(iprot, oprot);
       }
     }
 
-    public Client(org.apache.thrift.protocol.TProtocol prot) {
+    public Client(org.apache.thrift.protocol.TProtocol prot)
+    {
       super(prot, prot);
     }
 
-    public Client(
-        org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
       super(iprot, oprot);
     }
 
-    public void createInterpreter(
-        String intpGroupId,
-        String sessionId,
-        String className,
-        Map<String, String> properties,
-        String userName)
-        throws org.apache.thrift.TException {
+    public void createInterpreter(String intpGroupId, String sessionId, String className, Map<String,String> properties, String userName) throws org.apache.thrift.TException
+    {
       send_createInterpreter(intpGroupId, sessionId, className, properties, userName);
       recv_createInterpreter();
     }
 
-    public void send_createInterpreter(
-        String intpGroupId,
-        String sessionId,
-        String className,
-        Map<String, String> properties,
-        String userName)
-        throws org.apache.thrift.TException {
+    public void send_createInterpreter(String intpGroupId, String sessionId, String className, Map<String,String> properties, String userName) throws org.apache.thrift.TException
+    {
       createInterpreter_args args = new createInterpreter_args();
       args.setIntpGroupId(intpGroupId);
       args.setSessionId(sessionId);
@@ -310,58 +183,63 @@ public class RemoteInterpreterService {
       sendBase("createInterpreter", args);
     }
 
-    public void recv_createInterpreter() throws org.apache.thrift.TException {
+    public void recv_createInterpreter() throws org.apache.thrift.TException
+    {
       createInterpreter_result result = new createInterpreter_result();
       receiveBase(result, "createInterpreter");
       return;
     }
 
-    public void open(String sessionId, String className) throws org.apache.thrift.TException {
+    public void open(String sessionId, String className) throws org.apache.thrift.TException
+    {
       send_open(sessionId, className);
       recv_open();
     }
 
-    public void send_open(String sessionId, String className) throws org.apache.thrift.TException {
+    public void send_open(String sessionId, String className) throws org.apache.thrift.TException
+    {
       open_args args = new open_args();
       args.setSessionId(sessionId);
       args.setClassName(className);
       sendBase("open", args);
     }
 
-    public void recv_open() throws org.apache.thrift.TException {
+    public void recv_open() throws org.apache.thrift.TException
+    {
       open_result result = new open_result();
       receiveBase(result, "open");
       return;
     }
 
-    public void close(String sessionId, String className) throws org.apache.thrift.TException {
+    public void close(String sessionId, String className) throws org.apache.thrift.TException
+    {
       send_close(sessionId, className);
       recv_close();
     }
 
-    public void send_close(String sessionId, String className) throws org.apache.thrift.TException {
+    public void send_close(String sessionId, String className) throws org.apache.thrift.TException
+    {
       close_args args = new close_args();
       args.setSessionId(sessionId);
       args.setClassName(className);
       sendBase("close", args);
     }
 
-    public void recv_close() throws org.apache.thrift.TException {
+    public void recv_close() throws org.apache.thrift.TException
+    {
       close_result result = new close_result();
       receiveBase(result, "close");
       return;
     }
 
-    public RemoteInterpreterResult interpret(
-        String sessionId, String className, String st, RemoteInterpreterContext interpreterContext)
-        throws org.apache.thrift.TException {
+    public RemoteInterpreterResult interpret(String sessionId, String className, String st, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException
+    {
       send_interpret(sessionId, className, st, interpreterContext);
       return recv_interpret();
     }
 
-    public void send_interpret(
-        String sessionId, String className, String st, RemoteInterpreterContext interpreterContext)
-        throws org.apache.thrift.TException {
+    public void send_interpret(String sessionId, String className, String st, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException
+    {
       interpret_args args = new interpret_args();
       args.setSessionId(sessionId);
       args.setClassName(className);
@@ -370,27 +248,24 @@ public class RemoteInterpreterService {
       sendBase("interpret", args);
     }
 
-    public RemoteInterpreterResult recv_interpret() throws org.apache.thrift.TException {
+    public RemoteInterpreterResult recv_interpret() throws org.apache.thrift.TException
+    {
       interpret_result result = new interpret_result();
       receiveBase(result, "interpret");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(
-          org.apache.thrift.TApplicationException.MISSING_RESULT,
-          "interpret failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "interpret failed: unknown result");
     }
 
-    public void cancel(
-        String sessionId, String className, RemoteInterpreterContext interpreterContext)
-        throws org.apache.thrift.TException {
+    public void cancel(String sessionId, String className, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException
+    {
       send_cancel(sessionId, className, interpreterContext);
       recv_cancel();
     }
 
-    public void send_cancel(
-        String sessionId, String className, RemoteInterpreterContext interpreterContext)
-        throws org.apache.thrift.TException {
+    public void send_cancel(String sessionId, String className, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException
+    {
       cancel_args args = new cancel_args();
       args.setSessionId(sessionId);
       args.setClassName(className);
@@ -398,22 +273,21 @@ public class RemoteInterpreterService {
       sendBase("cancel", args);
     }
 
-    public void recv_cancel() throws org.apache.thrift.TException {
+    public void recv_cancel() throws org.apache.thrift.TException
+    {
       cancel_result result = new cancel_result();
       receiveBase(result, "cancel");
       return;
     }
 
-    public int getProgress(
-        String sessionId, String className, RemoteInterpreterContext interpreterContext)
-        throws org.apache.thrift.TException {
+    public int getProgress(String sessionId, String className, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException
+    {
       send_getProgress(sessionId, className, interpreterContext);
       return recv_getProgress();
     }
 
-    public void send_getProgress(
-        String sessionId, String className, RemoteInterpreterContext interpreterContext)
-        throws org.apache.thrift.TException {
+    public void send_getProgress(String sessionId, String className, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException
+    {
       getProgress_args args = new getProgress_args();
       args.setSessionId(sessionId);
       args.setClassName(className);
@@ -421,60 +295,48 @@ public class RemoteInterpreterService {
       sendBase("getProgress", args);
     }
 
-    public int recv_getProgress() throws org.apache.thrift.TException {
+    public int recv_getProgress() throws org.apache.thrift.TException
+    {
       getProgress_result result = new getProgress_result();
       receiveBase(result, "getProgress");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(
-          org.apache.thrift.TApplicationException.MISSING_RESULT,
-          "getProgress failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getProgress failed: unknown result");
     }
 
-    public String getFormType(String sessionId, String className)
-        throws org.apache.thrift.TException {
+    public String getFormType(String sessionId, String className) throws org.apache.thrift.TException
+    {
       send_getFormType(sessionId, className);
       return recv_getFormType();
     }
 
-    public void send_getFormType(String sessionId, String className)
-        throws org.apache.thrift.TException {
+    public void send_getFormType(String sessionId, String className) throws org.apache.thrift.TException
+    {
       getFormType_args args = new getFormType_args();
       args.setSessionId(sessionId);
       args.setClassName(className);
       sendBase("getFormType", args);
     }
 
-    public String recv_getFormType() throws org.apache.thrift.TException {
+    public String recv_getFormType() throws org.apache.thrift.TException
+    {
       getFormType_result result = new getFormType_result();
       receiveBase(result, "getFormType");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(
-          org.apache.thrift.TApplicationException.MISSING_RESULT,
-          "getFormType failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFormType failed: unknown result");
     }
 
-    public List<InterpreterCompletion> completion(
-        String sessionId,
-        String className,
-        String buf,
-        int cursor,
-        RemoteInterpreterContext interpreterContext)
-        throws org.apache.thrift.TException {
+    public List<InterpreterCompletion> completion(String sessionId, String className, String buf, int cursor, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException
+    {
       send_completion(sessionId, className, buf, cursor, interpreterContext);
       return recv_completion();
     }
 
-    public void send_completion(
-        String sessionId,
-        String className,
-        String buf,
-        int cursor,
-        RemoteInterpreterContext interpreterContext)
-        throws org.apache.thrift.TException {
+    public void send_completion(String sessionId, String className, String buf, int cursor, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException
+    {
       completion_args args = new completion_args();
       args.setSessionId(sessionId);
       args.setClassName(className);
@@ -484,85 +346,89 @@ public class RemoteInterpreterService {
       sendBase("completion", args);
     }
 
-    public List<InterpreterCompletion> recv_completion() throws org.apache.thrift.TException {
+    public List<InterpreterCompletion> recv_completion() throws org.apache.thrift.TException
+    {
       completion_result result = new completion_result();
       receiveBase(result, "completion");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(
-          org.apache.thrift.TApplicationException.MISSING_RESULT,
-          "completion failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "completion failed: unknown result");
     }
 
-    public void shutdown() throws org.apache.thrift.TException {
+    public void shutdown() throws org.apache.thrift.TException
+    {
       send_shutdown();
       recv_shutdown();
     }
 
-    public void send_shutdown() throws org.apache.thrift.TException {
+    public void send_shutdown() throws org.apache.thrift.TException
+    {
       shutdown_args args = new shutdown_args();
       sendBase("shutdown", args);
     }
 
-    public void recv_shutdown() throws org.apache.thrift.TException {
+    public void recv_shutdown() throws org.apache.thrift.TException
+    {
       shutdown_result result = new shutdown_result();
       receiveBase(result, "shutdown");
       return;
     }
 
-    public String getStatus(String sessionId, String jobId) throws org.apache.thrift.TException {
+    public String getStatus(String sessionId, String jobId) throws org.apache.thrift.TException
+    {
       send_getStatus(sessionId, jobId);
       return recv_getStatus();
     }
 
-    public void send_getStatus(String sessionId, String jobId) throws org.apache.thrift.TException {
+    public void send_getStatus(String sessionId, String jobId) throws org.apache.thrift.TException
+    {
       getStatus_args args = new getStatus_args();
       args.setSessionId(sessionId);
       args.setJobId(jobId);
       sendBase("getStatus", args);
     }
 
-    public String recv_getStatus() throws org.apache.thrift.TException {
+    public String recv_getStatus() throws org.apache.thrift.TException
+    {
       getStatus_result result = new getStatus_result();
       receiveBase(result, "getStatus");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(
-          org.apache.thrift.TApplicationException.MISSING_RESULT,
-          "getStatus failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getStatus failed: unknown result");
     }
 
-    public List<String> resourcePoolGetAll() throws org.apache.thrift.TException {
+    public List<String> resourcePoolGetAll() throws org.apache.thrift.TException
+    {
       send_resourcePoolGetAll();
       return recv_resourcePoolGetAll();
     }
 
-    public void send_resourcePoolGetAll() throws org.apache.thrift.TException {
+    public void send_resourcePoolGetAll() throws org.apache.thrift.TException
+    {
       resourcePoolGetAll_args args = new resourcePoolGetAll_args();
       sendBase("resourcePoolGetAll", args);
     }
 
-    public List<String> recv_resourcePoolGetAll() throws org.apache.thrift.TException {
+    public List<String> recv_resourcePoolGetAll() throws org.apache.thrift.TException
+    {
       resourcePoolGetAll_result result = new resourcePoolGetAll_result();
       receiveBase(result, "resourcePoolGetAll");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(
-          org.apache.thrift.TApplicationException.MISSING_RESULT,
-          "resourcePoolGetAll failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "resourcePoolGetAll failed: unknown result");
     }
 
-    public ByteBuffer resourceGet(String sessionId, String paragraphId, String resourceName)
-        throws org.apache.thrift.TException {
+    public ByteBuffer resourceGet(String sessionId, String paragraphId, String resourceName) throws org.apache.thrift.TException
+    {
       send_resourceGet(sessionId, paragraphId, resourceName);
       return recv_resourceGet();
     }
 
-    public void send_resourceGet(String sessionId, String paragraphId, String resourceName)
-        throws org.apache.thrift.TException {
+    public void send_resourceGet(String sessionId, String paragraphId, String resourceName) throws org.apache.thrift.TException
+    {
       resourceGet_args args = new resourceGet_args();
       args.setSessionId(sessionId);
       args.setParagraphId(paragraphId);
@@ -570,25 +436,24 @@ public class RemoteInterpreterService {
       sendBase("resourceGet", args);
     }
 
-    public ByteBuffer recv_resourceGet() throws org.apache.thrift.TException {
+    public ByteBuffer recv_resourceGet() throws org.apache.thrift.TException
+    {
       resourceGet_result result = new resourceGet_result();
       receiveBase(result, "resourceGet");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(
-          org.apache.thrift.TApplicationException.MISSING_RESULT,
-          "resourceGet failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "resourceGet failed: unknown result");
     }
 
-    public boolean resourceRemove(String sessionId, String paragraphId, String resourceName)
-        throws org.apache.thrift.TException {
+    public boolean resourceRemove(String sessionId, String paragraphId, String resourceName) throws org.apache.thrift.TException
+    {
       send_resourceRemove(sessionId, paragraphId, resourceName);
       return recv_resourceRemove();
     }
 
-    public void send_resourceRemove(String sessionId, String paragraphId, String resourceName)
-        throws org.apache.thrift.TException {
+    public void send_resourceRemove(String sessionId, String paragraphId, String resourceName) throws org.apache.thrift.TException
+    {
       resourceRemove_args args = new resourceRemove_args();
       args.setSessionId(sessionId);
       args.setParagraphId(paragraphId);
@@ -596,27 +461,24 @@ public class RemoteInterpreterService {
       sendBase("resourceRemove", args);
     }
 
-    public boolean recv_resourceRemove() throws org.apache.thrift.TException {
+    public boolean recv_resourceRemove() throws org.apache.thrift.TException
+    {
       resourceRemove_result result = new resourceRemove_result();
       receiveBase(result, "resourceRemove");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(
-          org.apache.thrift.TApplicationException.MISSING_RESULT,
-          "resourceRemove failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "resourceRemove failed: unknown result");
     }
 
-    public ByteBuffer resourceInvokeMethod(
-        String sessionId, String paragraphId, String resourceName, String invokeMessage)
-        throws org.apache.thrift.TException {
+    public ByteBuffer resourceInvokeMethod(String sessionId, String paragraphId, String resourceName, String invokeMessage) throws org.apache.thrift.TException
+    {
       send_resourceInvokeMethod(sessionId, paragraphId, resourceName, invokeMessage);
       return recv_resourceInvokeMethod();
     }
 
-    public void send_resourceInvokeMethod(
-        String sessionId, String paragraphId, String resourceName, String invokeMessage)
-        throws org.apache.thrift.TException {
+    public void send_resourceInvokeMethod(String sessionId, String paragraphId, String resourceName, String invokeMessage) throws org.apache.thrift.TException
+    {
       resourceInvokeMethod_args args = new resourceInvokeMethod_args();
       args.setSessionId(sessionId);
       args.setParagraphId(paragraphId);
@@ -625,27 +487,24 @@ public class RemoteInterpreterService {
       sendBase("resourceInvokeMethod", args);
     }
 
-    public ByteBuffer recv_resourceInvokeMethod() throws org.apache.thrift.TException {
+    public ByteBuffer recv_resourceInvokeMethod() throws org.apache.thrift.TException
+    {
       resourceInvokeMethod_result result = new resourceInvokeMethod_result();
       receiveBase(result, "resourceInvokeMethod");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(
-          org.apache.thrift.TApplicationException.MISSING_RESULT,
-          "resourceInvokeMethod failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "resourceInvokeMethod failed: unknown result");
     }
 
-    public void angularObjectUpdate(
-        String name, String sessionId, String paragraphId, String object)
-        throws org.apache.thrift.TException {
+    public void angularObjectUpdate(String name, String sessionId, String paragraphId, String object) throws org.apache.thrift.TException
+    {
       send_angularObjectUpdate(name, sessionId, paragraphId, object);
       recv_angularObjectUpdate();
     }
 
-    public void send_angularObjectUpdate(
-        String name, String sessionId, String paragraphId, String object)
-        throws org.apache.thrift.TException {
+    public void send_angularObjectUpdate(String name, String sessionId, String paragraphId, String object) throws org.apache.thrift.TException
+    {
       angularObjectUpdate_args args = new angularObjectUpdate_args();
       args.setName(name);
       args.setSessionId(sessionId);
@@ -654,21 +513,21 @@ public class RemoteInterpreterService {
       sendBase("angularObjectUpdate", args);
     }
 
-    public void recv_angularObjectUpdate() throws org.apache.thrift.TException {
+    public void recv_angularObjectUpdate() throws org.apache.thrift.TException
+    {
       angularObjectUpdate_result result = new angularObjectUpdate_result();
       receiveBase(result, "angularObjectUpdate");
       return;
     }
 
-    public void angularObjectAdd(String name, String sessionId, String paragraphId, String object)
-        throws org.apache.thrift.TException {
+    public void angularObjectAdd(String name, String sessionId, String paragraphId, String object) throws org.apache.thrift.TException
+    {
       send_angularObjectAdd(name, sessionId, paragraphId, object);
       recv_angularObjectAdd();
     }
 
-    public void send_angularObjectAdd(
-        String name, String sessionId, String paragraphId, String object)
-        throws org.apache.thrift.TException {
+    public void send_angularObjectAdd(String name, String sessionId, String paragraphId, String object) throws org.apache.thrift.TException
+    {
       angularObjectAdd_args args = new angularObjectAdd_args();
       args.setName(name);
       args.setSessionId(sessionId);
@@ -677,20 +536,21 @@ public class RemoteInterpreterService {
       sendBase("angularObjectAdd", args);
     }
 
-    public void recv_angularObjectAdd() throws org.apache.thrift.TException {
+    public void recv_angularObjectAdd() throws org.apache.thrift.TException
+    {
       angularObjectAdd_result result = new angularObjectAdd_result();
       receiveBase(result, "angularObjectAdd");
       return;
     }
 
-    public void angularObjectRemove(String name, String sessionId, String paragraphId)
-        throws org.apache.thrift.TException {
+    public void angularObjectRemove(String name, String sessionId, String paragraphId) throws org.apache.thrift.TException
+    {
       send_angularObjectRemove(name, sessionId, paragraphId);
       recv_angularObjectRemove();
     }
 
-    public void send_angularObjectRemove(String name, String sessionId, String paragraphId)
-        throws org.apache.thrift.TException {
+    public void send_angularObjectRemove(String name, String sessionId, String paragraphId) throws org.apache.thrift.TException
+    {
       angularObjectRemove_args args = new angularObjectRemove_args();
       args.setName(name);
       args.setSessionId(sessionId);
@@ -698,39 +558,41 @@ public class RemoteInterpreterService {
       sendBase("angularObjectRemove", args);
     }
 
-    public void recv_angularObjectRemove() throws org.apache.thrift.TException {
+    public void recv_angularObjectRemove() throws org.apache.thrift.TException
+    {
       angularObjectRemove_result result = new angularObjectRemove_result();
       receiveBase(result, "angularObjectRemove");
       return;
     }
 
-    public void angularRegistryPush(String registry) throws org.apache.thrift.TException {
+    public void angularRegistryPush(String registry) throws org.apache.thrift.TException
+    {
       send_angularRegistryPush(registry);
       recv_angularRegistryPush();
     }
 
-    public void send_angularRegistryPush(String registry) throws org.apache.thrift.TException {
+    public void send_angularRegistryPush(String registry) throws org.apache.thrift.TException
+    {
       angularRegistryPush_args args = new angularRegistryPush_args();
       args.setRegistry(registry);
       sendBase("angularRegistryPush", args);
     }
 
-    public void recv_angularRegistryPush() throws org.apache.thrift.TException {
+    public void recv_angularRegistryPush() throws org.apache.thrift.TException
+    {
       angularRegistryPush_result result = new angularRegistryPush_result();
       receiveBase(result, "angularRegistryPush");
       return;
     }
 
-    public RemoteApplicationResult loadApplication(
-        String applicationInstanceId, String packageInfo, String sessionId, String paragraphId)
-        throws org.apache.thrift.TException {
+    public RemoteApplicationResult loadApplication(String applicationInstanceId, String packageInfo, String sessionId, String paragraphId) throws org.apache.thrift.TException
+    {
       send_loadApplication(applicationInstanceId, packageInfo, sessionId, paragraphId);
       return recv_loadApplication();
     }
 
-    public void send_loadApplication(
-        String applicationInstanceId, String packageInfo, String sessionId, String paragraphId)
-        throws org.apache.thrift.TException {
+    public void send_loadApplication(String applicationInstanceId, String packageInfo, String sessionId, String paragraphId) throws org.apache.thrift.TException
+    {
       loadApplication_args args = new loadApplication_args();
       args.setApplicationInstanceId(applicationInstanceId);
       args.setPackageInfo(packageInfo);
@@ -739,113 +601,83 @@ public class RemoteInterpreterService {
       sendBase("loadApplication", args);
     }
 
-    public RemoteApplicationResult recv_loadApplication() throws org.apache.thrift.TException {
+    public RemoteApplicationResult recv_loadApplication() throws org.apache.thrift.TException
+    {
       loadApplication_result result = new loadApplication_result();
       receiveBase(result, "loadApplication");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(
-          org.apache.thrift.TApplicationException.MISSING_RESULT,
-          "loadApplication failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "loadApplication failed: unknown result");
     }
 
-    public RemoteApplicationResult unloadApplication(String applicationInstanceId)
-        throws org.apache.thrift.TException {
+    public RemoteApplicationResult unloadApplication(String applicationInstanceId) throws org.apache.thrift.TException
+    {
       send_unloadApplication(applicationInstanceId);
       return recv_unloadApplication();
     }
 
-    public void send_unloadApplication(String applicationInstanceId)
-        throws org.apache.thrift.TException {
+    public void send_unloadApplication(String applicationInstanceId) throws org.apache.thrift.TException
+    {
       unloadApplication_args args = new unloadApplication_args();
       args.setApplicationInstanceId(applicationInstanceId);
       sendBase("unloadApplication", args);
     }
 
-    public RemoteApplicationResult recv_unloadApplication() throws org.apache.thrift.TException {
+    public RemoteApplicationResult recv_unloadApplication() throws org.apache.thrift.TException
+    {
       unloadApplication_result result = new unloadApplication_result();
       receiveBase(result, "unloadApplication");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(
-          org.apache.thrift.TApplicationException.MISSING_RESULT,
-          "unloadApplication failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "unloadApplication failed: unknown result");
     }
 
-    public RemoteApplicationResult runApplication(String applicationInstanceId)
-        throws org.apache.thrift.TException {
+    public RemoteApplicationResult runApplication(String applicationInstanceId) throws org.apache.thrift.TException
+    {
       send_runApplication(applicationInstanceId);
       return recv_runApplication();
     }
 
-    public void send_runApplication(String applicationInstanceId)
-        throws org.apache.thrift.TException {
+    public void send_runApplication(String applicationInstanceId) throws org.apache.thrift.TException
+    {
       runApplication_args args = new runApplication_args();
       args.setApplicationInstanceId(applicationInstanceId);
       sendBase("runApplication", args);
     }
 
-    public RemoteApplicationResult recv_runApplication() throws org.apache.thrift.TException {
+    public RemoteApplicationResult recv_runApplication() throws org.apache.thrift.TException
+    {
       runApplication_result result = new runApplication_result();
       receiveBase(result, "runApplication");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(
-          org.apache.thrift.TApplicationException.MISSING_RESULT,
-          "runApplication failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "runApplication failed: unknown result");
     }
-  }
 
-  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient
-      implements AsyncIface {
-    public static class Factory
-        implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
+  }
+  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
+    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
       private org.apache.thrift.async.TAsyncClientManager clientManager;
       private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
-
-      public Factory(
-          org.apache.thrift.async.TAsyncClientManager clientManager,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
         this.clientManager = clientManager;
         this.protocolFactory = protocolFactory;
       }
-
-      public AsyncClient getAsyncClient(
-          org.apache.thrift.transport.TNonblockingTransport transport) {
+      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
         return new AsyncClient(protocolFactory, clientManager, transport);
       }
     }
 
-    public AsyncClient(
-        org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-        org.apache.thrift.async.TAsyncClientManager clientManager,
-        org.apache.thrift.transport.TNonblockingTransport transport) {
+    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
       super(protocolFactory, clientManager, transport);
     }
 
-    public void createInterpreter(
-        String intpGroupId,
-        String sessionId,
-        String className,
-        Map<String, String> properties,
-        String userName,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void createInterpreter(String intpGroupId, String sessionId, String className, Map<String,String> properties, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      createInterpreter_call method_call =
-          new createInterpreter_call(
-              intpGroupId,
-              sessionId,
-              className,
-              properties,
-              userName,
-              resultHandler,
-              this,
-              ___protocolFactory,
-              ___transport);
+      createInterpreter_call method_call = new createInterpreter_call(intpGroupId, sessionId, className, properties, userName, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -854,20 +686,9 @@ public class RemoteInterpreterService {
       private String intpGroupId;
       private String sessionId;
       private String className;
-      private Map<String, String> properties;
+      private Map<String,String> properties;
       private String userName;
-
-      public createInterpreter_call(
-          String intpGroupId,
-          String sessionId,
-          String className,
-          Map<String, String> properties,
-          String userName,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public createInterpreter_call(String intpGroupId, String sessionId, String className, Map<String,String> properties, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.intpGroupId = intpGroupId;
         this.sessionId = sessionId;
@@ -876,11 +697,8 @@ public class RemoteInterpreterService {
         this.userName = userName;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "createInterpreter", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInterpreter", org.apache.thrift.protocol.TMessageType.CALL, 0));
         createInterpreter_args args = new createInterpreter_args();
         args.setIntpGroupId(intpGroupId);
         args.setSessionId(sessionId);
@@ -895,23 +713,15 @@ public class RemoteInterpreterService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_createInterpreter();
       }
     }
 
-    public void open(
-        String sessionId,
-        String className,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void open(String sessionId, String className, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      open_call method_call =
-          new open_call(
-              sessionId, className, resultHandler, this, ___protocolFactory, ___transport);
+      open_call method_call = new open_call(sessionId, className, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -919,25 +729,14 @@ public class RemoteInterpreterService {
     public static class open_call extends org.apache.thrift.async.TAsyncMethodCall {
       private String sessionId;
       private String className;
-
-      public open_call(
-          String sessionId,
-          String className,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public open_call(String sessionId, String className, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.sessionId = sessionId;
         this.className = className;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "open", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("open", org.apache.thrift.protocol.TMessageType.CALL, 0));
         open_args args = new open_args();
         args.setSessionId(sessionId);
         args.setClassName(className);
@@ -949,23 +748,15 @@ public class RemoteInterpreterService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_open();
       }
     }
 
-    public void close(
-        String sessionId,
-        String className,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void close(String sessionId, String className, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      close_call method_call =
-          new close_call(
-              sessionId, className, resultHandler, this, ___protocolFactory, ___transport);
+      close_call method_call = new close_call(sessionId, className, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -973,25 +764,14 @@ public class RemoteInterpreterService {
     public static class close_call extends org.apache.thrift.async.TAsyncMethodCall {
       private String sessionId;
       private String className;
-
-      public close_call(
-          String sessionId,
-          String className,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public close_call(String sessionId, String className, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.sessionId = sessionId;
         this.className = className;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "close", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("close", org.apache.thrift.protocol.TMessageType.CALL, 0));
         close_args args = new close_args();
         args.setSessionId(sessionId);
         args.setClassName(className);
@@ -1003,32 +783,15 @@ public class RemoteInterpreterService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_close();
       }
     }
 
-    public void interpret(
-        String sessionId,
-        String className,
-        String st,
-        RemoteInterpreterContext interpreterContext,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void interpret(String sessionId, String className, String st, RemoteInterpreterContext interpreterContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      interpret_call method_call =
-          new interpret_call(
-              sessionId,
-              className,
-              st,
-              interpreterContext,
-              resultHandler,
-              this,
-              ___protocolFactory,
-              ___transport);
+      interpret_call method_call = new interpret_call(sessionId, className, st, interpreterContext, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -1038,17 +801,7 @@ public class RemoteInterpreterService {
       private String className;
       private String st;
       private RemoteInterpreterContext interpreterContext;
-
-      public interpret_call(
-          String sessionId,
-          String className,
-          String st,
-          RemoteInterpreterContext interpreterContext,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public interpret_call(String sessionId, String className, String st, RemoteInterpreterContext interpreterContext, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.sessionId = sessionId;
         this.className = className;
@@ -1056,11 +809,8 @@ public class RemoteInterpreterService {
         this.interpreterContext = interpreterContext;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "interpret", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("interpret", org.apache.thrift.protocol.TMessageType.CALL, 0));
         interpret_args args = new interpret_args();
         args.setSessionId(sessionId);
         args.setClassName(className);
@@ -1074,30 +824,15 @@ public class RemoteInterpreterService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         return (new Client(prot)).recv_interpret();
       }
     }
 
-    public void cancel(
-        String sessionId,
-        String className,
-        RemoteInterpreterContext interpreterContext,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void cancel(String sessionId, String className, RemoteInterpreterContext interpreterContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      cancel_call method_call =
-          new cancel_call(
-              sessionId,
-              className,
-              interpreterContext,
-              resultHandler,
-              this,
-              ___protocolFactory,
-              ___transport);
+      cancel_call method_call = new cancel_call(sessionId, className, interpreterContext, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -1106,27 +841,15 @@ public class RemoteInterpreterService {
       private String sessionId;
       private String className;
       private RemoteInterpreterContext interpreterContext;
-
-      public cancel_call(
-          String sessionId,
-          String className,
-          RemoteInterpreterContext interpreterContext,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public cancel_call(String sessionId, String className, RemoteInterpreterContext interpreterContext, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.sessionId = sessionId;
         this.className = className;
         this.interpreterContext = interpreterContext;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "cancel", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancel", org.apache.thrift.protocol.TMessageType.CALL, 0));
         cancel_args args = new cancel_args();
         args.setSessionId(sessionId);
         args.setClassName(className);
@@ -1139,30 +862,15 @@ public class RemoteInterpreterService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_cancel();
       }
     }
 
-    public void getProgress(
-        String sessionId,
-        String className,
-        RemoteInterpreterContext interpreterContext,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void getProgress(String sessionId, String className, RemoteInterpreterContext interpreterContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getProgress_call method_call =
-          new getProgress_call(
-              sessionId,
-              className,
-              interpreterContext,
-              resultHandler,
-              this,
-              ___protocolFactory,
-              ___transport);
+      getProgress_call method_call = new getProgress_call(sessionId, className, interpreterContext, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -1171,27 +879,15 @@ public class RemoteInterpreterService {
       private String sessionId;
       private String className;
       private RemoteInterpreterContext interpreterContext;
-
-      public getProgress_call(
-          String sessionId,
-          String className,
-          RemoteInterpreterContext interpreterContext,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public getProgress_call(String sessionId, String className, RemoteInterpreterContext interpreterContext, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.sessionId = sessionId;
         this.className = className;
         this.interpreterContext = interpreterContext;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "getProgress", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getProgress", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getProgress_args args = new getProgress_args();
         args.setSessionId(sessionId);
         args.setClassName(className);
@@ -1204,23 +900,15 @@ public class RemoteInterpreterService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         return (new Client(prot)).recv_getProgress();
       }
     }
 
-    public void getFormType(
-        String sessionId,
-        String className,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void getFormType(String sessionId, String className, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getFormType_call method_call =
-          new getFormType_call(
-              sessionId, className, resultHandler, this, ___protocolFactory, ___transport);
+      getFormType_call method_call = new getFormType_call(sessionId, className, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -1228,25 +916,14 @@ public class RemoteInterpreterService {
     public static class getFormType_call extends org.apache.thrift.async.TAsyncMethodCall {
       private String sessionId;
       private String className;
-
-      public getFormType_call(
-          String sessionId,
-          String className,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public getFormType_call(String sessionId, String className, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.sessionId = sessionId;
         this.className = className;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "getFormType", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFormType", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getFormType_args args = new getFormType_args();
         args.setSessionId(sessionId);
         args.setClassName(className);
@@ -1258,34 +935,15 @@ public class RemoteInterpreterService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         return (new Client(prot)).recv_getFormType();
       }
     }
 
-    public void completion(
-        String sessionId,
-        String className,
-        String buf,
-        int cursor,
-        RemoteInterpreterContext interpreterContext,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void completion(String sessionId, String className, String buf, int cursor, RemoteInterpreterContext interpreterContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      completion_call method_call =
-          new completion_call(
-              sessionId,
-              className,
-              buf,
-              cursor,
-              interpreterContext,
-              resultHandler,
-              this,
-              ___protocolFactory,
-              ___transport);
+      completion_call method_call = new completion_call(sessionId, className, buf, cursor, interpreterContext, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -1296,18 +954,7 @@ public class RemoteInterpreterService {
       private String buf;
       private int cursor;
       private RemoteInterpreterContext interpreterContext;
-
-      public completion_call(
-          String sessionId,
-          String className,
-          String buf,
-          int cursor,
-          RemoteInterpreterContext interpreterContext,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public completion_call(String sessionId, String className, String buf, int cursor, RemoteInterpreterContext interpreterContext, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.sessionId = sessionId;
         this.className = className;
@@ -1316,11 +963,8 @@ public class RemoteInterpreterService {
         this.interpreterContext = interpreterContext;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "completion", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("completion", org.apache.thrift.protocol.TMessageType.CALL, 0));
         completion_args args = new completion_args();
         args.setSessionId(sessionId);
         args.setClassName(className);
@@ -1335,38 +979,26 @@ public class RemoteInterpreterService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         return (new Client(prot)).recv_completion();
       }
     }
 
-    public void shutdown(org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void shutdown(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      shutdown_call method_call =
-          new shutdown_call(resultHandler, this, ___protocolFactory, ___transport);
+      shutdown_call method_call = new shutdown_call(resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class shutdown_call extends org.apache.thrift.async.TAsyncMethodCall {
-      public shutdown_call(
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public shutdown_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "shutdown", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("shutdown", org.apache.thrift.protocol.TMessageType.CALL, 0));
         shutdown_args args = new shutdown_args();
         args.write(prot);
         prot.writeMessageEnd();
@@ -1376,21 +1008,15 @@ public class RemoteInterpreterService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_shutdown();
       }
     }
 
-    public void getStatus(
-        String sessionId, String jobId, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void getStatus(String sessionId, String jobId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getStatus_call method_call =
-          new getStatus_call(
-              sessionId, jobId, resultHandler, this, ___protocolFactory, ___transport);
+      getStatus_call method_call = new getStatus_call(sessionId, jobId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -1398,25 +1024,14 @@ public class RemoteInterpreterService {
     public static class getStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
       private String sessionId;
       private String jobId;
-
-      public getStatus_call(
-          String sessionId,
-          String jobId,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public getStatus_call(String sessionId, String jobId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.sessionId = sessionId;
         this.jobId = jobId;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "getStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getStatus_args args = new getStatus_args();
         args.setSessionId(sessionId);
         args.setJobId(jobId);
@@ -1428,38 +1043,26 @@ public class RemoteInterpreterService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         return (new Client(prot)).recv_getStatus();
       }
     }
 
-    public void resourcePoolGetAll(org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void resourcePoolGetAll(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      resourcePoolGetAll_call method_call =
-          new resourcePoolGetAll_call(resultHandler, this, ___protocolFactory, ___transport);
+      resourcePoolGetAll_call method_call = new resourcePoolGetAll_call(resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class resourcePoolGetAll_call extends org.apache.thrift.async.TAsyncMethodCall {
-      public resourcePoolGetAll_call(
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public resourcePoolGetAll_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "resourcePoolGetAll", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("resourcePoolGetAll", org.apache.thrift.protocol.TMessageType.CALL, 0));
         resourcePoolGetAll_args args = new resourcePoolGetAll_args();
         args.write(prot);
         prot.writeMessageEnd();
@@ -1469,30 +1072,15 @@ public class RemoteInterpreterService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         return (new Client(prot)).recv_resourcePoolGetAll();
       }
     }
 
-    public void resourceGet(
-        String sessionId,
-        String paragraphId,
-        String resourceName,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void resourceGet(String sessionId, String paragraphId, String resourceName, org.apache.thrift.asy

<TRUNCATED>

[07/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepo.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepo.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepo.java
index 92e7b9e..02e5114 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepo.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepo.java
@@ -20,63 +20,62 @@ package org.apache.zeppelin.notebook.repo;
 import java.io.IOException;
 import java.util.List;
 import java.util.Map;
+
+import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.annotation.ZeppelinApi;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.notebook.Note;
 import org.apache.zeppelin.notebook.NoteInfo;
 import org.apache.zeppelin.user.AuthenticationInfo;
 
-/** Notebook repository (persistence layer) abstraction */
+/**
+ * Notebook repository (persistence layer) abstraction
+ */
 public interface NotebookRepo {
 
   void init(ZeppelinConfiguration zConf) throws IOException;
 
   /**
    * Lists notebook information about all notebooks in storage.
-   *
    * @param subject contains user information.
    * @return
    * @throws IOException
    */
-  @ZeppelinApi
-  public List<NoteInfo> list(AuthenticationInfo subject) throws IOException;
+  @ZeppelinApi public List<NoteInfo> list(AuthenticationInfo subject) throws IOException;
 
   /**
    * Get the notebook with the given id.
-   *
    * @param noteId is note id.
    * @param subject contains user information.
    * @return
    * @throws IOException
    */
-  @ZeppelinApi
-  public Note get(String noteId, AuthenticationInfo subject) throws IOException;
+  @ZeppelinApi public Note get(String noteId, AuthenticationInfo subject) throws IOException;
 
   /**
    * Save given note in storage
-   *
    * @param note is the note itself.
    * @param subject contains user information.
    * @throws IOException
    */
-  @ZeppelinApi
-  public void save(Note note, AuthenticationInfo subject) throws IOException;
+  @ZeppelinApi public void save(Note note, AuthenticationInfo subject) throws IOException;
 
   /**
    * Remove note with given id.
-   *
    * @param noteId is the note id.
    * @param subject contains user information.
    * @throws IOException
    */
-  @ZeppelinApi
-  public void remove(String noteId, AuthenticationInfo subject) throws IOException;
+  @ZeppelinApi public void remove(String noteId, AuthenticationInfo subject) throws IOException;
 
-  /** Release any underlying resources */
-  @ZeppelinApi
-  public void close();
+  /**
+   * Release any underlying resources
+   */
+  @ZeppelinApi public void close();
 
-  /** Versioning API (optional, preferred to have). */
+  /**
+   * Versioning API (optional, preferred to have).
+   */
 
   /**
    * Get NotebookRepo settings got the given user.
@@ -84,8 +83,7 @@ public interface NotebookRepo {
    * @param subject
    * @return
    */
-  @ZeppelinApi
-  public List<NotebookRepoSettingsInfo> getSettings(AuthenticationInfo subject);
+  @ZeppelinApi public List<NotebookRepoSettingsInfo> getSettings(AuthenticationInfo subject);
 
   /**
    * update notebook repo settings.
@@ -93,6 +91,6 @@ public interface NotebookRepo {
    * @param settings
    * @param subject
    */
-  @ZeppelinApi
-  public void updateSettings(Map<String, String> settings, AuthenticationInfo subject);
+  @ZeppelinApi public void updateSettings(Map<String, String> settings, AuthenticationInfo subject);
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSettingsInfo.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSettingsInfo.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSettingsInfo.java
index 4bbf37f..0525502 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSettingsInfo.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSettingsInfo.java
@@ -22,13 +22,15 @@ import java.util.Map;
 /**
  * Notebook repo settings. This represent a structure of a notebook repo settings that will mostly
  * used in the frontend.
+ *
  */
 public class NotebookRepoSettingsInfo {
 
-  /** Type of value, It can be text or list. */
+  /**
+   * Type of value, It can be text or list.
+   */
   public enum Type {
-    INPUT,
-    DROPDOWN
+    INPUT, DROPDOWN
   }
 
   public static NotebookRepoSettingsInfo newInstance() {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java
index e2c4657..38665ff 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java
@@ -18,8 +18,6 @@
 package org.apache.zeppelin.notebook.repo;
 
 import com.google.common.collect.Lists;
-import java.io.IOException;
-import java.util.*;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars;
 import org.apache.zeppelin.notebook.Note;
@@ -31,7 +29,14 @@ import org.apache.zeppelin.user.AuthenticationInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Notebook repository sync with remote storage */
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.*;
+
+/**
+ * Notebook repository sync with remote storage
+ */
 public class NotebookRepoSync implements NotebookRepoWithVersionControl {
   private static final Logger LOG = LoggerFactory.getLogger(NotebookRepoSync.class);
   private static final int maxRepoNum = 2;
@@ -45,7 +50,9 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
   private List<NotebookRepo> repos = new ArrayList<>();
   private boolean oneWaySync;
 
-  /** @param conf */
+  /**
+   * @param conf
+   */
   @SuppressWarnings("static-access")
   public NotebookRepoSync(ZeppelinConfiguration conf) throws IOException {
     init(conf);
@@ -61,12 +68,8 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
     }
     String[] storageClassNames = allStorageClassNames.split(",");
     if (storageClassNames.length > getMaxRepoNum()) {
-      LOG.warn(
-          "Unsupported number {} of storage classes in ZEPPELIN_NOTEBOOK_STORAGE : {}\n"
-              + "first {} will be used",
-          storageClassNames.length,
-          allStorageClassNames,
-          getMaxRepoNum());
+      LOG.warn("Unsupported number {} of storage classes in ZEPPELIN_NOTEBOOK_STORAGE : {}\n" +
+          "first {} will be used", storageClassNames.length, allStorageClassNames, getMaxRepoNum());
     }
 
     for (int i = 0; i < Math.min(storageClassNames.length, getMaxRepoNum()); i++) {
@@ -98,35 +101,37 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
 
     NotebookRepoWithSettings repoWithSettings;
     for (NotebookRepo repo : repos) {
-      repoWithSettings =
-          NotebookRepoWithSettings.builder(repo.getClass().getSimpleName())
-              .className(repo.getClass().getName())
-              .settings(repo.getSettings(subject))
-              .build();
+      repoWithSettings = NotebookRepoWithSettings
+                           .builder(repo.getClass().getSimpleName())
+                           .className(repo.getClass().getName())
+                           .settings(repo.getSettings(subject))
+                           .build();
       reposSetting.add(repoWithSettings);
     }
 
     return reposSetting;
   }
 
-  public NotebookRepoWithSettings updateNotebookRepo(
-      String name, Map<String, String> settings, AuthenticationInfo subject) {
+  public NotebookRepoWithSettings updateNotebookRepo(String name, Map<String, String> settings,
+                                                     AuthenticationInfo subject) {
     NotebookRepoWithSettings updatedSettings = NotebookRepoWithSettings.EMPTY;
     for (NotebookRepo repo : repos) {
       if (repo.getClass().getName().equals(name)) {
         repo.updateSettings(settings, subject);
-        updatedSettings =
-            NotebookRepoWithSettings.builder(repo.getClass().getSimpleName())
-                .className(repo.getClass().getName())
-                .settings(repo.getSettings(subject))
-                .build();
+        updatedSettings = NotebookRepoWithSettings
+                            .builder(repo.getClass().getSimpleName())
+                            .className(repo.getClass().getName())
+                            .settings(repo.getSettings(subject))
+                            .build();
         break;
       }
     }
     return updatedSettings;
   }
 
-  /** Lists Notebooks from the first repository */
+  /**
+   *  Lists Notebooks from the first repository
+   */
   @Override
   public List<NoteInfo> list(AuthenticationInfo subject) throws IOException {
     return getRepo(0).list(subject);
@@ -137,7 +142,9 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
     return getRepo(repoIndex).list(subject);
   }
 
-  /** Returns from Notebook from the first repository */
+  /**
+   *  Returns from Notebook from the first repository
+   */
   @Override
   public Note get(String noteId, AuthenticationInfo subject) throws IOException {
     return getRepo(0).get(noteId, subject);
@@ -148,14 +155,17 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
     return getRepo(repoIndex).get(noteId, subject);
   }
 
-  /** Saves to all repositories */
+  /**
+   *  Saves to all repositories
+   */
   @Override
   public void save(Note note, AuthenticationInfo subject) throws IOException {
     getRepo(0).save(note, subject);
     if (getRepoCount() > 1) {
       try {
         getRepo(1).save(note, subject);
-      } catch (IOException e) {
+      }
+      catch (IOException e) {
         LOG.info(e.getMessage() + ": Failed to write to secondary storage");
       }
     }
@@ -188,12 +198,12 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
     NotebookAuthorization auth = NotebookAuthorization.getInstance();
     NotebookRepo srcRepo = getRepo(sourceRepoIndex);
     NotebookRepo dstRepo = getRepo(destRepoIndex);
-    List<NoteInfo> allSrcNotes = srcRepo.list(subject);
-    List<NoteInfo> srcNotes = auth.filterByUser(allSrcNotes, subject);
-    List<NoteInfo> dstNotes = dstRepo.list(subject);
+    List <NoteInfo> allSrcNotes = srcRepo.list(subject);
+    List <NoteInfo> srcNotes = auth.filterByUser(allSrcNotes, subject);
+    List <NoteInfo> dstNotes = dstRepo.list(subject);
 
-    Map<String, List<String>> noteIds =
-        notesCheckDiff(srcNotes, srcRepo, dstNotes, dstRepo, subject);
+    Map<String, List<String>> noteIds = notesCheckDiff(srcNotes, srcRepo, dstNotes, dstRepo,
+        subject);
     List<String> pushNoteIds = noteIds.get(pushKey);
     List<String> pullNoteIds = noteIds.get(pullKey);
     List<String> delDstNoteIds = noteIds.get(delDstKey);
@@ -235,12 +245,8 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
     sync(0, 1, subject);
   }
 
-  private void pushNotes(
-      AuthenticationInfo subject,
-      List<String> ids,
-      NotebookRepo localRepo,
-      NotebookRepo remoteRepo,
-      boolean setPermissions) {
+  private void pushNotes(AuthenticationInfo subject, List<String> ids, NotebookRepo localRepo,
+      NotebookRepo remoteRepo, boolean setPermissions) {
     for (String id : ids) {
       try {
         remoteRepo.save(localRepo.get(id, subject), subject);
@@ -257,7 +263,7 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
     NotebookAuthorization notebookAuthorization = NotebookAuthorization.getInstance();
     return notebookAuthorization.getOwners(noteId).isEmpty()
         && notebookAuthorization.getReaders(noteId).isEmpty()
-        && notebookAuthorization.getRunners(noteId).isEmpty()
+            && notebookAuthorization.getRunners(noteId).isEmpty()
         && notebookAuthorization.getWriters(noteId).isEmpty();
   }
 
@@ -298,25 +304,18 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
 
   public NotebookRepo getRepo(int repoIndex) throws IOException {
     if (repoIndex < 0 || repoIndex >= getRepoCount()) {
-      throw new IOException(
-          "Requested storage index "
-              + repoIndex
-              + " isn't initialized,"
-              + " repository count is "
-              + getRepoCount());
+      throw new IOException("Requested storage index " + repoIndex
+          + " isn't initialized," + " repository count is " + getRepoCount());
     }
     return repos.get(repoIndex);
   }
 
-  private Map<String, List<String>> notesCheckDiff(
-      List<NoteInfo> sourceNotes,
-      NotebookRepo sourceRepo,
-      List<NoteInfo> destNotes,
-      NotebookRepo destRepo,
+  private Map<String, List<String>> notesCheckDiff(List<NoteInfo> sourceNotes,
+      NotebookRepo sourceRepo, List<NoteInfo> destNotes, NotebookRepo destRepo,
       AuthenticationInfo subject) {
-    List<String> pushIDs = new ArrayList<>();
-    List<String> pullIDs = new ArrayList<>();
-    List<String> delDstIDs = new ArrayList<>();
+    List <String> pushIDs = new ArrayList<>();
+    List <String> pullIDs = new ArrayList<>();
+    List <String> delDstIDs = new ArrayList<>();
 
     NoteInfo dnote;
     Date sdate, ddate;
@@ -375,7 +374,7 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
     return map;
   }
 
-  private NoteInfo containsID(List<NoteInfo> notes, String id) {
+  private NoteInfo containsID(List <NoteInfo> notes, String id) {
     for (NoteInfo note : notes) {
       if (note.getId().equals(id)) {
         return note;
@@ -385,7 +384,6 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
   }
   /**
    * checks latest modification date based on Paragraph fields
-   *
    * @return -Date
    */
   private Date lastModificationDate(Note note) {
@@ -413,7 +411,7 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
   @Override
   public void close() {
     LOG.info("Closing all notebook storages");
-    for (NotebookRepo repo : repos) {
+    for (NotebookRepo repo: repos) {
       repo.close();
     }
   }
@@ -433,7 +431,7 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
     return false;
   }
 
-  // checkpoint to all available storages
+  //checkpoint to all available storages
   @Override
   public Revision checkpoint(String noteId, String checkpointMsg, AuthenticationInfo subject)
       throws IOException {
@@ -446,24 +444,15 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
     for (int i = 0; i < repoBound; i++) {
       try {
         if (isRevisionSupportedInRepo(i)) {
-          allRepoCheckpoints.add(
-              ((NotebookRepoWithVersionControl) getRepo(i))
+          allRepoCheckpoints
+              .add(((NotebookRepoWithVersionControl) getRepo(i))
                   .checkpoint(noteId, checkpointMsg, subject));
         }
       } catch (IOException e) {
-        LOG.warn(
-            "Couldn't checkpoint in {} storage with index {} for note {}",
-            getRepo(i).getClass().toString(),
-            i,
-            noteId);
-        errorMessage +=
-            "Error on storage class "
-                + getRepo(i).getClass().toString()
-                + " with index "
-                + i
-                + " : "
-                + e.getMessage()
-                + "\n";
+        LOG.warn("Couldn't checkpoint in {} storage with index {} for note {}",
+          getRepo(i).getClass().toString(), i, noteId);
+        errorMessage += "Error on storage class " + getRepo(i).getClass().toString() +
+          " with index " + i + " : " + e.getMessage() + "\n";
         errorCount++;
       }
     }
@@ -511,7 +500,7 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
   public List<NotebookRepoSettingsInfo> getSettings(AuthenticationInfo subject) {
     List<NotebookRepoSettingsInfo> repoSettings = Collections.emptyList();
     try {
-      repoSettings = getRepo(0).getSettings(subject);
+      repoSettings =  getRepo(0).getSettings(subject);
     } catch (IOException e) {
       LOG.error("Cannot get notebook repo settings", e);
     }
@@ -536,8 +525,8 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
     for (int i = 0; i < repoBound; i++) {
       try {
         if (isRevisionSupportedInRepo(i)) {
-          currentNote =
-              ((NotebookRepoWithVersionControl) getRepo(i)).setNoteRevision(noteId, revId, subject);
+          currentNote = ((NotebookRepoWithVersionControl) getRepo(i))
+              .setNoteRevision(noteId, revId, subject);
         }
       } catch (IOException e) {
         // already logged
@@ -550,4 +539,5 @@ public class NotebookRepoSync implements NotebookRepoWithVersionControl {
     }
     return revisionNote;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoWithSettings.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoWithSettings.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoWithSettings.java
index cd58e7c..e5f59da 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoWithSettings.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoWithSettings.java
@@ -18,6 +18,7 @@ package org.apache.zeppelin.notebook.repo;
 
 import java.util.Collections;
 import java.util.List;
+
 import org.apache.commons.lang.StringUtils;
 
 /**
@@ -49,7 +50,9 @@ public class NotebookRepoWithSettings {
     return this.equals(EMPTY);
   }
 
-  /** Simple builder :). */
+  /**
+   * Simple builder :).
+   */
   public static class Builder {
     private final String name;
     private String className = StringUtils.EMPTY;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoWithVersionControl.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoWithVersionControl.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoWithVersionControl.java
index e975d52..05c846e 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoWithVersionControl.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoWithVersionControl.java
@@ -17,51 +17,53 @@
 
 package org.apache.zeppelin.notebook.repo;
 
-import java.io.IOException;
-import java.util.List;
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.annotation.ZeppelinApi;
 import org.apache.zeppelin.notebook.Note;
+import org.apache.zeppelin.notebook.NoteInfo;
 import org.apache.zeppelin.user.AuthenticationInfo;
 
-/** Notebook repository (persistence layer) abstraction */
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Notebook repository (persistence layer) abstraction
+ */
 public interface NotebookRepoWithVersionControl extends NotebookRepo {
 
   /**
    * chekpoint (set revision) for notebook.
-   *
    * @param noteId Id of the Notebook
    * @param checkpointMsg message description of the checkpoint
    * @return Rev
    * @throws IOException
    */
-  @ZeppelinApi
-  public Revision checkpoint(String noteId, String checkpointMsg, AuthenticationInfo subject)
-      throws IOException;
+  @ZeppelinApi public Revision checkpoint(String noteId, String checkpointMsg,
+                                          AuthenticationInfo subject) throws IOException;
 
   /**
    * Get particular revision of the Notebook.
-   *
+   * 
    * @param noteId Id of the Notebook
    * @param revId revision of the Notebook
    * @return a Notebook
    * @throws IOException
    */
-  @ZeppelinApi
-  public Note get(String noteId, String revId, AuthenticationInfo subject) throws IOException;
+  @ZeppelinApi public Note get(String noteId, String revId, AuthenticationInfo subject)
+      throws IOException;
 
   /**
    * List of revisions of the given Notebook.
-   *
+   * 
    * @param noteId id of the Notebook
    * @return list of revisions
    */
-  @ZeppelinApi
-  public List<Revision> revisionHistory(String noteId, AuthenticationInfo subject);
+  @ZeppelinApi public List<Revision> revisionHistory(String noteId, AuthenticationInfo subject);
 
   /**
    * Set note to particular revision.
-   *
+   * 
    * @param noteId Id of the Notebook
    * @param revId revision of the Notebook
    * @return a Notebook
@@ -71,14 +73,16 @@ public interface NotebookRepoWithVersionControl extends NotebookRepo {
   public Note setNoteRevision(String noteId, String revId, AuthenticationInfo subject)
       throws IOException;
 
-  /** Represents the 'Revision' a point in life of the notebook */
+  /**
+   * Represents the 'Revision' a point in life of the notebook
+   */
   static class Revision {
     public static final Revision EMPTY = new Revision(StringUtils.EMPTY, StringUtils.EMPTY, 0);
-
+    
     public String id;
     public String message;
     public int time;
-
+    
     public Revision(String revId, String message, int time) {
       this.id = revId;
       this.message = message;
@@ -89,4 +93,5 @@ public interface NotebookRepoWithVersionControl extends NotebookRepo {
       return revision == null || EMPTY.equals(revision);
     }
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/model/Instance.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/model/Instance.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/model/Instance.java
index b2174b1..2767962 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/model/Instance.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/model/Instance.java
@@ -16,7 +16,10 @@
  */
 package org.apache.zeppelin.notebook.repo.zeppelinhub.model;
 
-/** ZeppelinHub Instance structure. */
+/**
+ * ZeppelinHub Instance structure.
+ *
+ */
 public class Instance {
   public int id;
   public String name;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/model/UserSessionContainer.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/model/UserSessionContainer.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/model/UserSessionContainer.java
index ee3e8b1..7f035b1 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/model/UserSessionContainer.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/model/UserSessionContainer.java
@@ -18,13 +18,17 @@ package org.apache.zeppelin.notebook.repo.zeppelinhub.model;
 
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
+
 import org.apache.commons.lang.StringUtils;
 
-/** Simple and yet dummy container for zeppelinhub session. */
+/**
+ * Simple and yet dummy container for zeppelinhub session.
+ * 
+ */
 public class UserSessionContainer {
   private static class Entity {
     public final String userSession;
-
+    
     Entity(String userSession) {
       this.userSession = userSession;
     }
@@ -41,7 +45,7 @@ public class UserSessionContainer {
     }
     return entry.userSession;
   }
-
+  
   public synchronized String setSession(String principal, String userSession) {
     Entity entry = new Entity(userSession);
     sessions.put(principal, entry);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/model/UserTokenContainer.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/model/UserTokenContainer.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/model/UserTokenContainer.java
index 47e5df7..b594f89 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/model/UserTokenContainer.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/model/UserTokenContainer.java
@@ -24,12 +24,17 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.notebook.repo.zeppelinhub.rest.ZeppelinhubRestApiHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** User token manager class. */
+/**
+ * User token manager class.
+ *
+ */
+
 public class UserTokenContainer {
   private static final Logger LOG = LoggerFactory.getLogger(UserTokenContainer.class);
   private static UserTokenContainer instance = null;
@@ -37,7 +42,8 @@ public class UserTokenContainer {
   private final ZeppelinhubRestApiHandler restApiClient;
   private String defaultToken;
 
-  public static UserTokenContainer init(ZeppelinhubRestApiHandler restClient, String defaultToken) {
+  public static UserTokenContainer init(ZeppelinhubRestApiHandler restClient, 
+      String defaultToken) {
     if (instance == null) {
       instance = new UserTokenContainer(restClient, defaultToken);
     }
@@ -52,7 +58,7 @@ public class UserTokenContainer {
   public static UserTokenContainer getInstance() {
     return instance;
   }
-
+  
   public void setUserToken(String username, String token) {
     if (StringUtils.isBlank(username) || StringUtils.isBlank(token)) {
       LOG.warn("Can't set empty user token");
@@ -60,7 +66,7 @@ public class UserTokenContainer {
     }
     userTokens.put(username, token);
   }
-
+  
   public String getUserToken(String principal) {
     if (StringUtils.isBlank(principal) || "anonymous".equals(principal)) {
       if (StringUtils.isBlank(defaultToken)) {
@@ -89,7 +95,7 @@ public class UserTokenContainer {
     }
     return token;
   }
-
+  
   public String getExistingUserToken(String principal) {
     if (StringUtils.isBlank(principal) || "anonymous".equals(principal)) {
       return StringUtils.EMPTY;
@@ -100,14 +106,15 @@ public class UserTokenContainer {
     }
     return token;
   }
-
+  
   public String removeUserToken(String username) {
     return userTokens.remove(username);
   }
-
+  
   /**
-   * Get user default instance. From now, it will be from the first instance from the list, But
-   * later we can think about marking a default one and return it instead :)
+   * Get user default instance.
+   * From now, it will be from the first instance from the list,
+   * But later we can think about marking a default one and return it instead :)
    */
   public String getDefaultZeppelinInstanceToken(String ticket) throws IOException {
     List<Instance> instances = getUserInstances(ticket);
@@ -116,14 +123,14 @@ public class UserTokenContainer {
     }
 
     String token = instances.get(0).token;
-    LOG.debug(
-        "The following instance has been assigned {} with token {}", instances.get(0).name, token);
+    LOG.debug("The following instance has been assigned {} with token {}", instances.get(0).name,
+        token);
     return token;
   }
-
+  
   /**
-   * Get list of user instances from Zeppelinhub. This will avoid and remove the needs of setting up
-   * token in zeppelin-env.sh.
+   * Get list of user instances from Zeppelinhub.
+   * This will avoid and remove the needs of setting up token in zeppelin-env.sh.
    */
   public List<Instance> getUserInstances(String ticket) throws IOException {
     if (StringUtils.isBlank(ticket)) {
@@ -131,11 +138,11 @@ public class UserTokenContainer {
     }
     return restApiClient.getInstances(ticket);
   }
-
+  
   public List<String> getAllTokens() {
     return new ArrayList<String>(userTokens.values());
   }
-
+  
   public Map<String, String> getAllUserTokens() {
     return new HashMap<String, String>(userTokens);
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/rest/HttpProxyClient.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/rest/HttpProxyClient.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/rest/HttpProxyClient.java
index 5891150..690a8b6 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/rest/HttpProxyClient.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/rest/HttpProxyClient.java
@@ -22,7 +22,9 @@ import java.net.URI;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
+
 import javax.net.ssl.SSLContext;
+
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.http.HttpHost;
@@ -54,37 +56,40 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * This is http client class for the case of proxy usage jetty-client has issue with https over
- * proxy for 9.2.x https://github.com/eclipse/jetty.project/issues/408
- * https://github.com/eclipse/jetty.project/issues/827
+ * This is http client class for the case of proxy usage
+ * jetty-client has issue with https over proxy for 9.2.x
+ *   https://github.com/eclipse/jetty.project/issues/408
+ *   https://github.com/eclipse/jetty.project/issues/827
+ *    
  */
+
 public class HttpProxyClient {
   private static final Logger LOG = LoggerFactory.getLogger(HttpProxyClient.class);
   public static final String ZEPPELIN_TOKEN_HEADER = "X-Zeppelin-Token";
-
+  
   private CloseableHttpAsyncClient client;
   private URI proxyUri;
-
+  
   public static HttpProxyClient newInstance(URI proxyUri) {
     return new HttpProxyClient(proxyUri);
   }
-
+  
   private HttpProxyClient(URI uri) {
     this.proxyUri = uri;
-
+    
     client = getAsyncProxyHttpClient(proxyUri);
     client.start();
   }
-
+  
   public URI getProxyUri() {
     return proxyUri;
   }
-
+  
   private CloseableHttpAsyncClient getAsyncProxyHttpClient(URI proxyUri) {
     LOG.info("Creating async proxy http client");
     PoolingNHttpClientConnectionManager cm = getAsyncConnectionManager();
     HttpHost proxy = new HttpHost(proxyUri.getHost(), proxyUri.getPort());
-
+    
     HttpAsyncClientBuilder clientBuilder = HttpAsyncClients.custom();
     if (cm != null) {
       clientBuilder = clientBuilder.setConnectionManager(cm);
@@ -96,7 +101,7 @@ public class HttpProxyClient {
     clientBuilder = setRedirects(clientBuilder);
     return clientBuilder.build();
   }
-
+  
   private PoolingNHttpClientConnectionManager getAsyncConnectionManager() {
     ConnectingIOReactor ioReactor = null;
     PoolingNHttpClientConnectionManager cm = null;
@@ -106,11 +111,11 @@ public class HttpProxyClient {
       SSLContext sslcontext = SSLContexts.createSystemDefault();
       X509HostnameVerifier hostnameVerifier = new BrowserCompatHostnameVerifier();
       @SuppressWarnings("deprecation")
-      Registry<SchemeIOSessionStrategy> sessionStrategyRegistry =
-          RegistryBuilder.<SchemeIOSessionStrategy>create()
-              .register("http", NoopIOSessionStrategy.INSTANCE)
-              .register("https", new SSLIOSessionStrategy(sslcontext, hostnameVerifier))
-              .build();
+      Registry<SchemeIOSessionStrategy> sessionStrategyRegistry = RegistryBuilder
+          .<SchemeIOSessionStrategy>create()
+          .register("http", NoopIOSessionStrategy.INSTANCE)
+          .register("https", new SSLIOSessionStrategy(sslcontext, hostnameVerifier))
+          .build();
 
       cm = new PoolingNHttpClientConnectionManager(ioReactor, sessionStrategyRegistry);
     } catch (IOReactorException e) {
@@ -119,44 +124,41 @@ public class HttpProxyClient {
     }
     return cm;
   }
-
+  
   private HttpAsyncClientBuilder setRedirects(HttpAsyncClientBuilder clientBuilder) {
-    clientBuilder.setRedirectStrategy(
-        new DefaultRedirectStrategy() {
-          /** Redirectable methods. */
-          private String[] REDIRECT_METHODS =
-              new String[] {
-                HttpGet.METHOD_NAME,
-                HttpPost.METHOD_NAME,
-                HttpPut.METHOD_NAME,
-                HttpDelete.METHOD_NAME,
-                HttpHead.METHOD_NAME
-              };
-
-          @Override
-          protected boolean isRedirectable(String method) {
-            for (String m : REDIRECT_METHODS) {
-              if (m.equalsIgnoreCase(method)) {
-                return true;
-              }
-            }
-            return false;
+    clientBuilder.setRedirectStrategy(new DefaultRedirectStrategy() {
+      /** Redirectable methods. */
+      private String[] REDIRECT_METHODS = new String[] { 
+        HttpGet.METHOD_NAME, HttpPost.METHOD_NAME, 
+        HttpPut.METHOD_NAME, HttpDelete.METHOD_NAME, HttpHead.METHOD_NAME 
+      };
+
+      @Override
+      protected boolean isRedirectable(String method) {
+        for (String m : REDIRECT_METHODS) {
+          if (m.equalsIgnoreCase(method)) {
+            return true;
           }
-        });
+        }
+        return false;
+      }
+    });
     return clientBuilder;
   }
-
-  public String sendToZeppelinHub(HttpRequestBase request, boolean withResponse)
-      throws IOException {
-    return withResponse ? sendAndGetResponse(request) : sendWithoutResponseBody(request);
+  
+  public String sendToZeppelinHub(HttpRequestBase request,
+      boolean withResponse) throws IOException {
+    return withResponse ?
+        sendAndGetResponse(request) : sendWithoutResponseBody(request);
   }
+  
 
   private String sendWithoutResponseBody(HttpRequestBase request) throws IOException {
     FutureCallback<HttpResponse> callback = getCallback(request);
     client.execute(request, callback);
     return StringUtils.EMPTY;
   }
-
+  
   private String sendAndGetResponse(HttpRequestBase request) throws IOException {
     String data = StringUtils.EMPTY;
     try {
@@ -167,33 +169,30 @@ public class HttpProxyClient {
           data = IOUtils.toString(responseContent, "UTF-8");
         }
       } else {
-        LOG.error(
-            "ZeppelinHub {} {} returned with status {} ",
-            request.getMethod(),
-            request.getURI(),
-            code);
+        LOG.error("ZeppelinHub {} {} returned with status {} ", request.getMethod(),
+            request.getURI(), code);
         throw new IOException("Cannot perform " + request.getMethod() + " request to ZeppelinHub");
       }
-    } catch (InterruptedException
-        | ExecutionException
-        | TimeoutException
+    } catch (InterruptedException | ExecutionException | TimeoutException
         | NullPointerException e) {
       throw new IOException(e);
     }
     return data;
   }
-
+  
   private FutureCallback<HttpResponse> getCallback(final HttpRequestBase request) {
     return new FutureCallback<HttpResponse>() {
 
       public void completed(final HttpResponse response) {
         request.releaseConnection();
-        LOG.info("Note {} completed with {} status", request.getMethod(), response.getStatusLine());
+        LOG.info("Note {} completed with {} status", request.getMethod(),
+            response.getStatusLine());
       }
 
       public void failed(final Exception ex) {
         request.releaseConnection();
-        LOG.error("Note {} failed with {} message", request.getMethod(), ex.getMessage());
+        LOG.error("Note {} failed with {} message", request.getMethod(),
+            ex.getMessage());
       }
 
       public void cancelled() {
@@ -202,7 +201,7 @@ public class HttpProxyClient {
       }
     };
   }
-
+  
   public void stop() {
     try {
       client.close();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/rest/ZeppelinhubRestApiHandler.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/rest/ZeppelinhubRestApiHandler.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/rest/ZeppelinhubRestApiHandler.java
index 6d11a15..437386c 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/rest/ZeppelinhubRestApiHandler.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/rest/ZeppelinhubRestApiHandler.java
@@ -16,8 +16,6 @@
  */
 package org.apache.zeppelin.notebook.repo.zeppelinhub.rest;
 
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
 import java.io.IOException;
 import java.io.InputStream;
 import java.lang.reflect.Type;
@@ -28,6 +26,7 @@ import java.util.List;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
+
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.http.client.methods.HttpDelete;
@@ -48,14 +47,20 @@ import org.eclipse.jetty.util.ssl.SslContextFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** REST API handler. */
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+
+/**
+ * REST API handler.
+ *
+ */
 public class ZeppelinhubRestApiHandler {
   private static final Logger LOG = LoggerFactory.getLogger(ZeppelinhubRestApiHandler.class);
   public static final String ZEPPELIN_TOKEN_HEADER = "X-Zeppelin-Token";
   private static final String USER_SESSION_HEADER = "X-User-Session";
   private static final String DEFAULT_API_PATH = "/api/v1/zeppelin";
   private static boolean PROXY_ON = false;
-  // TODO(xxx): possibly switch to jetty-client > 9.3.12 when adopt jvm 1.8
+  //TODO(xxx): possibly switch to jetty-client > 9.3.12 when adopt jvm 1.8
   private static HttpProxyClient proxyClient;
   private final HttpClient client;
   private String zepelinhubUrl;
@@ -76,19 +81,15 @@ public class ZeppelinhubRestApiHandler {
       LOG.error("Cannot initialize ZeppelinHub REST async client", e);
     }
   }
-
+  
   private void readProxyConf() {
-    // try reading https_proxy
-    String proxyHostString =
-        StringUtils.isBlank(System.getenv("https_proxy"))
-            ? System.getenv("HTTPS_PROXY")
-            : System.getenv("https_proxy");
+    //try reading https_proxy
+    String proxyHostString = StringUtils.isBlank(System.getenv("https_proxy")) ?
+        System.getenv("HTTPS_PROXY") : System.getenv("https_proxy");
     if (StringUtils.isBlank(proxyHostString)) {
-      // try http_proxy if no https_proxy
-      proxyHostString =
-          StringUtils.isBlank(System.getenv("http_proxy"))
-              ? System.getenv("HTTP_PROXY")
-              : System.getenv("http_proxy");
+      //try http_proxy if no https_proxy
+      proxyHostString = StringUtils.isBlank(System.getenv("http_proxy")) ?
+          System.getenv("HTTP_PROXY") : System.getenv("http_proxy");
     }
 
     if (!StringUtils.isBlank(proxyHostString)) {
@@ -113,13 +114,12 @@ public class ZeppelinhubRestApiHandler {
     httpClient.setMaxConnectionsPerDestination(100);
 
     // Config considerations
-    // TODO(khalid): consider multi-threaded connection manager case
+    //TODO(khalid): consider multi-threaded connection manager case
     return httpClient;
   }
 
   /**
    * Fetch zeppelin instances for a given user.
-   *
    * @param ticket
    * @return
    * @throws IOException
@@ -164,7 +164,7 @@ public class ZeppelinhubRestApiHandler {
       return sendToZeppelinHub(HttpMethod.GET, url, StringUtils.EMPTY, token, true);
     }
   }
-
+  
   public String putWithResponseBody(String token, String url, String json) throws IOException {
     if (StringUtils.isBlank(url) || StringUtils.isBlank(json)) {
       LOG.error("Empty note, cannot send it to zeppelinHub");
@@ -176,7 +176,7 @@ public class ZeppelinhubRestApiHandler {
       return sendToZeppelinHub(HttpMethod.PUT, zepelinhubUrl + url, json, token, true);
     }
   }
-
+  
   public void put(String token, String jsonNote) throws IOException {
     if (StringUtils.isBlank(jsonNote)) {
       LOG.error("Cannot save empty note/string to ZeppelinHub");
@@ -195,16 +195,18 @@ public class ZeppelinhubRestApiHandler {
       return;
     }
     if (PROXY_ON) {
-      sendToZeppelinHubViaProxy(
-          new HttpDelete(zepelinhubUrl + argument), StringUtils.EMPTY, token, false);
+      sendToZeppelinHubViaProxy(new HttpDelete(zepelinhubUrl + argument), StringUtils.EMPTY, token,
+          false);
     } else {
-      sendToZeppelinHub(
-          HttpMethod.DELETE, zepelinhubUrl + argument, StringUtils.EMPTY, token, false);
+      sendToZeppelinHub(HttpMethod.DELETE, zepelinhubUrl + argument, StringUtils.EMPTY, token,
+          false);
     }
   }
-
-  private String sendToZeppelinHubViaProxy(
-      HttpRequestBase request, String json, String token, boolean withResponse) throws IOException {
+  
+  private String sendToZeppelinHubViaProxy(HttpRequestBase request, 
+                                           String json, 
+                                           String token,
+                                           boolean withResponse) throws IOException {
     request.setHeader(ZEPPELIN_TOKEN_HEADER, token);
     if (request.getMethod().equals(HttpPost.METHOD_NAME)) {
       HttpPost post = (HttpPost) request;
@@ -222,39 +224,36 @@ public class ZeppelinhubRestApiHandler {
     } else {
       LOG.warn("Proxy client request was submitted while not correctly initialized");
     }
-    return body;
+    return body; 
   }
-
-  private String sendToZeppelinHub(
-      HttpMethod method, String url, String json, String token, boolean withResponse)
+  
+  private String sendToZeppelinHub(HttpMethod method,
+                                   String url,
+                                   String json,
+                                   String token,
+                                   boolean withResponse)
       throws IOException {
     Request request = client.newRequest(url).method(method).header(ZEPPELIN_TOKEN_HEADER, token);
     if ((method.equals(HttpMethod.PUT) || method.equals(HttpMethod.POST))
         && !StringUtils.isBlank(json)) {
       request.content(new StringContentProvider(json, "UTF-8"), "application/json;charset=UTF-8");
     }
-    return withResponse
-        ? sendToZeppelinHub(request)
-        : sendToZeppelinHubWithoutResponseBody(request);
+    return withResponse ?
+        sendToZeppelinHub(request) : sendToZeppelinHubWithoutResponseBody(request);
   }
-
+  
   private String sendToZeppelinHubWithoutResponseBody(Request request) throws IOException {
-    request.send(
-        new Response.CompleteListener() {
-          @Override
-          public void onComplete(Result result) {
-            Request req = result.getRequest();
-            LOG.info(
-                "ZeppelinHub {} {} returned with status {}: {}",
-                req.getMethod(),
-                req.getURI(),
-                result.getResponse().getStatus(),
-                result.getResponse().getReason());
-          }
-        });
+    request.send(new Response.CompleteListener() {
+      @Override
+      public void onComplete(Result result) {
+        Request req = result.getRequest();
+        LOG.info("ZeppelinHub {} {} returned with status {}: {}", req.getMethod(),
+            req.getURI(), result.getResponse().getStatus(), result.getResponse().getReason());
+      }
+    });
     return StringUtils.EMPTY;
   }
-
+  
   private String sendToZeppelinHub(final Request request) throws IOException {
     InputStreamResponseListener listener = new InputStreamResponseListener();
     Response response;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/security/Authentication.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/security/Authentication.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/security/Authentication.java
index e038345..38d8b50 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/security/Authentication.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/security/Authentication.java
@@ -1,7 +1,5 @@
 package org.apache.zeppelin.notebook.repo.zeppelinhub.security;
 
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.security.GeneralSecurityException;
@@ -9,23 +7,34 @@ import java.security.Key;
 import java.security.SecureRandom;
 import java.util.Collections;
 import java.util.Map;
+
 import javax.crypto.Cipher;
 import javax.crypto.KeyGenerator;
 import javax.crypto.SecretKey;
 import javax.crypto.spec.IvParameterSpec;
 import javax.crypto.spec.SecretKeySpec;
+
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.HttpStatus;
 import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
 import org.apache.commons.httpclient.NameValuePair;
+import org.apache.commons.httpclient.methods.GetMethod;
 import org.apache.commons.httpclient.methods.PostMethod;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
+import org.apache.zeppelin.notebook.socket.Message;
+import org.apache.zeppelin.notebook.socket.Message.OP;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Authentication module. */
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+
+/**
+ * Authentication module.
+ *
+ */
 public class Authentication implements Runnable {
   private static final Logger LOG = LoggerFactory.getLogger(Authentication.class);
   private String principal = "anonymous";
@@ -66,10 +75,11 @@ public class Authentication implements Runnable {
     client = new HttpClient(connectionManager);
     this.token = token;
 
-    authEnabled =
-        !conf.getBoolean("ZEPPELIN_ALLOW_ANONYMOUS", ZEPPELIN_CONF_ANONYMOUS_ALLOWED, true);
+    authEnabled = !conf.getBoolean("ZEPPELIN_ALLOW_ANONYMOUS",
+        ZEPPELIN_CONF_ANONYMOUS_ALLOWED, true);
 
-    userKey = conf.getString("ZEPPELINHUB_USER_KEY", ZEPPELINHUB_USER_KEY, "");
+    userKey = conf.getString("ZEPPELINHUB_USER_KEY",
+        ZEPPELINHUB_USER_KEY, "");
 
     loginEndpoint = getLoginEndpoint(conf);
   }
@@ -89,9 +99,8 @@ public class Authentication implements Runnable {
   public boolean isAuthenticated() {
     return authenticated;
   }
-
   private String getLoginEndpoint(ZeppelinConfiguration conf) {
-    int port = conf.getInt("ZEPPELIN_PORT", "zeppelin.server.port", 8080);
+    int port = conf.getInt("ZEPPELIN_PORT", "zeppelin.server.port" , 8080);
     if (port <= 0) {
       port = 8080;
     }
@@ -111,16 +120,15 @@ public class Authentication implements Runnable {
         if (isEmptyMap(authCredentials)) {
           return false;
         }
-        principal =
-            authCredentials.containsKey("principal") ? authCredentials.get("principal") : principal;
+        principal = authCredentials.containsKey("principal") ? authCredentials.get("principal")
+            : principal;
         ticket = authCredentials.containsKey("ticket") ? authCredentials.get("ticket") : ticket;
         roles = authCredentials.containsKey("roles") ? authCredentials.get("roles") : roles;
         LOG.info("Authenticated into Zeppelin as {} and roles {}", principal, roles);
         return true;
       } else {
-        LOG.warn(
-            "ZEPPELINHUB_USER_KEY isn't provided. Please provide your credentials"
-                + "for your instance in ZeppelinHub website and generate your key.");
+        LOG.warn("ZEPPELINHUB_USER_KEY isn't provided. Please provide your credentials"
+            + "for your instance in ZeppelinHub website and generate your key.");
       }
     }
     return false;
@@ -132,9 +140,9 @@ public class Authentication implements Runnable {
       LOG.warn("ZEPPELINHUB_USER_KEY is blank");
       return StringUtils.EMPTY;
     }
-    // use hashed token as a salt
+    //use hashed token as a salt
     String hashedToken = Integer.toString(token.hashCode());
-    return decrypt(userKey, hashedToken);
+    return decrypt(userKey, hashedToken); 
   }
 
   private String decrypt(String value, String initVector) {
@@ -172,8 +180,8 @@ public class Authentication implements Runnable {
       int code = client.executeMethod(post);
       if (code == HttpStatus.SC_OK) {
         String content = post.getResponseBodyAsString();
-        Map<String, Object> resp =
-            gson.fromJson(content, new TypeToken<Map<String, Object>>() {}.getType());
+        Map<String, Object> resp = gson.fromJson(content, 
+            new TypeToken<Map<String, Object>>() {}.getType());
         LOG.info("Received from Zeppelin LoginRestApi : " + content);
         return (Map<String, String>) resp.get("body");
       } else {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/Client.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/Client.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/Client.java
index bbcd7dd..87a1a8f 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/Client.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/Client.java
@@ -22,8 +22,9 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Client to connect Zeppelin and ZeppelinHub via websocket API. Implemented using singleton
- * pattern.
+ * Client to connect Zeppelin and ZeppelinHub via websocket API.
+ * Implemented using singleton pattern.
+ * 
  */
 public class Client {
   private static final Logger LOG = LoggerFactory.getLogger(Client.class);
@@ -34,8 +35,8 @@ public class Client {
   private static final int MB = 1048576;
   private static final int MAXIMUM_NOTE_SIZE = 64 * MB;
 
-  public static Client initialize(
-      String zeppelinUri, String zeppelinhubUri, String token, ZeppelinConfiguration conf) {
+  public static Client initialize(String zeppelinUri, String zeppelinhubUri, String token, 
+      ZeppelinConfiguration conf) {
     if (instance == null) {
       instance = new Client(zeppelinUri, zeppelinhubUri, token, conf);
     }
@@ -46,8 +47,8 @@ public class Client {
     return instance;
   }
 
-  private Client(
-      String zeppelinUri, String zeppelinhubUri, String token, ZeppelinConfiguration conf) {
+  private Client(String zeppelinUri, String zeppelinhubUri, String token,
+      ZeppelinConfiguration conf) {
     LOG.debug("Init Client");
     zeppelinhubClient = ZeppelinhubClient.initialize(zeppelinhubUri, token);
     zeppelinClient = ZeppelinClient.initialize(zeppelinUri, token, conf);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/ZeppelinClient.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/ZeppelinClient.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/ZeppelinClient.java
index a338dae..0257b8c 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/ZeppelinClient.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/ZeppelinClient.java
@@ -27,6 +27,7 @@ import java.util.Timer;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
+
 import org.apache.commons.lang3.StringUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.notebook.NotebookAuthorization;
@@ -47,7 +48,11 @@ import org.eclipse.jetty.websocket.client.WebSocketClient;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Zeppelin websocket client. */
+
+/**
+ * Zeppelin websocket client.
+ *
+ */
 public class ZeppelinClient {
   private static final Logger LOG = LoggerFactory.getLogger(ZeppelinClient.class);
   private final URI zeppelinWebsocketUrl;
@@ -62,24 +67,22 @@ public class ZeppelinClient {
   private static final int MIN = 60;
   private static final String ORIGIN = "Origin";
 
-  private static final Set<String> actionable =
-      new HashSet<String>(
-          Arrays.asList(
-              // running events
-              "ANGULAR_OBJECT_UPDATE",
-              "PROGRESS",
-              "NOTE",
-              "PARAGRAPH",
-              "PARAGRAPH_UPDATE_OUTPUT",
-              "PARAGRAPH_APPEND_OUTPUT",
-              "PARAGRAPH_CLEAR_OUTPUT",
-              "PARAGRAPH_REMOVE",
-              // run or stop events
-              "RUN_PARAGRAPH",
-              "CANCEL_PARAGRAPH"));
+  private static final Set<String> actionable = new  HashSet<String>(Arrays.asList(
+      // running events
+      "ANGULAR_OBJECT_UPDATE",
+      "PROGRESS",
+      "NOTE",
+      "PARAGRAPH",
+      "PARAGRAPH_UPDATE_OUTPUT",
+      "PARAGRAPH_APPEND_OUTPUT",
+      "PARAGRAPH_CLEAR_OUTPUT",
+      "PARAGRAPH_REMOVE",
+      // run or stop events
+      "RUN_PARAGRAPH",
+      "CANCEL_PARAGRAPH"));
 
-  public static ZeppelinClient initialize(
-      String zeppelinUrl, String token, ZeppelinConfiguration conf) {
+  public static ZeppelinClient initialize(String zeppelinUrl, String token, 
+      ZeppelinConfiguration conf) {
     if (instance == null) {
       instance = new ZeppelinClient(zeppelinUrl, token, conf);
     }
@@ -108,7 +111,7 @@ public class ZeppelinClient {
     client.setMaxIdleTimeout(5 * MIN * 1000);
     client.setMaxTextMessageBufferSize(Client.getMaxNoteSize());
     client.getPolicy().setMaxTextMessageSize(Client.getMaxNoteSize());
-    // TODO(khalid): other client settings
+    //TODO(khalid): other client settings
     return client;
   }
 
@@ -127,28 +130,25 @@ public class ZeppelinClient {
 
   private void addRoutines() {
     schedulerService.add(ZeppelinHeartbeat.newInstance(this), 10, 1 * MIN);
-    new Timer()
-        .schedule(
-            new java.util.TimerTask() {
-              @Override
-              public void run() {
-                int time = 0;
-                while (time < 5 * MIN) {
-                  watcherSession = openWatcherSession();
-                  if (watcherSession == null) {
-                    try {
-                      Thread.sleep(5000);
-                      time += 5;
-                    } catch (InterruptedException e) {
-                      // continue
-                    }
-                  } else {
-                    break;
-                  }
-                }
-              }
-            },
-            5000);
+    new Timer().schedule(new java.util.TimerTask() {
+      @Override
+      public void run() {
+        int time = 0;
+        while (time < 5 * MIN) {
+          watcherSession = openWatcherSession();
+          if (watcherSession == null) {
+            try {
+              Thread.sleep(5000);
+              time += 5;
+            } catch (InterruptedException e) {
+              //continue
+            }
+          } else {
+            break;
+          }
+        }
+      }
+    }, 5000);
   }
 
   public void stop() {
@@ -192,7 +192,7 @@ public class ZeppelinClient {
       return null;
     }
   }
-
+  
   private Session openWatcherSession() {
     ClientUpgradeRequest request = new ClientUpgradeRequest();
     request.setHeader(WatcherSecurityKey.HTTP_HEADER, WatcherSecurityKey.getKey());
@@ -218,7 +218,7 @@ public class ZeppelinClient {
     }
     noteSession.getRemote().sendStringByFuture(serialize(msg));
   }
-
+  
   public Session getZeppelinConnection(String noteId, String principal, String ticket) {
     if (StringUtils.isBlank(noteId)) {
       LOG.warn("Cannot get Websocket session with blanck noteId");
@@ -226,8 +226,8 @@ public class ZeppelinClient {
     }
     return getNoteSession(noteId, principal, ticket);
   }
-
-  /*
+  
+/*
   private Message zeppelinGetNoteMsg(String noteId) {
     Message getNoteMsg = new Message(Message.OP.GET_NOTE);
     HashMap<String, Object> data = new HashMap<>();
@@ -247,7 +247,7 @@ public class ZeppelinClient {
     }
     return session;
   }
-
+  
   private Session openNoteSession(String noteId, String principal, String ticket) {
     ClientUpgradeRequest request = new ClientUpgradeRequest();
     request.setHeader(ORIGIN, "*");
@@ -272,7 +272,7 @@ public class ZeppelinClient {
     }
     return session;
   }
-
+  
   private boolean isSessionOpen(Session session) {
     return (session != null) && (session.isOpen());
   }
@@ -289,7 +289,7 @@ public class ZeppelinClient {
 
   public void handleMsgFromZeppelin(String message, String noteId) {
     Map<String, String> meta = new HashMap<>();
-    // TODO(khalid): don't use zeppelinhubToken in this class, decouple
+    //TODO(khalid): don't use zeppelinhubToken in this class, decouple
     meta.put("noteId", noteId);
     Message zeppelinMsg = deserialize(message);
     if (zeppelinMsg == null) {
@@ -299,7 +299,7 @@ public class ZeppelinClient {
     if (!isActionable(zeppelinMsg.op)) {
       return;
     }
-
+    
     token = UserTokenContainer.getInstance().getUserToken(zeppelinMsg.principal);
     Client client = Client.getInstance();
     if (client == null) {
@@ -312,6 +312,7 @@ public class ZeppelinClient {
     } else {
       client.relayToZeppelinHub(hubMsg.toJson(), token);
     }
+
   }
 
   private void relayToAllZeppelinHub(ZeppelinhubMessage hubMsg, String noteId) {
@@ -323,7 +324,7 @@ public class ZeppelinClient {
     Client client = Client.getInstance();
     Set<String> userAndRoles;
     String token;
-    for (String user : userTokens.keySet()) {
+    for (String user: userTokens.keySet()) {
       userAndRoles = noteAuth.getRoles(user);
       userAndRoles.add(user);
       if (noteAuth.isReader(noteId, userAndRoles)) {
@@ -340,7 +341,7 @@ public class ZeppelinClient {
     }
     return actionable.contains(action.name());
   }
-
+  
   public void removeNoteConnection(String noteId) {
     if (StringUtils.isBlank(noteId)) {
       LOG.error("Cannot remove session for empty noteId");
@@ -355,14 +356,14 @@ public class ZeppelinClient {
     }
     LOG.info("Removed note websocket connection for note {}", noteId);
   }
-
+  
   private void removeAllConnections() {
     if (watcherSession != null && watcherSession.isOpen()) {
       watcherSession.close();
     }
 
     Session noteSession = null;
-    for (Map.Entry<String, Session> note : notesConnection.entrySet()) {
+    for (Map.Entry<String, Session> note: notesConnection.entrySet()) {
       noteSession = note.getValue();
       if (isSessionOpen(noteSession)) {
         noteSession.close();
@@ -378,8 +379,10 @@ public class ZeppelinClient {
     }
     watcherSession.getRemote().sendStringByFuture(serialize(new Message(OP.PING)));
   }
-
-  /** Only used in test. */
+  
+  /**
+   * Only used in test.
+   */
   public int countConnectedNotes() {
     return notesConnection.size();
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/ZeppelinhubClient.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/ZeppelinhubClient.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/ZeppelinhubClient.java
index 098aecb..4c03a66 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/ZeppelinhubClient.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/ZeppelinhubClient.java
@@ -16,12 +16,7 @@
  */
 package org.apache.zeppelin.notebook.repo.zeppelinhub.websocket;
 
-import com.amazonaws.util.json.JSONArray;
-import com.amazonaws.util.json.JSONException;
-import com.amazonaws.util.json.JSONObject;
-import com.google.common.collect.Lists;
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
+
 import java.io.IOException;
 import java.net.HttpCookie;
 import java.net.URI;
@@ -30,6 +25,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.notebook.repo.zeppelinhub.websocket.listener.ZeppelinhubWebsocket;
 import org.apache.zeppelin.notebook.repo.zeppelinhub.websocket.protocol.ZeppelinHubOp;
@@ -48,7 +44,16 @@ import org.eclipse.jetty.websocket.client.WebSocketClient;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Manage a zeppelinhub websocket connection. */
+import com.amazonaws.util.json.JSONArray;
+import com.amazonaws.util.json.JSONException;
+import com.amazonaws.util.json.JSONObject;
+import com.google.common.collect.Lists;
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+
+/**
+ * Manage a zeppelinhub websocket connection.
+ */
 public class ZeppelinhubClient {
   private static final Logger LOG = LoggerFactory.getLogger(ZeppelinhubClient.class);
 
@@ -60,9 +65,9 @@ public class ZeppelinhubClient {
   private static final long CONNECTION_IDLE_TIME = TimeUnit.SECONDS.toMillis(30);
   private static ZeppelinhubClient instance = null;
   private static Gson gson;
-
+  
   private SchedulerService schedulerService;
-  private Map<String, ZeppelinhubSession> sessionMap =
+  private Map<String, ZeppelinhubSession> sessionMap = 
       new ConcurrentHashMap<String, ZeppelinhubSession>();
 
   public static ZeppelinhubClient initialize(String zeppelinhubUrl, String token) {
@@ -93,8 +98,10 @@ public class ZeppelinhubClient {
       LOG.error("Cannot connect to zeppelinhub via websocket", e);
     }
   }
-
-  public void initUser(String token) {}
+  
+  public void initUser(String token) {
+    
+  }
 
   public void stop() {
     LOG.info("Stopping Zeppelinhub websocket client");
@@ -113,7 +120,7 @@ public class ZeppelinhubClient {
   public String getToken() {
     return this.zeppelinhubToken;
   }
-
+  
   public void send(String msg, String token) {
     ZeppelinhubSession zeppelinhubSession = getSession(token);
     if (!isConnectedToZeppelinhub(zeppelinhubSession)) {
@@ -126,7 +133,7 @@ public class ZeppelinhubClient {
     }
     zeppelinhubSession.sendByFuture(msg);
   }
-
+  
   private boolean isConnectedToZeppelinhub(ZeppelinhubSession zeppelinhubSession) {
     return (zeppelinhubSession != null && zeppelinhubSession.isSessionOpen());
   }
@@ -173,7 +180,7 @@ public class ZeppelinhubClient {
     request.setCookies(Lists.newArrayList(new HttpCookie(TOKEN_HEADER, token)));
     return request;
   }
-
+  
   private WebSocketClient createNewWebsocketClient() {
     SslContextFactory sslContextFactory = new SslContextFactory();
     WebSocketClient client = new WebSocketClient(sslContextFactory);
@@ -182,7 +189,7 @@ public class ZeppelinhubClient {
     client.setMaxIdleTimeout(CONNECTION_IDLE_TIME);
     return client;
   }
-
+  
   private void addRoutines() {
     schedulerService.add(ZeppelinHubHeartbeat.newInstance(this), 10, 23);
   }
@@ -262,9 +269,8 @@ public class ZeppelinhubClient {
           LOG.warn("Wrong \"paragraph\" format for RUN_NOTEBOOK");
           continue;
         }
-        zeppelinMsg.data =
-            gson.fromJson(
-                paragraphs.getString(i), new TypeToken<Map<String, Object>>() {}.getType());
+        zeppelinMsg.data = gson.fromJson(paragraphs.getString(i), 
+            new TypeToken<Map<String, Object>>(){}.getType());
         zeppelinMsg.principal = principal;
         zeppelinMsg.ticket = TicketContainer.instance.getTicket(principal);
         client.relayToZeppelin(zeppelinMsg, noteId);
@@ -276,4 +282,5 @@ public class ZeppelinhubClient {
     }
     return true;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/listener/WatcherWebsocket.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/listener/WatcherWebsocket.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/listener/WatcherWebsocket.java
index 72b172e..43adf4a 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/listener/WatcherWebsocket.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/listener/WatcherWebsocket.java
@@ -27,18 +27,22 @@ import org.eclipse.jetty.websocket.api.WebSocketListener;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Zeppelin Watcher that will forward user note to ZeppelinHub. */
+/**
+ * Zeppelin Watcher that will forward user note to ZeppelinHub.
+ *
+ */
 public class WatcherWebsocket implements WebSocketListener {
   private static final Logger LOG = LoggerFactory.getLogger(ZeppelinWebsocket.class);
   private static final String watcherPrincipal = "watcher";
   public Session connection;
-
+  
   public static WatcherWebsocket createInstace() {
     return new WatcherWebsocket();
   }
-
+  
   @Override
-  public void onWebSocketBinary(byte[] payload, int offset, int len) {}
+  public void onWebSocketBinary(byte[] payload, int offset, int len) {
+  }
 
   @Override
   public void onWebSocketClose(int code, String reason) {
@@ -75,4 +79,5 @@ public class WatcherWebsocket implements WebSocketListener {
       LOG.error("Failed to send message to ZeppelinHub: ", e);
     }
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/listener/ZeppelinWebsocket.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/listener/ZeppelinWebsocket.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/listener/ZeppelinWebsocket.java
index fb078ae..fa6ade8 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/listener/ZeppelinWebsocket.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/listener/ZeppelinWebsocket.java
@@ -22,7 +22,10 @@ import org.eclipse.jetty.websocket.api.WebSocketListener;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Zeppelin websocket listener class. */
+/**
+ * Zeppelin websocket listener class.
+ *
+ */
 public class ZeppelinWebsocket implements WebSocketListener {
   private static final Logger LOG = LoggerFactory.getLogger(ZeppelinWebsocket.class);
   public Session connection;
@@ -33,7 +36,9 @@ public class ZeppelinWebsocket implements WebSocketListener {
   }
 
   @Override
-  public void onWebSocketBinary(byte[] arg0, int arg1, int arg2) {}
+  public void onWebSocketBinary(byte[] arg0, int arg1, int arg2) {
+
+  }
 
   @Override
   public void onWebSocketClose(int code, String message) {
@@ -66,4 +71,5 @@ public class ZeppelinWebsocket implements WebSocketListener {
       LOG.error("Failed to send message to ZeppelinHub: {}", e.toString());
     }
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/listener/ZeppelinhubWebsocket.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/listener/ZeppelinhubWebsocket.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/listener/ZeppelinhubWebsocket.java
index 713be82..216c307 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/listener/ZeppelinhubWebsocket.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/listener/ZeppelinhubWebsocket.java
@@ -23,12 +23,14 @@ import org.eclipse.jetty.websocket.api.WebSocketListener;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Zeppelinhub websocket handler. */
+/**
+ * Zeppelinhub websocket handler.
+ */
 public class ZeppelinhubWebsocket implements WebSocketListener {
   private Logger LOG = LoggerFactory.getLogger(ZeppelinhubWebsocket.class);
   private Session zeppelinHubSession;
   private final String token;
-
+  
   private ZeppelinhubWebsocket(String token) {
     this.token = token;
   }
@@ -36,7 +38,7 @@ public class ZeppelinhubWebsocket implements WebSocketListener {
   public static ZeppelinhubWebsocket newInstance(String token) {
     return new ZeppelinhubWebsocket(token);
   }
-
+  
   @Override
   public void onWebSocketBinary(byte[] payload, int offset, int len) {}
 
@@ -71,7 +73,7 @@ public class ZeppelinhubWebsocket implements WebSocketListener {
   private boolean isSessionOpen() {
     return ((zeppelinHubSession != null) && (zeppelinHubSession.isOpen())) ? true : false;
   }
-
+  
   private void send(String msg) {
     if (isSessionOpen()) {
       zeppelinHubSession.getRemote().sendStringByFuture(msg);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/protocol/ZeppelinHubOp.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/protocol/ZeppelinHubOp.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/protocol/ZeppelinHubOp.java
index b5dd1d5..80d5f06 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/protocol/ZeppelinHubOp.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/protocol/ZeppelinHubOp.java
@@ -16,7 +16,9 @@
  */
 package org.apache.zeppelin.notebook.repo.zeppelinhub.websocket.protocol;
 
-/** Zeppelinhub Op. */
+/**
+ * Zeppelinhub Op.
+ */
 public enum ZeppelinHubOp {
   LIVE,
   DEAD,

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/protocol/ZeppelinhubMessage.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/protocol/ZeppelinhubMessage.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/protocol/ZeppelinhubMessage.java
index de7e7b6..4f7c652 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/protocol/ZeppelinhubMessage.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/protocol/ZeppelinhubMessage.java
@@ -16,10 +16,8 @@
  */
 package org.apache.zeppelin.notebook.repo.zeppelinhub.websocket.protocol;
 
-import com.google.common.collect.Maps;
-import com.google.gson.Gson;
-import com.google.gson.JsonSyntaxException;
 import java.util.Map;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.common.JsonSerializable;
 import org.apache.zeppelin.notebook.repo.zeppelinhub.websocket.Client;
@@ -28,7 +26,14 @@ import org.apache.zeppelin.notebook.socket.Message.OP;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Zeppelinhub message class. */
+import com.google.common.collect.Maps;
+import com.google.gson.Gson;
+import com.google.gson.JsonSyntaxException;
+
+/**
+ * Zeppelinhub message class.
+ *
+ */
 public class ZeppelinhubMessage implements JsonSerializable {
   private static final Gson gson = new Gson();
   private static final Logger LOG = LoggerFactory.getLogger(Client.class);
@@ -37,18 +42,18 @@ public class ZeppelinhubMessage implements JsonSerializable {
   public Object op;
   public Object data;
   public Map<String, String> meta = Maps.newHashMap();
-
+  
   private ZeppelinhubMessage() {
     this.op = OP.LIST_NOTES;
     this.data = null;
   }
-
+  
   private ZeppelinhubMessage(Object op, Object data, Map<String, String> meta) {
     this.op = op;
     this.data = data;
     this.meta = meta;
   }
-
+  
   public static ZeppelinhubMessage newMessage(Object op, Object data, Map<String, String> meta) {
     return new ZeppelinhubMessage(op, data, meta);
   }
@@ -77,4 +82,5 @@ public class ZeppelinhubMessage implements JsonSerializable {
     }
     return msg;
   }
+  
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/scheduler/SchedulerService.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/scheduler/SchedulerService.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/scheduler/SchedulerService.java
index 1958bf0..024a3c0 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/scheduler/SchedulerService.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/scheduler/SchedulerService.java
@@ -20,7 +20,10 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 
-/** Creates a thread pool that can schedule zeppelinhub commands. */
+/**
+ * Creates a thread pool that can schedule zeppelinhub commands.
+ *
+ */
 public class SchedulerService {
 
   private final ScheduledExecutorService pool;
@@ -55,4 +58,5 @@ public class SchedulerService {
   public void close() {
     pool.shutdown();
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/scheduler/ZeppelinHeartbeat.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/scheduler/ZeppelinHeartbeat.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/scheduler/ZeppelinHeartbeat.java
index d1cfed9..11cfa45 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/scheduler/ZeppelinHeartbeat.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/scheduler/ZeppelinHeartbeat.java
@@ -20,15 +20,18 @@ import org.apache.zeppelin.notebook.repo.zeppelinhub.websocket.ZeppelinClient;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Routine that sends PING to all connected Zeppelin ws connections. */
+/**
+ * Routine that sends PING to all connected Zeppelin ws connections.
+ *
+ */
 public class ZeppelinHeartbeat implements Runnable {
   private static final Logger LOG = LoggerFactory.getLogger(ZeppelinHubHeartbeat.class);
   private ZeppelinClient client;
-
+  
   public static ZeppelinHeartbeat newInstance(ZeppelinClient client) {
     return new ZeppelinHeartbeat(client);
   }
-
+  
   private ZeppelinHeartbeat(ZeppelinClient client) {
     this.client = client;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/scheduler/ZeppelinHubHeartbeat.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/scheduler/ZeppelinHubHeartbeat.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/scheduler/ZeppelinHubHeartbeat.java
index 9a7e7a8..2282147 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/scheduler/ZeppelinHubHeartbeat.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/scheduler/ZeppelinHubHeartbeat.java
@@ -22,24 +22,27 @@ import org.apache.zeppelin.notebook.repo.zeppelinhub.websocket.utils.Zeppelinhub
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Routine that send PING event to zeppelinhub. */
+/**
+ * Routine that send PING event to zeppelinhub.
+ *
+ */
 public class ZeppelinHubHeartbeat implements Runnable {
   private static final Logger LOG = LoggerFactory.getLogger(ZeppelinHubHeartbeat.class);
   private ZeppelinhubClient client;
-
+  
   public static ZeppelinHubHeartbeat newInstance(ZeppelinhubClient client) {
     return new ZeppelinHubHeartbeat(client);
   }
-
+  
   private ZeppelinHubHeartbeat(ZeppelinhubClient client) {
     this.client = client;
   }
-
+  
   @Override
   public void run() {
     LOG.debug("Sending PING to zeppelinhub token");
-    for (String token : UserTokenContainer.getInstance().getAllTokens()) {
+    for (String token: UserTokenContainer.getInstance().getAllTokens()) {
       client.send(ZeppelinhubUtils.pingMessage(token), token);
     }
-  }
+  }  
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/session/ZeppelinhubSession.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/session/ZeppelinhubSession.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/session/ZeppelinhubSession.java
index 9cb7249..86cd4ad 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/session/ZeppelinhubSession.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/session/ZeppelinhubSession.java
@@ -21,33 +21,35 @@ import org.eclipse.jetty.websocket.api.Session;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Zeppelinhub session. */
+/**
+ * Zeppelinhub session.
+ */
 public class ZeppelinhubSession {
   private static final Logger LOG = LoggerFactory.getLogger(ZeppelinhubSession.class);
   private Session session;
   private final String token;
-
+  
   public static final ZeppelinhubSession EMPTY = new ZeppelinhubSession(null, StringUtils.EMPTY);
-
+  
   public static ZeppelinhubSession createInstance(Session session, String token) {
     return new ZeppelinhubSession(session, token);
   }
-
+  
   private ZeppelinhubSession(Session session, String token) {
     this.session = session;
     this.token = token;
   }
-
+  
   public boolean isSessionOpen() {
     return ((session != null) && (session.isOpen()));
   }
-
+  
   public void close() {
     if (isSessionOpen()) {
       session.close();
     }
   }
-
+  
   public void sendByFuture(String msg) {
     if (StringUtils.isBlank(msg)) {
       LOG.error("Cannot send event to Zeppelinhub, msg is empty");

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/utils/ZeppelinhubUtils.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/utils/ZeppelinhubUtils.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/utils/ZeppelinhubUtils.java
index b81780b..50da343 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/utils/ZeppelinhubUtils.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/utils/ZeppelinhubUtils.java
@@ -17,6 +17,7 @@
 package org.apache.zeppelin.notebook.repo.zeppelinhub.websocket.utils;
 
 import java.util.HashMap;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.notebook.repo.zeppelinhub.model.UserTokenContainer;
 import org.apache.zeppelin.notebook.repo.zeppelinhub.websocket.ZeppelinhubClient;
@@ -26,7 +27,10 @@ import org.apache.zeppelin.notebook.socket.Message;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Helper class. */
+/**
+ * Helper class.
+ *
+ */
 public class ZeppelinhubUtils {
   private static final Logger LOG = LoggerFactory.getLogger(ZeppelinhubUtils.class);
 
@@ -37,10 +41,11 @@ public class ZeppelinhubUtils {
     }
     HashMap<String, Object> data = new HashMap<>();
     data.put("token", token);
-    return ZeppelinhubMessage.newMessage(ZeppelinHubOp.LIVE, data, new HashMap<String, String>())
-        .toJson();
+    return ZeppelinhubMessage
+             .newMessage(ZeppelinHubOp.LIVE, data, new HashMap<String, String>())
+             .toJson();
   }
-
+  
   public static String deadMessage(String token) {
     if (StringUtils.isBlank(token)) {
       LOG.error("Cannot create Dead message: token is null or empty");
@@ -48,10 +53,11 @@ public class ZeppelinhubUtils {
     }
     HashMap<String, Object> data = new HashMap<>();
     data.put("token", token);
-    return ZeppelinhubMessage.newMessage(ZeppelinHubOp.DEAD, data, new HashMap<String, String>())
-        .toJson();
+    return ZeppelinhubMessage
+             .newMessage(ZeppelinHubOp.DEAD, data, new HashMap<String, String>())
+             .toJson();
   }
-
+  
   public static String pingMessage(String token) {
     if (StringUtils.isBlank(token)) {
       LOG.error("Cannot create Ping message: token is null or empty");
@@ -59,8 +65,9 @@ public class ZeppelinhubUtils {
     }
     HashMap<String, Object> data = new HashMap<>();
     data.put("token", token);
-    return ZeppelinhubMessage.newMessage(ZeppelinHubOp.PING, data, new HashMap<String, String>())
-        .toJson();
+    return ZeppelinhubMessage
+             .newMessage(ZeppelinHubOp.PING, data, new HashMap<String, String>())
+             .toJson();
   }
 
   public static ZeppelinHubOp toZeppelinHubOp(String text) {
@@ -74,7 +81,7 @@ public class ZeppelinhubUtils {
   }
 
   public static boolean isZeppelinHubOp(String text) {
-    return (toZeppelinHubOp(text) != null);
+    return (toZeppelinHubOp(text) != null); 
   }
 
   public static Message.OP toZeppelinOp(String text) {
@@ -88,31 +95,33 @@ public class ZeppelinhubUtils {
   }
 
   public static boolean isZeppelinOp(String text) {
-    return (toZeppelinOp(text) != null);
+    return (toZeppelinOp(text) != null); 
   }
-
+  
   public static void userLoginRoutine(String username) {
     LOG.debug("Executing user login routine");
     String token = UserTokenContainer.getInstance().getUserToken(username);
     UserTokenContainer.getInstance().setUserToken(username, token);
     String msg = ZeppelinhubUtils.liveMessage(token);
-    ZeppelinhubClient.getInstance().send(msg, token);
+    ZeppelinhubClient.getInstance()
+        .send(msg, token);
   }
-
+  
   public static void userLogoutRoutine(String username) {
     LOG.debug("Executing user logout routine");
     String token = UserTokenContainer.getInstance().removeUserToken(username);
     String msg = ZeppelinhubUtils.deadMessage(token);
-    ZeppelinhubClient.getInstance().send(msg, token);
+    ZeppelinhubClient.getInstance()
+        .send(msg, token);
     ZeppelinhubClient.getInstance().removeSession(token);
   }
-
-  public static void userSwitchTokenRoutine(
-      String username, String originToken, String targetToken) {
+  
+  public static void userSwitchTokenRoutine(String username, String originToken,
+      String targetToken) {
     String offMsg = ZeppelinhubUtils.deadMessage(originToken);
     ZeppelinhubClient.getInstance().send(offMsg, originToken);
     ZeppelinhubClient.getInstance().removeSession(originToken);
-
+    
     String onMsg = ZeppelinhubUtils.liveMessage(targetToken);
     ZeppelinhubClient.getInstance().send(onMsg, targetToken);
   }


[43/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterpreter.java
----------------------------------------------------------------------
diff --git a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterpreter.java b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterpreter.java
index 4c21136..95674ea 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterpreter.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterpreter.java
@@ -20,22 +20,7 @@ package org.apache.zeppelin.livy;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.annotations.SerializedName;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.nio.charset.Charset;
-import java.security.KeyStore;
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import javax.net.ssl.SSLContext;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.http.auth.AuthSchemeProvider;
@@ -53,13 +38,6 @@ import org.apache.http.impl.auth.SPNegoSchemeFactory;
 import org.apache.http.impl.client.BasicCredentialsProvider;
 import org.apache.http.impl.client.HttpClientBuilder;
 import org.apache.http.impl.client.HttpClients;
-import org.apache.zeppelin.interpreter.Interpreter;
-import org.apache.zeppelin.interpreter.InterpreterContext;
-import org.apache.zeppelin.interpreter.InterpreterException;
-import org.apache.zeppelin.interpreter.InterpreterResult;
-import org.apache.zeppelin.interpreter.InterpreterResultMessage;
-import org.apache.zeppelin.interpreter.InterpreterUtils;
-import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.http.HttpEntity;
@@ -75,7 +53,35 @@ import org.springframework.web.client.HttpServerErrorException;
 import org.springframework.web.client.RestClientException;
 import org.springframework.web.client.RestTemplate;
 
-/** Base class for livy interpreters. */
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.security.KeyStore;
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.net.ssl.SSLContext;
+
+import org.apache.zeppelin.interpreter.Interpreter;
+import org.apache.zeppelin.interpreter.InterpreterContext;
+import org.apache.zeppelin.interpreter.InterpreterException;
+import org.apache.zeppelin.interpreter.InterpreterResult;
+import org.apache.zeppelin.interpreter.InterpreterResultMessage;
+import org.apache.zeppelin.interpreter.InterpreterUtils;
+import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
+
+/**
+ * Base class for livy interpreters.
+ */
 public abstract class BaseLivyInterpreter extends Interpreter {
 
   protected static final Logger LOGGER = LoggerFactory.getLogger(BaseLivyInterpreter.class);
@@ -96,34 +102,32 @@ public abstract class BaseLivyInterpreter extends Interpreter {
   // delegate to sharedInterpreter when it is available
   protected LivySharedInterpreter sharedInterpreter;
 
-  Set<Object> paragraphsToCancel =
-      Collections.newSetFromMap(new ConcurrentHashMap<Object, Boolean>());
+  Set<Object> paragraphsToCancel = Collections.newSetFromMap(
+      new ConcurrentHashMap<Object, Boolean>());
   private ConcurrentHashMap<String, Integer> paragraphId2StmtProgressMap =
       new ConcurrentHashMap<>();
 
   public BaseLivyInterpreter(Properties property) {
     super(property);
     this.livyURL = property.getProperty("zeppelin.livy.url");
-    this.displayAppInfo =
-        Boolean.parseBoolean(property.getProperty("zeppelin.livy.displayAppInfo", "true"));
-    this.restartDeadSession =
-        Boolean.parseBoolean(property.getProperty("zeppelin.livy.restart_dead_session", "false"));
-    this.sessionCreationTimeout =
-        Integer.parseInt(property.getProperty("zeppelin.livy.session.create_timeout", 120 + ""));
-    this.pullStatusInterval =
-        Integer.parseInt(
-            property.getProperty("zeppelin.livy.pull_status.interval.millis", 1000 + ""));
-    this.maxLogLines = Integer.parseInt(property.getProperty("zeppelin.livy.maxLogLines", "1000"));
+    this.displayAppInfo = Boolean.parseBoolean(
+        property.getProperty("zeppelin.livy.displayAppInfo", "true"));
+    this.restartDeadSession = Boolean.parseBoolean(
+        property.getProperty("zeppelin.livy.restart_dead_session", "false"));
+    this.sessionCreationTimeout = Integer.parseInt(
+        property.getProperty("zeppelin.livy.session.create_timeout", 120 + ""));
+    this.pullStatusInterval = Integer.parseInt(
+        property.getProperty("zeppelin.livy.pull_status.interval.millis", 1000 + ""));
+    this.maxLogLines = Integer.parseInt(property.getProperty("zeppelin.livy.maxLogLines",
+        "1000"));
     this.restTemplate = createRestTemplate();
     if (!StringUtils.isBlank(property.getProperty("zeppelin.livy.http.headers"))) {
       String[] headers = property.getProperty("zeppelin.livy.http.headers").split(";");
       for (String header : headers) {
         String[] splits = header.split(":", -1);
         if (splits.length != 2) {
-          throw new RuntimeException(
-              "Invalid format of http headers: "
-                  + header
-                  + ", valid http header format is HEADER_NAME:HEADER_VALUE");
+          throw new RuntimeException("Invalid format of http headers: " + header +
+              ", valid http header format is HEADER_NAME:HEADER_VALUE");
         }
         customHeaders.put(splits[0].trim(), envSubstitute(splits[1].trim()));
       }
@@ -159,8 +163,8 @@ public abstract class BaseLivyInterpreter extends Interpreter {
         initLivySession();
       }
     } catch (LivyException e) {
-      String msg =
-          "Fail to create session, please check livy interpreter log and " + "livy server log";
+      String msg = "Fail to create session, please check livy interpreter log and " +
+          "livy server log";
       throw new InterpreterException(msg, e);
     }
   }
@@ -187,17 +191,14 @@ public abstract class BaseLivyInterpreter extends Interpreter {
         sessionInfo.appId = extractAppId();
       }
 
-      if (sessionInfo.appInfo == null
-          || StringUtils.isEmpty(sessionInfo.appInfo.get("sparkUiUrl"))) {
+      if (sessionInfo.appInfo == null ||
+          StringUtils.isEmpty(sessionInfo.appInfo.get("sparkUiUrl"))) {
         sessionInfo.webUIAddress = extractWebUIAddress();
       } else {
         sessionInfo.webUIAddress = sessionInfo.appInfo.get("sparkUiUrl");
       }
-      LOGGER.info(
-          "Create livy session successfully with sessionId: {}, appId: {}, webUI: {}",
-          sessionInfo.id,
-          sessionInfo.appId,
-          sessionInfo.webUIAddress);
+      LOGGER.info("Create livy session successfully with sessionId: {}, appId: {}, webUI: {}",
+          sessionInfo.id, sessionInfo.appId, sessionInfo.webUIAddress);
     } else {
       LOGGER.info("Create livy session successfully with sessionId: {}", this.sessionInfo.id);
     }
@@ -234,20 +235,20 @@ public abstract class BaseLivyInterpreter extends Interpreter {
       return interpret(st, null, context.getParagraphId(), this.displayAppInfo, true, true);
     } catch (LivyException e) {
       LOGGER.error("Fail to interpret:" + st, e);
-      return new InterpreterResult(
-          InterpreterResult.Code.ERROR, InterpreterUtils.getMostRelevantMessage(e));
+      return new InterpreterResult(InterpreterResult.Code.ERROR,
+          InterpreterUtils.getMostRelevantMessage(e));
     }
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     List<InterpreterCompletion> candidates = Collections.emptyList();
     try {
       candidates = callCompletion(new CompletionRequest(buf, getSessionKind(), cursor));
     } catch (SessionNotFoundException e) {
-      LOGGER.warn(
-          "Livy session {} is expired. Will return empty list of candidates.", getSessionInfo().id);
+      LOGGER.warn("Livy session {} is expired. Will return empty list of candidates.",
+          getSessionInfo().id);
     } catch (LivyException le) {
       logger.error("Failed to call code completions. Will return empty list of candidates", le);
     }
@@ -257,10 +258,8 @@ public abstract class BaseLivyInterpreter extends Interpreter {
   private List<InterpreterCompletion> callCompletion(CompletionRequest req) throws LivyException {
     List<InterpreterCompletion> candidates = new ArrayList<>();
     try {
-      CompletionResponse resp =
-          CompletionResponse.fromJson(
-              callRestAPI(
-                  "/sessions/" + getSessionInfo().id + "/completion", "POST", req.toJson()));
+      CompletionResponse resp = CompletionResponse.fromJson(
+          callRestAPI("/sessions/" + getSessionInfo().id + "/completion", "POST", req.toJson()));
       for (String candidate : resp.candidates) {
         candidates.add(new InterpreterCompletion(candidate, candidate, StringUtils.EMPTY));
       }
@@ -299,51 +298,37 @@ public abstract class BaseLivyInterpreter extends Interpreter {
     return 0;
   }
 
-  private SessionInfo createSession(String user, String kind) throws LivyException {
+  private SessionInfo createSession(String user, String kind)
+      throws LivyException {
     try {
       Map<String, String> conf = new HashMap<>();
       for (Map.Entry<Object, Object> entry : getProperties().entrySet()) {
-        if (entry.getKey().toString().startsWith("livy.spark.")
-            && !entry.getValue().toString().isEmpty()) {
+        if (entry.getKey().toString().startsWith("livy.spark.") &&
+            !entry.getValue().toString().isEmpty()) {
           conf.put(entry.getKey().toString().substring(5), entry.getValue().toString());
         }
       }
 
-      CreateSessionRequest request =
-          new CreateSessionRequest(
-              kind, user == null || user.equals("anonymous") ? null : user, conf);
-      SessionInfo sessionInfo =
-          SessionInfo.fromJson(callRestAPI("/sessions", "POST", request.toJson()));
+      CreateSessionRequest request = new CreateSessionRequest(kind,
+          user == null || user.equals("anonymous") ? null : user, conf);
+      SessionInfo sessionInfo = SessionInfo.fromJson(
+          callRestAPI("/sessions", "POST", request.toJson()));
       long start = System.currentTimeMillis();
       // pull the session status until it is idle or timeout
       while (!sessionInfo.isReady()) {
         if ((System.currentTimeMillis() - start) / 1000 > sessionCreationTimeout) {
-          String msg =
-              "The creation of session "
-                  + sessionInfo.id
-                  + " is timeout within "
-                  + sessionCreationTimeout
-                  + " seconds, appId: "
-                  + sessionInfo.appId
-                  + ", log:\n"
-                  + StringUtils.join(getSessionLog(sessionInfo.id).log, "\n");
+          String msg = "The creation of session " + sessionInfo.id + " is timeout within "
+              + sessionCreationTimeout + " seconds, appId: " + sessionInfo.appId
+              + ", log:\n" + StringUtils.join(getSessionLog(sessionInfo.id).log, "\n");
           throw new LivyException(msg);
         }
         Thread.sleep(pullStatusInterval);
         sessionInfo = getSessionInfo(sessionInfo.id);
-        LOGGER.info(
-            "Session {} is in state {}, appId {}",
-            sessionInfo.id,
-            sessionInfo.state,
+        LOGGER.info("Session {} is in state {}, appId {}", sessionInfo.id, sessionInfo.state,
             sessionInfo.appId);
         if (sessionInfo.isFinished()) {
-          String msg =
-              "Session "
-                  + sessionInfo.id
-                  + " is finished, appId: "
-                  + sessionInfo.appId
-                  + ", log:\n"
-                  + StringUtils.join(getSessionLog(sessionInfo.id).log, "\n");
+          String msg = "Session " + sessionInfo.id + " is finished, appId: " + sessionInfo.appId
+              + ", log:\n" + StringUtils.join(getSessionLog(sessionInfo.id).log, "\n");
           throw new LivyException(msg);
         }
       }
@@ -359,34 +344,25 @@ public abstract class BaseLivyInterpreter extends Interpreter {
   }
 
   private SessionLog getSessionLog(int sessionId) throws LivyException {
-    return SessionLog.fromJson(
-        callRestAPI("/sessions/" + sessionId + "/log?size=" + maxLogLines, "GET"));
+    return SessionLog.fromJson(callRestAPI("/sessions/" + sessionId + "/log?size=" + maxLogLines,
+        "GET"));
   }
 
-  public InterpreterResult interpret(
-      String code,
-      String paragraphId,
-      boolean displayAppInfo,
-      boolean appendSessionExpired,
-      boolean appendSessionDead)
-      throws LivyException {
-    return interpret(
-        code,
-        sharedInterpreter.isSupported() ? getSessionKind() : null,
-        paragraphId,
-        displayAppInfo,
-        appendSessionExpired,
-        appendSessionDead);
-  }
-
-  public InterpreterResult interpret(
-      String code,
-      String codeType,
-      String paragraphId,
-      boolean displayAppInfo,
-      boolean appendSessionExpired,
-      boolean appendSessionDead)
-      throws LivyException {
+  public InterpreterResult interpret(String code,
+                                     String paragraphId,
+                                     boolean displayAppInfo,
+                                     boolean appendSessionExpired,
+                                     boolean appendSessionDead) throws LivyException {
+    return interpret(code, sharedInterpreter.isSupported() ? getSessionKind() : null,
+        paragraphId, displayAppInfo, appendSessionExpired, appendSessionDead);
+  }
+
+  public InterpreterResult interpret(String code,
+                                     String codeType,
+                                     String paragraphId,
+                                     boolean displayAppInfo,
+                                     boolean appendSessionExpired,
+                                     boolean appendSessionDead) throws LivyException {
     StatementInfo stmtInfo = null;
     boolean sessionExpired = false;
     boolean sessionDead = false;
@@ -417,9 +393,8 @@ public abstract class BaseLivyInterpreter extends Interpreter {
           }
           stmtInfo = executeStatement(new ExecuteRequest(code, codeType));
         } else {
-          throw new LivyException(
-              "%html <font color=\"red\">Livy session is dead somehow, "
-                  + "please check log to see why it is dead, and then restart livy interpreter</font>");
+          throw new LivyException("%html <font color=\"red\">Livy session is dead somehow, " +
+              "please check log to see why it is dead, and then restart livy interpreter</font>");
         }
       }
 
@@ -441,8 +416,8 @@ public abstract class BaseLivyInterpreter extends Interpreter {
         }
       }
       if (appendSessionExpired || appendSessionDead) {
-        return appendSessionExpireDead(
-            getResultFromStatementInfo(stmtInfo, displayAppInfo), sessionExpired, sessionDead);
+        return appendSessionExpireDead(getResultFromStatementInfo(stmtInfo, displayAppInfo),
+            sessionExpired, sessionDead);
       } else {
         return getResultFromStatementInfo(stmtInfo, displayAppInfo);
       }
@@ -485,20 +460,20 @@ public abstract class BaseLivyInterpreter extends Interpreter {
     }
   }
 
-  private InterpreterResult appendSessionExpireDead(
-      InterpreterResult result, boolean sessionExpired, boolean sessionDead) {
+  private InterpreterResult appendSessionExpireDead(InterpreterResult result,
+                                                    boolean sessionExpired,
+                                                    boolean sessionDead) {
     InterpreterResult result2 = new InterpreterResult(result.code());
     if (sessionExpired) {
-      result2.add(
-          InterpreterResult.Type.HTML,
-          "<font color=\"red\">Previous livy session is expired, new livy session is created. "
-              + "Paragraphs that depend on this paragraph need to be re-executed!</font>");
+      result2.add(InterpreterResult.Type.HTML,
+          "<font color=\"red\">Previous livy session is expired, new livy session is created. " +
+              "Paragraphs that depend on this paragraph need to be re-executed!</font>");
+
     }
     if (sessionDead) {
-      result2.add(
-          InterpreterResult.Type.HTML,
-          "<font color=\"red\">Previous livy session is dead, new livy session is created. "
-              + "Paragraphs that depend on this paragraph need to be re-executed!</font>");
+      result2.add(InterpreterResult.Type.HTML,
+          "<font color=\"red\">Previous livy session is dead, new livy session is created. " +
+              "Paragraphs that depend on this paragraph need to be re-executed!</font>");
     }
 
     for (InterpreterResultMessage message : result.message()) {
@@ -507,8 +482,8 @@ public abstract class BaseLivyInterpreter extends Interpreter {
     return result2;
   }
 
-  private InterpreterResult getResultFromStatementInfo(
-      StatementInfo stmtInfo, boolean displayAppInfo) {
+  private InterpreterResult getResultFromStatementInfo(StatementInfo stmtInfo,
+                                                       boolean displayAppInfo) {
     if (stmtInfo.output != null && stmtInfo.output.isError()) {
       InterpreterResult result = new InterpreterResult(InterpreterResult.Code.ERROR);
       StringBuilder sb = new StringBuilder();
@@ -530,7 +505,7 @@ public abstract class BaseLivyInterpreter extends Interpreter {
       // 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)
+      //TODO(zjffdu) support other types of data (like json, image and etc)
       String result = stmtInfo.output.data.plainText;
 
       // check table magic result first
@@ -551,13 +526,11 @@ public abstract class BaseLivyInterpreter extends Interpreter {
           outputBuilder.append(StringUtils.join(row, "\t"));
           outputBuilder.append("\n");
         }
-        return new InterpreterResult(
-            InterpreterResult.Code.SUCCESS, InterpreterResult.Type.TABLE, outputBuilder.toString());
+        return new InterpreterResult(InterpreterResult.Code.SUCCESS,
+            InterpreterResult.Type.TABLE, outputBuilder.toString());
       } else if (stmtInfo.output.data.imagePng != null) {
-        return new InterpreterResult(
-            InterpreterResult.Code.SUCCESS,
-            InterpreterResult.Type.IMG,
-            (String) stmtInfo.output.data.imagePng);
+        return new InterpreterResult(InterpreterResult.Code.SUCCESS,
+            InterpreterResult.Type.IMG, (String) stmtInfo.output.data.imagePng);
       } else if (result != null) {
         result = result.trim();
         if (result.startsWith("<link")
@@ -571,15 +544,9 @@ public abstract class BaseLivyInterpreter extends Interpreter {
       if (displayAppInfo) {
         InterpreterResult interpreterResult = new InterpreterResult(InterpreterResult.Code.SUCCESS);
         interpreterResult.add(result);
-        String appInfoHtml =
-            "<hr/>Spark Application Id: "
-                + sessionInfo.appId
-                + "<br/>"
-                + "Spark WebUI: <a href=\""
-                + sessionInfo.webUIAddress
-                + "\">"
-                + sessionInfo.webUIAddress
-                + "</a>";
+        String appInfoHtml = "<hr/>Spark Application Id: " + sessionInfo.appId + "<br/>"
+            + "Spark WebUI: <a href=\"" + sessionInfo.webUIAddress + "\">"
+            + sessionInfo.webUIAddress + "</a>";
         interpreterResult.add(InterpreterResult.Type.HTML, appInfoHtml);
         return interpreterResult;
       } else {
@@ -588,13 +555,14 @@ public abstract class BaseLivyInterpreter extends Interpreter {
     }
   }
 
-  private StatementInfo executeStatement(ExecuteRequest executeRequest) throws LivyException {
-    return StatementInfo.fromJson(
-        callRestAPI(
-            "/sessions/" + sessionInfo.id + "/statements", "POST", executeRequest.toJson()));
+  private StatementInfo executeStatement(ExecuteRequest executeRequest)
+      throws LivyException {
+    return StatementInfo.fromJson(callRestAPI("/sessions/" + sessionInfo.id + "/statements", "POST",
+        executeRequest.toJson()));
   }
 
-  private StatementInfo getStatementInfo(int statementId) throws LivyException {
+  private StatementInfo getStatementInfo(int statementId)
+      throws LivyException {
     return StatementInfo.fromJson(
         callRestAPI("/sessions/" + sessionInfo.id + "/statements/" + statementId, "GET"));
   }
@@ -603,11 +571,12 @@ public abstract class BaseLivyInterpreter extends Interpreter {
     callRestAPI("/sessions/" + sessionInfo.id + "/statements/" + statementId + "/cancel", "POST");
   }
 
+
   private RestTemplate createRestTemplate() {
     String keytabLocation = getProperty("zeppelin.livy.keytab");
     String principal = getProperty("zeppelin.livy.principal");
-    boolean isSpnegoEnabled =
-        StringUtils.isNotEmpty(keytabLocation) && StringUtils.isNotEmpty(principal);
+    boolean isSpnegoEnabled = StringUtils.isNotEmpty(keytabLocation) &&
+        StringUtils.isNotEmpty(principal);
 
     HttpClient httpClient = null;
     if (livyURL.startsWith("https:")) {
@@ -617,37 +586,37 @@ public abstract class BaseLivyInterpreter extends Interpreter {
         throw new RuntimeException("No zeppelin.livy.ssl.trustStore specified for livy ssl");
       }
       if (StringUtils.isBlank(password)) {
-        throw new RuntimeException(
-            "No zeppelin.livy.ssl.trustStorePassword specified " + "for livy ssl");
+        throw new RuntimeException("No zeppelin.livy.ssl.trustStorePassword specified " +
+            "for livy ssl");
       }
       FileInputStream inputStream = null;
       try {
         inputStream = new FileInputStream(keystoreFile);
         KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
         trustStore.load(new FileInputStream(keystoreFile), password.toCharArray());
-        SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(trustStore).build();
+        SSLContext sslContext = SSLContexts.custom()
+            .loadTrustMaterial(trustStore)
+            .build();
         SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext);
         HttpClientBuilder httpClientBuilder = HttpClients.custom().setSSLSocketFactory(csf);
-        RequestConfig reqConfig =
-            new RequestConfig() {
-              @Override
-              public boolean isAuthenticationEnabled() {
-                return true;
-              }
-            };
+        RequestConfig reqConfig = new RequestConfig() {
+          @Override
+          public boolean isAuthenticationEnabled() {
+            return true;
+          }
+        };
         httpClientBuilder.setDefaultRequestConfig(reqConfig);
-        Credentials credentials =
-            new Credentials() {
-              @Override
-              public String getPassword() {
-                return null;
-              }
-
-              @Override
-              public Principal getUserPrincipal() {
-                return null;
-              }
-            };
+        Credentials credentials = new Credentials() {
+          @Override
+          public String getPassword() {
+            return null;
+          }
+
+          @Override
+          public Principal getUserPrincipal() {
+            return null;
+          }
+        };
         CredentialsProvider credsProvider = new BasicCredentialsProvider();
         credsProvider.setCredentials(AuthScope.ANY, credentials);
         httpClientBuilder.setDefaultCredentialsProvider(credsProvider);
@@ -687,9 +656,8 @@ public abstract class BaseLivyInterpreter extends Interpreter {
         restTemplate = new RestTemplate(new HttpComponentsClientHttpRequestFactory(httpClient));
       }
     }
-    restTemplate
-        .getMessageConverters()
-        .add(0, new StringHttpMessageConverter(Charset.forName("UTF-8")));
+    restTemplate.getMessageConverters().add(0,
+            new StringHttpMessageConverter(Charset.forName("UTF-8")));
     return restTemplate;
   }
 
@@ -721,10 +689,8 @@ public abstract class BaseLivyInterpreter extends Interpreter {
       }
     } catch (HttpClientErrorException e) {
       response = new ResponseEntity(e.getResponseBodyAsString(), e.getStatusCode());
-      LOGGER.error(
-          String.format(
-              "Error with %s StatusCode: %s",
-              response.getStatusCode().value(), e.getResponseBodyAsString()));
+      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) {
@@ -732,10 +698,8 @@ public abstract class BaseLivyInterpreter extends Interpreter {
         if (cause.getResponseBodyAsString().matches(SESSION_NOT_FOUND_PATTERN)) {
           throw new SessionNotFoundException(cause.getResponseBodyAsString());
         }
-        throw new LivyException(
-            cause.getResponseBodyAsString()
-                + "\n"
-                + ExceptionUtils.getFullStackTrace(ExceptionUtils.getRootCause(e)));
+        throw new LivyException(cause.getResponseBodyAsString() + "\n"
+            + ExceptionUtils.getFullStackTrace(ExceptionUtils.getRootCause(e)));
       }
       if (e instanceof HttpServerErrorException) {
         HttpServerErrorException errorException = (HttpServerErrorException) e;
@@ -750,27 +714,25 @@ public abstract class BaseLivyInterpreter extends Interpreter {
     if (response == null) {
       throw new LivyException("No http response returned");
     }
-    LOGGER.debug(
-        "Get response, StatusCode: {}, responseBody: {}",
-        response.getStatusCode(),
+    LOGGER.debug("Get response, StatusCode: {}, responseBody: {}", response.getStatusCode(),
         response.getBody());
-    if (response.getStatusCode().value() == 200 || response.getStatusCode().value() == 201) {
+    if (response.getStatusCode().value() == 200
+        || response.getStatusCode().value() == 201) {
       return response.getBody();
     } else if (response.getStatusCode().value() == 404) {
       if (response.getBody().matches(SESSION_NOT_FOUND_PATTERN)) {
         throw new SessionNotFoundException(response.getBody());
       } else {
-        throw new APINotFoundException(
-            "No rest api found for " + targetURL + ", " + response.getStatusCode());
+        throw new APINotFoundException("No rest api found for " + targetURL +
+            ", " + response.getStatusCode());
       }
     } else {
       String responseString = response.getBody();
       if (responseString.contains("CreateInteractiveRequest[\\\"master\\\"]")) {
         return responseString;
       }
-      throw new LivyException(
-          String.format(
-              "Error with %s StatusCode: %s", response.getStatusCode().value(), responseString));
+      throw new LivyException(String.format("Error with %s StatusCode: %s",
+          response.getStatusCode().value(), responseString));
     }
   }
 
@@ -778,23 +740,21 @@ public abstract class BaseLivyInterpreter extends Interpreter {
     try {
       callRestAPI("/sessions/" + sessionId, "DELETE");
     } catch (Exception e) {
-      LOGGER.error(
-          String.format("Error closing session for user with session ID: %s", sessionId), e);
+      LOGGER.error(String.format("Error closing session for user with session ID: %s",
+          sessionId), e);
     }
   }
 
   /*
-   * We create these POJO here to accommodate livy 0.3 which is not released yet. livy rest api has
-   * some changes from version to version. So we create these POJO in zeppelin side to accommodate
-   * incompatibility between versions. Later, when livy become more stable, we could just depend on
-   * livy client jar.
-   */
+  * We create these POJO here to accommodate livy 0.3 which is not released yet. livy rest api has
+  * some changes from version to version. So we create these POJO in zeppelin side to accommodate
+  * incompatibility between versions. Later, when livy become more stable, we could just depend on
+  * livy client jar.
+  */
   private static class CreateSessionRequest {
     public final String kind;
-
     @SerializedName("proxyUser")
     public final String user;
-
     public final Map<String, String> conf;
 
     CreateSessionRequest(String kind, String user, Map<String, String> conf) {
@@ -808,7 +768,9 @@ public abstract class BaseLivyInterpreter extends Interpreter {
     }
   }
 
-  /** */
+  /**
+   *
+   */
   public static class SessionInfo {
 
     public final int id;
@@ -821,15 +783,8 @@ public abstract class BaseLivyInterpreter extends Interpreter {
     public final Map<String, String> appInfo;
     public final List<String> log;
 
-    public SessionInfo(
-        int id,
-        String appId,
-        String owner,
-        String proxyUser,
-        String state,
-        String kind,
-        Map<String, String> appInfo,
-        List<String> log) {
+    public SessionInfo(int id, String appId, String owner, String proxyUser, String state,
+                       String kind, Map<String, String> appInfo, List<String> log) {
       this.id = id;
       this.appId = appId;
       this.owner = owner;
@@ -859,7 +814,8 @@ public abstract class BaseLivyInterpreter extends Interpreter {
     public int size;
     public List<String> log;
 
-    SessionLog() {}
+    SessionLog() {
+    }
 
     public static SessionLog fromJson(String json) {
       return gson.fromJson(json, SessionLog.class);
@@ -886,7 +842,8 @@ public abstract class BaseLivyInterpreter extends Interpreter {
     public double progress;
     public StatementOutput output;
 
-    StatementInfo() {}
+    StatementInfo() {
+    }
 
     public static StatementInfo fromJson(String json) {
       String rightJson = "";
@@ -931,13 +888,10 @@ public abstract class BaseLivyInterpreter extends Interpreter {
       private static class Data {
         @SerializedName("text/plain")
         public String plainText;
-
         @SerializedName("image/png")
         public String imagePng;
-
         @SerializedName("application/json")
         public String applicationJson;
-
         @SerializedName("application/vnd.livy.table.v1+json")
         public TableMagic applicationLivyTableJson;
       }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/livy/src/main/java/org/apache/zeppelin/livy/LivyException.java
----------------------------------------------------------------------
diff --git a/livy/src/main/java/org/apache/zeppelin/livy/LivyException.java b/livy/src/main/java/org/apache/zeppelin/livy/LivyException.java
index 4039004..c14351f 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/LivyException.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/LivyException.java
@@ -19,9 +19,12 @@ package org.apache.zeppelin.livy;
 
 import org.apache.zeppelin.interpreter.InterpreterException;
 
-/** Livy api related exception. */
+/**
+ * Livy api related exception.
+ */
 public class LivyException extends InterpreterException {
-  public LivyException() {}
+  public LivyException() {
+  }
 
   public LivyException(String message) {
     super(message);
@@ -35,8 +38,8 @@ public class LivyException extends InterpreterException {
     super(cause);
   }
 
-  public LivyException(
-      String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+  public LivyException(String message, Throwable cause, boolean enableSuppression,
+                       boolean writableStackTrace) {
     super(message, cause, enableSuppression, writableStackTrace);
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/livy/src/main/java/org/apache/zeppelin/livy/LivyPySpark3Interpreter.java
----------------------------------------------------------------------
diff --git a/livy/src/main/java/org/apache/zeppelin/livy/LivyPySpark3Interpreter.java b/livy/src/main/java/org/apache/zeppelin/livy/LivyPySpark3Interpreter.java
index d074e32..174c2c0 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/LivyPySpark3Interpreter.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/LivyPySpark3Interpreter.java
@@ -19,7 +19,10 @@ package org.apache.zeppelin.livy;
 
 import java.util.Properties;
 
-/** Livy PySpark interpreter for Zeppelin. */
+
+/**
+ * Livy PySpark interpreter for Zeppelin.
+ */
 public class LivyPySpark3Interpreter extends LivyPySparkBaseInterpreter {
 
   public LivyPySpark3Interpreter(Properties property) {
@@ -30,4 +33,5 @@ public class LivyPySpark3Interpreter extends LivyPySparkBaseInterpreter {
   public String getSessionKind() {
     return "pyspark3";
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/livy/src/main/java/org/apache/zeppelin/livy/LivyPySparkBaseInterpreter.java
----------------------------------------------------------------------
diff --git a/livy/src/main/java/org/apache/zeppelin/livy/LivyPySparkBaseInterpreter.java b/livy/src/main/java/org/apache/zeppelin/livy/LivyPySparkBaseInterpreter.java
index c5729d1..32399c6 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/LivyPySparkBaseInterpreter.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/LivyPySparkBaseInterpreter.java
@@ -19,7 +19,9 @@ package org.apache.zeppelin.livy;
 
 import java.util.Properties;
 
-/** Base class for PySpark Interpreter. */
+/**
+ * Base class for PySpark Interpreter.
+ */
 public abstract class LivyPySparkBaseInterpreter extends BaseLivyInterpreter {
 
   public LivyPySparkBaseInterpreter(Properties property) {
@@ -29,21 +31,22 @@ public abstract class LivyPySparkBaseInterpreter extends BaseLivyInterpreter {
   @Override
   protected String extractAppId() throws LivyException {
     return extractStatementResult(
-        interpret("sc.applicationId", null, false, false, false).message().get(0).getData());
+        interpret("sc.applicationId", null, false, false, false).message()
+            .get(0).getData());
   }
 
   @Override
   protected String extractWebUIAddress() throws LivyException {
     return extractStatementResult(
-        interpret("sc._jsc.sc().ui().get().appUIAddress()", null, false, false, false)
-            .message()
-            .get(0)
-            .getData());
+        interpret(
+            "sc._jsc.sc().ui().get().appUIAddress()", null, false, false, false)
+            .message().get(0).getData());
   }
 
   /**
-   * Extract the eval result of spark shell, e.g. extract application_1473129941656_0048 from
-   * following: u'application_1473129941656_0048'
+   * Extract the eval result of spark shell, e.g. extract application_1473129941656_0048
+   * from following:
+   * u'application_1473129941656_0048'
    *
    * @param result
    * @return
@@ -53,8 +56,8 @@ public abstract class LivyPySparkBaseInterpreter extends BaseLivyInterpreter {
     if ((pos = result.indexOf("'")) >= 0) {
       return result.substring(pos + 1, result.length() - 1).trim();
     } else {
-      throw new RuntimeException(
-          "No result can be extracted from '" + result + "', " + "something must be wrong");
+      throw new RuntimeException("No result can be extracted from '" + result + "', " +
+          "something must be wrong");
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/livy/src/main/java/org/apache/zeppelin/livy/LivyPySparkInterpreter.java
----------------------------------------------------------------------
diff --git a/livy/src/main/java/org/apache/zeppelin/livy/LivyPySparkInterpreter.java b/livy/src/main/java/org/apache/zeppelin/livy/LivyPySparkInterpreter.java
index 9b15274..d664bbe 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/LivyPySparkInterpreter.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/LivyPySparkInterpreter.java
@@ -19,7 +19,10 @@ package org.apache.zeppelin.livy;
 
 import java.util.Properties;
 
-/** Livy PySpark interpreter for Zeppelin. */
+
+/**
+ * Livy PySpark interpreter for Zeppelin.
+ */
 public class LivyPySparkInterpreter extends LivyPySparkBaseInterpreter {
 
   public LivyPySparkInterpreter(Properties property) {
@@ -30,4 +33,6 @@ public class LivyPySparkInterpreter extends LivyPySparkBaseInterpreter {
   public String getSessionKind() {
     return "pyspark";
   }
+
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/livy/src/main/java/org/apache/zeppelin/livy/LivySharedInterpreter.java
----------------------------------------------------------------------
diff --git a/livy/src/main/java/org/apache/zeppelin/livy/LivySharedInterpreter.java b/livy/src/main/java/org/apache/zeppelin/livy/LivySharedInterpreter.java
index df0fd07..c912dc9 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/LivySharedInterpreter.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/LivySharedInterpreter.java
@@ -17,16 +17,20 @@
 
 package org.apache.zeppelin.livy;
 
-import java.util.Properties;
 import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Properties;
+
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.InterpreterUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Livy Interpreter for shared kind which share SparkContext across spark/pyspark/r. */
+/**
+ * Livy Interpreter for shared kind which share SparkContext across spark/pyspark/r.
+ */
 public class LivySharedInterpreter extends BaseLivyInterpreter {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(LivySharedInterpreter.class);
@@ -59,8 +63,8 @@ public class LivySharedInterpreter extends BaseLivyInterpreter {
         isSupported = false;
       }
     } catch (LivyException e) {
-      String msg =
-          "Fail to create session, please check livy interpreter log and " + "livy server log";
+      String msg = "Fail to create session, please check livy interpreter log and " +
+          "livy server log";
       throw new InterpreterException(msg, e);
     }
   }
@@ -78,8 +82,8 @@ public class LivySharedInterpreter extends BaseLivyInterpreter {
       return interpret(st, codeType, context.getParagraphId(), this.displayAppInfo, true, true);
     } catch (LivyException e) {
       LOGGER.error("Fail to interpret:" + st, e);
-      return new InterpreterResult(
-          InterpreterResult.Code.ERROR, InterpreterUtils.getMostRelevantMessage(e));
+      return new InterpreterResult(InterpreterResult.Code.ERROR,
+          InterpreterUtils.getMostRelevantMessage(e));
     }
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/livy/src/main/java/org/apache/zeppelin/livy/LivySparkInterpreter.java
----------------------------------------------------------------------
diff --git a/livy/src/main/java/org/apache/zeppelin/livy/LivySparkInterpreter.java b/livy/src/main/java/org/apache/zeppelin/livy/LivySparkInterpreter.java
index e7b3570..ad62e9b 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/LivySparkInterpreter.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/LivySparkInterpreter.java
@@ -19,7 +19,9 @@ package org.apache.zeppelin.livy;
 
 import java.util.Properties;
 
-/** Livy Spark interpreter for Zeppelin. */
+/**
+ * Livy Spark interpreter for Zeppelin.
+ */
 public class LivySparkInterpreter extends BaseLivyInterpreter {
 
   public LivySparkInterpreter(Properties property) {
@@ -34,7 +36,8 @@ public class LivySparkInterpreter extends BaseLivyInterpreter {
   @Override
   protected String extractAppId() throws LivyException {
     return extractStatementResult(
-        interpret("sc.applicationId", null, false, false, false).message().get(0).getData());
+        interpret("sc.applicationId", null, false, false, false).message()
+            .get(0).getData());
   }
 
   @Override
@@ -42,25 +45,17 @@ public class LivySparkInterpreter extends BaseLivyInterpreter {
     interpret(
         "val webui=sc.getClass.getMethod(\"ui\").invoke(sc).asInstanceOf[Some[_]].get",
         null,
-        null,
-        false,
-        false,
-        false);
+        null, false, false, false);
     return extractStatementResult(
         interpret(
-                "webui.getClass.getMethod(\"appUIAddress\").invoke(webui)",
-                null,
-                false,
-                false,
-                false)
-            .message()
-            .get(0)
-            .getData());
+            "webui.getClass.getMethod(\"appUIAddress\").invoke(webui)", null, false, false, false)
+            .message().get(0).getData());
   }
 
   /**
-   * Extract the eval result of spark shell, e.g. extract application_1473129941656_0048 from
-   * following: res0: String = application_1473129941656_0048
+   * Extract the eval result of spark shell, e.g. extract application_1473129941656_0048
+   * from following:
+   * res0: String = application_1473129941656_0048
    *
    * @param result
    * @return
@@ -70,8 +65,8 @@ public class LivySparkInterpreter extends BaseLivyInterpreter {
     if ((pos = result.indexOf("=")) >= 0) {
       return result.substring(pos + 1).trim();
     } else {
-      throw new RuntimeException(
-          "No result can be extracted from '" + result + "', " + "something must be wrong");
+      throw new RuntimeException("No result can be extracted from '" + result + "', " +
+          "something must be wrong");
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/livy/src/main/java/org/apache/zeppelin/livy/LivySparkRInterpreter.java
----------------------------------------------------------------------
diff --git a/livy/src/main/java/org/apache/zeppelin/livy/LivySparkRInterpreter.java b/livy/src/main/java/org/apache/zeppelin/livy/LivySparkRInterpreter.java
index 6aab4f0..c270437 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/LivySparkRInterpreter.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/LivySparkRInterpreter.java
@@ -19,7 +19,10 @@ package org.apache.zeppelin.livy;
 
 import java.util.Properties;
 
-/** Livy PySpark interpreter for Zeppelin. */
+
+/**
+ * Livy PySpark interpreter for Zeppelin.
+ */
 public class LivySparkRInterpreter extends BaseLivyInterpreter {
 
   public LivySparkRInterpreter(Properties property) {
@@ -33,13 +36,13 @@ public class LivySparkRInterpreter extends BaseLivyInterpreter {
 
   @Override
   protected String extractAppId() throws LivyException {
-    // TODO(zjffdu) depends on SparkR
+    //TODO(zjffdu) depends on SparkR
     return null;
   }
 
   @Override
   protected String extractWebUIAddress() throws LivyException {
-    // TODO(zjffdu) depends on SparkR
+    //TODO(zjffdu) depends on SparkR
     return null;
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 12c641a..b2e18f3 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/LivySparkSQLInterpreter.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/LivySparkSQLInterpreter.java
@@ -17,11 +17,6 @@
 
 package org.apache.zeppelin.livy;
 
-import static org.apache.commons.lang.StringEscapeUtils.escapeJavaScript;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -33,7 +28,15 @@ import org.apache.zeppelin.interpreter.ResultMessages;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
 
-/** Livy SparkSQL Interpreter for Zeppelin. */
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import static org.apache.commons.lang.StringEscapeUtils.escapeJavaScript;
+
+/**
+ * Livy SparkSQL Interpreter for Zeppelin.
+ */
 public class LivySparkSQLInterpreter extends BaseLivyInterpreter {
   public static final String ZEPPELIN_LIVY_SPARK_SQL_FIELD_TRUNCATE =
       "zeppelin.livy.spark.sql.field.truncate";
@@ -68,13 +71,13 @@ public class LivySparkSQLInterpreter extends BaseLivyInterpreter {
     // As we don't know whether livyserver use spark2 or spark1, so we will detect SparkSession
     // to judge whether it is using spark2.
     try {
-      InterpreterContext context =
-          InterpreterContext.builder().setInterpreterOut(new InterpreterOutput(null)).build();
+      InterpreterContext context = InterpreterContext.builder()
+          .setInterpreterOut(new InterpreterOutput(null))
+          .build();
       InterpreterResult result = sparkInterpreter.interpret("spark", context);
-      if (result.code() == InterpreterResult.Code.SUCCESS
-          && result.message().get(0).getData().contains("org.apache.spark.sql.SparkSession")) {
-        LOGGER.info(
-            "SparkSession is detected so we are using spark 2.x for session {}",
+      if (result.code() == InterpreterResult.Code.SUCCESS &&
+          result.message().get(0).getData().contains("org.apache.spark.sql.SparkSession")) {
+        LOGGER.info("SparkSession is detected so we are using spark 2.x for session {}",
             sparkInterpreter.getSessionInfo().id);
         isSpark2 = true;
       } else {
@@ -86,14 +89,12 @@ public class LivySparkSQLInterpreter extends BaseLivyInterpreter {
           // create SqlContext if it is not available, as in livy 0.2 sqlContext
           // is not available.
           LOGGER.info("sqlContext is not detected, try to create SQLContext by ourselves");
-          result =
-              sparkInterpreter.interpret(
-                  "val sqlContext = new org.apache.spark.sql.SQLContext(sc)\n"
-                      + "import sqlContext.implicits._",
-                  context);
+          result = sparkInterpreter.interpret(
+              "val sqlContext = new org.apache.spark.sql.SQLContext(sc)\n"
+                  + "import sqlContext.implicits._", context);
           if (result.code() == InterpreterResult.Code.ERROR) {
-            throw new LivyException(
-                "Fail to create SQLContext," + result.message().get(0).getData());
+            throw new LivyException("Fail to create SQLContext," +
+                result.message().get(0).getData());
           }
         }
       }
@@ -112,10 +113,11 @@ public class LivySparkSQLInterpreter extends BaseLivyInterpreter {
       // use triple quote so that we don't need to do string escape.
       String sqlQuery = null;
       if (isSpark2) {
-        sqlQuery = "spark.sql(\"\"\"" + line + "\"\"\").show(" + maxResult + ", " + truncate + ")";
+        sqlQuery = "spark.sql(\"\"\"" + line + "\"\"\").show(" + maxResult + ", " +
+            truncate + ")";
       } else {
-        sqlQuery =
-            "sqlContext.sql(\"\"\"" + line + "\"\"\").show(" + maxResult + ", " + truncate + ")";
+        sqlQuery = "sqlContext.sql(\"\"\"" + line + "\"\"\").show(" + maxResult + ", " +
+            truncate + ")";
       }
       InterpreterResult result = sparkInterpreter.interpret(sqlQuery, context);
       if (result.code() == InterpreterResult.Code.SUCCESS) {
@@ -128,9 +130,8 @@ public class LivySparkSQLInterpreter extends BaseLivyInterpreter {
             List<String> rows = parseSQLOutput(message.getData());
             result2.add(InterpreterResult.Type.TABLE, StringUtils.join(rows, "\n"));
             if (rows.size() >= (maxResult + 1)) {
-              result2.add(
-                  ResultMessages.getExceedsLimitRowsMessage(
-                      maxResult, ZEPPELIN_LIVY_SPARK_SQL_MAX_RESULT));
+              result2.add(ResultMessages.getExceedsLimitRowsMessage(maxResult,
+                  ZEPPELIN_LIVY_SPARK_SQL_MAX_RESULT));
             }
           } else {
             result2.add(message.getType(), message.getData());
@@ -142,8 +143,8 @@ public class LivySparkSQLInterpreter extends BaseLivyInterpreter {
       }
     } catch (Exception e) {
       LOGGER.error("Exception in LivySparkSQLInterpreter while interpret ", e);
-      return new InterpreterResult(
-          InterpreterResult.Code.ERROR, InterpreterUtils.getMostRelevantMessage(e));
+      return new InterpreterResult(InterpreterResult.Code.ERROR,
+          InterpreterUtils.getMostRelevantMessage(e));
     }
   }
 
@@ -201,7 +202,9 @@ public class LivySparkSQLInterpreter extends BaseLivyInterpreter {
     return rows;
   }
 
-  /** Represent the start and end index of each cell. */
+  /**
+   * Represent the start and end index of each cell.
+   */
   private static class Pair {
     private int start;
     private int end;
@@ -220,9 +223,8 @@ public class LivySparkSQLInterpreter extends BaseLivyInterpreter {
   public Scheduler getScheduler() {
     if (concurrentSQL()) {
       int maxConcurrency = 10;
-      return SchedulerFactory.singleton()
-          .createOrGetParallelScheduler(
-              LivySparkInterpreter.class.getName() + this.hashCode(), maxConcurrency);
+      return SchedulerFactory.singleton().createOrGetParallelScheduler(
+          LivySparkInterpreter.class.getName() + this.hashCode(), maxConcurrency);
     } else {
       if (sparkInterpreter != null) {
         return sparkInterpreter.getScheduler();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/livy/src/main/java/org/apache/zeppelin/livy/LivyVersion.java
----------------------------------------------------------------------
diff --git a/livy/src/main/java/org/apache/zeppelin/livy/LivyVersion.java b/livy/src/main/java/org/apache/zeppelin/livy/LivyVersion.java
index 1d56e83..55ebd57 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/LivyVersion.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/LivyVersion.java
@@ -20,7 +20,9 @@ package org.apache.zeppelin.livy;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Provide reading comparing capability of livy version. */
+/**
+ * Provide reading comparing capability of livy version.
+ */
 public class LivyVersion {
   private static final Logger logger = LoggerFactory.getLogger(LivyVersion.class);
 
@@ -50,8 +52,8 @@ public class LivyVersion {
       // version is always 5 digits. (e.g. 2.0.0 -> 20000, 1.6.2 -> 10602)
       version = Integer.parseInt(String.format("%d%02d%02d", major, minor, patch));
     } catch (Exception e) {
-      logger.error(
-          "Can not recognize Livy version " + versionString + ". Assume it's a future release", e);
+      logger.error("Can not recognize Livy version " + versionString +
+          ". Assume it's a future release", e);
 
       // assume it is future release
       version = 99999;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/livy/src/main/java/org/apache/zeppelin/livy/SessionDeadException.java
----------------------------------------------------------------------
diff --git a/livy/src/main/java/org/apache/zeppelin/livy/SessionDeadException.java b/livy/src/main/java/org/apache/zeppelin/livy/SessionDeadException.java
index dfbb56e..5811790 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/SessionDeadException.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/SessionDeadException.java
@@ -17,4 +17,6 @@
 
 package org.apache.zeppelin.livy;
 
-public class SessionDeadException extends LivyException {}
+public class SessionDeadException extends LivyException {
+
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/livy/src/main/java/org/apache/zeppelin/livy/SessionNotFoundException.java
----------------------------------------------------------------------
diff --git a/livy/src/main/java/org/apache/zeppelin/livy/SessionNotFoundException.java b/livy/src/main/java/org/apache/zeppelin/livy/SessionNotFoundException.java
index 3f56116..4547057 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/SessionNotFoundException.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/SessionNotFoundException.java
@@ -17,7 +17,9 @@
 
 package org.apache.zeppelin.livy;
 
-/** */
+/**
+ *
+ */
 public class SessionNotFoundException extends LivyException {
 
   public SessionNotFoundException(String message) {


[50/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

This reverts commit 55f6c91cab2149943fd2390e0a9ca6847ac1f6ce.


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

Branch: refs/heads/master
Commit: 0d746fa2e2787a661db70d74035120ae3516ace3
Parents: dad1e8c
Author: Jongyoul Lee <jo...@apache.org>
Authored: Wed Aug 29 19:05:55 2018 +0900
Committer: Jongyoul Lee <jo...@apache.org>
Committed: Wed Aug 29 19:05:55 2018 +0900

----------------------------------------------------------------------
 _tools/checkstyle.xml                           |   289 +
 alluxio/pom.xml                                 |     7 +
 .../zeppelin/alluxio/AlluxioInterpreter.java    |   217 +-
 .../alluxio/AlluxioInterpreterTest.java         |   304 +-
 angular/pom.xml                                 |     7 +
 .../zeppelin/angular/AngularInterpreter.java    |    22 +-
 beam/pom.xml                                    |     7 +
 .../apache/zeppelin/beam/BeamInterpreter.java   |     8 +-
 bigquery/pom.xml                                |     7 +
 .../zeppelin/bigquery/BigQueryInterpreter.java  |   106 +-
 .../bigquery/BigQueryInterpreterTest.java       |    13 +-
 cassandra/pom.xml                               |     7 +
 .../cassandra/CassandraInterpreter.java         |   128 +-
 .../zeppelin/cassandra/ParsingException.java    |     6 +-
 .../cassandra/CassandraInterpreterTest.java     |   646 +-
 .../cassandra/InterpreterLogicTest.java         |   232 +-
 .../contribution/how_to_contribute_code.md      |     4 -
 elasticsearch/pom.xml                           |     7 +
 .../elasticsearch/ElasticsearchInterpreter.java |   178 +-
 .../elasticsearch/action/ActionException.java   |     4 +-
 .../elasticsearch/action/ActionResponse.java    |     5 +-
 .../elasticsearch/action/AggWrapper.java        |    13 +-
 .../elasticsearch/action/HitWrapper.java        |     4 +-
 .../client/ElasticsearchClient.java             |     4 +-
 .../elasticsearch/client/HttpBasedClient.java   |   136 +-
 .../client/TransportBasedClient.java            |   113 +-
 .../ElasticsearchInterpreterTest.java           |   208 +-
 file/pom.xml                                    |     7 +
 .../apache/zeppelin/file/FileInterpreter.java   |    54 +-
 .../org/apache/zeppelin/file/HDFSCommand.java   |    58 +-
 .../zeppelin/file/HDFSFileInterpreter.java      |   118 +-
 .../zeppelin/file/HDFSFileInterpreterTest.java  |   215 +-
 flink/pom.xml                                   |     8 +
 .../apache/zeppelin/flink/FlinkInterpreter.java |    25 +-
 .../zeppelin/flink/FlinkSQLInterpreter.java     |    17 +-
 .../zeppelin/flink/FlinkInterpreterTest.java    |   147 +-
 .../zeppelin/flink/FlinkSQLInterpreterTest.java |    72 +-
 geode/pom.xml                                   |     7 +
 .../zeppelin/geode/GeodeOqlInterpreter.java     |    91 +-
 .../zeppelin/geode/GeodeOqlInterpreterTest.java |    69 +-
 groovy/pom-groovy-only.xml                      |    11 +
 groovy/pom.xml                                  |     7 +
 .../org/apache/zeppelin/groovy/GObject.java     |    65 +-
 .../zeppelin/groovy/GroovyInterpreter.java      |    60 +-
 .../zeppelin/groovy/GroovyZeppelinContext.java  |     9 +-
 hbase/pom.xml                                   |     7 +
 .../apache/zeppelin/hbase/HbaseInterpreter.java |    52 +-
 .../zeppelin/hbase/HbaseInterpreterTest.java    |    25 +-
 .../apache/zeppelin/helium/DevInterpreter.java  |    27 +-
 .../zeppelin/helium/DevZeppelinContext.java     |    10 +-
 .../helium/ZeppelinApplicationDevServer.java    |    67 +-
 .../zeppelin/helium/ZeppelinDevServer.java      |    61 +-
 ignite/pom.xml                                  |     7 +
 .../zeppelin/ignite/IgniteInterpreter.java      |    83 +-
 .../zeppelin/ignite/IgniteInterpreterUtils.java |     5 +-
 .../zeppelin/ignite/IgniteSqlInterpreter.java   |    27 +-
 .../zeppelin/ignite/IgniteInterpreterTest.java  |    37 +-
 .../ignite/IgniteSqlInterpreterTest.java        |    22 +-
 .../java/org/apache/zeppelin/ignite/Person.java |     9 +-
 java/pom.xml                                    |     7 +
 .../apache/zeppelin/java/JavaInterpreter.java   |    30 +-
 .../zeppelin/java/JavaInterpreterUtils.java     |    12 +-
 .../org/apache/zeppelin/java/StaticRepl.java    |    50 +-
 jdbc/pom.xml                                    |     7 +
 .../apache/zeppelin/jdbc/JDBCInterpreter.java   |   290 +-
 .../zeppelin/jdbc/JDBCUserConfigurations.java   |    19 +-
 .../org/apache/zeppelin/jdbc/SqlCompleter.java  |   218 +-
 .../jdbc/security/JDBCSecurityImpl.java         |    40 +-
 .../jdbc/JDBCInterpreterInterpolationTest.java  |    72 +-
 .../zeppelin/jdbc/JDBCInterpreterTest.java      |   223 +-
 .../apache/zeppelin/jdbc/SqlCompleterTest.java  |   270 +-
 kylin/pom.xml                                   |     7 +
 .../zeppelin/kylin/KylinErrorResponse.java      |     8 +-
 .../apache/zeppelin/kylin/KylinInterpreter.java |    94 +-
 .../zeppelin/kylin/KylinInterpreterTest.java    |   136 +-
 lens/pom.xml                                    |     7 +
 .../apache/zeppelin/lens/ExecutionDetail.java   |    25 +-
 .../org/apache/zeppelin/lens/LensBootstrap.java |    13 +-
 .../apache/zeppelin/lens/LensInterpreter.java   |   174 +-
 .../zeppelin/lens/LensJLineShellComponent.java  |    90 +-
 .../lens/LensSimpleExecutionStrategy.java       |    11 +-
 .../zeppelin/lens/LensInterpreterTest.java      |    48 +-
 livy/pom.xml                                    |     8 +
 .../zeppelin/livy/APINotFoundException.java     |    11 +-
 .../zeppelin/livy/BaseLivyInterpreter.java      |   392 +-
 .../org/apache/zeppelin/livy/LivyException.java |    11 +-
 .../zeppelin/livy/LivyPySpark3Interpreter.java  |     6 +-
 .../livy/LivyPySparkBaseInterpreter.java        |    23 +-
 .../zeppelin/livy/LivyPySparkInterpreter.java   |     7 +-
 .../zeppelin/livy/LivySharedInterpreter.java    |    20 +-
 .../zeppelin/livy/LivySparkInterpreter.java     |    31 +-
 .../zeppelin/livy/LivySparkRInterpreter.java    |     9 +-
 .../zeppelin/livy/LivySparkSQLInterpreter.java  |    64 +-
 .../org/apache/zeppelin/livy/LivyVersion.java   |     8 +-
 .../zeppelin/livy/SessionDeadException.java     |     4 +-
 .../zeppelin/livy/SessionNotFoundException.java |     4 +-
 .../apache/zeppelin/livy/LivyInterpreterIT.java |   574 +-
 .../zeppelin/livy/LivySQLInterpreterTest.java   |    93 +-
 markdown/pom.xml                                |     7 +
 .../org/apache/zeppelin/markdown/Markdown.java  |    24 +-
 .../zeppelin/markdown/Markdown4jParser.java     |     7 +-
 .../zeppelin/markdown/MarkdownParser.java       |     4 +-
 .../org/apache/zeppelin/markdown/ParamVar.java  |     3 +-
 .../apache/zeppelin/markdown/PegdownParser.java |    17 +-
 .../markdown/PegdownWebSequencelPlugin.java     |    61 +-
 .../zeppelin/markdown/PegdownYumlPlugin.java    |    39 +-
 .../zeppelin/markdown/Markdown4jParserTest.java |     6 +-
 .../zeppelin/markdown/PegdownParserTest.java    |   113 +-
 neo4j/pom.xml                                   |     7 +
 .../graph/neo4j/Neo4jConnectionManager.java     |    51 +-
 .../graph/neo4j/Neo4jCypherInterpreter.java     |    77 +-
 .../graph/neo4j/utils/Neo4jConversionUtils.java |    26 +-
 .../graph/neo4j/Neo4jCypherInterpreterTest.java |   125 +-
 pig/pom.xml                                     |     7 +
 .../apache/zeppelin/pig/BasePigInterpreter.java |    29 +-
 .../org/apache/zeppelin/pig/PigInterpreter.java |    30 +-
 .../zeppelin/pig/PigQueryInterpreter.java       |    26 +-
 .../apache/zeppelin/pig/PigScriptListener.java  |    37 +-
 .../java/org/apache/zeppelin/pig/PigUtils.java  |    13 +-
 .../zeppelin/pig/PigInterpreterSparkTest.java   |    93 +-
 .../apache/zeppelin/pig/PigInterpreterTest.java |    86 +-
 .../zeppelin/pig/PigInterpreterTezTest.java     |   100 +-
 .../zeppelin/pig/PigQueryInterpreterTest.java   |    72 +-
 pom.xml                                         |    62 +-
 python/pom.xml                                  |     8 +
 .../apache/zeppelin/python/IPythonClient.java   |   206 +-
 .../zeppelin/python/IPythonInterpreter.java     |   145 +-
 .../zeppelin/python/PythonCondaInterpreter.java |    85 +-
 .../python/PythonDockerInterpreter.java         |    59 +-
 .../zeppelin/python/PythonInterpreter.java      |    85 +-
 .../python/PythonInterpreterPandasSql.java      |    14 +-
 .../org/apache/zeppelin/python/PythonUtils.java |    43 +-
 .../zeppelin/python/PythonZeppelinContext.java  |     9 +-
 .../python/BasePythonInterpreterTest.java       |   100 +-
 .../zeppelin/python/IPythonInterpreterTest.java |    61 +-
 .../python/PythonCondaInterpreterTest.java      |    57 +-
 .../python/PythonDockerInterpreterTest.java     |    27 +-
 .../python/PythonInterpreterMatplotlibTest.java |    59 +-
 .../python/PythonInterpreterPandasSqlTest.java  |    88 +-
 .../zeppelin/python/PythonInterpreterTest.java  |    27 +-
 .../zeppelin/sap/UniverseInterpreter.java       |    68 +-
 .../zeppelin/sap/universe/UniverseClient.java   |   411 +-
 .../sap/universe/UniverseCompleter.java         |   185 +-
 .../sap/universe/UniverseException.java         |     6 +-
 .../zeppelin/sap/universe/UniverseInfo.java     |     7 +-
 .../zeppelin/sap/universe/UniverseNodeInfo.java |     7 +-
 .../sap/universe/UniverseNodeInfoCompleter.java |    14 +-
 .../zeppelin/sap/universe/UniverseQuery.java    |    20 +-
 .../sap/universe/UniverseQueryPrompt.java       |    17 +-
 .../zeppelin/sap/universe/UniverseUtil.java     |   162 +-
 .../sap/universe/UniverseCompleterTest.java     |    66 +-
 .../zeppelin/sap/universe/UniverseUtilTest.java |   586 +-
 scalding/pom.xml                                |     8 +
 .../zeppelin/scalding/ScaldingInterpreter.java  |    52 +-
 .../scalding/ScaldingInterpreterTest.java       |    78 +-
 .../zeppelin/scio/ScioInterpreterTest.java      |    54 +-
 shell/pom.xml                                   |     7 +
 .../apache/zeppelin/shell/ShellInterpreter.java |    78 +-
 .../zeppelin/shell/ShellInterpreterTest.java    |    13 +-
 .../spark/AbstractSparkInterpreter.java         |     8 +-
 .../apache/zeppelin/spark/DepInterpreter.java   |    94 +-
 .../zeppelin/spark/IPySparkInterpreter.java     |    25 +-
 .../zeppelin/spark/NewSparkInterpreter.java     |    66 +-
 .../zeppelin/spark/OldSparkInterpreter.java     |   392 +-
 .../zeppelin/spark/PySparkInterpreter.java      |    36 +-
 .../org/apache/zeppelin/spark/PythonUtils.java  |    51 +-
 .../apache/zeppelin/spark/SparkInterpreter.java |    18 +-
 .../zeppelin/spark/SparkRInterpreter.java       |    65 +-
 .../zeppelin/spark/SparkSqlInterpreter.java     |    40 +-
 .../org/apache/zeppelin/spark/SparkVersion.java |    10 +-
 .../java/org/apache/zeppelin/spark/Utils.java   |    36 +-
 .../org/apache/zeppelin/spark/ZeppelinR.java    |    90 +-
 .../apache/zeppelin/spark/ZeppelinRContext.java |    12 +-
 .../spark/dep/SparkDependencyContext.java       |    37 +-
 .../spark/dep/SparkDependencyResolver.java      |   101 +-
 .../zeppelin/spark/DepInterpreterTest.java      |    25 +-
 .../zeppelin/spark/IPySparkInterpreterTest.java |   164 +-
 .../zeppelin/spark/NewSparkInterpreterTest.java |   309 +-
 .../spark/NewSparkSqlInterpreterTest.java       |   116 +-
 .../zeppelin/spark/OldSparkInterpreterTest.java |   127 +-
 .../spark/OldSparkSqlInterpreterTest.java       |    60 +-
 .../spark/PySparkInterpreterMatplotlibTest.java |    62 +-
 .../zeppelin/spark/PySparkInterpreterTest.java  |    23 +-
 .../zeppelin/spark/SparkRInterpreterTest.java   |   102 +-
 .../apache/zeppelin/spark/SparkShimsTest.java   |     6 +-
 .../zeppelin/example/app/clock/Clock.java       |    58 +-
 .../org/apache/zeppelin/AbstractZeppelinIT.java |    88 +-
 .../org/apache/zeppelin/CommandExecutor.java    |    33 +-
 .../java/org/apache/zeppelin/ProcessData.java   |   159 +-
 .../org/apache/zeppelin/WebDriverManager.java   |    45 +-
 .../org/apache/zeppelin/ZeppelinITUtils.java    |    19 +-
 .../zeppelin/integration/AuthenticationIT.java  |   265 +-
 .../zeppelin/integration/InterpreterIT.java     |    21 +-
 .../integration/InterpreterModeActionsIT.java   |  1218 +-
 .../integration/ParagraphActionsIT.java         |   792 +-
 .../integration/PersonalizeActionsIT.java       |   318 +-
 .../zeppelin/integration/SparkParagraphIT.java  |   154 +-
 .../apache/zeppelin/integration/ZeppelinIT.java |   203 +-
 zeppelin-interpreter/pom.xml                    |     8 +
 .../zeppelin/annotation/Experimental.java       |    19 +-
 .../apache/zeppelin/annotation/ZeppelinApi.java |    18 +-
 .../zeppelin/common/JsonSerializable.java       |     4 +-
 .../zeppelin/completer/CachedCompleter.java     |    18 +-
 .../zeppelin/completer/CompletionType.java      |    14 +-
 .../zeppelin/completer/StringsCompleter.java    |    36 +-
 .../zeppelin/conf/ZeppelinConfiguration.java    |    99 +-
 .../dep/AbstractDependencyResolver.java         |    30 +-
 .../java/org/apache/zeppelin/dep/Booter.java    |    11 +-
 .../org/apache/zeppelin/dep/Dependency.java     |     8 +-
 .../apache/zeppelin/dep/DependencyContext.java  |    27 +-
 .../apache/zeppelin/dep/DependencyResolver.java |    35 +-
 .../org/apache/zeppelin/dep/Repository.java     |    20 +-
 .../apache/zeppelin/dep/RepositoryListener.java |    11 +-
 .../zeppelin/dep/RepositorySystemFactory.java   |    12 +-
 .../apache/zeppelin/dep/TransferListener.java   |    24 +-
 .../apache/zeppelin/display/AngularObject.java  |    87 +-
 .../zeppelin/display/AngularObjectListener.java |     4 +-
 .../zeppelin/display/AngularObjectRegistry.java |    67 +-
 .../display/AngularObjectRegistryListener.java  |     7 +-
 .../zeppelin/display/AngularObjectWatcher.java  |     4 +-
 .../java/org/apache/zeppelin/display/GUI.java   |    30 +-
 .../java/org/apache/zeppelin/display/Input.java |    85 +-
 .../org/apache/zeppelin/display/OldInput.java   |    21 +-
 .../display/RuntimeTypeAdapterFactory.java      |    54 +-
 .../apache/zeppelin/display/ui/CheckBox.java    |     9 +-
 .../apache/zeppelin/display/ui/OptionInput.java |     7 +-
 .../apache/zeppelin/display/ui/Password.java    |     7 +-
 .../org/apache/zeppelin/display/ui/Select.java  |     9 +-
 .../org/apache/zeppelin/display/ui/TextBox.java |    10 +-
 .../org/apache/zeppelin/helium/Application.java |    52 +-
 .../zeppelin/helium/ApplicationContext.java     |    16 +-
 .../helium/ApplicationEventListener.java        |    18 +-
 .../zeppelin/helium/ApplicationException.java   |     8 +-
 .../zeppelin/helium/ApplicationLoader.java      |    54 +-
 .../zeppelin/helium/ClassLoaderApplication.java |     5 +-
 .../helium/HeliumAppAngularObjectRegistry.java  |    12 +-
 .../apache/zeppelin/helium/HeliumPackage.java   |    45 +-
 .../org/apache/zeppelin/helium/HeliumType.java  |     4 +-
 .../zeppelin/helium/SpellPackageInfo.java       |     4 +-
 .../interpreter/BaseZeppelinContext.java        |   180 +-
 .../apache/zeppelin/interpreter/Constants.java  |     7 +-
 .../interpreter/DefaultInterpreterProperty.java |    23 +-
 .../zeppelin/interpreter/Interpreter.java       |   144 +-
 .../interpreter/InterpreterContext.java         |    21 +-
 .../interpreter/InterpreterException.java       |    13 +-
 .../zeppelin/interpreter/InterpreterGroup.java  |    47 +-
 .../interpreter/InterpreterHookListener.java    |    14 +-
 .../interpreter/InterpreterHookRegistry.java    |    33 +-
 .../zeppelin/interpreter/InterpreterOption.java |    14 +-
 .../zeppelin/interpreter/InterpreterOutput.java |    29 +-
 .../InterpreterOutputChangeListener.java        |     5 +-
 .../InterpreterOutputChangeWatcher.java         |     7 +-
 .../interpreter/InterpreterOutputListener.java  |    10 +-
 .../interpreter/InterpreterProperty.java        |     4 +-
 .../interpreter/InterpreterPropertyBuilder.java |    19 +-
 .../interpreter/InterpreterPropertyType.java    |     5 +-
 .../zeppelin/interpreter/InterpreterResult.java |    21 +-
 .../interpreter/InterpreterResultMessage.java   |     4 +-
 .../InterpreterResultMessageOutput.java         |    21 +-
 .../InterpreterResultMessageOutputListener.java |     9 +-
 .../zeppelin/interpreter/InterpreterRunner.java |     9 +-
 .../zeppelin/interpreter/InterpreterUtils.java  |    25 +-
 .../interpreter/InvalidHookException.java       |     5 +-
 .../interpreter/KerberosInterpreter.java        |    89 +-
 .../interpreter/LazyOpenInterpreter.java        |    17 +-
 .../RemoteZeppelinServerResource.java           |    10 +-
 .../zeppelin/interpreter/ResultMessages.java    |    26 +-
 .../interpreter/WrappedInterpreter.java         |     4 +-
 .../zeppelin/interpreter/graph/GraphResult.java |    50 +-
 .../launcher/InterpreterLaunchContext.java      |    28 +-
 .../launcher/InterpreterLauncher.java           |    16 +-
 .../interpreter/recovery/RecoveryStorage.java   |    15 +-
 .../InvokeResourceMethodEventMessage.java       |    11 +-
 .../remote/RemoteInterpreterEventClient.java    |    59 +-
 .../remote/RemoteInterpreterServer.java         |   487 +-
 .../remote/RemoteInterpreterUtils.java          |    46 +-
 .../interpreter/thrift/AngularObjectId.java     |   309 +-
 .../thrift/AppOutputAppendEvent.java            |   413 +-
 .../thrift/AppOutputUpdateEvent.java            |   462 +-
 .../thrift/AppStatusUpdateEvent.java            |   361 +-
 .../thrift/InterpreterCompletion.java           |   312 +-
 .../interpreter/thrift/OutputAppendEvent.java   |   410 +-
 .../thrift/OutputUpdateAllEvent.java            |   377 +-
 .../interpreter/thrift/OutputUpdateEvent.java   |   459 +-
 .../interpreter/thrift/RegisterInfo.java        |   321 +-
 .../thrift/RemoteApplicationResult.java         |   270 +-
 .../thrift/RemoteInterpreterContext.java        |   789 +-
 .../thrift/RemoteInterpreterEvent.java          |   295 +-
 .../thrift/RemoteInterpreterEventService.java   |  6097 ++++------
 .../thrift/RemoteInterpreterEventType.java      |    38 +-
 .../thrift/RemoteInterpreterResult.java         |   443 +-
 .../thrift/RemoteInterpreterResultMessage.java  |   273 +-
 .../thrift/RemoteInterpreterService.java        | 10448 +++++++----------
 .../interpreter/thrift/RunParagraphsEvent.java  |   422 +-
 .../util/InterpreterOutputStream.java           |    13 +-
 .../interpreter/util/LogOutputStream.java       |     8 +-
 .../resource/ByteBufferInputStream.java         |     5 +-
 .../resource/DistributedResourcePool.java       |    17 +-
 .../zeppelin/resource/LocalResourcePool.java    |    12 +-
 .../zeppelin/resource/RemoteResource.java       |    26 +-
 .../org/apache/zeppelin/resource/Resource.java  |    50 +-
 .../apache/zeppelin/resource/ResourceId.java    |    10 +-
 .../apache/zeppelin/resource/ResourcePool.java  |    16 +-
 .../resource/ResourcePoolConnector.java         |    17 +-
 .../apache/zeppelin/resource/ResourceSet.java   |     7 +-
 .../resource/WellKnownResourceName.java         |     9 +-
 .../zeppelin/scheduler/ExecutorFactory.java     |    11 +-
 .../zeppelin/scheduler/FIFOScheduler.java       |   106 +-
 .../java/org/apache/zeppelin/scheduler/Job.java |    43 +-
 .../apache/zeppelin/scheduler/JobListener.java  |     4 +-
 .../zeppelin/scheduler/JobProgressPoller.java   |     3 +-
 .../scheduler/JobWithProgressPoller.java        |     6 +-
 .../zeppelin/scheduler/ParallelScheduler.java   |    13 +-
 .../apache/zeppelin/scheduler/Scheduler.java    |     4 +-
 .../zeppelin/scheduler/SchedulerFactory.java    |     8 +-
 .../zeppelin/scheduler/SchedulerListener.java   |     4 +-
 .../apache/zeppelin/tabledata/ColumnDef.java    |     8 +-
 .../apache/zeppelin/tabledata/GraphEntity.java  |    17 +-
 .../tabledata/InterpreterResultTableData.java   |    12 +-
 .../org/apache/zeppelin/tabledata/Node.java     |    11 +-
 .../zeppelin/tabledata/ProxyRowIterator.java    |     7 +-
 .../apache/zeppelin/tabledata/Relationship.java |    17 +-
 .../java/org/apache/zeppelin/tabledata/Row.java |     8 +-
 .../apache/zeppelin/tabledata/TableData.java    |     8 +-
 .../zeppelin/tabledata/TableDataException.java  |     4 +-
 .../zeppelin/tabledata/TableDataProxy.java      |    10 +-
 .../zeppelin/user/AuthenticationInfo.java       |    25 +-
 .../apache/zeppelin/user/UserCredentials.java   |     8 +-
 .../apache/zeppelin/user/UsernamePassword.java  |    46 +-
 .../java/org/apache/zeppelin/util/IdHashes.java |    14 +-
 .../java/org/apache/zeppelin/util/Util.java     |    21 +-
 .../org/apache/zeppelin/dep/BooterTest.java     |    10 +-
 .../zeppelin/dep/DependencyResolverTest.java    |    33 +-
 .../display/AngularObjectRegistryTest.java      |    47 +-
 .../zeppelin/display/AngularObjectTest.java     |    87 +-
 .../org/apache/zeppelin/display/GUITest.java    |    97 +-
 .../org/apache/zeppelin/display/InputTest.java  |    91 +-
 .../zeppelin/helium/ApplicationLoaderTest.java  |    51 +-
 .../zeppelin/helium/HeliumPackageTest.java      |    76 +-
 .../zeppelin/helium/MockApplication1.java       |     4 +-
 .../interpreter/BaseZeppelinContextTest.java    |   135 +-
 .../interpreter/InterpreterContextTest.java     |     8 +-
 .../InterpreterHookRegistryTest.java            |     5 +-
 .../InterpreterOutputChangeWatcherTest.java     |    19 +-
 .../interpreter/InterpreterOutputTest.java      |    17 +-
 .../interpreter/InterpreterResultTest.java      |   145 +-
 .../zeppelin/interpreter/InterpreterTest.java   |    38 +-
 .../interpreter/LazyOpenInterpreterTest.java    |     4 +-
 .../interpreter/ZeppCtxtVariableTest.java       |    33 +-
 .../remote/RemoteInterpreterServerTest.java     |   136 +-
 .../remote/RemoteInterpreterUtilsTest.java      |    25 +-
 .../resource/LocalResourcePoolTest.java         |     8 +-
 .../zeppelin/resource/ResourceSetTest.java      |     8 +-
 .../apache/zeppelin/resource/ResourceTest.java  |     9 +-
 .../zeppelin/scheduler/FIFOSchedulerTest.java   |     6 +-
 .../org/apache/zeppelin/scheduler/JobTest.java  |    21 +-
 .../scheduler/ParallelSchedulerTest.java        |     7 +-
 .../apache/zeppelin/scheduler/SleepingJob.java  |    12 +-
 .../InterpreterResultTableDataTest.java         |    15 +-
 .../zeppelin/tabledata/TableDataProxyTest.java  |    15 +-
 .../zeppelin/user/AuthenticationInfoTest.java   |     6 +-
 .../apache/zeppelin/jupyter/JupyterUtil.java    |    48 +-
 .../zeppelin/jupyter/nbformat/Author.java       |     5 +-
 .../apache/zeppelin/jupyter/nbformat/Cell.java  |     5 +-
 .../zeppelin/jupyter/nbformat/CellMetadata.java |     5 +-
 .../zeppelin/jupyter/nbformat/CodeCell.java     |     4 +-
 .../zeppelin/jupyter/nbformat/DisplayData.java  |    31 +-
 .../apache/zeppelin/jupyter/nbformat/Error.java |     9 +-
 .../jupyter/nbformat/ExecuteResult.java         |     8 +-
 .../zeppelin/jupyter/nbformat/HeadingCell.java  |     4 +-
 .../zeppelin/jupyter/nbformat/Kernelspec.java   |     4 +-
 .../zeppelin/jupyter/nbformat/LanguageInfo.java |     5 +-
 .../zeppelin/jupyter/nbformat/MarkdownCell.java |     8 +-
 .../zeppelin/jupyter/nbformat/Metadata.java     |     4 +-
 .../zeppelin/jupyter/nbformat/Nbformat.java     |     4 +-
 .../zeppelin/jupyter/nbformat/Output.java       |    44 +-
 .../zeppelin/jupyter/nbformat/RawCell.java      |     8 +-
 .../jupyter/nbformat/RawCellMetadata.java       |     4 +-
 .../zeppelin/jupyter/nbformat/Stream.java       |    10 +-
 .../jupyter/types/JupyterOutputType.java        |     8 +-
 .../jupyter/types/ZeppelinOutputType.java       |     8 +-
 .../apache/zeppelin/jupyter/zformat/Note.java   |     4 +-
 .../zeppelin/jupyter/zformat/Paragraph.java     |     4 +-
 .../apache/zeppelin/jupyter/zformat/Result.java |     4 +-
 .../zeppelin/jupyter/zformat/TypeData.java      |     4 +-
 .../jupyter/nbformat/JupyterUtilTest.java       |    46 +-
 .../launcher/SparkInterpreterLauncher.java      |    69 +-
 .../launcher/SparkInterpreterLauncherTest.java  |   147 +-
 .../launcher/StandardInterpreterLauncher.java   |    50 +-
 .../StandardInterpreterLauncherTest.java        |    45 +-
 .../notebook/repo/AzureNotebookRepo.java        |    30 +-
 .../notebook/repo/FileSystemNotebookRepo.java   |    46 +-
 .../repo/FileSystemNotebookRepoTest.java        |    25 +-
 .../zeppelin/notebook/repo/GCSNotebookRepo.java |    54 +-
 .../notebook/repo/GCSNotebookRepoTest.java      |    38 +-
 .../zeppelin/notebook/repo/GitNotebookRepo.java |    44 +-
 .../notebook/repo/GitNotebookRepoTest.java      |    66 +-
 .../NotebookRepoSyncInitializationTest.java     |    51 +-
 .../notebook/repo/NotebookRepoSyncTest.java     |   229 +-
 .../notebook/repo/mock/VFSNotebookRepoMock.java |     4 +-
 .../notebook/repo/GitHubNotebookRepo.java       |    36 +-
 .../notebook/repo/GitHubNotebookRepoTest.java   |   127 +-
 .../notebook/repo/MongoNotebookRepo.java        |    47 +-
 .../zeppelin/notebook/repo/S3NotebookRepo.java  |   105 +-
 .../zeppelin/notebook/repo/VFSNotebookRepo.java |    22 +-
 .../notebook/repo/TestVFSNotebookRepo.java      |    19 +-
 .../repo/zeppelinhub/ZeppelinHubRepo.java       |    73 +-
 zeppelin-server/pom.xml                         |     8 +
 .../realm/ActiveDirectoryGroupRealm.java        |   126 +-
 .../apache/zeppelin/realm/LdapGroupRealm.java   |    42 +-
 .../org/apache/zeppelin/realm/LdapRealm.java    |   368 +-
 .../org/apache/zeppelin/realm/PamRealm.java     |    22 +-
 .../apache/zeppelin/realm/UserPrincipal.java    |     7 +-
 .../apache/zeppelin/realm/ZeppelinHubRealm.java |    65 +-
 .../realm/jwt/JWTAuthenticationToken.java       |     4 +-
 .../realm/jwt/KnoxAuthenticationFilter.java     |    34 +-
 .../apache/zeppelin/realm/jwt/KnoxJwtRealm.java |    78 +-
 .../zeppelin/realm/jwt/PrincipalMapper.java     |    19 +-
 .../realm/jwt/PrincipalMappingException.java    |    25 +-
 .../realm/jwt/SimplePrincipalMapper.java        |    38 +-
 .../apache/zeppelin/rest/AbstractRestApi.java   |     7 +-
 .../org/apache/zeppelin/rest/HeliumRestApi.java |   114 +-
 .../zeppelin/rest/InterpreterRestApi.java       |   108 +-
 .../org/apache/zeppelin/rest/LoginRestApi.java  |    53 +-
 .../zeppelin/rest/NotebookRepoRestApi.java      |    39 +-
 .../apache/zeppelin/rest/NotebookResponse.java  |     4 +-
 .../apache/zeppelin/rest/NotebookRestApi.java   |   335 +-
 .../apache/zeppelin/rest/SecurityRestApi.java   |    61 +-
 .../apache/zeppelin/rest/ZeppelinRestApi.java   |    19 +-
 .../rest/exception/BadRequestException.java     |     5 +-
 .../rest/exception/ForbiddenException.java      |     5 +-
 .../rest/exception/NoteNotFoundException.java   |     6 +-
 .../exception/ParagraphNotFoundException.java   |     5 +-
 .../WebApplicationExceptionMapper.java          |     6 +-
 .../zeppelin/rest/message/CronRequest.java      |     8 +-
 .../message/NewInterpreterSettingRequest.java   |     9 +-
 .../zeppelin/rest/message/NewNoteRequest.java   |     9 +-
 .../rest/message/NewParagraphRequest.java       |    16 +-
 .../message/NotebookRepoSettingsRequest.java    |     9 +-
 .../rest/message/RenameNoteRequest.java         |    10 +-
 .../rest/message/RestartInterpreterRequest.java |     8 +-
 .../RunParagraphWithParametersRequest.java      |     9 +-
 .../UpdateInterpreterSettingRequest.java        |    12 +-
 .../rest/message/UpdateParagraphRequest.java    |     7 +-
 .../org/apache/zeppelin/server/CorsFilter.java  |    11 +-
 .../apache/zeppelin/server/JsonResponse.java    |     2 +
 .../zeppelin/service/ConfigurationService.java  |    41 +-
 .../zeppelin/service/InterpreterService.java    |     5 +-
 .../zeppelin/service/JobManagerService.java     |    40 +-
 .../zeppelin/service/NotebookService.java       |   410 +-
 .../zeppelin/service/ServiceCallback.java       |    10 +-
 .../apache/zeppelin/service/ServiceContext.java |     8 +-
 .../zeppelin/service/SimpleServiceCallback.java |    10 +-
 .../zeppelin/socket/ConnectionManager.java      |    94 +-
 .../apache/zeppelin/socket/NotebookServer.java  |  1724 ++-
 .../apache/zeppelin/socket/NotebookSocket.java  |    13 +-
 .../zeppelin/socket/NotebookSocketListener.java |     6 +-
 .../socket/NotebookWebSocketCreator.java        |    16 +-
 .../zeppelin/types/InterpreterSettingsList.java |    11 +-
 .../AnyOfRolesUserAuthorizationFilter.java      |    10 +-
 .../apache/zeppelin/utils/CommandLineUtils.java |     5 +-
 .../apache/zeppelin/utils/ExceptionUtils.java   |     8 +-
 .../zeppelin/utils/InterpreterBindingUtils.java |    21 +-
 .../apache/zeppelin/utils/SecurityUtils.java    |   141 +-
 .../configuration/RequestHeaderSizeTest.java    |    10 +-
 .../zeppelin/display/AngularObjectBuilder.java  |     4 +-
 .../apache/zeppelin/realm/LdapRealmTest.java    |    35 +-
 .../org/apache/zeppelin/realm/PamRealmTest.java |     7 +-
 .../apache/zeppelin/recovery/RecoveryTest.java  |    48 +-
 .../zeppelin/rest/AbstractTestRestApi.java      |   220 +-
 .../rest/ConfigurationsRestApiTest.java         |    48 +-
 .../apache/zeppelin/rest/HeliumRestApiTest.java |   109 +-
 .../zeppelin/rest/InterpreterRestApiTest.java   |   113 +-
 .../apache/zeppelin/rest/KnoxRestApiTest.java   |    41 +-
 .../zeppelin/rest/NotebookRepoRestApiTest.java  |    63 +-
 .../zeppelin/rest/NotebookRestApiTest.java      |   104 +-
 .../rest/NotebookSecurityRestApiTest.java       |   130 +-
 .../zeppelin/rest/SecurityRestApiTest.java      |    52 +-
 .../zeppelin/rest/ZeppelinRestApiTest.java      |   194 +-
 .../zeppelin/rest/ZeppelinServerTest.java       |     5 +-
 .../zeppelin/rest/ZeppelinSparkClusterTest.java |   247 +-
 .../apache/zeppelin/security/DirAccessTest.java |    12 +-
 .../zeppelin/security/SecurityUtilsTest.java    |    73 +-
 .../apache/zeppelin/server/CorsFilterTest.java  |    52 +-
 .../service/ConfigurationServiceTest.java       |    24 +-
 .../zeppelin/service/NotebookServiceTest.java   |    94 +-
 .../zeppelin/socket/NotebookServerTest.java     |   211 +-
 .../zeppelin/ticket/TicketContainerTest.java    |     1 +
 .../java/org/apache/zeppelin/helium/Helium.java |    90 +-
 .../helium/HeliumApplicationFactory.java        |   127 +-
 .../zeppelin/helium/HeliumBundleFactory.java    |   319 +-
 .../org/apache/zeppelin/helium/HeliumConf.java  |    37 +-
 .../zeppelin/helium/HeliumLocalRegistry.java    |    15 +-
 .../zeppelin/helium/HeliumOnlineRegistry.java   |    95 +-
 .../helium/HeliumPackageSearchResult.java       |     5 +-
 .../helium/HeliumPackageSuggestion.java         |    23 +-
 .../apache/zeppelin/helium/HeliumRegistry.java  |     8 +-
 .../helium/HeliumRegistrySerializer.java        |    28 +-
 .../org/apache/zeppelin/helium/NpmPackage.java  |     7 +-
 .../apache/zeppelin/helium/WebpackResult.java   |     8 +-
 .../zeppelin/interpreter/ConfInterpreter.java   |    33 +-
 .../interpreter/InterpreterFactory.java         |    17 +-
 .../zeppelin/interpreter/InterpreterInfo.java   |    21 +-
 .../interpreter/InterpreterInfoSaving.java      |    31 +-
 .../InterpreterNotFoundException.java           |     7 +-
 .../interpreter/InterpreterSetting.java         |   304 +-
 .../interpreter/InterpreterSettingManager.java  |   366 +-
 .../zeppelin/interpreter/LifecycleManager.java  |    10 +-
 .../interpreter/ManagedInterpreterGroup.java    |    46 +-
 .../RemoteInterpreterEventServer.java           |   249 +-
 .../interpreter/SessionConfInterpreter.java     |    21 +-
 .../interpreter/SparkDownloadUtils.java         |    42 +-
 .../interpreter/install/InstallInterpreter.java |    72 +-
 .../lifecycle/NullLifecycleManager.java         |    17 +-
 .../lifecycle/TimeoutLifecycleManager.java      |    66 +-
 .../recovery/FileSystemRecoveryStorage.java     |    43 +-
 .../recovery/NullRecoveryStorage.java           |    23 +-
 .../interpreter/recovery/StopInterpreter.java   |    20 +-
 .../interpreter/remote/AppendOutputBuffer.java  |     6 +-
 .../interpreter/remote/AppendOutputRunner.java  |    39 +-
 .../interpreter/remote/ClientFactory.java       |     9 +-
 .../interpreter/remote/RemoteAngularObject.java |    23 +-
 .../remote/RemoteAngularObjectRegistry.java     |    66 +-
 .../interpreter/remote/RemoteInterpreter.java   |   231 +-
 .../remote/RemoteInterpreterManagedProcess.java |    53 +-
 .../remote/RemoteInterpreterProcess.java        |    22 +-
 .../RemoteInterpreterProcessListener.java       |    24 +-
 .../remote/RemoteInterpreterRunningProcess.java |    26 +-
 .../zeppelin/notebook/ApplicationState.java     |    16 +-
 .../zeppelin/notebook/FileSystemStorage.java    |   187 +-
 .../org/apache/zeppelin/notebook/Folder.java    |    31 +-
 .../zeppelin/notebook/FolderListener.java       |     4 +-
 .../apache/zeppelin/notebook/FolderView.java    |    39 +-
 .../java/org/apache/zeppelin/notebook/Note.java |   166 +-
 .../zeppelin/notebook/NoteEventListener.java    |     6 +-
 .../org/apache/zeppelin/notebook/NoteInfo.java  |     5 +-
 .../zeppelin/notebook/NoteNameListener.java     |     5 +-
 .../org/apache/zeppelin/notebook/Notebook.java  |   203 +-
 .../notebook/NotebookAuthorization.java         |    83 +-
 .../NotebookAuthorizationInfoSaving.java        |     7 +-
 .../notebook/NotebookEventListener.java         |     7 +-
 .../notebook/NotebookImportDeserializer.java    |    29 +-
 .../org/apache/zeppelin/notebook/Paragraph.java |   157 +-
 .../zeppelin/notebook/ParagraphJobListener.java |    11 +-
 .../zeppelin/notebook/ParagraphRuntimeInfo.java |    23 +-
 .../notebook/ParagraphWithRuntimeInfo.java      |     5 +-
 .../zeppelin/notebook/repo/NotebookRepo.java    |    40 +-
 .../notebook/repo/NotebookRepoSettingsInfo.java |     8 +-
 .../notebook/repo/NotebookRepoSync.java         |   138 +-
 .../notebook/repo/NotebookRepoWithSettings.java |     5 +-
 .../repo/NotebookRepoWithVersionControl.java    |    39 +-
 .../repo/zeppelinhub/model/Instance.java        |     5 +-
 .../zeppelinhub/model/UserSessionContainer.java |    10 +-
 .../zeppelinhub/model/UserTokenContainer.java   |    39 +-
 .../repo/zeppelinhub/rest/HttpProxyClient.java  |   109 +-
 .../rest/ZeppelinhubRestApiHandler.java         |    95 +-
 .../zeppelinhub/security/Authentication.java    |    42 +-
 .../repo/zeppelinhub/websocket/Client.java      |    13 +-
 .../zeppelinhub/websocket/ZeppelinClient.java   |   113 +-
 .../websocket/ZeppelinhubClient.java            |    43 +-
 .../websocket/listener/WatcherWebsocket.java    |    13 +-
 .../websocket/listener/ZeppelinWebsocket.java   |    10 +-
 .../listener/ZeppelinhubWebsocket.java          |    10 +-
 .../websocket/protocol/ZeppelinHubOp.java       |     4 +-
 .../websocket/protocol/ZeppelinhubMessage.java  |    20 +-
 .../websocket/scheduler/SchedulerService.java   |     6 +-
 .../websocket/scheduler/ZeppelinHeartbeat.java  |     9 +-
 .../scheduler/ZeppelinHubHeartbeat.java         |    15 +-
 .../websocket/session/ZeppelinhubSession.java   |    16 +-
 .../websocket/utils/ZeppelinhubUtils.java       |    47 +-
 .../zeppelin/notebook/socket/Message.java       |   243 +-
 .../notebook/socket/WatcherMessage.java         |    23 +-
 .../zeppelin/notebook/utility/IdHashes.java     |    12 +-
 .../apache/zeppelin/plugin/PluginManager.java   |    80 +-
 .../zeppelin/scheduler/RemoteScheduler.java     |    67 +-
 .../apache/zeppelin/search/SearchService.java   |    21 +-
 .../apache/zeppelin/storage/ConfigStorage.java  |    23 +-
 .../storage/FileSystemConfigStorage.java        |    19 +-
 .../zeppelin/storage/LocalConfigStorage.java    |    24 +-
 .../apache/zeppelin/ticket/TicketContainer.java |    24 +-
 .../org/apache/zeppelin/user/Credentials.java   |    46 +-
 .../zeppelin/user/CredentialsInfoSaving.java    |     7 +-
 .../org/apache/zeppelin/user/Encryptor.java     |     8 +-
 .../apache/zeppelin/util/ReflectionUtils.java   |    53 +-
 .../zeppelin/util/WatcherSecurityKey.java       |     5 +-
 .../conf/ZeppelinConfigurationTest.java         |    43 +-
 .../zeppelin/display/AngularObjectBuilder.java  |    10 +-
 .../helium/HeliumApplicationFactoryTest.java    |   145 +-
 .../helium/HeliumBundleFactoryTest.java         |   167 +-
 .../helium/HeliumLocalRegistryTest.java         |    31 +-
 .../helium/HeliumOnlineRegistryTest.java        |    47 +-
 .../org/apache/zeppelin/helium/HeliumTest.java  |   140 +-
 .../zeppelin/helium/HeliumTestApplication.java  |     8 +-
 .../zeppelin/helium/HeliumTestRegistry.java     |     1 +
 .../interpreter/AbstractInterpreterTest.java    |    56 +-
 .../interpreter/ConfInterpreterTest.java        |    75 +-
 .../interpreter/DoubleEchoInterpreter.java      |    14 +-
 .../zeppelin/interpreter/EchoInterpreter.java   |    17 +-
 .../interpreter/FlinkIntegrationTest.java       |    60 +-
 .../interpreter/InterpreterFactoryTest.java     |    43 +-
 .../InterpreterSettingManagerTest.java          |    75 +-
 .../interpreter/InterpreterSettingTest.java     |   261 +-
 .../ManagedInterpreterGroupTest.java            |    43 +-
 .../zeppelin/interpreter/MiniHadoopCluster.java |    42 +-
 .../zeppelin/interpreter/MiniZeppelin.java      |    39 +-
 .../interpreter/SessionConfInterpreterTest.java |    24 +-
 .../zeppelin/interpreter/SleepInterpreter.java  |    23 +-
 .../interpreter/SparkIntegrationTest.java       |   112 +-
 .../install/InstallInterpreterTest.java         |    25 +-
 .../lifecycle/TimeoutLifecycleManagerTest.java  |   135 +-
 .../interpreter/mock/MockInterpreter1.java      |   202 +-
 .../interpreter/mock/MockInterpreter2.java      |   149 +-
 .../recovery/FileSystemRecoveryStorageTest.java |    35 +-
 .../remote/AppendOutputRunnerTest.java          |   116 +-
 .../remote/RemoteAngularObjectTest.java         |    37 +-
 .../RemoteInterpreterOutputTestStream.java      |    65 +-
 .../remote/RemoteInterpreterTest.java           |   204 +-
 .../mock/GetAngularObjectSizeInterpreter.java   |    19 +-
 .../remote/mock/GetEnvPropertyInterpreter.java  |    31 +-
 .../remote/mock/MockInterpreterA.java           |    24 +-
 .../remote/mock/MockInterpreterAngular.java     |    45 +-
 .../mock/MockInterpreterOutputStream.java       |    28 +-
 .../mock/MockInterpreterResourcePool.java       |    23 +-
 .../apache/zeppelin/notebook/FolderTest.java    |    83 +-
 .../zeppelin/notebook/FolderViewTest.java       |    64 +-
 .../org/apache/zeppelin/notebook/NoteTest.java  |   229 +-
 .../apache/zeppelin/notebook/NotebookTest.java  |   632 +-
 .../apache/zeppelin/notebook/ParagraphTest.java |    93 +-
 .../resource/DistributedResourcePoolTest.java   |   139 +-
 .../zeppelin/scheduler/RemoteSchedulerTest.java |   318 +-
 .../apache/zeppelin/user/CredentialsTest.java   |     5 +-
 .../org/apache/zeppelin/user/EncryptorTest.java |     7 +-
 .../java/org/apache/zeppelin/util/UtilTest.java |    21 +-
 633 files changed, 28300 insertions(+), 32414 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/_tools/checkstyle.xml
----------------------------------------------------------------------
diff --git a/_tools/checkstyle.xml b/_tools/checkstyle.xml
new file mode 100644
index 0000000..aa53d30
--- /dev/null
+++ b/_tools/checkstyle.xml
@@ -0,0 +1,289 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+
+<!DOCTYPE module PUBLIC
+  "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
+  "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+
+<!-- This is a checkstyle configuration file. For descriptions of what the 
+	following rules do, please see the checkstyle configuration page at http://checkstyle.sourceforge.net/config.html -->
+
+<module name="Checker">
+
+  <module name="FileTabCharacter">
+    <!-- Checks that there are no tab characters in the file. -->
+  </module>
+
+  <module name="NewlineAtEndOfFile">
+    <property name="lineSeparator" value="lf"/>
+  </module>
+
+  <module name="RegexpSingleline">
+    <!-- Checks that FIXME is not used in comments. TODO is preferred. -->
+    <property name="format" value="((//.*)|(\*.*))FIXME"/>
+    <property name="message"
+      value='TODO is preferred to FIXME.  e.g. "TODO(johndoe): Refactor when v2 is released."'/>
+  </module>
+
+  <module name="RegexpSingleline">
+    <!-- Checks that TODOs are named. (Actually, just that they are followed
+      by an open paren.) -->
+    <property name="format" value="((//.*)|(\*.*))TODO[^(]"/>
+    <property name="message"
+      value='All TODOs should be named.  e.g. "TODO(johndoe): Refactor when v2 is released."'/>
+  </module>
+
+  <!-- <module name="JavadocPackage"> - Checks that each Java package has
+    a Javadoc file used for commenting. Only allows a package-info.java, not
+    package.html. </module> -->
+  <!-- All Java AST specific tests live under TreeWalker module. -->
+  <module name="TreeWalker">
+
+    <!-- IMPORT CHECKS -->
+
+    <module name="RedundantImport">
+      <!-- Checks for redundant import statements. -->
+      <property name="severity" value="error"/>
+    </module>
+    <module name="ImportOrder">
+      <property name="severity" value="warning"/>
+      <property name="groups" value="com.google,junit,net,org,java,javax,*,org.apache.zeppelin"/>
+      <property name="option" value="top"/>
+      <property name="tokens" value="STATIC_IMPORT, IMPORT"/>
+    </module>
+    <!-- JAVADOC CHECKS -->
+
+    <!-- Checks for Javadoc comments. -->
+    <!-- See http://checkstyle.sf.net/config_javadoc.html -->
+    <module name="JavadocMethod">
+      <property name="scope" value="protected"/>
+      <property name="severity" value="warning"/>
+      <property name="allowMissingJavadoc" value="true"/>
+      <property name="allowMissingParamTags" value="true"/>
+      <property name="allowMissingReturnTag" value="true"/>
+      <property name="allowMissingThrowsTags" value="true"/>
+      <property name="allowThrowsTagsForSubclasses" value="true"/>
+      <property name="allowUndeclaredRTE" value="true"/>
+    </module>
+
+    <module name="JavadocStyle">
+      <property name="severity" value="warning"/>
+    </module>
+
+    <!-- NAMING CHECKS -->
+
+    <!-- Item 38 - Adhere to generally accepted naming conventions -->
+
+    <module name="PackageName">
+      <!-- Validates identifiers for package names against the supplied expression. -->
+      <!-- Here the default checkstyle rule restricts package name parts to
+        seven characters, this is not in line with common practice at Google. -->
+      <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]{1,})*$"/>
+      <property name="severity" value="warning"/>
+    </module>
+
+    <module name="TypeNameCheck">
+      <!-- Validates static, final fields against the expression "^[A-Z][a-zA-Z0-9]*$". -->
+      <metadata name="altname" value="TypeName"/>
+      <property name="severity" value="warning"/>
+    </module>
+
+    <module name="ConstantNameCheck">
+      <!-- Validates non-private, static, final fields against the supplied
+        public/package final fields "^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$". -->
+      <metadata name="altname" value="ConstantName"/>
+      <property name="applyToPublic" value="true"/>
+      <property name="applyToProtected" value="true"/>
+      <property name="applyToPackage" value="true"/>
+      <property name="applyToPrivate" value="false"/>
+      <property name="format" value="^([A-Z][A-Z0-9]*(_[A-Z0-9]+)*|FLAG_.*)$"/>
+      <message key="name.invalidPattern"
+        value="Variable ''{0}'' should be in ALL_CAPS (if it is a constant) or be private (otherwise)."/>
+      <property name="severity" value="warning"/>
+    </module>
+
+    <module name="StaticVariableNameCheck">
+      <!-- Validates static, non-final fields against the supplied expression
+        "^[a-z][a-zA-Z0-9]*_?$". -->
+      <metadata name="altname" value="StaticVariableName"/>
+      <property name="applyToPublic" value="true"/>
+      <property name="applyToProtected" value="true"/>
+      <property name="applyToPackage" value="true"/>
+      <property name="applyToPrivate" value="true"/>
+      <property name="format" value="^[a-z][a-zA-Z0-9]*_?$"/>
+      <property name="severity" value="warning"/>
+    </module>
+
+    <module name="MemberNameCheck">
+      <!-- Validates non-static members against the supplied expression. -->
+      <metadata name="altname" value="MemberName"/>
+      <property name="applyToPublic" value="true"/>
+      <property name="applyToProtected" value="true"/>
+      <property name="applyToPackage" value="true"/>
+      <property name="applyToPrivate" value="true"/>
+      <property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
+      <property name="severity" value="warning"/>
+    </module>
+
+    <module name="MethodNameCheck">
+      <!-- Validates identifiers for method names. -->
+      <metadata name="altname" value="MethodName"/>
+      <property name="format" value="^[a-z][a-zA-Z0-9]*(_[a-zA-Z0-9]+)*$"/>
+      <property name="severity" value="warning"/>
+    </module>
+
+    <module name="ParameterName">
+      <!-- Validates identifiers for method parameters against the expression
+        "^[a-z][a-zA-Z0-9]*$". -->
+      <property name="severity" value="warning"/>
+    </module>
+
+    <module name="LocalFinalVariableName">
+      <!-- Validates identifiers for local final variables against the expression
+        "^[a-z][a-zA-Z0-9]*$". -->
+      <property name="severity" value="warning"/>
+    </module>
+
+    <module name="LocalVariableName">
+      <!-- Validates identifiers for local variables against the expression
+        "^[a-z][a-zA-Z0-9]*$". -->
+      <property name="severity" value="warning"/>
+    </module>
+
+
+    <!-- LENGTH and CODING CHECKS -->
+
+    <module name="LineLength">
+      <!-- Checks if a line is too long. -->
+      <property name="max"
+        value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.max}"
+        default="100"/>
+      <property name="severity" value="error"/>
+
+      <!-- The default ignore pattern exempts the following elements: - import
+        statements - long URLs inside comments -->
+
+      <property name="ignorePattern"
+        value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.ignorePattern}"
+        default="^(package .*;\s*)|(import .*;\s*)|( *\* *https?://.*)$"/>
+    </module>
+
+    <module name="LeftCurly">
+      <!-- Checks for placement of the left curly brace ('{'). -->
+      <property name="severity" value="warning"/>
+    </module>
+
+    <module name="RightCurly">
+      <!-- Checks right curlies on CATCH, ELSE, and TRY blocks are on the same
+        line. e.g., the following example is fine: <pre> if { ... } else </pre> -->
+      <!-- This next example is not fine: <pre> if { ... } else </pre> -->
+      <property name="option" value="same"/>
+      <property name="severity" value="warning"/>
+    </module>
+
+    <!-- Checks for braces around if and else blocks -->
+    <module name="NeedBraces">
+      <property name="severity" value="warning"/>
+      <property name="tokens"
+        value="LITERAL_IF, LITERAL_ELSE, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO"/>
+    </module>
+
+    <module name="UpperEll">
+      <!-- Checks that long constants are defined with an upper ell. -->
+      <property name="severity" value="error"/>
+    </module>
+
+    <module name="FallThrough">
+      <!-- Warn about falling through to the next case statement. Similar to
+        javac -Xlint:fallthrough, but the check is suppressed if a single-line comment
+        on the last non-blank line preceding the fallen-into case contains 'fall
+        through' (or some other variants which we don't publicized to promote consistency). -->
+      <property name="reliefPattern"
+        value="fall through|Fall through|fallthru|Fallthru|falls through|Falls through|fallthrough|Fallthrough|No break|NO break|no break|continue on"/>
+      <property name="severity" value="error"/>
+    </module>
+
+
+    <!-- MODIFIERS CHECKS -->
+
+    <module name="ModifierOrder">
+      <!-- Warn if modifier order is inconsistent with JLS3 8.1.1, 8.3.1, and
+        8.4.3. The prescribed order is: public, protected, private, abstract, static,
+        final, transient, volatile, synchronized, native, strictfp -->
+    </module>
+
+
+    <!-- WHITESPACE CHECKS -->
+
+    <module name="WhitespaceAround">
+      <!-- Checks that various tokens are surrounded by whitespace. This includes
+        most binary operators and keywords followed by regular or curly braces. -->
+      <property name="tokens"
+        value="ASSIGN, BAND, BAND_ASSIGN, BOR,
+        BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN,
+        EQUAL, GE, GT, LAND, LE, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE,
+        LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN,
+        LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS,
+        MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION,
+        SL, SL_ASSIGN, SR_ASSIGN, STAR, STAR_ASSIGN"/>
+      <property name="severity" value="error"/>
+    </module>
+
+    <module name="WhitespaceAfter">
+      <!-- Checks that commas, semicolons and typecasts are followed by whitespace. -->
+      <property name="tokens" value="COMMA, SEMI, TYPECAST"/>
+    </module>
+
+    <module name="NoWhitespaceAfter">
+      <!-- Checks that there is no whitespace after various unary operators.
+        Linebreaks are allowed. -->
+      <property name="tokens"
+        value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS,
+        UNARY_PLUS"/>
+      <property name="allowLineBreaks" value="true"/>
+      <property name="severity" value="error"/>
+    </module>
+
+    <module name="NoWhitespaceBefore">
+      <!-- Checks that there is no whitespace before various unary operators.
+        Linebreaks are allowed. -->
+      <property name="tokens" value="SEMI, DOT, POST_DEC, POST_INC"/>
+      <property name="allowLineBreaks" value="true"/>
+      <property name="severity" value="error"/>
+    </module>
+
+    <module name="ParenPad">
+      <!-- Checks that there is no whitespace before close parens or after open
+        parens. -->
+      <property name="severity" value="warning"/>
+    </module>
+
+    <module name="Indentation">
+      <!-- Checks code indentation -->
+      <property name="basicOffset" value="2"/>
+      <property name="caseIndent" value="2"/>
+    </module>
+
+    <module name="EmptyCatchBlock">
+      <property name="exceptionVariableName" value="expected"/>
+    </module>
+    <module name="CommentsIndentation"/>
+    <module name="UnusedImports"/>
+    <module name="RedundantImport"/>
+    <module name="RedundantModifier"/>
+    <module name="AvoidStarImport"/>
+  </module>
+</module>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/alluxio/pom.xml
----------------------------------------------------------------------
diff --git a/alluxio/pom.xml b/alluxio/pom.xml
index 6ef7a01..af23c87 100644
--- a/alluxio/pom.xml
+++ b/alluxio/pom.xml
@@ -137,6 +137,13 @@
             <plugin>
                 <artifactId>maven-resources-plugin</artifactId>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <configuration>
+                    <skip>false</skip>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/alluxio/src/main/java/org/apache/zeppelin/alluxio/AlluxioInterpreter.java
----------------------------------------------------------------------
diff --git a/alluxio/src/main/java/org/apache/zeppelin/alluxio/AlluxioInterpreter.java b/alluxio/src/main/java/org/apache/zeppelin/alluxio/AlluxioInterpreter.java
index 29648f7..be912ec 100644
--- a/alluxio/src/main/java/org/apache/zeppelin/alluxio/AlluxioInterpreter.java
+++ b/alluxio/src/main/java/org/apache/zeppelin/alluxio/AlluxioInterpreter.java
@@ -1,21 +1,26 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.alluxio;
 
-import alluxio.Configuration;
-import alluxio.shell.AlluxioShell;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.PrintStream;
@@ -24,18 +29,22 @@ import java.util.Arrays;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Properties;
+
+import alluxio.Configuration;
+import alluxio.shell.AlluxioShell;
+
 import org.apache.zeppelin.completer.CompletionType;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.InterpreterResult.Code;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Alluxio interpreter for Zeppelin. */
+/**
+ * Alluxio interpreter for Zeppelin.
+ */
 public class AlluxioInterpreter extends Interpreter {
-
+  
   Logger logger = LoggerFactory.getLogger(AlluxioInterpreter.class);
 
   protected static final String ALLUXIO_MASTER_HOSTNAME = "alluxio.master.hostname";
@@ -49,40 +58,13 @@ public class AlluxioInterpreter extends Interpreter {
   private final String alluxioMasterHostname;
   private final String alluxioMasterPort;
 
-  protected final List<String> keywords =
-      Arrays.asList(
-          "cat",
-          "chgrp",
-          "chmod",
-          "chown",
-          "copyFromLocal",
-          "copyToLocal",
-          "count",
-          "createLineage",
-          "deleteLineage",
-          "du",
-          "fileInfo",
-          "free",
-          "getCapacityBytes",
-          "getUsedBytes",
-          "listLineages",
-          "load",
-          "loadMetadata",
-          "location",
-          "ls",
-          "mkdir",
-          "mount",
-          "mv",
-          "persist",
-          "pin",
-          "report",
-          "rm",
-          "setTtl",
-          "tail",
-          "touch",
-          "unmount",
-          "unpin",
-          "unsetTtl");
+  protected final List<String> keywords = Arrays.asList("cat", "chgrp",
+          "chmod", "chown", "copyFromLocal", "copyToLocal", "count",
+          "createLineage", "deleteLineage", "du", "fileInfo", "free",
+          "getCapacityBytes", "getUsedBytes", "listLineages", "load",
+          "loadMetadata", "location", "ls", "mkdir", "mount", "mv",
+          "persist", "pin", "report", "rm", "setTtl", "tail", "touch",
+          "unmount", "unpin", "unsetTtl");
 
   public AlluxioInterpreter(Properties property) {
     super(property);
@@ -93,11 +75,8 @@ public class AlluxioInterpreter extends Interpreter {
 
   @Override
   public void open() {
-    logger.info(
-        "Starting Alluxio shell to connect to "
-            + alluxioMasterHostname
-            + " on port "
-            + alluxioMasterPort);
+    logger.info("Starting Alluxio shell to connect to " + alluxioMasterHostname +
+        " on port " + alluxioMasterPort);
 
     System.setProperty(ALLUXIO_MASTER_HOSTNAME, alluxioMasterHostname);
     System.setProperty(ALLUXIO_MASTER_PORT, alluxioMasterPort);
@@ -120,18 +99,18 @@ public class AlluxioInterpreter extends Interpreter {
     String[] lines = splitAndRemoveEmpty(st, "\n");
     return interpret(lines, context);
   }
-
+  
   private InterpreterResult interpret(String[] commands, InterpreterContext context) {
     boolean isSuccess = true;
     totalCommands = commands.length;
     completedCommands = 0;
-
+    
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     PrintStream ps = new PrintStream(baos);
     PrintStream old = System.out;
-
+    
     System.setOut(ps);
-
+    
     for (String command : commands) {
       int commandResult = 1;
       String[] args = splitAndRemoveEmpty(command, " ");
@@ -151,14 +130,14 @@ public class AlluxioInterpreter extends Interpreter {
 
     System.out.flush();
     System.setOut(old);
-
+    
     if (isSuccess) {
       return new InterpreterResult(Code.SUCCESS, baos.toString());
     } else {
       return new InterpreterResult(Code.ERROR, baos.toString());
     }
   }
-
+  
   private String[] splitAndRemoveEmpty(String st, String splitSeparator) {
     String[] voices = st.split(splitSeparator);
     ArrayList<String> result = new ArrayList<>();
@@ -179,7 +158,7 @@ public class AlluxioInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) { }
 
   @Override
   public FormType getFormType() {
@@ -192,15 +171,15 @@ public class AlluxioInterpreter extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     String[] words = splitAndRemoveEmpty(splitAndRemoveEmpty(buf, "\n"), " ");
     String lastWord = "";
     if (words.length > 0) {
-      lastWord = words[words.length - 1];
+      lastWord = words[ words.length - 1 ];
     }
-
-    List<InterpreterCompletion> voices = new LinkedList<>();
+    
+    List<InterpreterCompletion>  voices = new LinkedList<>();
     for (String command : keywords) {
       if (command.startsWith(lastWord)) {
         voices.add(new InterpreterCompletion(command, command, CompletionType.command.name()));
@@ -214,81 +193,61 @@ public class AlluxioInterpreter extends Interpreter {
     sb.append("Commands list:");
     sb.append("\n\t[help] - List all available commands.");
     sb.append("\n\t[cat <path>] - Prints the file's contents to the console.");
-    sb.append(
-        "\n\t[chgrp [-R] <group> <path>] - Changes the group of a file or directory "
-            + "specified by args. Specify -R to change the group recursively.");
-    sb.append(
-        "\n\t[chmod -R <mode> <path>] - Changes the permission of a file or directory "
-            + "specified by args. Specify -R to change the permission recursively.");
-    sb.append(
-        "\n\t[chown -R <owner> <path>] - Changes the owner of a file or directory "
-            + "specified by args. Specify -R to change the owner recursively.");
-    sb.append(
-        "\n\t[copyFromLocal <src> <remoteDst>] - Copies a file or a directory from "
-            + "local filesystem to Alluxio filesystem.");
-    sb.append(
-        "\n\t[copyToLocal <src> <localDst>] - Copies a file or a directory from the "
-            + "Alluxio filesystem to the local filesystem.");
-    sb.append(
-        "\n\t[count <path>] - Displays the number of files and directories matching "
-            + "the specified prefix.");
-    sb.append(
-        "\n\t[createLineage <inputFile1,...> <outputFile1,...> "
-            + "[<cmd_arg1> <cmd_arg2> ...]] - Creates a lineage.");
-    sb.append(
-        "\n\t[deleteLineage <lineageId> <cascade(true|false)>] - Deletes a lineage. If "
-            + "cascade is specified as true, dependent lineages will also be deleted.");
+    sb.append("\n\t[chgrp [-R] <group> <path>] - Changes the group of a file or directory " +
+            "specified by args. Specify -R to change the group recursively.");
+    sb.append("\n\t[chmod -R <mode> <path>] - Changes the permission of a file or directory " +
+            "specified by args. Specify -R to change the permission recursively.");
+    sb.append("\n\t[chown -R <owner> <path>] - Changes the owner of a file or directory " +
+            "specified by args. Specify -R to change the owner recursively.");
+    sb.append("\n\t[copyFromLocal <src> <remoteDst>] - Copies a file or a directory from " +
+            "local filesystem to Alluxio filesystem.");
+    sb.append("\n\t[copyToLocal <src> <localDst>] - Copies a file or a directory from the " +
+            "Alluxio filesystem to the local filesystem.");
+    sb.append("\n\t[count <path>] - Displays the number of files and directories matching " +
+            "the specified prefix.");
+    sb.append("\n\t[createLineage <inputFile1,...> <outputFile1,...> " +
+            "[<cmd_arg1> <cmd_arg2> ...]] - Creates a lineage.");
+    sb.append("\n\t[deleteLineage <lineageId> <cascade(true|false)>] - Deletes a lineage. If " +
+            "cascade is specified as true, dependent lineages will also be deleted.");
     sb.append("\n\t[du <path>] - Displays the size of the specified file or directory.");
     sb.append("\n\t[fileInfo <path>] - Displays all block info for the specified file.");
-    sb.append(
-        "\n\t[free <file path|folder path>] - Removes the file or directory(recursively) "
-            + "from Alluxio memory space.");
+    sb.append("\n\t[free <file path|folder path>] - Removes the file or directory(recursively) " +
+            "from Alluxio memory space.");
     sb.append("\n\t[getCapacityBytes] - Gets the capacity of the Alluxio file system.");
     sb.append("\n\t[getUsedBytes] - Gets number of bytes used in the Alluxio file system.");
     sb.append("\n\t[listLineages] - Lists all lineages.");
-    sb.append(
-        "\n\t[load <path>] - Loads a file or directory in Alluxio space, makes it "
-            + "resident in memory.");
-    sb.append(
-        "\n\t[loadMetadata <path>] - Loads metadata for the given Alluxio path from the "
-            + "under file system.");
+    sb.append("\n\t[load <path>] - Loads a file or directory in Alluxio space, makes it " +
+            "resident in memory.");
+    sb.append("\n\t[loadMetadata <path>] - Loads metadata for the given Alluxio path from the " +
+            "under file system.");
     sb.append("\n\t[location <path>] - Displays the list of hosts storing the specified file.");
-    sb.append(
-        "\n\t[ls [-R] <path>] - Displays information for all files and directories "
-            + "directly under the specified path. Specify -R to display files and "
-            + "directories recursively.");
-    sb.append(
-        "\n\t[mkdir <path1> [path2] ... [pathn]] - Creates the specified directories, "
-            + "including any parent directories that are required.");
+    sb.append("\n\t[ls [-R] <path>] - Displays information for all files and directories " +
+            "directly under the specified path. Specify -R to display files and " +
+            "directories recursively.");
+    sb.append("\n\t[mkdir <path1> [path2] ... [pathn]] - Creates the specified directories, " +
+            "including any parent directories that are required.");
     sb.append("\n\t[mount <alluxioPath> <ufsURI>] - Mounts a UFS path onto an Alluxio path.");
     sb.append("\n\t[mv <src> <dst>] - Renames a file or directory.");
-    sb.append(
-        "\n\t[persist <alluxioPath>] - Persists a file or directory currently stored "
-            + "only in Alluxio to the UnderFileSystem.");
-    sb.append(
-        "\n\t[pin <path>] - Pins the given file or directory in memory (works "
-            + "recursively for directories). Pinned files are never evicted from memory, unless "
-            + "TTL is set.");
+    sb.append("\n\t[persist <alluxioPath>] - Persists a file or directory currently stored " +
+            "only in Alluxio to the UnderFileSystem.");
+    sb.append("\n\t[pin <path>] - Pins the given file or directory in memory (works " +
+            "recursively for directories). Pinned files are never evicted from memory, unless " +
+            "TTL is set.");
     sb.append("\n\t[report <path>] - Reports to the master that a file is lost.");
-    sb.append(
-        "\n\t[rm [-R] <path>] - Removes the specified file. Specify -R to remove file or "
-            + "directory recursively.");
-    sb.append(
-        "\n\t[setTtl <path> <time to live(in milliseconds)>] - Sets a new TTL value for "
-            + "the file at path.");
+    sb.append("\n\t[rm [-R] <path>] - Removes the specified file. Specify -R to remove file or " +
+            "directory recursively.");
+    sb.append("\n\t[setTtl <path> <time to live(in milliseconds)>] - Sets a new TTL value for " +
+            "the file at path.");
     sb.append("\n\t[tail <path>] - Prints the file's last 1KB of contents to the console.");
-    sb.append(
-        "\n\t[touch <path>] - Creates a 0 byte file. The file will be written to the "
-            + "under file system.");
+    sb.append("\n\t[touch <path>] - Creates a 0 byte file. The file will be written to the " +
+            "under file system.");
     sb.append("\n\t[unmount <alluxioPath>] - Unmounts an Alluxio path.");
-    sb.append(
-        "\n\t[unpin <path>] - Unpins the given file or folder from memory "
-            + "(works recursively for a directory).");
+    sb.append("\n\t[unpin <path>] - Unpins the given file or folder from memory " +
+            "(works recursively for a directory).");
     sb.append("\n\\t[unsetTtl <path>] - Unsets the TTL value for the given path.");
-    sb.append(
-        "\n\t[unpin <path>] - Unpin the given file to allow Alluxio to evict "
-            + "this file again. If the given path is a directory, it recursively unpins "
-            + "all files contained and any new files created within this directory.");
+    sb.append("\n\t[unpin <path>] - Unpin the given file to allow Alluxio to evict " +
+            "this file again. If the given path is a directory, it recursively unpins " +
+            "all files contained and any new files created within this directory.");
     return sb.toString();
   }
 }


[40/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/python/src/main/java/org/apache/zeppelin/python/PythonCondaInterpreter.java
----------------------------------------------------------------------
diff --git a/python/src/main/java/org/apache/zeppelin/python/PythonCondaInterpreter.java b/python/src/main/java/org/apache/zeppelin/python/PythonCondaInterpreter.java
index 43639f7..5eb34e4 100644
--- a/python/src/main/java/org/apache/zeppelin/python/PythonCondaInterpreter.java
+++ b/python/src/main/java/org/apache/zeppelin/python/PythonCondaInterpreter.java
@@ -16,6 +16,18 @@
  */
 package org.apache.zeppelin.python;
 
+import org.apache.commons.lang.StringUtils;
+import org.apache.zeppelin.interpreter.Interpreter;
+import org.apache.zeppelin.interpreter.InterpreterContext;
+import org.apache.zeppelin.interpreter.InterpreterException;
+import org.apache.zeppelin.interpreter.InterpreterOutput;
+import org.apache.zeppelin.interpreter.InterpreterResult;
+import org.apache.zeppelin.interpreter.InterpreterResult.Code;
+import org.apache.zeppelin.interpreter.InterpreterResult.Type;
+import org.apache.zeppelin.scheduler.Scheduler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
@@ -28,19 +40,11 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import org.apache.commons.lang.StringUtils;
-import org.apache.zeppelin.interpreter.Interpreter;
-import org.apache.zeppelin.interpreter.InterpreterContext;
-import org.apache.zeppelin.interpreter.InterpreterException;
-import org.apache.zeppelin.interpreter.InterpreterOutput;
-import org.apache.zeppelin.interpreter.InterpreterResult;
-import org.apache.zeppelin.interpreter.InterpreterResult.Code;
-import org.apache.zeppelin.interpreter.InterpreterResult.Type;
-import org.apache.zeppelin.scheduler.Scheduler;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Conda support TODO(zjffdu) Add removing conda env */
+/**
+ * Conda support
+ * TODO(zjffdu) Add removing conda env
+ */
 public class PythonCondaInterpreter extends Interpreter {
   private static Logger logger = LoggerFactory.getLogger(PythonCondaInterpreter.class);
   public static final String ZEPPELIN_PYTHON = "zeppelin.python";
@@ -66,10 +70,14 @@ public class PythonCondaInterpreter extends Interpreter {
   }
 
   @Override
-  public void open() throws InterpreterException {}
+  public void open() throws InterpreterException {
+
+  }
 
   @Override
-  public void close() {}
+  public void close() {
+
+  }
 
   @Override
   public InterpreterResult interpret(String st, InterpreterContext context)
@@ -159,6 +167,7 @@ public class PythonCondaInterpreter extends Interpreter {
         getInterpreterInTheSameSessionByClassName(PythonInterpreter.class, false);
     pythonInterpreter.close();
     pythonInterpreter.open();
+
   }
 
   public static String runCondaCommandForTextOutput(String title, List<String> commands)
@@ -179,7 +188,8 @@ public class PythonCondaInterpreter extends Interpreter {
     return wrapCondaTableOutputStyle(title, envPerName);
   }
 
-  protected Map<String, String> getCondaEnvs() throws IOException, InterruptedException {
+  protected Map<String, String> getCondaEnvs()
+      throws IOException, InterruptedException {
     String result = runCommand("conda", "env", "list");
     Map<String, String> envList = parseCondaCommonStdout(result);
     return envList;
@@ -189,7 +199,8 @@ public class PythonCondaInterpreter extends Interpreter {
     return wrapCondaTableOutputStyle("Environment List", getCondaEnvs());
   }
 
-  private String runCondaEnv(List<String> restArgs) throws IOException, InterruptedException {
+  private String runCondaEnv(List<String> restArgs)
+      throws IOException, InterruptedException {
 
     restArgs.add(0, "conda");
     restArgs.add(1, "env");
@@ -248,7 +259,8 @@ public class PythonCondaInterpreter extends Interpreter {
     return runCondaCommandForTextOutput("Conda Information", commands);
   }
 
-  private String runCondaCreate(List<String> restArgs) throws IOException, InterruptedException {
+  private String runCondaCreate(List<String> restArgs)
+      throws IOException, InterruptedException {
     restArgs.add(0, "conda");
     restArgs.add(1, "create");
     restArgs.add(2, "--yes");
@@ -256,7 +268,8 @@ public class PythonCondaInterpreter extends Interpreter {
     return runCondaCommandForTextOutput("Environment Creation", restArgs);
   }
 
-  private String runCondaInstall(List<String> restArgs) throws IOException, InterruptedException {
+  private String runCondaInstall(List<String> restArgs)
+      throws IOException, InterruptedException {
 
     restArgs.add(0, "conda");
     restArgs.add(1, "install");
@@ -269,7 +282,8 @@ public class PythonCondaInterpreter extends Interpreter {
     return runCondaCommandForTextOutput("Package Installation", restArgs);
   }
 
-  private String runCondaUninstall(List<String> restArgs) throws IOException, InterruptedException {
+  private String runCondaUninstall(List<String> restArgs)
+      throws IOException, InterruptedException {
 
     restArgs.add(0, "conda");
     restArgs.add(1, "uninstall");
@@ -285,9 +299,12 @@ public class PythonCondaInterpreter extends Interpreter {
   public static String wrapCondaBasicOutputStyle(String title, String content) {
     StringBuilder sb = new StringBuilder();
     if (null != title && !title.isEmpty()) {
-      sb.append("<h4>").append(title).append("</h4>\n").append("</div><br />\n");
+      sb.append("<h4>").append(title).append("</h4>\n")
+          .append("</div><br />\n");
     }
-    sb.append("<div style=\"white-space:pre-wrap;\">\n").append(content).append("</div>");
+    sb.append("<div style=\"white-space:pre-wrap;\">\n")
+        .append(content)
+        .append("</div>");
 
     return sb.toString();
   }
@@ -303,13 +320,11 @@ public class PythonCondaInterpreter extends Interpreter {
     for (String name : kv.keySet()) {
       String path = kv.get(name);
 
-      sb.append(
-          String.format(
-              "<div style=\"display:table-row\">"
-                  + "<div style=\"display:table-cell;width:150px\">%s</div>"
-                  + "<div style=\"display:table-cell;\">%s</div>"
-                  + "</div>\n",
-              name, path));
+      sb.append(String.format("<div style=\"display:table-row\">" +
+              "<div style=\"display:table-cell;width:150px\">%s</div>" +
+              "<div style=\"display:table-cell;\">%s</div>" +
+              "</div>\n",
+          name, path));
     }
     sb.append("</div>\n");
 
@@ -337,7 +352,9 @@ public class PythonCondaInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+
+  }
 
   @Override
   public FormType getFormType() {
@@ -350,8 +367,8 @@ public class PythonCondaInterpreter extends Interpreter {
   }
 
   /**
-   * Use python interpreter's scheduler. To make sure %python.conda paragraph and %python paragraph
-   * runs sequentially
+   * Use python interpreter's scheduler.
+   * To make sure %python.conda paragraph and %python paragraph runs sequentially
    */
   @Override
   public Scheduler getScheduler() {
@@ -364,7 +381,8 @@ public class PythonCondaInterpreter extends Interpreter {
     }
   }
 
-  public static String runCommand(List<String> commands) throws IOException, InterruptedException {
+  public static String runCommand(List<String> commands)
+      throws IOException, InterruptedException {
     logger.info("Starting shell commands: " + StringUtils.join(commands, " "));
     Process process = Runtime.getRuntime().exec(commands.toArray(new String[0]));
     StreamGobbler errorGobbler = new StreamGobbler(process.getErrorStream());
@@ -411,7 +429,8 @@ public class PythonCondaInterpreter extends Interpreter {
     }
   }
 
-  public static String runCommand(String... command) throws IOException, InterruptedException {
+  public static String runCommand(String... command)
+      throws IOException, InterruptedException {
 
     List<String> list = new ArrayList<>(command.length);
     for (String arg : command) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/python/src/main/java/org/apache/zeppelin/python/PythonDockerInterpreter.java
----------------------------------------------------------------------
diff --git a/python/src/main/java/org/apache/zeppelin/python/PythonDockerInterpreter.java b/python/src/main/java/org/apache/zeppelin/python/PythonDockerInterpreter.java
index 1774187..52caf35 100644
--- a/python/src/main/java/org/apache/zeppelin/python/PythonDockerInterpreter.java
+++ b/python/src/main/java/org/apache/zeppelin/python/PythonDockerInterpreter.java
@@ -16,6 +16,15 @@
  */
 package org.apache.zeppelin.python;
 
+import org.apache.zeppelin.interpreter.Interpreter;
+import org.apache.zeppelin.interpreter.InterpreterContext;
+import org.apache.zeppelin.interpreter.InterpreterException;
+import org.apache.zeppelin.interpreter.InterpreterOutput;
+import org.apache.zeppelin.interpreter.InterpreterResult;
+import org.apache.zeppelin.scheduler.Scheduler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.IOException;
@@ -25,16 +34,10 @@ import java.nio.file.Paths;
 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.InterpreterException;
-import org.apache.zeppelin.interpreter.InterpreterOutput;
-import org.apache.zeppelin.interpreter.InterpreterResult;
-import org.apache.zeppelin.scheduler.Scheduler;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Helps run python interpreter on a docker container */
+/**
+ * Helps run python interpreter on a docker container
+ */
 public class PythonDockerInterpreter extends Interpreter {
   Logger logger = LoggerFactory.getLogger(PythonDockerInterpreter.class);
   Pattern activatePattern = Pattern.compile("activate\\s*(.*)");
@@ -58,7 +61,9 @@ public class PythonDockerInterpreter extends Interpreter {
   }
 
   @Override
-  public void close() {}
+  public void close() {
+
+  }
 
   @Override
   public InterpreterResult interpret(String st, InterpreterContext context)
@@ -78,26 +83,23 @@ public class PythonDockerInterpreter extends Interpreter {
       pull(out, image);
 
       // mount pythonscript dir
-      String mountPythonScript = "-v " + pythonWorkDir.getAbsolutePath() + ":/_python_workdir ";
+      String mountPythonScript = "-v " + pythonWorkDir.getAbsolutePath() +
+          ":/_python_workdir ";
 
       // mount zeppelin dir
-      String mountPy4j = "-v " + zeppelinHome.getAbsolutePath() + ":/_zeppelin ";
+      String mountPy4j = "-v " + zeppelinHome.getAbsolutePath() +
+          ":/_zeppelin ";
 
       // set PYTHONPATH
       String pythonPath = ".:/_python_workdir/py4j-src-0.10.7.zip:/_python_workdir";
 
-      setPythonCommand(
-          "docker run -i --rm "
-              + mountPythonScript
-              + mountPy4j
-              + "-e PYTHONPATH=\""
-              + pythonPath
-              + "\" "
-              + image
-              + " "
-              + pythonInterpreter.getPythonExec()
-              + " "
-              + "/_python_workdir/zeppelin_python.py");
+      setPythonCommand("docker run -i --rm " +
+          mountPythonScript +
+          mountPy4j +
+          "-e PYTHONPATH=\"" + pythonPath + "\" " +
+          image + " " +
+          pythonInterpreter.getPythonExec() + " " +
+          "/_python_workdir/zeppelin_python.py");
       restartPythonProcess();
       out.clear();
       return new InterpreterResult(InterpreterResult.Code.SUCCESS, "\"" + image + "\" activated");
@@ -110,6 +112,7 @@ public class PythonDockerInterpreter extends Interpreter {
     }
   }
 
+
   public void setPythonCommand(String cmd) throws InterpreterException {
     pythonInterpreter.setPythonExec(cmd);
   }
@@ -124,7 +127,9 @@ public class PythonDockerInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+
+  }
 
   @Override
   public FormType getFormType() {
@@ -137,8 +142,8 @@ public class PythonDockerInterpreter extends Interpreter {
   }
 
   /**
-   * Use python interpreter's scheduler. To make sure %python.docker paragraph and %python paragraph
-   * runs sequentially
+   * Use python interpreter's scheduler.
+   * To make sure %python.docker paragraph and %python paragraph runs sequentially
    */
   @Override
   public Scheduler getScheduler() {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java
----------------------------------------------------------------------
diff --git a/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java b/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java
index ebab2db..fb4ba9c 100644
--- a/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java
+++ b/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java
@@ -19,14 +19,6 @@ package org.apache.zeppelin.python;
 
 import com.google.common.io.Files;
 import com.google.gson.Gson;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.atomic.AtomicBoolean;
 import org.apache.commons.exec.CommandLine;
 import org.apache.commons.exec.DefaultExecutor;
 import org.apache.commons.exec.ExecuteException;
@@ -53,10 +45,19 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import py4j.GatewayServer;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.atomic.AtomicBoolean;
+
 /**
  * Interpreter for Python, it is the first implementation of interpreter for Python, so with less
- * features compared to IPythonInterpreter, but requires less prerequisites than IPythonInterpreter,
- * only python installation is required.
+ * features compared to IPythonInterpreter, but requires less prerequisites than
+ * IPythonInterpreter, only python installation is required.
  */
 public class PythonInterpreter extends Interpreter implements ExecuteResultHandler {
   private static final Logger LOGGER = LoggerFactory.getLogger(PythonInterpreter.class);
@@ -74,7 +75,7 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
   private long pythonPid = -1;
   private IPythonInterpreter iPythonInterpreter;
   private BaseZeppelinContext zeppelinContext;
-  private String condaPythonExec; // set by PythonCondaInterpreter
+  private String condaPythonExec;  // set by PythonCondaInterpreter
   private boolean usePy4jAuth = false;
 
   public PythonInterpreter(Properties property) {
@@ -85,8 +86,9 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
   public void open() throws InterpreterException {
     // try IPythonInterpreter first
     iPythonInterpreter = getIPythonInterpreter();
-    if (getProperty("zeppelin.python.useIPython", "true").equals("true")
-        && StringUtils.isEmpty(iPythonInterpreter.checkIPythonPrerequisite(getPythonExec()))) {
+    if (getProperty("zeppelin.python.useIPython", "true").equals("true") &&
+        StringUtils.isEmpty(
+            iPythonInterpreter.checkIPythonPrerequisite(getPythonExec()))) {
       try {
         iPythonInterpreter.open();
         LOGGER.info("IPython is available, Use IPythonInterpreter to replace PythonInterpreter");
@@ -128,8 +130,8 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
     // container can also connect to this gateway server.
     String serverAddress = PythonUtils.getLocalIP(properties);
     String secret = PythonUtils.createSecret(256);
-    this.gatewayServer =
-        PythonUtils.createGatewayServer(this, serverAddress, port, secret, usePy4jAuth);
+    this.gatewayServer = PythonUtils.createGatewayServer(this, serverAddress, port, secret,
+        usePy4jAuth);
     gatewayServer.start();
 
     // launch python process to connect to the gateway server in JVM side
@@ -152,15 +154,14 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
     if (usePy4jAuth) {
       env.put("PY4J_GATEWAY_SECRET", secret);
     }
-    LOGGER.info(
-        "Launching Python Process Command: "
-            + cmd.getExecutable()
-            + " "
-            + StringUtils.join(cmd.getArguments(), " "));
+    LOGGER.info("Launching Python Process Command: " + cmd.getExecutable() +
+        " " + StringUtils.join(cmd.getArguments(), " "));
     executor.execute(cmd, env, this);
     pythonScriptRunning.set(true);
   }
 
+
+
   private void createPythonScript() throws IOException {
     // set java.io.tmpdir to /tmp on MacOS, because docker can not share the /var folder which will
     // cause PythonDockerInterpreter fails.
@@ -183,12 +184,14 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
     return this.iPythonInterpreter != null;
   }
 
-  private void copyResourceToPythonWorkDir(String srcResourceName, String dstFileName)
-      throws IOException {
+  private void copyResourceToPythonWorkDir(String srcResourceName,
+                                           String dstFileName) throws IOException {
     FileOutputStream out = null;
     try {
       out = new FileOutputStream(pythonWorkDir.getAbsoluteFile() + "/" + dstFileName);
-      IOUtils.copy(getClass().getClassLoader().getResourceAsStream(srcResourceName), out);
+      IOUtils.copy(
+          getClass().getClassLoader().getResourceAsStream(srcResourceName),
+          out);
     } finally {
       if (out != null) {
         out.close();
@@ -258,7 +261,9 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
     this.condaPythonExec = pythonExec;
   }
 
-  /** Request send to Python Daemon */
+  /**
+   * Request send to Python Daemon
+   */
   public class PythonInterpretRequest {
     public String statements;
     public boolean isForCompletion;
@@ -330,7 +335,9 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
   }
 
   // used by subclass such as PySparkInterpreter to set JobGroup before executing spark code
-  protected void preCallPython(InterpreterContext context) {}
+  protected void preCallPython(InterpreterContext context) {
+
+  }
 
   // blocking call. Send python code to python process and get response
   protected void callPython(PythonInterpretRequest request) {
@@ -359,8 +366,8 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
     }
 
     if (!pythonScriptRunning.get()) {
-      return new InterpreterResult(
-          Code.ERROR, "python process not running " + outputStream.toString());
+      return new InterpreterResult(Code.ERROR, "python process not running "
+          + outputStream.toString());
     }
 
     outputStream.setInterpreterOutput(context.out);
@@ -388,8 +395,8 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
 
     if (!pythonScriptInitialized.get()) {
       // timeout. didn't get initialized message
-      errorMessage.add(
-          new InterpreterResultMessage(InterpreterResult.Type.TEXT, "Failed to initialize Python"));
+      errorMessage.add(new InterpreterResultMessage(
+          InterpreterResult.Type.TEXT, "Failed to initialize Python"));
       return new InterpreterResult(Code.ERROR, errorMessage);
     }
 
@@ -450,9 +457,11 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
     return 0;
   }
 
+
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) throws InterpreterException {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+                                                InterpreterContext interpreterContext)
+      throws InterpreterException {
     if (iPythonInterpreter != null) {
       return iPythonInterpreter.completion(buf, cursor, interpreterContext);
     }
@@ -473,7 +482,8 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
     String[] completionList = null;
     synchronized (statementFinishedNotifier) {
       long startTime = System.currentTimeMillis();
-      while (statementOutput == null && pythonScriptRunning.get()) {
+      while (statementOutput == null
+          && pythonScriptRunning.get()) {
         try {
           if (System.currentTimeMillis() - startTime > MAX_TIMEOUT_SEC * 1000) {
             LOGGER.error("Python completion didn't have response for {}sec.", MAX_TIMEOUT_SEC);
@@ -492,7 +502,7 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
       Gson gson = new Gson();
       completionList = gson.fromJson(statementOutput, String[].class);
     }
-    // end code for completion
+    //end code for completion
     if (completionList == null) {
       return new LinkedList<>();
     }
@@ -528,6 +538,7 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
       if (indexOfReverseSeqPostion < completionStartPosition && indexOfReverseSeqPostion > 0) {
         completionStartPosition = indexOfReverseSeqPostion;
       }
+
     }
 
     if (completionStartPosition == completionEndPosition) {
@@ -535,8 +546,8 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
     } else {
       completionStartPosition = completionEndPosition - completionStartPosition;
     }
-    resultCompletionText =
-        completionScriptText.substring(completionStartPosition, completionEndPosition);
+    resultCompletionText = completionScriptText.substring(
+        completionStartPosition, completionEndPosition);
 
     return resultCompletionText;
   }
@@ -564,8 +575,8 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
         IOUtils.toString(getClass().getClassLoader().getResourceAsStream(resourceName));
     try {
       // Add hook explicitly, otherwise python will fail to execute the statement
-      InterpreterResult result =
-          interpret(bootstrapCode + "\n" + "__zeppelin__._displayhook()", InterpreterContext.get());
+      InterpreterResult result = interpret(bootstrapCode + "\n" + "__zeppelin__._displayhook()",
+          InterpreterContext.get());
       if (result.code() != Code.SUCCESS) {
         throw new IOException("Fail to run bootstrap script: " + resourceName);
       }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/python/src/main/java/org/apache/zeppelin/python/PythonInterpreterPandasSql.java
----------------------------------------------------------------------
diff --git a/python/src/main/java/org/apache/zeppelin/python/PythonInterpreterPandasSql.java b/python/src/main/java/org/apache/zeppelin/python/PythonInterpreterPandasSql.java
index fb812bd..4fccc3c 100644
--- a/python/src/main/java/org/apache/zeppelin/python/PythonInterpreterPandasSql.java
+++ b/python/src/main/java/org/apache/zeppelin/python/PythonInterpreterPandasSql.java
@@ -17,8 +17,6 @@
 
 package org.apache.zeppelin.python;
 
-import java.io.IOException;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -26,10 +24,13 @@ import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.util.Properties;
+
 /**
  * SQL over Pandas DataFrame interpreter for %python group
- *
- * <p>Match experience of %sparpk.sql over Spark DataFrame
+ * <p>
+ * Match experience of %sparpk.sql over Spark DataFrame
  */
 public class PythonInterpreterPandasSql extends Interpreter {
   private static final Logger LOG = LoggerFactory.getLogger(PythonInterpreterPandasSql.class);
@@ -72,7 +73,9 @@ public class PythonInterpreterPandasSql extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+
+  }
 
   @Override
   public FormType getFormType() {
@@ -83,4 +86,5 @@ public class PythonInterpreterPandasSql extends Interpreter {
   public int getProgress(InterpreterContext context) {
     return 0;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/python/src/main/java/org/apache/zeppelin/python/PythonUtils.java
----------------------------------------------------------------------
diff --git a/python/src/main/java/org/apache/zeppelin/python/PythonUtils.java b/python/src/main/java/org/apache/zeppelin/python/PythonUtils.java
index 3cf2493..996518b 100644
--- a/python/src/main/java/org/apache/zeppelin/python/PythonUtils.java
+++ b/python/src/main/java/org/apache/zeppelin/python/PythonUtils.java
@@ -17,6 +17,11 @@
 
 package org.apache.zeppelin.python;
 
+import org.apache.commons.codec.binary.Base64;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import py4j.GatewayServer;
+
 import java.io.IOException;
 import java.net.Inet4Address;
 import java.net.InetAddress;
@@ -24,36 +29,28 @@ import java.net.UnknownHostException;
 import java.security.SecureRandom;
 import java.util.List;
 import java.util.Properties;
-import org.apache.commons.codec.binary.Base64;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import py4j.GatewayServer;
 
 public class PythonUtils {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(PythonUtils.class);
 
-  public static GatewayServer createGatewayServer(
-      Object entryPoint, String serverAddress, int port, String secretKey, boolean useAuth)
-      throws IOException {
-    LOGGER.info(
-        "Launching GatewayServer at " + serverAddress + ":" + port + ", useAuth: " + useAuth);
+  public static GatewayServer createGatewayServer(Object entryPoint,
+                                                  String serverAddress,
+                                                  int port,
+                                                  String secretKey,
+                                                  boolean useAuth) throws IOException {
+    LOGGER.info("Launching GatewayServer at " + serverAddress + ":" + port +
+        ", useAuth: " + useAuth);
     if (useAuth) {
       try {
-        Class clz =
-            Class.forName(
-                "py4j.GatewayServer$GatewayServerBuilder",
-                true,
-                Thread.currentThread().getContextClassLoader());
+        Class clz = Class.forName("py4j.GatewayServer$GatewayServerBuilder", true,
+            Thread.currentThread().getContextClassLoader());
         Object builder = clz.getConstructor(Object.class).newInstance(entryPoint);
         builder.getClass().getMethod("authToken", String.class).invoke(builder, secretKey);
         builder.getClass().getMethod("javaPort", int.class).invoke(builder, port);
-        builder
-            .getClass()
-            .getMethod("javaAddress", InetAddress.class)
-            .invoke(builder, InetAddress.getByName(serverAddress));
-        builder
-            .getClass()
+        builder.getClass().getMethod("javaAddress", InetAddress.class).invoke(builder,
+            InetAddress.getByName(serverAddress));
+        builder.getClass()
             .getMethod("callbackClient", int.class, InetAddress.class, String.class)
             .invoke(builder, port, InetAddress.getByName(serverAddress), secretKey);
         return (GatewayServer) builder.getClass().getMethod("build").invoke(builder);
@@ -61,8 +58,7 @@ public class PythonUtils {
         throw new IOException(e);
       }
     } else {
-      return new GatewayServer(
-          entryPoint,
+      return new GatewayServer(entryPoint,
           port,
           GatewayServer.DEFAULT_PYTHON_PORT,
           InetAddress.getByName(serverAddress),
@@ -76,7 +72,8 @@ public class PythonUtils {
   public static String getLocalIP(Properties properties) {
     // zeppelin.python.gatewayserver_address is only for unit test on travis.
     // Because the FQDN would fail unit test on travis ci.
-    String gatewayserver_address = properties.getProperty("zeppelin.python.gatewayserver_address");
+    String gatewayserver_address =
+        properties.getProperty("zeppelin.python.gatewayserver_address");
     if (gatewayserver_address != null) {
       return gatewayserver_address;
     }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/python/src/main/java/org/apache/zeppelin/python/PythonZeppelinContext.java
----------------------------------------------------------------------
diff --git a/python/src/main/java/org/apache/zeppelin/python/PythonZeppelinContext.java b/python/src/main/java/org/apache/zeppelin/python/PythonZeppelinContext.java
index 57b41bf..526784e 100644
--- a/python/src/main/java/org/apache/zeppelin/python/PythonZeppelinContext.java
+++ b/python/src/main/java/org/apache/zeppelin/python/PythonZeppelinContext.java
@@ -17,12 +17,15 @@
 
 package org.apache.zeppelin.python;
 
-import java.util.List;
-import java.util.Map;
 import org.apache.zeppelin.interpreter.BaseZeppelinContext;
 import org.apache.zeppelin.interpreter.InterpreterHookRegistry;
 
-/** ZeppelinContext for Python */
+import java.util.List;
+import java.util.Map;
+
+/**
+ * ZeppelinContext for Python
+ */
 public class PythonZeppelinContext extends BaseZeppelinContext {
 
   public PythonZeppelinContext(InterpreterHookRegistry hooks, int maxResult) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/python/src/test/java/org/apache/zeppelin/python/BasePythonInterpreterTest.java
----------------------------------------------------------------------
diff --git a/python/src/test/java/org/apache/zeppelin/python/BasePythonInterpreterTest.java b/python/src/test/java/org/apache/zeppelin/python/BasePythonInterpreterTest.java
index 81189e7..a51c053 100644
--- a/python/src/test/java/org/apache/zeppelin/python/BasePythonInterpreterTest.java
+++ b/python/src/test/java/org/apache/zeppelin/python/BasePythonInterpreterTest.java
@@ -17,12 +17,6 @@
 
 package org.apache.zeppelin.python;
 
-import static junit.framework.TestCase.assertTrue;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.mock;
-
-import java.io.IOException;
-import java.util.List;
 import org.apache.zeppelin.display.ui.CheckBox;
 import org.apache.zeppelin.display.ui.Password;
 import org.apache.zeppelin.display.ui.Select;
@@ -40,6 +34,13 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.List;
+
+import static junit.framework.TestCase.assertTrue;
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+
 public abstract class BasePythonInterpreterTest {
 
   protected InterpreterGroup intpGroup;
@@ -51,11 +52,13 @@ public abstract class BasePythonInterpreterTest {
   @After
   public abstract void tearDown() throws InterpreterException;
 
+
   @Test
   public void testPythonBasics() throws InterpreterException, InterruptedException, IOException {
 
     InterpreterContext context = getInterpreterContext();
-    InterpreterResult result = interpreter.interpret("import sys\nprint(sys.version[0])", context);
+    InterpreterResult result =
+        interpreter.interpret("import sys\nprint(sys.version[0])", context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     Thread.sleep(100);
     List<InterpreterResultMessage> interpreterResultMessages =
@@ -142,8 +145,8 @@ public abstract class BasePythonInterpreterTest {
     if (interpreter instanceof IPythonInterpreter) {
       interpreterResultMessages = context.out.toInterpreterResultMessage();
       assertEquals(1, interpreterResultMessages.size());
-      assertTrue(
-          interpreterResultMessages.get(0).getData().contains("name 'unknown' is not defined"));
+      assertTrue(interpreterResultMessages.get(0).getData().contains(
+          "name 'unknown' is not defined"));
     } else if (interpreter instanceof PythonInterpreter) {
       assertTrue(result.message().get(0).getData().contains("name 'unknown' is not defined"));
     }
@@ -163,13 +166,11 @@ public abstract class BasePythonInterpreterTest {
 
     // ZEPPELIN-1133
     context = getInterpreterContext();
-    result =
-        interpreter.interpret(
-            "from __future__ import print_function\n"
-                + "def greet(name):\n"
-                + "    print('Hello', name)\n"
-                + "greet('Jack')",
-            context);
+    result = interpreter.interpret(
+        "from __future__ import print_function\n" +
+            "def greet(name):\n" +
+            "    print('Hello', name)\n" +
+            "greet('Jack')", context);
     Thread.sleep(100);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     interpreterResultMessages = context.out.toInterpreterResultMessage();
@@ -194,8 +195,8 @@ public abstract class BasePythonInterpreterTest {
     assertEquals(0, interpreterResultMessages.size());
 
     context = getInterpreterContext();
-    result =
-        interpreter.interpret("# print('Hello')\n# print('How are u?')\n# time.sleep(1)", context);
+    result = interpreter.interpret(
+        "# print('Hello')\n# print('How are u?')\n# time.sleep(1)", context);
     Thread.sleep(100);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     interpreterResultMessages = context.out.toInterpreterResultMessage();
@@ -258,7 +259,8 @@ public abstract class BasePythonInterpreterTest {
 
     // Password
     context = getInterpreterContext();
-    result = interpreter.interpret("z.password(name='pwd_1')", context);
+    result =
+        interpreter.interpret("z.password(name='pwd_1')", context);
     Thread.sleep(100);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertTrue(context.getGui().getForms().get("pwd_1") instanceof Password);
@@ -267,11 +269,8 @@ public abstract class BasePythonInterpreterTest {
 
     // Select
     context = getInterpreterContext();
-    result =
-        interpreter.interpret(
-            "z.select(name='select_1',"
-                + " options=[('value_1', 'name_1'), ('value_2', 'name_2')])",
-            context);
+    result = interpreter.interpret("z.select(name='select_1'," +
+        " options=[('value_1', 'name_1'), ('value_2', 'name_2')])", context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals(1, context.getGui().getForms().size());
     assertTrue(context.getGui().getForms().get("select_1") instanceof Select);
@@ -283,11 +282,8 @@ public abstract class BasePythonInterpreterTest {
 
     // CheckBox
     context = getInterpreterContext();
-    result =
-        interpreter.interpret(
-            "z.checkbox(name='checkbox_1',"
-                + "options=[('value_1', 'name_1'), ('value_2', 'name_2')])",
-            context);
+    result = interpreter.interpret("z.checkbox(name='checkbox_1'," +
+        "options=[('value_1', 'name_1'), ('value_2', 'name_2')])", context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals(1, context.getGui().getForms().size());
     assertTrue(context.getGui().getForms().get("checkbox_1") instanceof CheckBox);
@@ -299,11 +295,8 @@ public abstract class BasePythonInterpreterTest {
 
     // Pandas DataFrame
     context = getInterpreterContext();
-    result =
-        interpreter.interpret(
-            "import pandas as pd\n"
-                + "df = pd.DataFrame({'id':[1,2,3], 'name':['a','b','c']})\nz.show(df)",
-            context);
+    result = interpreter.interpret("import pandas as pd\n" +
+        "df = pd.DataFrame({'id':[1,2,3], 'name':['a','b','c']})\nz.show(df)", context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     interpreterResultMessages = context.out.toInterpreterResultMessage();
     assertEquals(1, interpreterResultMessages.size());
@@ -311,28 +304,21 @@ public abstract class BasePythonInterpreterTest {
     assertEquals("id\tname\n1\ta\n2\tb\n3\tc\n", interpreterResultMessages.get(0).getData());
 
     context = getInterpreterContext();
-    result =
-        interpreter.interpret(
-            "import pandas as pd\n"
-                + "df = pd.DataFrame({'id':[1,2,3,4], 'name':['a','b','c', 'd']})\nz.show(df)",
-            context);
+    result = interpreter.interpret("import pandas as pd\n" +
+        "df = pd.DataFrame({'id':[1,2,3,4], 'name':['a','b','c', 'd']})\nz.show(df)", context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     interpreterResultMessages = context.out.toInterpreterResultMessage();
     assertEquals(2, interpreterResultMessages.size());
     assertEquals(InterpreterResult.Type.TABLE, interpreterResultMessages.get(0).getType());
     assertEquals("id\tname\n1\ta\n2\tb\n3\tc\n", interpreterResultMessages.get(0).getData());
     assertEquals(InterpreterResult.Type.HTML, interpreterResultMessages.get(1).getType());
-    assertEquals(
-        "<font color=red>Results are limited by 3.</font>\n",
+    assertEquals("<font color=red>Results are limited by 3.</font>\n",
         interpreterResultMessages.get(1).getData());
 
     // z.show(matplotlib)
     context = getInterpreterContext();
-    result =
-        interpreter.interpret(
-            "import matplotlib.pyplot as plt\n"
-                + "data=[1,1,2,3,4]\nplt.figure()\nplt.plot(data)\nz.show(plt)",
-            context);
+    result = interpreter.interpret("import matplotlib.pyplot as plt\n" +
+        "data=[1,1,2,3,4]\nplt.figure()\nplt.plot(data)\nz.show(plt)", context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     interpreterResultMessages = context.out.toInterpreterResultMessage();
     assertEquals(1, interpreterResultMessages.size());
@@ -340,11 +326,8 @@ public abstract class BasePythonInterpreterTest {
 
     // clear output
     context = getInterpreterContext();
-    result =
-        interpreter.interpret(
-            "import time\nprint(\"Hello\")\n"
-                + "time.sleep(0.5)\nz.getInterpreterContext().out().clear()\nprint(\"world\")\n",
-            context);
+    result = interpreter.interpret("import time\nprint(\"Hello\")\n" +
+        "time.sleep(0.5)\nz.getInterpreterContext().out().clear()\nprint(\"world\")\n", context);
     assertEquals("%text world\n", context.out.getCurrentOutput().toString());
   }
 
@@ -354,20 +337,15 @@ public abstract class BasePythonInterpreterTest {
     String restoreCode = "z = __zeppelin__\n";
     String validCode = "z.input(\"test\")\n";
 
-    assertEquals(
-        InterpreterResult.Code.SUCCESS,
+    assertEquals(InterpreterResult.Code.SUCCESS,
         interpreter.interpret(validCode, getInterpreterContext()).code());
-    assertEquals(
-        InterpreterResult.Code.SUCCESS,
+    assertEquals(InterpreterResult.Code.SUCCESS,
         interpreter.interpret(redefinitionCode, getInterpreterContext()).code());
-    assertEquals(
-        InterpreterResult.Code.ERROR,
+    assertEquals(InterpreterResult.Code.ERROR,
         interpreter.interpret(validCode, getInterpreterContext()).code());
-    assertEquals(
-        InterpreterResult.Code.SUCCESS,
+    assertEquals(InterpreterResult.Code.SUCCESS,
         interpreter.interpret(restoreCode, getInterpreterContext()).code());
-    assertEquals(
-        InterpreterResult.Code.SUCCESS,
+    assertEquals(InterpreterResult.Code.SUCCESS,
         interpreter.interpret(validCode, getInterpreterContext()).code());
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/python/src/test/java/org/apache/zeppelin/python/IPythonInterpreterTest.java
----------------------------------------------------------------------
diff --git a/python/src/test/java/org/apache/zeppelin/python/IPythonInterpreterTest.java b/python/src/test/java/org/apache/zeppelin/python/IPythonInterpreterTest.java
index 5fba6ba..4b6bfdb 100644
--- a/python/src/test/java/org/apache/zeppelin/python/IPythonInterpreterTest.java
+++ b/python/src/test/java/org/apache/zeppelin/python/IPythonInterpreterTest.java
@@ -17,13 +17,6 @@
 
 package org.apache.zeppelin.python;
 
-import static junit.framework.TestCase.assertTrue;
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -33,6 +26,15 @@ import org.apache.zeppelin.interpreter.InterpreterResultMessage;
 import org.apache.zeppelin.interpreter.LazyOpenInterpreter;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import static junit.framework.TestCase.assertTrue;
+import static org.junit.Assert.assertEquals;
+
+
 public class IPythonInterpreterTest extends BasePythonInterpreterTest {
 
   protected Properties initIntpProperties() {
@@ -111,11 +113,8 @@ public class IPythonInterpreterTest extends BasePythonInterpreterTest {
   public void testIPythonPlotting() throws InterpreterException, InterruptedException, IOException {
     // matplotlib
     InterpreterContext context = getInterpreterContext();
-    InterpreterResult result =
-        interpreter.interpret(
-            "%matplotlib inline\n"
-                + "import matplotlib.pyplot as plt\ndata=[1,1,2,3,4]\nplt.figure()\nplt.plot(data)",
-            context);
+    InterpreterResult result = interpreter.interpret("%matplotlib inline\n" +
+        "import matplotlib.pyplot as plt\ndata=[1,1,2,3,4]\nplt.figure()\nplt.plot(data)", context);
     Thread.sleep(100);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     List<InterpreterResultMessage> interpreterResultMessages =
@@ -145,13 +144,10 @@ public class IPythonInterpreterTest extends BasePythonInterpreterTest {
     // bokeh
     // bokeh initialization
     context = getInterpreterContext();
-    result =
-        interpreter.interpret(
-            "from bokeh.io import output_notebook, show\n"
-                + "from bokeh.plotting import figure\n"
-                + "import bkzep\n"
-                + "output_notebook(notebook_type='zeppelin')",
-            context);
+    result = interpreter.interpret("from bokeh.io import output_notebook, show\n" +
+        "from bokeh.plotting import figure\n" +
+        "import bkzep\n" +
+        "output_notebook(notebook_type='zeppelin')", context);
     Thread.sleep(100);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     interpreterResultMessages = context.out.toInterpreterResultMessage();
@@ -163,15 +159,12 @@ public class IPythonInterpreterTest extends BasePythonInterpreterTest {
 
     // bokeh plotting
     context = getInterpreterContext();
-    result =
-        interpreter.interpret(
-            "from bokeh.plotting import figure, output_file, show\n"
-                + "x = [1, 2, 3, 4, 5]\n"
-                + "y = [6, 7, 2, 4, 5]\n"
-                + "p = figure(title=\"simple line example\", x_axis_label='x', y_axis_label='y')\n"
-                + "p.line(x, y, legend=\"Temp.\", line_width=2)\n"
-                + "show(p)",
-            context);
+    result = interpreter.interpret("from bokeh.plotting import figure, output_file, show\n" +
+        "x = [1, 2, 3, 4, 5]\n" +
+        "y = [6, 7, 2, 4, 5]\n" +
+        "p = figure(title=\"simple line example\", x_axis_label='x', y_axis_label='y')\n" +
+        "p.line(x, y, legend=\"Temp.\", line_width=2)\n" +
+        "show(p)", context);
     Thread.sleep(100);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     interpreterResultMessages = context.out.toInterpreterResultMessage();
@@ -183,13 +176,10 @@ public class IPythonInterpreterTest extends BasePythonInterpreterTest {
 
     // ggplot
     context = getInterpreterContext();
-    result =
-        interpreter.interpret(
-            "from ggplot import *\n"
-                + "ggplot(diamonds, aes(x='price', fill='cut')) +\\\n"
-                + "    geom_density(alpha=0.25) +\\\n"
-                + "    facet_wrap(\"clarity\")",
-            context);
+    result = interpreter.interpret("from ggplot import *\n" +
+        "ggplot(diamonds, aes(x='price', fill='cut')) +\\\n" +
+        "    geom_density(alpha=0.25) +\\\n" +
+        "    facet_wrap(\"clarity\")", context);
     Thread.sleep(100);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     interpreterResultMessages = context.out.toInterpreterResultMessage();
@@ -244,4 +234,5 @@ public class IPythonInterpreterTest extends BasePythonInterpreterTest {
     result = interpreter.interpret("print('1'*3000)", context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/python/src/test/java/org/apache/zeppelin/python/PythonCondaInterpreterTest.java
----------------------------------------------------------------------
diff --git a/python/src/test/java/org/apache/zeppelin/python/PythonCondaInterpreterTest.java b/python/src/test/java/org/apache/zeppelin/python/PythonCondaInterpreterTest.java
index 1a8ab03..a2cdac8 100644
--- a/python/src/test/java/org/apache/zeppelin/python/PythonCondaInterpreterTest.java
+++ b/python/src/test/java/org/apache/zeppelin/python/PythonCondaInterpreterTest.java
@@ -17,22 +17,7 @@
 
 package org.apache.zeppelin.python;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
 
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.regex.Matcher;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.InterpreterGroup;
@@ -41,6 +26,23 @@ import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.regex.Matcher;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
 public class PythonCondaInterpreterTest {
   private PythonCondaInterpreter conda;
   private PythonInterpreter python;
@@ -103,14 +105,14 @@ public class PythonCondaInterpreterTest {
   }
 
   @Test
-  public void testParseCondaCommonStdout() throws IOException, InterruptedException {
+  public void testParseCondaCommonStdout()
+      throws IOException, InterruptedException {
 
-    StringBuilder sb =
-        new StringBuilder()
-            .append("# comment1\n")
-            .append("# comment2\n")
-            .append("env1     /location1\n")
-            .append("env2     /location2\n");
+    StringBuilder sb = new StringBuilder()
+        .append("# comment1\n")
+        .append("# comment2\n")
+        .append("env1     /location1\n")
+        .append("env2     /location2\n");
 
     Map<String, String> locationPerEnv =
         PythonCondaInterpreter.parseCondaCommonStdout(sb.toString());
@@ -121,15 +123,20 @@ public class PythonCondaInterpreterTest {
 
   @Test
   public void testGetRestArgsFromMatcher() {
-    Matcher m = PythonCondaInterpreter.PATTERN_COMMAND_ENV.matcher("env remove --name test --yes");
+    Matcher m =
+        PythonCondaInterpreter.PATTERN_COMMAND_ENV.matcher("env remove --name test --yes");
     m.matches();
 
     List<String> restArgs = PythonCondaInterpreter.getRestArgsFromMatcher(m);
-    List<String> expected = Arrays.asList(new String[] {"remove", "--name", "test", "--yes"});
+    List<String> expected = Arrays.asList(new String[]{"remove", "--name", "test", "--yes"});
     assertEquals(expected, restArgs);
   }
 
   private InterpreterContext getInterpreterContext() {
-    return InterpreterContext.builder().setInterpreterOut(new InterpreterOutput(null)).build();
+    return InterpreterContext.builder()
+        .setInterpreterOut(new InterpreterOutput(null))
+        .build();
   }
+
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/python/src/test/java/org/apache/zeppelin/python/PythonDockerInterpreterTest.java
----------------------------------------------------------------------
diff --git a/python/src/test/java/org/apache/zeppelin/python/PythonDockerInterpreterTest.java b/python/src/test/java/org/apache/zeppelin/python/PythonDockerInterpreterTest.java
index 39041f2..04bb414 100644
--- a/python/src/test/java/org/apache/zeppelin/python/PythonDockerInterpreterTest.java
+++ b/python/src/test/java/org/apache/zeppelin/python/PythonDockerInterpreterTest.java
@@ -16,17 +16,6 @@
  */
 package org.apache.zeppelin.python;
 
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
-import java.io.File;
-import java.util.Arrays;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.InterpreterGroup;
@@ -35,6 +24,18 @@ import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mockito;
 
+import java.io.File;
+import java.util.Arrays;
+import java.util.Properties;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
 public class PythonDockerInterpreterTest {
   private PythonDockerInterpreter docker;
   private PythonInterpreter python;
@@ -76,6 +77,8 @@ public class PythonDockerInterpreterTest {
   }
 
   private InterpreterContext getInterpreterContext() {
-    return InterpreterContext.builder().setInterpreterOut(new InterpreterOutput(null)).build();
+    return InterpreterContext.builder()
+        .setInterpreterOut(new InterpreterOutput(null))
+        .build();
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterMatplotlibTest.java
----------------------------------------------------------------------
diff --git a/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterMatplotlibTest.java b/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterMatplotlibTest.java
index 1fb2418..8326612 100644
--- a/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterMatplotlibTest.java
+++ b/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterMatplotlibTest.java
@@ -17,14 +17,6 @@
 
 package org.apache.zeppelin.python;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Properties;
 import org.apache.zeppelin.display.AngularObjectRegistry;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
@@ -38,6 +30,15 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertTrue;
+
 public class PythonInterpreterMatplotlibTest implements InterpreterOutputListener {
   private InterpreterGroup intpGroup;
   private PythonInterpreter python;
@@ -63,11 +64,10 @@ public class PythonInterpreterMatplotlibTest implements InterpreterOutputListene
 
     out = new InterpreterOutput(this);
 
-    context =
-        InterpreterContext.builder()
-            .setInterpreterOut(out)
-            .setAngularObjectRegistry(new AngularObjectRegistry(intpGroup.getId(), null))
-            .build();
+    context = InterpreterContext.builder()
+        .setInterpreterOut(out)
+        .setAngularObjectRegistry(new AngularObjectRegistry(intpGroup.getId(), null))
+        .build();
     InterpreterContext.set(context);
 
     python.open();
@@ -98,16 +98,12 @@ public class PythonInterpreterMatplotlibTest implements InterpreterOutputListene
     ret = python.interpret("plt.plot([1, 2, 3])", context);
     ret = python.interpret("plt.show()", context);
 
-    assertEquals(
-        new String(out.getOutputAt(0).toByteArray()), InterpreterResult.Code.SUCCESS, ret.code());
-    assertEquals(
-        new String(out.getOutputAt(0).toByteArray()),
-        InterpreterResult.Type.TEXT,
-        out.getOutputAt(0).getType());
-    assertEquals(
-        new String(out.getOutputAt(1).toByteArray()),
-        InterpreterResult.Type.HTML,
-        out.getOutputAt(1).getType());
+    assertEquals(new String(out.getOutputAt(0).toByteArray()),
+        InterpreterResult.Code.SUCCESS, ret.code());
+    assertEquals(new String(out.getOutputAt(0).toByteArray()),
+        InterpreterResult.Type.TEXT, out.getOutputAt(0).getType());
+    assertEquals(new String(out.getOutputAt(1).toByteArray()),
+        InterpreterResult.Type.HTML, out.getOutputAt(1).getType());
     assertTrue(new String(out.getOutputAt(1).toByteArray()).contains("data:image/png;base64"));
     assertTrue(new String(out.getOutputAt(1).toByteArray()).contains("<div>"));
   }
@@ -129,8 +125,8 @@ public class PythonInterpreterMatplotlibTest implements InterpreterOutputListene
     // type to HTML.
     ret = python.interpret("plt.show()", context);
 
-    assertEquals(
-        new String(out.getOutputAt(0).toByteArray()), InterpreterResult.Code.SUCCESS, ret.code());
+    assertEquals(new String(out.getOutputAt(0).toByteArray()),
+        InterpreterResult.Code.SUCCESS, ret.code());
     assertEquals(0, ret.message().size());
 
     // Now test that new plot is drawn. It should be identical to the
@@ -177,12 +173,19 @@ public class PythonInterpreterMatplotlibTest implements InterpreterOutputListene
     assertNotSame(msg1, msg2);
   }
 
+
   @Override
-  public void onUpdateAll(InterpreterOutput out) {}
+  public void onUpdateAll(InterpreterOutput out) {
+
+  }
 
   @Override
-  public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {}
+  public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
+
+  }
 
   @Override
-  public void onUpdate(int index, InterpreterResultMessageOutput out) {}
+  public void onUpdate(int index, InterpreterResultMessageOutput out) {
+
+  }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterPandasSqlTest.java
----------------------------------------------------------------------
diff --git a/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterPandasSqlTest.java b/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterPandasSqlTest.java
index 9d4c445..8f6cab2 100644
--- a/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterPandasSqlTest.java
+++ b/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterPandasSqlTest.java
@@ -17,13 +17,6 @@
 
 package org.apache.zeppelin.python;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.InterpreterGroup;
@@ -36,17 +29,25 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
 /**
  * In order for this test to work, test env must have installed:
- *
  * <ol>
- *   -
- *   <li>Python -
- *   <li>NumPy -
- *   <li>Pandas -
- *   <li>PandaSql
- *       <ol>
- *         <p>To run manually on such environment, use: <code>
+ * - <li>Python</li>
+ * - <li>NumPy</li>
+ * - <li>Pandas</li>
+ * - <li>PandaSql</li>
+ * <ol>
+ * <p>
+ * To run manually on such environment, use:
+ * <code>
  * mvn -Dpython.test.exclude='' test -pl python -am
  * </code>
  */
@@ -69,7 +70,9 @@ public class PythonInterpreterPandasSqlTest implements InterpreterOutputListener
     intpGroup = new InterpreterGroup();
 
     out = new InterpreterOutput(this);
-    context = InterpreterContext.builder().setInterpreterOut(out).build();
+    context = InterpreterContext.builder()
+        .setInterpreterOut(out)
+        .build();
     InterpreterContext.set(context);
 
     python = new PythonInterpreter(p);
@@ -81,6 +84,7 @@ public class PythonInterpreterPandasSqlTest implements InterpreterOutputListener
 
     intpGroup.put("note", Arrays.asList(python, sql));
 
+
     // to make sure python is running.
     InterpreterResult ret = python.interpret("print(\"python initialized\")\n", context);
     assertEquals(ret.message().toString(), InterpreterResult.Code.SUCCESS, ret.code());
@@ -114,40 +118,36 @@ public class PythonInterpreterPandasSqlTest implements InterpreterOutputListener
   public void sqlOverTestDataPrintsTable() throws IOException, InterpreterException {
     InterpreterResult ret;
     // given
-    // String expectedTable = "name\tage\n\nmoon\t33\n\npark\t34";
+    //String expectedTable = "name\tage\n\nmoon\t33\n\npark\t34";
     ret = python.interpret("import pandas as pd", context);
     ret = python.interpret("import numpy as np", context);
     // DataFrame df2 \w test data
-    ret =
-        python.interpret(
-            "df2 = pd.DataFrame({ 'age'  : np.array([33, 51, 51, 34]), "
-                + "'name' : pd.Categorical(['moon','jobs','gates','park'])})",
-            context);
+    ret = python.interpret("df2 = pd.DataFrame({ 'age'  : np.array([33, 51, 51, 34]), " +
+        "'name' : pd.Categorical(['moon','jobs','gates','park'])})", context);
     assertEquals(ret.message().toString(), InterpreterResult.Code.SUCCESS, ret.code());
 
-    // when
+    //when
     ret = sql.interpret("select name, age from df2 where age < 40", context);
 
-    // then
-    assertEquals(
-        new String(out.getOutputAt(1).toByteArray()), InterpreterResult.Code.SUCCESS, ret.code());
-    assertEquals(
-        new String(out.getOutputAt(1).toByteArray()), Type.TABLE, out.getOutputAt(1).getType());
+    //then
+    assertEquals(new String(out.getOutputAt(1).toByteArray()),
+        InterpreterResult.Code.SUCCESS, ret.code());
+    assertEquals(new String(out.getOutputAt(1).toByteArray()), Type.TABLE,
+        out.getOutputAt(1).getType());
     assertTrue(new String(out.getOutputAt(1).toByteArray()).indexOf("moon\t33") > 0);
     assertTrue(new String(out.getOutputAt(1).toByteArray()).indexOf("park\t34") > 0);
 
-    assertEquals(
-        InterpreterResult.Code.SUCCESS,
-        sql.interpret("select case when name==\"aa\" then name else name end from df2", context)
-            .code());
+    assertEquals(InterpreterResult.Code.SUCCESS,
+        sql.interpret("select case when name==\"aa\" then name else name end from df2",
+            context).code());
   }
 
   @Test
   public void badSqlSyntaxFails() throws IOException, InterpreterException {
-    // when
+    //when
     InterpreterResult ret = sql.interpret("select wrong syntax", context);
 
-    // then
+    //then
     assertNotNull("Interpreter returned 'null'", ret);
     assertEquals(ret.toString(), InterpreterResult.Code.ERROR, ret.code());
   }
@@ -168,21 +168,27 @@ public class PythonInterpreterPandasSqlTest implements InterpreterOutputListener
     ret = python.interpret("z.show(df1, show_index=True)", context);
 
     // then
-    assertEquals(
-        new String(out.getOutputAt(0).toByteArray()), InterpreterResult.Code.SUCCESS, ret.code());
-    assertEquals(
-        new String(out.getOutputAt(1).toByteArray()), Type.TABLE, out.getOutputAt(1).getType());
+    assertEquals(new String(out.getOutputAt(0).toByteArray()),
+        InterpreterResult.Code.SUCCESS, ret.code());
+    assertEquals(new String(out.getOutputAt(1).toByteArray()),
+        Type.TABLE, out.getOutputAt(1).getType());
     assertTrue(new String(out.getOutputAt(1).toByteArray()).contains("index_name"));
     assertTrue(new String(out.getOutputAt(1).toByteArray()).contains("nan"));
     assertTrue(new String(out.getOutputAt(1).toByteArray()).contains("6.7"));
   }
 
   @Override
-  public void onUpdateAll(InterpreterOutput out) {}
+  public void onUpdateAll(InterpreterOutput out) {
+
+  }
 
   @Override
-  public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {}
+  public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
+
+  }
 
   @Override
-  public void onUpdate(int index, InterpreterResultMessageOutput out) {}
+  public void onUpdate(int index, InterpreterResultMessageOutput out) {
+
+  }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterTest.java
----------------------------------------------------------------------
diff --git a/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterTest.java b/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterTest.java
index 10c6a8e..8748c00 100644
--- a/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterTest.java
+++ b/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterTest.java
@@ -17,16 +17,6 @@
 
 package org.apache.zeppelin.python;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.LinkedList;
-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.InterpreterException;
@@ -35,6 +25,18 @@ import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.LazyOpenInterpreter;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.Properties;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+
 public class PythonInterpreterTest extends BasePythonInterpreterTest {
 
   @Override
@@ -65,7 +67,7 @@ public class PythonInterpreterTest extends BasePythonInterpreterTest {
   public void testCodeCompletion() throws InterpreterException, IOException, InterruptedException {
     super.testCodeCompletion();
 
-    // TODO(zjffdu) PythonInterpreter doesn't support this kind of code completion for now.
+    //TODO(zjffdu) PythonInterpreter doesn't support this kind of code completion for now.
     // completion
     //    InterpreterContext context = getInterpreterContext();
     //    List<InterpreterCompletion> completions = interpreter.completion("ab", 2, context);
@@ -93,8 +95,7 @@ public class PythonInterpreterTest extends BasePythonInterpreterTest {
 
   @Test
   public void testCancelIntp() throws InterruptedException, InterpreterException {
-    assertEquals(
-        InterpreterResult.Code.SUCCESS,
+    assertEquals(InterpreterResult.Code.SUCCESS,
         interpreter.interpret("a = 1\n", getInterpreterContext()).code());
     Thread t = new Thread(new infinityPythonJob());
     t.start();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/sap/src/main/java/org/apache/zeppelin/sap/UniverseInterpreter.java
----------------------------------------------------------------------
diff --git a/sap/src/main/java/org/apache/zeppelin/sap/UniverseInterpreter.java b/sap/src/main/java/org/apache/zeppelin/sap/UniverseInterpreter.java
index cdeeacb..17da1c9 100644
--- a/sap/src/main/java/org/apache/zeppelin/sap/UniverseInterpreter.java
+++ b/sap/src/main/java/org/apache/zeppelin/sap/UniverseInterpreter.java
@@ -17,10 +17,6 @@
 
 package org.apache.zeppelin.sap;
 
-import java.util.*;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
@@ -31,7 +27,15 @@ import org.apache.zeppelin.sap.universe.*;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
 
-/** SAP Universe interpreter for Zeppelin. */
+
+import java.util.*;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * SAP Universe interpreter for Zeppelin.
+ */
 public class UniverseInterpreter extends Interpreter {
 
   public UniverseInterpreter(Properties properties) {
@@ -47,8 +51,8 @@ public class UniverseInterpreter extends Interpreter {
   private static final char NEWLINE = '\n';
   private static final char TAB = '\t';
   private static final String TABLE_MAGIC_TAG = "%table ";
-  private static final String EMPTY_DATA_MESSAGE =
-      "%html\n" + "<h4><center><b>No Data Available</b></center></h4>";
+  private static final String EMPTY_DATA_MESSAGE = "%html\n" +
+      "<h4><center><b>No Data Available</b></center></h4>";
 
   private static final String CONCURRENT_EXECUTION_KEY = "universe.concurrent.use";
   private static final String CONCURRENT_EXECUTION_COUNT = "universe.concurrent.maxConnection";
@@ -59,10 +63,10 @@ public class UniverseInterpreter extends Interpreter {
     String password = getProperty("universe.password");
     String apiUrl = getProperty("universe.api.url");
     String authType = getProperty("universe.authType");
-    final int queryTimeout =
-        Integer.parseInt(
-            StringUtils.defaultIfEmpty(getProperty("universe.queryTimeout"), "7200000"));
-    this.client = new UniverseClient(user, password, apiUrl, authType, queryTimeout);
+    final int queryTimeout = Integer.parseInt(
+        StringUtils.defaultIfEmpty(getProperty("universe.queryTimeout"), "7200000"));
+    this.client =
+        new UniverseClient(user, password, apiUrl, authType, queryTimeout);
     this.universeUtil = new UniverseUtil();
   }
 
@@ -78,10 +82,8 @@ public class UniverseInterpreter extends Interpreter {
   @Override
   public InterpreterResult interpret(String originalSt, InterpreterContext context)
       throws InterpreterException {
-    final String st =
-        Boolean.parseBoolean(getProperty("universe.interpolation", "false"))
-            ? interpolate(originalSt, context.getResourcePool())
-            : originalSt;
+    final String st = Boolean.parseBoolean(getProperty("universe.interpolation", "false")) ?
+        interpolate(originalSt, context.getResourcePool()) : originalSt;
     try {
       InterpreterResult interpreterResult = new InterpreterResult(InterpreterResult.Code.SUCCESS);
       String paragraphId = context.getParagraphId();
@@ -123,7 +125,7 @@ public class UniverseInterpreter extends Interpreter {
       try {
         client.closeSession(context.getParagraphId());
       } catch (Exception e) {
-        logger.error("Error close SAP session", e);
+        logger.error("Error close SAP session", e );
       }
     }
   }
@@ -133,7 +135,7 @@ public class UniverseInterpreter extends Interpreter {
     try {
       client.closeSession(context.getParagraphId());
     } catch (Exception e) {
-      logger.error("Error close SAP session", e);
+      logger.error("Error close SAP session", e );
     }
   }
 
@@ -148,15 +150,16 @@ public class UniverseInterpreter extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) throws InterpreterException {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+                                                InterpreterContext interpreterContext)
+      throws InterpreterException {
     List<InterpreterCompletion> candidates = new ArrayList<>();
 
     try {
       universeCompleter = createOrUpdateUniverseCompleter(interpreterContext, buf, cursor);
       universeCompleter.complete(buf, cursor, candidates);
     } catch (UniverseException e) {
-      logger.error("Error update completer", e);
+      logger.error("Error update completer", e );
     }
 
     return candidates;
@@ -165,9 +168,9 @@ public class UniverseInterpreter extends Interpreter {
   @Override
   public Scheduler getScheduler() {
     String schedulerName = UniverseInterpreter.class.getName() + this.hashCode();
-    return isConcurrentExecution()
-        ? SchedulerFactory.singleton()
-            .createOrGetParallelScheduler(schedulerName, getMaxConcurrentConnection())
+    return isConcurrentExecution() ?
+        SchedulerFactory.singleton().createOrGetParallelScheduler(schedulerName,
+            getMaxConcurrentConnection())
         : SchedulerFactory.singleton().createOrGetFIFOScheduler(schedulerName);
   }
 
@@ -209,8 +212,8 @@ public class UniverseInterpreter extends Interpreter {
     return str.replace(TAB, WHITESPACE).replace(NEWLINE, WHITESPACE);
   }
 
-  private UniverseCompleter createOrUpdateUniverseCompleter(
-      InterpreterContext interpreterContext, final String buf, final int cursor)
+  private UniverseCompleter createOrUpdateUniverseCompleter(InterpreterContext interpreterContext,
+                                                            final String buf, final int cursor)
       throws UniverseException {
     final UniverseCompleter completer;
     if (universeCompleter == null) {
@@ -221,13 +224,12 @@ public class UniverseInterpreter extends Interpreter {
     try {
       final String token = client.getToken(interpreterContext.getParagraphId());
       ExecutorService executorService = Executors.newFixedThreadPool(1);
-      executorService.execute(
-          new Runnable() {
-            @Override
-            public void run() {
-              completer.createOrUpdate(client, token, buf, cursor);
-            }
-          });
+      executorService.execute(new Runnable() {
+        @Override
+        public void run() {
+          completer.createOrUpdate(client, token, buf, cursor);
+        }
+      });
 
       executorService.shutdown();
 
@@ -238,7 +240,7 @@ public class UniverseInterpreter extends Interpreter {
       try {
         client.closeSession(interpreterContext.getParagraphId());
       } catch (Exception e) {
-        logger.error("Error close SAP session", e);
+        logger.error("Error close SAP session", e );
       }
     }
     return completer;


[11/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/service/NotebookServiceTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/service/NotebookServiceTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/service/NotebookServiceTest.java
index 45965fe..ad13dae 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/service/NotebookServiceTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/service/NotebookServiceTest.java
@@ -17,20 +17,6 @@
 
 package org.apache.zeppelin.service;
 
-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.assertTrue;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.verify;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.notebook.Note;
 import org.apache.zeppelin.notebook.Paragraph;
@@ -41,6 +27,21 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.HashMap;
+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.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.verify;
+
 public class NotebookServiceTest extends AbstractTestRestApi {
 
   private static NotebookService notebookService;
@@ -52,8 +53,8 @@ public class NotebookServiceTest extends AbstractTestRestApi {
 
   @BeforeClass
   public static void setUp() throws Exception {
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_HELIUM_REGISTRY.getVarName(), "helium");
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HELIUM_REGISTRY.getVarName(),
+        "helium");
     AbstractTestRestApi.startUp(NotebookServiceTest.class.getSimpleName());
     notebookService = ZeppelinServer.notebookWsServer.getNotebookService();
   }
@@ -115,8 +116,8 @@ public class NotebookServiceTest extends AbstractTestRestApi {
 
     // clone note
     reset(callback);
-    Note clonedNote =
-        notebookService.cloneNote(importedNote.getId(), "Cloned Note", context, callback);
+    Note clonedNote = notebookService.cloneNote(importedNote.getId(), "Cloned Note", context,
+        callback);
     assertEquals(importedNote.getParagraphCount(), clonedNote.getParagraphCount());
     verify(callback).onSuccess(clonedNote, context);
   }
@@ -131,23 +132,16 @@ public class NotebookServiceTest extends AbstractTestRestApi {
 
     // add paragraph
     reset(callback);
-    Paragraph p =
-        notebookService.insertParagraph(note1.getId(), 1, new HashMap<>(), context, callback);
+    Paragraph p = notebookService.insertParagraph(note1.getId(), 1, new HashMap<>(), context,
+        callback);
     assertNotNull(p);
     verify(callback).onSuccess(p, context);
     assertEquals(2, note1.getParagraphCount());
 
     // update paragraph
     reset(callback);
-    notebookService.updateParagraph(
-        note1.getId(),
-        p.getId(),
-        "my_title",
-        "my_text",
-        new HashMap<>(),
-        new HashMap<>(),
-        context,
-        callback);
+    notebookService.updateParagraph(note1.getId(), p.getId(), "my_title", "my_text",
+        new HashMap<>(), new HashMap<>(), context, callback);
     assertEquals("my_title", p.getTitle());
     assertEquals("my_text", p.getText());
 
@@ -159,52 +153,22 @@ public class NotebookServiceTest extends AbstractTestRestApi {
 
     // run paragraph asynchronously
     reset(callback);
-    boolean runStatus =
-        notebookService.runParagraph(
-            note1.getId(),
-            p.getId(),
-            "my_title",
-            "1+1",
-            new HashMap<>(),
-            new HashMap<>(),
-            false,
-            false,
-            context,
-            callback);
+    boolean runStatus = notebookService.runParagraph(note1.getId(), p.getId(), "my_title", "1+1",
+        new HashMap<>(), new HashMap<>(), false, false, context, callback);
     assertTrue(runStatus);
     verify(callback).onSuccess(p, context);
 
     // run paragraph synchronously via correct code
     reset(callback);
-    runStatus =
-        notebookService.runParagraph(
-            note1.getId(),
-            p.getId(),
-            "my_title",
-            "1+1",
-            new HashMap<>(),
-            new HashMap<>(),
-            false,
-            true,
-            context,
-            callback);
+    runStatus = notebookService.runParagraph(note1.getId(), p.getId(), "my_title", "1+1",
+        new HashMap<>(), new HashMap<>(), false, true, context, callback);
     assertTrue(runStatus);
     verify(callback).onSuccess(p, context);
 
     // run paragraph synchronously via invalid code
     reset(callback);
-    runStatus =
-        notebookService.runParagraph(
-            note1.getId(),
-            p.getId(),
-            "my_title",
-            "invalid_code",
-            new HashMap<>(),
-            new HashMap<>(),
-            false,
-            true,
-            context,
-            callback);
+    runStatus = notebookService.runParagraph(note1.getId(), p.getId(), "my_title", "invalid_code",
+        new HashMap<>(), new HashMap<>(), false, true, context, callback);
     assertFalse(runStatus);
     // TODO(zjffdu) Enable it after ZEPPELIN-3699
     // assertNotNull(p.getResult());

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/socket/NotebookServerTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/socket/NotebookServerTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/socket/NotebookServerTest.java
index a9bc448..03e7ee6 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/socket/NotebookServerTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/socket/NotebookServerTest.java
@@ -16,26 +16,6 @@
  */
 package org.apache.zeppelin.socket;
 
-import static java.util.Arrays.asList;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
-import static org.mockito.Mockito.anyString;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.HashSet;
-import java.util.List;
-import javax.servlet.http.HttpServletRequest;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.display.AngularObject;
 import org.apache.zeppelin.display.AngularObjectBuilder;
@@ -57,7 +37,30 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-/** Basic REST API tests for notebookServer. */
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.HashSet;
+import java.util.List;
+
+import static java.util.Arrays.asList;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
+import static org.mockito.Mockito.anyString;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * Basic REST API tests for notebookServer.
+ */
 public class NotebookServerTest extends AbstractTestRestApi {
   private static Notebook notebook;
   private static NotebookServer notebookServer;
@@ -87,13 +90,12 @@ public class NotebookServerTest extends AbstractTestRestApi {
     NotebookServer server = new NotebookServer();
     String origin = "http://" + InetAddress.getLocalHost().getHostName() + ":8080";
 
-    assertTrue(
-        "Origin " + origin + " is not allowed. Please check your hostname.",
-        server.checkOrigin(mockRequest, origin));
+    assertTrue("Origin " + origin + " is not allowed. Please check your hostname.",
+          server.checkOrigin(mockRequest, origin));
   }
 
   @Test
-  public void checkInvalidOrigin() {
+  public void checkInvalidOrigin(){
     NotebookServer server = new NotebookServer();
     assertFalse(server.checkOrigin(mockRequest, "http://evillocalhost:8080"));
   }
@@ -123,13 +125,12 @@ public class NotebookServerTest extends AbstractTestRestApi {
     Paragraph paragraph = createdNote.getParagraphs().get(0);
     String paragraphId = paragraph.getId();
 
-    String[] patches =
-        new String[] {
-          "@@ -0,0 +1,3 @@\n+ABC\n", // ABC
-          "@@ -1,3 +1,4 @@\n ABC\n+%0A\n", // press Enter
-          "@@ -1,4 +1,7 @@\n ABC%0A\n+abc\n", // abc
-          "@@ -1,7 +1,45 @@\n ABC\n-%0Aabc\n+ ssss%0Aabc ssss\n" // add text in two string
-        };
+    String[] patches = new String[]{
+        "@@ -0,0 +1,3 @@\n+ABC\n",            // ABC
+        "@@ -1,3 +1,4 @@\n ABC\n+%0A\n",      // press Enter
+        "@@ -1,4 +1,7 @@\n ABC%0A\n+abc\n",   // abc
+        "@@ -1,7 +1,45 @@\n ABC\n-%0Aabc\n+ ssss%0Aabc ssss\n" // add text in two string
+    };
 
     int sock1SendCount = 0;
     int sock2SendCount = 0;
@@ -167,14 +168,14 @@ public class NotebookServerTest extends AbstractTestRestApi {
 
   @Test
   public void testMakeSureNoAngularObjectBroadcastToWebsocketWhoFireTheEvent()
-      throws IOException, InterruptedException {
+          throws IOException, InterruptedException {
     // create a notebook
     Note note1 = notebook.createNote(anonymous);
 
     // get reference to interpreterGroup
     InterpreterGroup interpreterGroup = null;
-    List<InterpreterSetting> settings =
-        notebook.getInterpreterSettingManager().getInterpreterSettings(note1.getId());
+    List<InterpreterSetting> settings = notebook.getInterpreterSettingManager()
+            .getInterpreterSettings(note1.getId());
     for (InterpreterSetting setting : settings) {
       if (setting.getName().equals("md")) {
         interpreterGroup = setting.getOrCreateInterpreterGroup("anonymous", "sharedProcess");
@@ -219,14 +220,13 @@ public class NotebookServerTest extends AbstractTestRestApi {
     reset(sock2);
 
     // update object from sock1
-    notebookServer.onMessage(
-        sock1,
+    notebookServer.onMessage(sock1,
         new Message(OP.ANGULAR_OBJECT_UPDATED)
-            .put("noteId", note1.getId())
-            .put("name", "object1")
-            .put("value", "value1")
-            .put("interpreterGroupId", interpreterGroup.getId())
-            .toJson());
+        .put("noteId", note1.getId())
+        .put("name", "object1")
+        .put("value", "value1")
+        .put("interpreterGroupId", interpreterGroup.getId()).toJson());
+
 
     // expect object is broadcasted except for where the update is created
     verify(sock1, times(0)).send(anyString());
@@ -237,39 +237,35 @@ public class NotebookServerTest extends AbstractTestRestApi {
 
   @Test
   public void testImportNotebook() throws IOException {
-    String msg =
-        "{\"op\":\"IMPORT_NOTE\",\"data\":"
-            + "{\"note\":{\"paragraphs\": [{\"text\": \"Test "
-            + "paragraphs import\","
-            + "\"progressUpdateIntervalMs\":500,"
-            + "\"config\":{},\"settings\":{}}],"
-            + "\"name\": \"Test Zeppelin notebook import\",\"config\": "
-            + "{}}}}";
+    String msg = "{\"op\":\"IMPORT_NOTE\",\"data\":" +
+        "{\"note\":{\"paragraphs\": [{\"text\": \"Test " +
+        "paragraphs import\"," + "\"progressUpdateIntervalMs\":500," +
+        "\"config\":{},\"settings\":{}}]," +
+        "\"name\": \"Test Zeppelin notebook import\",\"config\": " +
+        "{}}}}";
     Message messageReceived = notebookServer.deserializeMessage(msg);
     Note note = null;
     try {
       note = notebookServer.importNote(null, messageReceived);
     } catch (NullPointerException e) {
-      // broadcastNoteList(); failed nothing to worry.
-      LOG.error(
-          "Exception in NotebookServerTest while testImportNotebook, failed nothing to " + "worry ",
-          e);
+      //broadcastNoteList(); failed nothing to worry.
+      LOG.error("Exception in NotebookServerTest while testImportNotebook, failed nothing to " +
+          "worry ", e);
     }
 
     assertNotEquals(null, notebook.getNote(note.getId()));
     assertEquals("Test Zeppelin notebook import", notebook.getNote(note.getId()).getName());
-    assertEquals(
-        "Test paragraphs import", notebook.getNote(note.getId()).getParagraphs().get(0).getText());
+    assertEquals("Test paragraphs import", notebook.getNote(note.getId()).getParagraphs().get(0)
+            .getText());
     notebook.removeNote(note.getId(), anonymous);
   }
 
   @Test
   public void bindAngularObjectToRemoteForParagraphs() throws Exception {
-    // Given
+    //Given
     final String varName = "name";
     final String value = "DuyHai DOAN";
-    final Message messageReceived =
-        new Message(OP.ANGULAR_OBJECT_CLIENT_BIND)
+    final Message messageReceived = new Message(OP.ANGULAR_OBJECT_CLIENT_BIND)
             .put("noteId", "noteId")
             .put("name", varName)
             .put("value", value)
@@ -289,22 +285,20 @@ public class NotebookServerTest extends AbstractTestRestApi {
 
     when(paragraph.getBindedInterpreter().getInterpreterGroup()).thenReturn(mdGroup);
 
-    final AngularObject<String> ao1 =
-        AngularObjectBuilder.build(varName, value, "noteId", "paragraphId");
+    final AngularObject<String> ao1 = AngularObjectBuilder.build(varName, value, "noteId",
+            "paragraphId");
 
     when(mdRegistry.addAndNotifyRemoteProcess(varName, value, "noteId", "paragraphId"))
-        .thenReturn(ao1);
+            .thenReturn(ao1);
 
     NotebookSocket conn = mock(NotebookSocket.class);
     NotebookSocket otherConn = mock(NotebookSocket.class);
 
-    final String mdMsg1 =
-        server.serializeMessage(
-            new Message(OP.ANGULAR_OBJECT_UPDATE)
-                .put("angularObject", ao1)
-                .put("interpreterGroupId", "mdGroup")
-                .put("noteId", "noteId")
-                .put("paragraphId", "paragraphId"));
+    final String mdMsg1 =  server.serializeMessage(new Message(OP.ANGULAR_OBJECT_UPDATE)
+            .put("angularObject", ao1)
+            .put("interpreterGroupId", "mdGroup")
+            .put("noteId", "noteId")
+            .put("paragraphId", "paragraphId"));
 
     server.getConnectionManager().noteSocketMap.put("noteId", asList(conn, otherConn));
 
@@ -319,11 +313,10 @@ public class NotebookServerTest extends AbstractTestRestApi {
 
   @Test
   public void bindAngularObjectToLocalForParagraphs() throws Exception {
-    // Given
+    //Given
     final String varName = "name";
     final String value = "DuyHai DOAN";
-    final Message messageReceived =
-        new Message(OP.ANGULAR_OBJECT_CLIENT_BIND)
+    final Message messageReceived = new Message(OP.ANGULAR_OBJECT_CLIENT_BIND)
             .put("noteId", "noteId")
             .put("name", varName)
             .put("value", value)
@@ -342,21 +335,19 @@ public class NotebookServerTest extends AbstractTestRestApi {
 
     when(paragraph.getBindedInterpreter().getInterpreterGroup()).thenReturn(mdGroup);
 
-    final AngularObject<String> ao1 =
-        AngularObjectBuilder.build(varName, value, "noteId", "paragraphId");
+    final AngularObject<String> ao1 = AngularObjectBuilder.build(varName, value, "noteId",
+            "paragraphId");
 
     when(mdRegistry.add(varName, value, "noteId", "paragraphId")).thenReturn(ao1);
 
     NotebookSocket conn = mock(NotebookSocket.class);
     NotebookSocket otherConn = mock(NotebookSocket.class);
 
-    final String mdMsg1 =
-        server.serializeMessage(
-            new Message(OP.ANGULAR_OBJECT_UPDATE)
-                .put("angularObject", ao1)
-                .put("interpreterGroupId", "mdGroup")
-                .put("noteId", "noteId")
-                .put("paragraphId", "paragraphId"));
+    final String mdMsg1 =  server.serializeMessage(new Message(OP.ANGULAR_OBJECT_UPDATE)
+            .put("angularObject", ao1)
+            .put("interpreterGroupId", "mdGroup")
+            .put("noteId", "noteId")
+            .put("paragraphId", "paragraphId"));
 
     server.getConnectionManager().noteSocketMap.put("noteId", asList(conn, otherConn));
 
@@ -369,11 +360,10 @@ public class NotebookServerTest extends AbstractTestRestApi {
 
   @Test
   public void unbindAngularObjectFromRemoteForParagraphs() throws Exception {
-    // Given
+    //Given
     final String varName = "name";
     final String value = "val";
-    final Message messageReceived =
-        new Message(OP.ANGULAR_OBJECT_CLIENT_UNBIND)
+    final Message messageReceived = new Message(OP.ANGULAR_OBJECT_CLIENT_UNBIND)
             .put("noteId", "noteId")
             .put("name", varName)
             .put("paragraphId", "paragraphId");
@@ -391,19 +381,17 @@ public class NotebookServerTest extends AbstractTestRestApi {
 
     when(paragraph.getBindedInterpreter().getInterpreterGroup()).thenReturn(mdGroup);
 
-    final AngularObject<String> ao1 =
-        AngularObjectBuilder.build(varName, value, "noteId", "paragraphId");
+    final AngularObject<String> ao1 = AngularObjectBuilder.build(varName, value, "noteId",
+            "paragraphId");
     when(mdRegistry.removeAndNotifyRemoteProcess(varName, "noteId", "paragraphId")).thenReturn(ao1);
     NotebookSocket conn = mock(NotebookSocket.class);
     NotebookSocket otherConn = mock(NotebookSocket.class);
 
-    final String mdMsg1 =
-        server.serializeMessage(
-            new Message(OP.ANGULAR_OBJECT_REMOVE)
-                .put("angularObject", ao1)
-                .put("interpreterGroupId", "mdGroup")
-                .put("noteId", "noteId")
-                .put("paragraphId", "paragraphId"));
+    final String mdMsg1 =  server.serializeMessage(new Message(OP.ANGULAR_OBJECT_REMOVE)
+            .put("angularObject", ao1)
+            .put("interpreterGroupId", "mdGroup")
+            .put("noteId", "noteId")
+            .put("paragraphId", "paragraphId"));
 
     server.getConnectionManager().noteSocketMap.put("noteId", asList(conn, otherConn));
 
@@ -418,11 +406,10 @@ public class NotebookServerTest extends AbstractTestRestApi {
 
   @Test
   public void unbindAngularObjectFromLocalForParagraphs() throws Exception {
-    // Given
+    //Given
     final String varName = "name";
     final String value = "val";
-    final Message messageReceived =
-        new Message(OP.ANGULAR_OBJECT_CLIENT_UNBIND)
+    final Message messageReceived = new Message(OP.ANGULAR_OBJECT_CLIENT_UNBIND)
             .put("noteId", "noteId")
             .put("name", varName)
             .put("paragraphId", "paragraphId");
@@ -440,21 +427,19 @@ public class NotebookServerTest extends AbstractTestRestApi {
 
     when(paragraph.getBindedInterpreter().getInterpreterGroup()).thenReturn(mdGroup);
 
-    final AngularObject<String> ao1 =
-        AngularObjectBuilder.build(varName, value, "noteId", "paragraphId");
+    final AngularObject<String> ao1 = AngularObjectBuilder.build(varName, value, "noteId",
+            "paragraphId");
 
     when(mdRegistry.remove(varName, "noteId", "paragraphId")).thenReturn(ao1);
 
     NotebookSocket conn = mock(NotebookSocket.class);
     NotebookSocket otherConn = mock(NotebookSocket.class);
 
-    final String mdMsg1 =
-        server.serializeMessage(
-            new Message(OP.ANGULAR_OBJECT_REMOVE)
-                .put("angularObject", ao1)
-                .put("interpreterGroupId", "mdGroup")
-                .put("noteId", "noteId")
-                .put("paragraphId", "paragraphId"));
+    final String mdMsg1 =  server.serializeMessage(new Message(OP.ANGULAR_OBJECT_REMOVE)
+            .put("angularObject", ao1)
+            .put("interpreterGroupId", "mdGroup")
+            .put("noteId", "noteId")
+            .put("paragraphId", "paragraphId"));
     server.getConnectionManager().noteSocketMap.put("noteId", asList(conn, otherConn));
 
     // When
@@ -483,12 +468,10 @@ public class NotebookServerTest extends AbstractTestRestApi {
       defaultInterpreterId = settings.get(0).getId();
     }
     // create note from sock1
-    notebookServer.onMessage(
-        sock1,
+    notebookServer.onMessage(sock1,
         new Message(OP.NEW_NOTE)
-            .put("name", noteName)
-            .put("defaultInterpreterId", defaultInterpreterId)
-            .toJson());
+        .put("name", noteName)
+        .put("defaultInterpreterId", defaultInterpreterId).toJson());
 
     int sendCount = 2;
     if (ZeppelinConfiguration.create().isZeppelinNotebookCollaborativeModeEnable()) {
@@ -506,12 +489,8 @@ public class NotebookServerTest extends AbstractTestRestApi {
     }
 
     if (settings.size() > 1) {
-      assertEquals(
-          notebook
-              .getInterpreterSettingManager()
-              .getDefaultInterpreterSetting(createdNote.getId())
-              .getId(),
-          defaultInterpreterId);
+      assertEquals(notebook.getInterpreterSettingManager().getDefaultInterpreterSetting(
+              createdNote.getId()).getId(), defaultInterpreterId);
     }
     notebook.removeNote(createdNote.getId(), anonymous);
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/ticket/TicketContainerTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/ticket/TicketContainerTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/ticket/TicketContainerTest.java
index e1a5d3b..02f48f7 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/ticket/TicketContainerTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/ticket/TicketContainerTest.java
@@ -56,3 +56,4 @@ public class TicketContainerTest {
     assertFalse(ok);
   }
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/Helium.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/Helium.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/Helium.java
index b767a40..399aea8 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/Helium.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/Helium.java
@@ -17,9 +17,6 @@
 package org.apache.zeppelin.helium;
 
 import com.google.gson.Gson;
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.zeppelin.interpreter.Interpreter;
@@ -33,7 +30,13 @@ import org.apache.zeppelin.resource.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Manages helium packages */
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+
+/**
+ * Manages helium packages
+ */
 public class Helium {
   private Logger logger = LoggerFactory.getLogger(Helium.class);
   private List<HeliumRegistry> registry = new LinkedList<>();
@@ -156,8 +159,8 @@ public class Helium {
    * @param refresh
    * @param packageName
    */
-  public Map<String, List<HeliumPackageSearchResult>> getAllPackageInfo(
-      boolean refresh, String packageName) {
+  public Map<String, List<HeliumPackageSearchResult>> getAllPackageInfo(boolean refresh,
+                                                                        String packageName) {
     Map<String, String> enabledPackageInfo = heliumConf.getEnabledPackages();
 
     synchronized (registry) {
@@ -167,7 +170,8 @@ public class Helium {
             for (HeliumPackage pkg : r.getAll()) {
               String name = pkg.getName();
 
-              if (!StringUtils.isEmpty(packageName) && !name.equals(packageName)) {
+              if (!StringUtils.isEmpty(packageName) &&
+                  !name.equals(packageName)) {
                 continue;
               }
 
@@ -184,7 +188,8 @@ public class Helium {
         }
       } else {
         for (String name : allPackages.keySet()) {
-          if (!StringUtils.isEmpty(packageName) && !name.equals(packageName)) {
+          if (!StringUtils.isEmpty(packageName) &&
+              !name.equals(packageName)) {
             continue;
           }
 
@@ -203,14 +208,12 @@ public class Helium {
       // sort version (artifact)
       for (String name : allPackages.keySet()) {
         List<HeliumPackageSearchResult> packages = allPackages.get(name);
-        Collections.sort(
-            packages,
-            new Comparator<HeliumPackageSearchResult>() {
-              @Override
-              public int compare(HeliumPackageSearchResult o1, HeliumPackageSearchResult o2) {
-                return o2.getPkg().getArtifact().compareTo(o1.getPkg().getArtifact());
-              }
-            });
+        Collections.sort(packages, new Comparator<HeliumPackageSearchResult>() {
+          @Override
+          public int compare(HeliumPackageSearchResult o1, HeliumPackageSearchResult o2) {
+            return o2.getPkg().getArtifact().compareTo(o1.getPkg().getArtifact());
+          }
+        });
       }
       return allPackages;
     }
@@ -256,8 +259,7 @@ public class Helium {
     Map<String, List<HeliumPackageSearchResult>> infos = getAllPackageInfo(false, pkgName);
     List<HeliumPackageSearchResult> packages = infos.get(pkgName);
     if (StringUtils.isBlank(artifact)) {
-      return packages.get(0);
-      /** return the FIRST package */
+      return packages.get(0); /** return the FIRST package */
     } else {
       for (HeliumPackageSearchResult pkg : packages) {
         if (pkg.getPkg().getArtifact().equals(artifact)) {
@@ -362,12 +364,11 @@ public class Helium {
     for (List<HeliumPackageSearchResult> pkgs : allPackages.values()) {
       for (HeliumPackageSearchResult pkg : pkgs) {
         if (pkg.getPkg().getType() == HeliumType.APPLICATION && pkg.isEnabled()) {
-          ResourceSet resources =
-              ApplicationLoader.findRequiredResourceSet(
-                  pkg.getPkg().getResources(),
-                  paragraph.getNote().getId(),
-                  paragraph.getId(),
-                  allResources);
+          ResourceSet resources = ApplicationLoader.findRequiredResourceSet(
+              pkg.getPkg().getResources(),
+              paragraph.getNote().getId(),
+              paragraph.getId(),
+              allResources);
           if (resources == null) {
             continue;
           } else {
@@ -421,19 +422,20 @@ public class Helium {
   }
 
   private boolean canBundle(HeliumPackageSearchResult pkgInfo) {
-    return (pkgInfo.isEnabled() && HeliumPackage.isBundleType(pkgInfo.getPkg().getType()));
+    return (pkgInfo.isEnabled() &&
+        HeliumPackage.isBundleType(pkgInfo.getPkg().getType()));
   }
 
   /**
    * Get enabled package list in order
-   *
    * @return
    */
   public List<String> getVisualizationPackageOrder() {
     return heliumConf.getBundleDisplayOrder();
   }
 
-  public void setVisualizationPackageOrder(List<String> orderedPackageList) throws IOException {
+  public void setVisualizationPackageOrder(List<String> orderedPackageList)
+      throws IOException {
     heliumConf.setBundleDisplayOrder(orderedPackageList);
     saveConfig();
   }
@@ -452,12 +454,14 @@ public class Helium {
     HeliumPackage enabledPackage = result.getPkg();
 
     Map<String, Object> configSpec = enabledPackage.getConfig();
-    Map<String, Object> configPersisted = getPackagePersistedConfig(enabledPackage.getArtifact());
+    Map<String, Object> configPersisted =
+        getPackagePersistedConfig(enabledPackage.getArtifact());
 
     return createMixedConfig(configPersisted, configSpec);
   }
 
-  public Map<String, Map<String, Object>> getPackageConfig(String pkgName, String artifact) {
+  public Map<String, Map<String, Object>> getPackageConfig(String pkgName,
+                                                           String artifact) {
 
     HeliumPackageSearchResult result = getPackageInfo(pkgName, artifact);
 
@@ -468,13 +472,14 @@ public class Helium {
     HeliumPackage requestedPackage = result.getPkg();
 
     Map<String, Object> configSpec = requestedPackage.getConfig();
-    Map<String, Object> configPersisted = getPackagePersistedConfig(artifact);
+    Map<String, Object> configPersisted =
+        getPackagePersistedConfig(artifact);
 
     return createMixedConfig(configPersisted, configSpec);
   }
 
-  private static Map<String, Map<String, Object>> createMixedConfig(
-      Map<String, Object> persisted, Map<String, Object> spec) {
+  private static Map<String, Map<String, Object>> createMixedConfig(Map<String, Object> persisted,
+                                                                   Map<String, Object> spec) {
     Map<String, Map<String, Object>> mixed = new HashMap<>();
     mixed.put("confPersisted", persisted);
     mixed.put("confSpec", spec);
@@ -489,8 +494,8 @@ public class Helium {
   private ResourceSet getAllResourcesExcept(String interpreterGroupExcludsion) {
     ResourceSet resourceSet = new ResourceSet();
     for (ManagedInterpreterGroup intpGroup : interpreterSettingManager.getAllInterpreterGroup()) {
-      if (interpreterGroupExcludsion != null
-          && intpGroup.getId().equals(interpreterGroupExcludsion)) {
+      if (interpreterGroupExcludsion != null &&
+          intpGroup.getId().equals(interpreterGroupExcludsion)) {
         continue;
       }
 
@@ -501,15 +506,14 @@ public class Helium {
           resourceSet.addAll(localPool.getAll());
         }
       } else if (remoteInterpreterProcess.isRunning()) {
-        List<String> resourceList =
-            remoteInterpreterProcess.callRemoteFunction(
-                new RemoteInterpreterProcess.RemoteFunction<List<String>>() {
-                  @Override
-                  public List<String> call(RemoteInterpreterService.Client client)
-                      throws Exception {
-                    return client.resourcePoolGetAll();
-                  }
-                });
+        List<String> resourceList = remoteInterpreterProcess.callRemoteFunction(
+            new RemoteInterpreterProcess.RemoteFunction<List<String>>() {
+              @Override
+              public List<String> call(RemoteInterpreterService.Client client) throws Exception {
+                return client.resourcePoolGetAll();
+              }
+            }
+        );
         Gson gson = new Gson();
         for (String res : resourceList) {
           resourceSet.add(gson.fromJson(res, Resource.class));

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumApplicationFactory.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumApplicationFactory.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumApplicationFactory.java
index a09f10a..707a230 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumApplicationFactory.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumApplicationFactory.java
@@ -16,8 +16,6 @@
  */
 package org.apache.zeppelin.helium;
 
-import java.util.List;
-import java.util.concurrent.ExecutorService;
 import org.apache.zeppelin.interpreter.*;
 import org.apache.zeppelin.interpreter.remote.RemoteAngularObjectRegistry;
 import org.apache.zeppelin.interpreter.remote.RemoteInterpreterProcess;
@@ -29,7 +27,12 @@ import org.apache.zeppelin.scheduler.Job;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** HeliumApplicationFactory */
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+
+/**
+ * HeliumApplicationFactory
+ */
 public class HeliumApplicationFactory implements ApplicationEventListener, NotebookEventListener {
   private final Logger logger = LoggerFactory.getLogger(HeliumApplicationFactory.class);
   private final ExecutorService executor;
@@ -37,27 +40,29 @@ public class HeliumApplicationFactory implements ApplicationEventListener, Noteb
   private ApplicationEventListener applicationEventListener;
 
   public HeliumApplicationFactory() {
-    executor =
-        ExecutorFactory.singleton().createOrGet(HeliumApplicationFactory.class.getName(), 10);
+    executor = ExecutorFactory.singleton().createOrGet(
+        HeliumApplicationFactory.class.getName(), 10);
   }
 
   private boolean isRemote(InterpreterGroup group) {
     return group.getAngularObjectRegistry() instanceof RemoteAngularObjectRegistry;
   }
 
-  /** Load pkg and run task */
+
+  /**
+   * Load pkg and run task
+   */
   public String loadAndRun(HeliumPackage pkg, Paragraph paragraph) {
     ApplicationState appState = paragraph.createOrGetApplicationState(pkg);
-    onLoad(
-        paragraph.getNote().getId(),
-        paragraph.getId(),
-        appState.getId(),
+    onLoad(paragraph.getNote().getId(), paragraph.getId(), appState.getId(),
         appState.getHeliumPackage());
     executor.submit(new LoadApplication(appState, pkg, paragraph));
     return appState.getId();
   }
 
-  /** Load application and run in the remote process */
+  /**
+   * Load application and run in the remote process
+   */
   private class LoadApplication implements Runnable {
     private final HeliumPackage pkg;
     private final Paragraph paragraph;
@@ -109,16 +114,19 @@ public class HeliumApplicationFactory implements ApplicationEventListener, Noteb
         final String pkgInfo = pkg.toJson();
         final String appId = appState.getId();
 
-        RemoteApplicationResult ret =
-            intpProcess.callRemoteFunction(
-                new RemoteInterpreterProcess.RemoteFunction<RemoteApplicationResult>() {
-                  @Override
-                  public RemoteApplicationResult call(RemoteInterpreterService.Client client)
-                      throws Exception {
-                    return client.loadApplication(
-                        appId, pkgInfo, paragraph.getNote().getId(), paragraph.getId());
-                  }
-                });
+        RemoteApplicationResult ret = intpProcess.callRemoteFunction(
+            new RemoteInterpreterProcess.RemoteFunction<RemoteApplicationResult>() {
+              @Override
+              public RemoteApplicationResult call(RemoteInterpreterService.Client client)
+                  throws Exception {
+                return client.loadApplication(
+                    appId,
+                    pkgInfo,
+                    paragraph.getNote().getId(),
+                    paragraph.getId());
+              }
+            }
+        );
         if (ret.isSuccess()) {
           appStatusChange(paragraph, appState.getId(), ApplicationState.Status.LOADED);
         } else {
@@ -130,7 +138,6 @@ public class HeliumApplicationFactory implements ApplicationEventListener, Noteb
 
   /**
    * Get ApplicationState
-   *
    * @param paragraph
    * @param appId
    * @return
@@ -140,7 +147,8 @@ public class HeliumApplicationFactory implements ApplicationEventListener, Noteb
   }
 
   /**
-   * Unload application It does not remove ApplicationState
+   * Unload application
+   * It does not remove ApplicationState
    *
    * @param paragraph
    * @param appId
@@ -149,7 +157,9 @@ public class HeliumApplicationFactory implements ApplicationEventListener, Noteb
     executor.execute(new UnloadApplication(paragraph, appId));
   }
 
-  /** Unload application task */
+  /**
+   * Unload application task
+   */
   private class UnloadApplication implements Runnable {
     private final Paragraph paragraph;
     private final String appId;
@@ -203,15 +213,15 @@ public class HeliumApplicationFactory implements ApplicationEventListener, Noteb
           throw new ApplicationException("Target interpreter process is not running");
         }
 
-        RemoteApplicationResult ret =
-            intpProcess.callRemoteFunction(
-                new RemoteInterpreterProcess.RemoteFunction<RemoteApplicationResult>() {
-                  @Override
-                  public RemoteApplicationResult call(RemoteInterpreterService.Client client)
-                      throws Exception {
-                    return client.unloadApplication(appsToUnload.getId());
-                  }
-                });
+        RemoteApplicationResult ret = intpProcess.callRemoteFunction(
+            new RemoteInterpreterProcess.RemoteFunction<RemoteApplicationResult>() {
+              @Override
+              public RemoteApplicationResult call(RemoteInterpreterService.Client client)
+                  throws Exception {
+                return client.unloadApplication(appsToUnload.getId());
+              }
+            }
+        );
         if (ret.isSuccess()) {
           appStatusChange(paragraph, appsToUnload.getId(), ApplicationState.Status.UNLOADED);
         } else {
@@ -222,7 +232,8 @@ public class HeliumApplicationFactory implements ApplicationEventListener, Noteb
   }
 
   /**
-   * Run application It does not remove ApplicationState
+   * Run application
+   * It does not remove ApplicationState
    *
    * @param paragraph
    * @param appId
@@ -231,7 +242,9 @@ public class HeliumApplicationFactory implements ApplicationEventListener, Noteb
     executor.execute(new RunApplication(paragraph, appId));
   }
 
-  /** Run application task */
+  /**
+   * Run application task
+   */
   private class RunApplication implements Runnable {
     private final Paragraph paragraph;
     private final String appId;
@@ -265,7 +278,8 @@ public class HeliumApplicationFactory implements ApplicationEventListener, Noteb
     private void run(final ApplicationState app) throws ApplicationException {
       synchronized (app) {
         if (app.getStatus() != ApplicationState.Status.LOADED) {
-          throw new ApplicationException("Can't run application status " + app.getStatus());
+          throw new ApplicationException(
+              "Can't run application status " + app.getStatus());
         }
 
         Interpreter intp = null;
@@ -280,15 +294,15 @@ public class HeliumApplicationFactory implements ApplicationEventListener, Noteb
         if (intpProcess == null) {
           throw new ApplicationException("Target interpreter process is not running");
         }
-        RemoteApplicationResult ret =
-            intpProcess.callRemoteFunction(
-                new RemoteInterpreterProcess.RemoteFunction<RemoteApplicationResult>() {
-                  @Override
-                  public RemoteApplicationResult call(RemoteInterpreterService.Client client)
-                      throws Exception {
-                    return client.runApplication(app.getId());
-                  }
-                });
+        RemoteApplicationResult ret = intpProcess.callRemoteFunction(
+            new RemoteInterpreterProcess.RemoteFunction<RemoteApplicationResult>() {
+              @Override
+              public RemoteApplicationResult call(RemoteInterpreterService.Client client)
+                  throws Exception {
+                return client.runApplication(app.getId());
+              }
+            }
+        );
         if (ret.isSuccess()) {
           // success
         } else {
@@ -316,12 +330,8 @@ public class HeliumApplicationFactory implements ApplicationEventListener, Noteb
 
   @Override
   public void onOutputUpdated(
-      String noteId,
-      String paragraphId,
-      int index,
-      String appId,
-      InterpreterResult.Type type,
-      String output) {
+      String noteId, String paragraphId, int index, String appId,
+      InterpreterResult.Type type, String output) {
     ApplicationState appToUpdate = getAppState(noteId, paragraphId, appId);
 
     if (appToUpdate != null) {
@@ -354,7 +364,9 @@ public class HeliumApplicationFactory implements ApplicationEventListener, Noteb
     }
   }
 
-  private void appStatusChange(Paragraph paragraph, String appId, ApplicationState.Status status) {
+  private void appStatusChange(Paragraph paragraph,
+                               String appId,
+                               ApplicationState.Status status) {
     ApplicationState app = paragraph.getApplicationState(appId);
     app.setStatus(status);
     onStatusChange(paragraph.getNote().getId(), paragraph.getId(), appId, status.toString());
@@ -398,10 +410,13 @@ public class HeliumApplicationFactory implements ApplicationEventListener, Noteb
   }
 
   @Override
-  public void onNoteRemove(Note note) {}
+  public void onNoteRemove(Note note) {
+  }
 
   @Override
-  public void onNoteCreate(Note note) {}
+  public void onNoteCreate(Note note) {
+
+  }
 
   @Override
   public void onParagraphRemove(Paragraph paragraph) {
@@ -413,7 +428,9 @@ public class HeliumApplicationFactory implements ApplicationEventListener, Noteb
   }
 
   @Override
-  public void onParagraphCreate(Paragraph p) {}
+  public void onParagraphCreate(Paragraph p) {
+
+  }
 
   @Override
   public void onParagraphStatusChange(Paragraph p, Job.Status status) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumBundleFactory.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumBundleFactory.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumBundleFactory.java
index 5777184..3b5aa3b 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumBundleFactory.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumBundleFactory.java
@@ -17,14 +17,13 @@
 package org.apache.zeppelin.helium;
 
 import com.github.eirslett.maven.plugins.frontend.lib.*;
+
 import com.google.common.base.Charsets;
 import com.google.common.io.Resources;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 import com.google.gson.stream.JsonReader;
-import java.io.*;
-import java.net.URI;
-import java.util.*;
+
 import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
 import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
 import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
@@ -36,11 +35,18 @@ import org.apache.log4j.PatternLayout;
 import org.apache.log4j.WriterAppender;
 import org.apache.log4j.spi.Filter;
 import org.apache.log4j.spi.LoggingEvent;
-import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Load helium visualization & spell */
+import java.io.*;
+import java.net.URI;
+import java.util.*;
+
+import org.apache.zeppelin.conf.ZeppelinConfiguration;
+
+/**
+ * Load helium visualization & spell
+ */
 public class HeliumBundleFactory {
   private Logger logger = LoggerFactory.getLogger(HeliumBundleFactory.class);
   private static final String NODE_VERSION = "v6.9.1";
@@ -76,7 +82,7 @@ public class HeliumBundleFactory {
   private Gson gson;
   private boolean nodeAndNpmInstalled = false;
 
-  private ByteArrayOutputStream out = new ByteArrayOutputStream();
+  private ByteArrayOutputStream out  = new ByteArrayOutputStream();
 
   public HeliumBundleFactory(
       ZeppelinConfiguration conf,
@@ -84,8 +90,7 @@ public class HeliumBundleFactory {
       File moduleDownloadPath,
       File tabledataModulePath,
       File visualizationModulePath,
-      File spellModulePath)
-      throws TaskRunnerException {
+      File spellModulePath) throws TaskRunnerException {
     this(conf, nodeInstallationDir, moduleDownloadPath);
     this.tabledataModulePath = tabledataModulePath;
     this.visualizationModulePath = visualizationModulePath;
@@ -93,8 +98,9 @@ public class HeliumBundleFactory {
   }
 
   private HeliumBundleFactory(
-      ZeppelinConfiguration conf, File nodeInstallationDir, File moduleDownloadPath)
-      throws TaskRunnerException {
+      ZeppelinConfiguration conf,
+      File nodeInstallationDir,
+      File moduleDownloadPath) throws TaskRunnerException {
     this.heliumLocalRepoDirectory = new File(moduleDownloadPath, HELIUM_LOCAL_REPO);
     this.heliumBundleDirectory = new File(heliumLocalRepoDirectory, HELIUM_BUNDLES_DIR);
     this.heliumLocalModuleDirectory = new File(heliumLocalRepoDirectory, HELIUM_LOCAL_MODULE_DIR);
@@ -103,11 +109,11 @@ public class HeliumBundleFactory {
     this.defaultNpmInstallerUrl = conf.getHeliumNpmInstallerUrl();
     this.defaultYarnInstallerUrl = conf.getHeliumYarnInstallerUrl();
 
-    nodeInstallationDirectory =
-        (nodeInstallationDir == null) ? heliumLocalRepoDirectory : nodeInstallationDir;
+    nodeInstallationDirectory = (nodeInstallationDir == null) ?
+        heliumLocalRepoDirectory : nodeInstallationDir;
 
-    frontEndPluginFactory =
-        new FrontendPluginFactory(heliumLocalRepoDirectory, nodeInstallationDirectory);
+    frontEndPluginFactory = new FrontendPluginFactory(
+            heliumLocalRepoDirectory, nodeInstallationDirectory);
 
     gson = new Gson();
   }
@@ -117,20 +123,20 @@ public class HeliumBundleFactory {
       return;
     }
     try {
-      NodeInstaller nodeInstaller =
-          frontEndPluginFactory.getNodeInstaller(getProxyConfig(isSecure(defaultNodeInstallerUrl)));
+      NodeInstaller nodeInstaller = frontEndPluginFactory
+              .getNodeInstaller(getProxyConfig(isSecure(defaultNodeInstallerUrl)));
       nodeInstaller.setNodeVersion(NODE_VERSION);
       nodeInstaller.setNodeDownloadRoot(defaultNodeInstallerUrl);
       nodeInstaller.install();
 
-      NPMInstaller npmInstaller =
-          frontEndPluginFactory.getNPMInstaller(getProxyConfig(isSecure(defaultNpmInstallerUrl)));
+      NPMInstaller npmInstaller = frontEndPluginFactory
+              .getNPMInstaller(getProxyConfig(isSecure(defaultNpmInstallerUrl)));
       npmInstaller.setNpmVersion(NPM_VERSION);
       npmInstaller.setNpmDownloadRoot(defaultNpmInstallerUrl + "/" + NPM_PACKAGE_NAME + "/-/");
       npmInstaller.install();
 
-      YarnInstaller yarnInstaller =
-          frontEndPluginFactory.getYarnInstaller(getProxyConfig(isSecure(defaultYarnInstallerUrl)));
+      YarnInstaller yarnInstaller = frontEndPluginFactory
+              .getYarnInstaller(getProxyConfig(isSecure(defaultYarnInstallerUrl)));
       yarnInstaller.setYarnVersion(YARN_VERSION);
       yarnInstaller.setYarnDownloadRoot(defaultYarnInstallerUrl);
       yarnInstaller.install();
@@ -148,15 +154,11 @@ public class HeliumBundleFactory {
   private ProxyConfig getProxyConfig(boolean isSecure) {
     List<ProxyConfig.Proxy> proxies = new LinkedList<>();
 
-    String httpProxy =
-        StringUtils.isBlank(System.getenv("http_proxy"))
-            ? System.getenv("HTTP_PROXY")
-            : System.getenv("http_proxy");
+    String httpProxy = StringUtils.isBlank(System.getenv("http_proxy")) ?
+            System.getenv("HTTP_PROXY") : System.getenv("http_proxy");
 
-    String httpsProxy =
-        StringUtils.isBlank(System.getenv("https_proxy"))
-            ? System.getenv("HTTPS_PROXY")
-            : System.getenv("https_proxy");
+    String httpsProxy = StringUtils.isBlank(System.getenv("https_proxy")) ?
+            System.getenv("HTTPS_PROXY") : System.getenv("https_proxy");
 
     try {
       if (isSecure && StringUtils.isNotBlank(httpsProxy))
@@ -185,10 +187,8 @@ public class HeliumBundleFactory {
         username = authority[0];
       }
     }
-    String nonProxyHosts =
-        StringUtils.isBlank(System.getenv("no_proxy"))
-            ? System.getenv("NO_PROXY")
-            : System.getenv("no_proxy");
+    String nonProxyHosts = StringUtils.isBlank(System.getenv("no_proxy")) ?
+            System.getenv("NO_PROXY") : System.getenv("no_proxy");
     return new ProxyConfig.Proxy(proxyId, protocol, host, port, username, password, nonProxyHosts);
   }
 
@@ -214,8 +214,8 @@ public class HeliumBundleFactory {
 
   private static List<String> unTgz(File tarFile, File directory) throws IOException {
     List<String> result = new ArrayList<>();
-    try (TarArchiveInputStream in =
-        new TarArchiveInputStream(new GzipCompressorInputStream(new FileInputStream(tarFile)))) {
+    try (TarArchiveInputStream in = new TarArchiveInputStream(
+            new GzipCompressorInputStream(new FileInputStream(tarFile)))) {
       TarArchiveEntry entry = in.getNextTarEntry();
       while (entry != null) {
         if (entry.isDirectory()) {
@@ -237,35 +237,34 @@ public class HeliumBundleFactory {
     return result;
   }
 
-  /** @return main file name of this helium package (relative path) */
-  private String downloadPackage(
-      HeliumPackage pkg,
-      String[] nameAndVersion,
-      File bundleDir,
-      String templateWebpackConfig,
-      String templatePackageJson,
-      FrontendPluginFactory fpf)
-      throws IOException, TaskRunnerException {
+  /**
+   * @return main file name of this helium package (relative path)
+   */
+  private String downloadPackage(HeliumPackage pkg, String[] nameAndVersion, File bundleDir,
+                                String templateWebpackConfig, String templatePackageJson,
+                                FrontendPluginFactory fpf) throws IOException, TaskRunnerException {
     if (bundleDir.exists()) {
       FileUtils.deleteQuietly(bundleDir);
     }
     FileUtils.forceMkdir(bundleDir);
 
-    FileFilter copyFilter =
-        new FileFilter() {
-          @Override
-          public boolean accept(File pathname) {
-            String fileName = pathname.getName();
-            if (fileName.startsWith(".") || fileName.startsWith("#") || fileName.startsWith("~")) {
-              return false;
-            } else {
-              return true;
-            }
-          }
-        };
+    FileFilter copyFilter = new FileFilter() {
+      @Override
+      public boolean accept(File pathname) {
+        String fileName = pathname.getName();
+        if (fileName.startsWith(".") || fileName.startsWith("#") || fileName.startsWith("~")) {
+          return false;
+        } else {
+          return true;
+        }
+      }
+    };
 
     if (isLocalPackage(pkg)) {
-      FileUtils.copyDirectory(new File(pkg.getArtifact()), bundleDir, copyFilter);
+      FileUtils.copyDirectory(
+              new File(pkg.getArtifact()),
+              bundleDir,
+              copyFilter);
     } else {
       // if online package
       String version = nameAndVersion[1];
@@ -277,7 +276,7 @@ public class HeliumBundleFactory {
       File extracted = new File(heliumBundleDirectory, "package");
       FileUtils.deleteDirectory(extracted);
       List<String> entries = unTgz(tgz, heliumBundleDirectory);
-      for (String entry : entries) logger.debug("Extracted " + entry);
+      for (String entry: entries) logger.debug("Extracted " + entry);
       tgz.delete();
       FileUtils.copyDirectory(extracted, bundleDir);
       FileUtils.deleteDirectory(extracted);
@@ -286,22 +285,20 @@ public class HeliumBundleFactory {
     // 1. setup package.json
     File existingPackageJson = new File(bundleDir, "package.json");
     JsonReader reader = new JsonReader(new FileReader(existingPackageJson));
-    Map<String, Object> packageJson =
-        gson.fromJson(reader, new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> packageJson = gson.fromJson(reader,
+            new TypeToken<Map<String, Object>>(){}.getType());
     Map<String, String> existingDeps = (Map<String, String>) packageJson.get("dependencies");
     String mainFileName = (String) packageJson.get("main");
 
     StringBuilder dependencies = new StringBuilder();
     int index = 0;
-    for (Map.Entry<String, String> e : existingDeps.entrySet()) {
+    for (Map.Entry<String, String> e: existingDeps.entrySet()) {
       dependencies.append("    \"").append(e.getKey()).append("\": ");
-      if (e.getKey().equals("zeppelin-vis")
-          || e.getKey().equals("zeppelin-tabledata")
-          || e.getKey().equals("zeppelin-spell")) {
-        dependencies
-            .append("\"file:../../" + HELIUM_LOCAL_MODULE_DIR + "/")
-            .append(e.getKey())
-            .append("\"");
+      if (e.getKey().equals("zeppelin-vis") ||
+          e.getKey().equals("zeppelin-tabledata") ||
+          e.getKey().equals("zeppelin-spell")) {
+        dependencies.append("\"file:../../" + HELIUM_LOCAL_MODULE_DIR + "/")
+                .append(e.getKey()).append("\"");
       } else {
         dependencies.append("\"").append(e.getValue()).append("\"");
       }
@@ -324,8 +321,8 @@ public class HeliumBundleFactory {
     return mainFileName;
   }
 
-  private void prepareSource(HeliumPackage pkg, String[] moduleNameVersion, String mainFileName)
-      throws IOException {
+  private void prepareSource(HeliumPackage pkg, String[] moduleNameVersion,
+                            String mainFileName) throws IOException {
     StringBuilder loadJsImport = new StringBuilder();
     StringBuilder loadJsRegister = new StringBuilder();
     String className = "bundles" + pkg.getName().replaceAll("[-_]", "");
@@ -335,7 +332,10 @@ public class HeliumBundleFactory {
       mainFileName = mainFileName.substring(0, mainFileName.length() - 3);
     }
 
-    loadJsImport.append("import ").append(className).append(" from \"../" + mainFileName + "\"\n");
+    loadJsImport
+        .append("import ")
+        .append(className)
+        .append(" from \"../" + mainFileName + "\"\n");
 
     loadJsRegister.append(HELIUM_BUNDLES_VAR + ".push({\n");
     loadJsRegister.append("id: \"" + moduleNameVersion[0] + "\",\n");
@@ -347,17 +347,17 @@ public class HeliumBundleFactory {
 
     File srcDir = getHeliumPackageSourceDirectory(pkg.getName());
     FileUtils.forceMkdir(srcDir);
-    FileUtils.write(
-        new File(srcDir, HELIUM_BUNDLES_SRC), loadJsImport.append(loadJsRegister).toString());
+    FileUtils.write(new File(srcDir, HELIUM_BUNDLES_SRC),
+            loadJsImport.append(loadJsRegister).toString());
   }
 
   private synchronized void installNodeModules(FrontendPluginFactory fpf) throws IOException {
     try {
       out.reset();
       String commandForNpmInstall =
-          String.format(
-              "install --fetch-retries=%d --fetch-retry-factor=%d " + "--fetch-retry-mintimeout=%d",
-              FETCH_RETRY_COUNT, FETCH_RETRY_FACTOR_COUNT, FETCH_RETRY_MIN_TIMEOUT);
+              String.format("install --fetch-retries=%d --fetch-retry-factor=%d " +
+                              "--fetch-retry-mintimeout=%d",
+                      FETCH_RETRY_COUNT, FETCH_RETRY_FACTOR_COUNT, FETCH_RETRY_MIN_TIMEOUT);
       logger.info("Installing required node modules");
       yarnCommand(fpf, commandForNpmInstall);
       logger.info("Installed required node modules");
@@ -366,8 +366,8 @@ public class HeliumBundleFactory {
     }
   }
 
-  private synchronized File bundleHeliumPackage(FrontendPluginFactory fpf, File bundleDir)
-      throws IOException {
+  private synchronized File bundleHeliumPackage(FrontendPluginFactory fpf,
+                                               File bundleDir) throws IOException {
     try {
       out.reset();
       logger.info("Bundling helium packages");
@@ -380,7 +380,8 @@ public class HeliumBundleFactory {
     String bundleStdoutResult = new String(out.toByteArray());
     File heliumBundle = new File(bundleDir, HELIUM_BUNDLE);
     if (!heliumBundle.isFile()) {
-      throw new IOException("Can't create bundle: \n" + bundleStdoutResult);
+      throw new IOException(
+              "Can't create bundle: \n" + bundleStdoutResult);
     }
 
     WebpackResult result = getWebpackResultFromOutput(bundleStdoutResult);
@@ -392,8 +393,9 @@ public class HeliumBundleFactory {
     return heliumBundle;
   }
 
-  public synchronized File buildPackage(
-      HeliumPackage pkg, boolean rebuild, boolean recopyLocalModule) throws IOException {
+  public synchronized File buildPackage(HeliumPackage pkg,
+                                        boolean rebuild,
+                                        boolean recopyLocalModule) throws IOException {
     if (pkg == null) {
       return null;
     }
@@ -424,20 +426,20 @@ public class HeliumBundleFactory {
       FileUtils.deleteQuietly(heliumLocalRepoDirectory);
       FileUtils.forceMkdir(heliumLocalRepoDirectory);
     }
-    FrontendPluginFactory fpf = new FrontendPluginFactory(bundleDir, nodeInstallationDirectory);
+    FrontendPluginFactory fpf = new FrontendPluginFactory(
+            bundleDir, nodeInstallationDirectory);
 
     // resources: webpack.js, package.json
-    String templateWebpackConfig =
-        Resources.toString(Resources.getResource("helium/webpack.config.js"), Charsets.UTF_8);
-    String templatePackageJson =
-        Resources.toString(Resources.getResource("helium/" + PACKAGE_JSON), Charsets.UTF_8);
+    String templateWebpackConfig = Resources.toString(
+        Resources.getResource("helium/webpack.config.js"), Charsets.UTF_8);
+    String templatePackageJson = Resources.toString(
+        Resources.getResource("helium/" + PACKAGE_JSON), Charsets.UTF_8);
 
     // 2. download helium package using `npm pack`
     String mainFileName = null;
     try {
-      mainFileName =
-          downloadPackage(
-              pkg, moduleNameVersion, bundleDir, templateWebpackConfig, templatePackageJson, fpf);
+      mainFileName = downloadPackage(pkg, moduleNameVersion, bundleDir,
+              templateWebpackConfig, templatePackageJson, fpf);
     } catch (TaskRunnerException e) {
       throw new IOException(e);
     }
@@ -476,34 +478,36 @@ public class HeliumBundleFactory {
     }
   }
 
-  private void copyFrameworkModule(boolean recopy, FileFilter filter, File src, File dest)
-      throws IOException {
+  private void copyFrameworkModule(boolean recopy, FileFilter filter,
+                           File src, File dest) throws IOException {
     if (src != null) {
       if (recopy && dest.exists()) {
         FileUtils.deleteDirectory(dest);
       }
 
       if (!dest.exists()) {
-        FileUtils.copyDirectory(src, dest, filter);
+        FileUtils.copyDirectory(
+            src,
+            dest,
+            filter);
       }
     }
   }
 
   private void deleteYarnCache() {
-    FilenameFilter filter =
-        new FilenameFilter() {
-          @Override
-          public boolean accept(File dir, String name) {
-            if ((name.startsWith("npm-zeppelin-vis-")
-                    || name.startsWith("npm-zeppelin-tabledata-")
-                    || name.startsWith("npm-zeppelin-spell-"))
-                && dir.isDirectory()) {
-              return true;
-            }
+    FilenameFilter filter = new FilenameFilter() {
+      @Override
+      public boolean accept(File dir, String name) {
+        if ((name.startsWith("npm-zeppelin-vis-") ||
+            name.startsWith("npm-zeppelin-tabledata-") ||
+            name.startsWith("npm-zeppelin-spell-")) &&
+            dir.isDirectory()) {
+          return true;
+        }
 
-            return false;
-          }
-        };
+        return false;
+      }
+    };
 
     File[] localModuleCaches = yarnCacheDir.listFiles(filter);
     if (localModuleCaches != null) {
@@ -513,38 +517,42 @@ public class HeliumBundleFactory {
     }
   }
 
-  void copyFrameworkModulesToInstallPath(boolean recopy) throws IOException {
+  void copyFrameworkModulesToInstallPath(boolean recopy)
+      throws IOException {
 
-    FileFilter npmPackageCopyFilter =
-        new FileFilter() {
-          @Override
-          public boolean accept(File pathname) {
-            String fileName = pathname.getName();
-            if (fileName.startsWith(".") || fileName.startsWith("#") || fileName.startsWith("~")) {
-              return false;
-            } else {
-              return true;
-            }
-          }
-        };
+    FileFilter npmPackageCopyFilter = new FileFilter() {
+      @Override
+      public boolean accept(File pathname) {
+        String fileName = pathname.getName();
+        if (fileName.startsWith(".") || fileName.startsWith("#") || fileName.startsWith("~")) {
+          return false;
+        } else {
+          return true;
+        }
+      }
+    };
 
     FileUtils.forceMkdir(heliumLocalModuleDirectory);
     // should delete yarn caches for local modules since they might be updated
     deleteYarnCache();
 
     // install tabledata module
-    File tabledataModuleInstallPath = new File(heliumLocalModuleDirectory, "zeppelin-tabledata");
-    copyFrameworkModule(
-        recopy, npmPackageCopyFilter, tabledataModulePath, tabledataModuleInstallPath);
+    File tabledataModuleInstallPath = new File(heliumLocalModuleDirectory,
+        "zeppelin-tabledata");
+    copyFrameworkModule(recopy, npmPackageCopyFilter,
+        tabledataModulePath, tabledataModuleInstallPath);
 
     // install visualization module
-    File visModuleInstallPath = new File(heliumLocalModuleDirectory, "zeppelin-vis");
-    copyFrameworkModule(
-        recopy, npmPackageCopyFilter, visualizationModulePath, visModuleInstallPath);
+    File visModuleInstallPath = new File(heliumLocalModuleDirectory,
+        "zeppelin-vis");
+    copyFrameworkModule(recopy, npmPackageCopyFilter,
+        visualizationModulePath, visModuleInstallPath);
 
     // install spell module
-    File spellModuleInstallPath = new File(heliumLocalModuleDirectory, "zeppelin-spell");
-    copyFrameworkModule(recopy, npmPackageCopyFilter, spellModulePath, spellModuleInstallPath);
+    File spellModuleInstallPath = new File(heliumLocalModuleDirectory,
+        "zeppelin-spell");
+    copyFrameworkModule(recopy, npmPackageCopyFilter,
+        spellModulePath, spellModuleInstallPath);
   }
 
   private WebpackResult getWebpackResultFromOutput(String output) {
@@ -601,7 +609,8 @@ public class HeliumBundleFactory {
         return null;
       }
       try {
-        NpmPackage npmPackage = NpmPackage.fromJson(FileUtils.readFileToString(packageJson));
+        NpmPackage npmPackage = NpmPackage.fromJson(
+            FileUtils.readFileToString(packageJson));
 
         String[] nameVersion = new String[2];
         nameVersion[0] = npmPackage.name;
@@ -618,7 +627,9 @@ public class HeliumBundleFactory {
       if ((pos = artifact.indexOf('@')) > 0) {
         nameVersion[0] = artifact.substring(0, pos);
         nameVersion[1] = artifact.substring(pos + 1);
-      } else if ((pos = artifact.indexOf('^')) > 0 || (pos = artifact.indexOf('~')) > 0) {
+      } else if (
+          (pos = artifact.indexOf('^')) > 0 ||
+              (pos = artifact.indexOf('~')) > 0) {
         nameVersion[0] = artifact.substring(0, pos);
         nameVersion[1] = artifact.substring(pos);
       } else {
@@ -631,13 +642,9 @@ public class HeliumBundleFactory {
 
   synchronized void install(HeliumPackage pkg) throws TaskRunnerException {
     String commandForNpmInstallArtifact =
-        String.format(
-            "install %s --fetch-retries=%d --fetch-retry-factor=%d "
-                + "--fetch-retry-mintimeout=%d",
-            pkg.getArtifact(),
-            FETCH_RETRY_COUNT,
-            FETCH_RETRY_FACTOR_COUNT,
-            FETCH_RETRY_MIN_TIMEOUT);
+        String.format("install %s --fetch-retries=%d --fetch-retry-factor=%d " +
+                        "--fetch-retry-mintimeout=%d", pkg.getArtifact(),
+                FETCH_RETRY_COUNT, FETCH_RETRY_FACTOR_COUNT, FETCH_RETRY_MIN_TIMEOUT);
     npmCommand(commandForNpmInstallArtifact);
   }
 
@@ -646,8 +653,7 @@ public class HeliumBundleFactory {
   }
 
   private void npmCommand(String args, Map<String, String> env) throws TaskRunnerException {
-    NpmRunner npm =
-        frontEndPluginFactory.getNpmRunner(
+    NpmRunner npm = frontEndPluginFactory.getNpmRunner(
             getProxyConfig(isSecure(defaultNpmInstallerUrl)), defaultNpmInstallerUrl);
     npm.execute(args, env);
   }
@@ -660,36 +666,37 @@ public class HeliumBundleFactory {
     yarnCommand(fpf, args, new HashMap<String, String>());
   }
 
-  private void yarnCommand(FrontendPluginFactory fpf, String args, Map<String, String> env)
-      throws TaskRunnerException {
-    YarnRunner yarn =
-        fpf.getYarnRunner(getProxyConfig(isSecure(defaultNpmInstallerUrl)), defaultNpmInstallerUrl);
+  private void yarnCommand(FrontendPluginFactory fpf,
+                           String args, Map<String, String> env) throws TaskRunnerException {
+    YarnRunner yarn = fpf.getYarnRunner(
+            getProxyConfig(isSecure(defaultNpmInstallerUrl)), defaultNpmInstallerUrl);
     yarn.execute(args, env);
   }
 
   private synchronized void configureLogger() {
-    org.apache.log4j.Logger npmLogger =
-        org.apache.log4j.Logger.getLogger(
-            "com.github.eirslett.maven.plugins.frontend.lib.DefaultYarnRunner");
+    org.apache.log4j.Logger npmLogger = org.apache.log4j.Logger.getLogger(
+        "com.github.eirslett.maven.plugins.frontend.lib.DefaultYarnRunner");
     Enumeration appenders = org.apache.log4j.Logger.getRootLogger().getAllAppenders();
 
     if (appenders != null) {
       while (appenders.hasMoreElements()) {
         Appender appender = (Appender) appenders.nextElement();
-        appender.addFilter(
-            new Filter() {
-
-              @Override
-              public int decide(LoggingEvent loggingEvent) {
-                if (loggingEvent.getLoggerName().contains("DefaultYarnRunner")) {
-                  return DENY;
-                } else {
-                  return NEUTRAL;
-                }
-              }
-            });
+        appender.addFilter(new Filter() {
+
+          @Override
+          public int decide(LoggingEvent loggingEvent) {
+            if (loggingEvent.getLoggerName().contains("DefaultYarnRunner")) {
+              return DENY;
+            } else {
+              return NEUTRAL;
+            }
+          }
+        });
       }
     }
-    npmLogger.addAppender(new WriterAppender(new PatternLayout("%m%n"), out));
+    npmLogger.addAppender(new WriterAppender(
+        new PatternLayout("%m%n"),
+        out
+    ));
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumConf.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumConf.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumConf.java
index 07ac07e..c7fec86 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumConf.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumConf.java
@@ -18,26 +18,30 @@ package org.apache.zeppelin.helium;
 
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
-import java.util.*;
 import org.apache.zeppelin.common.JsonSerializable;
 
-/** Helium config. This object will be persisted to conf/helium.conf */
+import java.util.*;
+
+/**
+ * Helium config. This object will be persisted to conf/helium.conf
+ */
 public class HeliumConf implements JsonSerializable {
-  private static final Gson gson =
-      new GsonBuilder()
-          .setPrettyPrinting()
-          .registerTypeAdapter(HeliumRegistry.class, new HeliumRegistrySerializer())
-          .create();
+  private static final Gson gson =  new GsonBuilder()
+    .setPrettyPrinting()
+    .registerTypeAdapter(HeliumRegistry.class, new HeliumRegistrySerializer())
+    .create();
 
   // enabled packages {name, version}
   private Map<String, String> enabled = Collections.synchronizedMap(new HashMap<String, String>());
 
   // {artifact, {configKey, configValue}}
   private Map<String, Map<String, Object>> packageConfig =
-      Collections.synchronizedMap(new HashMap<String, Map<String, Object>>());
+      Collections.synchronizedMap(
+          new HashMap<String, Map<String, Object>>());
 
   // enabled visualization package display order
-  private List<String> bundleDisplayOrder = Collections.synchronizedList(new LinkedList<String>());
+  private List<String> bundleDisplayOrder =
+          Collections.synchronizedList(new LinkedList<String>());
 
   public Map<String, String> getEnabledPackages() {
     return new HashMap<>(enabled);
@@ -47,21 +51,26 @@ public class HeliumConf implements JsonSerializable {
     enabled.put(name, artifact);
   }
 
-  public void updatePackageConfig(String artifact, Map<String, Object> newConfig) {
+  public void updatePackageConfig(String artifact,
+                                  Map<String, Object> newConfig) {
     if (!packageConfig.containsKey(artifact)) {
-      packageConfig.put(artifact, Collections.synchronizedMap(new HashMap<String, Object>()));
+      packageConfig.put(artifact,
+          Collections.synchronizedMap(new HashMap<String, Object>()));
     }
     packageConfig.put(artifact, newConfig);
   }
 
-  /** @return versioned package config `{artifact, {configKey, configVal}}` */
-  public Map<String, Map<String, Object>> getAllPackageConfigs() {
+  /**
+   * @return versioned package config `{artifact, {configKey, configVal}}`
+   */
+  public Map<String, Map<String, Object>> getAllPackageConfigs () {
     return packageConfig;
   }
 
   public Map<String, Object> getPackagePersistedConfig(String artifact) {
     if (!packageConfig.containsKey(artifact)) {
-      packageConfig.put(artifact, Collections.synchronizedMap(new HashMap<String, Object>()));
+      packageConfig.put(artifact,
+          Collections.synchronizedMap(new HashMap<String, Object>()));
     }
 
     return packageConfig.get(artifact);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumLocalRegistry.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumLocalRegistry.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumLocalRegistry.java
index 5f62c4b..7328dca 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumLocalRegistry.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumLocalRegistry.java
@@ -18,16 +18,19 @@ package org.apache.zeppelin.helium;
 
 import com.google.gson.Gson;
 import com.google.gson.stream.JsonReader;
+import org.apache.commons.io.FileUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.File;
 import java.io.IOException;
 import java.io.StringReader;
 import java.util.LinkedList;
 import java.util.List;
-import org.apache.commons.io.FileUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Simple Helium registry on local filesystem */
+/**
+ * Simple Helium registry on local filesystem
+ */
 public class HeliumLocalRegistry extends HeliumRegistry {
   private Logger logger = LoggerFactory.getLogger(HeliumLocalRegistry.class);
 
@@ -36,6 +39,7 @@ public class HeliumLocalRegistry extends HeliumRegistry {
   public HeliumLocalRegistry(String name, String uri) {
     super(name, uri);
     gson = new Gson();
+
   }
 
   @Override
@@ -43,7 +47,7 @@ public class HeliumLocalRegistry extends HeliumRegistry {
     List<HeliumPackage> result = new LinkedList<>();
 
     File file = new File(uri());
-    File[] files = file.listFiles();
+    File [] files = file.listFiles();
     if (files == null) {
       return result;
     }
@@ -72,4 +76,5 @@ public class HeliumLocalRegistry extends HeliumRegistry {
       return null;
     }
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumOnlineRegistry.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumOnlineRegistry.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumOnlineRegistry.java
index b868472..e54687a 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumOnlineRegistry.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumOnlineRegistry.java
@@ -18,23 +18,12 @@ package org.apache.zeppelin.helium;
 
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.URI;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
 import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.impl.client.HttpClientBuilder;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
@@ -42,11 +31,32 @@ import org.apache.zeppelin.util.Util;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URI;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
 /**
- * This registry reads helium package json data from specified url.
+ * This registry reads helium package json data
+ * from specified url.
  *
- * <p>File should be look like [ "packageName": { "0.0.1": json serialized HeliumPackage class,
- * "0.0.2": json serialized HeliumPackage class, ... }, ... ]
+ * File should be look like
+ * [
+ *    "packageName": {
+ *       "0.0.1": json serialized HeliumPackage class,
+ *       "0.0.2": json serialized HeliumPackage class,
+ *       ...
+ *    },
+ *    ...
+ * ]
  */
 public class HeliumOnlineRegistry extends HeliumRegistry {
   private Logger logger = LoggerFactory.getLogger(HeliumOnlineRegistry.class);
@@ -64,11 +74,10 @@ public class HeliumOnlineRegistry extends HeliumRegistry {
 
   @Override
   public synchronized List<HeliumPackage> getAll() throws IOException {
-    HttpClient client =
-        HttpClientBuilder.create()
-            .setUserAgent("ApacheZeppelin/" + Util.getVersion())
-            .setProxy(getProxy(uri()))
-            .build();
+    HttpClient client = HttpClientBuilder.create()
+        .setUserAgent("ApacheZeppelin/" + Util.getVersion())
+        .setProxy(getProxy(uri()))
+        .build();
     HttpGet get = new HttpGet(uri());
     HttpResponse response;
     try {
@@ -76,8 +85,10 @@ public class HeliumOnlineRegistry extends HeliumRegistry {
       if ((get.getURI().getHost().equals(cfg.getS3Endpoint()))) {
         if (cfg.getS3Timeout() != null) {
           int timeout = Integer.valueOf(cfg.getS3Timeout());
-          RequestConfig requestCfg =
-              RequestConfig.custom().setConnectTimeout(timeout).setSocketTimeout(timeout).build();
+          RequestConfig requestCfg = RequestConfig.custom()
+                  .setConnectTimeout(timeout)
+                  .setSocketTimeout(timeout)
+                  .build();
           get.setConfig(requestCfg);
         }
       }
@@ -95,11 +106,13 @@ public class HeliumOnlineRegistry extends HeliumRegistry {
       List<HeliumPackage> packageList = new LinkedList<>();
 
       BufferedReader reader;
-      reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
+      reader = new BufferedReader(
+          new InputStreamReader(response.getEntity().getContent()));
 
-      List<Map<String, Map<String, HeliumPackage>>> packages =
-          gson.fromJson(
-              reader, new TypeToken<List<Map<String, Map<String, HeliumPackage>>>>() {}.getType());
+      List<Map<String, Map<String, HeliumPackage>>> packages = gson.fromJson(
+          reader,
+          new TypeToken<List<Map<String, Map<String, HeliumPackage>>>>() {
+          }.getType());
       reader.close();
 
       for (Map<String, Map<String, HeliumPackage>> pkg : packages) {
@@ -114,27 +127,25 @@ public class HeliumOnlineRegistry extends HeliumRegistry {
   }
 
   private HttpHost getProxy(String uri) {
-    String httpProxy =
-        StringUtils.isBlank(System.getenv("http_proxy"))
-            ? System.getenv("HTTP_PROXY")
-            : System.getenv("http_proxy");
+    String httpProxy = StringUtils.isBlank(System.getenv("http_proxy")) ?
+            System.getenv("HTTP_PROXY") : System.getenv("http_proxy");
 
-    String httpsProxy =
-        StringUtils.isBlank(System.getenv("https_proxy"))
-            ? System.getenv("HTTPS_PROXY")
-            : System.getenv("https_proxy");
+    String httpsProxy = StringUtils.isBlank(System.getenv("https_proxy")) ?
+            System.getenv("HTTPS_PROXY") : System.getenv("https_proxy");
 
     try {
       String scheme = new URI(uri).getScheme();
       if (scheme.toLowerCase().startsWith("https") && StringUtils.isNotBlank(httpsProxy)) {
         URI httpsProxyUri = new URI(httpsProxy);
-        return new HttpHost(
-            httpsProxyUri.getHost(), httpsProxyUri.getPort(), httpsProxyUri.getScheme());
-      } else if (scheme.toLowerCase().startsWith("http") && StringUtils.isNotBlank(httpProxy)) {
+        return new HttpHost(httpsProxyUri.getHost(),
+                httpsProxyUri.getPort(), httpsProxyUri.getScheme());
+      }
+      else if (scheme.toLowerCase().startsWith("http") && StringUtils.isNotBlank(httpProxy)){
         URI httpProxyUri = new URI(httpProxy);
-        return new HttpHost(
-            httpProxyUri.getHost(), httpProxyUri.getPort(), httpProxyUri.getScheme());
-      } else return null;
+        return new HttpHost(httpProxyUri.getHost(),
+                httpProxyUri.getPort(), httpProxyUri.getScheme());
+      }
+      else return null;
     } catch (Exception ex) {
       logger.error(ex.getMessage(), ex);
       return null;
@@ -146,7 +157,9 @@ public class HeliumOnlineRegistry extends HeliumRegistry {
       if (registryCacheFile.isFile()) {
         try {
           return gson.fromJson(
-              new FileReader(registryCacheFile), new TypeToken<List<HeliumPackage>>() {}.getType());
+              new FileReader(registryCacheFile),
+              new TypeToken<List<HeliumPackage>>() {
+              }.getType());
         } catch (FileNotFoundException e) {
           logger.error(e.getMessage(), e);
           return new LinkedList<>();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumPackageSearchResult.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumPackageSearchResult.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumPackageSearchResult.java
index 63d8b9e..36b6115 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumPackageSearchResult.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumPackageSearchResult.java
@@ -16,7 +16,9 @@
  */
 package org.apache.zeppelin.helium;
 
-/** search result */
+/**
+ * search result
+ */
 public class HeliumPackageSearchResult {
   private final String registry;
   private final HeliumPackage pkg;
@@ -24,7 +26,6 @@ public class HeliumPackageSearchResult {
 
   /**
    * Create search result item
-   *
    * @param registry registry name
    * @param pkg package information
    */

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumPackageSuggestion.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumPackageSuggestion.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumPackageSuggestion.java
index adb69a2..9df6abc 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumPackageSuggestion.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumPackageSuggestion.java
@@ -21,7 +21,9 @@ import java.util.Comparator;
 import java.util.LinkedList;
 import java.util.List;
 
-/** Suggested apps */
+/**
+ * Suggested apps
+ */
 public class HeliumPackageSuggestion {
   private final List<HeliumPackageSearchResult> available = new LinkedList<>();
 
@@ -30,20 +32,21 @@ public class HeliumPackageSuggestion {
    * provides n - 'favorite' list, based on occurrence of apps in notebook
    */
 
-  public HeliumPackageSuggestion() {}
+  public HeliumPackageSuggestion() {
+
+  }
 
   public void addAvailablePackage(HeliumPackageSearchResult r) {
     available.add(r);
+
   }
 
   public void sort() {
-    Collections.sort(
-        available,
-        new Comparator<HeliumPackageSearchResult>() {
-          @Override
-          public int compare(HeliumPackageSearchResult o1, HeliumPackageSearchResult o2) {
-            return o1.getPkg().getName().compareTo(o2.getPkg().getName());
-          }
-        });
+    Collections.sort(available, new Comparator<HeliumPackageSearchResult>() {
+      @Override
+      public int compare(HeliumPackageSearchResult o1, HeliumPackageSearchResult o2) {
+        return o1.getPkg().getName().compareTo(o2.getPkg().getName());
+      }
+    });
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumRegistry.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumRegistry.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumRegistry.java
index d2b2dd4..125ad92 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumRegistry.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumRegistry.java
@@ -17,9 +17,12 @@
 package org.apache.zeppelin.helium;
 
 import java.io.IOException;
+import java.net.URI;
 import java.util.List;
 
-/** Helium package registry */
+/**
+ * Helium package registry
+ */
 public abstract class HeliumRegistry {
   private final String name;
   private final String uri;
@@ -28,14 +31,11 @@ public abstract class HeliumRegistry {
     this.name = name;
     this.uri = uri;
   }
-
   public String name() {
     return name;
   }
-
   public String uri() {
     return uri;
   }
-
   public abstract List<HeliumPackage> getAll() throws IOException;
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumRegistrySerializer.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumRegistrySerializer.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumRegistrySerializer.java
index 2e63925..3abcb9f 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumRegistrySerializer.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumRegistrySerializer.java
@@ -17,20 +17,26 @@
 package org.apache.zeppelin.helium;
 
 import com.google.gson.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Type;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.net.URI;
+import java.net.URISyntaxException;
 
-/** HeliumRegistrySerializer (and deserializer) for gson */
+/**
+ * HeliumRegistrySerializer (and deserializer) for gson
+ */
 public class HeliumRegistrySerializer
     implements JsonSerializer<HeliumRegistry>, JsonDeserializer<HeliumRegistry> {
   Logger logger = LoggerFactory.getLogger(HeliumRegistrySerializer.class);
 
   @Override
-  public HeliumRegistry deserialize(
-      JsonElement json, Type type, JsonDeserializationContext jsonDeserializationContext)
+  public HeliumRegistry deserialize(JsonElement json,
+                                Type type,
+                                JsonDeserializationContext jsonDeserializationContext)
       throws JsonParseException {
     JsonObject jsonObject = json.getAsJsonObject();
     String className = jsonObject.get("class").getAsString();
@@ -44,19 +50,17 @@ public class HeliumRegistrySerializer
       Constructor<HeliumRegistry> constructor = cls.getConstructor(String.class, String.class);
       HeliumRegistry registry = constructor.newInstance(name, uri);
       return registry;
-    } catch (ClassNotFoundException
-        | NoSuchMethodException
-        | IllegalAccessException
-        | InstantiationException
-        | InvocationTargetException e) {
+    } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException |
+        InstantiationException | InvocationTargetException e) {
       logger.error(e.getMessage(), e);
       return null;
     }
   }
 
   @Override
-  public JsonElement serialize(
-      HeliumRegistry heliumRegistry, Type type, JsonSerializationContext jsonSerializationContext) {
+  public JsonElement serialize(HeliumRegistry heliumRegistry,
+                               Type type,
+                               JsonSerializationContext jsonSerializationContext) {
     JsonObject json = new JsonObject();
     json.addProperty("class", heliumRegistry.getClass().getName());
     json.addProperty("uri", heliumRegistry.uri());

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/NpmPackage.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/NpmPackage.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/NpmPackage.java
index f643f12..c2234c6 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/NpmPackage.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/NpmPackage.java
@@ -17,10 +17,13 @@
 package org.apache.zeppelin.helium;
 
 import com.google.gson.Gson;
-import java.util.Map;
 import org.apache.zeppelin.common.JsonSerializable;
 
-/** To read package.json */
+import java.util.Map;
+
+/**
+ * To read package.json
+ */
 public class NpmPackage implements JsonSerializable {
   private static final Gson gson = new Gson();
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/WebpackResult.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/WebpackResult.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/WebpackResult.java
index 3d0fb6e..4175cad 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/WebpackResult.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/WebpackResult.java
@@ -19,12 +19,14 @@ package org.apache.zeppelin.helium;
 import com.google.gson.Gson;
 import org.apache.zeppelin.common.JsonSerializable;
 
-/** Represetns webpack json format result */
+/**
+ * Represetns webpack json format result
+ */
 public class WebpackResult implements JsonSerializable {
   private static final Gson gson = new Gson();
 
-  public final String[] errors = new String[0];
-  public final String[] warnings = new String[0];
+  public final String [] errors = new String[0];
+  public final String [] warnings = new String[0];
 
   public String toJson() {
     return gson.toJson(this);


[23/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterEventType.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterEventType.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterEventType.java
index 4396696..9e5a0b4 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterEventType.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterEventType.java
@@ -1,26 +1,33 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
 public enum RemoteInterpreterEventType implements org.apache.thrift.TEnum {
   NO_OP(1),
   ANGULAR_OBJECT_ADD(2),
@@ -45,17 +52,18 @@ public enum RemoteInterpreterEventType implements org.apache.thrift.TEnum {
     this.value = value;
   }
 
-  /** Get the integer value of this enum value, as defined in the Thrift IDL. */
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
   public int getValue() {
     return value;
   }
 
   /**
    * Find a the enum type by its integer value, as defined in the Thrift IDL.
-   *
    * @return null if the value is not found.
    */
-  public static RemoteInterpreterEventType findByValue(int value) {
+  public static RemoteInterpreterEventType findByValue(int value) { 
     switch (value) {
       case 1:
         return NO_OP;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterResult.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterResult.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterResult.java
index 7e03732..2c863c2 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterResult.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterResult.java
@@ -1,71 +1,67 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2018-8-9")
-public class RemoteInterpreterResult
-    implements org.apache.thrift.TBase<RemoteInterpreterResult, RemoteInterpreterResult._Fields>,
-        java.io.Serializable,
-        Cloneable,
-        Comparable<RemoteInterpreterResult> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
-      new org.apache.thrift.protocol.TStruct("RemoteInterpreterResult");
-
-  private static final org.apache.thrift.protocol.TField CODE_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "code", org.apache.thrift.protocol.TType.STRING, (short) 1);
-  private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "msg", org.apache.thrift.protocol.TType.LIST, (short) 2);
-  private static final org.apache.thrift.protocol.TField CONFIG_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "config", org.apache.thrift.protocol.TType.STRING, (short) 3);
-  private static final org.apache.thrift.protocol.TField GUI_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "gui", org.apache.thrift.protocol.TType.STRING, (short) 4);
-  private static final org.apache.thrift.protocol.TField NOTE_GUI_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "noteGui", org.apache.thrift.protocol.TType.STRING, (short) 5);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
-      new HashMap<Class<? extends IScheme>, SchemeFactory>();
+public class RemoteInterpreterResult implements org.apache.thrift.TBase<RemoteInterpreterResult, RemoteInterpreterResult._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteInterpreterResult> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteInterpreterResult");
+
+  private static final org.apache.thrift.protocol.TField CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("code", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.LIST, (short)2);
+  private static final org.apache.thrift.protocol.TField CONFIG_FIELD_DESC = new org.apache.thrift.protocol.TField("config", org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField GUI_FIELD_DESC = new org.apache.thrift.protocol.TField("gui", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField NOTE_GUI_FIELD_DESC = new org.apache.thrift.protocol.TField("noteGui", org.apache.thrift.protocol.TType.STRING, (short)5);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
     schemes.put(StandardScheme.class, new RemoteInterpreterResultStandardSchemeFactory());
     schemes.put(TupleScheme.class, new RemoteInterpreterResultTupleSchemeFactory());
@@ -77,16 +73,13 @@ public class RemoteInterpreterResult
   public String gui; // required
   public String noteGui; // required
 
-  /**
-   * The set of fields this struct contains, along with convenience methods for finding and
-   * manipulating them.
-   */
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    CODE((short) 1, "code"),
-    MSG((short) 2, "msg"),
-    CONFIG((short) 3, "config"),
-    GUI((short) 4, "gui"),
-    NOTE_GUI((short) 5, "noteGui");
+    CODE((short)1, "code"),
+    MSG((short)2, "msg"),
+    CONFIG((short)3, "config"),
+    GUI((short)4, "gui"),
+    NOTE_GUI((short)5, "noteGui");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -96,9 +89,11 @@ public class RemoteInterpreterResult
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
     public static _Fields findByThriftId(int fieldId) {
-      switch (fieldId) {
+      switch(fieldId) {
         case 1: // CODE
           return CODE;
         case 2: // MSG
@@ -114,15 +109,19 @@ public class RemoteInterpreterResult
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null)
-        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
 
-    /** Find the _Fields constant that matches name, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
@@ -146,61 +145,33 @@ public class RemoteInterpreterResult
 
   // isset id assignments
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
-        new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(
-        _Fields.CODE,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "code",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.MSG,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "msg",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.ListMetaData(
-                org.apache.thrift.protocol.TType.LIST,
-                new org.apache.thrift.meta_data.StructMetaData(
-                    org.apache.thrift.protocol.TType.STRUCT,
-                    RemoteInterpreterResultMessage.class))));
-    tmpMap.put(
-        _Fields.CONFIG,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "config",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.GUI,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "gui",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.NOTE_GUI,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "noteGui",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.CODE, new org.apache.thrift.meta_data.FieldMetaData("code", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RemoteInterpreterResultMessage.class))));
+    tmpMap.put(_Fields.CONFIG, new org.apache.thrift.meta_data.FieldMetaData("config", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.GUI, new org.apache.thrift.meta_data.FieldMetaData("gui", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.NOTE_GUI, new org.apache.thrift.meta_data.FieldMetaData("noteGui", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
-        RemoteInterpreterResult.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RemoteInterpreterResult.class, metaDataMap);
   }
 
-  public RemoteInterpreterResult() {}
+  public RemoteInterpreterResult() {
+  }
 
   public RemoteInterpreterResult(
-      String code,
-      List<RemoteInterpreterResultMessage> msg,
-      String config,
-      String gui,
-      String noteGui) {
+    String code,
+    List<RemoteInterpreterResultMessage> msg,
+    String config,
+    String gui,
+    String noteGui)
+  {
     this();
     this.code = code;
     this.msg = msg;
@@ -209,14 +180,15 @@ public class RemoteInterpreterResult
     this.noteGui = noteGui;
   }
 
-  /** Performs a deep copy on <i>other</i>. */
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
   public RemoteInterpreterResult(RemoteInterpreterResult other) {
     if (other.isSetCode()) {
       this.code = other.code;
     }
     if (other.isSetMsg()) {
-      List<RemoteInterpreterResultMessage> __this__msg =
-          new ArrayList<RemoteInterpreterResultMessage>(other.msg.size());
+      List<RemoteInterpreterResultMessage> __this__msg = new ArrayList<RemoteInterpreterResultMessage>(other.msg.size());
       for (RemoteInterpreterResultMessage other_element : other.msg) {
         __this__msg.add(new RemoteInterpreterResultMessage(other_element));
       }
@@ -383,135 +355,147 @@ public class RemoteInterpreterResult
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-      case CODE:
-        if (value == null) {
-          unsetCode();
-        } else {
-          setCode((String) value);
-        }
-        break;
+    case CODE:
+      if (value == null) {
+        unsetCode();
+      } else {
+        setCode((String)value);
+      }
+      break;
 
-      case MSG:
-        if (value == null) {
-          unsetMsg();
-        } else {
-          setMsg((List<RemoteInterpreterResultMessage>) value);
-        }
-        break;
+    case MSG:
+      if (value == null) {
+        unsetMsg();
+      } else {
+        setMsg((List<RemoteInterpreterResultMessage>)value);
+      }
+      break;
 
-      case CONFIG:
-        if (value == null) {
-          unsetConfig();
-        } else {
-          setConfig((String) value);
-        }
-        break;
+    case CONFIG:
+      if (value == null) {
+        unsetConfig();
+      } else {
+        setConfig((String)value);
+      }
+      break;
 
-      case GUI:
-        if (value == null) {
-          unsetGui();
-        } else {
-          setGui((String) value);
-        }
-        break;
+    case GUI:
+      if (value == null) {
+        unsetGui();
+      } else {
+        setGui((String)value);
+      }
+      break;
+
+    case NOTE_GUI:
+      if (value == null) {
+        unsetNoteGui();
+      } else {
+        setNoteGui((String)value);
+      }
+      break;
 
-      case NOTE_GUI:
-        if (value == null) {
-          unsetNoteGui();
-        } else {
-          setNoteGui((String) value);
-        }
-        break;
     }
   }
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-      case CODE:
-        return getCode();
+    case CODE:
+      return getCode();
+
+    case MSG:
+      return getMsg();
 
-      case MSG:
-        return getMsg();
+    case CONFIG:
+      return getConfig();
 
-      case CONFIG:
-        return getConfig();
+    case GUI:
+      return getGui();
 
-      case GUI:
-        return getGui();
+    case NOTE_GUI:
+      return getNoteGui();
 
-      case NOTE_GUI:
-        return getNoteGui();
     }
     throw new IllegalStateException();
   }
 
-  /**
-   * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
-   * otherwise
-   */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
     }
 
     switch (field) {
-      case CODE:
-        return isSetCode();
-      case MSG:
-        return isSetMsg();
-      case CONFIG:
-        return isSetConfig();
-      case GUI:
-        return isSetGui();
-      case NOTE_GUI:
-        return isSetNoteGui();
+    case CODE:
+      return isSetCode();
+    case MSG:
+      return isSetMsg();
+    case CONFIG:
+      return isSetConfig();
+    case GUI:
+      return isSetGui();
+    case NOTE_GUI:
+      return isSetNoteGui();
     }
     throw new IllegalStateException();
   }
 
   @Override
   public boolean equals(Object that) {
-    if (that == null) return false;
-    if (that instanceof RemoteInterpreterResult) return this.equals((RemoteInterpreterResult) that);
+    if (that == null)
+      return false;
+    if (that instanceof RemoteInterpreterResult)
+      return this.equals((RemoteInterpreterResult)that);
     return false;
   }
 
   public boolean equals(RemoteInterpreterResult that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
 
     boolean this_present_code = true && this.isSetCode();
     boolean that_present_code = true && that.isSetCode();
     if (this_present_code || that_present_code) {
-      if (!(this_present_code && that_present_code)) return false;
-      if (!this.code.equals(that.code)) return false;
+      if (!(this_present_code && that_present_code))
+        return false;
+      if (!this.code.equals(that.code))
+        return false;
     }
 
     boolean this_present_msg = true && this.isSetMsg();
     boolean that_present_msg = true && that.isSetMsg();
     if (this_present_msg || that_present_msg) {
-      if (!(this_present_msg && that_present_msg)) return false;
-      if (!this.msg.equals(that.msg)) return false;
+      if (!(this_present_msg && that_present_msg))
+        return false;
+      if (!this.msg.equals(that.msg))
+        return false;
     }
 
     boolean this_present_config = true && this.isSetConfig();
     boolean that_present_config = true && that.isSetConfig();
     if (this_present_config || that_present_config) {
-      if (!(this_present_config && that_present_config)) return false;
-      if (!this.config.equals(that.config)) return false;
+      if (!(this_present_config && that_present_config))
+        return false;
+      if (!this.config.equals(that.config))
+        return false;
     }
 
     boolean this_present_gui = true && this.isSetGui();
     boolean that_present_gui = true && that.isSetGui();
     if (this_present_gui || that_present_gui) {
-      if (!(this_present_gui && that_present_gui)) return false;
-      if (!this.gui.equals(that.gui)) return false;
+      if (!(this_present_gui && that_present_gui))
+        return false;
+      if (!this.gui.equals(that.gui))
+        return false;
     }
 
     boolean this_present_noteGui = true && this.isSetNoteGui();
     boolean that_present_noteGui = true && that.isSetNoteGui();
     if (this_present_noteGui || that_present_noteGui) {
-      if (!(this_present_noteGui && that_present_noteGui)) return false;
-      if (!this.noteGui.equals(that.noteGui)) return false;
+      if (!(this_present_noteGui && that_present_noteGui))
+        return false;
+      if (!this.noteGui.equals(that.noteGui))
+        return false;
     }
 
     return true;
@@ -523,23 +507,28 @@ public class RemoteInterpreterResult
 
     boolean present_code = true && (isSetCode());
     list.add(present_code);
-    if (present_code) list.add(code);
+    if (present_code)
+      list.add(code);
 
     boolean present_msg = true && (isSetMsg());
     list.add(present_msg);
-    if (present_msg) list.add(msg);
+    if (present_msg)
+      list.add(msg);
 
     boolean present_config = true && (isSetConfig());
     list.add(present_config);
-    if (present_config) list.add(config);
+    if (present_config)
+      list.add(config);
 
     boolean present_gui = true && (isSetGui());
     list.add(present_gui);
-    if (present_gui) list.add(gui);
+    if (present_gui)
+      list.add(gui);
 
     boolean present_noteGui = true && (isSetNoteGui());
     list.add(present_noteGui);
-    if (present_noteGui) list.add(noteGui);
+    if (present_noteGui)
+      list.add(noteGui);
 
     return list.hashCode();
   }
@@ -613,8 +602,7 @@ public class RemoteInterpreterResult
     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
-  public void write(org.apache.thrift.protocol.TProtocol oprot)
-      throws org.apache.thrift.TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
@@ -673,20 +661,15 @@ public class RemoteInterpreterResult
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
     try {
-      write(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(out)));
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in)
-      throws java.io.IOException, ClassNotFoundException {
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
-      read(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(in)));
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
@@ -698,16 +681,15 @@ public class RemoteInterpreterResult
     }
   }
 
-  private static class RemoteInterpreterResultStandardScheme
-      extends StandardScheme<RemoteInterpreterResult> {
+  private static class RemoteInterpreterResultStandardScheme extends StandardScheme<RemoteInterpreterResult> {
 
-    public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteInterpreterResult struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteInterpreterResult struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
       iprot.readStructBegin();
-      while (true) {
+      while (true)
+      {
         schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
           break;
         }
         switch (schemeField.id) {
@@ -715,7 +697,7 @@ public class RemoteInterpreterResult
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.code = iprot.readString();
               struct.setCodeIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -725,7 +707,8 @@ public class RemoteInterpreterResult
                 org.apache.thrift.protocol.TList _list10 = iprot.readListBegin();
                 struct.msg = new ArrayList<RemoteInterpreterResultMessage>(_list10.size);
                 RemoteInterpreterResultMessage _elem11;
-                for (int _i12 = 0; _i12 < _list10.size; ++_i12) {
+                for (int _i12 = 0; _i12 < _list10.size; ++_i12)
+                {
                   _elem11 = new RemoteInterpreterResultMessage();
                   _elem11.read(iprot);
                   struct.msg.add(_elem11);
@@ -733,7 +716,7 @@ public class RemoteInterpreterResult
                 iprot.readListEnd();
               }
               struct.setMsgIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -741,7 +724,7 @@ public class RemoteInterpreterResult
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.config = iprot.readString();
               struct.setConfigIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -749,7 +732,7 @@ public class RemoteInterpreterResult
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.gui = iprot.readString();
               struct.setGuiIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -757,7 +740,7 @@ public class RemoteInterpreterResult
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.noteGui = iprot.readString();
               struct.setNoteGuiIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -772,8 +755,7 @@ public class RemoteInterpreterResult
       struct.validate();
     }
 
-    public void write(org.apache.thrift.protocol.TProtocol oprot, RemoteInterpreterResult struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol oprot, RemoteInterpreterResult struct) throws org.apache.thrift.TException {
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
@@ -785,10 +767,9 @@ public class RemoteInterpreterResult
       if (struct.msg != null) {
         oprot.writeFieldBegin(MSG_FIELD_DESC);
         {
-          oprot.writeListBegin(
-              new org.apache.thrift.protocol.TList(
-                  org.apache.thrift.protocol.TType.STRUCT, struct.msg.size()));
-          for (RemoteInterpreterResultMessage _iter13 : struct.msg) {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.msg.size()));
+          for (RemoteInterpreterResultMessage _iter13 : struct.msg)
+          {
             _iter13.write(oprot);
           }
           oprot.writeListEnd();
@@ -813,6 +794,7 @@ public class RemoteInterpreterResult
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
+
   }
 
   private static class RemoteInterpreterResultTupleSchemeFactory implements SchemeFactory {
@@ -821,12 +803,10 @@ public class RemoteInterpreterResult
     }
   }
 
-  private static class RemoteInterpreterResultTupleScheme
-      extends TupleScheme<RemoteInterpreterResult> {
+  private static class RemoteInterpreterResultTupleScheme extends TupleScheme<RemoteInterpreterResult> {
 
     @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterResult struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterResult struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
       if (struct.isSetCode()) {
@@ -851,7 +831,8 @@ public class RemoteInterpreterResult
       if (struct.isSetMsg()) {
         {
           oprot.writeI32(struct.msg.size());
-          for (RemoteInterpreterResultMessage _iter14 : struct.msg) {
+          for (RemoteInterpreterResultMessage _iter14 : struct.msg)
+          {
             _iter14.write(oprot);
           }
         }
@@ -868,8 +849,7 @@ public class RemoteInterpreterResult
     }
 
     @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterResult struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterResult struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(5);
       if (incoming.get(0)) {
@@ -878,12 +858,11 @@ public class RemoteInterpreterResult
       }
       if (incoming.get(1)) {
         {
-          org.apache.thrift.protocol.TList _list15 =
-              new org.apache.thrift.protocol.TList(
-                  org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          org.apache.thrift.protocol.TList _list15 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
           struct.msg = new ArrayList<RemoteInterpreterResultMessage>(_list15.size);
           RemoteInterpreterResultMessage _elem16;
-          for (int _i17 = 0; _i17 < _list15.size; ++_i17) {
+          for (int _i17 = 0; _i17 < _list15.size; ++_i17)
+          {
             _elem16 = new RemoteInterpreterResultMessage();
             _elem16.read(iprot);
             struct.msg.add(_elem16);
@@ -905,4 +884,6 @@ public class RemoteInterpreterResult
       }
     }
   }
+
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterResultMessage.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterResultMessage.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterResultMessage.java
index 4aa89a4..f88993c 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterResultMessage.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterResultMessage.java
@@ -1,63 +1,64 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2018-8-9")
-public class RemoteInterpreterResultMessage
-    implements org.apache.thrift.TBase<
-            RemoteInterpreterResultMessage, RemoteInterpreterResultMessage._Fields>,
-        java.io.Serializable,
-        Cloneable,
-        Comparable<RemoteInterpreterResultMessage> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
-      new org.apache.thrift.protocol.TStruct("RemoteInterpreterResultMessage");
-
-  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "type", org.apache.thrift.protocol.TType.STRING, (short) 1);
-  private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "data", org.apache.thrift.protocol.TType.STRING, (short) 2);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
-      new HashMap<Class<? extends IScheme>, SchemeFactory>();
+public class RemoteInterpreterResultMessage implements org.apache.thrift.TBase<RemoteInterpreterResultMessage, RemoteInterpreterResultMessage._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteInterpreterResultMessage> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteInterpreterResultMessage");
+
+  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)2);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
     schemes.put(StandardScheme.class, new RemoteInterpreterResultMessageStandardSchemeFactory());
     schemes.put(TupleScheme.class, new RemoteInterpreterResultMessageTupleSchemeFactory());
@@ -66,13 +67,10 @@ public class RemoteInterpreterResultMessage
   public String type; // required
   public String data; // required
 
-  /**
-   * The set of fields this struct contains, along with convenience methods for finding and
-   * manipulating them.
-   */
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    TYPE((short) 1, "type"),
-    DATA((short) 2, "data");
+    TYPE((short)1, "type"),
+    DATA((short)2, "data");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -82,9 +80,11 @@ public class RemoteInterpreterResultMessage
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
     public static _Fields findByThriftId(int fieldId) {
-      switch (fieldId) {
+      switch(fieldId) {
         case 1: // TYPE
           return TYPE;
         case 2: // DATA
@@ -94,15 +94,19 @@ public class RemoteInterpreterResultMessage
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null)
-        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
 
-    /** Find the _Fields constant that matches name, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
@@ -126,38 +130,31 @@ public class RemoteInterpreterResultMessage
 
   // isset id assignments
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
-        new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(
-        _Fields.TYPE,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "type",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.DATA,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "data",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
-        RemoteInterpreterResultMessage.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RemoteInterpreterResultMessage.class, metaDataMap);
   }
 
-  public RemoteInterpreterResultMessage() {}
+  public RemoteInterpreterResultMessage() {
+  }
 
-  public RemoteInterpreterResultMessage(String type, String data) {
+  public RemoteInterpreterResultMessage(
+    String type,
+    String data)
+  {
     this();
     this.type = type;
     this.data = data;
   }
 
-  /** Performs a deep copy on <i>other</i>. */
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
   public RemoteInterpreterResultMessage(RemoteInterpreterResultMessage other) {
     if (other.isSetType()) {
       this.type = other.type;
@@ -227,76 +224,81 @@ public class RemoteInterpreterResultMessage
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-      case TYPE:
-        if (value == null) {
-          unsetType();
-        } else {
-          setType((String) value);
-        }
-        break;
+    case TYPE:
+      if (value == null) {
+        unsetType();
+      } else {
+        setType((String)value);
+      }
+      break;
+
+    case DATA:
+      if (value == null) {
+        unsetData();
+      } else {
+        setData((String)value);
+      }
+      break;
 
-      case DATA:
-        if (value == null) {
-          unsetData();
-        } else {
-          setData((String) value);
-        }
-        break;
     }
   }
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-      case TYPE:
-        return getType();
+    case TYPE:
+      return getType();
+
+    case DATA:
+      return getData();
 
-      case DATA:
-        return getData();
     }
     throw new IllegalStateException();
   }
 
-  /**
-   * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
-   * otherwise
-   */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
     }
 
     switch (field) {
-      case TYPE:
-        return isSetType();
-      case DATA:
-        return isSetData();
+    case TYPE:
+      return isSetType();
+    case DATA:
+      return isSetData();
     }
     throw new IllegalStateException();
   }
 
   @Override
   public boolean equals(Object that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
     if (that instanceof RemoteInterpreterResultMessage)
-      return this.equals((RemoteInterpreterResultMessage) that);
+      return this.equals((RemoteInterpreterResultMessage)that);
     return false;
   }
 
   public boolean equals(RemoteInterpreterResultMessage that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
 
     boolean this_present_type = true && this.isSetType();
     boolean that_present_type = true && that.isSetType();
     if (this_present_type || that_present_type) {
-      if (!(this_present_type && that_present_type)) return false;
-      if (!this.type.equals(that.type)) return false;
+      if (!(this_present_type && that_present_type))
+        return false;
+      if (!this.type.equals(that.type))
+        return false;
     }
 
     boolean this_present_data = true && this.isSetData();
     boolean that_present_data = true && that.isSetData();
     if (this_present_data || that_present_data) {
-      if (!(this_present_data && that_present_data)) return false;
-      if (!this.data.equals(that.data)) return false;
+      if (!(this_present_data && that_present_data))
+        return false;
+      if (!this.data.equals(that.data))
+        return false;
     }
 
     return true;
@@ -308,11 +310,13 @@ public class RemoteInterpreterResultMessage
 
     boolean present_type = true && (isSetType());
     list.add(present_type);
-    if (present_type) list.add(type);
+    if (present_type)
+      list.add(type);
 
     boolean present_data = true && (isSetData());
     list.add(present_data);
-    if (present_data) list.add(data);
+    if (present_data)
+      list.add(data);
 
     return list.hashCode();
   }
@@ -356,8 +360,7 @@ public class RemoteInterpreterResultMessage
     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
-  public void write(org.apache.thrift.protocol.TProtocol oprot)
-      throws org.apache.thrift.TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
@@ -392,43 +395,35 @@ public class RemoteInterpreterResultMessage
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
     try {
-      write(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(out)));
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in)
-      throws java.io.IOException, ClassNotFoundException {
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
-      read(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(in)));
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
   }
 
-  private static class RemoteInterpreterResultMessageStandardSchemeFactory
-      implements SchemeFactory {
+  private static class RemoteInterpreterResultMessageStandardSchemeFactory implements SchemeFactory {
     public RemoteInterpreterResultMessageStandardScheme getScheme() {
       return new RemoteInterpreterResultMessageStandardScheme();
     }
   }
 
-  private static class RemoteInterpreterResultMessageStandardScheme
-      extends StandardScheme<RemoteInterpreterResultMessage> {
+  private static class RemoteInterpreterResultMessageStandardScheme extends StandardScheme<RemoteInterpreterResultMessage> {
 
-    public void read(
-        org.apache.thrift.protocol.TProtocol iprot, RemoteInterpreterResultMessage struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteInterpreterResultMessage struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
       iprot.readStructBegin();
-      while (true) {
+      while (true)
+      {
         schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
           break;
         }
         switch (schemeField.id) {
@@ -436,7 +431,7 @@ public class RemoteInterpreterResultMessage
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.type = iprot.readString();
               struct.setTypeIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -444,7 +439,7 @@ public class RemoteInterpreterResultMessage
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.data = iprot.readString();
               struct.setDataIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -459,9 +454,7 @@ public class RemoteInterpreterResultMessage
       struct.validate();
     }
 
-    public void write(
-        org.apache.thrift.protocol.TProtocol oprot, RemoteInterpreterResultMessage struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol oprot, RemoteInterpreterResultMessage struct) throws org.apache.thrift.TException {
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
@@ -478,6 +471,7 @@ public class RemoteInterpreterResultMessage
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
+
   }
 
   private static class RemoteInterpreterResultMessageTupleSchemeFactory implements SchemeFactory {
@@ -486,13 +480,10 @@ public class RemoteInterpreterResultMessage
     }
   }
 
-  private static class RemoteInterpreterResultMessageTupleScheme
-      extends TupleScheme<RemoteInterpreterResultMessage> {
+  private static class RemoteInterpreterResultMessageTupleScheme extends TupleScheme<RemoteInterpreterResultMessage> {
 
     @Override
-    public void write(
-        org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterResultMessage struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterResultMessage struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
       if (struct.isSetType()) {
@@ -511,9 +502,7 @@ public class RemoteInterpreterResultMessage
     }
 
     @Override
-    public void read(
-        org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterResultMessage struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterResultMessage struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(2);
       if (incoming.get(0)) {
@@ -526,4 +515,6 @@ public class RemoteInterpreterResultMessage
       }
     }
   }
+
 }
+


[14/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 8606a74..a3fce8f 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
@@ -20,26 +20,6 @@ import com.google.common.base.Strings;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.reflect.TypeToken;
-import java.io.IOException;
-import java.lang.reflect.Type;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-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.Set;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import javax.servlet.http.HttpServletRequest;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang3.exception.ExceptionUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
@@ -93,16 +73,41 @@ import org.quartz.SchedulerException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Zeppelin websocket service. */
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.net.URISyntaxException;
+import java.net.UnknownHostException;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+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.Set;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Zeppelin websocket service.
+ */
 public class NotebookServer extends WebSocketServlet
     implements NotebookSocketListener,
-        AngularObjectRegistryListener,
-        RemoteInterpreterProcessListener,
-        ApplicationEventListener,
-        ParagraphJobListener,
-        NotebookServerMBean {
+    AngularObjectRegistryListener,
+    RemoteInterpreterProcessListener,
+    ApplicationEventListener,
+    ParagraphJobListener,
+    NotebookServerMBean {
 
-  /** Job manager service type. */
+  /**
+   * Job manager service type.
+   */
   protected enum JobManagerServiceType {
     JOB_MANAGER_PAGE("JOB_MANAGER_PAGE");
     private String serviceTypeKey;
@@ -116,17 +121,17 @@ public class NotebookServer extends WebSocketServlet
     }
   }
 
+
   //  private HashSet<String> collaborativeModeList = new HashSet<>();
-  private Boolean collaborativeModeEnable =
-      ZeppelinConfiguration.create().isZeppelinNotebookCollaborativeModeEnable();
+  private Boolean collaborativeModeEnable = ZeppelinConfiguration
+      .create()
+      .isZeppelinNotebookCollaborativeModeEnable();
   private static final Logger LOG = LoggerFactory.getLogger(NotebookServer.class);
-  private static Gson gson =
-      new GsonBuilder()
-          .setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
-          .registerTypeAdapter(Date.class, new NotebookImportDeserializer())
-          .setPrettyPrinting()
-          .registerTypeAdapterFactory(Input.TypeAdapterFactory)
-          .create();
+  private static Gson gson = new GsonBuilder()
+      .setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
+      .registerTypeAdapter(Date.class, new NotebookImportDeserializer())
+      .setPrettyPrinting()
+      .registerTypeAdapterFactory(Input.TypeAdapterFactory).create();
 
   private ConnectionManager connectionManager;
   private NotebookService notebookService;
@@ -135,6 +140,7 @@ public class NotebookServer extends WebSocketServlet
 
   private ExecutorService executorService = Executors.newFixedThreadPool(10);
 
+
   public NotebookServer() {
     this.connectionManager = new ConnectionManager();
   }
@@ -190,41 +196,28 @@ public class NotebookServer extends WebSocketServlet
     try {
       Message messagereceived = deserializeMessage(msg);
       if (messagereceived.op != OP.PING) {
-        LOG.debug(
-            "RECEIVE: "
-                + messagereceived.op
-                + ", RECEIVE PRINCIPAL: "
-                + messagereceived.principal
-                + ", RECEIVE TICKET: "
-                + messagereceived.ticket
-                + ", RECEIVE ROLES: "
-                + messagereceived.roles
-                + ", RECEIVE DATA: "
-                + messagereceived.data);
+        LOG.debug("RECEIVE: " + messagereceived.op +
+            ", RECEIVE PRINCIPAL: " + messagereceived.principal +
+            ", RECEIVE TICKET: " + messagereceived.ticket +
+            ", RECEIVE ROLES: " + messagereceived.roles +
+            ", RECEIVE DATA: " + messagereceived.data);
       }
       if (LOG.isTraceEnabled()) {
         LOG.trace("RECEIVE MSG = " + messagereceived);
       }
 
       String ticket = TicketContainer.instance.getTicket(messagereceived.principal);
-      if (ticket != null
-          && (messagereceived.ticket == null || !ticket.equals(messagereceived.ticket))) {
+      if (ticket != null &&
+          (messagereceived.ticket == null || !ticket.equals(messagereceived.ticket))) {
         /* not to pollute logs, log instead of exception */
         if (StringUtils.isEmpty(messagereceived.ticket)) {
-          LOG.debug(
-              "{} message: invalid ticket {} != {}",
-              messagereceived.op,
-              messagereceived.ticket,
-              ticket);
+          LOG.debug("{} message: invalid ticket {} != {}", messagereceived.op,
+              messagereceived.ticket, ticket);
         } else {
           if (!messagereceived.op.equals(OP.PING)) {
-            conn.send(
-                serializeMessage(
-                    new Message(OP.SESSION_LOGOUT)
-                        .put(
-                            "info",
-                            "Your ticket is invalid possibly due to server restart. "
-                                + "Please login again.")));
+            conn.send(serializeMessage(new Message(OP.SESSION_LOGOUT).put("info",
+                "Your ticket is invalid possibly due to server restart. "
+                    + "Please login again.")));
           }
         }
         return;
@@ -240,7 +233,8 @@ public class NotebookServer extends WebSocketServlet
       userAndRoles.add(messagereceived.principal);
       if (!messagereceived.roles.equals("")) {
         HashSet<String> roles =
-            gson.fromJson(messagereceived.roles, new TypeToken<HashSet<String>>() {}.getType());
+            gson.fromJson(messagereceived.roles, new TypeToken<HashSet<String>>() {
+            }.getType());
         if (roles != null) {
           userAndRoles.addAll(roles);
         }
@@ -249,8 +243,8 @@ public class NotebookServer extends WebSocketServlet
         connectionManager.addUserConnection(messagereceived.principal, conn);
       }
       AuthenticationInfo subject =
-          new AuthenticationInfo(
-              messagereceived.principal, messagereceived.roles, messagereceived.ticket);
+          new AuthenticationInfo(messagereceived.principal, messagereceived.roles,
+              messagereceived.ticket);
 
       // Lets be elegant here
       switch (messagereceived.op) {
@@ -348,7 +342,7 @@ public class NotebookServer extends WebSocketServlet
           completion(conn, messagereceived);
           break;
         case PING:
-          break; // do nothing
+          break; //do nothing
         case ANGULAR_OBJECT_UPDATED:
           angularObjectUpdated(conn, userAndRoles, notebook, messagereceived);
           break;
@@ -438,54 +432,44 @@ public class NotebookServer extends WebSocketServlet
   public void unicastNoteJobInfo(NotebookSocket conn, Message fromMessage) throws IOException {
 
     connectionManager.addNoteConnection(JobManagerServiceType.JOB_MANAGER_PAGE.getKey(), conn);
-    getJobManagerService()
-        .getNoteJobInfoByUnixTime(
-            0,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<List<JobManagerService.NoteJobInfo>>(conn) {
-              @Override
-              public void onSuccess(
-                  List<JobManagerService.NoteJobInfo> notesJobInfo, ServiceContext context)
-                  throws IOException {
-                super.onSuccess(notesJobInfo, context);
-                Map<String, Object> response = new HashMap<>();
-                response.put("lastResponseUnixTime", System.currentTimeMillis());
-                response.put("jobs", notesJobInfo);
-                conn.send(
-                    serializeMessage(new Message(OP.LIST_NOTE_JOBS).put("noteJobs", response)));
-              }
+    getJobManagerService().getNoteJobInfoByUnixTime(0, getServiceContext(fromMessage),
+        new WebSocketServiceCallback<List<JobManagerService.NoteJobInfo>>(conn) {
+          @Override
+          public void onSuccess(List<JobManagerService.NoteJobInfo> notesJobInfo,
+                                ServiceContext context) throws IOException {
+            super.onSuccess(notesJobInfo, context);
+            Map<String, Object> response = new HashMap<>();
+            response.put("lastResponseUnixTime", System.currentTimeMillis());
+            response.put("jobs", notesJobInfo);
+            conn.send(serializeMessage(new Message(OP.LIST_NOTE_JOBS).put("noteJobs", response)));
+          }
 
-              @Override
-              public void onFailure(Exception ex, ServiceContext context) throws IOException {
-                LOG.warn(ex.getMessage());
-              }
-            });
+          @Override
+          public void onFailure(Exception ex, ServiceContext context) throws IOException {
+            LOG.warn(ex.getMessage());
+          }
+        });
   }
 
   public void broadcastUpdateNoteJobInfo(long lastUpdateUnixTime) throws IOException {
-    getJobManagerService()
-        .getNoteJobInfoByUnixTime(
-            lastUpdateUnixTime,
-            null,
-            new WebSocketServiceCallback<List<JobManagerService.NoteJobInfo>>(null) {
-              @Override
-              public void onSuccess(
-                  List<JobManagerService.NoteJobInfo> notesJobInfo, ServiceContext context)
-                  throws IOException {
-                super.onSuccess(notesJobInfo, context);
-                Map<String, Object> response = new HashMap<>();
-                response.put("lastResponseUnixTime", System.currentTimeMillis());
-                response.put("jobs", notesJobInfo);
-                connectionManager.broadcast(
-                    JobManagerServiceType.JOB_MANAGER_PAGE.getKey(),
-                    new Message(OP.LIST_UPDATE_NOTE_JOBS).put("noteRunningJobs", response));
-              }
+    getJobManagerService().getNoteJobInfoByUnixTime(lastUpdateUnixTime, null,
+        new WebSocketServiceCallback<List<JobManagerService.NoteJobInfo>>(null) {
+          @Override
+          public void onSuccess(List<JobManagerService.NoteJobInfo> notesJobInfo,
+                                ServiceContext context) throws IOException {
+            super.onSuccess(notesJobInfo, context);
+            Map<String, Object> response = new HashMap<>();
+            response.put("lastResponseUnixTime", System.currentTimeMillis());
+            response.put("jobs", notesJobInfo);
+            connectionManager.broadcast(JobManagerServiceType.JOB_MANAGER_PAGE.getKey(),
+                new Message(OP.LIST_UPDATE_NOTE_JOBS).put("noteRunningJobs", response));
+          }
 
-              @Override
-              public void onFailure(Exception ex, ServiceContext context) throws IOException {
-                LOG.warn(ex.getMessage());
-              }
-            });
+          @Override
+          public void onFailure(Exception ex, ServiceContext context) throws IOException {
+            LOG.warn(ex.getMessage());
+          }
+        });
   }
 
   public void unsubscribeNoteJobInfo(NotebookSocket conn) {
@@ -496,13 +480,13 @@ public class NotebookServer extends WebSocketServlet
     String noteId = (String) fromMessage.data.get("noteId");
     List<InterpreterSettingsList> settingList =
         InterpreterBindingUtils.getInterpreterBindings(notebook(), noteId);
-    conn.send(
-        serializeMessage(
-            new Message(OP.INTERPRETER_BINDINGS).put("interpreterBindings", settingList)));
+    conn.send(serializeMessage(
+        new Message(OP.INTERPRETER_BINDINGS).put("interpreterBindings", settingList)));
   }
 
-  public List<Map<String, String>> generateNotesInfo(
-      boolean needsReload, AuthenticationInfo subject, Set<String> userAndRoles) {
+  public List<Map<String, String>> generateNotesInfo(boolean needsReload,
+                                                     AuthenticationInfo subject,
+                                                     Set<String> userAndRoles) {
     Notebook notebook = notebook();
 
     ZeppelinConfiguration conf = notebook.getConf();
@@ -545,18 +529,17 @@ public class NotebookServer extends WebSocketServlet
     if (note.isPersonalizedMode()) {
       broadcastParagraphs(p.getUserParagraphMap(), p);
     } else {
-      connectionManager.broadcast(
-          note.getId(),
+      connectionManager.broadcast(note.getId(),
           new Message(OP.PARAGRAPH).put("paragraph", new ParagraphWithRuntimeInfo(p)));
     }
   }
 
-  public void broadcastParagraphs(
-      Map<String, Paragraph> userParagraphMap, Paragraph defaultParagraph) {
+  public void broadcastParagraphs(Map<String, Paragraph> userParagraphMap,
+                                  Paragraph defaultParagraph) {
     if (null != userParagraphMap) {
       for (String user : userParagraphMap.keySet()) {
-        connectionManager.multicastToUser(
-            user, new Message(OP.PARAGRAPH).put("paragraph", userParagraphMap.get(user)));
+        connectionManager.multicastToUser(user,
+            new Message(OP.PARAGRAPH).put("paragraph", userParagraphMap.get(user)));
       }
     }
   }
@@ -564,8 +547,7 @@ public class NotebookServer extends WebSocketServlet
   private void broadcastNewParagraph(Note note, Paragraph para) {
     LOG.info("Broadcasting paragraph on run call instead of note.");
     int paraIndex = note.getParagraphs().indexOf(para);
-    connectionManager.broadcast(
-        note.getId(),
+    connectionManager.broadcast(note.getId(),
         new Message(OP.PARAGRAPH_ADDED).put("paragraph", para).put("index", paraIndex));
   }
 
@@ -573,152 +555,125 @@ public class NotebookServer extends WebSocketServlet
     if (subject == null) {
       subject = new AuthenticationInfo(StringUtils.EMPTY);
     }
-    // send first to requesting user
+    //send first to requesting user
     List<Map<String, String>> notesInfo = generateNotesInfo(false, subject, userAndRoles);
-    connectionManager.multicastToUser(
-        subject.getUser(), new Message(OP.NOTES_INFO).put("notes", notesInfo));
-    // to others afterwards
+    connectionManager.multicastToUser(subject.getUser(),
+        new Message(OP.NOTES_INFO).put("notes", notesInfo));
+    //to others afterwards
     connectionManager.broadcastNoteListExcept(notesInfo, subject);
   }
 
   public void listNotes(NotebookSocket conn, Message message) throws IOException {
-    getNotebookService()
-        .listNotes(
-            false,
-            getServiceContext(message),
-            new WebSocketServiceCallback<List<Map<String, String>>>(conn) {
-              @Override
-              public void onSuccess(List<Map<String, String>> notesInfo, ServiceContext context)
-                  throws IOException {
-                super.onSuccess(notesInfo, context);
-                connectionManager.unicast(new Message(OP.NOTES_INFO).put("notes", notesInfo), conn);
-              }
-            });
+    getNotebookService().listNotes(false, getServiceContext(message),
+        new WebSocketServiceCallback<List<Map<String, String>>>(conn) {
+          @Override
+          public void onSuccess(List<Map<String, String>> notesInfo,
+                                ServiceContext context) throws IOException {
+            super.onSuccess(notesInfo, context);
+            connectionManager.unicast(new Message(OP.NOTES_INFO).put("notes", notesInfo), conn);
+          }
+        });
   }
 
   public void broadcastReloadedNoteList(NotebookSocket conn, ServiceContext context)
       throws IOException {
-    getNotebookService()
-        .listNotes(
-            false,
-            context,
-            new WebSocketServiceCallback<List<Map<String, String>>>(conn) {
-              @Override
-              public void onSuccess(List<Map<String, String>> notesInfo, ServiceContext context)
-                  throws IOException {
-                super.onSuccess(notesInfo, context);
-                connectionManager.multicastToUser(
-                    context.getAutheInfo().getUser(),
-                    new Message(OP.NOTES_INFO).put("notes", notesInfo));
-                // to others afterwards
-                connectionManager.broadcastNoteListExcept(notesInfo, context.getAutheInfo());
-              }
-            });
+    getNotebookService().listNotes(false, context,
+        new WebSocketServiceCallback<List<Map<String, String>>>(conn) {
+          @Override
+          public void onSuccess(List<Map<String, String>> notesInfo,
+                                ServiceContext context) throws IOException {
+            super.onSuccess(notesInfo, context);
+            connectionManager.multicastToUser(context.getAutheInfo().getUser(),
+                new Message(OP.NOTES_INFO).put("notes", notesInfo));
+            //to others afterwards
+            connectionManager.broadcastNoteListExcept(notesInfo, context.getAutheInfo());
+          }
+        });
   }
 
-  void permissionError(
-      NotebookSocket conn,
-      String op,
-      String userName,
-      Set<String> userAndRoles,
-      Set<String> allowed)
-      throws IOException {
+  void permissionError(NotebookSocket conn, String op, String userName, Set<String> userAndRoles,
+                       Set<String> allowed) throws IOException {
     LOG.info("Cannot {}. Connection readers {}. Allowed readers {}", op, userAndRoles, allowed);
 
-    conn.send(
-        serializeMessage(
-            new Message(OP.AUTH_INFO)
-                .put(
-                    "info",
-                    "Insufficient privileges to "
-                        + op
-                        + " note.\n\n"
-                        + "Allowed users or roles: "
-                        + allowed.toString()
-                        + "\n\n"
-                        + "But the user "
-                        + userName
-                        + " belongs to: "
-                        + userAndRoles.toString())));
-  }
-
-  /** @return false if user doesn't have writer permission for this paragraph */
-  private boolean hasParagraphWriterPermission(
-      NotebookSocket conn,
-      Notebook notebook,
-      String noteId,
-      HashSet<String> userAndRoles,
-      String principal,
-      String op)
+    conn.send(serializeMessage(new Message(OP.AUTH_INFO).put("info",
+        "Insufficient privileges to " + op + " note.\n\n" + "Allowed users or roles: " + allowed
+            .toString() + "\n\n" + "But the user " + userName + " belongs to: " + userAndRoles
+            .toString())));
+  }
+
+
+  /**
+   * @return false if user doesn't have writer permission for this paragraph
+   */
+  private boolean hasParagraphWriterPermission(NotebookSocket conn, Notebook notebook,
+                                               String noteId, HashSet<String> userAndRoles,
+                                               String principal, String op)
       throws IOException {
     NotebookAuthorization notebookAuthorization = notebook.getNotebookAuthorization();
     if (!notebookAuthorization.isWriter(noteId, userAndRoles)) {
-      permissionError(conn, op, principal, userAndRoles, notebookAuthorization.getOwners(noteId));
+      permissionError(conn, op, principal, userAndRoles,
+          notebookAuthorization.getOwners(noteId));
       return false;
     }
 
     return true;
   }
 
-  /** @return false if user doesn't have owner permission for this paragraph */
-  private boolean hasParagraphOwnerPermission(
-      NotebookSocket conn,
-      Notebook notebook,
-      String noteId,
-      HashSet<String> userAndRoles,
-      String principal,
-      String op)
-      throws IOException {
+  /**
+   * @return false if user doesn't have owner permission for this paragraph
+   */
+  private boolean hasParagraphOwnerPermission(NotebookSocket conn, Notebook notebook, String noteId,
+                                              HashSet<String> userAndRoles, String principal,
+                                              String op) throws IOException {
     NotebookAuthorization notebookAuthorization = notebook.getNotebookAuthorization();
     if (!notebookAuthorization.isOwner(noteId, userAndRoles)) {
-      permissionError(conn, op, principal, userAndRoles, notebookAuthorization.getOwners(noteId));
+      permissionError(conn, op, principal, userAndRoles,
+          notebookAuthorization.getOwners(noteId));
       return false;
     }
 
     return true;
   }
 
-  private void getNote(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void getNote(NotebookSocket conn,
+                       Message fromMessage) throws IOException {
     String noteId = (String) fromMessage.get("id");
     if (noteId == null) {
       return;
     }
-    getNotebookService()
-        .getNote(
-            noteId,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<Note>(conn) {
-              @Override
-              public void onSuccess(Note note, ServiceContext context) throws IOException {
-                connectionManager.addNoteConnection(note.getId(), conn);
-                conn.send(serializeMessage(new Message(OP.NOTE).put("note", note)));
-                sendAllAngularObjects(note, context.getAutheInfo().getUser(), conn);
-              }
-            });
-  }
-
-  private void getHomeNote(NotebookSocket conn, Message fromMessage) throws IOException {
-
-    getNotebookService()
-        .getHomeNote(
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<Note>(conn) {
-              @Override
-              public void onSuccess(Note note, ServiceContext context) throws IOException {
-                super.onSuccess(note, context);
-                if (note != null) {
-                  connectionManager.addNoteConnection(note.getId(), conn);
-                  conn.send(serializeMessage(new Message(OP.NOTE).put("note", note)));
-                  sendAllAngularObjects(note, context.getAutheInfo().getUser(), conn);
-                } else {
-                  connectionManager.removeConnectionFromAllNote(conn);
-                  conn.send(serializeMessage(new Message(OP.NOTE).put("note", null)));
-                }
-              }
-            });
+    getNotebookService().getNote(noteId, getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Note>(conn) {
+          @Override
+          public void onSuccess(Note note, ServiceContext context) throws IOException {
+            connectionManager.addNoteConnection(note.getId(), conn);
+            conn.send(serializeMessage(new Message(OP.NOTE).put("note", note)));
+            sendAllAngularObjects(note, context.getAutheInfo().getUser(), conn);
+          }
+        });
+  }
+
+  private void getHomeNote(NotebookSocket conn,
+                           Message fromMessage) throws IOException {
+
+    getNotebookService().getHomeNote(getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Note>(conn) {
+          @Override
+          public void onSuccess(Note note, ServiceContext context) throws IOException {
+            super.onSuccess(note, context);
+            if (note != null) {
+              connectionManager.addNoteConnection(note.getId(), conn);
+              conn.send(serializeMessage(new Message(OP.NOTE).put("note", note)));
+              sendAllAngularObjects(note, context.getAutheInfo().getUser(), conn);
+            } else {
+              connectionManager.removeConnectionFromAllNote(conn);
+              conn.send(serializeMessage(new Message(OP.NOTE).put("note", null)));
+            }
+          }
+        });
   }
 
-  private void updateNote(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void updateNote(NotebookSocket conn,
+                          Message fromMessage) throws IOException {
     String noteId = (String) fromMessage.get("id");
     String name = (String) fromMessage.get("name");
     Map<String, Object> config = (Map<String, Object>) fromMessage.get("config");
@@ -729,29 +684,20 @@ public class NotebookServer extends WebSocketServlet
       return;
     }
 
-    getNotebookService()
-        .updateNote(
-            noteId,
-            name,
-            config,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<Note>(conn) {
-              @Override
-              public void onSuccess(Note note, ServiceContext context) throws IOException {
-                connectionManager.broadcast(
-                    note.getId(),
-                    new Message(OP.NOTE_UPDATED)
-                        .put("name", name)
-                        .put("config", config)
-                        .put("info", note.getInfo()));
-                broadcastNoteList(context.getAutheInfo(), context.getUserAndRoles());
-              }
-            });
+    getNotebookService().updateNote(noteId, name, config, getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Note>(conn) {
+          @Override
+          public void onSuccess(Note note, ServiceContext context) throws IOException {
+            connectionManager.broadcast(note.getId(), new Message(OP.NOTE_UPDATED).put("name", name)
+                .put("config", config)
+                .put("info", note.getInfo()));
+            broadcastNoteList(context.getAutheInfo(), context.getUserAndRoles());
+          }
+        });
   }
 
-  private void updatePersonalizedMode(
-      NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook, Message fromMessage)
-      throws IOException {
+  private void updatePersonalizedMode(NotebookSocket conn, HashSet<String> userAndRoles,
+                                      Notebook notebook, Message fromMessage) throws IOException {
     String noteId = (String) fromMessage.get("id");
     String personalized = (String) fromMessage.get("personalized");
     boolean isPersonalized = personalized.equals("true") ? true : false;
@@ -760,8 +706,8 @@ public class NotebookServer extends WebSocketServlet
       return;
     }
 
-    if (!hasParagraphOwnerPermission(
-        conn, notebook, noteId, userAndRoles, fromMessage.principal, "persoanlized")) {
+    if (!hasParagraphOwnerPermission(conn, notebook, noteId,
+        userAndRoles, fromMessage.principal, "persoanlized")) {
       return;
     }
 
@@ -774,40 +720,31 @@ public class NotebookServer extends WebSocketServlet
     }
   }
 
-  private void renameNote(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void renameNote(NotebookSocket conn,
+                          Message fromMessage) throws IOException {
     String noteId = (String) fromMessage.get("id");
     String name = (String) fromMessage.get("name");
     if (noteId == null) {
       return;
     }
-    getNotebookService()
-        .renameNote(
-            noteId,
-            name,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<Note>(conn) {
-              @Override
-              public void onSuccess(Note note, ServiceContext context) throws IOException {
-                super.onSuccess(note, context);
-                broadcastNote(note);
-                broadcastNoteList(context.getAutheInfo(), context.getUserAndRoles());
-              }
-            });
+    getNotebookService().renameNote(noteId, name, getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Note>(conn) {
+          @Override
+          public void onSuccess(Note note, ServiceContext context) throws IOException {
+            super.onSuccess(note, context);
+            broadcastNote(note);
+            broadcastNoteList(context.getAutheInfo(), context.getUserAndRoles());
+          }
+        });
   }
 
-  private void renameFolder(
-      NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook, Message fromMessage)
-      throws IOException {
+  private void renameFolder(NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook,
+                            Message fromMessage) throws IOException {
     renameFolder(conn, userAndRoles, notebook, fromMessage, "rename");
   }
 
-  private void renameFolder(
-      NotebookSocket conn,
-      HashSet<String> userAndRoles,
-      Notebook notebook,
-      Message fromMessage,
-      String op)
-      throws IOException {
+  private void renameFolder(NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook,
+                            Message fromMessage, String op) throws IOException {
     String oldFolderId = (String) fromMessage.get("id");
     String newFolderId = (String) fromMessage.get("name");
 
@@ -817,13 +754,8 @@ public class NotebookServer extends WebSocketServlet
 
     for (Note note : notebook.getNotesUnderFolder(oldFolderId)) {
       String noteId = note.getId();
-      if (!hasParagraphOwnerPermission(
-          conn,
-          notebook,
-          noteId,
-          userAndRoles,
-          fromMessage.principal,
-          op + " folder of '" + note.getName() + "'")) {
+      if (!hasParagraphOwnerPermission(conn, notebook, noteId,
+          userAndRoles, fromMessage.principal, op + " folder of '" + note.getName() + "'")) {
         return;
       }
     }
@@ -843,57 +775,47 @@ public class NotebookServer extends WebSocketServlet
     }
   }
 
-  private void createNote(NotebookSocket conn, Message message) throws IOException {
+  private void createNote(NotebookSocket conn,
+                          Message message) throws IOException {
 
     String noteName = (String) message.get("name");
     String defaultInterpreterGroup = (String) message.get("defaultInterpreterGroup");
 
-    getNotebookService()
-        .createNote(
-            noteName,
-            defaultInterpreterGroup,
-            getServiceContext(message),
-            new WebSocketServiceCallback<Note>(conn) {
-              @Override
-              public void onSuccess(Note note, ServiceContext context) throws IOException {
-                super.onSuccess(note, context);
-                connectionManager.addNoteConnection(note.getId(), conn);
-                conn.send(serializeMessage(new Message(OP.NEW_NOTE).put("note", note)));
-                broadcastNoteList(context.getAutheInfo(), context.getUserAndRoles());
-              }
+    getNotebookService().createNote(noteName, defaultInterpreterGroup, getServiceContext(message),
+        new WebSocketServiceCallback<Note>(conn) {
+          @Override
+          public void onSuccess(Note note, ServiceContext context) throws IOException {
+            super.onSuccess(note, context);
+            connectionManager.addNoteConnection(note.getId(), conn);
+            conn.send(serializeMessage(new Message(OP.NEW_NOTE).put("note", note)));
+            broadcastNoteList(context.getAutheInfo(), context.getUserAndRoles());
+          }
 
-              @Override
-              public void onFailure(Exception ex, ServiceContext context) throws IOException {
-                super.onFailure(ex, context);
-                conn.send(
-                    serializeMessage(
-                        new Message(OP.ERROR_INFO)
-                            .put(
-                                "info",
-                                "Failed to create note.\n" + ExceptionUtils.getMessage(ex))));
-              }
-            });
+          @Override
+          public void onFailure(Exception ex, ServiceContext context) throws IOException {
+            super.onFailure(ex, context);
+            conn.send(serializeMessage(new Message(OP.ERROR_INFO).put("info",
+                "Failed to create note.\n" + ExceptionUtils.getMessage(ex))));
+          }
+        });
   }
 
-  private void deleteNote(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void deleteNote(NotebookSocket conn,
+                          Message fromMessage) throws IOException {
     String noteId = (String) fromMessage.get("id");
-    getNotebookService()
-        .removeNote(
-            noteId,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<String>(conn) {
-              @Override
-              public void onSuccess(String message, ServiceContext context) throws IOException {
-                super.onSuccess(message, context);
-                connectionManager.removeNoteConnection(noteId);
-                broadcastNoteList(context.getAutheInfo(), context.getUserAndRoles());
-              }
-            });
+    getNotebookService().removeNote(noteId, getServiceContext(fromMessage),
+        new WebSocketServiceCallback<String>(conn) {
+          @Override
+          public void onSuccess(String message, ServiceContext context) throws IOException {
+            super.onSuccess(message, context);
+            connectionManager.removeNoteConnection(noteId);
+            broadcastNoteList(context.getAutheInfo(), context.getUserAndRoles());
+          }
+        });
   }
 
-  private void removeFolder(
-      NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook, Message fromMessage)
-      throws IOException {
+  private void removeFolder(NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook,
+                            Message fromMessage) throws IOException {
     String folderId = (String) fromMessage.get("id");
     if (folderId == null) {
       return;
@@ -903,13 +825,8 @@ public class NotebookServer extends WebSocketServlet
     for (Note note : notes) {
       String noteId = note.getId();
 
-      if (!hasParagraphOwnerPermission(
-          conn,
-          notebook,
-          noteId,
-          userAndRoles,
-          fromMessage.principal,
-          "remove folder of '" + note.getName() + "'")) {
+      if (!hasParagraphOwnerPermission(conn, notebook, noteId,
+          userAndRoles, fromMessage.principal, "remove folder of '" + note.getName() + "'")) {
         return;
       }
     }
@@ -922,9 +839,8 @@ public class NotebookServer extends WebSocketServlet
     broadcastNoteList(subject, userAndRoles);
   }
 
-  private void moveNoteToTrash(
-      NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook, Message fromMessage)
-      throws SchedulerException, IOException {
+  private void moveNoteToTrash(NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook,
+                               Message fromMessage) throws SchedulerException, IOException {
     String noteId = (String) fromMessage.get("id");
     if (noteId == null) {
       return;
@@ -945,8 +861,8 @@ public class NotebookServer extends WebSocketServlet
     }
   }
 
-  private void moveFolderToTrash(
-      NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook, Message fromMessage)
+  private void moveFolderToTrash(NotebookSocket conn, HashSet<String> userAndRoles,
+                                 Notebook notebook, Message fromMessage)
       throws SchedulerException, IOException {
     String folderId = (String) fromMessage.get("id");
     if (folderId == null) {
@@ -975,15 +891,16 @@ public class NotebookServer extends WebSocketServlet
     }
   }
 
-  private void restoreNote(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void restoreNote(NotebookSocket conn,
+                           Message fromMessage) throws IOException {
     String noteId = (String) fromMessage.get("id");
-    getNotebookService()
-        .restoreNote(noteId, getServiceContext(fromMessage), new WebSocketServiceCallback(conn));
+    getNotebookService().restoreNote(noteId, getServiceContext(fromMessage),
+        new WebSocketServiceCallback(conn));
+
   }
 
-  private void restoreFolder(
-      NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook, Message fromMessage)
-      throws IOException {
+  private void restoreFolder(NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook,
+                             Message fromMessage) throws IOException {
     String folderId = (String) fromMessage.get("id");
 
     if (folderId == null) {
@@ -994,7 +911,7 @@ 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
+      //restore cron for each paragraph
       List<Note> noteList = folder.getNotesRecursively();
       for (Note note : noteList) {
         Map<String, Object> config = note.getConfig();
@@ -1013,9 +930,8 @@ public class NotebookServer extends WebSocketServlet
     }
   }
 
-  private void restoreAll(
-      NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook, Message fromMessage)
-      throws IOException {
+  private void restoreAll(NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook,
+                          Message fromMessage) throws IOException {
     Folder trashFolder = notebook.getFolder(Folder.TRASH_FOLDER_ID);
     if (trashFolder != null) {
       fromMessage.data = new HashMap<>();
@@ -1025,15 +941,15 @@ public class NotebookServer extends WebSocketServlet
     }
   }
 
-  private void emptyTrash(
-      NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook, Message fromMessage)
-      throws SchedulerException, IOException {
+  private void emptyTrash(NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook,
+                          Message fromMessage) throws SchedulerException, IOException {
     fromMessage.data = new HashMap<>();
     fromMessage.put("id", Folder.TRASH_FOLDER_ID);
     removeFolder(conn, userAndRoles, notebook, fromMessage);
   }
 
-  private void updateParagraph(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void updateParagraph(NotebookSocket conn,
+                               Message fromMessage) throws IOException {
     String paragraphId = (String) fromMessage.get("id");
     String noteId = connectionManager.getAssociatedNoteId(conn);
     if (noteId == null) {
@@ -1044,33 +960,25 @@ public class NotebookServer extends WebSocketServlet
     Map<String, Object> params = (Map<String, Object>) fromMessage.get("params");
     Map<String, Object> config = (Map<String, Object>) fromMessage.get("config");
 
-    getNotebookService()
-        .updateParagraph(
-            noteId,
-            paragraphId,
-            title,
-            text,
-            params,
-            config,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<Paragraph>(conn) {
-              @Override
-              public void onSuccess(Paragraph p, ServiceContext context) throws IOException {
-                super.onSuccess(p, context);
-                if (p.getNote().isPersonalizedMode()) {
-                  Map<String, Paragraph> userParagraphMap =
-                      p.getNote().getParagraph(paragraphId).getUserParagraphMap();
-                  broadcastParagraphs(userParagraphMap, p);
-                } else {
-                  broadcastParagraph(p.getNote(), p);
-                }
-              }
-            });
+    getNotebookService().updateParagraph(noteId, paragraphId, title, text, params, config,
+        getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Paragraph>(conn) {
+          @Override
+          public void onSuccess(Paragraph p, ServiceContext context) throws IOException {
+            super.onSuccess(p, context);
+            if (p.getNote().isPersonalizedMode()) {
+              Map<String, Paragraph> userParagraphMap =
+                  p.getNote().getParagraph(paragraphId).getUserParagraphMap();
+              broadcastParagraphs(userParagraphMap, p);
+            } else {
+              broadcastParagraph(p.getNote(), p);
+            }
+          }
+        });
   }
 
-  private void patchParagraph(
-      NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook, Message fromMessage)
-      throws IOException {
+  private void patchParagraph(NotebookSocket conn, HashSet<String> userAndRoles,
+                              Notebook notebook, Message fromMessage) throws IOException {
     if (!collaborativeModeEnable) {
       return;
     }
@@ -1087,8 +995,8 @@ public class NotebookServer extends WebSocketServlet
       }
     }
 
-    if (!hasParagraphWriterPermission(
-        conn, notebook, noteId, userAndRoles, fromMessage.principal, "write")) {
+    if (!hasParagraphWriterPermission(conn, notebook, noteId,
+        userAndRoles, fromMessage.principal, "write")) {
       return;
     }
 
@@ -1120,153 +1028,131 @@ public class NotebookServer extends WebSocketServlet
     String paragraphText = p.getText() == null ? "" : p.getText();
     paragraphText = (String) dmp.patchApply(patches, paragraphText)[0];
     p.setText(paragraphText);
-    Message message =
-        new Message(OP.PATCH_PARAGRAPH).put("patch", patchText).put("paragraphId", p.getId());
+    Message message = new Message(OP.PATCH_PARAGRAPH).put("patch", patchText)
+        .put("paragraphId", p.getId());
     connectionManager.broadcastExcept(note.getId(), message, conn);
   }
 
-  private void cloneNote(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void cloneNote(NotebookSocket conn,
+                         Message fromMessage) throws IOException {
     String noteId = connectionManager.getAssociatedNoteId(conn);
     String name = (String) fromMessage.get("name");
-    getNotebookService()
-        .cloneNote(
-            noteId,
-            name,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<Note>(conn) {
-              @Override
-              public void onSuccess(Note newNote, ServiceContext context) throws IOException {
-                super.onSuccess(newNote, context);
-                connectionManager.addNoteConnection(newNote.getId(), conn);
-                conn.send(serializeMessage(new Message(OP.NEW_NOTE).put("note", newNote)));
-                broadcastNoteList(context.getAutheInfo(), context.getUserAndRoles());
-              }
-            });
+    getNotebookService().cloneNote(noteId, name, getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Note>(conn) {
+          @Override
+          public void onSuccess(Note newNote, ServiceContext context) throws IOException {
+            super.onSuccess(newNote, context);
+            connectionManager.addNoteConnection(newNote.getId(), conn);
+            conn.send(serializeMessage(new Message(OP.NEW_NOTE).put("note", newNote)));
+            broadcastNoteList(context.getAutheInfo(), context.getUserAndRoles());
+          }
+        });
   }
 
-  private void clearAllParagraphOutput(NotebookSocket conn, Message fromMessage)
-      throws IOException {
+  private void clearAllParagraphOutput(NotebookSocket conn,
+                                       Message fromMessage) throws IOException {
     final String noteId = (String) fromMessage.get("id");
-    getNotebookService()
-        .clearAllParagraphOutput(
-            noteId,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<Note>(conn) {
-              @Override
-              public void onSuccess(Note note, ServiceContext context) throws IOException {
-                super.onSuccess(note, context);
-                broadcastNote(note);
-              }
-            });
+    getNotebookService().clearAllParagraphOutput(noteId, getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Note>(conn) {
+          @Override
+          public void onSuccess(Note note, ServiceContext context) throws IOException {
+            super.onSuccess(note, context);
+            broadcastNote(note);
+          }
+        });
   }
 
   protected Note importNote(NotebookSocket conn, Message fromMessage) throws IOException {
     String noteName = (String) ((Map) fromMessage.get("note")).get("name");
     String noteJson = gson.toJson(fromMessage.get("note"));
-    Note note =
-        getNotebookService()
-            .importNote(
-                noteName,
-                noteJson,
-                getServiceContext(fromMessage),
-                new WebSocketServiceCallback<Note>(conn) {
-                  @Override
-                  public void onSuccess(Note note, ServiceContext context) throws IOException {
-                    super.onSuccess(note, context);
-                    try {
-                      broadcastNote(note);
-                      broadcastNoteList(context.getAutheInfo(), context.getUserAndRoles());
-                    } catch (NullPointerException e) {
-                      // TODO(zjffdu) remove this try catch. This is only for test of
-                      // NotebookServerTest#testImportNotebook
-                    }
-                  }
-                });
+    Note note = getNotebookService().importNote(noteName, noteJson, getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Note>(conn) {
+          @Override
+          public void onSuccess(Note note, ServiceContext context) throws IOException {
+            super.onSuccess(note, context);
+            try {
+              broadcastNote(note);
+              broadcastNoteList(context.getAutheInfo(), context.getUserAndRoles());
+            } catch (NullPointerException e) {
+              // TODO(zjffdu) remove this try catch. This is only for test of
+              // NotebookServerTest#testImportNotebook
+            }
+          }
+        });
 
     return note;
   }
 
-  private void removeParagraph(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void removeParagraph(NotebookSocket conn,
+                               Message fromMessage) throws IOException {
     final String paragraphId = (String) fromMessage.get("id");
     String noteId = connectionManager.getAssociatedNoteId(conn);
-    getNotebookService()
-        .removeParagraph(
-            noteId,
-            paragraphId,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<Paragraph>(conn) {
-              @Override
-              public void onSuccess(Paragraph p, ServiceContext context) throws IOException {
-                super.onSuccess(p, context);
-                connectionManager.broadcast(
-                    p.getNote().getId(), new Message(OP.PARAGRAPH_REMOVED).put("id", p.getId()));
-              }
-            });
+    getNotebookService().removeParagraph(noteId, paragraphId,
+        getServiceContext(fromMessage), new WebSocketServiceCallback<Paragraph>(conn){
+          @Override
+          public void onSuccess(Paragraph p, ServiceContext context) throws IOException {
+            super.onSuccess(p, context);
+            connectionManager.broadcast(p.getNote().getId(), new Message(OP.PARAGRAPH_REMOVED).
+                put("id", p.getId()));
+          }
+        });
   }
 
-  private void clearParagraphOutput(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void clearParagraphOutput(NotebookSocket conn,
+                                    Message fromMessage) throws IOException {
     final String paragraphId = (String) fromMessage.get("id");
     String noteId = connectionManager.getAssociatedNoteId(conn);
-    getNotebookService()
-        .clearParagraphOutput(
-            noteId,
-            paragraphId,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<Paragraph>(conn) {
-              @Override
-              public void onSuccess(Paragraph p, ServiceContext context) throws IOException {
-                super.onSuccess(p, context);
-                if (p.getNote().isPersonalizedMode()) {
-                  connectionManager.unicastParagraph(
-                      p.getNote(), p, context.getAutheInfo().getUser());
-                } else {
-                  broadcastParagraph(p.getNote(), p);
-                }
-              }
-            });
+    getNotebookService().clearParagraphOutput(noteId, paragraphId, getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Paragraph>(conn) {
+          @Override
+          public void onSuccess(Paragraph p, ServiceContext context) throws IOException {
+            super.onSuccess(p, context);
+            if (p.getNote().isPersonalizedMode()) {
+              connectionManager.unicastParagraph(p.getNote(), p, context.getAutheInfo().getUser());
+            } else {
+              broadcastParagraph(p.getNote(), p);
+            }
+          }
+        });
   }
 
-  private void completion(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void completion(NotebookSocket conn,
+                          Message fromMessage) throws IOException {
     String noteId = connectionManager.getAssociatedNoteId(conn);
     String paragraphId = (String) fromMessage.get("id");
     String buffer = (String) fromMessage.get("buf");
     int cursor = (int) Double.parseDouble(fromMessage.get("cursor").toString());
-    getNotebookService()
-        .completion(
-            noteId,
-            paragraphId,
-            buffer,
-            cursor,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<List<InterpreterCompletion>>(conn) {
-              @Override
-              public void onSuccess(List<InterpreterCompletion> completions, ServiceContext context)
-                  throws IOException {
-                super.onSuccess(completions, context);
-                Message resp = new Message(OP.COMPLETION_LIST).put("id", paragraphId);
-                resp.put("completions", completions);
-                conn.send(serializeMessage(resp));
-              }
+    getNotebookService().completion(noteId, paragraphId, buffer, cursor,
+        getServiceContext(fromMessage),
+        new WebSocketServiceCallback<List<InterpreterCompletion>>(conn) {
+          @Override
+          public void onSuccess(List<InterpreterCompletion> completions, ServiceContext context)
+              throws IOException {
+            super.onSuccess(completions, context);
+            Message resp = new Message(OP.COMPLETION_LIST).put("id", paragraphId);
+            resp.put("completions", completions);
+            conn.send(serializeMessage(resp));
+          }
 
-              @Override
-              public void onFailure(Exception ex, ServiceContext context) throws IOException {
-                super.onFailure(ex, context);
-                Message resp = new Message(OP.COMPLETION_LIST).put("id", paragraphId);
-                resp.put("completions", new ArrayList<>());
-                conn.send(serializeMessage(resp));
-              }
-            });
+          @Override
+          public void onFailure(Exception ex, ServiceContext context) throws IOException {
+            super.onFailure(ex, context);
+            Message resp = new Message(OP.COMPLETION_LIST).put("id", paragraphId);
+            resp.put("completions", new ArrayList<>());
+            conn.send(serializeMessage(resp));
+          }
+        });
   }
 
   /**
    * When angular object updated from client.
    *
-   * @param conn the web socket.
-   * @param notebook the notebook.
+   * @param conn        the web socket.
+   * @param notebook    the notebook.
    * @param fromMessage the message.
    */
-  private void angularObjectUpdated(
-      NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook, Message fromMessage) {
+  private void angularObjectUpdated(NotebookSocket conn, HashSet<String> userAndRoles,
+                                    Notebook notebook, Message fromMessage) {
     String noteId = (String) fromMessage.get("noteId");
     String paragraphId = (String) fromMessage.get("paragraphId");
     String interpreterGroupId = (String) fromMessage.get("interpreterGroupId");
@@ -1284,7 +1170,8 @@ public class NotebookServer extends WebSocketServlet
         if (setting.getInterpreterGroup(user, note.getId()) == null) {
           continue;
         }
-        if (interpreterGroupId.equals(setting.getInterpreterGroup(user, note.getId()).getId())) {
+        if (interpreterGroupId.equals(setting.getInterpreterGroup(user, note.getId())
+            .getId())) {
           AngularObjectRegistry angularObjectRegistry =
               setting.getInterpreterGroup(user, note.getId()).getAngularObjectRegistry();
 
@@ -1326,39 +1213,31 @@ public class NotebookServer extends WebSocketServlet
           if (setting.getInterpreterGroup(user, n.getId()) == null) {
             continue;
           }
-          if (interpreterGroupId.equals(setting.getInterpreterGroup(user, n.getId()).getId())) {
+          if (interpreterGroupId.equals(setting.getInterpreterGroup(user, n.getId())
+              .getId())) {
             AngularObjectRegistry angularObjectRegistry =
                 setting.getInterpreterGroup(user, n.getId()).getAngularObjectRegistry();
-            connectionManager.broadcastExcept(
-                n.getId(),
-                new Message(OP.ANGULAR_OBJECT_UPDATE)
-                    .put("angularObject", ao)
-                    .put("interpreterGroupId", interpreterGroupId)
-                    .put("noteId", n.getId())
-                    .put("paragraphId", ao.getParagraphId()),
-                conn);
+            connectionManager.broadcastExcept(n.getId(),
+                new Message(OP.ANGULAR_OBJECT_UPDATE).put("angularObject", ao)
+                    .put("interpreterGroupId", interpreterGroupId).put("noteId", n.getId())
+                    .put("paragraphId", ao.getParagraphId()), conn);
           }
         }
       }
     } else { // broadcast to all web session for the note
-      connectionManager.broadcastExcept(
-          note.getId(),
-          new Message(OP.ANGULAR_OBJECT_UPDATE)
-              .put("angularObject", ao)
-              .put("interpreterGroupId", interpreterGroupId)
-              .put("noteId", note.getId())
-              .put("paragraphId", ao.getParagraphId()),
-          conn);
+      connectionManager.broadcastExcept(note.getId(),
+          new Message(OP.ANGULAR_OBJECT_UPDATE).put("angularObject", ao)
+              .put("interpreterGroupId", interpreterGroupId).put("noteId", note.getId())
+              .put("paragraphId", ao.getParagraphId()), conn);
     }
   }
 
   /**
-   * Push the given Angular variable to the target interpreter angular registry given a noteId and a
-   * paragraph id.
+   * Push the given Angular variable to the target interpreter angular registry given a noteId
+   * and a paragraph id.
    */
-  protected void angularObjectClientBind(
-      NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook, Message fromMessage)
-      throws Exception {
+  protected void angularObjectClientBind(NotebookSocket conn, HashSet<String> userAndRoles,
+                                         Notebook notebook, Message fromMessage) throws Exception {
     String noteId = fromMessage.getType("noteId");
     String varName = fromMessage.getType("name");
     Object varValue = fromMessage.get("value");
@@ -1377,12 +1256,12 @@ public class NotebookServer extends WebSocketServlet
       if (registry instanceof RemoteAngularObjectRegistry) {
 
         RemoteAngularObjectRegistry remoteRegistry = (RemoteAngularObjectRegistry) registry;
-        pushAngularObjectToRemoteRegistry(
-            noteId, paragraphId, varName, varValue, remoteRegistry, interpreterGroup.getId(), conn);
+        pushAngularObjectToRemoteRegistry(noteId, paragraphId, varName, varValue, remoteRegistry,
+            interpreterGroup.getId(), conn);
 
       } else {
-        pushAngularObjectToLocalRepo(
-            noteId, paragraphId, varName, varValue, registry, interpreterGroup.getId(), conn);
+        pushAngularObjectToLocalRepo(noteId, paragraphId, varName, varValue, registry,
+            interpreterGroup.getId(), conn);
       }
     }
   }
@@ -1391,8 +1270,8 @@ public class NotebookServer extends WebSocketServlet
    * Remove the given Angular variable to the target interpreter(s) angular registry given a noteId
    * and an optional list of paragraph id(s).
    */
-  protected void angularObjectClientUnbind(
-      NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook, Message fromMessage)
+  protected void angularObjectClientUnbind(NotebookSocket conn, HashSet<String> userAndRoles,
+                                           Notebook notebook, Message fromMessage)
       throws Exception {
     String noteId = fromMessage.getType("noteId");
     String varName = fromMessage.getType("name");
@@ -1411,11 +1290,11 @@ public class NotebookServer extends WebSocketServlet
 
       if (registry instanceof RemoteAngularObjectRegistry) {
         RemoteAngularObjectRegistry remoteRegistry = (RemoteAngularObjectRegistry) registry;
-        removeAngularFromRemoteRegistry(
-            noteId, paragraphId, varName, remoteRegistry, interpreterGroup.getId(), conn);
+        removeAngularFromRemoteRegistry(noteId, paragraphId, varName, remoteRegistry,
+            interpreterGroup.getId(), conn);
       } else {
-        removeAngularObjectFromLocalRepo(
-            noteId, paragraphId, varName, registry, interpreterGroup.getId(), conn);
+        removeAngularObjectFromLocalRepo(noteId, paragraphId, varName, registry,
+            interpreterGroup.getId(), conn);
       }
     }
   }
@@ -1429,54 +1308,36 @@ public class NotebookServer extends WebSocketServlet
     return paragraph.getBindedInterpreter().getInterpreterGroup();
   }
 
-  private void pushAngularObjectToRemoteRegistry(
-      String noteId,
-      String paragraphId,
-      String varName,
-      Object varValue,
-      RemoteAngularObjectRegistry remoteRegistry,
-      String interpreterGroupId,
-      NotebookSocket conn) {
+  private void pushAngularObjectToRemoteRegistry(String noteId, String paragraphId, String varName,
+                                                 Object varValue,
+                                                 RemoteAngularObjectRegistry remoteRegistry,
+                                                 String interpreterGroupId,
+                                                 NotebookSocket conn) {
     final AngularObject ao =
         remoteRegistry.addAndNotifyRemoteProcess(varName, varValue, noteId, paragraphId);
 
-    connectionManager.broadcastExcept(
-        noteId,
-        new Message(OP.ANGULAR_OBJECT_UPDATE)
-            .put("angularObject", ao)
-            .put("interpreterGroupId", interpreterGroupId)
-            .put("noteId", noteId)
-            .put("paragraphId", paragraphId),
-        conn);
-  }
-
-  private void removeAngularFromRemoteRegistry(
-      String noteId,
-      String paragraphId,
-      String varName,
-      RemoteAngularObjectRegistry remoteRegistry,
-      String interpreterGroupId,
-      NotebookSocket conn) {
+    connectionManager.broadcastExcept(noteId, new Message(OP.ANGULAR_OBJECT_UPDATE)
+        .put("angularObject", ao)
+        .put("interpreterGroupId", interpreterGroupId).put("noteId", noteId)
+        .put("paragraphId", paragraphId), conn);
+  }
+
+  private void removeAngularFromRemoteRegistry(String noteId, String paragraphId, String varName,
+                                               RemoteAngularObjectRegistry remoteRegistry,
+                                               String interpreterGroupId,
+                                               NotebookSocket conn) {
     final AngularObject ao =
         remoteRegistry.removeAndNotifyRemoteProcess(varName, noteId, paragraphId);
-    connectionManager.broadcastExcept(
-        noteId,
-        new Message(OP.ANGULAR_OBJECT_REMOVE)
-            .put("angularObject", ao)
-            .put("interpreterGroupId", interpreterGroupId)
-            .put("noteId", noteId)
-            .put("paragraphId", paragraphId),
-        conn);
-  }
-
-  private void pushAngularObjectToLocalRepo(
-      String noteId,
-      String paragraphId,
-      String varName,
-      Object varValue,
-      AngularObjectRegistry registry,
-      String interpreterGroupId,
-      NotebookSocket conn) {
+    connectionManager.broadcastExcept(noteId, new Message(OP.ANGULAR_OBJECT_REMOVE)
+        .put("angularObject", ao)
+        .put("interpreterGroupId", interpreterGroupId).put("noteId", noteId)
+        .put("paragraphId", paragraphId), conn);
+  }
+
+  private void pushAngularObjectToLocalRepo(String noteId, String paragraphId, String varName,
+                                            Object varValue, AngularObjectRegistry registry,
+                                            String interpreterGroupId,
+                                            NotebookSocket conn) {
     AngularObject angularObject = registry.get(varName, noteId, paragraphId);
     if (angularObject == null) {
       angularObject = registry.add(varName, varValue, noteId, paragraphId);
@@ -1484,58 +1345,43 @@ public class NotebookServer extends WebSocketServlet
       angularObject.set(varValue, true);
     }
 
-    connectionManager.broadcastExcept(
-        noteId,
-        new Message(OP.ANGULAR_OBJECT_UPDATE)
-            .put("angularObject", angularObject)
-            .put("interpreterGroupId", interpreterGroupId)
-            .put("noteId", noteId)
-            .put("paragraphId", paragraphId),
-        conn);
+    connectionManager.broadcastExcept(noteId,
+        new Message(OP.ANGULAR_OBJECT_UPDATE).put("angularObject", angularObject)
+            .put("interpreterGroupId", interpreterGroupId).put("noteId", noteId)
+            .put("paragraphId", paragraphId), conn);
   }
 
-  private void removeAngularObjectFromLocalRepo(
-      String noteId,
-      String paragraphId,
-      String varName,
-      AngularObjectRegistry registry,
-      String interpreterGroupId,
-      NotebookSocket conn) {
+  private void removeAngularObjectFromLocalRepo(String noteId, String paragraphId, String varName,
+                                                AngularObjectRegistry registry,
+                                                String interpreterGroupId, NotebookSocket conn) {
     final AngularObject removed = registry.remove(varName, noteId, paragraphId);
     if (removed != null) {
-      connectionManager.broadcastExcept(
-          noteId,
-          new Message(OP.ANGULAR_OBJECT_REMOVE)
-              .put("angularObject", removed)
-              .put("interpreterGroupId", interpreterGroupId)
-              .put("noteId", noteId)
-              .put("paragraphId", paragraphId),
-          conn);
+      connectionManager.broadcastExcept(noteId,
+          new Message(OP.ANGULAR_OBJECT_REMOVE).put("angularObject", removed)
+              .put("interpreterGroupId", interpreterGroupId).put("noteId", noteId)
+              .put("paragraphId", paragraphId), conn);
     }
   }
 
-  private void moveParagraph(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void moveParagraph(NotebookSocket conn,
+                             Message fromMessage) throws IOException {
     final String paragraphId = (String) fromMessage.get("id");
     final int newIndex = (int) Double.parseDouble(fromMessage.get("index").toString());
     String noteId = connectionManager.getAssociatedNoteId(conn);
-    getNotebookService()
-        .moveParagraph(
-            noteId,
-            paragraphId,
-            newIndex,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<Paragraph>(conn) {
-              @Override
-              public void onSuccess(Paragraph result, ServiceContext context) throws IOException {
-                super.onSuccess(result, context);
-                connectionManager.broadcast(
-                    result.getNote().getId(),
-                    new Message(OP.PARAGRAPH_MOVED).put("id", paragraphId).put("index", newIndex));
-              }
-            });
+    getNotebookService().moveParagraph(noteId, paragraphId, newIndex,
+        getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Paragraph>(conn) {
+          @Override
+          public void onSuccess(Paragraph result, ServiceContext context) throws IOException {
+            super.onSuccess(result, context);
+            connectionManager.broadcast(result.getNote().getId(),
+                new Message(OP.PARAGRAPH_MOVED).put("id", paragraphId).put("index", newIndex));
+          }
+        });
   }
 
-  private String insertParagraph(NotebookSocket conn, Message fromMessage) throws IOException {
+  private String insertParagraph(NotebookSocket conn,
+                                 Message fromMessage) throws IOException {
     final int index = (int) Double.parseDouble(fromMessage.get("index").toString());
     String noteId = connectionManager.getAssociatedNoteId(conn);
     Map<String, Object> config;
@@ -1545,25 +1391,21 @@ public class NotebookServer extends WebSocketServlet
       config = new HashMap<>();
     }
 
-    Paragraph newPara =
-        getNotebookService()
-            .insertParagraph(
-                noteId,
-                index,
-                config,
-                getServiceContext(fromMessage),
-                new WebSocketServiceCallback<Paragraph>(conn) {
-                  @Override
-                  public void onSuccess(Paragraph p, ServiceContext context) throws IOException {
-                    super.onSuccess(p, context);
-                    broadcastNewParagraph(p.getNote(), p);
-                  }
-                });
+    Paragraph newPara = getNotebookService().insertParagraph(noteId, index, config,
+        getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Paragraph>(conn) {
+          @Override
+          public void onSuccess(Paragraph p, ServiceContext context) throws IOException {
+            super.onSuccess(p, context);
+            broadcastNewParagraph(p.getNote(), p);
+          }
+        });
 
     return newPara.getId();
   }
 
-  private void copyParagraph(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void copyParagraph(NotebookSocket conn,
+                             Message fromMessage) throws IOException {
     String newParaId = insertParagraph(conn, fromMessage);
 
     if (newParaId == null) {
@@ -1577,32 +1419,24 @@ public class NotebookServer extends WebSocketServlet
   private void cancelParagraph(NotebookSocket conn, Message fromMessage) throws IOException {
     final String paragraphId = (String) fromMessage.get("id");
     String noteId = connectionManager.getAssociatedNoteId(conn);
-    getNotebookService()
-        .cancelParagraph(
-            noteId,
-            paragraphId,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<>(conn));
+    getNotebookService().cancelParagraph(noteId, paragraphId, getServiceContext(fromMessage),
+        new WebSocketServiceCallback<>(conn));
   }
 
-  private void runAllParagraphs(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void runAllParagraphs(NotebookSocket conn,
+                                Message fromMessage) throws IOException {
     final String noteId = (String) fromMessage.get("noteId");
     List<Map<String, Object>> paragraphs =
-        gson.fromJson(
-            String.valueOf(fromMessage.data.get("paragraphs")),
-            new TypeToken<List<Map<String, Object>>>() {}.getType());
+        gson.fromJson(String.valueOf(fromMessage.data.get("paragraphs")),
+            new TypeToken<List<Map<String, Object>>>() {
+            }.getType());
 
-    getNotebookService()
-        .runAllParagraphs(
-            noteId,
-            paragraphs,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<Paragraph>(conn));
+    getNotebookService().runAllParagraphs(noteId, paragraphs, getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Paragraph>(conn));
   }
 
-  private void broadcastSpellExecution(
-      NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook, Message fromMessage)
-      throws IOException {
+  private void broadcastSpellExecution(NotebookSocket conn, HashSet<String> userAndRoles,
+                                       Notebook notebook, Message fromMessage) throws IOException {
     final String paragraphId = (String) fromMessage.get("id");
     if (paragraphId == null) {
       return;
@@ -1610,8 +1444,8 @@ public class NotebookServer extends WebSocketServlet
 
     String noteId = connectionManager.getAssociatedNoteId(conn);
 
-    if (!hasParagraphWriterPermission(
-        conn, notebook, noteId, userAndRoles, fromMessage.principal, "write")) {
+    if (!hasParagraphWriterPermission(conn, notebook, noteId,
+        userAndRoles, fromMessage.principal, "write")) {
       return;
     }
 
@@ -1622,8 +1456,8 @@ public class NotebookServer extends WebSocketServlet
     Map<String, Object> config = (Map<String, Object>) fromMessage.get("config");
 
     final Note note = notebook.getNote(noteId);
-    Paragraph p =
-        setParagraphUsingMessage(note, fromMessage, paragraphId, text, title, params, config);
+    Paragraph p = setParagraphUsingMessage(note, fromMessage, paragraphId,
+        text, title, params, config);
     p.setResult((InterpreterResult) fromMessage.get("results"));
     p.setErrorMessage((String) fromMessage.get("errorMessage"));
     p.setStatusWithoutNotification(status);
@@ -1651,64 +1485,56 @@ public class NotebookServer extends WebSocketServlet
     }
 
     // broadcast to other clients only
-    connectionManager.broadcastExcept(
-        note.getId(), new Message(OP.RUN_PARAGRAPH_USING_SPELL).put("paragraph", p), conn);
+    connectionManager.broadcastExcept(note.getId(),
+        new Message(OP.RUN_PARAGRAPH_USING_SPELL).put("paragraph", p), conn);
   }
 
-  private void runParagraph(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void runParagraph(NotebookSocket conn,
+                            Message fromMessage) throws IOException {
     String paragraphId = (String) fromMessage.get("id");
     String noteId = connectionManager.getAssociatedNoteId(conn);
     String text = (String) fromMessage.get("paragraph");
     String title = (String) fromMessage.get("title");
     Map<String, Object> params = (Map<String, Object>) fromMessage.get("params");
     Map<String, Object> config = (Map<String, Object>) fromMessage.get("config");
-    getNotebookService()
-        .runParagraph(
-            noteId,
-            paragraphId,
-            title,
-            text,
-            params,
-            config,
-            false,
-            false,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<Paragraph>(conn) {
-              @Override
-              public void onSuccess(Paragraph p, ServiceContext context) throws IOException {
-                super.onSuccess(p, context);
-                if (p.getNote().isPersonalizedMode()) {
-                  Paragraph p2 =
-                      p.getNote()
-                          .clearPersonalizedParagraphOutput(
-                              paragraphId, context.getAutheInfo().getUser());
-                  connectionManager.unicastParagraph(
-                      p.getNote(), p2, context.getAutheInfo().getUser());
-                }
-
-                // if it's the last paragraph and not empty, let's add a new one
-                boolean isTheLastParagraph = p.getNote().isLastParagraph(paragraphId);
-                if (!(Strings.isNullOrEmpty(p.getText())
-                        || Strings.isNullOrEmpty(p.getScriptText()))
-                    && isTheLastParagraph) {
-                  Paragraph newPara = p.getNote().addNewParagraph(p.getAuthenticationInfo());
-                  broadcastNewParagraph(p.getNote(), newPara);
-                }
-              }
-            });
+    getNotebookService().runParagraph(noteId, paragraphId, title, text, params, config,
+        false, false, getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Paragraph>(conn) {
+          @Override
+          public void onSuccess(Paragraph p, ServiceContext context) throws IOException {
+            super.onSuccess(p, context);
+            if (p.getNote().isPersonalizedMode()) {
+              Paragraph p2 = p.getNote().clearPersonalizedParagraphOutput(paragraphId,
+                  context.getAutheInfo().getUser());
+              connectionManager.unicastParagraph(p.getNote(), p2, context.getAutheInfo().getUser());
+            }
+
+            // if it's the last paragraph and not empty, let's add a new one
+            boolean isTheLastParagraph = p.getNote().isLastParagraph(paragraphId);
+            if (!(Strings.isNullOrEmpty(p.getText()) ||
+                Strings.isNullOrEmpty(p.getScriptText())) &&
+                isTheLastParagraph) {
+              Paragraph newPara = p.getNote().addNewParagraph(p.getAuthenticationInfo());
+              broadcastNewParagraph(p.getNote(), newPara);
+            }
+          }
+        });
   }
 
   private void addNewParagraphIfLastParagraphIsExecuted(Note note, Paragraph p) {
     // if it's the last paragraph and not empty, let's add a new one
     boolean isTheLastParagraph = note.isLastParagraph(p.getId());
-    if (!(Strings.isNullOrEmpty(p.getText()) || Strings.isNullOrEmpty(p.getScriptText()))
-        && isTheLastParagraph) {
+    if (!(Strings.isNullOrEmpty(p.getText()) ||
+        Strings.isNullOrEmpty(p.getScriptText())) &&
+        isTheLastParagraph) {
       Paragraph newPara = note.addNewParagraph(p.getAuthenticationInfo());
       broadcastNewParagraph(note, newPara);
     }
   }
 
-  /** @return false if failed to save a note */
+  /**
+   * @return false if failed to save a note
+   */
   private boolean persistNoteWithAuthInfo(NotebookSocket conn, Note note, Paragraph p)
       throws IOException {
     try {
@@ -1716,26 +1542,17 @@ public class NotebookServer extends WebSocketServlet
       return true;
     } catch (IOException ex) {
       LOG.error("Exception from run", ex);
-      conn.send(
-          serializeMessage(
-              new Message(OP.ERROR_INFO)
-                  .put(
-                      "info",
-                      "Oops! There is something wrong with the notebook file system. "
-                          + "Please check the logs for more details.")));
+      conn.send(serializeMessage(new Message(OP.ERROR_INFO).put("info",
+          "Oops! There is something wrong with the notebook file system. "
+              + "Please check the logs for more details.")));
       // don't run the paragraph when there is error on persisting the note information
       return false;
     }
   }
 
-  private Paragraph setParagraphUsingMessage(
-      Note note,
-      Message fromMessage,
-      String paragraphId,
-      String text,
-      String title,
-      Map<String, Object> params,
-      Map<String, Object> config) {
+  private Paragraph setParagraphUsingMessage(Note note, Message fromMessage, String paragraphId,
+                                             String text, String title, Map<String, Object> params,
+                                             Map<String, Object> config) {
     Paragraph p = note.getParagraph(paragraphId);
     p.setText(text);
     p.setTitle(title);
@@ -1757,137 +1574,110 @@ public class NotebookServer extends WebSocketServlet
     return p;
   }
 
-  private void sendAllConfigurations(NotebookSocket conn, Message message) throws IOException {
+  private void sendAllConfigurations(NotebookSocket conn,
+                                     Message message ) throws IOException {
 
-    configurationService.getAllProperties(
-        getServiceContext(message),
+    configurationService.getAllProperties(getServiceContext(message),
         new WebSocketServiceCallback<Map<String, String>>(conn) {
           @Override
-          public void onSuccess(Map<String, String> properties, ServiceContext context)
-              throws IOException {
+          public void onSuccess(Map<String, String> properties,
+                                ServiceContext context) throws IOException {
             super.onSuccess(properties, context);
             properties.put("isRevisionSupported", String.valueOf(notebook().isRevisionSupported()));
-            conn.send(
-                serializeMessage(
-                    new Message(OP.CONFIGURATIONS_INFO).put("configurations", properties)));
+            conn.send(serializeMessage(
+                new Message(OP.CONFIGURATIONS_INFO).put("configurations", properties)));
           }
         });
   }
 
-  private void checkpointNote(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void checkpointNote(NotebookSocket conn, Message fromMessage)
+      throws IOException {
     String noteId = (String) fromMessage.get("noteId");
     String commitMessage = (String) fromMessage.get("commitMessage");
 
-    getNotebookService()
-        .checkpointNote(
-            noteId,
-            commitMessage,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<Revision>(conn) {
-              @Override
-              public void onSuccess(Revision revision, ServiceContext context) throws IOException {
-                super.onSuccess(revision, context);
-                if (!Revision.isEmpty(revision)) {
-                  List<Revision> revisions =
-                      notebook().listRevisionHistory(noteId, context.getAutheInfo());
-                  conn.send(
-                      serializeMessage(
-                          new Message(OP.LIST_REVISION_HISTORY).put("revisionList", revisions)));
-                } else {
-                  conn.send(
-                      serializeMessage(
-                          new Message(OP.ERROR_INFO)
-                              .put(
-                                  "info",
-                                  "Couldn't checkpoint note revision: possibly storage doesn't support versioning. "
-                                      + "Please check the logs for more details.")));
-                }
-              }
-            });
+    getNotebookService().checkpointNote(noteId, commitMessage, getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Revision>(conn) {
+          @Override
+          public void onSuccess(Revision revision, ServiceContext context) throws IOException {
+            super.onSuccess(revision, context);
+            if (!Revision.isEmpty(revision)) {
+              List<Revision> revisions =
+                  notebook().listRevisionHistory(noteId, context.getAutheInfo());
+              conn.send(
+                  serializeMessage(new Message(OP.LIST_REVISION_HISTORY).put("revisionList",
+                      revisions)));
+            } else {
+              conn.send(serializeMessage(new Message(OP.ERROR_INFO).put("info",
+                  "Couldn't checkpoint note revision: possibly storage doesn't support versioning. "
+                      + "Please check the logs for more details.")));
+            }
+          }
+        });
   }
 
-  private void listRevisionHistory(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void listRevisionHistory(NotebookSocket conn, Message fromMessage)
+      throws IOException {
     String noteId = (String) fromMessage.get("noteId");
-    getNotebookService()
-        .listRevisionHistory(
-            noteId,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<List<Revision>>(conn) {
-              @Override
-              public void onSuccess(List<Revision> revisions, ServiceContext context)
-                  throws IOException {
-                super.onSuccess(revisions, context);
-                conn.send(
-                    serializeMessage(
-                        new Message(OP.LIST_REVISION_HISTORY).put("revisionList", revisions)));
-              }
-            });
+    getNotebookService().listRevisionHistory(noteId, getServiceContext(fromMessage),
+        new WebSocketServiceCallback<List<Revision>>(conn) {
+          @Override
+          public void onSuccess(List<Revision> revisions, ServiceContext context)
+              throws IOException {
+            super.onSuccess(revisions, context);
+            conn.send(serializeMessage(
+                new Message(OP.LIST_REVISION_HISTORY).put("revisionList", revisions)));
+          }
+        });
   }
 
-  private void setNoteRevision(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void setNoteRevision(NotebookSocket conn,
+                               Message fromMessage) throws IOException {
     String noteId = (String) fromMessage.get("noteId");
     String revisionId = (String) fromMessage.get("revisionId");
-    getNotebookService()
-        .setNoteRevision(
-            noteId,
-            revisionId,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<Note>(conn) {
-              @Override
-              public void onSuccess(Note note, ServiceContext context) throws IOException {
-                super.onSuccess(note, context);
-                Note reloadedNote = notebook().loadNoteFromRepo(noteId, context.getAutheInfo());
-                conn.send(serializeMessage(new Message(OP.SET_NOTE_REVISION).put("status", true)));
-                broadcastNote(reloadedNote);
-              }
-            });
+    getNotebookService().setNoteRevision(noteId, revisionId, getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Note>(conn) {
+          @Override
+          public void onSuccess(Note note, ServiceContext context) throws IOException {
+            super.onSuccess(note, context);
+            Note reloadedNote = notebook().loadNoteFromRepo(noteId, context.getAutheInfo());
+            conn.send(serializeMessage(new Message(OP.SET_NOTE_REVISION).put("status", true)));
+            broadcastNote(reloadedNote);
+          }
+        });
   }
 
-  private void getNoteByRevision(NotebookSocket conn, Message fromMessage) throws IOException {
+  private void getNoteByRevision(NotebookSocket conn, Message fromMessage)
+      throws IOException {
     String noteId = (String) fromMessage.get("noteId");
     String revisionId = (String) fromMessage.get("revisionId");
-    getNotebookService()
-        .getNotebyRevision(
-            noteId,
-            revisionId,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<Note>(conn) {
-              @Override
-              public void onSuccess(Note note, ServiceContext context) throws IOException {
-                super.onSuccess(note, context);
-                conn.send(
-                    serializeMessage(
-                        new Message(OP.NOTE_REVISION)
-                            .put("noteId", noteId)
-                            .put("revisionId", revisionId)
-                            .put("note", note)));
-              }
-            });
+    getNotebookService().getNotebyRevision(noteId, revisionId, getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Note>(conn) {
+          @Override
+          public void onSuccess(Note note, ServiceContext context) throws IOException {
+            super.onSuccess(note, context);
+            conn.send(serializeMessage(
+                new Message(OP.NOTE_REVISION).put("noteId", noteId).put("revisionId", revisionId)
+                    .put("note", note)));
+          }
+        });
   }
 
-  private void getNoteByRevisionForCompare(NotebookSocket conn, Message fromMessage)
-      throws IOException {
+  private void getNoteByRevisionForCompare(NotebookSocket conn,
+                                           Message fromMessage) throws IOException {
     String noteId = (String) fromMessage.get("noteId");
     String revisionId = (String) fromMessage.get("revisionId");
     String position = (String) fromMessage.get("position");
-    getNotebookService()
-        .getNoteByRevisionForCompare(
-            noteId,
-            revisionId,
-            getServiceContext(fromMessage),
-            new WebSocketServiceCallback<Note>(conn) {
-              @Override
-              public void onSuccess(Note note, ServiceContext context) throws IOException {
-                super.onSuccess(note, context);
-                conn.send(
-                    serializeMessage(
-                        new Message(OP.NOTE_REVISION_FOR_COMPARE)
-                            .put("noteId", noteId)
-                            .put("revisionId", revisionId)
-                            .put("position", position)
-                            .put("note", note)));
-              }
-            });
+    getNotebookService().getNoteByRevisionForCompare(noteId, revisionId,
+        getServiceContext(fromMessage),
+        new WebSocketServiceCallback<Note>(conn) {
+          @Override
+          public void onSuccess(Note note, ServiceContext context) throws IOException {
+            super.onSuccess(note, context);
+            conn.send(serializeMessage(
+                new Message(OP.NOTE_REVISION_FOR_COMPARE).put("noteId", noteId)
+                    .put("revisionId", revisionId).put("position", position).put("note", note)));
+          }
+        });
   }
 
   /**
@@ -1897,12 +1687,8 @@ public class NotebookServer extends WebSocketServlet
    */
   @Override
   public void onOutputAppend(String noteId, String paragraphId, int index, String output) {
-    Message msg =
-        new Message(OP.PARAGRAPH_APPEND_OUTPUT)
-            .put("noteId", noteId)
-            .put("paragraphId", paragraphId)
-            .put("index", index)
-            .put("data", output);
+    Message msg = new Message(OP.PARAGRAPH_APPEND_OUTPUT).put("noteId", noteId)
+        .put("paragraphId", paragraphId).put("index", index).put("data", output);
     connectionManager.broadcast(noteId, msg);
   }
 
@@ -1912,15 +1698,10 @@ public class NotebookServer extends WebSocketServlet
    * @param output output to update (replace)
    */
   @Override
-  public void onOutputUpdated(
-      String noteId, String paragraphId, int index, InterpreterResult.Type type, String output) {
-    Message msg =
-        new Message(OP.PARAGRAPH_UPDATE_OUTPUT)
-            .put("noteId", noteId)
-            .put("paragraphId", paragraphId)
-            .put("index", index)
-            .put("type", type)
-            .put("data", output);
+  public void onOutputUpdated(String noteId, String paragraphId, int index,
+                              InterpreterResult.Type type, String output) {
+    Message msg = new Message(OP.PARAGRAPH_UPDATE_OUTPUT).put("noteId", noteId)
+        .put("paragraphId", paragraphId).put("index", index).put("type", type).put("data", output);
     Note note = notebook().getNote(noteId);
     if (note.isPersonalizedMode()) {
       String user = note.getParagraph(paragraphId).getUser();
@@ -1932,7 +1713,9 @@ public class NotebookServer extends WebSocketServlet
     }
   }
 
-  /** This callback is for the paragraph that runs on ZeppelinServer. */
+  /**
+   * This callback is for the paragraph that runs on ZeppelinServer.
+   */
   @Override
   public void onOutputClear(String noteId, String paragraphId) {
     Notebook notebook = notebook();
@@ -1942,69 +1725,51 @@ public class NotebookServer extends WebSocketServlet
     broadcastParagraph(note, paragraph);
   }
 
-  /** When application append output. */
+  /**
+   * When application append output.
+   */
   @Override
-  public void onOutputAppend(
-      String noteId, String paragraphId, int index, String appId, String output) {
+  public void 

<TRUNCATED>

[47/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/client/HttpBasedClient.java
----------------------------------------------------------------------
diff --git a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/client/HttpBasedClient.java b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/client/HttpBasedClient.java
index 722f0a4..f2a9f02 100644
--- a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/client/HttpBasedClient.java
+++ b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/client/HttpBasedClient.java
@@ -21,28 +21,34 @@ import com.google.common.base.Joiner;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.JsonParseException;
+
+import org.apache.commons.lang3.StringUtils;
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
 import com.mashape.unirest.http.HttpResponse;
 import com.mashape.unirest.http.JsonNode;
 import com.mashape.unirest.http.Unirest;
 import com.mashape.unirest.http.exceptions.UnirestException;
 import com.mashape.unirest.request.HttpRequest;
 import com.mashape.unirest.request.HttpRequestWithBody;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import org.apache.commons.lang3.StringUtils;
+
 import org.apache.zeppelin.elasticsearch.ElasticsearchInterpreter;
 import org.apache.zeppelin.elasticsearch.action.ActionException;
 import org.apache.zeppelin.elasticsearch.action.ActionResponse;
 import org.apache.zeppelin.elasticsearch.action.AggWrapper;
 import org.apache.zeppelin.elasticsearch.action.AggWrapper.AggregationType;
 import org.apache.zeppelin.elasticsearch.action.HitWrapper;
-import org.json.JSONArray;
-import org.json.JSONObject;
 
-/** Elasticsearch client using the HTTP API. */
+/**
+ * Elasticsearch client using the HTTP API.
+ */
 public class HttpBasedClient implements ElasticsearchClient {
   private static final String QUERY_STRING_TEMPLATE =
       "{ \"query\": { \"query_string\": { \"query\": \"_Q_\", \"analyze_wildcard\": \"true\" } } }";
@@ -112,11 +118,8 @@ public class HttpBasedClient implements ElasticsearchClient {
               } else {
                 // There are differences: to avoid problems with some special characters
                 // such as / and # in id, use a "terms" query
-                buffer
-                    .append("/_search?source=")
-                    .append(
-                        URLEncoder.encode(
-                            "{\"query\":{\"terms\":{\"_id\":[\"" + id + "\"]}}}", "UTF-8"));
+                buffer.append("/_search?source=").append(URLEncoder
+                      .encode("{\"query\":{\"terms\":{\"_id\":[\"" + id + "\"]}}}", "UTF-8"));
               }
             } else {
               buffer.append("/").append(id);
@@ -151,31 +154,28 @@ public class HttpBasedClient implements ElasticsearchClient {
       if (isSucceeded) {
         final JsonNode body = new JsonNode(result.getBody());
         if (body.getObject().has("_index")) {
-          response =
-              new ActionResponse()
-                  .succeeded(true)
-                  .hit(
-                      new HitWrapper(
-                          getFieldAsString(body, "_index"),
-                          getFieldAsString(body, "_type"),
-                          getFieldAsString(body, "_id"),
-                          getFieldAsString(body, "_source")));
+          response = new ActionResponse()
+              .succeeded(true)
+              .hit(new HitWrapper(
+                  getFieldAsString(body, "_index"),
+                  getFieldAsString(body, "_type"),
+                  getFieldAsString(body, "_id"),
+                  getFieldAsString(body, "_source")));
         } else {
           final JSONArray hits = getFieldAsArray(body.getObject(), "hits/hits");
           final JSONObject hit = (JSONObject) hits.iterator().next();
-          response =
-              new ActionResponse()
-                  .succeeded(true)
-                  .hit(
-                      new HitWrapper(
-                          hit.getString("_index"),
-                          hit.getString("_type"),
-                          hit.getString("_id"),
-                          hit.opt("_source").toString()));
+          response = new ActionResponse()
+              .succeeded(true)
+              .hit(new HitWrapper(
+                  hit.getString("_index"),
+                  hit.getString("_type"),
+                  hit.getString("_id"),
+                  hit.opt("_source").toString()));
         }
       } else {
         if (result.getStatus() == 404) {
-          response = new ActionResponse().succeeded(false);
+          response = new ActionResponse()
+              .succeeded(false);
         } else {
           throw new ActionException(result.getBody());
         }
@@ -200,15 +200,13 @@ public class HttpBasedClient implements ElasticsearchClient {
 
       if (isSucceeded) {
         final JsonNode body = new JsonNode(result.getBody());
-        response =
-            new ActionResponse()
-                .succeeded(true)
-                .hit(
-                    new HitWrapper(
-                        getFieldAsString(body, "_index"),
-                        getFieldAsString(body, "_type"),
-                        getFieldAsString(body, "_id"),
-                        null));
+        response = new ActionResponse()
+            .succeeded(true)
+            .hit(new HitWrapper(
+                getFieldAsString(body, "_index"),
+                getFieldAsString(body, "_type"),
+                getFieldAsString(body, "_id"),
+                null));
       } else {
         throw new ActionException(result.getBody());
       }
@@ -231,8 +229,7 @@ public class HttpBasedClient implements ElasticsearchClient {
       request
           .header("Accept", "application/json")
           .header("Content-Type", "application/json")
-          .body(data)
-          .getHttpRequest();
+          .body(data).getHttpRequest();
       if (StringUtils.isNotEmpty(username)) {
         request.basicAuth(username, password);
       }
@@ -241,15 +238,13 @@ public class HttpBasedClient implements ElasticsearchClient {
       final boolean isSucceeded = isSucceeded(result);
 
       if (isSucceeded) {
-        response =
-            new ActionResponse()
-                .succeeded(true)
-                .hit(
-                    new HitWrapper(
-                        getFieldAsString(result, "_index"),
-                        getFieldAsString(result, "_type"),
-                        getFieldAsString(result, "_id"),
-                        null));
+        response = new ActionResponse()
+            .succeeded(true)
+            .hit(new HitWrapper(
+                getFieldAsString(result, "_index"),
+                getFieldAsString(result, "_type"),
+                getFieldAsString(result, "_id"),
+                null));
       } else {
         throw new ActionException(result.getBody().toString());
       }
@@ -275,9 +270,9 @@ public class HttpBasedClient implements ElasticsearchClient {
     }
 
     try {
-      final HttpRequestWithBody request =
-          Unirest.post(getUrl(indices, types) + "/_search?size=" + size)
-              .header("Content-Type", "application/json");
+      final HttpRequestWithBody request = Unirest
+          .post(getUrl(indices, types) + "/_search?size=" + size)
+          .header("Content-Type", "application/json");
 
       if (StringUtils.isNoneEmpty(query)) {
         request.header("Accept", "application/json").body(query);
@@ -293,7 +288,9 @@ public class HttpBasedClient implements ElasticsearchClient {
       if (isSucceeded(result)) {
         final long total = getFieldAsLong(result, "hits/total");
 
-        response = new ActionResponse().succeeded(true).totalHits(total);
+        response = new ActionResponse()
+            .succeeded(true)
+            .totalHits(total);
 
         if (containsAggs(result)) {
           JSONObject aggregationsMap = body.getJSONObject("aggregations");
@@ -301,7 +298,7 @@ public class HttpBasedClient implements ElasticsearchClient {
             aggregationsMap = body.getJSONObject("aggs");
           }
 
-          for (final String key : aggregationsMap.keySet()) {
+          for (final String key: aggregationsMap.keySet()) {
             final JSONObject aggResult = aggregationsMap.getJSONObject(key);
             if (aggResult.has("buckets")) {
               // Multi-bucket aggregations
@@ -322,13 +319,13 @@ public class HttpBasedClient implements ElasticsearchClient {
 
           while (iter.hasNext()) {
             final JSONObject hit = (JSONObject) iter.next();
-            final Object data = hit.opt("_source") != null ? hit.opt("_source") : hit.opt("fields");
-            response.addHit(
-                new HitWrapper(
-                    hit.getString("_index"),
-                    hit.getString("_type"),
-                    hit.getString("_id"),
-                    data.toString()));
+            final Object data =
+                hit.opt("_source") != null ? hit.opt("_source") : hit.opt("fields");
+            response.addHit(new HitWrapper(
+                hit.getString("_index"),
+                hit.getString("_type"),
+                hit.getString("_id"),
+                data.toString()));
           }
         }
       } else {
@@ -342,13 +339,14 @@ public class HttpBasedClient implements ElasticsearchClient {
   }
 
   private boolean containsAggs(HttpResponse<JsonNode> result) {
-    return result.getBody() != null
-        && (result.getBody().getObject().has("aggregations")
-            || result.getBody().getObject().has("aggs"));
+    return result.getBody() != null &&
+        (result.getBody().getObject().has("aggregations") ||
+            result.getBody().getObject().has("aggs"));
   }
 
   @Override
-  public void close() {}
+  public void close() {
+  }
 
   @Override
   public String toString() {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/client/TransportBasedClient.java
----------------------------------------------------------------------
diff --git a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/client/TransportBasedClient.java b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/client/TransportBasedClient.java
index 0ea43cb..2af37bd 100644
--- a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/client/TransportBasedClient.java
+++ b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/client/TransportBasedClient.java
@@ -20,21 +20,8 @@ package org.apache.zeppelin.elasticsearch.client;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.JsonSyntaxException;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
+
 import org.apache.commons.lang3.StringUtils;
-import org.apache.zeppelin.elasticsearch.ElasticsearchInterpreter;
-import org.apache.zeppelin.elasticsearch.action.ActionResponse;
-import org.apache.zeppelin.elasticsearch.action.AggWrapper;
-import org.apache.zeppelin.elasticsearch.action.HitWrapper;
 import org.elasticsearch.action.delete.DeleteResponse;
 import org.elasticsearch.action.get.GetResponse;
 import org.elasticsearch.action.index.IndexResponse;
@@ -58,63 +45,96 @@ import org.elasticsearch.search.aggregations.bucket.InternalSingleBucketAggregat
 import org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation;
 import org.elasticsearch.search.aggregations.metrics.InternalMetricsAggregation;
 
-/** Elasticsearch client using the transport protocol. */
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import org.apache.zeppelin.elasticsearch.ElasticsearchInterpreter;
+import org.apache.zeppelin.elasticsearch.action.ActionResponse;
+import org.apache.zeppelin.elasticsearch.action.AggWrapper;
+import org.apache.zeppelin.elasticsearch.action.HitWrapper;
+
+/**
+ * Elasticsearch client using the transport protocol.
+ */
 public class TransportBasedClient implements ElasticsearchClient {
   private final Gson gson = new GsonBuilder().setPrettyPrinting().create();
   private final Client client;
 
   public TransportBasedClient(Properties props) throws UnknownHostException {
-    final String host = props.getProperty(ElasticsearchInterpreter.ELASTICSEARCH_HOST);
-    final int port =
-        Integer.parseInt(props.getProperty(ElasticsearchInterpreter.ELASTICSEARCH_PORT));
+    final String host =
+        props.getProperty(ElasticsearchInterpreter.ELASTICSEARCH_HOST);
+    final int port = Integer.parseInt(
+        props.getProperty(ElasticsearchInterpreter.ELASTICSEARCH_PORT));
     final String clusterName =
         props.getProperty(ElasticsearchInterpreter.ELASTICSEARCH_CLUSTER_NAME);
 
-    final Settings settings =
-        Settings.settingsBuilder().put("cluster.name", clusterName).put(props).build();
+    final Settings settings = Settings.settingsBuilder()
+        .put("cluster.name", clusterName)
+        .put(props)
+        .build();
 
-    client =
-        TransportClient.builder()
-            .settings(settings)
-            .build()
-            .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(host), port));
+    client = TransportClient.builder().settings(settings).build()
+        .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(host), port));
   }
 
   @Override
   public ActionResponse get(String index, String type, String id) {
-    final GetResponse getResp = client.prepareGet(index, type, id).get();
+    final GetResponse getResp = client
+        .prepareGet(index, type, id)
+        .get();
 
     return new ActionResponse()
         .succeeded(getResp.isExists())
-        .hit(
-            new HitWrapper(
-                getResp.getIndex(),
-                getResp.getType(),
-                getResp.getId(),
-                getResp.getSourceAsString()));
+        .hit(new HitWrapper(
+            getResp.getIndex(),
+            getResp.getType(),
+            getResp.getId(),
+            getResp.getSourceAsString()));
   }
 
   @Override
   public ActionResponse delete(String index, String type, String id) {
-    final DeleteResponse delResp = client.prepareDelete(index, type, id).get();
+    final DeleteResponse delResp = client
+        .prepareDelete(index, type, id)
+        .get();
 
     return new ActionResponse()
         .succeeded(delResp.isFound())
-        .hit(new HitWrapper(delResp.getIndex(), delResp.getType(), delResp.getId(), null));
+        .hit(new HitWrapper(
+            delResp.getIndex(),
+            delResp.getType(),
+            delResp.getId(),
+            null));
   }
 
   @Override
   public ActionResponse index(String index, String type, String id, String data) {
-    final IndexResponse idxResp = client.prepareIndex(index, type, id).setSource(data).get();
+    final IndexResponse idxResp = client
+        .prepareIndex(index, type, id)
+        .setSource(data)
+        .get();
 
     return new ActionResponse()
         .succeeded(idxResp.isCreated())
-        .hit(new HitWrapper(idxResp.getIndex(), idxResp.getType(), idxResp.getId(), null));
+        .hit(new HitWrapper(
+            idxResp.getIndex(),
+            idxResp.getType(),
+            idxResp.getId(),
+            null));
   }
 
   @Override
   public ActionResponse search(String[] indices, String[] types, String query, int size) {
-    final SearchRequestBuilder reqBuilder = new SearchRequestBuilder(client, SearchAction.INSTANCE);
+    final SearchRequestBuilder reqBuilder = new SearchRequestBuilder(
+        client, SearchAction.INSTANCE);
     reqBuilder.setIndices();
 
     if (indices != null) {
@@ -141,13 +161,14 @@ public class TransportBasedClient implements ElasticsearchClient {
 
     final SearchResponse searchResp = reqBuilder.get();
 
-    final ActionResponse actionResp =
-        new ActionResponse().succeeded(true).totalHits(searchResp.getHits().getTotalHits());
+    final ActionResponse actionResp = new ActionResponse()
+        .succeeded(true)
+        .totalHits(searchResp.getHits().getTotalHits());
 
     if (searchResp.getAggregations() != null) {
       setAggregations(searchResp.getAggregations(), actionResp);
     } else {
-      for (final SearchHit hit : searchResp.getHits()) {
+      for (final SearchHit hit: searchResp.getHits()) {
         // Fields can be found either in _source, or in fields (it depends on the query)
         // => specific for elasticsearch's version < 5
         //
@@ -172,15 +193,11 @@ public class TransportBasedClient implements ElasticsearchClient {
     final Aggregation agg = aggregations.asList().get(0);
 
     if (agg instanceof InternalMetricsAggregation) {
-      actionResp.addAggregation(
-          new AggWrapper(
-              AggWrapper.AggregationType.SIMPLE,
-              XContentHelper.toString((InternalMetricsAggregation) agg).toString()));
+      actionResp.addAggregation(new AggWrapper(AggWrapper.AggregationType.SIMPLE,
+          XContentHelper.toString((InternalMetricsAggregation) agg).toString()));
     } else if (agg instanceof InternalSingleBucketAggregation) {
-      actionResp.addAggregation(
-          new AggWrapper(
-              AggWrapper.AggregationType.SIMPLE,
-              XContentHelper.toString((InternalSingleBucketAggregation) agg).toString()));
+      actionResp.addAggregation(new AggWrapper(AggWrapper.AggregationType.SIMPLE,
+          XContentHelper.toString((InternalSingleBucketAggregation) agg).toString()));
     } else if (agg instanceof InternalMultiBucketAggregation) {
       final Set<String> headerKeys = new HashSet<>();
       final List<Map<String, Object>> buckets = new LinkedList<>();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/elasticsearch/src/test/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreterTest.java
----------------------------------------------------------------------
diff --git a/elasticsearch/src/test/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreterTest.java b/elasticsearch/src/test/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreterTest.java
index c6e7966..4a412aa 100644
--- a/elasticsearch/src/test/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreterTest.java
+++ b/elasticsearch/src/test/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreterTest.java
@@ -21,6 +21,20 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
+import org.apache.commons.lang.math.RandomUtils;
+import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
+import org.elasticsearch.client.Client;
+import org.elasticsearch.common.settings.Settings;
+import org.elasticsearch.node.Node;
+import org.elasticsearch.node.NodeBuilder;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.experimental.theories.DataPoint;
+import org.junit.experimental.theories.Theories;
+import org.junit.experimental.theories.Theory;
+import org.junit.runner.RunWith;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -29,25 +43,13 @@ import java.util.List;
 import java.util.Properties;
 import java.util.UUID;
 import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.commons.lang.math.RandomUtils;
+
 import org.apache.zeppelin.completer.CompletionType;
 import org.apache.zeppelin.display.AngularObjectRegistry;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.InterpreterResult.Code;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
-import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
-import org.elasticsearch.client.Client;
-import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.node.Node;
-import org.elasticsearch.node.NodeBuilder;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.experimental.theories.DataPoint;
-import org.junit.experimental.theories.Theories;
-import org.junit.experimental.theories.Theory;
-import org.junit.runner.RunWith;
 
 @RunWith(Theories.class)
 public class ElasticsearchInterpreterTest {
@@ -57,8 +59,8 @@ public class ElasticsearchInterpreterTest {
   private static Client elsClient;
   private static Node elsNode;
 
-  private static final String[] METHODS = {"GET", "PUT", "DELETE", "POST"};
-  private static final int[] STATUS = {200, 404, 500, 403};
+  private static final String[] METHODS = { "GET", "PUT", "DELETE", "POST" };
+  private static final int[] STATUS = { 200, 404, 500, 403 };
 
   private static final String ELS_CLUSTER_NAME = "zeppelin-elasticsearch-interpreter-test";
   private static final String ELS_HOST = "localhost";
@@ -70,8 +72,7 @@ public class ElasticsearchInterpreterTest {
 
   @BeforeClass
   public static void populate() throws IOException {
-    final Settings settings =
-        Settings.settingsBuilder()
+    final Settings settings = Settings.settingsBuilder()
             .put("cluster.name", ELS_CLUSTER_NAME)
             .put("network.host", ELS_HOST)
             .put("http.port", ELS_HTTP_PORT)
@@ -82,58 +83,46 @@ public class ElasticsearchInterpreterTest {
     elsNode = NodeBuilder.nodeBuilder().settings(settings).node();
     elsClient = elsNode.client();
 
-    elsClient
-        .admin()
-        .indices()
-        .prepareCreate("logs")
-        .addMapping(
-            "http",
-            jsonBuilder()
-                .startObject()
-                .startObject("http")
-                .startObject("properties")
-                .startObject("content_length")
-                .field("type", "integer")
-                .endObject()
-                .endObject()
-                .endObject()
-                .endObject())
-        .get();
+    elsClient.admin().indices().prepareCreate("logs")
+      .addMapping("http", jsonBuilder()
+        .startObject().startObject("http").startObject("properties")
+          .startObject("content_length")
+            .field("type", "integer")
+          .endObject()
+        .endObject().endObject().endObject()).get();
 
     for (int i = 0; i < 48; i++) {
-      elsClient
-          .prepareIndex("logs", "http", "" + i)
-          .setRefresh(true)
-          .setSource(
-              jsonBuilder()
-                  .startObject()
-                  .field("date", new Date())
-                  .startObject("request")
-                  .field("method", METHODS[RandomUtils.nextInt(METHODS.length)])
-                  .field("url", "/zeppelin/" + UUID.randomUUID().toString())
-                  .field("headers", Arrays.asList("Accept: *.*", "Host: apache.org"))
-                  .endObject()
-                  .field("status", STATUS[RandomUtils.nextInt(STATUS.length)])
-                  .field("content_length", RandomUtils.nextInt(2000)))
-          .get();
+      elsClient.prepareIndex("logs", "http", "" + i)
+        .setRefresh(true)
+        .setSource(jsonBuilder()
+          .startObject()
+            .field("date", new Date())
+            .startObject("request")
+              .field("method", METHODS[RandomUtils.nextInt(METHODS.length)])
+              .field("url", "/zeppelin/" + UUID.randomUUID().toString())
+              .field("headers", Arrays.asList("Accept: *.*", "Host: apache.org"))
+            .endObject()
+            .field("status", STATUS[RandomUtils.nextInt(STATUS.length)])
+            .field("content_length", RandomUtils.nextInt(2000))
+          )
+        .get();
     }
 
     for (int i = 1; i < 3; i++) {
-      elsClient
-          .prepareIndex("logs", "http", "very/strange/id#" + i)
-          .setRefresh(true)
-          .setSource(
-              jsonBuilder()
-                  .startObject()
-                  .field("date", new Date())
-                  .startObject("request")
-                  .field("method", METHODS[RandomUtils.nextInt(METHODS.length)])
-                  .field("url", "/zeppelin/" + UUID.randomUUID().toString())
-                  .field("headers", Arrays.asList("Accept: *.*", "Host: apache.org"))
-                  .endObject()
-                  .field("status", STATUS[RandomUtils.nextInt(STATUS.length)])
-                  .field("content_length", RandomUtils.nextInt(2000)))
-          .get();
+      elsClient.prepareIndex("logs", "http", "very/strange/id#" + i)
+        .setRefresh(true)
+        .setSource(jsonBuilder()
+            .startObject()
+              .field("date", new Date())
+              .startObject("request")
+                .field("method", METHODS[RandomUtils.nextInt(METHODS.length)])
+                .field("url", "/zeppelin/" + UUID.randomUUID().toString())
+                .field("headers", Arrays.asList("Accept: *.*", "Host: apache.org"))
+              .endObject()
+              .field("status", STATUS[RandomUtils.nextInt(STATUS.length)])
+              .field("content_length", RandomUtils.nextInt(2000))
+            )
+        .get();
     }
 
     final Properties props = new Properties();
@@ -192,8 +181,8 @@ public class ElasticsearchInterpreterTest {
     assertNotNull(ctx.getAngularObjectRegistry().get("count_testCount", null, null));
     assertEquals(50L, ctx.getAngularObjectRegistry().get("count_testCount", null, null).get());
 
-    res =
-        interpreter.interpret("count /logs { \"query\": { \"match\": { \"status\": 500 } } }", ctx);
+    res = interpreter.interpret("count /logs { \"query\": { \"match\": { \"status\": 500 } } }",
+            ctx);
     assertEquals(Code.SUCCESS, res.code());
   }
 
@@ -230,19 +219,15 @@ public class ElasticsearchInterpreterTest {
     res = interpreter.interpret("search /logs {{{hello}}}", ctx);
     assertEquals(Code.ERROR, res.code());
 
-    res =
-        interpreter.interpret(
-            "search /logs { \"query\": { \"match\": { \"status\": 500 } } }", ctx);
+    res = interpreter.interpret("search /logs { \"query\": { \"match\": { \"status\": 500 } } }",
+            ctx);
     assertEquals(Code.SUCCESS, res.code());
 
     res = interpreter.interpret("search /logs status:404", ctx);
     assertEquals(Code.SUCCESS, res.code());
 
-    res =
-        interpreter.interpret(
-            "search /logs { \"fields\": [ \"date\", \"request.headers\" ], "
-                + "\"query\": { \"match\": { \"status\": 500 } } }",
-            ctx);
+    res = interpreter.interpret("search /logs { \"fields\": [ \"date\", \"request.headers\" ], " +
+            "\"query\": { \"match\": { \"status\": 500 } } }", ctx);
     assertEquals(Code.SUCCESS, res.code());
   }
 
@@ -251,75 +236,50 @@ public class ElasticsearchInterpreterTest {
     final InterpreterContext ctx = buildContext("agg");
 
     // Single-value metric
-    InterpreterResult res =
-        interpreter.interpret(
-            "search /logs { \"aggs\" : "
-                + "{ \"distinct_status_count\" : "
-                + " { \"cardinality\" : { \"field\" : \"status\" } } } }",
-            ctx);
+    InterpreterResult res = interpreter.interpret("search /logs { \"aggs\" : " +
+            "{ \"distinct_status_count\" : " +
+            " { \"cardinality\" : { \"field\" : \"status\" } } } }", ctx);
     assertEquals(Code.SUCCESS, res.code());
 
     // Multi-value metric
-    res =
-        interpreter.interpret(
-            "search /logs { \"aggs\" : { \"content_length_stats\" : "
-                + " { \"extended_stats\" : { \"field\" : \"content_length\" } } } }",
-            ctx);
+    res = interpreter.interpret("search /logs { \"aggs\" : { \"content_length_stats\" : " +
+            " { \"extended_stats\" : { \"field\" : \"content_length\" } } } }", ctx);
     assertEquals(Code.SUCCESS, res.code());
 
     // Single bucket
-    res =
-        interpreter.interpret(
-            "search /logs { \"aggs\" : { "
-                + " \"200_OK\" : { \"filter\" : { \"term\": { \"status\": \"200\" } }, "
-                + "   \"aggs\" : { \"avg_length\" : { \"avg\" : "
-                + "{ \"field\" : \"content_length\" } } } } } }",
-            ctx);
+    res = interpreter.interpret("search /logs { \"aggs\" : { " +
+            " \"200_OK\" : { \"filter\" : { \"term\": { \"status\": \"200\" } }, " +
+            "   \"aggs\" : { \"avg_length\" : { \"avg\" : " +
+            "{ \"field\" : \"content_length\" } } } } } }", ctx);
     assertEquals(Code.SUCCESS, res.code());
 
     // Multi-buckets
-    res =
-        interpreter.interpret(
-            "search /logs { \"aggs\" : { \"status_count\" : "
-                + " { \"terms\" : { \"field\" : \"status\" } } } }",
-            ctx);
+    res = interpreter.interpret("search /logs { \"aggs\" : { \"status_count\" : " +
+            " { \"terms\" : { \"field\" : \"status\" } } } }", ctx);
     assertEquals(Code.SUCCESS, res.code());
 
-    res =
-        interpreter.interpret(
-            "search /logs { \"aggs\" : { "
-                + " \"length\" : { \"terms\": { \"field\": \"status\" }, "
-                + "   \"aggs\" : { \"sum_length\" : { \"sum\" : { \"field\" : \"content_length\" } }, "
-                + "\"sum_status\" : { \"sum\" : { \"field\" : \"status\" } } } } } }",
-            ctx);
+    res = interpreter.interpret("search /logs { \"aggs\" : { " +
+            " \"length\" : { \"terms\": { \"field\": \"status\" }, " +
+            "   \"aggs\" : { \"sum_length\" : { \"sum\" : { \"field\" : \"content_length\" } }, " +
+            "\"sum_status\" : { \"sum\" : { \"field\" : \"status\" } } } } } }", ctx);
     assertEquals(Code.SUCCESS, res.code());
   }
 
   @Theory
   public void testIndex(ElasticsearchInterpreter interpreter) {
-    InterpreterResult res =
-        interpreter.interpret(
-            "index /logs { \"date\": \""
-                + new Date()
-                + "\", \"method\": \"PUT\", \"status\": \"500\" }",
-            null);
+    InterpreterResult res = interpreter.interpret("index /logs { \"date\": \"" + new Date() +
+            "\", \"method\": \"PUT\", \"status\": \"500\" }", null);
     assertEquals(Code.ERROR, res.code());
 
     res = interpreter.interpret("index /logs/http { bad ", null);
     assertEquals(Code.ERROR, res.code());
 
-    res =
-        interpreter.interpret(
-            "index /logs/http { \"date\": \"2015-12-06T14:54:23.368Z\", "
-                + "\"method\": \"PUT\", \"status\": \"500\" }",
-            null);
+    res = interpreter.interpret("index /logs/http { \"date\": \"2015-12-06T14:54:23.368Z\", " +
+            "\"method\": \"PUT\", \"status\": \"500\" }", null);
     assertEquals(Code.SUCCESS, res.code());
 
-    res =
-        interpreter.interpret(
-            "index /logs/http/1000 { \"date\": "
-                + "\"2015-12-06T14:54:23.368Z\", \"method\": \"PUT\", \"status\": \"500\" }",
-            null);
+    res = interpreter.interpret("index /logs/http/1000 { \"date\": " +
+            "\"2015-12-06T14:54:23.368Z\", \"method\": \"PUT\", \"status\": \"500\" }", null);
     assertEquals(Code.SUCCESS, res.code());
   }
 
@@ -348,10 +308,10 @@ public class ElasticsearchInterpreterTest {
 
   @Theory
   public void testCompletion(ElasticsearchInterpreter interpreter) {
-    final List<InterpreterCompletion> expectedResultOne =
-        Arrays.asList(new InterpreterCompletion("count", "count", CompletionType.command.name()));
-    final List<InterpreterCompletion> expectedResultTwo =
-        Arrays.asList(new InterpreterCompletion("help", "help", CompletionType.command.name()));
+    final List<InterpreterCompletion> expectedResultOne = Arrays.asList(
+            new InterpreterCompletion("count", "count", CompletionType.command.name()));
+    final List<InterpreterCompletion> expectedResultTwo = Arrays.asList(
+            new InterpreterCompletion("help", "help", CompletionType.command.name()));
 
     final List<InterpreterCompletion> resultOne = interpreter.completion("co", 0, null);
     final List<InterpreterCompletion> resultTwo = interpreter.completion("he", 0, null);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/file/pom.xml
----------------------------------------------------------------------
diff --git a/file/pom.xml b/file/pom.xml
index e649991..ed0ef3f 100644
--- a/file/pom.xml
+++ b/file/pom.xml
@@ -91,6 +91,13 @@
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/file/src/main/java/org/apache/zeppelin/file/FileInterpreter.java
----------------------------------------------------------------------
diff --git a/file/src/main/java/org/apache/zeppelin/file/FileInterpreter.java b/file/src/main/java/org/apache/zeppelin/file/FileInterpreter.java
index fc2096f..eea5650 100644
--- a/file/src/main/java/org/apache/zeppelin/file/FileInterpreter.java
+++ b/file/src/main/java/org/apache/zeppelin/file/FileInterpreter.java
@@ -1,19 +1,26 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.file;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.ArrayList;
@@ -21,6 +28,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Properties;
 import java.util.StringTokenizer;
+
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -30,10 +38,11 @@ import org.apache.zeppelin.interpreter.InterpreterResult.Type;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** File interpreter for Zeppelin. */
+/**
+ * File interpreter for Zeppelin.
+ *
+ */
 public abstract class FileInterpreter extends Interpreter {
   Logger logger = LoggerFactory.getLogger(FileInterpreter.class);
   String currentDir = null;
@@ -44,7 +53,9 @@ public abstract class FileInterpreter extends Interpreter {
     currentDir = new String("/");
   }
 
-  /** Handling the arguments of the command. */
+  /**
+   * Handling the arguments of the command.
+   */
   public class CommandArgs {
     public String input = null;
     public String command = null;
@@ -58,12 +69,12 @@ public abstract class FileInterpreter extends Interpreter {
     }
 
     private void parseArg(String arg) {
-      if (arg.charAt(0) == '-') { // handle flags
+      if (arg.charAt(0) == '-') {                   // handle flags
         for (int i = 0; i < arg.length(); i++) {
           Character c = arg.charAt(i);
           flags.add(c);
         }
-      } else { // handle other args
+      } else {                                      // handle other args
         args.add(arg);
       }
     }
@@ -88,7 +99,7 @@ public abstract class FileInterpreter extends Interpreter {
   public abstract boolean isDirectory(String path);
 
   // Combine paths, takes care of arguments such as ..
-  protected String getNewPath(String argument) {
+  protected String getNewPath(String argument){
     Path arg = Paths.get(argument);
     Path ret = arg.isAbsolute() ? arg : Paths.get(currentDir, argument);
     return ret.normalize().toString();
@@ -134,7 +145,8 @@ public abstract class FileInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+  }
 
   @Override
   public FormType getFormType() {
@@ -148,13 +160,13 @@ public abstract class FileInterpreter extends Interpreter {
 
   @Override
   public Scheduler getScheduler() {
-    return SchedulerFactory.singleton()
-        .createOrGetFIFOScheduler(FileInterpreter.class.getName() + this.hashCode());
+    return SchedulerFactory.singleton().createOrGetFIFOScheduler(
+        FileInterpreter.class.getName() + this.hashCode());
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return null;
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/file/src/main/java/org/apache/zeppelin/file/HDFSCommand.java
----------------------------------------------------------------------
diff --git a/file/src/main/java/org/apache/zeppelin/file/HDFSCommand.java b/file/src/main/java/org/apache/zeppelin/file/HDFSCommand.java
index 7c70eb7..6b3dc4b 100644
--- a/file/src/main/java/org/apache/zeppelin/file/HDFSCommand.java
+++ b/file/src/main/java/org/apache/zeppelin/file/HDFSCommand.java
@@ -1,35 +1,47 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.file;
 
+import org.slf4j.Logger;
+
 import java.io.BufferedReader;
 import java.io.InputStreamReader;
 import java.net.HttpURLConnection;
 import java.net.URL;
+
 import javax.ws.rs.core.UriBuilder;
-import org.slf4j.Logger;
 
-/** Definition and HTTP invocation methods for all WebHDFS commands. */
+/**
+ * Definition and HTTP invocation methods for all WebHDFS commands.
+ */
 public class HDFSCommand {
-  /** Type of HTTP request. */
+  /**
+   * Type of HTTP request.
+   */
   public enum HttpType {
     GET,
     PUT
   }
 
-  /** Definition of WebHDFS operator. */
+  /**
+   * Definition of WebHDFS operator.
+   */
   public class Op {
     public String op;
     public HttpType cmd;
@@ -42,7 +54,9 @@ public class HDFSCommand {
     }
   }
 
-  /** Definition of argument to an operator. */
+  /**
+   * Definition of argument to an operator.
+   */
   public class Arg {
     public String key;
     public String value;
@@ -72,9 +86,11 @@ public class HDFSCommand {
   }
 
   public String checkArgs(Op op, String path, Arg[] args) throws Exception {
-    if (op == null
-        || path == null
-        || (op.minArgs > 0 && (args == null || args.length != op.minArgs))) {
+    if (op == null ||
+        path == null ||
+        (op.minArgs > 0 &&
+            (args == null ||
+                args.length != op.minArgs))) {
       String a = "";
       a = (op != null) ? a + op.op + "\n" : a;
       a = (path != null) ? a + path + "\n" : a;
@@ -94,7 +110,10 @@ public class HDFSCommand {
     }
 
     // Build URI
-    UriBuilder builder = UriBuilder.fromPath(url).path(path).queryParam("op", op.op);
+    UriBuilder builder = UriBuilder
+        .fromPath(url)
+        .path(path)
+        .queryParam("op", op.op);
 
     if (args != null) {
       for (Arg a : args) {
@@ -113,7 +132,8 @@ public class HDFSCommand {
       logger.info("Sending 'GET' request to URL : " + hdfsUrl);
       logger.info("Response Code : " + responseCode);
       StringBuffer response = new StringBuffer();
-      try (BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); ) {
+      try (BufferedReader in = new BufferedReader(
+              new InputStreamReader(con.getInputStream()));) {
         String inputLine;
         while ((inputLine = in.readLine()) != null) {
           response.append(inputLine);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/file/src/main/java/org/apache/zeppelin/file/HDFSFileInterpreter.java
----------------------------------------------------------------------
diff --git a/file/src/main/java/org/apache/zeppelin/file/HDFSFileInterpreter.java b/file/src/main/java/org/apache/zeppelin/file/HDFSFileInterpreter.java
index 3d33e06..b27dcb6 100644
--- a/file/src/main/java/org/apache/zeppelin/file/HDFSFileInterpreter.java
+++ b/file/src/main/java/org/apache/zeppelin/file/HDFSFileInterpreter.java
@@ -1,33 +1,42 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.file;
 
 import com.google.gson.Gson;
+
 import com.google.gson.annotations.SerializedName;
+import org.apache.commons.lang.StringUtils;
+
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import java.util.Properties;
-import org.apache.commons.lang.StringUtils;
+
 import org.apache.zeppelin.completer.CompletionType;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 
-/** HDFS implementation of File interpreter for Zeppelin. */
+/**
+ * HDFS implementation of File interpreter for Zeppelin.
+ */
 public class HDFSFileInterpreter extends FileInterpreter {
   static final String HDFS_URL = "hdfs.url";
   static final String HDFS_USER = "hdfs.user";
@@ -45,7 +54,7 @@ public class HDFSFileInterpreter extends FileInterpreter {
     gson = new Gson();
   }
 
-  public HDFSFileInterpreter(Properties property) {
+  public HDFSFileInterpreter(Properties property){
     super(property);
     prepare();
   }
@@ -53,7 +62,7 @@ public class HDFSFileInterpreter extends FileInterpreter {
   /**
    * Status of one file.
    *
-   * <p>matches returned JSON
+   * matches returned JSON
    */
   public class OneFileStatus {
     public long accessTime;
@@ -92,7 +101,7 @@ public class HDFSFileInterpreter extends FileInterpreter {
   /**
    * Status of one file.
    *
-   * <p>matches returned JSON
+   * matches returned JSON
    */
   public class SingleFileStatus {
     @SerializedName("FileStatus")
@@ -102,7 +111,7 @@ public class HDFSFileInterpreter extends FileInterpreter {
   /**
    * Status of all files in a directory.
    *
-   * <p>matches returned JSON
+   * matches returned JSON
    */
   public class MultiFileStatus {
     @SerializedName("FileStatus")
@@ -112,7 +121,7 @@ public class HDFSFileInterpreter extends FileInterpreter {
   /**
    * Status of all files in a directory.
    *
-   * <p>matches returned JSON
+   * matches returned JSON
    */
   public class AllFileStatus {
     @SerializedName("FileStatuses")
@@ -137,25 +146,26 @@ public class HDFSFileInterpreter extends FileInterpreter {
   }
 
   @Override
-  public void close() {}
+  public void close() {
+  }
 
   private String listDir(String path) throws Exception {
     return cmd.runCommand(cmd.listStatus, path, null);
   }
 
-  private String listPermission(OneFileStatus fs) {
+  private String listPermission(OneFileStatus fs){
     StringBuilder sb = new StringBuilder();
     sb.append(fs.type.equalsIgnoreCase("Directory") ? 'd' : '-');
     int p = Integer.parseInt(fs.permission, 16);
     sb.append(((p & 0x400) == 0) ? '-' : 'r');
     sb.append(((p & 0x200) == 0) ? '-' : 'w');
     sb.append(((p & 0x100) == 0) ? '-' : 'x');
-    sb.append(((p & 0x40) == 0) ? '-' : 'r');
-    sb.append(((p & 0x20) == 0) ? '-' : 'w');
-    sb.append(((p & 0x10) == 0) ? '-' : 'x');
-    sb.append(((p & 0x4) == 0) ? '-' : 'r');
-    sb.append(((p & 0x2) == 0) ? '-' : 'w');
-    sb.append(((p & 0x1) == 0) ? '-' : 'x');
+    sb.append(((p & 0x40)  == 0) ? '-' : 'r');
+    sb.append(((p & 0x20)  == 0) ? '-' : 'w');
+    sb.append(((p & 0x10)  == 0) ? '-' : 'x');
+    sb.append(((p & 0x4)   == 0) ? '-' : 'r');
+    sb.append(((p & 0x2)   == 0) ? '-' : 'w');
+    sb.append(((p & 0x1)   == 0) ? '-' : 'x');
     return sb.toString();
   }
 
@@ -170,7 +180,7 @@ public class HDFSFileInterpreter extends FileInterpreter {
       sb.append(((fs.replication == 0) ? "-" : fs.replication) + "\t ");
       sb.append(fs.owner + "\t");
       sb.append(fs.group + "\t");
-      if (args.flags.contains(new Character('h'))) { // human readable
+      if (args.flags.contains(new Character('h'))){ //human readable
         sb.append(humanReadableByteCount(fs.length) + "\t\t");
       } else {
         sb.append(fs.length + "\t");
@@ -214,19 +224,17 @@ public class HDFSFileInterpreter extends FileInterpreter {
     }
 
     try {
-      // see if directory.
+      //see if directory.
       if (isDirectory(path)) {
         String sfs = listDir(path);
         if (sfs != null) {
           AllFileStatus allFiles = gson.fromJson(sfs, AllFileStatus.class);
 
-          if (allFiles != null
-              && allFiles.fileStatuses != null
-              && allFiles.fileStatuses.fileStatus != null) {
-            int length =
-                cmd.maxLength < allFiles.fileStatuses.fileStatus.length
-                    ? cmd.maxLength
-                    : allFiles.fileStatuses.fileStatus.length;
+          if (allFiles != null &&
+                  allFiles.fileStatuses != null &&
+                  allFiles.fileStatuses.fileStatus != null) {
+            int length = cmd.maxLength < allFiles.fileStatuses.fileStatus.length ? cmd.maxLength :
+                    allFiles.fileStatuses.fileStatus.length;
             for (int index = 0; index < length; index++) {
               OneFileStatus fs = allFiles.fileStatuses.fileStatus[index];
               all = all + listOne(path, fs) + '\n';
@@ -263,8 +271,8 @@ public class HDFSFileInterpreter extends FileInterpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     logger.info("Completion request at position\t" + cursor + " in string " + buf);
     final List<InterpreterCompletion> suggestions = new ArrayList<>();
     if (StringUtils.isEmpty(buf)) {
@@ -274,16 +282,19 @@ public class HDFSFileInterpreter extends FileInterpreter {
       return suggestions;
     }
 
-    // part of a command == no spaces
-    if (buf.split(" ").length == 1) {
+    //part of a command == no spaces
+    if (buf.split(" ").length == 1){
       if ("cd".contains(buf)) {
-        suggestions.add(new InterpreterCompletion("cd", "cd", CompletionType.command.name()));
+        suggestions.add(new InterpreterCompletion("cd", "cd",
+                CompletionType.command.name()));
       }
       if ("ls".contains(buf)) {
-        suggestions.add(new InterpreterCompletion("ls", "ls", CompletionType.command.name()));
+        suggestions.add(new InterpreterCompletion("ls", "ls",
+                CompletionType.command.name()));
       }
       if ("pwd".contains(buf)) {
-        suggestions.add(new InterpreterCompletion("pwd", "pwd", CompletionType.command.name()));
+        suggestions.add(new InterpreterCompletion("pwd", "pwd",
+                CompletionType.command.name()));
       }
 
       return suggestions;
@@ -291,36 +302,35 @@ public class HDFSFileInterpreter extends FileInterpreter {
 
     // last word will contain the path we're working with.
     String lastToken = buf.substring(buf.lastIndexOf(" ") + 1);
-    if (lastToken.startsWith("-")) { // flag not path
+    if (lastToken.startsWith("-")) { //flag not path
       return null;
     }
 
-    String localPath = ""; // all things before the last '/'
-    String unfinished = lastToken; // unfished filenames or directories
+    String localPath = ""; //all things before the last '/'
+    String unfinished = lastToken; //unfished filenames or directories
     if (lastToken.contains("/")) {
       localPath = lastToken.substring(0, lastToken.lastIndexOf('/') + 1);
       unfinished = lastToken.substring(lastToken.lastIndexOf('/') + 1);
     }
-    String globalPath = getNewPath(localPath); // adjust for cwd
+    String globalPath = getNewPath(localPath); //adjust for cwd
 
-    if (isDirectory(globalPath)) {
+    if (isDirectory(globalPath)){
       try {
         String fileStatusString = listDir(globalPath);
         if (fileStatusString != null) {
           AllFileStatus allFiles = gson.fromJson(fileStatusString, AllFileStatus.class);
 
-          if (allFiles != null
-              && allFiles.fileStatuses != null
-              && allFiles.fileStatuses.fileStatus != null) {
+          if (allFiles != null &&
+                  allFiles.fileStatuses != null &&
+                  allFiles.fileStatuses.fileStatus != null) {
             for (OneFileStatus fs : allFiles.fileStatuses.fileStatus) {
               if (fs.pathSuffix.contains(unfinished)) {
-                // only suggest the text after the last .
+                //only suggest the text after the last .
                 String beforeLastPeriod = unfinished.substring(0, unfinished.lastIndexOf('.') + 1);
-                // beforeLastPeriod should be the start of fs.pathSuffix, so take the end of it.
+                //beforeLastPeriod should be the start of fs.pathSuffix, so take the end of it.
                 String suggestedFinish = fs.pathSuffix.substring(beforeLastPeriod.length());
-                suggestions.add(
-                    new InterpreterCompletion(
-                        suggestedFinish, suggestedFinish, CompletionType.path.name()));
+                suggestions.add(new InterpreterCompletion(suggestedFinish, suggestedFinish,
+                    CompletionType.path.name()));
               }
             }
             return suggestions;
@@ -334,7 +344,7 @@ public class HDFSFileInterpreter extends FileInterpreter {
       logger.info("path is not a directory.  No values suggested.");
     }
 
-    // Error in string.
+    //Error in string.
     return null;
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/file/src/test/java/org/apache/zeppelin/file/HDFSFileInterpreterTest.java
----------------------------------------------------------------------
diff --git a/file/src/test/java/org/apache/zeppelin/file/HDFSFileInterpreterTest.java b/file/src/test/java/org/apache/zeppelin/file/HDFSFileInterpreterTest.java
index 6267245..aa69886 100644
--- a/file/src/test/java/org/apache/zeppelin/file/HDFSFileInterpreterTest.java
+++ b/file/src/test/java/org/apache/zeppelin/file/HDFSFileInterpreterTest.java
@@ -1,34 +1,44 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.file;
 
 import static org.junit.Assert.assertNull;
 
 import com.google.gson.Gson;
+
+import junit.framework.TestCase;
+
+import org.junit.Test;
+import org.slf4j.Logger;
+
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Properties;
-import junit.framework.TestCase;
+
 import org.apache.zeppelin.completer.CompletionType;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
-import org.junit.Test;
-import org.slf4j.Logger;
 
-/** Tests Interpreter by running pre-determined commands against mock file system. */
+/**
+ * Tests Interpreter by running pre-determined commands against mock file system.
+ */
 public class HDFSFileInterpreterTest extends TestCase {
   @Test
   public void testMaxLength() {
@@ -111,10 +121,10 @@ public class HDFSFileInterpreterTest extends TestCase {
     assertEquals(result1.message().get(0).getData(), result11.message().get(0).getData());
 
     // auto completion test
-    List expectedResultOne =
-        Arrays.asList(new InterpreterCompletion("ls", "ls", CompletionType.command.name()));
-    List expectedResultTwo =
-        Arrays.asList(new InterpreterCompletion("pwd", "pwd", CompletionType.command.name()));
+    List expectedResultOne = Arrays.asList(
+            new InterpreterCompletion("ls", "ls", CompletionType.command.name()));
+    List expectedResultTwo = Arrays.asList(
+            new InterpreterCompletion("pwd", "pwd", CompletionType.command.name()));
     List<InterpreterCompletion> resultOne = t.completion("l", 0, null);
     List<InterpreterCompletion> resultTwo = t.completion("p", 0, null);
 
@@ -125,93 +135,93 @@ public class HDFSFileInterpreterTest extends TestCase {
   }
 }
 
-/** Store command results from curl against a real file system. */
+/**
+ * Store command results from curl against a real file system.
+ */
 class MockFileSystem {
   HashMap<String, String> mfs = new HashMap<>();
   static final String FILE_STATUSES =
-      "{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16389,"
-          + "\"group\":\"hadoop\",\"length\":0,\"modificationTime\":1438548219672,"
-          + "\"owner\":\"yarn\",\"pathSuffix\":\"app-logs\",\"permission\":\"777\","
-          + "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"},\n"
-          + "{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16395,"
-          + "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1438548030045,"
-          + "\"owner\":\"hdfs\",\"pathSuffix\":\"hdp\",\"permission\":\"755\","
-          + "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"},\n"
-          + "{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16390,"
-          + "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1438547985336,"
-          + "\"owner\":\"mapred\",\"pathSuffix\":\"mapred\",\"permission\":\"755\","
-          + "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"},\n"
-          + "{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":2,\"fileId\":16392,"
-          + "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1438547985346,"
-          + "\"owner\":\"hdfs\",\"pathSuffix\":\"mr-history\",\"permission\":\"755\","
-          + "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"},\n"
-          + "{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16400,"
-          + "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1438548089725,"
-          + "\"owner\":\"hdfs\",\"pathSuffix\":\"system\",\"permission\":\"755\","
-          + "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"},\n"
-          + "{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16386,"
-          + "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1438548150089,"
-          + "\"owner\":\"hdfs\",\"pathSuffix\":\"tmp\",\"permission\":\"777\","
-          + "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"},\n"
-          + "{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16387,"
-          + "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1438547921792,"
-          + "\"owner\":\"hdfs\",\"pathSuffix\":\"user\",\"permission\":\"755\","
-          + "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"}\n";
+          "{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16389," +
+                  "\"group\":\"hadoop\",\"length\":0,\"modificationTime\":1438548219672," +
+                  "\"owner\":\"yarn\",\"pathSuffix\":\"app-logs\",\"permission\":\"777\"," +
+                  "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"},\n" +
+                  "{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16395," +
+                  "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1438548030045," +
+                  "\"owner\":\"hdfs\",\"pathSuffix\":\"hdp\",\"permission\":\"755\"," +
+                  "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"},\n" +
+                  "{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16390," +
+                  "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1438547985336," +
+                  "\"owner\":\"mapred\",\"pathSuffix\":\"mapred\",\"permission\":\"755\"," +
+                  "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"},\n" +
+                  "{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":2,\"fileId\":16392," +
+                  "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1438547985346," +
+                  "\"owner\":\"hdfs\",\"pathSuffix\":\"mr-history\",\"permission\":\"755\"," +
+                  "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"},\n" +
+                  "{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16400," +
+                  "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1438548089725," +
+                  "\"owner\":\"hdfs\",\"pathSuffix\":\"system\",\"permission\":\"755\"," +
+                  "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"},\n" +
+                  "{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16386," +
+                  "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1438548150089," +
+                  "\"owner\":\"hdfs\",\"pathSuffix\":\"tmp\",\"permission\":\"777\"," +
+                  "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"},\n" +
+                  "{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16387," +
+                  "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1438547921792," +
+                  "\"owner\":\"hdfs\",\"pathSuffix\":\"user\",\"permission\":\"755\"," +
+                  "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"}\n";
 
   void addListStatusData() {
-    mfs.put("/?op=LISTSTATUS", "{\"FileStatuses\":{\"FileStatus\":[\n" + FILE_STATUSES + "]}}");
-    mfs.put(
-        "/user?op=LISTSTATUS",
-        "{\"FileStatuses\":{\"FileStatus\":[\n"
-            + "        {\"accessTime\":0,\"blockSize\":0,\"childrenNum\":4,\"fileId\":16388,"
-            + "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1441253161263,"
-            + "\"owner\":\"ambari-qa\",\"pathSuffix\":\"ambari-qa\",\"permission\":\"770\","
-            + "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"}\n"
-            + "        ]}}");
-    mfs.put(
-        "/tmp?op=LISTSTATUS",
-        "{\"FileStatuses\":{\"FileStatus\":[\n"
-            + "        {\"accessTime\":1441253097489,\"blockSize\":134217728,\"childrenNum\":0,"
-            + "\"fileId\":16400,\"group\":\"hdfs\",\"length\":1645,"
-            + "\"modificationTime\":1441253097517,\"owner\":\"hdfs\","
-            + "\"pathSuffix\":\"ida8c06540_date040315\",\"permission\":\"755\","
-            + "\"replication\":3,\"storagePolicy\":0,\"type\":\"FILE\"}\n"
-            + "        ]}}");
-    mfs.put(
-        "/mr-history/done?op=LISTSTATUS",
-        "{\"FileStatuses\":{\"FileStatus\":[\n"
-            + "{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16433,"
-            + "\"group\":\"hadoop\",\"length\":0,\"modificationTime\":1441253197481,"
-            + "\"owner\":\"mapred\",\"pathSuffix\":\"2015\",\"permission\":\"770\","
-            + "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"}\n"
-            + "]}}");
+    mfs.put("/?op=LISTSTATUS",
+        "{\"FileStatuses\":{\"FileStatus\":[\n" + FILE_STATUSES +
+            "]}}"
+    );
+    mfs.put("/user?op=LISTSTATUS", "{\"FileStatuses\":{\"FileStatus\":[\n" +
+           "        {\"accessTime\":0,\"blockSize\":0,\"childrenNum\":4,\"fileId\":16388," +
+               "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1441253161263," +
+               "\"owner\":\"ambari-qa\",\"pathSuffix\":\"ambari-qa\",\"permission\":\"770\"," +
+               "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"}\n" +
+           "        ]}}"
+    );
+    mfs.put("/tmp?op=LISTSTATUS",
+        "{\"FileStatuses\":{\"FileStatus\":[\n" +
+            "        {\"accessTime\":1441253097489,\"blockSize\":134217728,\"childrenNum\":0," +
+                "\"fileId\":16400,\"group\":\"hdfs\",\"length\":1645," +
+                "\"modificationTime\":1441253097517,\"owner\":\"hdfs\"," +
+                "\"pathSuffix\":\"ida8c06540_date040315\",\"permission\":\"755\"," +
+                "\"replication\":3,\"storagePolicy\":0,\"type\":\"FILE\"}\n" +
+            "        ]}}"
+    );
+    mfs.put("/mr-history/done?op=LISTSTATUS",
+        "{\"FileStatuses\":{\"FileStatus\":[\n" +
+        "{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16433," +
+                "\"group\":\"hadoop\",\"length\":0,\"modificationTime\":1441253197481," +
+                "\"owner\":\"mapred\",\"pathSuffix\":\"2015\",\"permission\":\"770\"," +
+                "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"}\n" +
+        "]}}"
+    );
   }
 
   void addGetFileStatusData() {
-    mfs.put(
-        "/?op=GETFILESTATUS",
-        "{\"FileStatus\":{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":7,\"fileId\":16385,"
-            + "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1438548089725,"
-            + "\"owner\":\"hdfs\",\"pathSuffix\":\"\",\"permission\":\"755\","
-            + "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"}}");
-    mfs.put(
-        "/user?op=GETFILESTATUS",
-        "{\"FileStatus\":{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16387,"
-            + "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1441253043188,"
-            + "\"owner\":\"hdfs\",\"pathSuffix\":\"\",\"permission\":\"755\","
-            + "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"}}");
-    mfs.put(
-        "/tmp?op=GETFILESTATUS",
-        "{\"FileStatus\":{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16386,"
-            + "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1441253097489,"
-            + "\"owner\":\"hdfs\",\"pathSuffix\":\"\",\"permission\":\"777\","
-            + "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"}}");
-    mfs.put(
-        "/mr-history/done?op=GETFILESTATUS",
-        "{\"FileStatus\":{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16393,"
-            + "\"group\":\"hadoop\",\"length\":0,\"modificationTime\":1441253197480,"
-            + "\"owner\":\"mapred\",\"pathSuffix\":\"\",\"permission\":\"777\","
-            + "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"}}");
+    mfs.put("/?op=GETFILESTATUS",
+        "{\"FileStatus\":{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":7,\"fileId\":16385," +
+                "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1438548089725," +
+                "\"owner\":\"hdfs\",\"pathSuffix\":\"\",\"permission\":\"755\"," +
+                "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"}}");
+    mfs.put("/user?op=GETFILESTATUS",
+        "{\"FileStatus\":{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16387," +
+                "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1441253043188," +
+                "\"owner\":\"hdfs\",\"pathSuffix\":\"\",\"permission\":\"755\"," +
+                "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"}}");
+    mfs.put("/tmp?op=GETFILESTATUS",
+        "{\"FileStatus\":{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16386," +
+                "\"group\":\"hdfs\",\"length\":0,\"modificationTime\":1441253097489," +
+                "\"owner\":\"hdfs\",\"pathSuffix\":\"\",\"permission\":\"777\"," +
+                "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"}}");
+    mfs.put("/mr-history/done?op=GETFILESTATUS",
+        "{\"FileStatus\":{\"accessTime\":0,\"blockSize\":0,\"childrenNum\":1,\"fileId\":16393," +
+                "\"group\":\"hadoop\",\"length\":0,\"modificationTime\":1441253197480," +
+                "\"owner\":\"mapred\",\"pathSuffix\":\"\",\"permission\":\"777\"," +
+                "\"replication\":0,\"storagePolicy\":0,\"type\":\"DIRECTORY\"}}");
   }
 
   public void addMockData(HDFSCommand.Op op) {
@@ -228,7 +238,9 @@ class MockFileSystem {
   }
 }
 
-/** Run commands against mock file system that simulates webhdfs responses. */
+/**
+ * Run commands against mock file system that simulates webhdfs responses.
+ */
 class MockHDFSCommand extends HDFSCommand {
   MockFileSystem fs = null;
 
@@ -259,14 +271,15 @@ class MockHDFSCommand extends HDFSCommand {
   }
 }
 
-/** Mock Interpreter - uses Mock HDFS command. */
+/**
+ * Mock Interpreter - uses Mock HDFS command.
+ */
 class MockHDFSFileInterpreter extends HDFSFileInterpreter {
   @Override
   public void prepare() {
     // Run commands against mock File System instead of WebHDFS
-    int i =
-        Integer.parseInt(
-            getProperty(HDFS_MAXLENGTH) == null ? "1000" : getProperty(HDFS_MAXLENGTH));
+    int i = Integer.parseInt(getProperty(HDFS_MAXLENGTH) == null ? "1000"
+            : getProperty(HDFS_MAXLENGTH));
     cmd = new MockHDFSCommand("", "", logger, i);
     gson = new Gson();
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/flink/pom.xml
----------------------------------------------------------------------
diff --git a/flink/pom.xml b/flink/pom.xml
index ffba436..217813b 100644
--- a/flink/pom.xml
+++ b/flink/pom.xml
@@ -297,6 +297,14 @@
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
+
     </plugins>
   </build>
 </project>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/flink/src/main/java/org/apache/zeppelin/flink/FlinkInterpreter.java
----------------------------------------------------------------------
diff --git a/flink/src/main/java/org/apache/zeppelin/flink/FlinkInterpreter.java b/flink/src/main/java/org/apache/zeppelin/flink/FlinkInterpreter.java
index cab30b6..c14407d 100644
--- a/flink/src/main/java/org/apache/zeppelin/flink/FlinkInterpreter.java
+++ b/flink/src/main/java/org/apache/zeppelin/flink/FlinkInterpreter.java
@@ -17,9 +17,6 @@
 
 package org.apache.zeppelin.flink;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
 import org.apache.flink.api.scala.ExecutionEnvironment;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
@@ -27,6 +24,10 @@ import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
 public class FlinkInterpreter extends Interpreter {
 
   private FlinkScalaInterpreter innerIntp;
@@ -43,11 +44,8 @@ public class FlinkInterpreter extends Interpreter {
 
     // bind ZeppelinContext
     int maxRow = Integer.parseInt(getProperty("zeppelin.flink.maxResult", "1000"));
-    this.z =
-        new FlinkZeppelinContext(
-            innerIntp.getBatchTableEnviroment(),
-            getInterpreterGroup().getInterpreterHookRegistry(),
-            maxRow);
+    this.z = new FlinkZeppelinContext(innerIntp.getBatchTableEnviroment(),
+        getInterpreterGroup().getInterpreterHookRegistry(), maxRow);
     List<String> modifiers = new ArrayList<>();
     modifiers.add("@transient");
     this.innerIntp.bind("z", z.getClass().getCanonicalName(), z, modifiers);
@@ -68,7 +66,9 @@ public class FlinkInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) throws InterpreterException {}
+  public void cancel(InterpreterContext context) throws InterpreterException {
+
+  }
 
   @Override
   public FormType getFormType() throws InterpreterException {
@@ -81,8 +81,10 @@ public class FlinkInterpreter extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) throws InterpreterException {
+  public List<InterpreterCompletion> completion(String buf,
+                                                int cursor,
+                                                InterpreterContext interpreterContext)
+      throws InterpreterException {
     return innerIntp.completion(buf, cursor, interpreterContext);
   }
 
@@ -97,4 +99,5 @@ public class FlinkInterpreter extends Interpreter {
   FlinkZeppelinContext getZeppelinContext() {
     return this.z;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/flink/src/main/java/org/apache/zeppelin/flink/FlinkSQLInterpreter.java
----------------------------------------------------------------------
diff --git a/flink/src/main/java/org/apache/zeppelin/flink/FlinkSQLInterpreter.java b/flink/src/main/java/org/apache/zeppelin/flink/FlinkSQLInterpreter.java
index 25830a7..1ac3547 100644
--- a/flink/src/main/java/org/apache/zeppelin/flink/FlinkSQLInterpreter.java
+++ b/flink/src/main/java/org/apache/zeppelin/flink/FlinkSQLInterpreter.java
@@ -17,12 +17,14 @@
 
 package org.apache.zeppelin.flink;
 
-import java.util.Properties;
+
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 
+import java.util.Properties;
+
 public class FlinkSQLInterpreter extends Interpreter {
 
   private FlinkSQLScalaInterpreter sqlScalaInterpreter;
@@ -31,18 +33,21 @@ public class FlinkSQLInterpreter extends Interpreter {
     super(properties);
   }
 
+
   @Override
   public void open() throws InterpreterException {
     FlinkInterpreter flinkInterpreter =
         getInterpreterInTheSameSessionByClassName(FlinkInterpreter.class);
     FlinkZeppelinContext z = flinkInterpreter.getZeppelinContext();
     int maxRow = Integer.parseInt(getProperty("zeppelin.flink.maxResult", "1000"));
-    this.sqlScalaInterpreter =
-        new FlinkSQLScalaInterpreter(flinkInterpreter.getInnerScalaInterpreter(), z, maxRow);
+    this.sqlScalaInterpreter = new FlinkSQLScalaInterpreter(
+        flinkInterpreter.getInnerScalaInterpreter(), z, maxRow);
   }
 
   @Override
-  public void close() throws InterpreterException {}
+  public void close() throws InterpreterException {
+
+  }
 
   @Override
   public InterpreterResult interpret(String st, InterpreterContext context)
@@ -51,7 +56,9 @@ public class FlinkSQLInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) throws InterpreterException {}
+  public void cancel(InterpreterContext context) throws InterpreterException {
+
+  }
 
   @Override
   public FormType getFormType() throws InterpreterException {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/flink/src/test/java/org/apache/zeppelin/flink/FlinkInterpreterTest.java
----------------------------------------------------------------------
diff --git a/flink/src/test/java/org/apache/zeppelin/flink/FlinkInterpreterTest.java b/flink/src/test/java/org/apache/zeppelin/flink/FlinkInterpreterTest.java
index bec8389..0c42139 100644
--- a/flink/src/test/java/org/apache/zeppelin/flink/FlinkInterpreterTest.java
+++ b/flink/src/test/java/org/apache/zeppelin/flink/FlinkInterpreterTest.java
@@ -16,15 +16,7 @@
  */
 package org.apache.zeppelin.flink;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
 import org.apache.zeppelin.display.AngularObjectRegistry;
 import org.apache.zeppelin.display.ui.CheckBox;
 import org.apache.zeppelin.display.ui.Select;
@@ -41,6 +33,16 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 public class FlinkInterpreterTest {
 
   private FlinkInterpreter interpreter;
@@ -69,8 +71,8 @@ public class FlinkInterpreterTest {
 
   @Test
   public void testBasicScala() throws InterpreterException, IOException {
-    InterpreterResult result =
-        interpreter.interpret("val a=\"hello world\"", getInterpreterContext());
+    InterpreterResult result = interpreter.interpret("val a=\"hello world\"",
+        getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals("a: String = hello world\n", output);
 
@@ -100,42 +102,38 @@ public class FlinkInterpreterTest {
     result = interpreter.interpret("/*comment here*/", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
-    result =
-        interpreter.interpret("/*comment here*/\nprint(\"hello world\")", getInterpreterContext());
+    result = interpreter.interpret("/*comment here*/\nprint(\"hello world\")",
+        getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
     // multiple line comment
-    result = interpreter.interpret("/*line 1 \n line 2*/", getInterpreterContext());
+    result = interpreter.interpret("/*line 1 \n line 2*/",
+        getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
     // test function
-    result =
-        interpreter.interpret("def add(x:Int, y:Int)\n{ return x+y }", getInterpreterContext());
+    result = interpreter.interpret("def add(x:Int, y:Int)\n{ return x+y }",
+        getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
     result = interpreter.interpret("print(add(1,2))", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
-    result =
-        interpreter.interpret(
-            "/*line 1 \n line 2*/print(\"hello world\")", getInterpreterContext());
+    result = interpreter.interpret("/*line 1 \n line 2*/print(\"hello world\")",
+        getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
     // companion object
-    result =
-        interpreter.interpret(
-            "class Counter {\n "
-                + "var value: Long = 0} \n"
-                + "object Counter {\n def apply(x: Long) = new Counter()\n}",
-            getInterpreterContext());
+    result = interpreter.interpret("class Counter {\n " +
+        "var value: Long = 0} \n" +
+        "object Counter {\n def apply(x: Long) = new Counter()\n}", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
     // case class
-    result =
-        interpreter.interpret(
-            "case class Bank(age:Integer, job:String, marital : String, education : String,"
-                + " balance : Integer)\n",
-            getInterpreterContext());
+    result = interpreter.interpret(
+        "case class Bank(age:Integer, job:String, marital : String, education : String," +
+            " balance : Integer)\n",
+        getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
     // ZeppelinContext
@@ -143,12 +141,14 @@ public class FlinkInterpreterTest {
     result = interpreter.interpret("val ds = benv.fromElements(1,2,3)\nz.show(ds)", context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals(InterpreterResult.Type.TABLE, messageOutput.get(0).getType());
-    assertEquals(
-        "f0\n" + "1\n" + "2\n" + "3\n",
-        messageOutput.get(0).toInterpreterResultMessage().getData());
+    assertEquals("f0\n" +
+        "1\n" +
+        "2\n" +
+        "3\n", messageOutput.get(0).toInterpreterResultMessage().getData());
 
     context = getInterpreterContext();
-    result = interpreter.interpret("z.input(\"name\", \"default_name\")", context);
+    result = interpreter.interpret("z.input(\"name\", \"default_name\")",
+        context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals(1, context.getGui().getForms().size());
     assertTrue(context.getGui().getForms().get("name") instanceof TextBox);
@@ -157,11 +157,8 @@ public class FlinkInterpreterTest {
     assertEquals("default_name", textBox.getDefaultValue());
 
     context = getInterpreterContext();
-    result =
-        interpreter.interpret(
-            "z.checkbox(\"checkbox_1\", "
-                + "Seq(\"value_2\"), Seq((\"value_1\", \"name_1\"), (\"value_2\", \"name_2\")))",
-            context);
+    result = interpreter.interpret("z.checkbox(\"checkbox_1\", " +
+        "Seq(\"value_2\"), Seq((\"value_1\", \"name_1\"), (\"value_2\", \"name_2\")))", context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals(1, context.getGui().getForms().size());
     assertTrue(context.getGui().getForms().get("checkbox_1") instanceof CheckBox);
@@ -176,11 +173,8 @@ public class FlinkInterpreterTest {
     assertEquals("name_2", checkBox.getOptions()[1].getDisplayName());
 
     context = getInterpreterContext();
-    result =
-        interpreter.interpret(
-            "z.select(\"select_1\", Seq(\"value_2\"), "
-                + "Seq((\"value_1\", \"name_1\"), (\"value_2\", \"name_2\")))",
-            context);
+    result = interpreter.interpret("z.select(\"select_1\", Seq(\"value_2\"), " +
+        "Seq((\"value_1\", \"name_1\"), (\"value_2\", \"name_2\")))", context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals(1, context.getGui().getForms().size());
     assertTrue(context.getGui().getForms().get("select_1") instanceof Select);
@@ -198,25 +192,24 @@ public class FlinkInterpreterTest {
 
   @Test
   public void testCompletion() throws InterpreterException {
-    InterpreterResult result =
-        interpreter.interpret("val a=\"hello world\"", getInterpreterContext());
+    InterpreterResult result = interpreter.interpret("val a=\"hello world\"",
+        getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals("a: String = hello world\n", output);
 
-    List<InterpreterCompletion> completions =
-        interpreter.completion("a.", 2, getInterpreterContext());
+    List<InterpreterCompletion> completions = interpreter.completion("a.", 2,
+        getInterpreterContext());
     assertTrue(completions.size() > 0);
   }
 
+
   // Disable it for now as there's extra std output from flink shell.
   @Test
   public void testWordCount() throws InterpreterException, IOException {
-    interpreter.interpret(
-        "val text = benv.fromElements(\"To be or not to be\")", getInterpreterContext());
-    interpreter.interpret(
-        "val counts = text.flatMap { _.toLowerCase.split(\" \") }"
-            + ".map { (_, 1) }.groupBy(0).sum(1)",
+    interpreter.interpret("val text = benv.fromElements(\"To be or not to be\")",
         getInterpreterContext());
+    interpreter.interpret("val counts = text.flatMap { _.toLowerCase.split(\" \") }" +
+        ".map { (_, 1) }.groupBy(0).sum(1)", getInterpreterContext());
     InterpreterResult result = interpreter.interpret("counts.print()", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
@@ -232,31 +225,31 @@ public class FlinkInterpreterTest {
   private InterpreterContext getInterpreterContext() {
     output = "";
     messageOutput = new ArrayList<>();
-    InterpreterContext context =
-        InterpreterContext.builder()
-            .setInterpreterOut(new InterpreterOutput(null))
-            .setAngularObjectRegistry(new AngularObjectRegistry("flink", null))
-            .build();
-    context.out =
-        new InterpreterOutput(
-            new InterpreterOutputListener() {
-              @Override
-              public void onUpdateAll(InterpreterOutput out) {}
-
-              @Override
-              public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
-                try {
-                  output = out.toInterpreterResultMessage().getData();
-                } catch (IOException e) {
-                  e.printStackTrace();
-                }
-              }
-
-              @Override
-              public void onUpdate(int index, InterpreterResultMessageOutput out) {
-                messageOutput.add(out);
-              }
-            });
+    InterpreterContext context = InterpreterContext.builder()
+        .setInterpreterOut(new InterpreterOutput(null))
+        .setAngularObjectRegistry(new AngularObjectRegistry("flink", null))
+        .build();
+    context.out = new InterpreterOutput(
+        new InterpreterOutputListener() {
+          @Override
+          public void onUpdateAll(InterpreterOutput out) {
+
+          }
+
+          @Override
+          public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
+            try {
+              output = out.toInterpreterResultMessage().getData();
+            } catch (IOException e) {
+              e.printStackTrace();
+            }
+          }
+
+          @Override
+          public void onUpdate(int index, InterpreterResultMessageOutput out) {
+            messageOutput.add(out);
+          }
+        });
     return context;
   }
 }


[30/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java
index e1ee73f..cb2f9f1 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java
@@ -17,15 +17,7 @@
 
 package org.apache.zeppelin.interpreter;
 
-import java.lang.reflect.Field;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.reflect.FieldUtils;
 import org.apache.zeppelin.annotation.Experimental;
@@ -38,32 +30,46 @@ import org.apache.zeppelin.scheduler.SchedulerFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.lang.reflect.Field;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 /**
- * Interface for interpreters. If you want to implement new Zeppelin interpreter, extend this class
+ * Interface for interpreters.
+ * If you want to implement new Zeppelin interpreter, extend this class
  *
- * <p>Please see,
+ * Please see,
  * https://zeppelin.apache.org/docs/latest/development/writingzeppelininterpreter.html
  *
- * <p>open(), close(), interpret() is three the most important method you need to implement.
- * cancel(), getProgress(), completion() is good to have getFormType(), getScheduler() determine
- * Zeppelin's behavior
+ * open(), close(), interpret() is three the most important method you need to implement.
+ * cancel(), getProgress(), completion() is good to have
+ * getFormType(), getScheduler() determine Zeppelin's behavior
  */
 public abstract class Interpreter {
 
   /**
-   * Opens interpreter. You may want to place your initialize routine here. open() is called only
-   * once
+   * Opens interpreter. You may want to place your initialize routine here.
+   * open() is called only once
    */
   @ZeppelinApi
   public abstract void open() throws InterpreterException;
 
   /**
-   * Closes interpreter. You may want to free your resources up here. close() is called only once
+   * Closes interpreter. You may want to free your resources up here.
+   * close() is called only once
    */
   @ZeppelinApi
   public abstract void close() throws InterpreterException;
 
-  /** Run precode if exists. */
+  /**
+   * Run precode if exists.
+   */
   @ZeppelinApi
   public InterpreterResult executePrecode(InterpreterContext interpreterContext)
       throws InterpreterException {
@@ -87,8 +93,10 @@ public abstract class Interpreter {
         // substitute {variable} only if 'variable' has a value ...
         Resource resource = resourcePool.get(varPat.substring(1, varPat.length() - 1));
         Object variableValue = resource == null ? null : resource.get();
-        if (variableValue != null) sb.append(variableValue);
-        else return cmd;
+        if (variableValue != null)
+          sb.append(variableValue);
+        else
+          return cmd;
       } else if (varPat.matches("[{]{2}[^{}]+[}]{2}")) {
         // escape {{text}} ...
         sb.append("{").append(varPat.substring(2, varPat.length() - 2)).append("}");
@@ -108,18 +116,22 @@ public abstract class Interpreter {
    * @param st statements to run
    */
   @ZeppelinApi
-  public abstract InterpreterResult interpret(String st, InterpreterContext context)
+  public abstract InterpreterResult interpret(String st,
+                                              InterpreterContext context)
       throws InterpreterException;
 
-  /** Optionally implement the canceling routine to abort interpret() method */
+  /**
+   * Optionally implement the canceling routine to abort interpret() method
+   */
   @ZeppelinApi
   public abstract void cancel(InterpreterContext context) throws InterpreterException;
 
   /**
-   * Dynamic form handling see http://zeppelin.apache.org/docs/dynamicform.html
+   * Dynamic form handling
+   * see http://zeppelin.apache.org/docs/dynamicform.html
    *
    * @return FormType.SIMPLE enables simple pattern replacement (eg. Hello ${name=world}),
-   *     FormType.NATIVE handles form in API
+   * FormType.NATIVE handles form in API
    */
   @ZeppelinApi
   public abstract FormType getFormType() throws InterpreterException;
@@ -133,8 +145,8 @@ public abstract class Interpreter {
   public abstract int getProgress(InterpreterContext context) throws InterpreterException;
 
   /**
-   * Get completion list based on cursor position. By implementing this method, it enables
-   * auto-completion.
+   * Get completion list based on cursor position.
+   * By implementing this method, it enables auto-completion.
    *
    * @param buf statements
    * @param cursor cursor position in statements
@@ -142,22 +154,22 @@ public abstract class Interpreter {
    * @return list of possible completion. Return empty list if there're nothing to return.
    */
   @ZeppelinApi
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) throws InterpreterException {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) throws InterpreterException {
     return null;
   }
 
   /**
-   * Interpreter can implements it's own scheduler by overriding this method. There're two default
-   * scheduler provided, FIFO, Parallel. If your interpret() can handle concurrent request, use
-   * Parallel or use FIFO.
+   * Interpreter can implements it's own scheduler by overriding this method.
+   * There're two default scheduler provided, FIFO, Parallel.
+   * If your interpret() can handle concurrent request, use Parallel or use FIFO.
    *
-   * <p>You can get default scheduler by using
+   * You can get default scheduler by using
    * SchedulerFactory.singleton().createOrGetFIFOScheduler()
    * SchedulerFactory.singleton().createOrGetParallelScheduler()
    *
    * @return return scheduler instance. This method can be called multiple times and have to return
-   *     the same instance. Can not return null.
+   * the same instance. Can not return null.
    */
   @ZeppelinApi
   public Scheduler getScheduler() {
@@ -354,62 +366,51 @@ public abstract class Interpreter {
   }
 
   /**
-   * Replace markers #{contextFieldName} by values from {@link InterpreterContext} fields with same
-   * name and marker #{user}. If value == null then replace by empty string.
+   * Replace markers #{contextFieldName} by values from {@link InterpreterContext} fields
+   * with same name and marker #{user}. If value == null then replace by empty string.
    */
   private void replaceContextParameters(Properties properties) {
     InterpreterContext interpreterContext = InterpreterContext.get();
     if (interpreterContext != null) {
       String markerTemplate = "#\\{%s\\}";
       List<String> skipFields = Arrays.asList("paragraphTitle", "paragraphId", "paragraphText");
-      List typesToProcess =
-          Arrays.asList(
-              String.class,
-              Double.class,
-              Float.class,
-              Short.class,
-              Byte.class,
-              Character.class,
-              Boolean.class,
-              Integer.class,
-              Long.class);
+      List typesToProcess = Arrays.asList(String.class, Double.class, Float.class, Short.class,
+          Byte.class, Character.class, Boolean.class, Integer.class, Long.class);
       for (String key : properties.stringPropertyNames()) {
         String p = properties.getProperty(key);
         if (StringUtils.isNotEmpty(p)) {
           for (Field field : InterpreterContext.class.getDeclaredFields()) {
             Class clazz = field.getType();
-            if (!skipFields.contains(field.getName())
-                && (typesToProcess.contains(clazz) || clazz.isPrimitive())) {
+            if (!skipFields.contains(field.getName()) && (typesToProcess.contains(clazz)
+                || clazz.isPrimitive())) {
               Object value = null;
               try {
                 value = FieldUtils.readField(field, interpreterContext, true);
               } catch (Exception e) {
                 logger.error("Cannot read value of field {0}", field.getName());
               }
-              p =
-                  p.replaceAll(
-                      String.format(markerTemplate, field.getName()),
-                      value != null ? value.toString() : StringUtils.EMPTY);
+              p = p.replaceAll(String.format(markerTemplate, field.getName()),
+                  value != null ? value.toString() : StringUtils.EMPTY);
             }
           }
-          p =
-              p.replaceAll(
-                  String.format(markerTemplate, "user"),
-                  StringUtils.defaultString(userName, StringUtils.EMPTY));
+          p = p.replaceAll(String.format(markerTemplate, "user"),
+              StringUtils.defaultString(userName, StringUtils.EMPTY));
           properties.setProperty(key, p);
         }
       }
     }
   }
 
-  /** Type of interpreter. */
+  /**
+   * Type of interpreter.
+   */
   public enum FormType {
-    NATIVE,
-    SIMPLE,
-    NONE
+    NATIVE, SIMPLE, NONE
   }
 
-  /** Represent registered interpreter class */
+  /**
+   * Represent registered interpreter class
+   */
   public static class RegisteredInterpreter {
 
     private String group;
@@ -422,20 +423,13 @@ public abstract class Interpreter {
     private InterpreterOption option;
     private InterpreterRunner runner;
 
-    public RegisteredInterpreter(
-        String name,
-        String group,
-        String className,
+    public RegisteredInterpreter(String name, String group, String className,
         Map<String, DefaultInterpreterProperty> properties) {
       this(name, group, className, false, properties);
     }
 
-    public RegisteredInterpreter(
-        String name,
-        String group,
-        String className,
-        boolean defaultInterpreter,
-        Map<String, DefaultInterpreterProperty> properties) {
+    public RegisteredInterpreter(String name, String group, String className,
+        boolean defaultInterpreter, Map<String, DefaultInterpreterProperty> properties) {
       super();
       this.name = name;
       this.group = group;
@@ -494,9 +488,11 @@ public abstract class Interpreter {
     }
   }
 
-  /** Type of Scheduling. */
+  /**
+   * Type of Scheduling.
+   */
   public enum SchedulingMode {
-    FIFO,
-    PARALLEL
+    FIFO, PARALLEL
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterContext.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterContext.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterContext.java
index 07d9e40..23ac789 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterContext.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterContext.java
@@ -17,15 +17,18 @@
 
 package org.apache.zeppelin.interpreter;
 
-import java.util.HashMap;
-import java.util.Map;
 import org.apache.zeppelin.display.AngularObjectRegistry;
 import org.apache.zeppelin.display.GUI;
 import org.apache.zeppelin.interpreter.remote.RemoteInterpreterEventClient;
 import org.apache.zeppelin.resource.ResourcePool;
 import org.apache.zeppelin.user.AuthenticationInfo;
 
-/** Interpreter context */
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Interpreter context
+ */
 public class InterpreterContext {
   private static final ThreadLocal<InterpreterContext> threadIC = new ThreadLocal<>();
 
@@ -60,7 +63,9 @@ public class InterpreterContext {
   private Map<String, String> localProperties = new HashMap<>();
   private RemoteInterpreterEventClient intpEventClient;
 
-  /** Builder class for InterpreterContext */
+  /**
+   * Builder class for InterpreterContext
+   */
   public static class Builder {
     private InterpreterContext context;
 
@@ -163,7 +168,10 @@ public class InterpreterContext {
     return new Builder();
   }
 
-  private InterpreterContext() {}
+  private InterpreterContext() {
+
+  }
+
 
   public String getNoteId() {
     return noteId;
@@ -220,7 +228,7 @@ public class InterpreterContext {
   public String getInterpreterClassName() {
     return interpreterClassName;
   }
-
+  
   public void setInterpreterClassName(String className) {
     this.interpreterClassName = className;
   }
@@ -239,7 +247,6 @@ public class InterpreterContext {
 
   /**
    * Set progress of paragraph manually
-   *
    * @param n integer from 0 to 100
    */
   public void setProgress(int n) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterException.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterException.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterException.java
index 6c1aa24..1ce63f3 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterException.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterException.java
@@ -17,10 +17,15 @@
 
 package org.apache.zeppelin.interpreter;
 
-/** General Exception for interpreters. */
+
+/**
+ * General Exception for interpreters.
+ *
+ */
 public class InterpreterException extends Exception {
 
-  public InterpreterException() {}
+  public InterpreterException() {
+  }
 
   public InterpreterException(Throwable e) {
     super(e);
@@ -34,8 +39,8 @@ public class InterpreterException extends Exception {
     super(msg, t);
   }
 
-  public InterpreterException(
-      String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+  public InterpreterException(String message, Throwable cause, boolean enableSuppression,
+                       boolean writableStackTrace) {
     super(message, cause, enableSuppression, writableStackTrace);
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterGroup.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterGroup.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterGroup.java
index 638a391..4cf4b31 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterGroup.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterGroup.java
@@ -17,28 +17,30 @@
 
 package org.apache.zeppelin.interpreter;
 
-import java.security.SecureRandom;
+import org.apache.zeppelin.display.AngularObjectRegistry;
+import org.apache.zeppelin.resource.ResourcePool;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
+import java.security.SecureRandom;
 import java.util.concurrent.ConcurrentHashMap;
-import org.apache.zeppelin.display.AngularObjectRegistry;
-import org.apache.zeppelin.resource.ResourcePool;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
- * InterpreterGroup is collections of interpreter sessions. One session could include multiple
- * interpreters. For example spark, pyspark, sql interpreters are in the same 'spark' interpreter
- * session.
+ * InterpreterGroup is collections of interpreter sessions.
+ * One session could include multiple interpreters.
+ * For example spark, pyspark, sql interpreters are in the same 'spark' interpreter session.
  *
- * <p>Remember, list of interpreters are dedicated to a session. Session could be shared across user
- * or notes, so the sessionId could be user or noteId or their combination. So InterpreterGroup
- * internally manages map of [sessionId(noteId, user, or their combination), list of interpreters]
+ * Remember, list of interpreters are dedicated to a session. Session could be shared across user
+ * or notes, so the sessionId could be user or noteId or their combination.
+ * So InterpreterGroup internally manages map of [sessionId(noteId, user, or
+ * their combination), list of interpreters]
  *
- * <p>A InterpreterGroup runs interpreter process while its subclass ManagedInterpreterGroup runs in
- * zeppelin server process.
+ * A InterpreterGroup runs interpreter process while its subclass ManagedInterpreterGroup runs
+ * in zeppelin server process.
  */
 public class InterpreterGroup {
 
@@ -54,14 +56,15 @@ public class InterpreterGroup {
 
   /**
    * Create InterpreterGroup with given id, used in InterpreterProcess
-   *
    * @param id
    */
   public InterpreterGroup(String id) {
     this.id = id;
   }
 
-  /** Create InterpreterGroup with autogenerated id */
+  /**
+   * Create InterpreterGroup with autogenerated id
+   */
   public InterpreterGroup() {
     this.id = generateId();
   }
@@ -74,12 +77,12 @@ public class InterpreterGroup {
     return this.id;
   }
 
-  // TODO(zjffdu) change it to getSession. For now just keep this method to reduce code change
+  //TODO(zjffdu) change it to getSession. For now just keep this method to reduce code change
   public synchronized List<Interpreter> get(String sessionId) {
     return sessions.get(sessionId);
   }
 
-  // TODO(zjffdu) change it to addSession. For now just keep this method to reduce code change
+  //TODO(zjffdu) change it to addSession. For now just keep this method to reduce code change
   public synchronized void put(String sessionId, List<Interpreter> interpreters) {
     this.sessions.put(sessionId, interpreters);
   }
@@ -94,8 +97,8 @@ public class InterpreterGroup {
     put(sessionId, interpreters);
   }
 
-  // TODO(zjffdu) rename it to a more proper name.
-  // For now just keep this method to reduce code change
+  //TODO(zjffdu) rename it to a more proper name.
+  //For now just keep this method to reduce code change
   public Collection<List<Interpreter>> values() {
     return sessions.values();
   }
@@ -103,15 +106,15 @@ public class InterpreterGroup {
   public AngularObjectRegistry getAngularObjectRegistry() {
     return angularObjectRegistry;
   }
-
+  
   public void setAngularObjectRegistry(AngularObjectRegistry angularObjectRegistry) {
     this.angularObjectRegistry = angularObjectRegistry;
   }
-
+  
   public InterpreterHookRegistry getInterpreterHookRegistry() {
     return hookRegistry;
   }
-
+  
   public void setInterpreterHookRegistry(InterpreterHookRegistry hookRegistry) {
     this.hookRegistry = hookRegistry;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterHookListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterHookListener.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterHookListener.java
index e47c511..d0dbad1 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterHookListener.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterHookListener.java
@@ -17,11 +17,17 @@
 
 package org.apache.zeppelin.interpreter;
 
-/** An interface for processing custom callback code into the interpreter. */
+/**
+ * An interface for processing custom callback code into the interpreter.
+ */
 public interface InterpreterHookListener {
-  /** Prepends pre-execute hook code to the script that will be interpreted */
+  /**
+   * Prepends pre-execute hook code to the script that will be interpreted
+   */
   void onPreExecute(String script);
-
-  /** Appends post-execute hook code to the script that will be interpreted */
+  
+  /**
+   * Appends post-execute hook code to the script that will be interpreted
+   */
   void onPostExecute(String script);
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterHookRegistry.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterHookRegistry.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterHookRegistry.java
index 6b8a449..83917ec 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterHookRegistry.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterHookRegistry.java
@@ -23,10 +23,10 @@ import java.util.Map;
 import java.util.Set;
 
 /**
- * The InterpreterHookRegistry specifies code to be conditionally executed by an interpreter. The
- * constants defined in this class denote currently supported events. Each instance is bound to a
- * single InterpreterGroup. Scope is determined on a per-note basis (except when null for global
- * scope).
+ * The InterpreterHookRegistry specifies code to be conditionally executed by an
+ * interpreter. The constants defined in this class denote currently
+ * supported events. Each instance is bound to a single InterpreterGroup.
+ * Scope is determined on a per-note basis (except when null for global scope).
  */
 public class InterpreterHookRegistry {
   static final String GLOBAL_KEY = "_GLOBAL_";
@@ -34,6 +34,7 @@ public class InterpreterHookRegistry {
   // Scope (noteId/global scope) -> (ClassName -> (EventType -> Hook Code))
   private Map<String, Map<String, Map<String, String>>> registry = new HashMap<>();
 
+
   /**
    * Adds a note to the registry
    *
@@ -46,7 +47,7 @@ public class InterpreterHookRegistry {
       }
     }
   }
-
+  
   /**
    * Adds a className to the registry
    *
@@ -61,7 +62,7 @@ public class InterpreterHookRegistry {
       }
     }
   }
-
+  
   /**
    * Register a hook for a specific event.
    *
@@ -70,8 +71,8 @@ public class InterpreterHookRegistry {
    * @param event hook event (see constants defined in this class)
    * @param cmd Code to be executed by the interpreter
    */
-  public void register(String noteId, String className, String event, String cmd)
-      throws InvalidHookException {
+  public void register(String noteId, String className,
+                       String event, String cmd) throws InvalidHookException {
     synchronized (registry) {
       if (!HookType.ValidEvents.contains(event)) {
         throw new InvalidHookException("event " + event + " is not valid hook event");
@@ -83,7 +84,7 @@ public class InterpreterHookRegistry {
       registry.get(noteId).get(className).put(event, cmd);
     }
   }
-
+  
   /**
    * Unregister a hook for a specific event.
    *
@@ -100,7 +101,7 @@ public class InterpreterHookRegistry {
       registry.get(noteId).get(className).remove(event);
     }
   }
-
+  
   /**
    * Get a hook for a specific event.
    *
@@ -117,16 +118,18 @@ public class InterpreterHookRegistry {
       return registry.get(noteId).get(className).get(event);
     }
   }
-
-  /** Container for hook event type constants */
+  
+  /**
+  * Container for hook event type constants
+  */
   public enum HookType {
 
     // Execute the hook code PRIOR to main paragraph code execution
     PRE_EXEC("pre_exec"),
-
+    
     // Execute the hook code AFTER main paragraph code execution
     POST_EXEC("post_exec"),
-
+    
     // Same as above but reserved for interpreter developers, in order to allow
     // notebook users to use the above without overwriting registry settings
     // that are initialized directly in subclasses of Interpreter.
@@ -144,11 +147,11 @@ public class InterpreterHookRegistry {
     }
 
     public static Set<String> ValidEvents = new HashSet();
-
     static {
       for (HookType type : values()) {
         ValidEvents.add(type.getName());
       }
     }
   }
+   
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOption.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOption.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOption.java
index 632d1a0..0c01d97 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOption.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOption.java
@@ -21,12 +21,14 @@ import java.util.ArrayList;
 import java.util.List;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 
-/** */
+/**
+ *
+ */
 public class InterpreterOption {
   public static final transient String SHARED = "shared";
   public static final transient String SCOPED = "scoped";
   public static final transient String ISOLATED = "isolated";
-  private static ZeppelinConfiguration conf = ZeppelinConfiguration.create();
+  private static ZeppelinConfiguration conf =  ZeppelinConfiguration.create();
 
   // always set it as true, keep this field just for backward compatibility
   boolean remote = true;
@@ -84,7 +86,8 @@ public class InterpreterOption {
     isUserImpersonate = userImpersonate;
   }
 
-  public InterpreterOption() {}
+  public InterpreterOption() {
+  }
 
   public InterpreterOption(String perUser, String perNote) {
     if (perUser == null) {
@@ -107,8 +110,8 @@ public class InterpreterOption {
     option.perUser = other.perUser;
     option.isExistingProcess = other.isExistingProcess;
     option.setPermission = other.setPermission;
-    option.owners =
-        (null == other.owners) ? new ArrayList<String>() : new ArrayList<>(other.owners);
+    option.owners = (null == other.owners) ?
+        new ArrayList<String>() : new ArrayList<>(other.owners);
 
     return option;
   }
@@ -121,6 +124,7 @@ public class InterpreterOption {
     return port;
   }
 
+
   public boolean perUserShared() {
     return SHARED.equals(perUser);
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutput.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutput.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutput.java
index faae180..8853227 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutput.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutput.java
@@ -16,6 +16,10 @@
  */
 package org.apache.zeppelin.interpreter;
 
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.IOException;
@@ -24,12 +28,10 @@ import java.net.URL;
 import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
- * InterpreterOutput is OutputStream that supposed to print content on notebook in addition to
- * InterpreterResult which used to return from Interpreter.interpret().
+ * InterpreterOutput is OutputStream that supposed to print content on notebook
+ * in addition to InterpreterResult which used to return from Interpreter.interpret().
  */
 public class InterpreterOutput extends OutputStream {
   Logger logger = LoggerFactory.getLogger(InterpreterOutput.class);
@@ -59,8 +61,8 @@ public class InterpreterOutput extends OutputStream {
     clear();
   }
 
-  public InterpreterOutput(
-      InterpreterOutputListener flushListener, InterpreterOutputChangeListener listener)
+  public InterpreterOutput(InterpreterOutputListener flushListener,
+                           InterpreterOutputChangeListener listener)
       throws IOException {
     this.flushListener = flushListener;
     this.changeListener = listener;
@@ -166,6 +168,7 @@ public class InterpreterOutput extends OutputStream {
     }
   }
 
+
   int previousChar = 0;
   boolean startOfTheNewLine = true;
   boolean firstCharIsPercentSign = false;
@@ -187,12 +190,8 @@ public class InterpreterOutput extends OutputStream {
           InterpreterResult.Type type = currentOut.getType();
           if (type == InterpreterResult.Type.TEXT || type == InterpreterResult.Type.TABLE) {
             setType(InterpreterResult.Type.HTML);
-            getCurrentOutput()
-                .write(
-                    ResultMessages.getExceedsLimitSizeMessage(
-                            limit, "ZEPPELIN_INTERPRETER_OUTPUT_LIMIT")
-                        .getData()
-                        .getBytes());
+            getCurrentOutput().write(ResultMessages.getExceedsLimitSizeMessage(limit,
+                "ZEPPELIN_INTERPRETER_OUTPUT_LIMIT").getData().getBytes());
             truncated = true;
             return;
           }
@@ -276,12 +275,12 @@ public class InterpreterOutput extends OutputStream {
   }
 
   @Override
-  public void write(byte[] b) throws IOException {
+  public void write(byte [] b) throws IOException {
     write(b, 0, b.length);
   }
 
   @Override
-  public void write(byte[] b, int off, int len) throws IOException {
+  public void write(byte [] b, int off, int len) throws IOException {
     for (int i = off; i < len; i++) {
       write(b[i]);
     }
@@ -289,7 +288,6 @@ public class InterpreterOutput extends OutputStream {
 
   /**
    * In dev mode, it monitors file and update ZeppelinServer
-   *
    * @param file
    * @throws IOException
    */
@@ -309,7 +307,6 @@ public class InterpreterOutput extends OutputStream {
 
   /**
    * write contents in the resource file in the classpath
-   *
    * @param url
    * @throws IOException
    */

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutputChangeListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutputChangeListener.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutputChangeListener.java
index 19e179d..44bcd7c 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutputChangeListener.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutputChangeListener.java
@@ -18,7 +18,10 @@ package org.apache.zeppelin.interpreter;
 
 import java.io.File;
 
-/** InterpreterOutputChangeListener */
+/**
+ * InterpreterOutputChangeListener
+ */
 public interface InterpreterOutputChangeListener {
   void fileChanged(File file);
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutputChangeWatcher.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutputChangeWatcher.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutputChangeWatcher.java
index 965cc0c..1cb9c23 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutputChangeWatcher.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutputChangeWatcher.java
@@ -20,7 +20,6 @@ import static java.nio.file.StandardWatchEventKinds.ENTRY_CREATE;
 import static java.nio.file.StandardWatchEventKinds.ENTRY_DELETE;
 import static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY;
 import static java.nio.file.StandardWatchEventKinds.OVERFLOW;
-
 import java.io.File;
 import java.io.IOException;
 import java.nio.file.ClosedWatchServiceException;
@@ -34,10 +33,13 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Watch the change for the development mode support */
+/**
+ * Watch the change for the development mode support
+ */
 public class InterpreterOutputChangeWatcher extends Thread {
   Logger logger = LoggerFactory.getLogger(InterpreterOutputChangeWatcher.class);
 
@@ -78,6 +80,7 @@ public class InterpreterOutputChangeWatcher extends Thread {
     synchronized (watchKeys) {
       for (WatchKey key : watchKeys.keySet()) {
         key.cancel();
+
       }
       watchKeys.clear();
       watchFiles.clear();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutputListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutputListener.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutputListener.java
index 79cbbab..a176ef2 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutputListener.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutputListener.java
@@ -16,14 +16,17 @@
  */
 package org.apache.zeppelin.interpreter;
 
-/** Listen InterpreterOutput buffer flush */
+/**
+ * Listen InterpreterOutput buffer flush
+ */
 public interface InterpreterOutputListener {
-  /** update all message outputs */
+  /**
+   * update all message outputs
+   */
   void onUpdateAll(InterpreterOutput out);
 
   /**
    * called when newline is detected
-   *
    * @param index
    * @param out
    * @param line
@@ -32,7 +35,6 @@ public interface InterpreterOutputListener {
 
   /**
    * when entire output is updated. eg) after detecting new display system
-   *
    * @param index
    * @param out
    */

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterProperty.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterProperty.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterProperty.java
index 053acfa..92cf3a8 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterProperty.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterProperty.java
@@ -17,7 +17,9 @@
 
 package org.apache.zeppelin.interpreter;
 
-/** Property for instance of interpreter */
+/**
+ * Property for instance of interpreter
+ */
 public class InterpreterProperty {
   private String name;
   private Object value;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterPropertyBuilder.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterPropertyBuilder.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterPropertyBuilder.java
index 7ec0d27..aa1a0b2 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterPropertyBuilder.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterPropertyBuilder.java
@@ -20,23 +20,26 @@ package org.apache.zeppelin.interpreter;
 import java.util.HashMap;
 import java.util.Map;
 
-/** InterpreterPropertyBuilder */
+/**
+ * InterpreterPropertyBuilder
+ */
 public class InterpreterPropertyBuilder {
   Map<String, DefaultInterpreterProperty> properties = new HashMap<>();
 
-  public InterpreterPropertyBuilder add(String name, String defaultValue, String description) {
-    properties.put(name, new DefaultInterpreterProperty(defaultValue, description));
+  public InterpreterPropertyBuilder add(String name, String defaultValue, String description){
+    properties.put(name,
+        new DefaultInterpreterProperty(defaultValue, description));
     return this;
   }
 
-  public InterpreterPropertyBuilder add(
-      String name, String envName, String propertyName, String defaultValue, String description) {
-    properties.put(
-        name, new DefaultInterpreterProperty(envName, propertyName, defaultValue, description));
+  public InterpreterPropertyBuilder add(String name, String envName, String propertyName,
+        String defaultValue, String description){
+    properties.put(name,
+            new DefaultInterpreterProperty(envName, propertyName, defaultValue, description));
     return this;
   }
 
-  public Map<String, DefaultInterpreterProperty> build() {
+  public Map<String, DefaultInterpreterProperty> build(){
     return properties;
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterPropertyType.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterPropertyType.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterPropertyType.java
index bb45a1e..6bbc39d 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterPropertyType.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterPropertyType.java
@@ -20,8 +20,11 @@ package org.apache.zeppelin.interpreter;
 import java.util.ArrayList;
 import java.util.List;
 
-/** Types of interpreter properties */
+/**
+ * Types of interpreter properties
+ */
 public enum InterpreterPropertyType {
+
   TEXTAREA("textarea"),
   STRING("string"),
   NUMBER("number"),

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResult.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResult.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResult.java
index 804046a..255b21e 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResult.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResult.java
@@ -18,20 +18,25 @@
 package org.apache.zeppelin.interpreter;
 
 import com.google.gson.Gson;
+import org.apache.zeppelin.common.JsonSerializable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.IOException;
 import java.io.Serializable;
 import java.util.LinkedList;
 import java.util.List;
-import org.apache.zeppelin.common.JsonSerializable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Interpreter result template. */
+/**
+ * Interpreter result template.
+ */
 public class InterpreterResult implements Serializable, JsonSerializable {
   transient Logger logger = LoggerFactory.getLogger(InterpreterResult.class);
   private static final Gson gson = new Gson();
 
-  /** Type of result after code execution. */
+  /**
+   *  Type of result after code execution.
+   */
   public enum Code {
     SUCCESS,
     INCOMPLETE,
@@ -39,7 +44,9 @@ public class InterpreterResult implements Serializable, JsonSerializable {
     KEEP_PREVIOUS_RESULT
   }
 
-  /** Type of Data. */
+  /**
+   * Type of Data.
+   */
   public enum Type {
     TEXT,
     HTML,
@@ -75,7 +82,6 @@ public class InterpreterResult implements Serializable, JsonSerializable {
 
   /**
    * Automatically detect %[display_system] directives
-   *
    * @param msg
    */
   public void add(String msg) {
@@ -88,6 +94,7 @@ public class InterpreterResult implements Serializable, JsonSerializable {
     } catch (IOException e) {
       logger.error(e.getMessage(), e);
     }
+
   }
 
   public void add(Type type, String data) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResultMessage.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResultMessage.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResultMessage.java
index 370253c..f137ca5 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResultMessage.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResultMessage.java
@@ -18,7 +18,9 @@ package org.apache.zeppelin.interpreter;
 
 import java.io.Serializable;
 
-/** Interpreter result message */
+/**
+ * Interpreter result message
+ */
 public class InterpreterResultMessage implements Serializable {
   InterpreterResult.Type type;
   String data;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResultMessageOutput.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResultMessageOutput.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResultMessageOutput.java
index 436ca4a..8758c98 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResultMessageOutput.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResultMessageOutput.java
@@ -16,6 +16,9 @@
  */
 package org.apache.zeppelin.interpreter;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
@@ -25,10 +28,10 @@ import java.io.OutputStream;
 import java.net.URL;
 import java.util.LinkedList;
 import java.util.List;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** InterpreterMessageOutputStream */
+/**
+ * InterpreterMessageOutputStream
+ */
 public class InterpreterResultMessageOutput extends OutputStream {
   Logger logger = LoggerFactory.getLogger(InterpreterResultMessageOutput.class);
   private final int NEW_LINE_CHAR = '\n';
@@ -43,7 +46,8 @@ public class InterpreterResultMessageOutput extends OutputStream {
   private boolean firstWrite = true;
 
   public InterpreterResultMessageOutput(
-      InterpreterResult.Type type, InterpreterResultMessageOutputListener listener) {
+      InterpreterResult.Type type,
+      InterpreterResultMessageOutputListener listener) {
     this.type = type;
     this.flushListener = listener;
   }
@@ -51,8 +55,7 @@ public class InterpreterResultMessageOutput extends OutputStream {
   public InterpreterResultMessageOutput(
       InterpreterResult.Type type,
       InterpreterResultMessageOutputListener flushListener,
-      InterpreterOutputChangeListener listener)
-      throws IOException {
+      InterpreterOutputChangeListener listener) throws IOException {
     this.type = type;
     this.flushListener = flushListener;
     watcher = new InterpreterOutputChangeWatcher(listener);
@@ -106,12 +109,12 @@ public class InterpreterResultMessageOutput extends OutputStream {
   }
 
   @Override
-  public void write(byte[] b) throws IOException {
+  public void write(byte [] b) throws IOException {
     write(b, 0, b.length);
   }
 
   @Override
-  public void write(byte[] b, int off, int len) throws IOException {
+  public void write(byte [] b, int off, int len) throws IOException {
     synchronized (outList) {
       for (int i = off; i < len; i++) {
         write(b[i]);
@@ -121,7 +124,6 @@ public class InterpreterResultMessageOutput extends OutputStream {
 
   /**
    * In dev mode, it monitors file and update ZeppelinServer
-   *
    * @param file
    * @throws IOException
    */
@@ -138,7 +140,6 @@ public class InterpreterResultMessageOutput extends OutputStream {
 
   /**
    * write contents in the resource file in the classpath
-   *
    * @param url
    * @throws IOException
    */

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResultMessageOutputListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResultMessageOutputListener.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResultMessageOutputListener.java
index 5b56e61..7f14a3e 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResultMessageOutputListener.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterResultMessageOutputListener.java
@@ -16,15 +16,18 @@
  */
 package org.apache.zeppelin.interpreter;
 
-/** InterpreterResultMessage update events */
+/**
+ * InterpreterResultMessage update events
+ */
 public interface InterpreterResultMessageOutputListener {
   /**
    * called when newline is detected
-   *
    * @param line
    */
   void onAppend(InterpreterResultMessageOutput out, byte[] line);
 
-  /** when entire output is updated. eg) after detecting new display system */
+  /**
+   * when entire output is updated. eg) after detecting new display system
+   */
   void onUpdate(InterpreterResultMessageOutput out);
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterRunner.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterRunner.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterRunner.java
index 982823a..e60ada7 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterRunner.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterRunner.java
@@ -2,16 +2,19 @@ package org.apache.zeppelin.interpreter;
 
 import com.google.gson.annotations.SerializedName;
 
-/** Interpreter runner path */
+/**
+ * Interpreter runner path
+ */
 public class InterpreterRunner {
 
   @SerializedName("linux")
   private String linuxPath;
-
   @SerializedName("win")
   private String winPath;
 
-  public InterpreterRunner() {}
+  public InterpreterRunner() {
+
+  }
 
   public InterpreterRunner(String linuxPath, String winPath) {
     this.linuxPath = linuxPath;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterUtils.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterUtils.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterUtils.java
index 49ea68d..c3d3b9e 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterUtils.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterUtils.java
@@ -1,22 +1,27 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.interpreter;
 
 import java.lang.reflect.InvocationTargetException;
 
-/** Interpreter utility functions */
+/**
+ * Interpreter utility functions
+ */
 public class InterpreterUtils {
 
   public static String getMostRelevantMessage(Exception ex) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InvalidHookException.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InvalidHookException.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InvalidHookException.java
index 3d7b308..9b44726 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InvalidHookException.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InvalidHookException.java
@@ -15,9 +15,12 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.interpreter;
 
-/** Exception for invalid hook */
+/**
+ * Exception for invalid hook
+ */
 public class InvalidHookException extends Exception {
 
   public InvalidHookException(String message) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/KerberosInterpreter.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/KerberosInterpreter.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/KerberosInterpreter.java
index 57a4e69..4da5ef5 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/KerberosInterpreter.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/KerberosInterpreter.java
@@ -31,14 +31,18 @@ import org.slf4j.LoggerFactory;
 /**
  * Interpreter wrapper for Kerberos initialization
  *
- * <p>runKerberosLogin() method you need to implement that determine how should this interpeter do a
- * kinit for this interpreter. isKerboseEnabled() method needs to implement which determines if the
- * kerberos is enabled for that interpreter. startKerberosLoginThread() needs to be called inside
- * the open() and shutdownExecutorService() inside close().
+ * runKerberosLogin() method you need to implement that determine how should this interpeter do a
+ * kinit for this interpreter.
+ * isKerboseEnabled() method needs to implement which determines if the kerberos is enabled for that
+ * interpreter.
+ * startKerberosLoginThread() needs to be called inside the open() and
+ * shutdownExecutorService() inside close().
  *
- * <p>Environment variables defined in zeppelin-env.sh KERBEROS_REFRESH_INTERVAL controls the
- * refresh interval for Kerberos ticket. The default value is 1d. KINIT_FAIL_THRESHOLD controls how
- * many times should kinit retry. The default value is 5.
+ * 
+ * Environment variables defined in zeppelin-env.sh
+ * KERBEROS_REFRESH_INTERVAL controls the refresh interval for Kerberos ticket. The default value
+ * is 1d.
+ * KINIT_FAIL_THRESHOLD controls how many times should kinit retry. The default value is 5.
  */
 public abstract class KerberosInterpreter extends Interpreter {
 
@@ -71,18 +75,15 @@ public abstract class KerberosInterpreter extends Interpreter {
   private Long getKerberosRefreshInterval() {
     Long refreshInterval;
     String refreshIntervalString = "1d";
-    // defined in zeppelin-env.sh, if not initialized then the default value is one day.
+    //defined in zeppelin-env.sh, if not initialized then the default value is one day.
     if (System.getenv("KERBEROS_REFRESH_INTERVAL") != null) {
       refreshIntervalString = System.getenv("KERBEROS_REFRESH_INTERVAL");
     }
     try {
       refreshInterval = getTimeAsMs(refreshIntervalString);
     } catch (IllegalArgumentException e) {
-      logger.error(
-          "Cannot get time in MS for the given string, "
-              + refreshIntervalString
-              + " defaulting to 1d ",
-          e);
+      logger.error("Cannot get time in MS for the given string, " + refreshIntervalString
+          + " defaulting to 1d ", e);
       refreshInterval = getTimeAsMs("1d");
     }
 
@@ -91,17 +92,13 @@ public abstract class KerberosInterpreter extends Interpreter {
 
   private Integer kinitFailThreshold() {
     Integer kinitFailThreshold = 5;
-    // defined in zeppelin-env.sh, if not initialized then the default value is 5.
+    //defined in zeppelin-env.sh, if not initialized then the default value is 5.
     if (System.getenv("KINIT_FAIL_THRESHOLD") != null) {
       try {
         kinitFailThreshold = new Integer(System.getenv("KINIT_FAIL_THRESHOLD"));
       } catch (Exception e) {
-        logger.error(
-            "Cannot get integer value from the given string, "
-                + System.getenv("KINIT_FAIL_THRESHOLD")
-                + " defaulting to "
-                + kinitFailThreshold,
-            e);
+        logger.error("Cannot get integer value from the given string, " + System
+            .getenv("KINIT_FAIL_THRESHOLD") + " defaulting to " + kinitFailThreshold, e);
       }
     }
     return kinitFailThreshold;
@@ -125,39 +122,36 @@ public abstract class KerberosInterpreter extends Interpreter {
       throw new IllegalArgumentException("Invalid suffix: \"" + suffix + "\"");
     }
 
-    return TimeUnit.MILLISECONDS.convert(
-        val, suffix != null ? Constants.TIME_SUFFIXES.get(suffix) : TimeUnit.MILLISECONDS);
+    return TimeUnit.MILLISECONDS.convert(val,
+        suffix != null ? Constants.TIME_SUFFIXES.get(suffix) : TimeUnit.MILLISECONDS);
   }
 
   private ScheduledExecutorService startKerberosLoginThread() {
     scheduledExecutorService = Executors.newScheduledThreadPool(1);
 
-    scheduledExecutorService.submit(
-        new Callable() {
-          public Object call() throws Exception {
-
-            if (runKerberosLogin()) {
-              logger.info("Ran runKerberosLogin command successfully.");
-              kinitFailCount = 0;
-              // schedule another kinit run with a fixed delay.
-              scheduledExecutorService.schedule(
-                  this, getKerberosRefreshInterval(), TimeUnit.MILLISECONDS);
-            } else {
-              kinitFailCount++;
-              logger.info("runKerberosLogin failed for " + kinitFailCount + " time(s).");
-              // schedule another retry at once or close the interpreter if too many times kinit
-              // fails
-              if (kinitFailCount >= kinitFailThreshold()) {
-                logger.error(
-                    "runKerberosLogin failed for  max attempts, calling close interpreter.");
-                close();
-              } else {
-                scheduledExecutorService.submit(this);
-              }
-            }
-            return null;
+    scheduledExecutorService.submit(new Callable() {
+      public Object call() throws Exception {
+
+        if (runKerberosLogin()) {
+          logger.info("Ran runKerberosLogin command successfully.");
+          kinitFailCount = 0;
+          // schedule another kinit run with a fixed delay.
+          scheduledExecutorService
+              .schedule(this, getKerberosRefreshInterval(), TimeUnit.MILLISECONDS);
+        } else {
+          kinitFailCount++;
+          logger.info("runKerberosLogin failed for " + kinitFailCount + " time(s).");
+          // schedule another retry at once or close the interpreter if too many times kinit fails
+          if (kinitFailCount >= kinitFailThreshold()) {
+            logger.error("runKerberosLogin failed for  max attempts, calling close interpreter.");
+            close();
+          } else {
+            scheduledExecutorService.submit(this);
           }
-        });
+        }
+        return null;
+      }
+    });
 
     return scheduledExecutorService;
   }
@@ -167,4 +161,5 @@ public abstract class KerberosInterpreter extends Interpreter {
       scheduledExecutorService.shutdown();
     }
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/LazyOpenInterpreter.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/LazyOpenInterpreter.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/LazyOpenInterpreter.java
index 3303751..7581e67 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/LazyOpenInterpreter.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/LazyOpenInterpreter.java
@@ -20,11 +20,16 @@ package org.apache.zeppelin.interpreter;
 import java.net.URL;
 import java.util.List;
 import java.util.Properties;
+
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 
-/** Interpreter wrapper for lazy initialization */
-public class LazyOpenInterpreter extends Interpreter implements WrappedInterpreter {
+/**
+ * Interpreter wrapper for lazy initialization
+ */
+public class LazyOpenInterpreter
+    extends Interpreter
+    implements WrappedInterpreter {
   private Interpreter intp;
   volatile boolean opened = false;
 
@@ -127,8 +132,8 @@ public class LazyOpenInterpreter extends Interpreter implements WrappedInterpret
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) throws InterpreterException {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) throws InterpreterException {
     open();
     List completion = intp.completion(buf, cursor, interpreterContext);
     return completion;
@@ -150,12 +155,12 @@ public class LazyOpenInterpreter extends Interpreter implements WrappedInterpret
   }
 
   @Override
-  public URL[] getClassloaderUrls() {
+  public URL [] getClassloaderUrls() {
     return intp.getClassloaderUrls();
   }
 
   @Override
-  public void setClassloaderUrls(URL[] urls) {
+  public void setClassloaderUrls(URL [] urls) {
     intp.setClassloaderUrls(urls);
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/RemoteZeppelinServerResource.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/RemoteZeppelinServerResource.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/RemoteZeppelinServerResource.java
index 1511138..bf96a09 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/RemoteZeppelinServerResource.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/RemoteZeppelinServerResource.java
@@ -20,12 +20,16 @@ package org.apache.zeppelin.interpreter;
 import com.google.gson.Gson;
 import org.apache.zeppelin.common.JsonSerializable;
 
-/** Remote Zeppelin Server Resource */
+/**
+ * Remote Zeppelin Server Resource
+ */
 public class RemoteZeppelinServerResource implements JsonSerializable {
   private static final Gson gson = new Gson();
 
-  /** Resource Type for Zeppelin Server */
-  public enum Type {
+  /**
+   * Resource Type for Zeppelin Server
+   */
+  public enum Type{
     PARAGRAPH_RUNNERS
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/ResultMessages.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/ResultMessages.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/ResultMessages.java
index 2fa3de8..d32299e 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/ResultMessages.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/ResultMessages.java
@@ -17,32 +17,30 @@
 
 package org.apache.zeppelin.interpreter;
 
-/** */
+/**
+ *
+ */
 public class ResultMessages {
   public static final String EXCEEDS_LIMIT_ROWS =
       "<strong>Output is truncated</strong> to %s rows. Learn more about <strong>%s</strong>";
   public static final String EXCEEDS_LIMIT_SIZE =
       "<strong>Output is truncated</strong> to %s bytes. Learn more about <strong>%s</strong>";
   public static final String EXCEEDS_LIMIT =
-      "<div class=\"result-alert alert-warning\" role=\"alert\">"
-          + "<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">"
-          + "<span aria-hidden=\"true\">&times;</span></button>"
-          + "%s"
-          + "</div>";
+      "<div class=\"result-alert alert-warning\" role=\"alert\">" +
+          "<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">" +
+          "<span aria-hidden=\"true\">&times;</span></button>" +
+          "%s" +
+          "</div>";
 
   public static InterpreterResultMessage getExceedsLimitRowsMessage(int amount, String variable) {
-    InterpreterResultMessage message =
-        new InterpreterResultMessage(
-            InterpreterResult.Type.HTML,
-            String.format(EXCEEDS_LIMIT, String.format(EXCEEDS_LIMIT_ROWS, amount, variable)));
+    InterpreterResultMessage message = new InterpreterResultMessage(InterpreterResult.Type.HTML,
+        String.format(EXCEEDS_LIMIT, String.format(EXCEEDS_LIMIT_ROWS, amount, variable)));
     return message;
   }
 
   public static InterpreterResultMessage getExceedsLimitSizeMessage(int amount, String variable) {
-    InterpreterResultMessage message =
-        new InterpreterResultMessage(
-            InterpreterResult.Type.HTML,
-            String.format(EXCEEDS_LIMIT, String.format(EXCEEDS_LIMIT_SIZE, amount, variable)));
+    InterpreterResultMessage message = new InterpreterResultMessage(InterpreterResult.Type.HTML,
+        String.format(EXCEEDS_LIMIT, String.format(EXCEEDS_LIMIT_SIZE, amount, variable)));
     return message;
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/WrappedInterpreter.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/WrappedInterpreter.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/WrappedInterpreter.java
index 39785cb..040b546 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/WrappedInterpreter.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/WrappedInterpreter.java
@@ -17,7 +17,9 @@
 
 package org.apache.zeppelin.interpreter;
 
-/** WrappedInterpreter */
+/**
+ * WrappedInterpreter
+ */
 public interface WrappedInterpreter {
   Interpreter getInnerInterpreter();
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/graph/GraphResult.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/graph/GraphResult.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/graph/GraphResult.java
index e12d8bf..df1b9a3 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/graph/GraphResult.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/graph/GraphResult.java
@@ -17,40 +17,52 @@
 
 package org.apache.zeppelin.interpreter.graph;
 
-import com.google.gson.Gson;
 import java.util.Collection;
 import java.util.Map;
 import java.util.Set;
+
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.tabledata.Node;
 import org.apache.zeppelin.tabledata.Relationship;
 
-/** The intepreter result template for Networks */
+import com.google.gson.Gson;
+
+/**
+ * The intepreter result template for Networks
+ *
+ */
 public class GraphResult extends InterpreterResult {
 
-  /** The Graph structure parsed from the front-end */
+  /**
+   * The Graph structure parsed from the front-end
+   *
+   */
   public static class Graph {
     private Collection<Node> nodes;
-
+    
     private Collection<Relationship> edges;
-
-    /** The node types in the whole graph, and the related colors */
+    
+    /**
+     * The node types in the whole graph, and the related colors
+     * 
+     */
     private Map<String, String> labels;
-
-    /** The relationship types in the whole graph */
+    
+    /**
+     * The relationship types in the whole graph
+     * 
+     */
     private Set<String> types;
 
-    /** Is a directed graph */
+    /**
+     * Is a directed graph
+     */
     private boolean directed;
-
+    
     public Graph() {}
 
-    public Graph(
-        Collection<Node> nodes,
-        Collection<Relationship> edges,
-        Map<String, String> labels,
-        Set<String> types,
-        boolean directed) {
+    public Graph(Collection<Node> nodes, Collection<Relationship> edges,
+        Map<String, String> labels, Set<String> types, boolean directed) {
       super();
       this.setNodes(nodes);
       this.setEdges(edges);
@@ -86,7 +98,7 @@ public class GraphResult extends InterpreterResult {
     public Set<String> getTypes() {
       return types;
     }
-
+    
     public void setTypes(Set<String> types) {
       this.types = types;
     }
@@ -98,11 +110,13 @@ public class GraphResult extends InterpreterResult {
     public void setDirected(boolean directed) {
       this.directed = directed;
     }
-  }
 
+  }
+  
   private static final Gson gson = new Gson();
 
   public GraphResult(Code code, Graph graphObject) {
     super(code, Type.NETWORK, gson.toJson(graphObject));
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/launcher/InterpreterLaunchContext.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/launcher/InterpreterLaunchContext.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/launcher/InterpreterLaunchContext.java
index 6b61f53..136d866 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/launcher/InterpreterLaunchContext.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/launcher/InterpreterLaunchContext.java
@@ -17,11 +17,14 @@
 
 package org.apache.zeppelin.interpreter.launcher;
 
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.InterpreterOption;
 import org.apache.zeppelin.interpreter.InterpreterRunner;
 
-/** Context class for Interpreter Launch */
+import java.util.Properties;
+
+/**
+ * Context class for Interpreter Launch
+ */
 public class InterpreterLaunchContext {
 
   private Properties properties;
@@ -35,17 +38,16 @@ public class InterpreterLaunchContext {
   private int zeppelinServerRPCPort;
   private String zeppelinServerHost;
 
-  public InterpreterLaunchContext(
-      Properties properties,
-      InterpreterOption option,
-      InterpreterRunner runner,
-      String userName,
-      String interpreterGroupId,
-      String interpreterSettingId,
-      String interpreterSettingGroup,
-      String interpreterSettingName,
-      int zeppelinServerRPCPort,
-      String zeppelinServerHost) {
+  public InterpreterLaunchContext(Properties properties,
+                                  InterpreterOption option,
+                                  InterpreterRunner runner,
+                                  String userName,
+                                  String interpreterGroupId,
+                                  String interpreterSettingId,
+                                  String interpreterSettingGroup,
+                                  String interpreterSettingName,
+                                  int zeppelinServerRPCPort,
+                                  String zeppelinServerHost) {
     this.properties = properties;
     this.option = option;
     this.runner = runner;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/launcher/InterpreterLauncher.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/launcher/InterpreterLauncher.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/launcher/InterpreterLauncher.java
index dfec532..30cf995 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/launcher/InterpreterLauncher.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/launcher/InterpreterLauncher.java
@@ -17,12 +17,15 @@
 
 package org.apache.zeppelin.interpreter.launcher;
 
-import java.io.IOException;
-import java.util.Properties;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.interpreter.recovery.RecoveryStorage;
 
-/** Component to Launch interpreter process. */
+import java.io.IOException;
+import java.util.Properties;
+
+/**
+ * Component to Launch interpreter process.
+ */
 public abstract class InterpreterLauncher {
 
   protected ZeppelinConfiguration zConf;
@@ -39,11 +42,8 @@ public abstract class InterpreterLauncher {
         zConf.getInt(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT);
     if (properties.containsKey(
         ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT.getVarName())) {
-      connectTimeout =
-          Integer.parseInt(
-              properties.getProperty(
-                  ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT
-                      .getVarName()));
+      connectTimeout = Integer.parseInt(properties.getProperty(
+          ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT.getVarName()));
     }
     return connectTimeout;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/recovery/RecoveryStorage.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/recovery/RecoveryStorage.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/recovery/RecoveryStorage.java
index 3f64700..8bbe830 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/recovery/RecoveryStorage.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/recovery/RecoveryStorage.java
@@ -17,12 +17,17 @@
 
 package org.apache.zeppelin.interpreter.recovery;
 
-import java.io.IOException;
-import java.util.Map;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.interpreter.launcher.InterpreterClient;
 
-/** Interface for storing interpreter process recovery metadata. */
+import java.io.IOException;
+import java.util.Map;
+
+
+/**
+ * Interface for storing interpreter process recovery metadata.
+ *
+ */
 public abstract class RecoveryStorage {
 
   protected ZeppelinConfiguration zConf;
@@ -34,7 +39,6 @@ public abstract class RecoveryStorage {
 
   /**
    * Update RecoveryStorage when new InterpreterClient is started
-   *
    * @param client
    * @throws IOException
    */
@@ -42,13 +46,13 @@ public abstract class RecoveryStorage {
 
   /**
    * Update RecoveryStorage when InterpreterClient is stopped
-   *
    * @param client
    * @throws IOException
    */
   public abstract void onInterpreterClientStop(InterpreterClient client) throws IOException;
 
   /**
+   *
    * It is only called when Zeppelin Server is started.
    *
    * @return
@@ -56,6 +60,7 @@ public abstract class RecoveryStorage {
    */
   public abstract Map<String, InterpreterClient> restore() throws IOException;
 
+
   /**
    * It is called after constructor
    *

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/InvokeResourceMethodEventMessage.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/InvokeResourceMethodEventMessage.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/InvokeResourceMethodEventMessage.java
index 623ce87..aaf3d7b 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/InvokeResourceMethodEventMessage.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/InvokeResourceMethodEventMessage.java
@@ -20,7 +20,9 @@ import com.google.gson.Gson;
 import org.apache.zeppelin.common.JsonSerializable;
 import org.apache.zeppelin.resource.ResourceId;
 
-/** message payload to invoke method of resource in the resourcepool */
+/**
+ * message payload to invoke method of resource in the resourcepool
+ */
 public class InvokeResourceMethodEventMessage implements JsonSerializable {
   private static final Gson gson = new Gson();
 
@@ -35,7 +37,8 @@ public class InvokeResourceMethodEventMessage implements JsonSerializable {
       String methodName,
       Class[] paramtypes,
       Object[] params,
-      String returnResourceName) {
+      String returnResourceName
+  ) {
     this.resourceId = resourceId;
     this.methodName = methodName;
     if (paramtypes != null) {
@@ -51,12 +54,12 @@ public class InvokeResourceMethodEventMessage implements JsonSerializable {
     this.returnResourceName = returnResourceName;
   }
 
-  public Class[] getParamTypes() throws ClassNotFoundException {
+  public Class [] getParamTypes() throws ClassNotFoundException {
     if (paramClassnames == null) {
       return null;
     }
 
-    Class[] types = new Class[paramClassnames.length];
+    Class [] types = new Class[paramClassnames.length];
     for (int i = 0; i < paramClassnames.length; i++) {
       types[i] = this.getClass().getClassLoader().loadClass(paramClassnames[i]);
     }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterEventClient.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterEventClient.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterEventClient.java
index 37a0c6a..287095d 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterEventClient.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterEventClient.java
@@ -17,11 +17,6 @@
 package org.apache.zeppelin.interpreter.remote;
 
 import com.google.gson.Gson;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
 import org.apache.thrift.TException;
 import org.apache.zeppelin.display.AngularObject;
 import org.apache.zeppelin.display.AngularObjectRegistryListener;
@@ -43,12 +38,18 @@ import org.apache.zeppelin.resource.ResourceSet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
 /**
- * This class is used to communicate with ZeppelinServer via thrift. All the methods are
- * synchronized because thrift client is not thread safe.
+ * This class is used to communicate with ZeppelinServer via thrift.
+ * All the methods are synchronized because thrift client is not thread safe.
  */
-public class RemoteInterpreterEventClient
-    implements ResourcePoolConnector, AngularObjectRegistryListener {
+public class RemoteInterpreterEventClient implements ResourcePoolConnector,
+    AngularObjectRegistryListener {
   private final Logger LOGGER = LoggerFactory.getLogger(RemoteInterpreterEventClient.class);
   private final Gson gson = new Gson();
 
@@ -108,7 +109,10 @@ public class RemoteInterpreterEventClient
    */
   @Override
   public synchronized Object invokeMethod(
-      ResourceId resourceId, String methodName, Class[] paramTypes, Object[] params) {
+      ResourceId resourceId,
+      String methodName,
+      Class[] paramTypes,
+      Object[] params) {
     LOGGER.debug("Request Invoke method {} of Resource {}", methodName, resourceId.getName());
 
     return null;
@@ -211,11 +215,8 @@ public class RemoteInterpreterEventClient
   }
 
   public synchronized void onInterpreterOutputUpdate(
-      String noteId,
-      String paragraphId,
-      int outputIndex,
-      InterpreterResult.Type type,
-      String output) {
+      String noteId, String paragraphId, int outputIndex,
+      InterpreterResult.Type type, String output) {
     try {
       intpEventServiceClient.updateOutput(
           new OutputUpdateEvent(noteId, paragraphId, outputIndex, type.name(), output, null));
@@ -235,7 +236,7 @@ public class RemoteInterpreterEventClient
   }
 
   private List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>
-      convertToThrift(List<InterpreterResultMessage> messages) {
+        convertToThrift(List<InterpreterResultMessage> messages) {
     List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> thriftMessages =
         new ArrayList<>();
     for (InterpreterResultMessage message : messages) {
@@ -246,11 +247,10 @@ public class RemoteInterpreterEventClient
     return thriftMessages;
   }
 
-  public synchronized void runParagraphs(
-      String noteId,
-      List<String> paragraphIds,
-      List<Integer> paragraphIndices,
-      String curParagraphId) {
+  public synchronized void runParagraphs(String noteId,
+                                         List<String> paragraphIds,
+                                         List<Integer> paragraphIndices,
+                                         String curParagraphId) {
     RunParagraphsEvent event =
         new RunParagraphsEvent(noteId, paragraphIds, paragraphIndices, curParagraphId);
     try {
@@ -271,13 +271,10 @@ public class RemoteInterpreterEventClient
     }
   }
 
+
   public synchronized void onAppOutputUpdate(
-      String noteId,
-      String paragraphId,
-      int index,
-      String appId,
-      InterpreterResult.Type type,
-      String output) {
+      String noteId, String paragraphId, int index, String appId,
+      InterpreterResult.Type type, String output) {
     AppOutputUpdateEvent event =
         new AppOutputUpdateEvent(noteId, paragraphId, appId, index, type.name(), output);
     try {
@@ -287,8 +284,8 @@ public class RemoteInterpreterEventClient
     }
   }
 
-  public synchronized void onAppStatusUpdate(
-      String noteId, String paragraphId, String appId, String status) {
+  public synchronized void onAppStatusUpdate(String noteId, String paragraphId, String appId,
+                                             String status) {
     AppStatusUpdateEvent event = new AppStatusUpdateEvent(noteId, paragraphId, appId, status);
     try {
       intpEventServiceClient.updateAppStatus(event);
@@ -324,8 +321,8 @@ public class RemoteInterpreterEventClient
   }
 
   @Override
-  public synchronized void onRemove(
-      String interpreterGroupId, String name, String noteId, String paragraphId) {
+  public synchronized void onRemove(String interpreterGroupId, String name, String noteId,
+                                    String paragraphId) {
     try {
       intpEventServiceClient.removeAngularObject(intpGroupId, noteId, paragraphId, name);
     } catch (TException e) {


[34/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterModeActionsIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterModeActionsIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterModeActionsIT.java
index cf3f796..1f18a65 100644
--- a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterModeActionsIT.java
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterModeActionsIT.java
@@ -16,17 +16,10 @@
  */
 package org.apache.zeppelin.integration;
 
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
-import org.apache.zeppelin.AbstractZeppelinIT;
 import org.apache.zeppelin.CommandExecutor;
 import org.apache.zeppelin.ProcessData;
+import org.apache.zeppelin.AbstractZeppelinIT;
 import org.apache.zeppelin.WebDriverManager;
 import org.apache.zeppelin.ZeppelinITUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
@@ -37,53 +30,59 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ErrorCollector;
 import org.openqa.selenium.By;
-import org.openqa.selenium.JavascriptExecutor;
-import org.openqa.selenium.TimeoutException;
 import org.openqa.selenium.WebElement;
-import org.openqa.selenium.support.ui.ExpectedConditions;
 import org.openqa.selenium.support.ui.WebDriverWait;
+import org.openqa.selenium.JavascriptExecutor;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.TimeoutException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.commons.io.FileUtils;
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.List;
+
+import static org.junit.Assert.assertTrue;
+
 public class InterpreterModeActionsIT extends AbstractZeppelinIT {
   private static final Logger LOG = LoggerFactory.getLogger(InterpreterModeActionsIT.class);
 
-  @Rule public ErrorCollector collector = new ErrorCollector();
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
   static String shiroPath;
-  static String authShiro =
-      "[users]\n"
-          + "admin = password1, admin\n"
-          + "user1 = password2, admin\n"
-          + "user2 = password3, admin\n"
-          + "[main]\n"
-          + "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n"
-          + "securityManager.sessionManager = $sessionManager\n"
-          + "securityManager.sessionManager.globalSessionTimeout = 86400000\n"
-          + "shiro.loginUrl = /api/login\n"
-          + "[roles]\n"
-          + "admin = *\n"
-          + "[urls]\n"
-          + "/api/version = anon\n"
-          + "/** = authc";
+  static String authShiro = "[users]\n" +
+      "admin = password1, admin\n" +
+      "user1 = password2, admin\n" +
+      "user2 = password3, admin\n" +
+      "[main]\n" +
+      "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n" +
+      "securityManager.sessionManager = $sessionManager\n" +
+      "securityManager.sessionManager.globalSessionTimeout = 86400000\n" +
+      "shiro.loginUrl = /api/login\n" +
+      "[roles]\n" +
+      "admin = *\n" +
+      "[urls]\n" +
+      "/api/version = anon\n" +
+      "/** = authc";
 
   static String originalShiro = "";
   static String interpreterOptionPath = "";
   static String originalInterpreterOption = "";
 
   static String cmdPsPython = "ps aux | grep 'zeppelin_ipython' | grep -v 'grep' | wc -l";
-  static String cmdPsInterpreter =
-      "ps aux | grep 'zeppelin/interpreter/python/*' |" + " sed -E '/grep|local-repo/d' | wc -l";
+  static String cmdPsInterpreter = "ps aux | grep 'zeppelin/interpreter/python/*' |" +
+      " sed -E '/grep|local-repo/d' | wc -l";
 
   @BeforeClass
   public static void startUp() {
     try {
-      System.setProperty(
-          ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(),
-          new File("../").getAbsolutePath());
+      System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(), new File("../").getAbsolutePath());
       ZeppelinConfiguration conf = ZeppelinConfiguration.create();
       shiroPath = conf.getRelativeDir(String.format("%s/shiro.ini", conf.getConfDir()));
-      interpreterOptionPath =
-          conf.getRelativeDir(String.format("%s/interpreter.json", conf.getConfDir()));
+      interpreterOptionPath = conf.getRelativeDir(String.format("%s/interpreter.json", conf.getConfDir()));
       File shiroFile = new File(shiroPath);
       if (shiroFile.exists()) {
         originalShiro = StringUtils.join(FileUtils.readLines(shiroFile, "UTF-8"), "\n");
@@ -92,8 +91,7 @@ public class InterpreterModeActionsIT extends AbstractZeppelinIT {
 
       File interpreterOptionFile = new File(interpreterOptionPath);
       if (interpreterOptionFile.exists()) {
-        originalInterpreterOption =
-            StringUtils.join(FileUtils.readLines(interpreterOptionFile, "UTF-8"), "\n");
+        originalInterpreterOption = StringUtils.join(FileUtils.readLines(interpreterOptionFile, "UTF-8"), "\n");
       }
     } catch (IOException e) {
       LOG.error("Error in InterpreterModeActionsIT startUp::", e);
@@ -129,44 +127,28 @@ public class InterpreterModeActionsIT extends AbstractZeppelinIT {
   }
 
   private void authenticationUser(String userName, String password) {
-    pollingWait(
-            By.xpath("//div[contains(@class, 'navbar-collapse')]//li//button[contains(.,'Login')]"),
-            MAX_BROWSER_TIMEOUT_SEC)
-        .click();
+    pollingWait(By.xpath(
+        "//div[contains(@class, 'navbar-collapse')]//li//button[contains(.,'Login')]"),
+        MAX_BROWSER_TIMEOUT_SEC).click();
     ZeppelinITUtils.sleep(500, false);
     pollingWait(By.xpath("//*[@id='userName']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys(userName);
     pollingWait(By.xpath("//*[@id='password']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys(password);
-    pollingWait(
-            By.xpath("//*[@id='loginModalContent']//button[contains(.,'Login')]"),
-            MAX_BROWSER_TIMEOUT_SEC)
-        .click();
+    pollingWait(By.xpath("//*[@id='loginModalContent']//button[contains(.,'Login')]"),
+        MAX_BROWSER_TIMEOUT_SEC).click();
     ZeppelinITUtils.sleep(1000, false);
   }
 
   private void logoutUser(String userName) throws URISyntaxException {
     ZeppelinITUtils.sleep(500, false);
-    driver
-        .findElement(
-            By.xpath(
-                "//div[contains(@class, 'navbar-collapse')]//li[contains(.,'" + userName + "')]"))
-        .click();
+    driver.findElement(By.xpath("//div[contains(@class, 'navbar-collapse')]//li[contains(.,'" +
+        userName + "')]")).click();
     ZeppelinITUtils.sleep(500, false);
-    driver
-        .findElement(
-            By.xpath(
-                "//div[contains(@class, 'navbar-collapse')]//li[contains(.,'"
-                    + userName
-                    + "')]//a[@ng-click='navbar.logout()']"))
-        .click();
+    driver.findElement(By.xpath("//div[contains(@class, 'navbar-collapse')]//li[contains(.,'" +
+        userName + "')]//a[@ng-click='navbar.logout()']")).click();
     ZeppelinITUtils.sleep(2000, false);
-    if (driver
-        .findElement(
-            By.xpath("//*[@id='loginModal']//div[contains(@class, 'modal-header')]/button"))
+    if (driver.findElement(By.xpath("//*[@id='loginModal']//div[contains(@class, 'modal-header')]/button"))
         .isDisplayed()) {
-      driver
-          .findElement(
-              By.xpath("//*[@id='loginModal']//div[contains(@class, 'modal-header')]/button"))
-          .click();
+      driver.findElement(By.xpath("//*[@id='loginModal']//div[contains(@class, 'modal-header')]/button")).click();
     }
     driver.get(new URI(driver.getCurrentUrl()).resolve("/#/").toString());
     ZeppelinITUtils.sleep(500, false);
@@ -179,105 +161,76 @@ public class InterpreterModeActionsIT extends AbstractZeppelinIT {
       waitForParagraph(num, "FINISHED");
     } catch (TimeoutException e) {
       waitForParagraph(num, "ERROR");
-      collector.checkThat(
-          "Exception in InterpreterModeActionsIT while setPythonParagraph",
-          "ERROR",
-          CoreMatchers.equalTo("FINISHED"));
+      collector.checkThat("Exception in InterpreterModeActionsIT while setPythonParagraph",
+          "ERROR", CoreMatchers.equalTo("FINISHED"));
     }
   }
 
   @Test
   public void testGloballyAction() throws Exception {
     try {
-      // step 1: (admin) login, set 'globally in shared' mode of python interpreter, logout
+      //step 1: (admin) login, set 'globally in shared' mode of python interpreter, logout
       InterpreterModeActionsIT interpreterModeActionsIT = new InterpreterModeActionsIT();
       interpreterModeActionsIT.authenticationUser("admin", "password1");
-      pollingWait(
-              By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .click();
+      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
       clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
-      pollingWait(
-              By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .sendKeys("python");
+      pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
+          MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
       ZeppelinITUtils.sleep(500, false);
-      clickAndWait(
-          By.xpath(
-              "//div[contains(@id, 'python')]//button[contains(@ng-click, 'valueform.$show();\n"
-                  + "                  copyOriginInterpreterSettingProperties(setting.id)')]"));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//button[contains(@ng-click, 'valueform.$show();\n" +
+          "                  copyOriginInterpreterSettingProperties(setting.id)')]"));
       clickAndWait(By.xpath("//div[contains(@id, 'python')]/div[2]/div/div/div[1]/span[1]/button"));
       clickAndWait(By.xpath("//div[contains(@id, 'python')]//li/a[contains(.,'Globally')]"));
-      JavascriptExecutor jse = (JavascriptExecutor) driver;
+      JavascriptExecutor jse = (JavascriptExecutor)driver;
       jse.executeScript("window.scrollBy(0,250)", "");
       ZeppelinITUtils.sleep(500, false);
-      clickAndWait(
-          By.xpath("//div[contains(@id, 'python')]//div/form/button[contains(@type, 'submit')]"));
-      clickAndWait(
-          By.xpath(
-              "//div[@class='modal-dialog']//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//div/form/button[contains(@type, 'submit')]"));
+      clickAndWait(By.xpath(
+          "//div[@class='modal-dialog']//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
       clickAndWait(By.xpath("//a[@class='navbar-brand navbar-title'][contains(@href, '#/')]"));
       interpreterModeActionsIT.logoutUser("admin");
-      // step 2: (user1) login, create a new note, run two paragraph with 'python', check result,
-      // check process, logout
-      // paragraph: Check if the result is 'user1' in the second paragraph
-      // System: Check if the number of python interpreter process is '1'
-      // System: Check if the number of python process is '1'
+      //step 2: (user1) login, create a new note, run two paragraph with 'python', check result, check process, logout
+      //paragraph: Check if the result is 'user1' in the second paragraph
+      //System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '1'
       interpreterModeActionsIT.authenticationUser("user1", "password2");
-      By locator =
-          By.xpath(
-              "//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" + " note')]");
-      WebElement element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      By locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      WebElement element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
         createNewNote();
       }
-      String user1noteId =
-          driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+      String user1noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
       waitForParagraph(1, "READY");
       interpreterModeActionsIT.setPythonParagraph(1, "user=\"user1\"");
       waitForParagraph(2, "READY");
       interpreterModeActionsIT.setPythonParagraph(2, "print user");
-      collector.checkThat(
-          "The output field paragraph contains",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.equalTo("user1"));
-      String resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsPython, false, ProcessData.Types_Of_Data.OUTPUT);
+      String resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsInterpreter, false, ProcessData.Types_Of_Data.OUTPUT);
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python interpreter process is",
-          resultProcessNum,
-          CoreMatchers.equalTo("1"));
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
 
       interpreterModeActionsIT.logoutUser("user1");
 
-      // step 3: (user2) login, create a new note, run two paragraph with 'python', check result,
-      // check process, logout
-      // paragraph: Check if the result is 'user2' in the second paragraph
-      // System: Check if the number of python interpreter process is '1'
-      // System: Check if the number of python process is '1'
+      //step 3: (user2) login, create a new note, run two paragraph with 'python', check result, check process, logout
+      //paragraph: Check if the result is 'user2' in the second paragraph
+      //System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '1'
       interpreterModeActionsIT.authenticationUser("user2", "password3");
-      locator =
-          By.xpath(
-              "//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" + " note')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
         createNewNote();
       }
@@ -285,48 +238,32 @@ public class InterpreterModeActionsIT extends AbstractZeppelinIT {
       interpreterModeActionsIT.setPythonParagraph(1, "user=\"user2\"");
       waitForParagraph(2, "READY");
       interpreterModeActionsIT.setPythonParagraph(2, "print user");
-      collector.checkThat(
-          "The output field paragraph contains",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.equalTo("user2"));
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsPython, false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsInterpreter, false, ProcessData.Types_Of_Data.OUTPUT);
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python interpreter process is",
-          resultProcessNum,
-          CoreMatchers.equalTo("1"));
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
       interpreterModeActionsIT.logoutUser("user2");
 
-      // step 4: (user1) login, come back note user1 made, run second paragraph, check result, check
-      // process,
-      // restart python interpreter, check process again, logout
-      // paragraph: Check if the result is 'user2' in the second paragraph
-      // System: Check if the number of python interpreter process is '1'
-      // System: Check if the number of python process is '1'
+      //step 4: (user1) login, come back note user1 made, run second paragraph, check result, check process,
+      //restart python interpreter, check process again, logout
+      //paragraph: Check if the result is 'user2' in the second paragraph
+      //System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '1'
       interpreterModeActionsIT.authenticationUser("user1", "password2");
       locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        pollingWait(
-                By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
-                MAX_BROWSER_TIMEOUT_SEC)
-            .click();
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
       }
       waitForParagraph(2, "FINISHED");
       runParagraph(2);
@@ -334,74 +271,44 @@ public class InterpreterModeActionsIT extends AbstractZeppelinIT {
         waitForParagraph(2, "FINISHED");
       } catch (TimeoutException e) {
         waitForParagraph(2, "ERROR");
-        collector.checkThat(
-            "Exception in InterpreterModeActionsIT while running Python Paragraph",
-            "ERROR",
-            CoreMatchers.equalTo("FINISHED"));
-      }
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsPython, false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsInterpreter, false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python interpreter process is",
-          resultProcessNum,
-          CoreMatchers.equalTo("1"));
-
-      clickAndWait(
-          By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
-      clickAndWait(
-          By.xpath(
-              "//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
-      clickAndWait(
-          By.xpath(
-              "//div[@class='modal-dialog']"
-                  + "[contains(.,'Do you want to restart python interpreter?')]"
-                  + "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
-      locator =
-          By.xpath(
-              "//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
-      LOG.info(
-          "Holding on until if interpreter restart dialog is disappeared or not testGloballyAction");
-      boolean invisibilityStatus =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.invisibilityOfElementLocated(locator));
+        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
+      }
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
+
+      clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+      clickAndWait(By.xpath("//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
+      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
+          "[contains(.,'Do you want to restart python interpreter?')]" +
+          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
+      LOG.info("Holding on until if interpreter restart dialog is disappeared or not testGloballyAction");
+      boolean invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
       if (invisibilityStatus == false) {
         assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
       }
-      locator =
-          By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      locator = By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        clickAndWait(
-            By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+        clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
       }
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsPython, false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsInterpreter, false, ProcessData.Types_Of_Data.OUTPUT);
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python interpreter process is",
-          resultProcessNum,
-          CoreMatchers.equalTo("0"));
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("0"));
       interpreterModeActionsIT.logoutUser("user1");
     } catch (Exception e) {
       handleException("Exception in InterpreterModeActionsIT while testGloballyAction ", e);
@@ -411,302 +318,206 @@ public class InterpreterModeActionsIT extends AbstractZeppelinIT {
   @Test
   public void testPerUserScopedAction() throws Exception {
     try {
-      // step 1: (admin) login, set 'Per user in scoped' mode of python interpreter, logout
+      //step 1: (admin) login, set 'Per user in scoped' mode of python interpreter, logout
       InterpreterModeActionsIT interpreterModeActionsIT = new InterpreterModeActionsIT();
       interpreterModeActionsIT.authenticationUser("admin", "password1");
-      pollingWait(
-              By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .click();
+      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
 
       clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
-      pollingWait(
-              By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .sendKeys("python");
+      pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
+          MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
       ZeppelinITUtils.sleep(500, false);
 
-      clickAndWait(
-          By.xpath(
-              "//div[contains(@id, 'python')]//button[contains(@ng-click, 'valueform.$show();\n"
-                  + "                  copyOriginInterpreterSettingProperties(setting.id)')]"));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//button[contains(@ng-click, 'valueform.$show();\n" +
+          "                  copyOriginInterpreterSettingProperties(setting.id)')]"));
       clickAndWait(By.xpath("//div[contains(@id, 'python')]/div[2]/div/div/div[1]/span[1]/button"));
       clickAndWait(By.xpath("//div[contains(@id, 'python')]//li/a[contains(.,'Per User')]"));
       clickAndWait(By.xpath("//div[contains(@id, 'python')]/div[2]/div/div/div[1]/span[2]/button"));
       clickAndWait(By.xpath("//div[contains(@id, 'python')]//li/a[contains(.,'scoped per user')]"));
 
-      JavascriptExecutor jse = (JavascriptExecutor) driver;
+      JavascriptExecutor jse = (JavascriptExecutor)driver;
       jse.executeScript("window.scrollBy(0,250)", "");
       ZeppelinITUtils.sleep(500, false);
-      clickAndWait(
-          By.xpath("//div[contains(@id, 'python')]//div/form/button[contains(@type, 'submit')]"));
-      clickAndWait(
-          By.xpath(
-              "//div[@class='modal-dialog']//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//div/form/button[contains(@type, 'submit')]"));
+      clickAndWait(By.xpath(
+          "//div[@class='modal-dialog']//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
       clickAndWait(By.xpath("//a[@class='navbar-brand navbar-title'][contains(@href, '#/')]"));
 
       interpreterModeActionsIT.logoutUser("admin");
 
-      // step 2: (user1) login, create a new note, run two paragraph with 'python', check result,
-      // check process, logout
-      // paragraph: Check if the result is 'user1' in the second paragraph
-      // System: Check if the number of python interpreter process is '1'
-      // System: Check if the number of python process is '1'
+      //step 2: (user1) login, create a new note, run two paragraph with 'python', check result, check process, logout
+      //paragraph: Check if the result is 'user1' in the second paragraph
+      //System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '1'
       interpreterModeActionsIT.authenticationUser("user1", "password2");
-      By locator =
-          By.xpath(
-              "//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" + " note')]");
-      WebElement element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      By locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      WebElement element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
         createNewNote();
       }
-      String user1noteId =
-          driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+      String user1noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
 
       waitForParagraph(1, "READY");
       interpreterModeActionsIT.setPythonParagraph(1, "user=\"user1\"");
       waitForParagraph(2, "READY");
       interpreterModeActionsIT.setPythonParagraph(2, "print user");
 
-      collector.checkThat(
-          "The output field paragraph contains",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.equalTo("user1"));
 
-      String resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsPython, false, ProcessData.Types_Of_Data.OUTPUT);
+      String resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsInterpreter, false, ProcessData.Types_Of_Data.OUTPUT);
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python interpreter process is",
-          resultProcessNum,
-          CoreMatchers.equalTo("1"));
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
       interpreterModeActionsIT.logoutUser("user1");
 
-      // step 3: (user2) login, create a new note, run two paragraph with 'python', check result,
-      // check process, logout
+      //step 3: (user2) login, create a new note, run two paragraph with 'python', check result, check process, logout
       //                paragraph: Check if the result is 'user2' in the second paragraph
-      // System: Check if the number of python interpreter process is '1'
-      // System: Check if the number of python process is '2'
+      //System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '2'
       interpreterModeActionsIT.authenticationUser("user2", "password3");
-      locator =
-          By.xpath(
-              "//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" + " note')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
         createNewNote();
       }
-      String user2noteId =
-          driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+      String user2noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
       waitForParagraph(1, "READY");
       interpreterModeActionsIT.setPythonParagraph(1, "user=\"user2\"");
       waitForParagraph(2, "READY");
       interpreterModeActionsIT.setPythonParagraph(2, "print user");
-      collector.checkThat(
-          "The output field paragraph contains",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.equalTo("user2"));
 
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsPython, false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python process is", resultProcessNum, CoreMatchers.equalTo("2"));
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsInterpreter, false, ProcessData.Types_Of_Data.OUTPUT);
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("2"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python interpreter process is",
-          resultProcessNum,
-          CoreMatchers.equalTo("1"));
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
       interpreterModeActionsIT.logoutUser("user2");
 
-      // step 4: (user1) login, come back note user1 made, run second paragraph, check result,
+      //step 4: (user1) login, come back note user1 made, run second paragraph, check result,
       //                restart python interpreter in note, check process again, logout
-      // paragraph: Check if the result is 'user1' in the second paragraph
-      // System: Check if the number of python interpreter process is '1'
-      // System: Check if the number of python process is '1'
+      //paragraph: Check if the result is 'user1' in the second paragraph
+      //System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '1'
       interpreterModeActionsIT.authenticationUser("user1", "password2");
       locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        pollingWait(
-                By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
-                MAX_BROWSER_TIMEOUT_SEC)
-            .click();
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
       }
       runParagraph(2);
       try {
         waitForParagraph(2, "FINISHED");
       } catch (TimeoutException e) {
         waitForParagraph(2, "ERROR");
-        collector.checkThat(
-            "Exception in InterpreterModeActionsIT while running Python Paragraph",
-            "ERROR",
-            CoreMatchers.equalTo("FINISHED"));
+        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
       }
-      collector.checkThat(
-          "The output field paragraph contains",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.equalTo("user1"));
 
-      clickAndWait(
-          By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
-      clickAndWait(
-          By.xpath(
-              "//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
-      clickAndWait(
-          By.xpath(
-              "//div[@class='modal-dialog']"
-                  + "[contains(.,'Do you want to restart python interpreter?')]"
-                  + "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
-      locator =
-          By.xpath(
-              "//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
-      LOG.info(
-          "Holding on until if interpreter restart dialog is disappeared or not in testPerUserScopedAction");
-      boolean invisibilityStatus =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.invisibilityOfElementLocated(locator));
+      clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+      clickAndWait(By.xpath("//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
+      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
+          "[contains(.,'Do you want to restart python interpreter?')]" +
+          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
+      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserScopedAction");
+      boolean invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
       if (invisibilityStatus == false) {
         assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
       }
-      locator =
-          By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      locator = By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        clickAndWait(
-            By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+        clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
       }
 
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsPython, false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsInterpreter, false, ProcessData.Types_Of_Data.OUTPUT);
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python interpreter process is",
-          resultProcessNum,
-          CoreMatchers.equalTo("1"));
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
       interpreterModeActionsIT.logoutUser("user1");
 
-      // step 5: (user2) login, come back note user2 made, restart python interpreter in note, check
-      // process, logout
-      // System: Check if the number of python interpreter process is '0'
-      // System: Check if the number of python process is '0'
+      //step 5: (user2) login, come back note user2 made, restart python interpreter in note, check process, logout
+      //System: Check if the number of python interpreter process is '0'
+      //System: Check if the number of python process is '0'
       interpreterModeActionsIT.authenticationUser("user2", "password3");
       locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        pollingWait(
-                By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
-                MAX_BROWSER_TIMEOUT_SEC)
-            .click();
-      }
-      clickAndWait(
-          By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
-      clickAndWait(
-          By.xpath(
-              "//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
-      clickAndWait(
-          By.xpath(
-              "//div[@class='modal-dialog']"
-                  + "[contains(.,'Do you want to restart python interpreter?')]"
-                  + "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
-      locator =
-          By.xpath(
-              "//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
-      LOG.info(
-          "Holding on until if interpreter restart dialog is disappeared or not in testPerUserScopedAction");
-      invisibilityStatus =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.invisibilityOfElementLocated(locator));
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+      clickAndWait(By.xpath("//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
+      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
+          "[contains(.,'Do you want to restart python interpreter?')]" +
+          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
+      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserScopedAction");
+      invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
       if (invisibilityStatus == false) {
         assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
       }
-      locator =
-          By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      locator = By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        clickAndWait(
-            By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+        clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
       }
 
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsPython, false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsInterpreter, false, ProcessData.Types_Of_Data.OUTPUT);
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python interpreter process is",
-          resultProcessNum,
-          CoreMatchers.equalTo("0"));
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("0"));
       interpreterModeActionsIT.logoutUser("user2");
 
-      // step 6: (user1) login, come back note user1 made, run first paragraph,logout
+      //step 6: (user1) login, come back note user1 made, run first paragraph,logout
       //        (user2) login, come back note user2 made, run first paragraph, check process, logout
-      // System: Check if the number of python process is '2'
-      // System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '2'
+      //System: Check if the number of python interpreter process is '1'
       interpreterModeActionsIT.authenticationUser("user1", "password2");
       locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        pollingWait(
-                By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
-                MAX_BROWSER_TIMEOUT_SEC)
-            .click();
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
       }
       waitForParagraph(1, "FINISHED");
       runParagraph(1);
@@ -714,105 +525,70 @@ public class InterpreterModeActionsIT extends AbstractZeppelinIT {
         waitForParagraph(1, "FINISHED");
       } catch (TimeoutException e) {
         waitForParagraph(1, "ERROR");
-        collector.checkThat(
-            "Exception in InterpreterModeActionsIT while running Python Paragraph",
-            "ERROR",
-            CoreMatchers.equalTo("FINISHED"));
+        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
       }
       interpreterModeActionsIT.logoutUser("user1");
 
       interpreterModeActionsIT.authenticationUser("user2", "password3");
       locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        pollingWait(
-                By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
-                MAX_BROWSER_TIMEOUT_SEC)
-            .click();
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
       }
       runParagraph(1);
       try {
         waitForParagraph(1, "FINISHED");
       } catch (TimeoutException e) {
         waitForParagraph(1, "ERROR");
-        collector.checkThat(
-            "Exception in InterpreterModeActionsIT while running Python Paragraph",
-            "ERROR",
-            CoreMatchers.equalTo("FINISHED"));
+        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
       }
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsPython, false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python process is", resultProcessNum, CoreMatchers.equalTo("2"));
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsInterpreter, false, ProcessData.Types_Of_Data.OUTPUT);
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("2"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python interpreter process is",
-          resultProcessNum,
-          CoreMatchers.equalTo("1"));
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
       interpreterModeActionsIT.logoutUser("user2");
 
-      // step 7: (admin) login, restart python interpreter in interpreter tab, check process, logout
-      // System: Check if the number of python interpreter process is 0
-      // System: Check if the number of python process is 0
+      //step 7: (admin) login, restart python interpreter in interpreter tab, check process, logout
+      //System: Check if the number of python interpreter process is 0
+      //System: Check if the number of python process is 0
       interpreterModeActionsIT.authenticationUser("admin", "password1");
-      pollingWait(
-              By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .click();
+      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
 
       clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
-      pollingWait(
-              By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .sendKeys("python");
+      pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
+          MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
       ZeppelinITUtils.sleep(500, false);
 
-      clickAndWait(
-          By.xpath(
-              "//div[contains(@id, 'python')]"
-                  + "//button[contains(@ng-click, 'restartInterpreterSetting(setting.id)')]"));
-      clickAndWait(
-          By.xpath(
-              "//div[@class='modal-dialog']"
-                  + "[contains(.,'Do you want to restart this interpreter?')]"
-                  + "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
-      locator =
-          By.xpath(
-              "//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
-      LOG.info(
-          "Holding on until if interpreter restart dialog is disappeared or not in testPerUserScopedAction");
-      invisibilityStatus =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.invisibilityOfElementLocated(locator));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]" +
+          "//button[contains(@ng-click, 'restartInterpreterSetting(setting.id)')]"));
+      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
+          "[contains(.,'Do you want to restart this interpreter?')]" +
+          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
+      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserScopedAction");
+      invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
       if (invisibilityStatus == false) {
         assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
       }
 
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsPython, false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsInterpreter, false, ProcessData.Types_Of_Data.OUTPUT);
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python interpreter process is",
-          resultProcessNum,
-          CoreMatchers.equalTo("0"));
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("0"));
 
       interpreterModeActionsIT.logoutUser("admin");
 
@@ -824,301 +600,204 @@ public class InterpreterModeActionsIT extends AbstractZeppelinIT {
   @Test
   public void testPerUserIsolatedAction() throws Exception {
     try {
-      // step 1: (admin) login, set 'Per user in isolated' mode of python interpreter, logout
+      //step 1: (admin) login, set 'Per user in isolated' mode of python interpreter, logout
       InterpreterModeActionsIT interpreterModeActionsIT = new InterpreterModeActionsIT();
       interpreterModeActionsIT.authenticationUser("admin", "password1");
-      pollingWait(
-              By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .click();
+      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
       clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
-      pollingWait(
-              By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .sendKeys("python");
+      pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
+          MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
       ZeppelinITUtils.sleep(500, false);
-      clickAndWait(
-          By.xpath(
-              "//div[contains(@id, 'python')]//button[contains(@ng-click, 'valueform.$show();\n"
-                  + "                  copyOriginInterpreterSettingProperties(setting.id)')]"));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//button[contains(@ng-click, 'valueform.$show();\n" +
+          "                  copyOriginInterpreterSettingProperties(setting.id)')]"));
       clickAndWait(By.xpath("//div[contains(@id, 'python')]/div[2]/div/div/div[1]/span[1]/button"));
       clickAndWait(By.xpath("//div[contains(@id, 'python')]//li/a[contains(.,'Per User')]"));
       clickAndWait(By.xpath("//div[contains(@id, 'python')]/div[2]/div/div/div[1]/span[2]/button"));
-      clickAndWait(
-          By.xpath("//div[contains(@id, 'python')]//li/a[contains(.,'isolated per user')]"));
-      JavascriptExecutor jse = (JavascriptExecutor) driver;
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//li/a[contains(.,'isolated per user')]"));
+      JavascriptExecutor jse = (JavascriptExecutor)driver;
       jse.executeScript("window.scrollBy(0,250)", "");
       ZeppelinITUtils.sleep(500, false);
-      clickAndWait(
-          By.xpath("//div[contains(@id, 'python')]//div/form/button[contains(@type, 'submit')]"));
-      clickAndWait(
-          By.xpath(
-              "//div[@class='modal-dialog']//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//div/form/button[contains(@type, 'submit')]"));
+      clickAndWait(By.xpath(
+          "//div[@class='modal-dialog']//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
       clickAndWait(By.xpath("//a[@class='navbar-brand navbar-title'][contains(@href, '#/')]"));
       interpreterModeActionsIT.logoutUser("admin");
 
-      // step 2: (user1) login, create a new note, run two paragraph with 'python', check result,
-      // check process, logout
-      // paragraph: Check if the result is 'user1' in the second paragraph
-      // System: Check if the number of python interpreter process is '1'
-      // System: Check if the number of python process is '1'
+      //step 2: (user1) login, create a new note, run two paragraph with 'python', check result, check process, logout
+      //paragraph: Check if the result is 'user1' in the second paragraph
+      //System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '1'
       interpreterModeActionsIT.authenticationUser("user1", "password2");
-      By locator =
-          By.xpath(
-              "//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" + " note')]");
-      WebElement element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      By locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      WebElement element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
         createNewNote();
       }
-      String user1noteId =
-          driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+      String user1noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
       waitForParagraph(1, "READY");
       interpreterModeActionsIT.setPythonParagraph(1, "user=\"user1\"");
       waitForParagraph(2, "READY");
       interpreterModeActionsIT.setPythonParagraph(2, "print user");
 
-      collector.checkThat(
-          "The output field paragraph contains",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.equalTo("user1"));
 
-      String resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsPython, false, ProcessData.Types_Of_Data.OUTPUT);
+      String resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsInterpreter, false, ProcessData.Types_Of_Data.OUTPUT);
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python interpreter process is",
-          resultProcessNum,
-          CoreMatchers.equalTo("1"));
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
       interpreterModeActionsIT.logoutUser("user1");
 
-      // step 3: (user2) login, create a new note, run two paragraph with 'python', check result,
-      // check process, logout
+      //step 3: (user2) login, create a new note, run two paragraph with 'python', check result, check process, logout
       //                paragraph: Check if the result is 'user2' in the second paragraph
-      // System: Check if the number of python interpreter process is '2'
-      // System: Check if the number of python process is '2'
+      //System: Check if the number of python interpreter process is '2'
+      //System: Check if the number of python process is '2'
       interpreterModeActionsIT.authenticationUser("user2", "password3");
-      locator =
-          By.xpath(
-              "//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" + " note')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
         createNewNote();
       }
-      String user2noteId =
-          driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+      String user2noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
       waitForParagraph(1, "READY");
       interpreterModeActionsIT.setPythonParagraph(1, "user=\"user2\"");
       waitForParagraph(2, "READY");
       interpreterModeActionsIT.setPythonParagraph(2, "print user");
 
-      collector.checkThat(
-          "The output field paragraph contains",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.equalTo("user2"));
 
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsPython, false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python process is", resultProcessNum, CoreMatchers.equalTo("2"));
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsInterpreter, false, ProcessData.Types_Of_Data.OUTPUT);
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("2"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python interpreter process is",
-          resultProcessNum,
-          CoreMatchers.equalTo("2"));
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("2"));
       interpreterModeActionsIT.logoutUser("user2");
 
-      // step 4: (user1) login, come back note user1 made, run second paragraph, check result,
+      //step 4: (user1) login, come back note user1 made, run second paragraph, check result,
       //                restart python interpreter in note, check process again, logout
-      // paragraph: Check if the result is 'user1' in the second paragraph
-      // System: Check if the number of python interpreter process is '1'
-      // System: Check if the number of python process is '1'
+      //paragraph: Check if the result is 'user1' in the second paragraph
+      //System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '1'
       interpreterModeActionsIT.authenticationUser("user1", "password2");
       locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        pollingWait(
-                By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
-                MAX_BROWSER_TIMEOUT_SEC)
-            .click();
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
       }
       runParagraph(2);
       try {
         waitForParagraph(2, "FINISHED");
       } catch (TimeoutException e) {
         waitForParagraph(2, "ERROR");
-        collector.checkThat(
-            "Exception in InterpreterModeActionsIT while running Python Paragraph",
-            "ERROR",
-            CoreMatchers.equalTo("FINISHED"));
+        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
       }
-      collector.checkThat(
-          "The output field paragraph contains",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.equalTo("user1"));
 
-      clickAndWait(
-          By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
-      clickAndWait(
-          By.xpath(
-              "//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
-      clickAndWait(
-          By.xpath(
-              "//div[@class='modal-dialog']"
-                  + "[contains(.,'Do you want to restart python interpreter?')]"
-                  + "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+      clickAndWait(By.xpath("//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
+      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
+          "[contains(.,'Do you want to restart python interpreter?')]" +
+          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
 
-      locator =
-          By.xpath(
-              "//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
-      LOG.info(
-          "Holding on until if interpreter restart dialog is disappeared or not in testPerUserIsolatedAction");
-      boolean invisibilityStatus =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.invisibilityOfElementLocated(locator));
+      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
+      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserIsolatedAction");
+      boolean invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
       if (invisibilityStatus == false) {
         assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
       }
-      locator =
-          By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      locator = By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        clickAndWait(
-            By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+        clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
       }
 
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsPython, false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsInterpreter, false, ProcessData.Types_Of_Data.OUTPUT);
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python interpreter process is",
-          resultProcessNum,
-          CoreMatchers.equalTo("1"));
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
       interpreterModeActionsIT.logoutUser("user1");
 
-      // step 5: (user2) login, come back note user2 made, restart python interpreter in note, check
-      // process, logout
-      // System: Check if the number of python interpreter process is '0'
-      // System: Check if the number of python process is '0'
+      //step 5: (user2) login, come back note user2 made, restart python interpreter in note, check process, logout
+      //System: Check if the number of python interpreter process is '0'
+      //System: Check if the number of python process is '0'
       interpreterModeActionsIT.authenticationUser("user2", "password3");
       locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        pollingWait(
-                By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
-                MAX_BROWSER_TIMEOUT_SEC)
-            .click();
-      }
-      clickAndWait(
-          By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
-      clickAndWait(
-          By.xpath(
-              "//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
-      clickAndWait(
-          By.xpath(
-              "//div[@class='modal-dialog']"
-                  + "[contains(.,'Do you want to restart python interpreter?')]"
-                  + "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
-
-      locator =
-          By.xpath(
-              "//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
-      LOG.info(
-          "Holding on until if interpreter restart dialog is disappeared or not in testPerUserIsolatedAction");
-      invisibilityStatus =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.invisibilityOfElementLocated(locator));
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+      clickAndWait(By.xpath("//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
+      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
+          "[contains(.,'Do you want to restart python interpreter?')]" +
+          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+
+      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
+      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserIsolatedAction");
+      invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
       if (invisibilityStatus == false) {
         assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
       }
-      locator =
-          By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      locator = By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        clickAndWait(
-            By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+        clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
       }
 
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsPython, false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsInterpreter, false, ProcessData.Types_Of_Data.OUTPUT);
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python interpreter process is",
-          resultProcessNum,
-          CoreMatchers.equalTo("0"));
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("0"));
       interpreterModeActionsIT.logoutUser("user2");
 
-      // step 6: (user1) login, come back note user1 made, run first paragraph,logout
+      //step 6: (user1) login, come back note user1 made, run first paragraph,logout
       //        (user2) login, come back note user2 made, run first paragraph, check process, logout
-      // System: Check if the number of python process is '2'
-      // System: Check if the number of python interpreter process is '2'
+      //System: Check if the number of python process is '2'
+      //System: Check if the number of python interpreter process is '2'
       interpreterModeActionsIT.authenticationUser("user1", "password2");
       locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        pollingWait(
-                By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
-                MAX_BROWSER_TIMEOUT_SEC)
-            .click();
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
       }
       waitForParagraph(1, "FINISHED");
       runParagraph(1);
@@ -1126,105 +805,70 @@ public class InterpreterModeActionsIT extends AbstractZeppelinIT {
         waitForParagraph(1, "FINISHED");
       } catch (TimeoutException e) {
         waitForParagraph(1, "ERROR");
-        collector.checkThat(
-            "Exception in InterpreterModeActionsIT while running Python Paragraph",
-            "ERROR",
-            CoreMatchers.equalTo("FINISHED"));
+        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
       }
       interpreterModeActionsIT.logoutUser("user1");
 
       interpreterModeActionsIT.authenticationUser("user2", "password3");
       locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]");
-      element =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        pollingWait(
-                By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
-                MAX_BROWSER_TIMEOUT_SEC)
-            .click();
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
       }
       runParagraph(1);
       try {
         waitForParagraph(1, "FINISHED");
       } catch (TimeoutException e) {
         waitForParagraph(1, "ERROR");
-        collector.checkThat(
-            "Exception in InterpreterModeActionsIT while running Python Paragraph",
-            "ERROR",
-            CoreMatchers.equalTo("FINISHED"));
+        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
       }
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsPython, false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python process is", resultProcessNum, CoreMatchers.equalTo("2"));
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsInterpreter, false, ProcessData.Types_Of_Data.OUTPUT);
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("2"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
       resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat(
-          "The number of python interpreter process is",
-          resultProcessNum,
-          CoreMatchers.equalTo("2"));
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("2"));
       interpreterModeActionsIT.logoutUser("user2");
 
-      // step 7: (admin) login, restart python interpreter in interpreter tab, check process, logout
-      // System: Check if the number of python interpreter process is 0
-      // System: Check if the number of python process is 0
+      //step 7: (admin) login, restart python interpreter in interpreter tab, check process, logout
+      //System: Check if the number of python interpreter process is 0
+      //System: Check if the number of python process is 0
       interpreterModeActionsIT.authenticationUser("admin", "password1");
-      pollingWait(
-              By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .click();
+      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
 
       clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
-      pollingWait(
-              By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .sendKeys("python");
+      pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
+          MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
       ZeppelinITUtils.sleep(500, false);
 
-      clickAndWait(
-          By.xpath(
-              "//div[contains(@id, 'python')]"
-                  + "//button[contains(@ng-click, 'restartInterpreterSetting(setting.id)')]"));
-      clickAndWait(
-          By.xpath(
-              "//div[@class='modal-dialog']"
-                  + "[contains(.,'Do you want to restart this interpreter?')]"
-                  + "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
-      locator =
-          By.xpath(
-              "//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
-      LOG.info(
-          "Holding on until if interpreter restart dialog is disappeared or not in testPerUserIsolatedAction");
-      invisibilityStatus =
-          (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-              .until(ExpectedConditions.invisibilityOfElementLocated(locator));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]" +
+          "//button[contains(@ng-click, 'restartInterpreterSetting(setting.id)')]"));
+      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
+          "[contains(.,'Do you want to restart this interpreter?')]" +
+          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
+      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserIsolatedAction");
+      invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
       if (invisibilityStatus == false) {
         assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
       }
 
-      resultProcessNum =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  cmdPsPython, false, ProcessData.Types_Of_Data.

<TRUNCATED>

[13/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookSocket.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookSocket.java b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookSocket.java
index 735a79b..65740ff 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookSocket.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookSocket.java
@@ -16,13 +16,17 @@
  */
 package org.apache.zeppelin.socket;
 
-import java.io.IOException;
-import javax.servlet.http.HttpServletRequest;
 import org.apache.commons.lang.StringUtils;
 import org.eclipse.jetty.websocket.api.Session;
 import org.eclipse.jetty.websocket.api.WebSocketAdapter;
 
-/** Notebook websocket. */
+import java.io.IOException;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Notebook websocket.
+ */
 public class NotebookSocket extends WebSocketAdapter {
   private Session connection;
   private NotebookSocketListener listener;
@@ -30,7 +34,8 @@ public class NotebookSocket extends WebSocketAdapter {
   private String protocol;
   private String user;
 
-  public NotebookSocket(HttpServletRequest req, String protocol, NotebookSocketListener listener) {
+  public NotebookSocket(HttpServletRequest req, String protocol,
+      NotebookSocketListener listener) {
     this.listener = listener;
     this.request = req;
     this.protocol = protocol;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookSocketListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookSocketListener.java b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookSocketListener.java
index 39963d9..3c2edd3 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookSocketListener.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookSocketListener.java
@@ -16,11 +16,11 @@
  */
 package org.apache.zeppelin.socket;
 
-/** NoteboookSocket listener. */
+/**
+ * NoteboookSocket listener.
+ */
 public interface NotebookSocketListener {
   void onClose(NotebookSocket socket, int code, String message);
-
   void onOpen(NotebookSocket socket);
-
   void onMessage(NotebookSocket socket, String message);
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookWebSocketCreator.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookWebSocketCreator.java b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookWebSocketCreator.java
index bc4f30f..7033929 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookWebSocketCreator.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookWebSocketCreator.java
@@ -16,15 +16,17 @@
  */
 package org.apache.zeppelin.socket;
 
-import static org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars.ZEPPELIN_ALLOWED_ORIGINS;
-
 import org.eclipse.jetty.websocket.servlet.ServletUpgradeRequest;
 import org.eclipse.jetty.websocket.servlet.ServletUpgradeResponse;
 import org.eclipse.jetty.websocket.servlet.WebSocketCreator;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Responsible to create the WebSockets for the NotebookServer. */
+import static org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars.ZEPPELIN_ALLOWED_ORIGINS;
+
+/**
+ * Responsible to create the WebSockets for the NotebookServer.
+ */
 public class NotebookWebSocketCreator implements WebSocketCreator {
 
   private static final Logger LOG = LoggerFactory.getLogger(NotebookWebSocketCreator.class);
@@ -33,17 +35,15 @@ public class NotebookWebSocketCreator implements WebSocketCreator {
   public NotebookWebSocketCreator(NotebookServer notebookServer) {
     this.notebookServer = notebookServer;
   }
-
   public Object createWebSocket(ServletUpgradeRequest request, ServletUpgradeResponse response) {
     String origin = request.getHeader("Origin");
     if (notebookServer.checkOrigin(request.getHttpServletRequest(), origin)) {
       return new NotebookSocket(request.getHttpServletRequest(), "", notebookServer);
     } else {
-      LOG.error(
-          "Websocket request is not allowed by {} settings. Origin: {}",
-          ZEPPELIN_ALLOWED_ORIGINS,
-          origin);
+      LOG.error("Websocket request is not allowed by {} settings. Origin: {}",
+          ZEPPELIN_ALLOWED_ORIGINS, origin);
       return null;
     }
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/types/InterpreterSettingsList.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/types/InterpreterSettingsList.java b/zeppelin-server/src/main/java/org/apache/zeppelin/types/InterpreterSettingsList.java
index b5e5e6d..2e080ea 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/types/InterpreterSettingsList.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/types/InterpreterSettingsList.java
@@ -16,18 +16,21 @@
  */
 package org.apache.zeppelin.types;
 
-import java.util.List;
 import org.apache.zeppelin.interpreter.InterpreterInfo;
 
-/** InterpreterSetting information for binding. */
+import java.util.List;
+
+/**
+ * InterpreterSetting information for binding.
+ */
 public class InterpreterSettingsList {
   private String id;
   private String name;
   private List<InterpreterInfo> interpreters;
   private boolean selected;
 
-  public InterpreterSettingsList(
-      String id, String name, List<InterpreterInfo> interpreters, boolean selected) {
+  public InterpreterSettingsList(String id, String name,
+                                 List<InterpreterInfo> interpreters, boolean selected) {
     this.id = id;
     this.name = name;
     this.interpreters = interpreters;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/utils/AnyOfRolesUserAuthorizationFilter.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/utils/AnyOfRolesUserAuthorizationFilter.java b/zeppelin-server/src/main/java/org/apache/zeppelin/utils/AnyOfRolesUserAuthorizationFilter.java
index 2d3fd89..e345dd6 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/utils/AnyOfRolesUserAuthorizationFilter.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/utils/AnyOfRolesUserAuthorizationFilter.java
@@ -24,19 +24,19 @@ import org.apache.shiro.web.filter.authz.RolesAuthorizationFilter;
 
 /**
  * Allows access if current user has at least one role of the specified list.
- *
- * <p>Basically, it's the same as {@link RolesAuthorizationFilter} but using {@literal OR} instead
+ * <p>
+ * Basically, it's the same as {@link RolesAuthorizationFilter} but using {@literal OR} instead
  * of {@literal AND} on the specified roles or user.
  */
 public class AnyOfRolesUserAuthorizationFilter extends RolesAuthorizationFilter {
   @Override
-  public boolean isAccessAllowed(
-      ServletRequest request, ServletResponse response, Object mappedValue) throws IOException {
+  public boolean isAccessAllowed(ServletRequest request, ServletResponse response,
+          Object mappedValue) throws IOException {
     final Subject subject = getSubject(request, response);
     final String[] rolesArray = (String[]) mappedValue;
 
     if (rolesArray == null || rolesArray.length == 0) {
-      // no roles specified, so nothing to check - allow access.
+      //no roles specified, so nothing to check - allow access.
       return true;
     }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/utils/CommandLineUtils.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/utils/CommandLineUtils.java b/zeppelin-server/src/main/java/org/apache/zeppelin/utils/CommandLineUtils.java
index 53518e4..63f8580 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/utils/CommandLineUtils.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/utils/CommandLineUtils.java
@@ -17,9 +17,12 @@
 package org.apache.zeppelin.utils;
 
 import java.util.Locale;
+
 import org.apache.zeppelin.util.Util;
 
-/** CommandLine Support Class. */
+/**
+ * CommandLine Support Class.
+ */
 public class CommandLineUtils {
   public static void main(String[] args) {
     if (args.length == 0) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/utils/ExceptionUtils.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/utils/ExceptionUtils.java b/zeppelin-server/src/main/java/org/apache/zeppelin/utils/ExceptionUtils.java
index 2d522af..ce87e5e 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/utils/ExceptionUtils.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/utils/ExceptionUtils.java
@@ -17,15 +17,19 @@
 package org.apache.zeppelin.utils;
 
 import javax.ws.rs.core.Response.Status;
+
 import org.apache.zeppelin.server.JsonResponse;
 
-/** Utility method for exception in rest api. */
+/**
+ * Utility method for exception in rest api.
+ *
+ */
 public class ExceptionUtils {
 
   public static javax.ws.rs.core.Response jsonResponse(Status status) {
     return new JsonResponse<>(status).build();
   }
-
+  
   public static javax.ws.rs.core.Response jsonResponseContent(Status status, String message) {
     return new JsonResponse<>(status, message).build();
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/utils/InterpreterBindingUtils.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/utils/InterpreterBindingUtils.java b/zeppelin-server/src/main/java/org/apache/zeppelin/utils/InterpreterBindingUtils.java
index 08ec1a1..3ea2f75 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/utils/InterpreterBindingUtils.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/utils/InterpreterBindingUtils.java
@@ -16,22 +16,25 @@
  */
 package org.apache.zeppelin.utils;
 
-import java.util.LinkedList;
-import java.util.List;
 import org.apache.zeppelin.interpreter.InterpreterSetting;
 import org.apache.zeppelin.notebook.Notebook;
 import org.apache.zeppelin.types.InterpreterSettingsList;
 
-/** Utils for interpreter bindings. */
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * Utils for interpreter bindings.
+ */
 public class InterpreterBindingUtils {
-  public static List<InterpreterSettingsList> getInterpreterBindings(
-      Notebook notebook, String noteId) {
+  public static List<InterpreterSettingsList> getInterpreterBindings(Notebook notebook,
+                                                                     String noteId) {
     List<InterpreterSettingsList> settingList = new LinkedList<>();
-    List<InterpreterSetting> selectedSettings = notebook.getBindedInterpreterSettings(noteId);
+    List<InterpreterSetting> selectedSettings =
+        notebook.getBindedInterpreterSettings(noteId);
     for (InterpreterSetting setting : selectedSettings) {
-      settingList.add(
-          new InterpreterSettingsList(
-              setting.getId(), setting.getName(), setting.getInterpreterInfos(), true));
+      settingList.add(new InterpreterSettingsList(setting.getId(), setting.getName(),
+          setting.getInterpreterInfos(), true));
     }
 
     return settingList;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 37edc36..134aa61 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
@@ -18,28 +18,6 @@ package org.apache.zeppelin.utils;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
-import java.net.InetAddress;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-import java.security.Principal;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
-import javax.naming.ldap.LdapContext;
-import javax.sql.DataSource;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.reflect.FieldUtils;
 import org.apache.shiro.authz.AuthorizationInfo;
@@ -60,7 +38,32 @@ import org.apache.zeppelin.server.ZeppelinServer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Tools for securing Zeppelin. */
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+import javax.naming.ldap.LdapContext;
+import javax.sql.DataSource;
+import java.net.InetAddress;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.UnknownHostException;
+import java.security.Principal;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Tools for securing Zeppelin.
+ */
 public class SecurityUtils {
   private static final String ANONYMOUS = "anonymous";
   private static final HashSet<String> EMPTY_HASHSET = Sets.newHashSet();
@@ -68,6 +71,7 @@ public class SecurityUtils {
   private static final Logger LOGGER = LoggerFactory.getLogger(SecurityUtils.class);
   private static Collection<Realm> realms;
 
+
   public static void setIsEnabled(boolean value) {
     isEnabled = value;
   }
@@ -85,10 +89,10 @@ public class SecurityUtils {
     sourceUriHost = sourceUriHost.toLowerCase();
     String currentHost = InetAddress.getLocalHost().getHostName().toLowerCase();
 
-    return conf.getAllowedOrigins().contains("*")
-        || currentHost.equals(sourceUriHost)
-        || "localhost".equals(sourceUriHost)
-        || conf.getAllowedOrigins().contains(sourceHost);
+    return conf.getAllowedOrigins().contains("*") ||
+        currentHost.equals(sourceUriHost) ||
+        "localhost".equals(sourceUriHost) ||
+        conf.getAllowedOrigins().contains(sourceHost);
   }
 
   /**
@@ -106,8 +110,8 @@ public class SecurityUtils {
     if (subject.isAuthenticated()) {
       principal = extractPrincipal(subject);
       if (ZeppelinServer.notebook.getConf().isUsernameForceLowerCase()) {
-        LOGGER.debug(
-            "Converting principal name " + principal + " to lower case:" + principal.toLowerCase());
+        LOGGER.debug("Converting principal name " + principal
+            + " to lower case:" + principal.toLowerCase());
         principal = principal.toLowerCase();
       }
     } else {
@@ -137,8 +141,10 @@ public class SecurityUtils {
     Collection<Realm> realms = defaultWebSecurityManager.getRealms();
     return realms;
   }
-
-  /** Checked if shiro enabled or not. */
+  
+  /**
+   * Checked if shiro enabled or not.
+   */
   public static boolean isAuthenticated() {
     if (!isEnabled) {
       return false;
@@ -146,9 +152,9 @@ public class SecurityUtils {
     return org.apache.shiro.SecurityUtils.getSubject().isAuthenticated();
   }
 
+
   /**
    * Get candidated users based on searchText
-   *
    * @param searchText
    * @param numUsersToFetch
    * @return
@@ -165,12 +171,14 @@ public class SecurityUtils {
           if (name.equals("org.apache.shiro.realm.text.IniRealm")) {
             usersList.addAll(SecurityUtils.getUserList((IniRealm) realm));
           } else if (name.equals("org.apache.zeppelin.realm.LdapGroupRealm")) {
-            usersList.addAll(getUserList((JndiLdapRealm) realm, searchText, numUsersToFetch));
+            usersList.addAll(getUserList((JndiLdapRealm) realm, searchText,
+                numUsersToFetch));
           } else if (name.equals("org.apache.zeppelin.realm.LdapRealm")) {
-            usersList.addAll(getUserList((LdapRealm) realm, searchText, numUsersToFetch));
+            usersList.addAll(getUserList((LdapRealm) realm, searchText,
+                numUsersToFetch));
           } else if (name.equals("org.apache.zeppelin.realm.ActiveDirectoryGroupRealm")) {
-            usersList.addAll(
-                getUserList((ActiveDirectoryGroupRealm) realm, searchText, numUsersToFetch));
+            usersList.addAll(getUserList((ActiveDirectoryGroupRealm) realm,
+                searchText, numUsersToFetch));
           } else if (name.equals("org.apache.shiro.realm.jdbc.JdbcRealm")) {
             usersList.addAll(getUserList((JdbcRealm) realm));
           }
@@ -217,7 +225,7 @@ public class SecurityUtils {
    */
   public static HashSet<String> getAssociatedRoles() {
     if (!isEnabled) {
-      return Sets.newHashSet();
+      return  Sets.newHashSet();
     }
     Subject subject = org.apache.shiro.SecurityUtils.getSubject();
     HashSet<String> roles = new HashSet<>();
@@ -233,11 +241,10 @@ public class SecurityUtils {
           break;
         } else if (name.equals("org.apache.zeppelin.realm.LdapRealm")) {
           try {
-            AuthorizationInfo auth =
-                ((LdapRealm) realm)
-                    .queryForAuthorizationInfo(
-                        new SimplePrincipalCollection(subject.getPrincipal(), realm.getName()),
-                        ((LdapRealm) realm).getContextFactory());
+            AuthorizationInfo auth = ((LdapRealm) realm).queryForAuthorizationInfo(
+                new SimplePrincipalCollection(subject.getPrincipal(), realm.getName()),
+                ((LdapRealm) realm).getContextFactory()
+            );
             if (auth != null) {
               roles = new HashSet<>(auth.getRoles());
             }
@@ -263,7 +270,9 @@ public class SecurityUtils {
     return roles;
   }
 
-  /** Function to extract users from shiro.ini. */
+  /**
+   * Function to extract users from shiro.ini.
+   */
   private static List<String> getUserList(IniRealm r) {
     List<String> userList = new ArrayList<>();
     Map getIniUser = r.getIni().get("users");
@@ -277,8 +286,9 @@ public class SecurityUtils {
     return userList;
   }
 
-  /**
-   * * Get user roles from shiro.ini.
+
+  /***
+   * Get user roles from shiro.ini.
    *
    * @param r
    * @return
@@ -296,7 +306,9 @@ public class SecurityUtils {
     return roleList;
   }
 
-  /** Function to extract users from LDAP. */
+  /**
+   * Function to extract users from LDAP.
+   */
   private static List<String> getUserList(JndiLdapRealm r, String searchText, int numUsersToFetch) {
     List<String> userList = new ArrayList<>();
     String userDnTemplate = r.getUserDnTemplate();
@@ -311,8 +323,8 @@ public class SecurityUtils {
       constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
       String[] attrIDs = {userDnPrefix};
       constraints.setReturningAttributes(attrIDs);
-      NamingEnumeration result =
-          ctx.search(userDnSuffix, "(" + userDnPrefix + "=*" + searchText + "*)", constraints);
+      NamingEnumeration result = ctx.search(userDnSuffix, "(" + userDnPrefix + "=*" + searchText +
+          "*)", constraints);
       while (result.hasMore()) {
         Attributes attrs = ((SearchResult) result.next()).getAttributes();
         if (attrs.get(userDnPrefix) != null) {
@@ -327,7 +339,9 @@ public class SecurityUtils {
     return userList;
   }
 
-  /** Function to extract users from Zeppelin LdapRealm. */
+  /**
+   * Function to extract users from Zeppelin LdapRealm.
+   */
   private static List<String> getUserList(LdapRealm r, String searchText, int numUsersToFetch) {
     List<String> userList = new ArrayList<>();
     LOGGER.debug("SearchText: " + searchText);
@@ -342,17 +356,9 @@ public class SecurityUtils {
       constraints.setCountLimit(numUsersToFetch);
       String[] attrIDs = {userAttribute};
       constraints.setReturningAttributes(attrIDs);
-      NamingEnumeration result =
-          ctx.search(
-              userSearchRealm,
-              "(&(objectclass="
-                  + userObjectClass
-                  + ")("
-                  + userAttribute
-                  + "=*"
-                  + searchText
-                  + "*))",
-              constraints);
+      NamingEnumeration result = ctx.search(userSearchRealm, "(&(objectclass=" +
+          userObjectClass + ")("
+          + userAttribute + "=*" + searchText + "*))", constraints);
       while (result.hasMore()) {
         Attributes attrs = ((SearchResult) result.next()).getAttributes();
         if (attrs.get(userAttribute) != null) {
@@ -374,8 +380,8 @@ public class SecurityUtils {
     return userList;
   }
 
-  /**
-   * * Get user roles from shiro.ini for Zeppelin LdapRealm.
+  /***
+   * Get user roles from shiro.ini for Zeppelin LdapRealm.
    *
    * @param r
    * @return
@@ -387,15 +393,16 @@ public class SecurityUtils {
       Iterator it = roles.entrySet().iterator();
       while (it.hasNext()) {
         Map.Entry pair = (Map.Entry) it.next();
-        LOGGER.debug("RoleKeyValue: " + pair.getKey() + " = " + pair.getValue());
+        LOGGER.debug("RoleKeyValue: " + pair.getKey() +
+            " = " + pair.getValue());
         roleList.add((String) pair.getKey());
       }
     }
     return roleList;
   }
 
-  private static List<String> getUserList(
-      ActiveDirectoryGroupRealm r, String searchText, int numUsersToFetch) {
+  private static List<String> getUserList(ActiveDirectoryGroupRealm r, String searchText,
+                                   int numUsersToFetch) {
     List<String> userList = new ArrayList<>();
     try {
       LdapContext ctx = r.getLdapContextFactory().getSystemLdapContext();
@@ -406,7 +413,9 @@ public class SecurityUtils {
     return userList;
   }
 
-  /** Function to extract users from JDBCs. */
+  /**
+   * Function to extract users from JDBCs.
+   */
   private static List<String> getUserList(JdbcRealm obj) {
     List<String> userlist = new ArrayList<>();
     Connection con = null;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/configuration/RequestHeaderSizeTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/configuration/RequestHeaderSizeTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/configuration/RequestHeaderSizeTest.java
index 18ce914..de21aa8 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/configuration/RequestHeaderSizeTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/configuration/RequestHeaderSizeTest.java
@@ -22,21 +22,21 @@ import static org.hamcrest.MatcherAssert.assertThat;
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.methods.GetMethod;
 import org.apache.commons.lang.RandomStringUtils;
-import org.apache.zeppelin.conf.ZeppelinConfiguration;
-import org.apache.zeppelin.rest.AbstractTestRestApi;
 import org.eclipse.jetty.http.HttpStatus;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import org.apache.zeppelin.conf.ZeppelinConfiguration;
+import org.apache.zeppelin.rest.AbstractTestRestApi;
+
 public class RequestHeaderSizeTest extends AbstractTestRestApi {
   private static final int REQUEST_HEADER_MAX_SIZE = 20000;
 
   @Before
   public void startZeppelin() throws Exception {
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_SERVER_JETTY_REQUEST_HEADER_SIZE.getVarName(),
-        String.valueOf(REQUEST_HEADER_MAX_SIZE));
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_SERVER_JETTY_REQUEST_HEADER_SIZE
+            .getVarName(), String.valueOf(REQUEST_HEADER_MAX_SIZE));
     startUp(RequestHeaderSizeTest.class.getSimpleName());
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/display/AngularObjectBuilder.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/display/AngularObjectBuilder.java b/zeppelin-server/src/test/java/org/apache/zeppelin/display/AngularObjectBuilder.java
index b62927c..cfbdc31 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/display/AngularObjectBuilder.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/display/AngularObjectBuilder.java
@@ -17,8 +17,8 @@
 package org.apache.zeppelin.display;
 
 public class AngularObjectBuilder {
-  public static <T> AngularObject<T> build(
-      String varName, T value, String noteId, String paragraphId) {
+  public static <T> AngularObject<T> build(String varName, T value, String noteId,
+          String paragraphId) {
     return new AngularObject<>(varName, value, noteId, paragraphId, null);
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/realm/LdapRealmTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/realm/LdapRealmTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/realm/LdapRealmTest.java
index 3f534de..5bff693 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/realm/LdapRealmTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/realm/LdapRealmTest.java
@@ -24,21 +24,23 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import org.apache.shiro.realm.ldap.LdapContextFactory;
+import org.apache.shiro.session.Session;
+import org.apache.shiro.subject.SimplePrincipalCollection;
+import org.junit.Test;
+
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
+
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
-import org.apache.shiro.realm.ldap.LdapContextFactory;
-import org.apache.shiro.session.Session;
-import org.apache.shiro.subject.SimplePrincipalCollection;
-import org.junit.Test;
 
 public class LdapRealmTest {
   @Test
@@ -56,9 +58,8 @@ public class LdapRealmTest {
 
   @Test
   public void testExpandTemplate() {
-    assertEquals(
-        "uid=foo,cn=users,dc=ods,dc=foo",
-        LdapRealm.expandTemplate("uid={0},cn=users,dc=ods,dc=foo", "foo"));
+    assertEquals("uid=foo,cn=users,dc=ods,dc=foo",
+            LdapRealm.expandTemplate("uid={0},cn=users,dc=ods,dc=foo", "foo"));
   }
 
   @Test
@@ -71,7 +72,8 @@ public class LdapRealmTest {
     // using a template
     realm.setUserSearchAttributeName(null);
     realm.setMemberAttributeValueTemplate("cn={0},ou=people,dc=hadoop,dc=apache");
-    assertEquals("cn=foo,ou=people,dc=hadoop,dc=apache", realm.getUserDnForSearch("foo"));
+    assertEquals("cn=foo,ou=people,dc=hadoop,dc=apache",
+            realm.getUserDnForSearch("foo"));
   }
 
   @Test
@@ -105,18 +107,14 @@ public class LdapRealmTest {
 
     NamingEnumeration<SearchResult> results = enumerationOf(group1, group2, group3);
     when(ldapCtx.search(any(String.class), any(String.class), any(SearchControls.class)))
-        .thenReturn(results);
+            .thenReturn(results);
 
-    Set<String> roles =
-        realm.rolesFor(
+    Set<String> roles = realm.rolesFor(
             new SimplePrincipalCollection("principal", "ldapRealm"),
-            "principal",
-            ldapCtx,
-            ldapContextFactory,
-            session);
+            "principal", ldapCtx, ldapContextFactory, session);
 
-    verify(ldapCtx)
-        .search("cn=groups,dc=apache", "(objectclass=posixGroup)", realm.getGroupSearchControls());
+    verify(ldapCtx).search("cn=groups,dc=apache", "(objectclass=posixGroup)",
+            realm.getGroupSearchControls());
 
     assertEquals(new HashSet(Arrays.asList("group-one", "zeppelin-role")), roles);
   }
@@ -135,7 +133,8 @@ public class LdapRealmTest {
       }
 
       @Override
-      public void close() throws NamingException {}
+      public void close() throws NamingException {
+      }
 
       @Override
       public boolean hasMoreElements() {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/realm/PamRealmTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/realm/PamRealmTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/realm/PamRealmTest.java
index 036046f..f328407 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/realm/PamRealmTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/realm/PamRealmTest.java
@@ -30,10 +30,11 @@ import org.junit.Test;
  * They should contain username and password of an valid system user to make the test pass. The
  * service needs to be configured under /etc/pam.d/sshd to resolve and authenticate the system user.
  *
- * <p>Contains main() function so the test can be executed manually.
+ * Contains main() function so the test can be executed manually.
  *
- * <p>Set in MacOS to run in IDE(A): $ launchctl setenv PAM_USER user $ launchctl setenv PAM_PASS
- * xxxxx
+ * Set in MacOS to run in IDE(A):
+ * $ launchctl setenv PAM_USER user
+ * $ launchctl setenv PAM_PASS xxxxx
  */
 public class PamRealmTest {
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/recovery/RecoveryTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/recovery/RecoveryTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/recovery/RecoveryTest.java
index 8d0676c..7a58a41 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/recovery/RecoveryTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/recovery/RecoveryTest.java
@@ -22,10 +22,16 @@ import static org.junit.Assert.assertThat;
 import com.google.common.io.Files;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
-import java.io.File;
-import java.util.Map;
+
 import org.apache.commons.httpclient.methods.PostMethod;
 import org.apache.commons.io.FileUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.io.File;
+import java.util.Map;
+
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.interpreter.ManagedInterpreterGroup;
 import org.apache.zeppelin.interpreter.recovery.FileSystemRecoveryStorage;
@@ -36,9 +42,6 @@ import org.apache.zeppelin.rest.AbstractTestRestApi;
 import org.apache.zeppelin.scheduler.Job;
 import org.apache.zeppelin.server.ZeppelinServer;
 import org.apache.zeppelin.user.AuthenticationInfo;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
 
 public class RecoveryTest extends AbstractTestRestApi {
   private Gson gson = new Gson();
@@ -46,13 +49,11 @@ public class RecoveryTest extends AbstractTestRestApi {
 
   @BeforeClass
   public static void init() throws Exception {
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_RECOVERY_STORAGE_CLASS.getVarName(),
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_RECOVERY_STORAGE_CLASS.getVarName(),
         FileSystemRecoveryStorage.class.getName());
     recoveryDir = Files.createTempDir();
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_RECOVERY_DIR.getVarName(),
-        recoveryDir.getAbsolutePath());
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_RECOVERY_DIR.getVarName(),
+            recoveryDir.getAbsolutePath());
     startUp(RecoveryTest.class.getSimpleName());
   }
 
@@ -71,9 +72,8 @@ public class RecoveryTest extends AbstractTestRestApi {
     p1.setText("%python user='abc'");
     PostMethod post = httpPost("/notebook/job/" + note1.getId(), "");
     assertThat(post, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     assertEquals(resp.get("status"), "OK");
     post.releaseConnection();
     assertEquals(Job.Status.FINISHED, p1.getStatus());
@@ -102,20 +102,17 @@ public class RecoveryTest extends AbstractTestRestApi {
     p1.setText("%python user='abc'");
     PostMethod post = httpPost("/notebook/job/" + note1.getId(), "");
     assertThat(post, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     assertEquals(resp.get("status"), "OK");
     post.releaseConnection();
     assertEquals(Job.Status.FINISHED, p1.getStatus());
 
     // restart the python interpreter
-    ZeppelinServer.notebook
-        .getInterpreterSettingManager()
-        .restart(
-            ((ManagedInterpreterGroup) p1.getBindedInterpreter().getInterpreterGroup())
-                .getInterpreterSetting()
-                .getId());
+    ZeppelinServer.notebook.getInterpreterSettingManager().restart(
+        ((ManagedInterpreterGroup) p1.getBindedInterpreter().getInterpreterGroup())
+            .getInterpreterSetting().getId()
+    );
 
     // shutdown zeppelin and restart it
     shutDown();
@@ -141,16 +138,15 @@ public class RecoveryTest extends AbstractTestRestApi {
     p1.setText("%python user='abc'");
     PostMethod post = httpPost("/notebook/job/" + note1.getId(), "");
     assertThat(post, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     assertEquals(resp.get("status"), "OK");
     post.releaseConnection();
     assertEquals(Job.Status.FINISHED, p1.getStatus());
 
     // shutdown zeppelin and restart it
     shutDown();
-    StopInterpreter.main(new String[] {});
+    StopInterpreter.main(new String[]{});
 
     startUp(RecoveryTest.class.getSimpleName());
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 ef2cc51..689b7af 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
@@ -19,15 +19,7 @@ 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.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;
@@ -43,16 +35,27 @@ 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.InterpreterSetting;
 import org.apache.zeppelin.plugin.PluginManager;
-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;
 
+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);
 
@@ -63,47 +66,47 @@ public abstract class AbstractTestRestApi {
 
   private static File shiroIni = null;
   private static String zeppelinShiro =
-      "[users]\n"
-          + "admin = password1, admin\n"
-          + "user1 = password2, role1, role2\n"
-          + "user2 = password3, role3\n"
-          + "user3 = password4, role2\n"
-          + "[main]\n"
-          + "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n"
-          + "securityManager.sessionManager = $sessionManager\n"
-          + "securityManager.sessionManager.globalSessionTimeout = 86400000\n"
-          + "shiro.loginUrl = /api/login\n"
-          + "[roles]\n"
-          + "role1 = *\n"
-          + "role2 = *\n"
-          + "role3 = *\n"
-          + "admin = *\n"
-          + "[urls]\n"
-          + "/api/version = anon\n"
-          + "/** = authc";
+      "[users]\n" +
+          "admin = password1, admin\n" +
+          "user1 = password2, role1, role2\n" +
+          "user2 = password3, role3\n" +
+          "user3 = password4, role2\n" +
+          "[main]\n" +
+          "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n" +
+          "securityManager.sessionManager = $sessionManager\n" +
+          "securityManager.sessionManager.globalSessionTimeout = 86400000\n" +
+          "shiro.loginUrl = /api/login\n" +
+          "[roles]\n" +
+          "role1 = *\n" +
+          "role2 = *\n" +
+          "role3 = *\n" +
+          "admin = *\n" +
+          "[urls]\n" +
+          "/api/version = anon\n" +
+          "/** = authc";
 
   private static String zeppelinShiroKnox =
-      "[users]\n"
-          + "admin = password1, admin\n"
-          + "user1 = password2, role1, role2\n"
-          + "[main]\n"
-          + "knoxJwtRealm = org.apache.zeppelin.realm.jwt.KnoxJwtRealm\n"
-          + "knoxJwtRealm.providerUrl = https://domain.example.com/\n"
-          + "knoxJwtRealm.login = gateway/knoxsso/knoxauth/login.html\n"
-          + "knoxJwtRealm.logout = gateway/knoxssout/api/v1/webssout\n"
-          + "knoxJwtRealm.redirectParam = originalUrl\n"
-          + "knoxJwtRealm.cookieName = hadoop-jwt\n"
-          + "knoxJwtRealm.publicKeyPath = knox-sso.pem\n"
-          + "authc = org.apache.zeppelin.realm.jwt.KnoxAuthenticationFilter\n"
-          + "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n"
-          + "securityManager.sessionManager = $sessionManager\n"
-          + "securityManager.sessionManager.globalSessionTimeout = 86400000\n"
-          + "shiro.loginUrl = /api/login\n"
-          + "[roles]\n"
-          + "admin = *\n"
-          + "[urls]\n"
-          + "/api/version = anon\n"
-          + "/** = authc";
+      "[users]\n" +
+          "admin = password1, admin\n" +
+          "user1 = password2, role1, role2\n" +
+          "[main]\n" +
+          "knoxJwtRealm = org.apache.zeppelin.realm.jwt.KnoxJwtRealm\n" +
+          "knoxJwtRealm.providerUrl = https://domain.example.com/\n" +
+          "knoxJwtRealm.login = gateway/knoxsso/knoxauth/login.html\n" +
+          "knoxJwtRealm.logout = gateway/knoxssout/api/v1/webssout\n" +
+          "knoxJwtRealm.redirectParam = originalUrl\n" +
+          "knoxJwtRealm.cookieName = hadoop-jwt\n" +
+          "knoxJwtRealm.publicKeyPath = knox-sso.pem\n" +
+          "authc = org.apache.zeppelin.realm.jwt.KnoxAuthenticationFilter\n" +
+          "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n" +
+          "securityManager.sessionManager = $sessionManager\n" +
+          "securityManager.sessionManager.globalSessionTimeout = 86400000\n" +
+          "shiro.loginUrl = /api/login\n" +
+          "[roles]\n" +
+          "admin = *\n" +
+          "[urls]\n" +
+          "/api/version = anon\n" +
+          "/** = authc";
 
   private static File knoxSsoPem = null;
   private static String knoxSsoPemCertificate =
@@ -152,27 +155,23 @@ public abstract class AbstractTestRestApi {
   }
 
   static ExecutorService executor;
-  protected static final Runnable SERVER =
-      new Runnable() {
-        @Override
-        public void run() {
-          try {
-            ZeppelinServer.main(new String[] {""});
-          } catch (Exception e) {
-            LOG.error("Exception in WebDriverManager while getWebDriver ", e);
-            throw new RuntimeException(e);
-          }
-        }
-      };
+  protected static final Runnable SERVER = new Runnable() {
+    @Override
+    public void run() {
+      try {
+        ZeppelinServer.main(new String[]{""});
+      } catch (Exception e) {
+        LOG.error("Exception in WebDriverManager while getWebDriver ", e);
+        throw new RuntimeException(e);
+      }
+    }
+  };
 
   private static void start(boolean withAuth, String testClassName, boolean withKnox)
-      throws Exception {
-    LOG.info(
-        "Starting ZeppelinServer withAuth: {}, testClassName: {}, withKnox: {}",
-        withAuth,
-        testClassName,
-        withKnox);
-
+          throws Exception {
+    LOG.info("Starting ZeppelinServer withAuth: {}, testClassName: {}, withKnox: {}",
+        withAuth, testClassName, withKnox);
+    
     if (!WAS_RUNNING) {
       // copy the resources files to a temp folder
       zeppelinHome = new File("..");
@@ -180,19 +179,20 @@ public abstract class AbstractTestRestApi {
       confDir = new File(zeppelinHome, "conf_" + testClassName);
       confDir.mkdirs();
 
-      System.setProperty(
-          ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(),
+      System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(),
           zeppelinHome.getAbsolutePath());
-      System.setProperty(
-          ZeppelinConfiguration.ConfVars.ZEPPELIN_WAR.getVarName(),
+      System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_WAR.getVarName(),
           new File("../zeppelin-web/dist").getAbsolutePath());
+      System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_CONF_DIR.getVarName(),
+          confDir.getAbsolutePath());
       System.setProperty(
-          ZeppelinConfiguration.ConfVars.ZEPPELIN_CONF_DIR.getVarName(), confDir.getAbsolutePath());
-      System.setProperty(
-          ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_GROUP_DEFAULT.getVarName(), "spark");
+          ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_GROUP_DEFAULT.getVarName(),
+          "spark");
       notebookDir = new File(zeppelinHome.getAbsolutePath() + "/notebook_" + testClassName);
       System.setProperty(
-          ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), notebookDir.getPath());
+          ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(),
+          notebookDir.getPath()
+      );
 
       // some test profile does not build zeppelin-web.
       // to prevent zeppelin starting up fail, create zeppelin-web/dist directory
@@ -204,8 +204,8 @@ public abstract class AbstractTestRestApi {
       if (withAuth) {
         isRunningWithAuth = true;
         // Set Anonymous session to false.
-        System.setProperty(
-            ZeppelinConfiguration.ConfVars.ZEPPELIN_ANONYMOUS_ALLOWED.getVarName(), "false");
+        System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_ANONYMOUS_ALLOWED.getVarName(),
+                "false");
 
         // Create a shiro env test.
         shiroIni = new File(confDir, "shiro.ini");
@@ -213,8 +213,8 @@ public abstract class AbstractTestRestApi {
           shiroIni.createNewFile();
         }
         if (withKnox) {
-          FileUtils.writeStringToFile(
-              shiroIni, zeppelinShiroKnox.replaceAll("knox-sso.pem", confDir + "/knox-sso.pem"));
+          FileUtils.writeStringToFile(shiroIni,
+              zeppelinShiroKnox.replaceAll("knox-sso.pem", confDir + "/knox-sso.pem"));
           knoxSsoPem = new File(confDir, "knox-sso.pem");
           if (!knoxSsoPem.exists()) {
             knoxSsoPem.createNewFile();
@@ -223,13 +223,14 @@ public abstract class AbstractTestRestApi {
         } else {
           FileUtils.writeStringToFile(shiroIni, zeppelinShiro);
         }
+
       }
 
       executor = Executors.newSingleThreadExecutor();
       executor.submit(SERVER);
       long s = System.currentTimeMillis();
       boolean started = false;
-      while (System.currentTimeMillis() - s < 1000 * 60 * 3) { // 3 minutes
+      while (System.currentTimeMillis() - s < 1000 * 60 * 3) {  // 3 minutes
         Thread.sleep(2000);
         started = checkIfServerIsRunning();
         if (started == true) {
@@ -246,11 +247,11 @@ public abstract class AbstractTestRestApi {
   protected static void startUpWithKnoxEnable(String testClassName) throws Exception {
     start(true, testClassName, true);
   }
-
+  
   protected static void startUpWithAuthenticationEnable(String testClassName) throws Exception {
     start(true, testClassName, false);
   }
-
+  
   protected static void startUp(String testClassName) throws Exception {
     start(false, testClassName, false);
   }
@@ -271,8 +272,8 @@ public abstract class AbstractTestRestApi {
   protected static void shutDown(final boolean deleteConfDir) throws Exception {
     if (!WAS_RUNNING && ZeppelinServer.notebook != null) {
       // restart interpreter to stop all interpreter processes
-      List<InterpreterSetting> settingList =
-          ZeppelinServer.notebook.getInterpreterSettingManager().get();
+      List<InterpreterSetting> settingList = ZeppelinServer.notebook.getInterpreterSettingManager()
+              .get();
       if (!ZeppelinServer.notebook.getConf().isRecoveryEnabled()) {
         for (InterpreterSetting setting : settingList) {
           ZeppelinServer.notebook.getInterpreterSettingManager().restart(setting.getId());
@@ -288,7 +289,7 @@ public abstract class AbstractTestRestApi {
 
       long s = System.currentTimeMillis();
       boolean started = true;
-      while (System.currentTimeMillis() - s < 1000 * 60 * 3) { // 3 minutes
+      while (System.currentTimeMillis() - s < 1000 * 60 * 3) {  // 3 minutes
         Thread.sleep(2000);
         started = checkIfServerIsRunning();
         if (started == false) {
@@ -300,11 +301,11 @@ public abstract class AbstractTestRestApi {
       }
 
       LOG.info("Test Zeppelin terminated.");
-
+      
       if (isRunningWithAuth) {
         isRunningWithAuth = false;
-        System.clearProperty(
-            ZeppelinConfiguration.ConfVars.ZEPPELIN_ANONYMOUS_ALLOWED.getVarName());
+        System
+            .clearProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_ANONYMOUS_ALLOWED.getVarName());
       }
 
       if (deleteConfDir && !ZeppelinServer.notebook.getConf().isRecoveryEnabled()) {
@@ -323,9 +324,8 @@ public abstract class AbstractTestRestApi {
       request = httpGet("/version");
       isRunning = request.getStatusCode() == 200;
     } catch (IOException e) {
-      LOG.error(
-          "AbstractTestRestApi.checkIfServerIsRunning() fails .. ZeppelinServer is not "
-              + "running");
+      LOG.error("AbstractTestRestApi.checkIfServerIsRunning() fails .. ZeppelinServer is not " +
+              "running");
       isRunning = false;
     } finally {
       if (request != null) {
@@ -338,13 +338,13 @@ public abstract class AbstractTestRestApi {
   protected static GetMethod httpGet(String path) throws IOException {
     return httpGet(path, StringUtils.EMPTY, StringUtils.EMPTY);
   }
-
+  
   protected static GetMethod httpGet(String path, String user, String pwd) throws IOException {
     return httpGet(path, user, pwd, StringUtils.EMPTY);
   }
 
   protected static GetMethod httpGet(String path, String user, String pwd, String cookies)
-      throws IOException {
+          throws IOException {
     LOG.info("Connecting to {}", URL + path);
     HttpClient httpClient = new HttpClient();
     GetMethod getMethod = new GetMethod(URL + path);
@@ -365,7 +365,7 @@ public abstract class AbstractTestRestApi {
   }
 
   protected static DeleteMethod httpDelete(String path, String user, String pwd)
-      throws IOException {
+          throws IOException {
     LOG.info("Connecting to {}", URL + path);
     HttpClient httpClient = new HttpClient();
     DeleteMethod deleteMethod = new DeleteMethod(URL + path);
@@ -383,7 +383,7 @@ public abstract class AbstractTestRestApi {
   }
 
   protected static PostMethod httpPost(String path, String request, String user, String pwd)
-      throws IOException {
+          throws IOException {
     LOG.info("Connecting to {}", URL + path);
     HttpClient httpClient = new HttpClient();
     PostMethod postMethod = new PostMethod(URL + path);
@@ -402,7 +402,7 @@ public abstract class AbstractTestRestApi {
   }
 
   protected static PutMethod httpPut(String path, String body, String user, String pwd)
-      throws IOException {
+          throws IOException {
     LOG.info("Connecting to {}", URL + path);
     HttpClient httpClient = new HttpClient();
     PutMethod putMethod = new PutMethod(URL + path);
@@ -448,7 +448,7 @@ public abstract class AbstractTestRestApi {
     }
     return true;
   }
-
+  
   protected Matcher<HttpMethodBase> responsesWith(final int expectedStatusCode) {
     return new TypeSafeMatcher<HttpMethodBase>() {
       WeakReference<HttpMethodBase> method;
@@ -461,19 +461,13 @@ public abstract class AbstractTestRestApi {
 
       @Override
       public void describeTo(Description description) {
-        description
-            .appendText("HTTP response ")
-            .appendValue(expectedStatusCode)
-            .appendText(" from ")
-            .appendText(method.get().getPath());
+        description.appendText("HTTP response ").appendValue(expectedStatusCode)
+            .appendText(" from ").appendText(method.get().getPath());
       }
 
       @Override
       protected void describeMismatchSafely(HttpMethodBase item, Description description) {
-        description
-            .appendText("got ")
-            .appendValue(item.getStatusCode())
-            .appendText(" ")
+        description.appendText("got ").appendValue(item.getStatusCode()).appendText(" ")
             .appendText(item.getStatusText());
       }
     };
@@ -534,9 +528,7 @@ public abstract class AbstractTestRestApi {
 
       @Override
       public void describeTo(Description description) {
-        description
-            .appendText("response in JSON format with \"")
-            .appendText(memberName)
+        description.appendText("response in JSON format with \"").appendText(memberName)
             .appendText("\" beeing a root element ");
       }
 
@@ -561,7 +553,9 @@ public abstract class AbstractTestRestApi {
     }
   }
 
-  /** Status code matcher. */
+  /**
+   * Status code matcher.
+   */
   protected Matcher<? super HttpMethodBase> isForbidden() {
     return responsesWith(403);
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ConfigurationsRestApiTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ConfigurationsRestApiTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ConfigurationsRestApiTest.java
index 3164ecb..bd489b5 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ConfigurationsRestApiTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ConfigurationsRestApiTest.java
@@ -22,13 +22,15 @@ import com.google.common.base.Predicate;
 import com.google.common.collect.Iterators;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
-import java.io.IOException;
-import java.util.Map;
+
 import org.apache.commons.httpclient.methods.GetMethod;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.Map;
+
 public class ConfigurationsRestApiTest extends AbstractTestRestApi {
   Gson gson = new Gson();
 
@@ -45,40 +47,34 @@ public class ConfigurationsRestApiTest extends AbstractTestRestApi {
   @Test
   public void testGetAll() throws IOException {
     GetMethod get = httpGet("/configurations/all");
-    Map<String, Object> resp =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(get.getResponseBodyAsString(),
+        new TypeToken<Map<String, Object>>(){}.getType());
     Map<String, String> body = (Map<String, String>) resp.get("body");
     assertTrue(body.size() > 0);
     // it shouldn't have key/value pair which key contains "password"
-    assertTrue(
-        Iterators.all(
-            body.keySet().iterator(),
-            new Predicate<String>() {
-              @Override
-              public boolean apply(String key) {
-                return !key.contains("password");
-              }
-            }));
+    assertTrue(Iterators.all(body.keySet().iterator(), new Predicate<String>() {
+        @Override
+        public boolean apply(String key) {
+          return !key.contains("password");
+        }
+      }
+    ));
   }
 
   @Test
   public void testGetViaPrefix() throws IOException {
     final String prefix = "zeppelin.server";
     GetMethod get = httpGet("/configurations/prefix/" + prefix);
-    Map<String, Object> resp =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(get.getResponseBodyAsString(),
+        new TypeToken<Map<String, Object>>(){}.getType());
     Map<String, String> body = (Map<String, String>) resp.get("body");
     assertTrue(body.size() > 0);
-    assertTrue(
-        Iterators.all(
-            body.keySet().iterator(),
-            new Predicate<String>() {
-              @Override
-              public boolean apply(String key) {
-                return !key.contains("password") && key.startsWith(prefix);
-              }
-            }));
+    assertTrue(Iterators.all(body.keySet().iterator(), new Predicate<String>() {
+          @Override
+          public boolean apply(String key) {
+            return !key.contains("password") && key.startsWith(prefix);
+          }
+        }
+    ));
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/rest/HeliumRestApiTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/HeliumRestApiTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/HeliumRestApiTest.java
index b6a5a63..6f8edfd 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/HeliumRestApiTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/HeliumRestApiTest.java
@@ -23,22 +23,25 @@ import static org.junit.Assert.assertTrue;
 import com.google.gson.Gson;
 import com.google.gson.internal.StringMap;
 import com.google.gson.reflect.TypeToken;
+
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
 import java.io.IOException;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.commons.httpclient.methods.PostMethod;
+
 import org.apache.zeppelin.helium.HeliumPackage;
 import org.apache.zeppelin.helium.HeliumRegistry;
 import org.apache.zeppelin.helium.HeliumType;
 import org.apache.zeppelin.server.ZeppelinServer;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
 
 public class HeliumRestApiTest extends AbstractTestRestApi {
   Gson gson = new Gson();
@@ -59,27 +62,25 @@ public class HeliumRestApiTest extends AbstractTestRestApi {
     ZeppelinServer.helium.clear();
     ZeppelinServer.helium.addRegistry(registry);
 
-    registry.add(
-        new HeliumPackage(
-            HeliumType.APPLICATION,
-            "name1",
-            "desc1",
-            "artifact1",
-            "className1",
-            new String[][] {},
-            "",
-            ""));
-
-    registry.add(
-        new HeliumPackage(
-            HeliumType.APPLICATION,
-            "name2",
-            "desc2",
-            "artifact2",
-            "className2",
-            new String[][] {},
-            "",
-            ""));
+    registry.add(new HeliumPackage(
+                HeliumType.APPLICATION,
+                "name1",
+                "desc1",
+                "artifact1",
+                "className1",
+                new String[][]{},
+                "",
+                ""));
+
+    registry.add(new HeliumPackage(
+                HeliumType.APPLICATION,
+                "name2",
+                "desc2",
+                "artifact2",
+                "className2",
+                new String[][]{},
+                "",
+                ""));
   }
 
   @After
@@ -91,9 +92,8 @@ public class HeliumRestApiTest extends AbstractTestRestApi {
   public void testGetAllPackageInfo() throws IOException {
     GetMethod get = httpGet("/helium/package");
     assertThat(get, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(get.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() { }.getType());
     Map<String, Set<String>> body = (Map<String, Set<String>>) resp.get("body");
 
     assertEquals(body.size(), 2);
@@ -106,9 +106,8 @@ public class HeliumRestApiTest extends AbstractTestRestApi {
     // No enabled packages initially
     GetMethod get1 = httpGet("/helium/enabledPackage");
     assertThat(get1, isAllowed());
-    Map<String, Object> resp1 =
-        gson.fromJson(
-            get1.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp1 = gson.fromJson(get1.getResponseBodyAsString(),
+                new TypeToken<Map<String, Object>>() { }.getType());
     List<StringMap<Object>> body1 = (List<StringMap<Object>>) resp1.get("body");
     assertEquals(body1.size(), 0);
 
@@ -117,9 +116,8 @@ public class HeliumRestApiTest extends AbstractTestRestApi {
 
     GetMethod get2 = httpGet("/helium/enabledPackage");
     assertThat(get2, isAllowed());
-    Map<String, Object> resp2 =
-        gson.fromJson(
-            get2.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp2 = gson.fromJson(get2.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() { }.getType());
     List<StringMap<Object>> body2 = (List<StringMap<Object>>) resp2.get("body");
 
     assertEquals(body2.size(), 1);
@@ -132,9 +130,8 @@ public class HeliumRestApiTest extends AbstractTestRestApi {
     String packageName = "name1";
     GetMethod get = httpGet("/helium/package/" + packageName);
     assertThat(get, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(get.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() { }.getType());
     List<StringMap<Object>> body = (List<StringMap<Object>>) resp.get("body");
 
     assertEquals(body.size(), 1);
@@ -146,9 +143,8 @@ public class HeliumRestApiTest extends AbstractTestRestApi {
   public void testGetAllPackageConfigs() throws IOException {
     GetMethod get = httpGet("/helium/config/");
     assertThat(get, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(get.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() { }.getType());
     StringMap<Object> body = (StringMap<Object>) resp.get("body");
     // ToDo: Apply config with POST command and check update
     assertEquals(body.size(), 0);
@@ -160,9 +156,8 @@ public class HeliumRestApiTest extends AbstractTestRestApi {
     String artifact = "artifact1";
     GetMethod get = httpGet("/helium/config/" + packageName + "/" + artifact);
     assertThat(get, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(get.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() { }.getType());
     StringMap<Object> body = (StringMap<Object>) resp.get("body");
     assertTrue(body.containsKey("confPersisted"));
   }
@@ -175,9 +170,8 @@ public class HeliumRestApiTest extends AbstractTestRestApi {
     post1.releaseConnection();
 
     GetMethod get1 = httpGet("/helium/package/" + packageName);
-    Map<String, Object> resp1 =
-        gson.fromJson(
-            get1.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp1 = gson.fromJson(get1.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() { }.getType());
     List<StringMap<Object>> body1 = (List<StringMap<Object>>) resp1.get("body");
     assertEquals(body1.get(0).get("enabled"), true);
 
@@ -186,9 +180,8 @@ public class HeliumRestApiTest extends AbstractTestRestApi {
     post2.releaseConnection();
 
     GetMethod get2 = httpGet("/helium/package/" + packageName);
-    Map<String, Object> resp2 =
-        gson.fromJson(
-            get2.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp2 = gson.fromJson(get2.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() { }.getType());
     List<StringMap<Object>> body2 = (List<StringMap<Object>>) resp2.get("body");
     assertEquals(body2.get(0).get("enabled"), false);
   }
@@ -197,13 +190,12 @@ public class HeliumRestApiTest extends AbstractTestRestApi {
   public void testVisualizationPackageOrder() throws IOException {
     GetMethod get1 = httpGet("/helium/order/visualization");
     assertThat(get1, isAllowed());
-    Map<String, Object> resp1 =
-        gson.fromJson(
-            get1.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp1 = gson.fromJson(get1.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() { }.getType());
     List<Object> body1 = (List<Object>) resp1.get("body");
     assertEquals(body1.size(), 0);
 
-    // We assume allPackages list has been refreshed before sorting
+    //We assume allPackages list has been refreshed before sorting
     ZeppelinServer.helium.getAllPackageInfo();
 
     String postRequestJson = "[name2, name1]";
@@ -213,9 +205,8 @@ public class HeliumRestApiTest extends AbstractTestRestApi {
 
     GetMethod get2 = httpGet("/helium/order/visualization");
     assertThat(get2, isAllowed());
-    Map<String, Object> resp2 =
-        gson.fromJson(
-            get2.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp2 = gson.fromJson(get2.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() { }.getType());
     List<Object> body2 = (List<Object>) resp2.get("body");
     assertEquals(body2.size(), 2);
     assertEquals(body2.get(0), "name2");

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/rest/InterpreterRestApiTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/InterpreterRestApiTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/InterpreterRestApiTest.java
index cb5a221..0b3bc23 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/InterpreterRestApiTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/InterpreterRestApiTest.java
@@ -16,18 +16,11 @@
  */
 package org.apache.zeppelin.rest;
 
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertEquals;
-
 import com.google.gson.Gson;
 import com.google.gson.JsonArray;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
 import com.google.gson.reflect.TypeToken;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
 import org.apache.commons.httpclient.methods.DeleteMethod;
 import org.apache.commons.httpclient.methods.GetMethod;
 import org.apache.commons.httpclient.methods.PostMethod;
@@ -46,7 +39,17 @@ import org.junit.FixMethodOrder;
 import org.junit.Test;
 import org.junit.runners.MethodSorters;
 
-/** Zeppelin interpreter rest api tests. */
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Zeppelin interpreter rest api tests.
+ */
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 public class InterpreterRestApiTest extends AbstractTestRestApi {
   private Gson gson = new Gson();
@@ -75,12 +78,8 @@ public class InterpreterRestApiTest extends AbstractTestRestApi {
 
     // then
     assertThat(get, isAllowed());
-    assertEquals(
-        ZeppelinServer.notebook
-            .getInterpreterSettingManager()
-            .getInterpreterSettingTemplates()
-            .size(),
-        body.entrySet().size());
+    assertEquals(ZeppelinServer.notebook.getInterpreterSettingManager()
+                    .getInterpreterSettingTemplates().size(), body.entrySet().size());
     get.releaseConnection();
   }
 
@@ -109,13 +108,12 @@ public class InterpreterRestApiTest extends AbstractTestRestApi {
   @Test
   public void testSettingsCRUD() throws IOException {
     // when: call create setting API
-    String rawRequest =
-        "{\"name\":\"md3\",\"group\":\"md\","
-            + "\"properties\":{\"propname\": {\"value\": \"propvalue\", \"name\": \"propname\", "
-            + "\"type\": \"textarea\"}},"
-            + "\"interpreterGroup\":[{\"class\":\"org.apache.zeppelin.markdown.Markdown\","
-            + "\"name\":\"md\"}],\"dependencies\":[],"
-            + "\"option\": { \"remote\": true, \"session\": false }}";
+    String rawRequest = "{\"name\":\"md3\",\"group\":\"md\"," +
+            "\"properties\":{\"propname\": {\"value\": \"propvalue\", \"name\": \"propname\", " +
+            "\"type\": \"textarea\"}}," +
+            "\"interpreterGroup\":[{\"class\":\"org.apache.zeppelin.markdown.Markdown\"," +
+            "\"name\":\"md\"}],\"dependencies\":[]," +
+            "\"option\": { \"remote\": true, \"session\": false }}";
     JsonObject jsonRequest = gson.fromJson(rawRequest, JsonElement.class).getAsJsonObject();
     PostMethod post = httpPost("/interpreter/setting/", jsonRequest.toString());
     String postResponse = post.getResponseBodyAsString();
@@ -165,40 +163,30 @@ public class InterpreterRestApiTest extends AbstractTestRestApi {
     String md1Dep = "org.apache.drill.exec:drill-jdbc:jar:1.7.0";
     String md2Dep = "org.apache.drill.exec:drill-jdbc:jar:1.6.0";
 
-    String reqBody1 =
-        "{\"name\":\""
-            + md1Name
-            + "\",\"group\":\"md\","
-            + "\"properties\":{\"propname\": {\"value\": \"propvalue\", \"name\": \"propname\", "
-            + "\"type\": \"textarea\"}},"
-            + "\"interpreterGroup\":[{\"class\":\"org.apache.zeppelin.markdown.Markdown\","
-            + "\"name\":\"md\"}],"
-            + "\"dependencies\":[ {\n"
-            + "      \"groupArtifactVersion\": \""
-            + md1Dep
-            + "\",\n"
-            + "      \"exclusions\":[]\n"
-            + "    }],"
-            + "\"option\": { \"remote\": true, \"session\": false }}";
+    String reqBody1 = "{\"name\":\"" + md1Name + "\",\"group\":\"md\"," +
+            "\"properties\":{\"propname\": {\"value\": \"propvalue\", \"name\": \"propname\", " +
+            "\"type\": \"textarea\"}}," +
+            "\"interpreterGroup\":[{\"class\":\"org.apache.zeppelin.markdown.Markdown\"," +
+            "\"name\":\"md\"}]," +
+            "\"dependencies\":[ {\n" +
+            "      \"groupArtifactVersion\": \"" + md1Dep + "\",\n" +
+            "      \"exclusions\":[]\n" +
+            "    }]," +
+            "\"option\": { \"remote\": true, \"session\": false }}";
     PostMethod post = httpPost("/interpreter/setting", reqBody1);
     assertThat("test create method:", post, isAllowed());
     post.releaseConnection();
 
-    String reqBody2 =
-        "{\"name\":\""
-            + md2Name
-            + "\",\"group\":\"md\","
-            + "\"properties\": {\"propname\": {\"value\": \"propvalue\", \"name\": \"propname\", "
-            + "\"type\": \"textarea\"}},"
-            + "\"interpreterGroup\":[{\"class\":\"org.apache.zeppelin.markdown.Markdown\","
-            + "\"name\":\"md\"}],"
-            + "\"dependencies\":[ {\n"
-            + "      \"groupArtifactVersion\": \""
-            + md2Dep
-            + "\",\n"
-            + "      \"exclusions\":[]\n"
-            + "    }],"
-            + "\"option\": { \"remote\": true, \"session\": false }}";
+    String reqBody2 = "{\"name\":\"" + md2Name + "\",\"group\":\"md\"," +
+            "\"properties\": {\"propname\": {\"value\": \"propvalue\", \"name\": \"propname\", " +
+            "\"type\": \"textarea\"}}," +
+            "\"interpreterGroup\":[{\"class\":\"org.apache.zeppelin.markdown.Markdown\"," +
+            "\"name\":\"md\"}]," +
+            "\"dependencies\":[ {\n" +
+            "      \"groupArtifactVersion\": \"" + md2Dep + "\",\n" +
+            "      \"exclusions\":[]\n" +
+            "    }]," +
+            "\"option\": { \"remote\": true, \"session\": false }}";
     post = httpPost("/interpreter/setting", reqBody2);
     assertThat("test create method:", post, isAllowed());
     post.releaseConnection();
@@ -211,8 +199,9 @@ public class InterpreterRestApiTest extends AbstractTestRestApi {
     // 2. Parsing to List<InterpreterSettings>
     JsonObject responseJson = gson.fromJson(rawResponse, JsonElement.class).getAsJsonObject();
     JsonArray bodyArr = responseJson.getAsJsonArray("body");
-    List<InterpreterSetting> settings =
-        new Gson().fromJson(bodyArr, new TypeToken<ArrayList<InterpreterSetting>>() {}.getType());
+    List<InterpreterSetting> settings = new Gson().fromJson(bodyArr,
+        new TypeToken<ArrayList<InterpreterSetting>>() {
+        }.getType());
 
     // 3. Filter interpreters out we have just created
     InterpreterSetting md1 = null;
@@ -263,9 +252,7 @@ public class InterpreterRestApiTest extends AbstractTestRestApi {
     assertEquals(p.getReturn().message().get(0).getData(), getSimulatedMarkdownResult("markdown"));
 
     // when: restart interpreter
-    for (InterpreterSetting setting :
-        ZeppelinServer.notebook
-            .getInterpreterSettingManager()
+    for (InterpreterSetting setting : ZeppelinServer.notebook.getInterpreterSettingManager()
             .getInterpreterSettings(note.getId())) {
       if (setting.getName().equals("md")) {
         // call restart interpreter API
@@ -287,8 +274,8 @@ public class InterpreterRestApiTest extends AbstractTestRestApi {
     }
 
     // then
-    assertEquals(
-        p.getReturn().message().get(0).getData(), getSimulatedMarkdownResult("markdown restarted"));
+    assertEquals(p.getReturn().message().get(0).getData(),
+            getSimulatedMarkdownResult("markdown restarted"));
     ZeppelinServer.notebook.removeNote(note.getId(), anonymous);
   }
 
@@ -313,9 +300,7 @@ public class InterpreterRestApiTest extends AbstractTestRestApi {
 
     // when: get md interpreter
     InterpreterSetting mdIntpSetting = null;
-    for (InterpreterSetting setting :
-        ZeppelinServer.notebook
-            .getInterpreterSettingManager()
+    for (InterpreterSetting setting : ZeppelinServer.notebook.getInterpreterSettingManager()
             .getInterpreterSettings(note.getId())) {
       if (setting.getName().equals("md")) {
         mdIntpSetting = setting;
@@ -357,10 +342,8 @@ public class InterpreterRestApiTest extends AbstractTestRestApi {
   public void testAddDeleteRepository() throws IOException {
     // Call create repository API
     String repoId = "securecentral";
-    String jsonRequest =
-        "{\"id\":\""
-            + repoId
-            + "\",\"url\":\"https://repo1.maven.org/maven2\",\"snapshot\":\"false\"}";
+    String jsonRequest = "{\"id\":\"" + repoId +
+        "\",\"url\":\"https://repo1.maven.org/maven2\",\"snapshot\":\"false\"}";
 
     PostMethod post = httpPost("/interpreter/repository/", jsonRequest);
     assertThat("Test create method:", post, isAllowed());

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/rest/KnoxRestApiTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/KnoxRestApiTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/KnoxRestApiTest.java
index 43def61..d0253a8 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/KnoxRestApiTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/KnoxRestApiTest.java
@@ -17,8 +17,7 @@
 package org.apache.zeppelin.rest;
 
 import com.google.gson.Gson;
-import java.io.IOException;
-import java.util.Map;
+
 import org.apache.commons.httpclient.methods.GetMethod;
 import org.hamcrest.CoreMatchers;
 import org.junit.AfterClass;
@@ -29,14 +28,17 @@ import org.junit.rules.ErrorCollector;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.util.Map;
+
 public class KnoxRestApiTest extends AbstractTestRestApi {
-  private final String knoxCookie =
-      "hadoop-jwt=eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImlzcyI"
-          + "6IktOT1hTU08iLCJleHAiOjE1MTM3NDU1MDd9.E2cWQo2sq75h0G_9fc9nWkL0SFMI5x_-Z0Zzr0NzQ86X4jfx"
-          + "liWYjr0M17Bm9GfPHRRR66s7YuYXa6DLbB4fHE0cyOoQnkfJFpU_vr1xhy0_0URc5v-Gb829b9rxuQfjKe-37h"
-          + "qbUdkwww2q6QQETVMvzp0rQKprUClZujyDvh0;";
+  private final String knoxCookie = "hadoop-jwt=eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImlzcyI" +
+          "6IktOT1hTU08iLCJleHAiOjE1MTM3NDU1MDd9.E2cWQo2sq75h0G_9fc9nWkL0SFMI5x_-Z0Zzr0NzQ86X4jfx" +
+          "liWYjr0M17Bm9GfPHRRR66s7YuYXa6DLbB4fHE0cyOoQnkfJFpU_vr1xhy0_0URc5v-Gb829b9rxuQfjKe-37h" +
+          "qbUdkwww2q6QQETVMvzp0rQKprUClZujyDvh0;";
 
-  @Rule public ErrorCollector collector = new ErrorCollector();
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
 
   private static final Logger LOG = LoggerFactory.getLogger(KnoxRestApiTest.class);
 
@@ -53,35 +55,28 @@ public class KnoxRestApiTest extends AbstractTestRestApi {
   }
 
   @Before
-  public void setUp() {}
+  public void setUp() {
+  }
 
   //  @Test
   public void testThatOtherUserCanAccessNoteIfPermissionNotSet() throws IOException {
     GetMethod loginWithoutCookie = httpGet("/api/security/ticket");
     Map result = gson.fromJson(loginWithoutCookie.getResponseBodyAsString(), Map.class);
-    collector.checkThat(
-        "Path is redirected to /login",
-        loginWithoutCookie.getPath(),
+    collector.checkThat("Path is redirected to /login", loginWithoutCookie.getPath(),
         CoreMatchers.containsString("login"));
 
-    collector.checkThat(
-        "Path is redirected to /login",
-        loginWithoutCookie.getPath(),
+    collector.checkThat("Path is redirected to /login", loginWithoutCookie.getPath(),
         CoreMatchers.containsString("login"));
 
-    collector.checkThat(
-        "response contains redirect URL",
-        ((Map) result.get("body")).get("redirectURL").toString(),
-        CoreMatchers.equalTo(
+    collector.checkThat("response contains redirect URL",
+        ((Map) result.get("body")).get("redirectURL").toString(), CoreMatchers.equalTo(
             "https://domain.example.com/gateway/knoxsso/knoxauth/login.html?originalUrl="));
 
     GetMethod loginWithCookie = httpGet("/api/security/ticket", "", "", knoxCookie);
     result = gson.fromJson(loginWithCookie.getResponseBodyAsString(), Map.class);
 
-    collector.checkThat(
-        "User logged in as admin",
-        ((Map) result.get("body")).get("principal").toString(),
-        CoreMatchers.equalTo("admin"));
+    collector.checkThat("User logged in as admin",
+        ((Map) result.get("body")).get("principal").toString(), CoreMatchers.equalTo("admin"));
 
     System.out.println(result);
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookRepoRestApiTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookRepoRestApiTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookRepoRestApiTest.java
index ed66473..34b85ae 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookRepoRestApiTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookRepoRestApiTest.java
@@ -23,13 +23,10 @@ import static org.junit.Assert.assertThat;
 
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
+
 import org.apache.commons.httpclient.methods.GetMethod;
 import org.apache.commons.httpclient.methods.PutMethod;
 import org.apache.commons.lang.StringUtils;
-import org.apache.zeppelin.user.AuthenticationInfo;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -37,7 +34,15 @@ import org.junit.FixMethodOrder;
 import org.junit.Test;
 import org.junit.runners.MethodSorters;
 
-/** NotebookRepo rest api test. */
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.zeppelin.user.AuthenticationInfo;
+
+/**
+ * NotebookRepo rest api test.
+ */
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 public class NotebookRepoRestApiTest extends AbstractTestRestApi {
   Gson gson = new Gson();
@@ -52,28 +57,27 @@ public class NotebookRepoRestApiTest extends AbstractTestRestApi {
   public static void destroy() throws Exception {
     AbstractTestRestApi.shutDown();
   }
-
+  
   @Before
   public void setUp() {
     anonymous = new AuthenticationInfo("anonymous");
   }
-
+  
   private List<Map<String, Object>> getListOfReposotiry() throws IOException {
     GetMethod get = httpGet("/notebook-repositories");
-    Map<String, Object> responce =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> responce = gson.fromJson(get.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     get.releaseConnection();
     return (List<Map<String, Object>>) responce.get("body");
   }
-
+  
   private void updateNotebookRepoWithNewSetting(String payload) throws IOException {
     PutMethod put = httpPut("/notebook-repositories", payload);
     int status = put.getStatusCode();
     put.releaseConnection();
     assertThat(status, is(200));
   }
-
+  
   @Test
   public void thatCanGetNotebookRepositoiesSettings() throws IOException {
     List<Map<String, Object>> listOfRepositories = getListOfReposotiry();
@@ -85,9 +89,9 @@ public class NotebookRepoRestApiTest extends AbstractTestRestApi {
     GetMethod get = httpGet("/notebook-repositories/reload");
     int status = get.getStatusCode();
     get.releaseConnection();
-    assertThat(status, is(200));
+    assertThat(status, is(200)); 
   }
-
+  
   @Test
   public void setNewDirectoryForLocalDirectory() throws IOException {
     List<Map<String, Object>> listOfRepositories = getListOfReposotiry();
@@ -97,10 +101,8 @@ public class NotebookRepoRestApiTest extends AbstractTestRestApi {
     for (int i = 0; i < listOfRepositories.size(); i++) {
       if (listOfRepositories.get(i).get("name").equals("VFSNotebookRepo")) {
         localVfs =
-            (String)
-                ((List<Map<String, Object>>) listOfRepositories.get(i).get("settings"))
-                    .get(0)
-                    .get("selected");
+                (String) ((List<Map<String, Object>>) listOfRepositories.get(i).get("settings"))
+                        .get(0).get("selected");
         className = (String) listOfRepositories.get(i).get("className");
         break;
       }
@@ -111,35 +113,26 @@ public class NotebookRepoRestApiTest extends AbstractTestRestApi {
       return;
     }
 
-    String payload =
-        "{ \"name\": \""
-            + className
-            + "\", \"settings\" : "
-            + "{ \"Notebook Path\" : \"/tmp/newDir\" } }";
+    String payload = "{ \"name\": \"" + className + "\", \"settings\" : " +
+            "{ \"Notebook Path\" : \"/tmp/newDir\" } }";
     updateNotebookRepoWithNewSetting(payload);
-
+    
     // Verify
     listOfRepositories = getListOfReposotiry();
     String updatedPath = StringUtils.EMPTY;
     for (int i = 0; i < listOfRepositories.size(); i++) {
       if (listOfRepositories.get(i).get("name").equals("VFSNotebookRepo")) {
         updatedPath =
-            (String)
-                ((List<Map<String, Object>>) listOfRepositories.get(i).get("settings"))
-                    .get(0)
-                    .get("selected");
+                (String) ((List<Map<String, Object>>) listOfRepositories.get(i).get("settings"))
+                        .get(0).get("selected");
         break;
       }
     }
     assertThat(updatedPath, anyOf(is("/tmp/newDir"), is("/tmp/newDir/")));
-
+    
     // go back to normal
-    payload =
-        "{ \"name\": \""
-            + className
-            + "\", \"settings\" : { \"Notebook Path\" : \""
-            + localVfs
-            + "\" } }";
+    payload = "{ \"name\": \"" + className + "\", \"settings\" : { \"Notebook Path\" : \"" +
+            localVfs + "\" } }";
     updateNotebookRepoWithNewSetting(payload);
   }
 }


[44/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/jdbc/src/test/java/org/apache/zeppelin/jdbc/SqlCompleterTest.java
----------------------------------------------------------------------
diff --git a/jdbc/src/test/java/org/apache/zeppelin/jdbc/SqlCompleterTest.java b/jdbc/src/test/java/org/apache/zeppelin/jdbc/SqlCompleterTest.java
index 21e5a6f..1ec3ae4 100644
--- a/jdbc/src/test/java/org/apache/zeppelin/jdbc/SqlCompleterTest.java
+++ b/jdbc/src/test/java/org/apache/zeppelin/jdbc/SqlCompleterTest.java
@@ -5,20 +5,29 @@
  * "License"); you may not use this file except in compliance with the License. You may obtain a
  * copy of the License at
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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.
+ * 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.jdbc;
 
 import static com.google.common.collect.Sets.newHashSet;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
 import com.google.common.base.Joiner;
+
+import org.apache.commons.lang.StringUtils;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.IOException;
 import java.sql.SQLException;
 import java.util.ArrayList;
@@ -27,17 +36,15 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+
 import jline.console.completer.ArgumentCompleter;
-import org.apache.commons.lang.StringUtils;
+
 import org.apache.zeppelin.completer.CompletionType;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** SQL completer unit tests. */
+/**
+ * SQL completer unit tests.
+ */
 public class SqlCompleterTest {
   public class CompleterTester {
     private SqlCompleter completer;
@@ -77,8 +84,8 @@ public class SqlCompleterTest {
       }
     }
 
-    private void expectedCompletions(
-        String buffer, int cursor, Set<InterpreterCompletion> expected) {
+    private void expectedCompletions(String buffer, int cursor,
+        Set<InterpreterCompletion> expected) {
       if (StringUtils.isNotEmpty(buffer) && buffer.length() > cursor) {
         buffer = buffer.substring(0, cursor);
       }
@@ -91,10 +98,8 @@ public class SqlCompleterTest {
 
       logger.info(explain);
 
-      Assert.assertEquals(
-          "Buffer [" + buffer.replace(" ", ".") + "] and Cursor[" + cursor + "] " + explain,
-          expected,
-          newHashSet(candidates));
+      Assert.assertEquals("Buffer [" + buffer.replace(" ", ".") + "] and Cursor[" + cursor + "] "
+          + explain, expected, newHashSet(candidates));
     }
 
     private String explain(String buffer, int cursor, List<InterpreterCompletion> candidates) {
@@ -194,8 +199,8 @@ public class SqlCompleterTest {
   @Test
   public void testFindAliasesInSQL_Simple() {
     String sql = "select * from prod_emart.financial_account a";
-    Map<String, String> res =
-        sqlCompleter.findAliasesInSQL(delimiter.delimit(sql, 0).getArguments());
+    Map<String, String> res = sqlCompleter.findAliasesInSQL(
+            delimiter.delimit(sql, 0).getArguments());
     assertEquals(1, res.size());
     assertTrue(res.get("a").equals("prod_emart.financial_account"));
   }
@@ -203,8 +208,7 @@ public class SqlCompleterTest {
   @Test
   public void testFindAliasesInSQL_Two() {
     String sql = "select * from prod_dds.financial_account a, prod_dds.customer b";
-    Map<String, String> res =
-        sqlCompleter.findAliasesInSQL(
+    Map<String, String> res = sqlCompleter.findAliasesInSQL(
             sqlCompleter.getSqlDelimiter().delimit(sql, 0).getArguments());
     assertEquals(2, res.size());
     assertTrue(res.get("a").equals("prod_dds.financial_account"));
@@ -214,8 +218,7 @@ public class SqlCompleterTest {
   @Test
   public void testFindAliasesInSQL_WrongTables() {
     String sql = "select * from prod_ddsxx.financial_account a, prod_dds.customerxx b";
-    Map<String, String> res =
-        sqlCompleter.findAliasesInSQL(
+    Map<String, String> res = sqlCompleter.findAliasesInSQL(
             sqlCompleter.getSqlDelimiter().delimit(sql, 0).getArguments());
     assertEquals(0, res.size());
   }
@@ -228,34 +231,24 @@ public class SqlCompleterTest {
     Map<String, String> aliases = new HashMap<>();
     sqlCompleter.completeName(buffer, cursor, candidates, aliases);
     assertEquals(9, candidates.size());
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion("prod_dds", "prod_dds", CompletionType.schema.name())));
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion("prod_emart", "prod_emart", CompletionType.schema.name())));
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion("SUM", "SUM", CompletionType.keyword.name())));
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion("SUBSTRING", "SUBSTRING", CompletionType.keyword.name())));
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion(
-                "SUBCLASS_ORIGIN", "SUBCLASS_ORIGIN", CompletionType.keyword.name())));
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion("SELECT", "SELECT", CompletionType.keyword.name())));
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion("ORDER", "ORDER", CompletionType.keyword.name())));
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion("LIMIT", "LIMIT", CompletionType.keyword.name())));
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion("FROM", "FROM", CompletionType.keyword.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("prod_dds", "prod_dds",
+            CompletionType.schema.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("prod_emart", "prod_emart",
+            CompletionType.schema.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("SUM", "SUM",
+            CompletionType.keyword.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("SUBSTRING", "SUBSTRING",
+            CompletionType.keyword.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("SUBCLASS_ORIGIN", "SUBCLASS_ORIGIN",
+            CompletionType.keyword.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("SELECT", "SELECT",
+            CompletionType.keyword.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("ORDER", "ORDER",
+            CompletionType.keyword.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("LIMIT", "LIMIT",
+            CompletionType.keyword.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("FROM", "FROM",
+            CompletionType.keyword.name())));
   }
 
   @Test
@@ -266,12 +259,10 @@ public class SqlCompleterTest {
     Map<String, String> aliases = new HashMap<>();
     sqlCompleter.completeName(buffer, cursor, candidates, aliases);
     assertEquals(2, candidates.size());
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion("prod_dds", "prod_dds", CompletionType.schema.name())));
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion("prod_emart", "prod_emart", CompletionType.schema.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("prod_dds", "prod_dds",
+            CompletionType.schema.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("prod_emart", "prod_emart",
+            CompletionType.schema.name())));
   }
 
   @Test
@@ -282,10 +273,9 @@ public class SqlCompleterTest {
     Map<String, String> aliases = new HashMap<>();
     sqlCompleter.completeName(buffer, cursor, candidates, aliases);
     assertEquals(1, candidates.size());
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion(
-                "financial_account", "financial_account", CompletionType.table.name())));
+    assertTrue(candidates.contains(
+            new InterpreterCompletion("financial_account", "financial_account",
+                    CompletionType.table.name())));
   }
 
   @Test
@@ -296,12 +286,10 @@ public class SqlCompleterTest {
     Map<String, String> aliases = new HashMap<>();
     sqlCompleter.completeName(buffer, cursor, candidates, aliases);
     assertEquals(2, candidates.size());
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion("account_rk", "account_rk", CompletionType.column.name())));
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion("account_id", "account_id", CompletionType.column.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("account_rk", "account_rk",
+            CompletionType.column.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("account_id", "account_id",
+            CompletionType.column.name())));
   }
 
   @Test
@@ -313,12 +301,10 @@ public class SqlCompleterTest {
     aliases.put("a", "prod_dds.financial_account");
     sqlCompleter.completeName(buffer, cursor, candidates, aliases);
     assertEquals(2, candidates.size());
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion("account_rk", "account_rk", CompletionType.column.name())));
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion("account_id", "account_id", CompletionType.column.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("account_rk", "account_rk",
+            CompletionType.column.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("account_id", "account_id",
+            CompletionType.column.name())));
   }
 
   @Test
@@ -330,127 +316,71 @@ public class SqlCompleterTest {
     aliases.put("a", "prod_dds.financial_account");
     sqlCompleter.completeName(buffer, cursor, candidates, aliases);
     assertEquals(2, candidates.size());
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion("account_rk", "account_rk", CompletionType.column.name())));
-    assertTrue(
-        candidates.contains(
-            new InterpreterCompletion("account_id", "account_id", CompletionType.column.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("account_rk", "account_rk",
+            CompletionType.column.name())));
+    assertTrue(candidates.contains(new InterpreterCompletion("account_id", "account_id",
+            CompletionType.column.name())));
   }
 
   @Test
   public void testSchemaAndTable() {
     String buffer = "select * from prod_emart.fi";
-    tester
-        .buffer(buffer)
-        .from(20)
-        .to(23)
-        .expect(
-            newHashSet(
-                new InterpreterCompletion(
-                    "prod_emart", "prod_emart", CompletionType.schema.name())))
-        .test();
-    tester
-        .buffer(buffer)
-        .from(25)
-        .to(27)
-        .expect(
-            newHashSet(
-                new InterpreterCompletion(
-                    "financial_account", "financial_account", CompletionType.table.name())))
-        .test();
+    tester.buffer(buffer).from(20).to(23).expect(newHashSet(
+            new InterpreterCompletion("prod_emart", "prod_emart",
+                    CompletionType.schema.name()))).test();
+    tester.buffer(buffer).from(25).to(27).expect(newHashSet(
+            new InterpreterCompletion("financial_account", "financial_account",
+                    CompletionType.table.name()))).test();
   }
 
   @Test
   public void testEdges() {
     String buffer = "  ORDER  ";
-    tester
-        .buffer(buffer)
-        .from(3)
-        .to(7)
-        .expect(
-            newHashSet(new InterpreterCompletion("ORDER", "ORDER", CompletionType.keyword.name())))
-        .test();
-    tester
-        .buffer(buffer)
-        .from(0)
-        .to(1)
-        .expect(
-            newHashSet(
-                new InterpreterCompletion("ORDER", "ORDER", CompletionType.keyword.name()),
-                new InterpreterCompletion(
-                    "SUBCLASS_ORIGIN", "SUBCLASS_ORIGIN", CompletionType.keyword.name()),
-                new InterpreterCompletion("SUBSTRING", "SUBSTRING", CompletionType.keyword.name()),
-                new InterpreterCompletion("prod_emart", "prod_emart", CompletionType.schema.name()),
-                new InterpreterCompletion("LIMIT", "LIMIT", CompletionType.keyword.name()),
-                new InterpreterCompletion("SUM", "SUM", CompletionType.keyword.name()),
-                new InterpreterCompletion("prod_dds", "prod_dds", CompletionType.schema.name()),
-                new InterpreterCompletion("SELECT", "SELECT", CompletionType.keyword.name()),
-                new InterpreterCompletion("FROM", "FROM", CompletionType.keyword.name())))
-        .test();
+    tester.buffer(buffer).from(3).to(7).expect(newHashSet(
+            new InterpreterCompletion("ORDER", "ORDER", CompletionType.keyword.name()))).test();
+    tester.buffer(buffer).from(0).to(1).expect(newHashSet(
+        new InterpreterCompletion("ORDER", "ORDER", CompletionType.keyword.name()),
+        new InterpreterCompletion("SUBCLASS_ORIGIN", "SUBCLASS_ORIGIN",
+                CompletionType.keyword.name()),
+        new InterpreterCompletion("SUBSTRING", "SUBSTRING", CompletionType.keyword.name()),
+        new InterpreterCompletion("prod_emart", "prod_emart", CompletionType.schema.name()),
+        new InterpreterCompletion("LIMIT", "LIMIT", CompletionType.keyword.name()),
+        new InterpreterCompletion("SUM", "SUM", CompletionType.keyword.name()),
+        new InterpreterCompletion("prod_dds", "prod_dds", CompletionType.schema.name()),
+        new InterpreterCompletion("SELECT", "SELECT", CompletionType.keyword.name()),
+        new InterpreterCompletion("FROM", "FROM", CompletionType.keyword.name())
+    )).test();
   }
 
   @Test
   public void testMultipleWords() {
     String buffer = "SELE FRO LIM";
-    tester
-        .buffer(buffer)
-        .from(2)
-        .to(4)
-        .expect(
-            newHashSet(
-                new InterpreterCompletion("SELECT", "SELECT", CompletionType.keyword.name())))
-        .test();
-    tester
-        .buffer(buffer)
-        .from(6)
-        .to(8)
-        .expect(
-            newHashSet(new InterpreterCompletion("FROM", "FROM", CompletionType.keyword.name())))
-        .test();
-    tester
-        .buffer(buffer)
-        .from(10)
-        .to(12)
-        .expect(
-            newHashSet(new InterpreterCompletion("LIMIT", "LIMIT", CompletionType.keyword.name())))
-        .test();
+    tester.buffer(buffer).from(2).to(4).expect(newHashSet(
+            new InterpreterCompletion("SELECT", "SELECT", CompletionType.keyword.name()))).test();
+    tester.buffer(buffer).from(6).to(8).expect(newHashSet(
+            new InterpreterCompletion("FROM", "FROM", CompletionType.keyword.name()))).test();
+    tester.buffer(buffer).from(10).to(12).expect(newHashSet(
+            new InterpreterCompletion("LIMIT", "LIMIT", CompletionType.keyword.name()))).test();
   }
 
   @Test
   public void testMultiLineBuffer() {
     String buffer = " \n SELE\nFRO";
-    tester
-        .buffer(buffer)
-        .from(5)
-        .to(7)
-        .expect(
-            newHashSet(
-                new InterpreterCompletion("SELECT", "SELECT", CompletionType.keyword.name())))
-        .test();
-    tester
-        .buffer(buffer)
-        .from(9)
-        .to(11)
-        .expect(
-            newHashSet(new InterpreterCompletion("FROM", "FROM", CompletionType.keyword.name())))
-        .test();
+    tester.buffer(buffer).from(5).to(7).expect(newHashSet(
+            new InterpreterCompletion("SELECT", "SELECT", CompletionType.keyword.name()))).test();
+    tester.buffer(buffer).from(9).to(11).expect(newHashSet(
+            new InterpreterCompletion("FROM", "FROM", CompletionType.keyword.name()))).test();
   }
 
   @Test
   public void testMultipleCompletionSuggestions() {
     String buffer = "SU";
-    tester
-        .buffer(buffer)
-        .from(2)
-        .to(2)
-        .expect(
-            newHashSet(
-                new InterpreterCompletion(
-                    "SUBCLASS_ORIGIN", "SUBCLASS_ORIGIN", CompletionType.keyword.name()),
-                new InterpreterCompletion("SUM", "SUM", CompletionType.keyword.name()),
-                new InterpreterCompletion("SUBSTRING", "SUBSTRING", CompletionType.keyword.name())))
-        .test();
+    tester.buffer(buffer).from(2).to(2).expect(newHashSet(
+        new InterpreterCompletion("SUBCLASS_ORIGIN", "SUBCLASS_ORIGIN",
+                CompletionType.keyword.name()),
+        new InterpreterCompletion("SUM", "SUM", CompletionType.keyword.name()),
+        new InterpreterCompletion("SUBSTRING", "SUBSTRING", CompletionType.keyword.name()))
+    ).test();
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/kylin/pom.xml
----------------------------------------------------------------------
diff --git a/kylin/pom.xml b/kylin/pom.xml
index 6f84b08..b70bfb2 100644
--- a/kylin/pom.xml
+++ b/kylin/pom.xml
@@ -73,6 +73,13 @@
             <plugin>
                 <artifactId>maven-resources-plugin</artifactId>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <configuration>
+                    <skip>false</skip>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 75ce2ec..04d0479 100644
--- a/kylin/src/main/java/org/apache/zeppelin/kylin/KylinErrorResponse.java
+++ b/kylin/src/main/java/org/apache/zeppelin/kylin/KylinErrorResponse.java
@@ -21,7 +21,9 @@ import com.google.gson.Gson;
 import com.google.gson.JsonSyntaxException;
 import org.apache.zeppelin.common.JsonSerializable;
 
-/** class for Kylin Error Response. */
+/**
+ * class for Kylin Error Response.
+ */
 class KylinErrorResponse implements JsonSerializable {
   private static final Gson gson = new Gson();
 
@@ -32,8 +34,8 @@ class KylinErrorResponse implements JsonSerializable {
   private Object data;
   private String msg;
 
-  KylinErrorResponse(
-      String stacktrace, String exception, String url, String code, Object data, String msg) {
+  KylinErrorResponse(String stacktrace, String exception, String url,
+      String code, Object data, String msg) {
     this.stacktrace = stacktrace;
     this.exception = exception;
     this.url = url;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 209e030..444f5cb 100755
--- a/kylin/src/main/java/org/apache/zeppelin/kylin/KylinInterpreter.java
+++ b/kylin/src/main/java/org/apache/zeppelin/kylin/KylinInterpreter.java
@@ -17,11 +17,6 @@
 
 package org.apache.zeppelin.kylin;
 
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.io.IOUtils;
 import org.apache.http.HttpResponse;
@@ -29,14 +24,23 @@ 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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.List;
+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;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Kylin interpreter for Zeppelin. (http://kylin.apache.org) */
+/**
+ * Kylin interpreter for Zeppelin. (http://kylin.apache.org)
+ */
 public class KylinInterpreter extends Interpreter {
   Logger logger = LoggerFactory.getLogger(KylinInterpreter.class);
 
@@ -49,17 +53,21 @@ public class KylinInterpreter extends Interpreter {
   static final String KYLIN_QUERY_ACCEPT_PARTIAL = "kylin.query.ispartial";
   static final Pattern KYLIN_TABLE_FORMAT_REGEX_LABEL = Pattern.compile("\"label\":\"(.*?)\"");
   static final Pattern KYLIN_TABLE_FORMAT_REGEX_RESULTS =
-      Pattern.compile("\"results\":\\[\\[(.*?)]]");
+          Pattern.compile("\"results\":\\[\\[(.*?)]]");
 
   public KylinInterpreter(Properties property) {
     super(property);
   }
 
   @Override
-  public void open() {}
+  public void open() {
+
+  }
 
   @Override
-  public void close() {}
+  public void close() {
+
+  }
 
   @Override
   public InterpreterResult interpret(String st, InterpreterContext context) {
@@ -72,7 +80,9 @@ public class KylinInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+
+  }
 
   @Override
   public FormType getFormType() {
@@ -85,8 +95,8 @@ public class KylinInterpreter extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return null;
   }
 
@@ -99,38 +109,14 @@ public class KylinInterpreter extends Interpreter {
     logger.info("acceptPartial:" + getProperty(KYLIN_QUERY_ACCEPT_PARTIAL));
     logger.info("limit:" + getProperty(KYLIN_QUERY_LIMIT));
     logger.info("offset:" + getProperty(KYLIN_QUERY_OFFSET));
-    byte[] encodeBytes =
-        Base64.encodeBase64(
-            new String(getProperty(KYLIN_USERNAME) + ":" + getProperty(KYLIN_PASSWORD))
-                .getBytes("UTF-8"));
-
-    String postContent =
-        new String(
-            "{\"project\":"
-                + "\""
-                + kylinProject
-                + "\""
-                + ","
-                + "\"sql\":"
-                + "\""
-                + kylinSql
-                + "\""
-                + ","
-                + "\"acceptPartial\":"
-                + "\""
-                + getProperty(KYLIN_QUERY_ACCEPT_PARTIAL)
-                + "\""
-                + ","
-                + "\"offset\":"
-                + "\""
-                + getProperty(KYLIN_QUERY_OFFSET)
-                + "\""
-                + ","
-                + "\"limit\":"
-                + "\""
-                + getProperty(KYLIN_QUERY_LIMIT)
-                + "\""
-                + "}");
+    byte[] encodeBytes = Base64.encodeBase64(new String(getProperty(KYLIN_USERNAME)
+        + ":" + getProperty(KYLIN_PASSWORD)).getBytes("UTF-8"));
+
+    String postContent = new String("{\"project\":" + "\"" + kylinProject + "\""
+        + "," + "\"sql\":" + "\"" + kylinSql + "\""
+        + "," + "\"acceptPartial\":" + "\"" + getProperty(KYLIN_QUERY_ACCEPT_PARTIAL) + "\""
+        + "," + "\"offset\":" + "\"" + getProperty(KYLIN_QUERY_OFFSET) + "\""
+        + "," + "\"limit\":" + "\"" + getProperty(KYLIN_QUERY_LIMIT) + "\"" + "}");
     logger.info("post:" + postContent);
     postContent = postContent.replaceAll("[\u0000-\u001f]", " ");
     StringEntity entity = new StringEntity(postContent, "UTF-8");
@@ -196,10 +182,9 @@ public class KylinInterpreter extends Interpreter {
           logger.error("Cannot get json from string: " + result);
           // when code is 401, the response is html, not json
           if (code == 401) {
-            errorMessage.append(
-                " Error message: Unauthorized. This request requires "
-                    + "HTTP authentication. Please make sure your have set your credentials "
-                    + "correctly.");
+            errorMessage.append(" Error message: Unauthorized. This request requires "
+                + "HTTP authentication. Please make sure your have set your credentials "
+                + "correctly.");
           } else {
             errorMessage.append(" Error message: " + result + " .");
           }
@@ -215,18 +200,19 @@ public class KylinInterpreter extends Interpreter {
       throw new IOException(e);
     }
 
-    return new InterpreterResult(InterpreterResult.Code.SUCCESS, formatResult(result));
+    return new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        formatResult(result));
   }
 
   String formatResult(String msg) {
     StringBuilder res = new StringBuilder("%table ");
-
+    
     Matcher ml = KYLIN_TABLE_FORMAT_REGEX_LABEL.matcher(msg);
     while (!ml.hitEnd() && ml.find()) {
       res.append(ml.group(1) + " \t");
-    }
+    } 
     res.append(" \n");
-
+    
     Matcher mr = KYLIN_TABLE_FORMAT_REGEX_RESULTS.matcher(msg);
     String table = null;
     while (!mr.hitEnd() && mr.find()) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/kylin/src/test/java/org/apache/zeppelin/kylin/KylinInterpreterTest.java
----------------------------------------------------------------------
diff --git a/kylin/src/test/java/org/apache/zeppelin/kylin/KylinInterpreterTest.java b/kylin/src/test/java/org/apache/zeppelin/kylin/KylinInterpreterTest.java
index 7cf82ea..66b6f9a 100755
--- a/kylin/src/test/java/org/apache/zeppelin/kylin/KylinInterpreterTest.java
+++ b/kylin/src/test/java/org/apache/zeppelin/kylin/KylinInterpreterTest.java
@@ -19,12 +19,6 @@ package org.apache.zeppelin.kylin;
 
 import static org.junit.Assert.assertEquals;
 
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Locale;
-import java.util.Properties;
 import org.apache.http.Header;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
@@ -32,11 +26,19 @@ import org.apache.http.ProtocolVersion;
 import org.apache.http.StatusLine;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.message.AbstractHttpMessage;
-import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Locale;
+import java.util.Properties;
+
+import org.apache.zeppelin.interpreter.InterpreterResult;
+
 public class KylinInterpreterTest {
   static final Properties KYLIN_PROPERTIES = new Properties();
 
@@ -54,54 +56,38 @@ public class KylinInterpreterTest {
   @Test
   public void testWithDefault() {
     KylinInterpreter t = new MockKylinInterpreter(getDefaultProperties());
-    InterpreterResult result =
-        t.interpret(
-            "select a.date,sum(b.measure) as measure from kylin_fact_table a "
-                + "inner join kylin_lookup_table b on a.date=b.date group by a.date",
-            null);
-    assertEquals(
-        "default",
-        t.getProject(
-            "select a.date,sum(b.measure) as measure "
-                + "from kylin_fact_table a inner join kylin_lookup_table b on a.date=b.date "
-                + "group by a.date"));
+    InterpreterResult result = t.interpret(
+        "select a.date,sum(b.measure) as measure from kylin_fact_table a " +
+            "inner join kylin_lookup_table b on a.date=b.date group by a.date", null);
+    assertEquals("default", t.getProject("select a.date,sum(b.measure) as measure "
+            + "from kylin_fact_table a inner join kylin_lookup_table b on a.date=b.date "
+            + "group by a.date"));
     assertEquals(InterpreterResult.Type.TABLE, result.message().get(0).getType());
   }
 
   @Test
   public void testWithProject() {
     KylinInterpreter t = new MockKylinInterpreter(getDefaultProperties());
-    assertEquals(
-        "project2",
-        t.getProject(
-            "(project2)\n select a.date,sum(b.measure) "
-                + "as measure from kylin_fact_table a inner join kylin_lookup_table b on "
-                + "a.date=b.date group by a.date"));
-    assertEquals(
-        "",
-        t.getProject(
-            "()\n select a.date,sum(b.measure) as measure "
-                + "from kylin_fact_table a inner join kylin_lookup_table b on a.date=b.date "
-                + "group by a.date"));
-    assertEquals(
-        "\n select a.date,sum(b.measure) as measure from kylin_fact_table a "
+    assertEquals("project2", t.getProject("(project2)\n select a.date,sum(b.measure) "
+            + "as measure from kylin_fact_table a inner join kylin_lookup_table b on "
+            + "a.date=b.date group by a.date"));
+    assertEquals("", t.getProject("()\n select a.date,sum(b.measure) as measure "
+            + "from kylin_fact_table a inner join kylin_lookup_table b on a.date=b.date "
+            + "group by a.date"));
+    assertEquals("\n select a.date,sum(b.measure) as measure from kylin_fact_table a "
             + "inner join kylin_lookup_table b on a.date=b.date group by a.date",
-        t.getSQL(
-            "(project2)\n select a.date,sum(b.measure) as measure "
-                + "from kylin_fact_table a inner join kylin_lookup_table b on a.date=b.date "
-                + "group by a.date"));
-    assertEquals(
-        "\n select a.date,sum(b.measure) as measure from kylin_fact_table a "
+            t.getSQL("(project2)\n select a.date,sum(b.measure) as measure "
+                    + "from kylin_fact_table a inner join kylin_lookup_table b on a.date=b.date "
+                    + "group by a.date"));
+    assertEquals("\n select a.date,sum(b.measure) as measure from kylin_fact_table a "
             + "inner join kylin_lookup_table b on a.date=b.date group by a.date",
-        t.getSQL(
-            "()\n select a.date,sum(b.measure) as measure from kylin_fact_table a "
-                + "inner join kylin_lookup_table b on a.date=b.date group by a.date"));
+            t.getSQL("()\n select a.date,sum(b.measure) as measure from kylin_fact_table a "
+                    + "inner join kylin_lookup_table b on a.date=b.date group by a.date"));
   }
 
   @Test
   public void testParseResult() {
-    String msg =
-        "{\"columnMetas\":[{\"isNullable\":1,\"displaySize\":256,\"label\":\"COUNTRY\","
+    String msg = "{\"columnMetas\":[{\"isNullable\":1,\"displaySize\":256,\"label\":\"COUNTRY\","
             + "\"name\":\"COUNTRY\",\"schemaName\":\"DEFAULT\",\"catelogName\":null,"
             + "\"tableName\":\"SALES_TABLE\",\"precision\":256,\"scale\":0,\"columnType\":12,"
             + "\"columnTypeName\":\"VARCHAR\",\"writable\":false,\"readOnly\":true,"
@@ -123,12 +109,11 @@ public class KylinInterpreterTest {
             + "\"isException\":false,\"exceptionMessage\":null,\"duration\":134,"
             + "\"totalScanCount\":1,\"hitExceptionCache\":false,\"storageCacheUsed\":false,"
             + "\"partial\":false}";
-    String expected =
-        "%table COUNTRY \tCURRENCY \tCOUNT__ \t \n"
-            + "AMERICA \tUSD \tnull \t \n"
-            + "null \tRMB \t0 \t \n"
-            + "KOR \tnull \t100 \t \n"
-            + "\\\"abc\\\" \ta,b,c \t-1 \t \n";
+    String expected = "%table COUNTRY \tCURRENCY \tCOUNT__ \t \n" +
+            "AMERICA \tUSD \tnull \t \n" +
+            "null \tRMB \t0 \t \n" +
+            "KOR \tnull \t100 \t \n" +
+            "\\\"abc\\\" \ta,b,c \t-1 \t \n";
     KylinInterpreter t = new MockKylinInterpreter(getDefaultProperties());
     String actual = t.formatResult(msg);
     Assert.assertEquals(expected, actual);
@@ -136,8 +121,7 @@ public class KylinInterpreterTest {
 
   @Test
   public void testParseEmptyResult() {
-    String msg =
-        "{\"columnMetas\":[{\"isNullable\":1,\"displaySize\":256,\"label\":\"COUNTRY\","
+    String msg = "{\"columnMetas\":[{\"isNullable\":1,\"displaySize\":256,\"label\":\"COUNTRY\","
             + "\"name\":\"COUNTRY\",\"schemaName\":\"DEFAULT\",\"catelogName\":null,"
             + "\"tableName\":\"SALES_TABLE\",\"precision\":256,\"scale\":0,\"columnType\":12,"
             + "\"columnTypeName\":\"VARCHAR\",\"writable\":false,\"readOnly\":true,"
@@ -154,8 +138,7 @@ public class KylinInterpreterTest {
             + "\"columnType\":-5,\"columnTypeName\":\"BIGINT\",\"writable\":false,"
             + "\"readOnly\":true,\"definitelyWritable\":false,\"autoIncrement\":false,"
             + "\"caseSensitive\":true,\"searchable\":false,\"currency\":false,\"signed\":true}],"
-            + "\"results\":[],"
-            + "\"cube\":\"Sample_Cube\",\"affectedRowCount\":0,"
+            + "\"results\":[]," + "\"cube\":\"Sample_Cube\",\"affectedRowCount\":0,"
             + "\"isException\":false,\"exceptionMessage\":null,\"duration\":134,"
             + "\"totalScanCount\":1,\"hitExceptionCache\":false,\"storageCacheUsed\":false,"
             + "\"partial\":false}";
@@ -190,32 +173,37 @@ class MockKylinInterpreter extends KylinInterpreter {
   }
 }
 
-class MockHttpClient {
-  public MockHttpResponse execute(HttpPost post) {
+class MockHttpClient{
+  public MockHttpResponse execute(HttpPost post){
     return new MockHttpResponse();
   }
 }
 
-class MockHttpResponse extends AbstractHttpMessage implements HttpResponse {
+class MockHttpResponse extends AbstractHttpMessage implements HttpResponse{
   @Override
   public StatusLine getStatusLine() {
     return new MockStatusLine();
   }
 
   @Override
-  public void setStatusLine(StatusLine statusLine) {}
+  public void setStatusLine(StatusLine statusLine) {
+  }
 
   @Override
-  public void setStatusLine(ProtocolVersion protocolVersion, int i) {}
+  public void setStatusLine(ProtocolVersion protocolVersion, int i) {
+  }
 
   @Override
-  public void setStatusLine(ProtocolVersion protocolVersion, int i, String s) {}
+  public void setStatusLine(ProtocolVersion protocolVersion, int i, String s) {
+  }
 
   @Override
-  public void setStatusCode(int i) throws IllegalStateException {}
+  public void setStatusCode(int i) throws IllegalStateException {
+  }
 
   @Override
-  public void setReasonPhrase(String s) throws IllegalStateException {}
+  public void setReasonPhrase(String s) throws IllegalStateException {
+  }
 
   @Override
   public HttpEntity getEntity() {
@@ -223,7 +211,8 @@ class MockHttpResponse extends AbstractHttpMessage implements HttpResponse {
   }
 
   @Override
-  public void setEntity(HttpEntity httpEntity) {}
+  public void setEntity(HttpEntity httpEntity) {
+  }
 
   @Override
   public Locale getLocale() {
@@ -231,7 +220,8 @@ class MockHttpResponse extends AbstractHttpMessage implements HttpResponse {
   }
 
   @Override
-  public void setLocale(Locale locale) {}
+  public void setLocale(Locale locale) {
+  }
 
   @Override
   public ProtocolVersion getProtocolVersion() {
@@ -239,7 +229,7 @@ class MockHttpResponse extends AbstractHttpMessage implements HttpResponse {
   }
 }
 
-class MockStatusLine implements StatusLine {
+class MockStatusLine implements StatusLine{
   @Override
   public ProtocolVersion getProtocolVersion() {
     return null;
@@ -256,7 +246,7 @@ class MockStatusLine implements StatusLine {
   }
 }
 
-class MockEntity implements HttpEntity {
+class MockEntity implements HttpEntity{
   @Override
   public boolean isRepeatable() {
     return false;
@@ -284,16 +274,15 @@ class MockEntity implements HttpEntity {
 
   @Override
   public InputStream getContent() throws IOException, IllegalStateException {
-    return new ByteArrayInputStream(
-        ("{\"columnMetas\":"
-                + "[{\"label\":\"PART_DT\"},{\"label\":\"measure\"}],"
-                + "\"results\":[[\"2012-01-03\",\"917.4138\"],"
-                + "[\"2012-05-06\",\"592.4823\"]]}")
-            .getBytes());
+    return new ByteArrayInputStream(("{\"columnMetas\":" +
+        "[{\"label\":\"PART_DT\"},{\"label\":\"measure\"}]," +
+        "\"results\":[[\"2012-01-03\",\"917.4138\"]," +
+        "[\"2012-05-06\",\"592.4823\"]]}").getBytes());
   }
 
   @Override
-  public void writeTo(OutputStream outputStream) throws IOException {}
+  public void writeTo(OutputStream outputStream) throws IOException {
+  }
 
   @Override
   public boolean isStreaming() {
@@ -301,5 +290,6 @@ class MockEntity implements HttpEntity {
   }
 
   @Override
-  public void consumeContent() throws IOException {}
+  public void consumeContent() throws IOException {
+  }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/lens/pom.xml
----------------------------------------------------------------------
diff --git a/lens/pom.xml b/lens/pom.xml
index a5d86fb..5eb81c2 100644
--- a/lens/pom.xml
+++ b/lens/pom.xml
@@ -171,6 +171,13 @@
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 9029da3..081c3e5 100644
--- a/lens/src/main/java/org/apache/zeppelin/lens/ExecutionDetail.java
+++ b/lens/src/main/java/org/apache/zeppelin/lens/ExecutionDetail.java
@@ -1,15 +1,18 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.lens;
@@ -17,7 +20,9 @@ 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;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 b0c393f..670ed33 100644
--- a/lens/src/main/java/org/apache/zeppelin/lens/LensBootstrap.java
+++ b/lens/src/main/java/org/apache/zeppelin/lens/LensBootstrap.java
@@ -1,12 +1,12 @@
 /*
  * Copyright 2011-2012 the original author or authors.
- *
+ * 
  * Licensed 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.
@@ -19,13 +19,14 @@ package org.apache.zeppelin.lens;
 import org.springframework.beans.factory.support.DefaultListableBeanFactory;
 import org.springframework.beans.factory.support.RootBeanDefinition;
 import org.springframework.context.support.GenericApplicationContext;
-
-/** 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 org.springframework.shell.Bootstrap {
   public LensBootstrap() {
     super();
   }
-
   public LensJLineShellComponent getLensJLineShellComponent() {
     GenericApplicationContext ctx = (GenericApplicationContext) getApplicationContext();
     RootBeanDefinition rbd = new RootBeanDefinition();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/lens/src/main/java/org/apache/zeppelin/lens/LensInterpreter.java
----------------------------------------------------------------------
diff --git a/lens/src/main/java/org/apache/zeppelin/lens/LensInterpreter.java b/lens/src/main/java/org/apache/zeppelin/lens/LensInterpreter.java
index a132690..17fe931 100644
--- a/lens/src/main/java/org/apache/zeppelin/lens/LensInterpreter.java
+++ b/lens/src/main/java/org/apache/zeppelin/lens/LensInterpreter.java
@@ -1,19 +1,36 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.lens;
 
+import org.apache.lens.cli.commands.BaseLensCommand;
+import org.apache.lens.client.LensClient;
+import org.apache.lens.client.LensClientConfig;
+import org.apache.lens.client.LensClientSingletonWrapper;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.shell.Bootstrap;
+import org.springframework.shell.core.CommandResult;
+import org.springframework.shell.core.JLineShell;
+import org.springframework.shell.core.JLineShellComponent;
+import org.springframework.shell.support.logging.HandlerUtils;
+
 import java.io.ByteArrayOutputStream;
 import java.util.LinkedHashMap;
 import java.util.List;
@@ -22,10 +39,7 @@ import java.util.Properties;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import org.apache.lens.cli.commands.BaseLensCommand;
-import org.apache.lens.client.LensClient;
-import org.apache.lens.client.LensClientConfig;
-import org.apache.lens.client.LensClientSingletonWrapper;
+
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
@@ -33,15 +47,10 @@ import org.apache.zeppelin.interpreter.InterpreterResult.Code;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.shell.Bootstrap;
-import org.springframework.shell.core.CommandResult;
-import org.springframework.shell.core.JLineShell;
-import org.springframework.shell.core.JLineShellComponent;
-import org.springframework.shell.support.logging.HandlerUtils;
 
-/** Lens interpreter for Zeppelin. */
+/**
+ * Lens interpreter for Zeppelin.
+ */
 public class LensInterpreter extends Interpreter {
   static final Logger LOGGER = LoggerFactory.getLogger(LensInterpreter.class);
   static final String LENS_CLIENT_DBNAME = "lens.client.dbname";
@@ -51,23 +60,22 @@ public class LensInterpreter extends Interpreter {
   static final String ZEPPELIN_LENS_RUN_CONCURRENT_SESSION = "zeppelin.lens.run.concurrent";
   static final String ZEPPELIN_LENS_CONCURRENT_SESSIONS = "zeppelin.lens.maxThreads";
   static final String ZEPPELIN_MAX_ROWS = "zeppelin.lens.maxResults";
-  static final Map<String, Pattern> LENS_TABLE_FORMAT_REGEX =
-      new LinkedHashMap<String, Pattern>() {
-        {
-          put("cubes", Pattern.compile(".*show\\s+cube.*"));
-          put("nativetables", Pattern.compile(".*show\\s+nativetable.*"));
-          put("storages", Pattern.compile(".*show\\s+storage.*"));
-          put("facts", Pattern.compile(".*show\\s+fact.*"));
-          put("dimensions", Pattern.compile(".*show\\s+dimension.*"));
-          put("params", Pattern.compile(".*show\\s+param.*"));
-          put("databases", Pattern.compile(".*show\\s+database.*"));
-          put("query results", Pattern.compile(".*query\\s+results.*"));
-        }
-      };
+  static final Map<String, Pattern> LENS_TABLE_FORMAT_REGEX = new LinkedHashMap<String, Pattern>() {
+    {
+      put("cubes", Pattern.compile(".*show\\s+cube.*"));
+      put("nativetables", Pattern.compile(".*show\\s+nativetable.*"));
+      put("storages", Pattern.compile(".*show\\s+storage.*"));
+      put("facts", Pattern.compile(".*show\\s+fact.*"));
+      put("dimensions", Pattern.compile(".*show\\s+dimension.*"));
+      put("params", Pattern.compile(".*show\\s+param.*"));
+      put("databases", Pattern.compile(".*show\\s+database.*"));
+      put("query results", Pattern.compile(".*query\\s+results.*"));
+    }
+  };
 
   private static Pattern queryExecutePattern = Pattern.compile(".*query\\s+execute\\s+(.*)");
   // tracks paragraphId -> Lens QueryHandle
-  private static Map<String, ExecutionDetail> paraToQH = new ConcurrentHashMap<>();
+  private static Map<String, ExecutionDetail> paraToQH = new ConcurrentHashMap<> ();
   private static Map<LensClient, Boolean> clientMap = new ConcurrentHashMap<>();
 
   private int maxResults;
@@ -83,26 +91,22 @@ public class LensInterpreter extends Interpreter {
       lensClientConfig = new LensClientConfig();
       lensClientConfig.set(LENS_SERVER_URL, property.get(LENS_SERVER_URL).toString());
       lensClientConfig.set(LENS_CLIENT_DBNAME, property.get(LENS_CLIENT_DBNAME).toString());
-      lensClientConfig.set(
-          LENS_SESSION_CLUSTER_USER, property.get(LENS_SESSION_CLUSTER_USER).toString());
+      lensClientConfig.set(LENS_SESSION_CLUSTER_USER, property.get(LENS_SESSION_CLUSTER_USER)
+              .toString());
       lensClientConfig.set(LENS_PERSIST_RESULTSET, property.get(LENS_PERSIST_RESULTSET).toString());
       try {
         maxResults = Integer.parseInt(property.get(ZEPPELIN_MAX_ROWS).toString());
       } catch (NumberFormatException | NullPointerException e) {
         maxResults = 1000;
-        LOGGER.error(
-            "unable to parse " + ZEPPELIN_MAX_ROWS + " :" + property.get(ZEPPELIN_MAX_ROWS), e);
+        LOGGER.error("unable to parse " + ZEPPELIN_MAX_ROWS + " :"
+                + property.get(ZEPPELIN_MAX_ROWS), e);
       }
       try {
         maxThreads = Integer.parseInt(property.get(ZEPPELIN_LENS_CONCURRENT_SESSIONS).toString());
       } catch (NumberFormatException | NullPointerException e) {
         maxThreads = 10;
-        LOGGER.error(
-            "unable to parse "
-                + ZEPPELIN_LENS_CONCURRENT_SESSIONS
-                + " :"
-                + property.get(ZEPPELIN_LENS_CONCURRENT_SESSIONS),
-            e);
+        LOGGER.error("unable to parse " + ZEPPELIN_LENS_CONCURRENT_SESSIONS + " :"
+            + property.get(ZEPPELIN_LENS_CONCURRENT_SESSIONS), e);
       }
       LOGGER.info("LensInterpreter created");
     } catch (Exception e) {
@@ -140,7 +144,7 @@ public class LensInterpreter extends Interpreter {
     init();
     LOGGER.info("LensInterpreter opened");
   }
-
+  
   @Override
   public void close() {
     closeConnections();
@@ -167,10 +171,11 @@ public class LensInterpreter extends Interpreter {
     LensClient lensClient;
     try {
       lensClient = new LensClient(lensClientConfig);
-
+      
       for (String beanName : bs.getApplicationContext().getBeanDefinitionNames()) {
         if (bs.getApplicationContext().getBean(beanName) instanceof BaseLensCommand) {
-          ((BaseLensCommand) bs.getApplicationContext().getBean(beanName)).setClient(lensClient);
+          ((BaseLensCommand) bs.getApplicationContext().getBean(beanName))
+            .setClient(lensClient);
         }
       }
     } catch (Exception e) {
@@ -183,12 +188,11 @@ public class LensInterpreter extends Interpreter {
   private InterpreterResult handleHelp(JLineShell shell, String st) {
     java.util.logging.StreamHandler sh = null;
     java.util.logging.Logger springLogger = null;
-    java.util.logging.Formatter formatter =
-        new java.util.logging.Formatter() {
-          public String format(java.util.logging.LogRecord record) {
-            return record.getMessage();
-          }
-        };
+    java.util.logging.Formatter formatter = new java.util.logging.Formatter() {
+      public String format(java.util.logging.LogRecord record) {
+        return record.getMessage();
+      }
+    };
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     try {
       sh = new java.util.logging.StreamHandler(baos, formatter);
@@ -205,7 +209,7 @@ public class LensInterpreter extends Interpreter {
     }
     return new InterpreterResult(Code.SUCCESS, baos.toString());
   }
-
+  
   private String modifyQueryStatement(String st) {
     Matcher matcher = queryExecutePattern.matcher(st.toLowerCase());
     if (!matcher.find()) {
@@ -230,40 +234,36 @@ public class LensInterpreter extends Interpreter {
     }
     String st = input.replaceAll("\\n", " ");
     LOGGER.info("LensInterpreter command: " + st);
-
+    
     Bootstrap bs = createBootstrap();
-    JLineShell shell = getJLineShell(bs);
+    JLineShell  shell = getJLineShell(bs);
     CommandResult res;
     LensClient lensClient = null;
     String qh = null;
-
+    
     if (st.trim().startsWith("help")) {
       return handleHelp(shell, st);
     }
-
+    
     try {
       lensClient = createAndSetLensClient(bs);
       clientMap.put(lensClient, true);
-
+      
       String lensCommand = modifyQueryStatement(st);
-
+      
       LOGGER.info("executing command : " + lensCommand);
       res = shell.executeCommand(lensCommand);
-
-      if (!lensCommand.equals(st)
-          && res != null
-          && res.getResult() != null
+      
+      if (!lensCommand.equals(st) && res != null 
+          && res.getResult() != null 
           && res.getResult().toString().trim().matches("[a-z0-9-]+")) {
         // setup query progress tracking
         qh = res.getResult().toString();
         paraToQH.put(context.getParagraphId(), new ExecutionDetail(qh, lensClient, shell));
         String getResultsCmd = "query results --async false " + qh;
-        LOGGER.info(
-            "executing query results command : "
-                + context.getParagraphId()
-                + " : "
+        LOGGER.info("executing query results command : " + context.getParagraphId() + " : "
                 + getResultsCmd);
-        res = shell.executeCommand(getResultsCmd);
+        res = shell.executeCommand(getResultsCmd); 
         paraToQH.remove(context.getParagraphId());
       }
     } catch (Exception ex) {
@@ -283,7 +283,7 @@ public class LensInterpreter extends Interpreter {
     }
     return new InterpreterResult(Code.SUCCESS, formatResult(st, res));
   }
-
+  
   private void closeShell(JLineShell shell) {
     if (shell instanceof LensJLineShellComponent) {
       ((LensJLineShellComponent) shell).stop();
@@ -291,7 +291,7 @@ public class LensInterpreter extends Interpreter {
       ((JLineShellComponent) shell).stop();
     }
   }
-
+  
   private String formatResult(String st, CommandResult result) {
     if (result == null) {
       return "error in interpret, no result object returned";
@@ -299,8 +299,8 @@ public class LensInterpreter extends Interpreter {
     if (!result.isSuccess() || result.getResult() == null) {
       if (result.getException() != null) {
         return result.getException().getMessage();
-        // try describe cube (without cube name)- error is written as a warning,
-        // but not returned to result object
+        //try describe cube (without cube name)- error is written as a warning, 
+        //but not returned to result object
       } else {
         return "error in interpret, unable to execute command";
       }
@@ -312,15 +312,15 @@ public class LensInterpreter extends Interpreter {
         break;
       }
     }
-    if (queryExecutePattern.matcher(st.toLowerCase()).find()
-        && result.getResult().toString().contains(" rows process in (")) {
+    if (queryExecutePattern.matcher(st.toLowerCase()).find() &&
+            result.getResult().toString().contains(" rows process in (")) {
       sb.append("%table ");
     }
     if (sb.length() > 0) {
       return sb.append(result.getResult().toString()).toString();
     }
     return result.getResult().toString();
-    // Lens sends error messages without setting result.isSuccess() = false.
+    //Lens sends error messages without setting result.isSuccess() = false.
   }
 
   @Override
@@ -339,12 +339,7 @@ public class LensInterpreter extends Interpreter {
       clientMap.put(lensClient, true);
       LOGGER.info("invoke query kill (" + context.getParagraphId() + ") " + qh);
       CommandResult res = shell.executeCommand("query kill " + qh);
-      LOGGER.info(
-          "query kill returned ("
-              + context.getParagraphId()
-              + ") "
-              + qh
-              + " with: "
+      LOGGER.info("query kill returned (" + context.getParagraphId() + ") " + qh + " with: "
               + res.getResult());
     } catch (Exception e) {
       LOGGER.error("unable to kill query (" + context.getParagraphId() + ") " + qh, e);
@@ -385,7 +380,7 @@ public class LensInterpreter extends Interpreter {
         clientMap.put(lensClient, true);
         CommandResult res = shell.executeCommand("query status " + qh);
         LOGGER.info(context.getParagraphId() + " --> " + res.getResult().toString());
-        // change to debug
+        //change to debug
         Pattern pattern = Pattern.compile(".*(Progress : (\\d\\.\\d)).*");
         Matcher matcher = pattern.matcher(res.getResult().toString().replaceAll("\\n", " "));
         if (matcher.find(2)) {
@@ -415,11 +410,11 @@ public class LensInterpreter extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return null;
   }
-
+  
   public boolean concurrentRequests() {
     return Boolean.parseBoolean(getProperty(ZEPPELIN_LENS_RUN_CONCURRENT_SESSION));
   }
@@ -427,9 +422,8 @@ public class LensInterpreter extends Interpreter {
   @Override
   public Scheduler getScheduler() {
     if (concurrentRequests()) {
-      return SchedulerFactory.singleton()
-          .createOrGetParallelScheduler(
-              LensInterpreter.class.getName() + this.hashCode(), maxThreads);
+      return SchedulerFactory.singleton().createOrGetParallelScheduler(
+          LensInterpreter.class.getName() + this.hashCode(), maxThreads);
     } else {
       return super.getScheduler();
     }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/lens/src/main/java/org/apache/zeppelin/lens/LensJLineShellComponent.java
----------------------------------------------------------------------
diff --git a/lens/src/main/java/org/apache/zeppelin/lens/LensJLineShellComponent.java b/lens/src/main/java/org/apache/zeppelin/lens/LensJLineShellComponent.java
index 3058116..cba113c 100644
--- a/lens/src/main/java/org/apache/zeppelin/lens/LensJLineShellComponent.java
+++ b/lens/src/main/java/org/apache/zeppelin/lens/LensJLineShellComponent.java
@@ -1,12 +1,12 @@
 /*
  * Copyright 2011-2012 the original author or authors.
- *
+ * 
  * Licensed 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.
@@ -15,9 +15,9 @@
  */
 package org.apache.zeppelin.lens;
 
-import java.util.Map;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.BeanFactoryUtils;
 import org.springframework.beans.factory.InitializingBean;
@@ -37,11 +37,16 @@ import org.springframework.shell.plugin.HistoryFileNameProvider;
 import org.springframework.shell.plugin.PluginUtils;
 import org.springframework.shell.plugin.PromptProvider;
 
-/** workaround for https://github.com/spring-projects/spring-shell/issues/73. */
-public class LensJLineShellComponent extends JLineShell
-    implements SmartLifecycle, ApplicationContextAware, InitializingBean {
-  @Autowired private CommandLine commandLine;
+import java.util.Map;
 
+/**
+ * workaround for https://github.com/spring-projects/spring-shell/issues/73.
+ */
+public class LensJLineShellComponent extends JLineShell implements SmartLifecycle,
+        ApplicationContextAware, InitializingBean {
+  @Autowired
+  private CommandLine commandLine;
+  
   private volatile boolean running = false;
   private Thread shellThread;
 
@@ -67,18 +72,18 @@ public class LensJLineShellComponent extends JLineShell
   public boolean isAutoStartup() {
     return false;
   }
-
+  
   public void stop(Runnable callback) {
     stop();
     callback.run();
   }
-
+  
   public int getPhase() {
     return 1;
   }
-
+  
   public void start() {
-    // customizePlug must run before start thread to take plugin's configuration into effect
+    //customizePlug must run before start thread to take plugin's configuration into effect
     customizePlugin();
     shellThread = new Thread(this, "Spring Shell");
     shellThread.start();
@@ -95,29 +100,31 @@ public class LensJLineShellComponent extends JLineShell
   public boolean isRunning() {
     return running;
   }
-
+  
   @SuppressWarnings("rawtypes")
   public void afterPropertiesSet() {
 
-    Map<String, CommandMarker> commands =
-        BeanFactoryUtils.beansOfTypeIncludingAncestors(applicationContext, CommandMarker.class);
+    Map<String, CommandMarker> commands = BeanFactoryUtils.beansOfTypeIncludingAncestors(
+            applicationContext, CommandMarker.class);
     for (CommandMarker command : commands.values()) {
       getSimpleParser().add(command);
     }
 
-    Map<String, Converter> converters =
-        BeanFactoryUtils.beansOfTypeIncludingAncestors(applicationContext, Converter.class);
+    Map<String, Converter> converters = BeanFactoryUtils.beansOfTypeIncludingAncestors(
+            applicationContext, Converter.class);
     for (Converter<?> converter : converters.values()) {
       getSimpleParser().add(converter);
     }
-
+    
     setHistorySize(commandLine.getHistorySize());
     if (commandLine.getShellCommandsToExecute() != null) {
       setPrintBanner(false);
     }
   }
 
-  /** Wait the shell command to complete by typing "quit" or "exit". */
+  /**
+   * Wait the shell command to complete by typing "quit" or "exit".
+   */
   public void waitForComplete() {
     try {
       shellThread.join();
@@ -156,14 +163,13 @@ public class LensJLineShellComponent extends JLineShell
   }
 
   /**
-   * get history file name from provider. The provider has highest order {@link
-   * org.springframework.core.Ordered#getOrder()} will win.
-   *
-   * @return history file name
+   * get history file name from provider. The provider has highest order
+   * {@link org.springframework.core.Ordered#getOrder()} will win.
+   * 
+   * @return history file name 
    */
   protected String getHistoryFileName() {
-    HistoryFileNameProvider historyFileNameProvider =
-        PluginUtils.getHighestPriorityProvider(
+    HistoryFileNameProvider historyFileNameProvider = PluginUtils.getHighestPriorityProvider(
             this.applicationContext, HistoryFileNameProvider.class);
     String providerHistoryFileName = historyFileNameProvider.getHistoryFileName();
     if (providerHistoryFileName != null) {
@@ -174,14 +180,14 @@ public class LensJLineShellComponent extends JLineShell
   }
 
   /**
-   * get prompt text from provider. The provider has highest order {@link
-   * org.springframework.core.Ordered#getOrder()} will win.
-   *
+   * get prompt text from provider. The provider has highest order
+   * {@link org.springframework.core.Ordered#getOrder()} will win.
+   * 
    * @return prompt text
    */
   protected String getPromptText() {
-    PromptProvider promptProvider =
-        PluginUtils.getHighestPriorityProvider(this.applicationContext, PromptProvider.class);
+    PromptProvider promptProvider = PluginUtils.getHighestPriorityProvider(this.applicationContext,
+            PromptProvider.class);
     String providerPromptText = promptProvider.getPrompt();
     if (providerPromptText != null) {
       return providerPromptText;
@@ -191,16 +197,18 @@ public class LensJLineShellComponent extends JLineShell
   }
 
   /**
-   * Get Banner and Welcome Message from provider. The provider has highest order {@link
-   * org.springframework.core.Ordered#getOrder()} will win.
+   * Get Banner and Welcome Message from provider. The provider has highest order 
+   * {@link org.springframework.core.Ordered#getOrder()} will win.
    *
-   * @return BannerText[0]: Banner BannerText[1]: Welcome Message BannerText[2]: Version
-   *     BannerText[3]: Product Name
+   * @return BannerText[0]: Banner
+   *         BannerText[1]: Welcome Message
+   *         BannerText[2]: Version
+   *         BannerText[3]: Product Name
    */
   private String[] getBannerText() {
     String[] bannerText = new String[4];
-    BannerProvider provider =
-        PluginUtils.getHighestPriorityProvider(this.applicationContext, BannerProvider.class);
+    BannerProvider provider = PluginUtils.getHighestPriorityProvider(this.applicationContext,
+            BannerProvider.class);
     bannerText[0] = provider.getBanner();
     bannerText[1] = provider.getWelcomeMessage();
     bannerText[2] = provider.getVersion();
@@ -217,22 +225,24 @@ public class LensJLineShellComponent extends JLineShell
 
   /**
    * get the welcome message at start.
-   *
+   * 
    * @return welcome message
    */
   public String getWelcomeMessage() {
     return this.welcomeMessage;
   }
 
-  /** @param printBanner the printBanner to set */
+  /**
+   * @param printBanner the printBanner to set
+   */
   public void setPrintBanner(boolean printBanner) {
     this.printBanner = printBanner;
   }
-
+  
   protected String getProductName() {
     return productName;
   }
-
+  
   protected String getVersion() {
     return version;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/lens/src/main/java/org/apache/zeppelin/lens/LensSimpleExecutionStrategy.java
----------------------------------------------------------------------
diff --git a/lens/src/main/java/org/apache/zeppelin/lens/LensSimpleExecutionStrategy.java b/lens/src/main/java/org/apache/zeppelin/lens/LensSimpleExecutionStrategy.java
index 1d9b083..4a802ac 100644
--- a/lens/src/main/java/org/apache/zeppelin/lens/LensSimpleExecutionStrategy.java
+++ b/lens/src/main/java/org/apache/zeppelin/lens/LensSimpleExecutionStrategy.java
@@ -15,7 +15,6 @@
  */
 package org.apache.zeppelin.lens;
 
-import java.util.logging.Logger;
 import org.springframework.shell.core.ExecutionProcessor;
 import org.springframework.shell.core.ExecutionStrategy;
 import org.springframework.shell.event.ParseResult;
@@ -23,7 +22,11 @@ import org.springframework.shell.support.logging.HandlerUtils;
 import org.springframework.util.Assert;
 import org.springframework.util.ReflectionUtils;
 
-/** workaround for https://github.com/spring-projects/spring-shell/issues/73. */
+import java.util.logging.Logger;
+
+/**
+ * workaround for https://github.com/spring-projects/spring-shell/issues/73.
+ */
 public class LensSimpleExecutionStrategy implements ExecutionStrategy {
 
   private static final Logger logger = HandlerUtils.getLogger(LensSimpleExecutionStrategy.class);
@@ -53,8 +56,8 @@ public class LensSimpleExecutionStrategy implements ExecutionStrategy {
 
   private Object invoke(ParseResult parseResult) {
     try {
-      return ReflectionUtils.invokeMethod(
-          parseResult.getMethod(), parseResult.getInstance(), parseResult.getArguments());
+      return ReflectionUtils.invokeMethod(parseResult.getMethod(),
+        parseResult.getInstance(), parseResult.getArguments());
     } catch (Throwable th) {
       logger.severe("Command failed " + th);
       return handleThrowable(th);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/lens/src/test/java/org/apache/zeppelin/lens/LensInterpreterTest.java
----------------------------------------------------------------------
diff --git a/lens/src/test/java/org/apache/zeppelin/lens/LensInterpreterTest.java b/lens/src/test/java/org/apache/zeppelin/lens/LensInterpreterTest.java
index 6d84a6e..6f1f18a 100644
--- a/lens/src/test/java/org/apache/zeppelin/lens/LensInterpreterTest.java
+++ b/lens/src/test/java/org/apache/zeppelin/lens/LensInterpreterTest.java
@@ -1,19 +1,24 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.lens;
 
+import static org.junit.Assert.assertEquals;
+
 import static org.apache.zeppelin.lens.LensInterpreter.LENS_CLIENT_DBNAME;
 import static org.apache.zeppelin.lens.LensInterpreter.LENS_PERSIST_RESULTSET;
 import static org.apache.zeppelin.lens.LensInterpreter.LENS_SERVER_URL;
@@ -21,21 +26,26 @@ import static org.apache.zeppelin.lens.LensInterpreter.LENS_SESSION_CLUSTER_USER
 import static org.apache.zeppelin.lens.LensInterpreter.ZEPPELIN_LENS_CONCURRENT_SESSIONS;
 import static org.apache.zeppelin.lens.LensInterpreter.ZEPPELIN_LENS_RUN_CONCURRENT_SESSION;
 import static org.apache.zeppelin.lens.LensInterpreter.ZEPPELIN_MAX_ROWS;
-import static org.junit.Assert.assertEquals;
 
-import java.util.Properties;
-import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-/** Lens interpreter unit tests. */
+import java.util.Properties;
+
+import org.apache.zeppelin.interpreter.InterpreterResult;
+
+/**
+ * Lens interpreter unit tests.
+ */
 public class LensInterpreterTest {
   @Before
-  public void setUp() throws Exception {}
+  public void setUp() throws Exception {
+  }
 
   @After
-  public void tearDown() throws Exception {}
+  public void tearDown() throws Exception {
+  }
 
   @Test
   public void test() {
@@ -49,17 +59,17 @@ public class LensInterpreterTest {
     prop.setProperty(ZEPPELIN_LENS_CONCURRENT_SESSIONS, "10");
     LensInterpreter t = new MockLensInterpreter(prop);
     t.open();
-    // simple help test
+    //simple help test
     InterpreterResult result = t.interpret("help", null);
     assertEquals(result.message().get(0).getType(), InterpreterResult.Type.TEXT);
-    // assertEquals("unable to find 'query execute' in help message",
+    //assertEquals("unable to find 'query execute' in help message", 
     //  result.message().contains("query execute"), result.message());
     t.close();
   }
-
+  
   class MockLensInterpreter extends LensInterpreter {
     MockLensInterpreter(Properties property) {
-      super(property);
+      super(property);  
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/livy/pom.xml
----------------------------------------------------------------------
diff --git a/livy/pom.xml b/livy/pom.xml
index eddeb83..6c911e1 100644
--- a/livy/pom.xml
+++ b/livy/pom.xml
@@ -407,6 +407,14 @@
                     </execution>
                 </executions>
             </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <configuration>
+                    <skip>false</skip>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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
index 64c9c7d..3c4b714 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/APINotFoundException.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/APINotFoundException.java
@@ -17,9 +17,12 @@
 
 package org.apache.zeppelin.livy;
 
-/** APINotFoundException happens because we may introduce new apis in new livy version. */
+/**
+ * APINotFoundException happens because we may introduce new apis in new livy version.
+ */
 public class APINotFoundException extends LivyException {
-  public APINotFoundException() {}
+  public APINotFoundException() {
+  }
 
   public APINotFoundException(String message) {
     super(message);
@@ -33,8 +36,8 @@ public class APINotFoundException extends LivyException {
     super(cause);
   }
 
-  public APINotFoundException(
-      String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+  public APINotFoundException(String message, Throwable cause, boolean enableSuppression,
+                              boolean writableStackTrace) {
     super(message, cause, enableSuppression, writableStackTrace);
   }
 }


[33/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
index 5615812..416d44e 100644
--- a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
@@ -17,6 +17,7 @@
 
 package org.apache.zeppelin.integration;
 
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.AbstractZeppelinIT;
 import org.apache.zeppelin.WebDriverManager;
@@ -38,7 +39,9 @@ import org.slf4j.LoggerFactory;
 public class ParagraphActionsIT extends AbstractZeppelinIT {
   private static final Logger LOG = LoggerFactory.getLogger(ParagraphActionsIT.class);
 
-  @Rule public ErrorCollector collector = new ErrorCollector();
+
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
 
   @Before
   public void startUp() {
@@ -56,89 +59,57 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
       createNewNote();
       Actions action = new Actions(driver);
       waitForParagraph(1, "READY");
-      Integer oldNosOfParas =
-          driver.findElements(By.xpath("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
-      collector.checkThat(
-          "Before Insert New : the number of  paragraph ", oldNosOfParas, CoreMatchers.equalTo(1));
+      Integer oldNosOfParas = driver.findElements(By.xpath("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
+      collector.checkThat("Before Insert New : the number of  paragraph ",
+          oldNosOfParas,
+          CoreMatchers.equalTo(1));
       driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      driver
-          .findElement(
-              By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click=\"insertNew('below')\"]"))
-          .click();
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click=\"insertNew('below')\"]")).click();
       waitForParagraph(2, "READY");
-      Integer newNosOfParas =
-          driver.findElements(By.xpath("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
-      collector.checkThat(
-          "After Insert New (using Insert New button) :  number of  paragraph",
+      Integer newNosOfParas = driver.findElements(By.xpath("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
+      collector.checkThat("After Insert New (using Insert New button) :  number of  paragraph",
           oldNosOfParas + 1,
           CoreMatchers.equalTo(newNosOfParas));
 
       driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      driver
-          .findElement(
-              By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='removeParagraph(paragraph)']"))
-          .click();
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='removeParagraph(paragraph)']")).click();
       ZeppelinITUtils.sleep(1000, false);
-      driver
-          .findElement(
-              By.xpath(
-                  "//div[@class='modal-dialog'][contains(.,'delete this paragraph')]"
-                      + "//div[@class='modal-footer']//button[contains(.,'OK')]"))
-          .click();
+      driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'delete this paragraph')]" +
+          "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
       ZeppelinITUtils.sleep(1000, false);
 
       setTextOfParagraph(1, " original paragraph ");
 
-      WebElement newPara =
-          driver.findElement(
-              By.xpath(getParagraphXPath(1) + "//div[contains(@class,'new-paragraph')][1]"));
+      WebElement newPara = driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class,'new-paragraph')][1]"));
       action.moveToElement(newPara).click().build().perform();
       ZeppelinITUtils.sleep(1000, false);
       waitForParagraph(1, "READY");
 
-      collector.checkThat(
-          "Paragraph is created above",
-          driver
-              .findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]"))
-              .getText(),
+      collector.checkThat("Paragraph is created above",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]")).getText(),
           CoreMatchers.equalTo(StringUtils.EMPTY));
       setTextOfParagraph(1, " this is above ");
 
-      newPara =
-          driver.findElement(
-              By.xpath(getParagraphXPath(2) + "//div[contains(@class,'new-paragraph')][2]"));
+      newPara = driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class,'new-paragraph')][2]"));
       action.moveToElement(newPara).click().build().perform();
 
       waitForParagraph(3, "READY");
 
-      collector.checkThat(
-          "Paragraph is created below",
-          driver
-              .findElement(By.xpath(getParagraphXPath(3) + "//div[contains(@class, 'editor')]"))
-              .getText(),
+      collector.checkThat("Paragraph is created below",
+          driver.findElement(By.xpath(getParagraphXPath(3) + "//div[contains(@class, 'editor')]")).getText(),
           CoreMatchers.equalTo(StringUtils.EMPTY));
       setTextOfParagraph(3, " this is below ");
 
-      collector.checkThat(
-          "The output field of paragraph1 contains",
-          driver
-              .findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]"))
-              .getText(),
+      collector.checkThat("The output field of paragraph1 contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]")).getText(),
           CoreMatchers.equalTo(" this is above "));
-      collector.checkThat(
-          "The output field paragraph2 contains",
-          driver
-              .findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'editor')]"))
-              .getText(),
+      collector.checkThat("The output field paragraph2 contains",
+          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'editor')]")).getText(),
           CoreMatchers.equalTo(" original paragraph "));
-      collector.checkThat(
-          "The output field paragraph3 contains",
-          driver
-              .findElement(By.xpath(getParagraphXPath(3) + "//div[contains(@class, 'editor')]"))
-              .getText(),
+      collector.checkThat("The output field paragraph3 contains",
+          driver.findElement(By.xpath(getParagraphXPath(3) + "//div[contains(@class, 'editor')]")).getText(),
           CoreMatchers.equalTo(" this is below "));
-      collector.checkThat(
-          "The current number of paragraphs after creating  paragraph above and below",
+      collector.checkThat("The current number of paragraphs after creating  paragraph above and below",
           driver.findElements(By.xpath("//div[@ng-controller=\"ParagraphCtrl\"]")).size(),
           CoreMatchers.equalTo(3));
 
@@ -147,6 +118,7 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
     } catch (Exception e) {
       handleException("Exception in ParagraphActionsIT while testCreateNewButton ", e);
     }
+
   }
 
   @Test
@@ -156,29 +128,24 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
 
       waitForParagraph(1, "READY");
       driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      driver
-          .findElement(
-              By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click=\"insertNew('below')\"]"))
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click=\"insertNew('below')\"]"))
           .click();
       waitForParagraph(2, "READY");
-      Integer oldNosOfParas =
-          driver.findElements(By.xpath("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
-      collector.checkThat(
-          "Before Remove : Number of paragraphs are ", oldNosOfParas, CoreMatchers.equalTo(2));
+      Integer oldNosOfParas = driver.findElements(By.xpath
+          ("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
+      collector.checkThat("Before Remove : Number of paragraphs are ",
+          oldNosOfParas,
+          CoreMatchers.equalTo(2));
       driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
 
-      clickAndWait(
-          By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='removeParagraph(paragraph)']"));
+      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='removeParagraph(paragraph)']"));
 
-      clickAndWait(
-          By.xpath(
-              "//div[@class='modal-dialog'][contains(.,'delete this paragraph')"
-                  + "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
+      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'delete this paragraph')" +
+          "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
 
-      Integer newNosOfParas =
-          driver.findElements(By.xpath("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
-      collector.checkThat(
-          "After Remove : Number of paragraphs are",
+      Integer newNosOfParas = driver.findElements(By.xpath
+          ("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
+      collector.checkThat("After Remove : Number of paragraphs are",
           newNosOfParas,
           CoreMatchers.equalTo(oldNosOfParas - 1));
       deleteTestNotebook(driver);
@@ -197,63 +164,45 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
       setTextOfParagraph(1, "1");
 
       driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      driver
-          .findElement(
-              By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click=\"insertNew('below')\"]"))
-          .click();
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click=\"insertNew('below')\"]")).click();
+
 
       waitForParagraph(2, "READY");
       setTextOfParagraph(2, "2");
 
-      collector.checkThat(
-          "The paragraph1 value contains",
-          driver
-              .findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]"))
-              .getText(),
+
+      collector.checkThat("The paragraph1 value contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]")).getText(),
           CoreMatchers.equalTo("1"));
-      collector.checkThat(
-          "The paragraph1 value contains",
-          driver
-              .findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'editor')]"))
-              .getText(),
+      collector.checkThat("The paragraph1 value contains",
+          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'editor')]")).getText(),
           CoreMatchers.equalTo("2"));
 
       driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
       clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='moveDown(paragraph)']"));
 
-      collector.checkThat(
-          "The paragraph1 value contains",
-          driver
-              .findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]"))
-              .getText(),
+      collector.checkThat("The paragraph1 value contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]")).getText(),
           CoreMatchers.equalTo("2"));
-      collector.checkThat(
-          "The paragraph1 value contains",
-          driver
-              .findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'editor')]"))
-              .getText(),
+      collector.checkThat("The paragraph1 value contains",
+          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'editor')]")).getText(),
           CoreMatchers.equalTo("1"));
 
       driver.findElement(By.xpath(getParagraphXPath(2) + "//span[@class='icon-settings']")).click();
       clickAndWait(By.xpath(getParagraphXPath(2) + "//ul/li/a[@ng-click='moveUp(paragraph)']"));
 
-      collector.checkThat(
-          "The paragraph1 value contains",
-          driver
-              .findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]"))
-              .getText(),
+      collector.checkThat("The paragraph1 value contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]")).getText(),
           CoreMatchers.equalTo("1"));
-      collector.checkThat(
-          "The paragraph1 value contains",
-          driver
-              .findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'editor')]"))
-              .getText(),
+      collector.checkThat("The paragraph1 value contains",
+          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'editor')]")).getText(),
           CoreMatchers.equalTo("2"));
       deleteTestNotebook(driver);
 
     } catch (Exception e) {
       handleException("Exception in ParagraphActionsIT while testMoveUpAndDown ", e);
     }
+
   }
 
   @Test
@@ -265,32 +214,20 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
       setTextOfParagraph(1, "println (\"abcd\")");
 
       driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      clickAndWait(
-          By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='toggleEnableDisable(paragraph)']"));
-      collector.checkThat(
-          "The play button class was ",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//span[@class='icon-control-play shortcut-icon']"))
-              .isDisplayed(),
-          CoreMatchers.equalTo(false));
+      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='toggleEnableDisable(paragraph)']"));
+      collector.checkThat("The play button class was ",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-control-play shortcut-icon']")).isDisplayed(), CoreMatchers.equalTo(false)
+      );
 
-      driver
-          .findElement(
-              By.xpath(".//*[@id='main']//button[contains(@ng-click, 'runAllParagraphs')]"))
-          .sendKeys(Keys.ENTER);
+      driver.findElement(By.xpath(".//*[@id='main']//button[contains(@ng-click, 'runAllParagraphs')]")).sendKeys(Keys.ENTER);
       ZeppelinITUtils.sleep(1000, false);
-      driver
-          .findElement(
-              By.xpath(
-                  "//div[@class='modal-dialog'][contains(.,'Run all paragraphs?')]"
-                      + "//div[@class='modal-footer']//button[contains(.,'OK')]"))
-          .click();
+      driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'Run all paragraphs?')]" +
+          "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
       ZeppelinITUtils.sleep(2000, false);
 
-      collector.checkThat(
-          "Paragraph status is ", getParagraphStatus(1), CoreMatchers.equalTo("READY"));
+      collector.checkThat("Paragraph status is ",
+          getParagraphStatus(1), CoreMatchers.equalTo("READY")
+      );
 
       deleteTestNotebook(driver);
 
@@ -299,11 +236,10 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
     }
   }
 
-  //  @Test
+//  @Test
   public void testRunOnSelectionChange() throws Exception {
     try {
-      String xpathToRunOnSelectionChangeCheckbox =
-          getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-checked, 'true')]";
+      String xpathToRunOnSelectionChangeCheckbox = getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-checked, 'true')]";
       String xpathToDropdownMenu = getParagraphXPath(1) + "//select";
       String xpathToResultText = getParagraphXPath(1) + "//div[contains(@id,\"_html\")]";
 
@@ -316,52 +252,37 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
 
       // 1. 'RunOnSelectionChange' is true by default
       driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      collector.checkThat(
-          "'Run on selection change' checkbox will be shown under dropdown menu ",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1)
-                          + "//ul/li/form/input[contains(@ng-click, 'turnOnAutoRun(paragraph)')]"))
-              .isDisplayed(),
-          CoreMatchers.equalTo(true));
+      collector.checkThat("'Run on selection change' checkbox will be shown under dropdown menu ",
+        driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-click, 'turnOnAutoRun(paragraph)')]")).isDisplayed(),
+        CoreMatchers.equalTo(true));
 
       Select dropDownMenu = new Select(driver.findElement(By.xpath((xpathToDropdownMenu))));
       dropDownMenu.selectByVisibleText("2");
       waitForParagraph(1, "FINISHED");
-      collector.checkThat(
-          "If 'RunOnSelectionChange' is true, the paragraph result will be updated right after click any options in the dropdown menu ",
-          driver.findElement(By.xpath(xpathToResultText)).getText(),
-          CoreMatchers.equalTo("My selection is 2"));
+      collector.checkThat("If 'RunOnSelectionChange' is true, the paragraph result will be updated right after click any options in the dropdown menu ",
+        driver.findElement(By.xpath(xpathToResultText)).getText(),
+        CoreMatchers.equalTo("My selection is 2"));
 
       // 2. set 'RunOnSelectionChange' to false
       driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
       driver.findElement(By.xpath(xpathToRunOnSelectionChangeCheckbox)).click();
-      collector.checkThat(
-          "If 'Run on selection change' checkbox is unchecked, 'paragraph.config.runOnSelectionChange' will be false ",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1)
-                          + "//ul/li/span[contains(@ng-if, 'paragraph.config.runOnSelectionChange == false')]"))
-              .isDisplayed(),
-          CoreMatchers.equalTo(true));
+      collector.checkThat("If 'Run on selection change' checkbox is unchecked, 'paragraph.config.runOnSelectionChange' will be false ",
+        driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/span[contains(@ng-if, 'paragraph.config.runOnSelectionChange == false')]")).isDisplayed(),
+        CoreMatchers.equalTo(true));
 
       Select sameDropDownMenu = new Select(driver.findElement(By.xpath((xpathToDropdownMenu))));
       sameDropDownMenu.selectByVisibleText("1");
       waitForParagraph(1, "FINISHED");
-      collector.checkThat(
-          "If 'RunOnSelectionChange' is false, the paragraph result won't be updated even if we select any options in the dropdown menu ",
-          driver.findElement(By.xpath(xpathToResultText)).getText(),
-          CoreMatchers.equalTo("My selection is 2"));
+      collector.checkThat("If 'RunOnSelectionChange' is false, the paragraph result won't be updated even if we select any options in the dropdown menu ",
+        driver.findElement(By.xpath(xpathToResultText)).getText(),
+        CoreMatchers.equalTo("My selection is 2"));
 
       // run paragraph manually by pressing ENTER
       driver.findElement(By.xpath(xpathToDropdownMenu)).sendKeys(Keys.ENTER);
       waitForParagraph(1, "FINISHED");
-      collector.checkThat(
-          "Even if 'RunOnSelectionChange' is set as false, still can run the paragraph by pressing ENTER ",
-          driver.findElement(By.xpath(xpathToResultText)).getText(),
-          CoreMatchers.equalTo("My selection is 1"));
+      collector.checkThat("Even if 'RunOnSelectionChange' is set as false, still can run the paragraph by pressing ENTER ",
+        driver.findElement(By.xpath(xpathToResultText)).getText(),
+        CoreMatchers.equalTo("My selection is 1"));
 
     } catch (Exception e) {
       handleException("Exception in ParagraphActionsIT while testRunOnSelectionChange ", e);
@@ -376,22 +297,18 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
       waitForParagraph(1, "READY");
       String xpathToOutputField = getParagraphXPath(1) + "//div[contains(@id,\"_text\")]";
       setTextOfParagraph(1, "println (\"abcd\")");
-      collector.checkThat(
-          "Before Run Output field contains ",
+      collector.checkThat("Before Run Output field contains ",
           driver.findElements(By.xpath(xpathToOutputField)).size(),
           CoreMatchers.equalTo(0));
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
-      collector.checkThat(
-          "After Run Output field contains  ",
+      collector.checkThat("After Run Output field contains  ",
           driver.findElement(By.xpath(xpathToOutputField)).getText(),
           CoreMatchers.equalTo("abcd"));
       driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      clickAndWait(
-          By.xpath(
-              getParagraphXPath(1) + "//ul/li/a[@ng-click='clearParagraphOutput(paragraph)']"));
-      collector.checkThat(
-          "After Clear  Output field contains ",
+      clickAndWait(By.xpath(getParagraphXPath(1) +
+          "//ul/li/a[@ng-click='clearParagraphOutput(paragraph)']"));
+      collector.checkThat("After Clear  Output field contains ",
           driver.findElements(By.xpath(xpathToOutputField)).size(),
           CoreMatchers.equalTo(0));
       deleteTestNotebook(driver);
@@ -407,24 +324,16 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
       createNewNote();
       waitForParagraph(1, "READY");
 
-      collector.checkThat(
-          "Default Width is 12 ",
+      collector.checkThat("Default Width is 12 ",
           driver.findElement(By.xpath("//div[contains(@class,'col-md-12')]")).isDisplayed(),
           CoreMatchers.equalTo(true));
       for (Integer newWidth = 1; newWidth <= 11; newWidth++) {
         clickAndWait(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']"));
         String visibleText = newWidth.toString();
-        new Select(
-                driver.findElement(
-                    By.xpath(
-                        getParagraphXPath(1)
-                            + "//ul/li/a/select[(@ng-model='paragraph.config.colWidth')]")))
-            .selectByVisibleText(visibleText);
-        collector.checkThat(
-            "New Width is : " + newWidth,
-            driver
-                .findElement(By.xpath("//div[contains(@class,'col-md-" + newWidth + "')]"))
-                .isDisplayed(),
+        new Select(driver.findElement(By.xpath(getParagraphXPath(1)
+            + "//ul/li/a/select[(@ng-model='paragraph.config.colWidth')]"))).selectByVisibleText(visibleText);
+        collector.checkThat("New Width is : " + newWidth,
+            driver.findElement(By.xpath("//div[contains(@class,'col-md-" + newWidth + "')]")).isDisplayed(),
             CoreMatchers.equalTo(true));
       }
       deleteTestNotebook(driver);
@@ -438,29 +347,18 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
     try {
       createNewNote();
       waitForParagraph(1, "READY");
-      Float height =
-          Float.valueOf(
-              driver
-                  .findElement(By.xpath("//div[contains(@class,'ace_content')]"))
-                  .getCssValue("height")
-                  .replace("px", ""));
+      Float height = Float.valueOf(driver.findElement(By.xpath("//div[contains(@class,'ace_content')]"))
+          .getCssValue("height").replace("px", ""));
       for (Integer newFontSize = 10; newFontSize <= 20; newFontSize++) {
         clickAndWait(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']"));
         String visibleText = newFontSize.toString();
-        new Select(
-                driver.findElement(
-                    By.xpath(
-                        getParagraphXPath(1)
-                            + "//ul/li/a/select[(@ng-model='paragraph.config.fontSize')]")))
-            .selectByVisibleText(visibleText);
-        Float newHeight =
-            Float.valueOf(
-                driver
-                    .findElement(By.xpath("//div[contains(@class,'ace_content')]"))
-                    .getCssValue("height")
-                    .replace("px", ""));
-        collector.checkThat(
-            "New Font size is : " + newFontSize, newHeight > height, CoreMatchers.equalTo(true));
+        new Select(driver.findElement(By.xpath(getParagraphXPath(1)
+            + "//ul/li/a/select[(@ng-model='paragraph.config.fontSize')]"))).selectByVisibleText(visibleText);
+        Float newHeight = Float.valueOf(driver.findElement(By.xpath("//div[contains(@class,'ace_content')]"))
+            .getCssValue("height").replace("px", ""));
+        collector.checkThat("New Font size is : " + newFontSize,
+            newHeight > height,
+            CoreMatchers.equalTo(true));
         height = newHeight;
       }
       deleteTestNotebook(driver);
@@ -478,70 +376,55 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
 
       String xpathToTitle = getParagraphXPath(1) + "//div[contains(@class, 'title')]/div";
       String xpathToSettingIcon = getParagraphXPath(1) + "//span[@class='icon-settings']";
-      String xpathToShowTitle =
-          getParagraphXPath(1) + "//ul/li/a[@ng-show='!paragraph.config.title']";
-      String xpathToHideTitle =
-          getParagraphXPath(1) + "//ul/li/a[@ng-show='paragraph.config.title']";
+      String xpathToShowTitle = getParagraphXPath(1) + "//ul/li/a[@ng-show='!paragraph.config.title']";
+      String xpathToHideTitle = getParagraphXPath(1) + "//ul/li/a[@ng-show='paragraph.config.title']";
 
       ZeppelinITUtils.turnOffImplicitWaits(driver);
       Integer titleElems = driver.findElements(By.xpath(xpathToTitle)).size();
-      collector.checkThat(
-          "Before Show Title : The title doesn't exist", titleElems, CoreMatchers.equalTo(0));
+      collector.checkThat("Before Show Title : The title doesn't exist",
+          titleElems,
+          CoreMatchers.equalTo(0));
       ZeppelinITUtils.turnOnImplicitWaits(driver);
 
       clickAndWait(By.xpath(xpathToSettingIcon));
-      collector.checkThat(
-          "Before Show Title : The title option in option panel of paragraph is labeled as",
+      collector.checkThat("Before Show Title : The title option in option panel of paragraph is labeled as",
           driver.findElement(By.xpath(xpathToShowTitle)).getText(),
-          CoreMatchers.allOf(
-              CoreMatchers.endsWith("Show title"),
-              CoreMatchers.containsString("Ctrl+"),
-              CoreMatchers.anyOf(
-                  CoreMatchers.containsString("Option"), CoreMatchers.containsString("Alt")),
+          CoreMatchers.allOf(CoreMatchers.endsWith("Show title"), CoreMatchers.containsString("Ctrl+"),
+              CoreMatchers.anyOf(CoreMatchers.containsString("Option"), CoreMatchers.containsString("Alt")),
               CoreMatchers.containsString("+T")));
 
       clickAndWait(By.xpath(xpathToShowTitle));
-      collector.checkThat(
-          "After Show Title : The title field contains",
+      collector.checkThat("After Show Title : The title field contains",
           driver.findElement(By.xpath(xpathToTitle)).getText(),
           CoreMatchers.equalTo("Untitled"));
 
       clickAndWait(By.xpath(xpathToSettingIcon));
-      collector.checkThat(
-          "After Show Title : The title option in option panel of paragraph is labeled as",
+      collector.checkThat("After Show Title : The title option in option panel of paragraph is labeled as",
           driver.findElement(By.xpath(xpathToHideTitle)).getText(),
-          CoreMatchers.allOf(
-              CoreMatchers.endsWith("Hide title"),
-              CoreMatchers.containsString("Ctrl+"),
-              CoreMatchers.anyOf(
-                  CoreMatchers.containsString("Option"), CoreMatchers.containsString("Alt")),
+          CoreMatchers.allOf(CoreMatchers.endsWith("Hide title"), CoreMatchers.containsString("Ctrl+"),
+              CoreMatchers.anyOf(CoreMatchers.containsString("Option"), CoreMatchers.containsString("Alt")),
               CoreMatchers.containsString("+T")));
 
       clickAndWait(By.xpath(xpathToHideTitle));
       ZeppelinITUtils.turnOffImplicitWaits(driver);
       titleElems = driver.findElements(By.xpath(xpathToTitle)).size();
-      collector.checkThat(
-          "After Hide Title : The title field is hidden", titleElems, CoreMatchers.equalTo(0));
+      collector.checkThat("After Hide Title : The title field is hidden",
+          titleElems,
+          CoreMatchers.equalTo(0));
       ZeppelinITUtils.turnOnImplicitWaits(driver);
 
       driver.findElement(By.xpath(xpathToSettingIcon)).click();
       driver.findElement(By.xpath(xpathToShowTitle)).click();
 
-      driver
-          .findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'title')]"))
-          .click();
-      driver
-          .findElement(By.xpath(getParagraphXPath(1) + "//input"))
-          .sendKeys("NEW TITLE" + Keys.ENTER);
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'title')]")).click();
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//input")).sendKeys("NEW TITLE" + Keys.ENTER);
       ZeppelinITUtils.sleep(500, false);
-      collector.checkThat(
-          "After Editing the Title : The title field contains ",
+      collector.checkThat("After Editing the Title : The title field contains ",
           driver.findElement(By.xpath(xpathToTitle)).getText(),
           CoreMatchers.equalTo("NEW TITLE"));
       driver.navigate().refresh();
       ZeppelinITUtils.sleep(1000, false);
-      collector.checkThat(
-          "After Page Refresh : The title field contains ",
+      collector.checkThat("After Page Refresh : The title field contains ",
           driver.findElement(By.xpath(xpathToTitle)).getText(),
           CoreMatchers.equalTo("NEW TITLE"));
       deleteTestNotebook(driver);
@@ -549,6 +432,7 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
     } catch (Exception e) {
       handleException("Exception in ParagraphActionsIT while testTitleButton  ", e);
     }
+
   }
 
   @Test
@@ -557,49 +441,36 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
       createNewNote();
 
       waitForParagraph(1, "READY");
-      String xpathToLineNumberField =
-          getParagraphXPath(1) + "//div[contains(@class, 'ace_gutter-layer')]";
-      String xpathToShowLineNumberButton =
-          getParagraphXPath(1) + "//ul/li/a[@ng-click='showLineNumbers(paragraph)']";
-      String xpathToHideLineNumberButton =
-          getParagraphXPath(1) + "//ul/li/a[@ng-click='hideLineNumbers(paragraph)']";
-
-      collector.checkThat(
-          "Before \"Show line number\" the Line Number is Enabled ",
+      String xpathToLineNumberField = getParagraphXPath(1) + "//div[contains(@class, 'ace_gutter-layer')]";
+      String xpathToShowLineNumberButton = getParagraphXPath(1) + "//ul/li/a[@ng-click='showLineNumbers(paragraph)']";
+      String xpathToHideLineNumberButton = getParagraphXPath(1) + "//ul/li/a[@ng-click='hideLineNumbers(paragraph)']";
+
+      collector.checkThat("Before \"Show line number\" the Line Number is Enabled ",
           driver.findElement(By.xpath(xpathToLineNumberField)).isDisplayed(),
           CoreMatchers.equalTo(false));
 
       driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      collector.checkThat(
-          "Before \"Show line number\" The option panel in paragraph has button labeled ",
+      collector.checkThat("Before \"Show line number\" The option panel in paragraph has button labeled ",
           driver.findElement(By.xpath(xpathToShowLineNumberButton)).getText(),
-          CoreMatchers.allOf(
-              CoreMatchers.endsWith("Show line numbers"),
-              CoreMatchers.containsString("Ctrl+"),
-              CoreMatchers.anyOf(
-                  CoreMatchers.containsString("Option"), CoreMatchers.containsString("Alt")),
+          CoreMatchers.allOf(CoreMatchers.endsWith("Show line numbers"), CoreMatchers.containsString("Ctrl+"),
+              CoreMatchers.anyOf(CoreMatchers.containsString("Option"), CoreMatchers.containsString("Alt")),
               CoreMatchers.containsString("+M")));
 
+
       clickAndWait(By.xpath(xpathToShowLineNumberButton));
-      collector.checkThat(
-          "After \"Show line number\" the Line Number is Enabled ",
+      collector.checkThat("After \"Show line number\" the Line Number is Enabled ",
           driver.findElement(By.xpath(xpathToLineNumberField)).isDisplayed(),
           CoreMatchers.equalTo(true));
 
       clickAndWait(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']"));
-      collector.checkThat(
-          "After \"Show line number\" The option panel in paragraph has button labeled ",
+      collector.checkThat("After \"Show line number\" The option panel in paragraph has button labeled ",
           driver.findElement(By.xpath(xpathToHideLineNumberButton)).getText(),
-          CoreMatchers.allOf(
-              CoreMatchers.endsWith("Hide line numbers"),
-              CoreMatchers.containsString("Ctrl+"),
-              CoreMatchers.anyOf(
-                  CoreMatchers.containsString("Option"), CoreMatchers.containsString("Alt")),
+          CoreMatchers.allOf(CoreMatchers.endsWith("Hide line numbers"), CoreMatchers.containsString("Ctrl+"),
+              CoreMatchers.anyOf(CoreMatchers.containsString("Option"), CoreMatchers.containsString("Alt")),
               CoreMatchers.containsString("+M")));
 
       clickAndWait(By.xpath(xpathToHideLineNumberButton));
-      collector.checkThat(
-          "After \"Hide line number\" the Line Number is Enabled",
+      collector.checkThat("After \"Hide line number\" the Line Number is Enabled",
           driver.findElement(By.xpath(xpathToLineNumberField)).isDisplayed(),
           CoreMatchers.equalTo(false));
       deleteTestNotebook(driver);
@@ -609,7 +480,7 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
     }
   }
 
-  //  @Test
+//  @Test
   public void testEditOnDoubleClick() throws Exception {
     try {
       createNewNote();
@@ -626,24 +497,12 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
 
-      collector.checkThat(
-          "Markdown editor is hidden after run ",
-          driver
-              .findElements(
-                  By.xpath(
-                      getParagraphXPath(1)
-                          + "//div[contains(@ng-if, 'paragraph.config.editorHide')]"))
-              .size(),
+      collector.checkThat("Markdown editor is hidden after run ",
+          driver.findElements(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-if, 'paragraph.config.editorHide')]")).size(),
           CoreMatchers.equalTo(0));
 
-      collector.checkThat(
-          "Markdown editor is shown after run ",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1)
-                          + "//div[contains(@ng-show, 'paragraph.config.tableHide')]"))
-              .isDisplayed(),
+      collector.checkThat("Markdown editor is shown after run ",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-show, 'paragraph.config.tableHide')]")).isDisplayed(),
           CoreMatchers.equalTo(true));
 
       // to check if editOnDblClick field is fetched correctly after refresh
@@ -652,24 +511,12 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
 
       action.doubleClick(driver.findElement(By.xpath(getParagraphXPath(1)))).perform();
       ZeppelinITUtils.sleep(1000, false);
-      collector.checkThat(
-          "Markdown editor is shown after double click ",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1)
-                          + "//div[contains(@ng-if, 'paragraph.config.editorHide')]"))
-              .isDisplayed(),
+      collector.checkThat("Markdown editor is shown after double click ",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-if, 'paragraph.config.editorHide')]")).isDisplayed(),
           CoreMatchers.equalTo(true));
 
-      collector.checkThat(
-          "Markdown editor is hidden after double click ",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1)
-                          + "//div[contains(@ng-show, 'paragraph.config.tableHide')]"))
-              .isDisplayed(),
+      collector.checkThat("Markdown editor is hidden after double click ",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-show, 'paragraph.config.tableHide')]")).isDisplayed(),
           CoreMatchers.equalTo(false));
 
       deleteTestNotebook(driver);
@@ -688,37 +535,22 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
 
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
-      collector.checkThat(
-          "Output text is equal to value specified initially",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
-          CoreMatchers.equalTo("Hello world"));
+      collector.checkThat("Output text is equal to value specified initially",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Hello world"));
 
       driver.findElement(By.xpath(getParagraphXPath(1) + "//input")).clear();
       driver.findElement(By.xpath(getParagraphXPath(1) + "//input")).sendKeys("Zeppelin");
 
-      collector.checkThat(
-          "After new data in text input form, output should not be changed",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
-          CoreMatchers.equalTo("Hello world"));
+      collector.checkThat("After new data in text input form, output should not be changed",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Hello world"));
 
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
-      collector.checkThat(
-          "Only after running the paragraph, we can see the newly updated output",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
-          CoreMatchers.equalTo("Hello Zeppelin"));
+      collector.checkThat("Only after running the paragraph, we can see the newly updated output",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Hello Zeppelin"));
 
       deleteTestNotebook(driver);
 
@@ -732,50 +564,30 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
     try {
       createNewNote();
 
-      setTextOfParagraph(
-          1,
-          "%spark println(\"Howdy \"+z.select(\"names\", Seq((\"1\",\"Alice\"), "
-              + "(\"2\",\"Bob\"),(\"3\",\"stranger\"))))");
+      setTextOfParagraph(1, "%spark println(\"Howdy \"+z.select(\"names\", Seq((\"1\",\"Alice\"), " +
+              "(\"2\",\"Bob\"),(\"3\",\"stranger\"))))");
 
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
-      collector.checkThat(
-          "Output text should not display any of the options in select form",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
-          CoreMatchers.equalTo("Howdy 1"));
-
-      Select dropDownMenu =
-          new Select(driver.findElement(By.xpath("(" + (getParagraphXPath(1) + "//select)[1]"))));
+      collector.checkThat("Output text should not display any of the options in select form",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Howdy 1"));
+
+      Select dropDownMenu = new Select(driver.findElement(By.xpath("(" + (getParagraphXPath(1) + "//select)[1]"))));
 
       dropDownMenu.selectByVisibleText("Alice");
-      collector.checkThat(
-          "After selection in drop down menu, output should display the newly selected option",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
-          CoreMatchers.equalTo("Howdy 1"));
+      collector.checkThat("After selection in drop down menu, output should display the newly selected option",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Howdy 1"));
 
       driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      clickAndWait(
-          By.xpath(getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-checked, 'true')]"));
+      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-checked, 'true')]"));
 
-      Select sameDropDownMenu =
-          new Select(driver.findElement(By.xpath("(" + (getParagraphXPath(1) + "//select)[1]"))));
+      Select sameDropDownMenu = new Select(driver.findElement(By.xpath("(" + (getParagraphXPath(1) + "//select)[1]"))));
       sameDropDownMenu.selectByVisibleText("Bob");
-      collector.checkThat(
-          "After 'Run on selection change' checkbox is unchecked, the paragraph should not run if selecting a different option",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
-          CoreMatchers.equalTo("Howdy 1"));
+      collector.checkThat("After 'Run on selection change' checkbox is unchecked, the paragraph should not run if selecting a different option",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Howdy 1"));
 
       deleteTestNotebook(driver);
 
@@ -789,60 +601,38 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
     try {
       createNewNote();
 
-      setTextOfParagraph(
-          1,
-          "%spark val options = Seq((\"han\",\"Han\"), (\"leia\",\"Leia\"), "
-              + "(\"luke\",\"Luke\")); println(\"Greetings \"+z.checkbox(\"skywalkers\",options).mkString(\" and \"))");
+      setTextOfParagraph(1, "%spark val options = Seq((\"han\",\"Han\"), (\"leia\",\"Leia\"), " +
+              "(\"luke\",\"Luke\")); println(\"Greetings \"+z.checkbox(\"skywalkers\",options).mkString(\" and \"))");
 
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
-      collector.checkThat(
-          "Output text should display all of the options included in check boxes",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
-          CoreMatchers.containsString("Greetings han and leia and luke"));
+      collector.checkThat("Output text should display all of the options included in check boxes",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.containsString("Greetings han and leia and luke"));
 
-      WebElement firstCheckbox =
-          driver.findElement(
-              By.xpath("(" + getParagraphXPath(1) + "//input[@type='checkbox'])[1]"));
+      WebElement firstCheckbox = driver.findElement(By.xpath("(" + getParagraphXPath(1) + "//input[@type='checkbox'])[1]"));
       firstCheckbox.click();
-      collector.checkThat(
-          "After unchecking one of the boxes, we can see the newly updated output without the option we unchecked",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
-          CoreMatchers.containsString("Greetings leia and luke"));
+      collector.checkThat("After unchecking one of the boxes, we can see the newly updated output without the option we unchecked",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.containsString("Greetings leia and luke"));
 
       driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      clickAndWait(
-          By.xpath(getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-checked, 'true')]"));
+      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-checked, 'true')]"));
 
-      WebElement secondCheckbox =
-          driver.findElement(
-              By.xpath("(" + getParagraphXPath(1) + "//input[@type='checkbox'])[2]"));
+      WebElement secondCheckbox = driver.findElement(By.xpath("(" + getParagraphXPath(1) + "//input[@type='checkbox'])[2]"));
       secondCheckbox.click();
-      collector.checkThat(
-          "After 'Run on selection change' checkbox is unchecked, the paragraph should not run if check box state is modified",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
-          CoreMatchers.containsString("Greetings leia and luke"));
+      collector.checkThat("After 'Run on selection change' checkbox is unchecked, the paragraph should not run if check box state is modified",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.containsString("Greetings leia and luke"));
 
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
 
+
       deleteTestNotebook(driver);
 
     } catch (Exception e) {
-      handleException(
-          "Exception in ParagraphActionsIT while testSingleDynamicFormCheckboxForm  ", e);
+      handleException("Exception in ParagraphActionsIT while testSingleDynamicFormCheckboxForm  ", e);
     }
   }
 
@@ -851,57 +641,36 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
     try {
       createNewNote();
 
-      setTextOfParagraph(
-          1,
-          "%spark println(\"Howdy \"+z.select(\"fruits\", Seq((\"1\",\"Apple\"),"
-              + "(\"2\",\"Orange\"),(\"3\",\"Peach\")))); println(\"Howdy \"+z.select(\"planets\", "
-              + "Seq((\"1\",\"Venus\"),(\"2\",\"Earth\"),(\"3\",\"Mars\"))))");
+      setTextOfParagraph(1, "%spark println(\"Howdy \"+z.select(\"fruits\", Seq((\"1\",\"Apple\")," +
+              "(\"2\",\"Orange\"),(\"3\",\"Peach\")))); println(\"Howdy \"+z.select(\"planets\", " +
+              "Seq((\"1\",\"Venus\"),(\"2\",\"Earth\"),(\"3\",\"Mars\"))))");
 
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
-      collector.checkThat(
-          "Output text should not display any of the options in select form",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
-          CoreMatchers.equalTo("Howdy 1\nHowdy 1"));
-
-      Select dropDownMenu =
-          new Select(driver.findElement(By.xpath("(" + (getParagraphXPath(1) + "//select)[1]"))));
+      collector.checkThat("Output text should not display any of the options in select form",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Howdy 1\nHowdy 1"));
+
+      Select dropDownMenu = new Select(driver.findElement(By.xpath("(" + (getParagraphXPath(1) + "//select)[1]"))));
       dropDownMenu.selectByVisibleText("Apple");
-      collector.checkThat(
-          "After selection in drop down menu, output should display the new option we selected",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
-          CoreMatchers.equalTo("Howdy 1\nHowdy 1"));
+      collector.checkThat("After selection in drop down menu, output should display the new option we selected",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Howdy 1\nHowdy 1"));
 
       driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      clickAndWait(
-          By.xpath(getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-checked, 'true')]"));
+      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-checked, 'true')]"));
 
-      Select sameDropDownMenu =
-          new Select(driver.findElement(By.xpath("(" + (getParagraphXPath(1) + "//select)[2]"))));
+      Select sameDropDownMenu = new Select(driver.findElement(By.xpath("(" + (getParagraphXPath(1) + "//select)[2]"))));
       sameDropDownMenu.selectByVisibleText("Earth");
       waitForParagraph(1, "FINISHED");
-      collector.checkThat(
-          "After 'Run on selection change' checkbox is unchecked, the paragraph should not run if selecting a different option",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
-          CoreMatchers.equalTo("Howdy 1\nHowdy 1"));
+      collector.checkThat("After 'Run on selection change' checkbox is unchecked, the paragraph should not run if selecting a different option",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Howdy 1\nHowdy 1"));
 
       deleteTestNotebook(driver);
 
     } catch (Exception e) {
-      handleException(
-          "Exception in ParagraphActionsIT while testMultipleDynamicFormsSameType  ", e);
+      handleException("Exception in ParagraphActionsIT while testMultipleDynamicFormsSameType  ", e);
     }
   }
 
@@ -914,49 +683,27 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
 
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
-      collector.checkThat(
-          "Output text is equal to value specified initially",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
-          CoreMatchers.equalTo("Hello world"));
+      collector.checkThat("Output text is equal to value specified initially", driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(), CoreMatchers.equalTo("Hello world"));
       driver.findElement(By.xpath(getNoteFormsXPath() + "//input")).clear();
       driver.findElement(By.xpath(getNoteFormsXPath() + "//input")).sendKeys("Zeppelin");
       driver.findElement(By.xpath(getNoteFormsXPath() + "//input")).sendKeys(Keys.RETURN);
 
-      collector.checkThat(
-          "After new data in text input form, output should not be changed",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("After new data in text input form, output should not be changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.equalTo("Hello world"));
 
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
-      collector.checkThat(
-          "Only after running the paragraph, we can see the newly updated output",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("Only after running the paragraph, we can see the newly updated output",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.equalTo("Hello Zeppelin"));
 
       setTextOfParagraph(2, "%spark println(\"Hello \"+z.noteTextbox(\"name\", \"world\")) ");
       runParagraph(2);
       waitForParagraph(2, "FINISHED");
-      collector.checkThat(
-          "Running the another paragraph with same form, we can see value from note form",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
-          CoreMatchers.equalTo("Hello Zeppelin"));
+      collector.checkThat("Running the another paragraph with same form, we can see value from note form",
+      driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+      CoreMatchers.equalTo("Hello Zeppelin"));
 
       deleteTestNotebook(driver);
 
@@ -970,62 +717,37 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
     try {
       createNewNote();
 
-      setTextOfParagraph(
-          1,
-          "%spark println(\"Howdy \"+z.noteSelect(\"names\", Seq((\"1\",\"Alice\"), "
-              + "(\"2\",\"Bob\"),(\"3\",\"stranger\"))))");
+      setTextOfParagraph(1, "%spark println(\"Howdy \"+z.noteSelect(\"names\", Seq((\"1\",\"Alice\"), " +
+          "(\"2\",\"Bob\"),(\"3\",\"stranger\"))))");
 
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
-      collector.checkThat(
-          "Output text should not display any of the options in select form",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("Output text should not display any of the options in select form",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.equalTo("Howdy "));
 
-      Select dropDownMenu =
-          new Select(driver.findElement(By.xpath("(" + (getNoteFormsXPath() + "//select)[1]"))));
+      Select dropDownMenu = new Select(driver.findElement(By.xpath("(" + (getNoteFormsXPath() + "//select)[1]"))));
 
       dropDownMenu.selectByVisibleText("Bob");
-      collector.checkThat(
-          "After selection in drop down menu, output should not be changed",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("After selection in drop down menu, output should not be changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.equalTo("Howdy "));
 
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
 
-      collector.checkThat(
-          "After run paragraph again, we can see the newly updated output",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("After run paragraph again, we can see the newly updated output",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.equalTo("Howdy 2"));
 
-      setTextOfParagraph(
-          2,
-          "%spark println(\"Howdy \"+z.noteSelect(\"names\", Seq((\"1\",\"Alice\"), "
-              + "(\"2\",\"Bob\"),(\"3\",\"stranger\"))))");
+      setTextOfParagraph(2, "%spark println(\"Howdy \"+z.noteSelect(\"names\", Seq((\"1\",\"Alice\"), " +
+          "(\"2\",\"Bob\"),(\"3\",\"stranger\"))))");
 
       runParagraph(2);
       waitForParagraph(2, "FINISHED");
 
-      collector.checkThat(
-          "Running the another paragraph with same form, we can see value from note form",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("Running the another paragraph with same form, we can see value from note form",
+          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.equalTo("Howdy 2"));
 
       deleteTestNotebook(driver);
@@ -1040,61 +762,36 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
     try {
       createNewNote();
 
-      setTextOfParagraph(
-          1,
-          "%spark val options = Seq((\"han\",\"Han\"), (\"leia\",\"Leia\"), "
-              + "(\"luke\",\"Luke\")); println(\"Greetings \"+z.noteCheckbox(\"skywalkers\",options).mkString(\" and \"))");
+      setTextOfParagraph(1, "%spark val options = Seq((\"han\",\"Han\"), (\"leia\",\"Leia\"), " +
+          "(\"luke\",\"Luke\")); println(\"Greetings \"+z.noteCheckbox(\"skywalkers\",options).mkString(\" and \"))");
 
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
-      collector.checkThat(
-          "Output text should display all of the options included in check boxes",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("Output text should display all of the options included in check boxes",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.containsString("Greetings han and leia and luke"));
 
-      WebElement firstCheckbox =
-          driver.findElement(By.xpath("(" + getNoteFormsXPath() + "//input[@type='checkbox'])[1]"));
+      WebElement firstCheckbox = driver.findElement(By.xpath("(" + getNoteFormsXPath() + "//input[@type='checkbox'])[1]"));
       firstCheckbox.click();
-      collector.checkThat(
-          "After unchecking one of the boxes, output should not be changed",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("After unchecking one of the boxes, output should not be changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.containsString("Greetings han and leia and luke"));
 
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
 
-      collector.checkThat(
-          "After run paragraph again, we can see the newly updated output",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("After run paragraph again, we can see the newly updated output",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.containsString("Greetings leia and luke"));
 
-      setTextOfParagraph(
-          2,
-          "%spark val options = Seq((\"han\",\"Han\"), (\"leia\",\"Leia\"), "
-              + "(\"luke\",\"Luke\")); println(\"Greetings \"+z.noteCheckbox(\"skywalkers\",options).mkString(\" and \"))");
+      setTextOfParagraph(2, "%spark val options = Seq((\"han\",\"Han\"), (\"leia\",\"Leia\"), " +
+          "(\"luke\",\"Luke\")); println(\"Greetings \"+z.noteCheckbox(\"skywalkers\",options).mkString(\" and \"))");
 
       runParagraph(2);
       waitForParagraph(2, "FINISHED");
 
-      collector.checkThat(
-          "Running the another paragraph with same form, we can see value from note form",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("Running the another paragraph with same form, we can see value from note form",
+          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.containsString("Greetings leia and luke"));
 
       deleteTestNotebook(driver);
@@ -1109,28 +806,19 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
     try {
       createNewNote();
 
-      setTextOfParagraph(
-          1,
-          "%spark println(z.noteTextbox(\"name\", \"note\") + \" \" + z.textbox(\"name\", \"paragraph\")) ");
+      setTextOfParagraph(1, "%spark println(z.noteTextbox(\"name\", \"note\") + \" \" + z.textbox(\"name\", \"paragraph\")) ");
 
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
 
-      collector.checkThat(
-          "After run paragraph, we can see computed output from two forms",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("After run paragraph, we can see computed output from two forms",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.equalTo("note paragraph"));
 
       deleteTestNotebook(driver);
 
     } catch (Exception e) {
-      handleException(
-          "Exception in ParagraphActionsIT while testWithNoteAndParagraphDynamicFormTextInput  ",
-          e);
+      handleException("Exception in ParagraphActionsIT while testWithNoteAndParagraphDynamicFormTextInput  ", e);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java
index 6cf5c6a..3133564 100644
--- a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java
@@ -16,11 +16,9 @@
  */
 package org.apache.zeppelin.integration;
 
-import java.io.File;
-import java.io.IOException;
-import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.AbstractZeppelinIT;
+import org.apache.zeppelin.integration.AuthenticationIT;
 import org.apache.zeppelin.WebDriverManager;
 import org.apache.zeppelin.ZeppelinITUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
@@ -30,43 +28,50 @@ import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ErrorCollector;
+
 import org.openqa.selenium.By;
-import org.openqa.selenium.TimeoutException;
 import org.openqa.selenium.WebElement;
-import org.openqa.selenium.support.ui.ExpectedConditions;
 import org.openqa.selenium.support.ui.WebDriverWait;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.TimeoutException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.commons.io.FileUtils;
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import static org.junit.Assert.assertTrue;
+
 public class PersonalizeActionsIT extends AbstractZeppelinIT {
   private static final Logger LOG = LoggerFactory.getLogger(PersonalizeActionsIT.class);
 
-  @Rule public ErrorCollector collector = new ErrorCollector();
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
   static String shiroPath;
-  static String authShiro =
-      "[users]\n"
-          + "admin = password1, admin\n"
-          + "user1 = password2, user\n"
-          + "[main]\n"
-          + "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n"
-          + "securityManager.sessionManager = $sessionManager\n"
-          + "securityManager.sessionManager.globalSessionTimeout = 86400000\n"
-          + "shiro.loginUrl = /api/login\n"
-          + "[roles]\n"
-          + "admin = *\n"
-          + "user = *\n"
-          + "[urls]\n"
-          + "/api/version = anon\n"
-          + "/** = authc";
+  static String authShiro = "[users]\n" +
+      "admin = password1, admin\n" +
+      "user1 = password2, user\n" +
+      "[main]\n" +
+      "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n" +
+      "securityManager.sessionManager = $sessionManager\n" +
+      "securityManager.sessionManager.globalSessionTimeout = 86400000\n" +
+      "shiro.loginUrl = /api/login\n" +
+      "[roles]\n" +
+      "admin = *\n" +
+      "user = *\n" +
+      "[urls]\n" +
+      "/api/version = anon\n" +
+      "/** = authc";
 
   static String originalShiro = "";
 
   @BeforeClass
   public static void startUp() {
     try {
-      System.setProperty(
-          ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(),
-          new File("../").getAbsolutePath());
+      System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(), new File("../").getAbsolutePath());
       ZeppelinConfiguration conf = ZeppelinConfiguration.create();
       shiroPath = conf.getRelativeDir(String.format("%s/shiro.ini", conf.getConfDir()));
       File file = new File(shiroPath);
@@ -112,9 +117,8 @@ public class PersonalizeActionsIT extends AbstractZeppelinIT {
       AuthenticationIT authenticationIT = new AuthenticationIT();
       PersonalizeActionsIT personalizeActionsIT = new PersonalizeActionsIT();
       authenticationIT.authenticationUser("admin", "password1");
-      By locator =
-          By.xpath(
-              "//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" + " note')]");
+      By locator = By.xpath("//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" +
+          " note')]");
       WebDriverWait wait = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
       WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
@@ -123,23 +127,13 @@ public class PersonalizeActionsIT extends AbstractZeppelinIT {
       String noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
       waitForParagraph(1, "READY");
       personalizeActionsIT.setParagraphText("Before");
-      collector.checkThat(
-          "The output field paragraph contains",
-          driver
-              .findElement(
-                  By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]"))
-              .getText(),
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]")).getText(),
           CoreMatchers.equalTo("Before"));
-      pollingWait(
-              By.xpath(
-                  "//*[@id='actionbar']"
-                      + "//button[contains(@uib-tooltip, 'Switch to personal mode')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .click();
-      clickAndWait(
-          By.xpath(
-              "//div[@class='modal-dialog'][contains(.,'Do you want to personalize your analysis?')"
-                  + "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
+      pollingWait(By.xpath("//*[@id='actionbar']" +
+          "//button[contains(@uib-tooltip, 'Switch to personal mode')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to personalize your analysis?')" +
+          "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
       authenticationIT.logoutUser("admin");
 
       // step 2 : (user1) make sure it is on personalized mode and 'Before' in result of paragraph
@@ -148,28 +142,17 @@ public class PersonalizeActionsIT extends AbstractZeppelinIT {
       wait = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
       element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        pollingWait(
-                By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
-                MAX_BROWSER_TIMEOUT_SEC)
-            .click();
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
       }
-      collector.checkThat(
-          "The personalized mode enables",
-          driver
-              .findElement(
-                  By.xpath(
-                      "//*[@id='actionbar']"
-                          + "//button[contains(@class, 'btn btn-default btn-xs ng-scope ng-hide')]"))
-              .getAttribute("uib-tooltip"),
+      collector.checkThat("The personalized mode enables",
+          driver.findElement(By.xpath("//*[@id='actionbar']" +
+              "//button[contains(@class, 'btn btn-default btn-xs ng-scope ng-hide')]")).getAttribute("uib-tooltip"),
           CoreMatchers.equalTo("Switch to personal mode (owner can change)"));
       waitForParagraph(1, "READY");
       runParagraph(1);
-      collector.checkThat(
-          "The output field paragraph contains",
-          driver
-              .findElement(
-                  By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]"))
-              .getText(),
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]")).getText(),
           CoreMatchers.equalTo("Before"));
       authenticationIT.logoutUser("user1");
 
@@ -178,19 +161,12 @@ public class PersonalizeActionsIT extends AbstractZeppelinIT {
       locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
       element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        pollingWait(
-                By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
-                MAX_BROWSER_TIMEOUT_SEC)
-            .click();
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"), MAX_BROWSER_TIMEOUT_SEC).click();
       }
       waitForParagraph(1, "FINISHED");
       personalizeActionsIT.setParagraphText("After");
-      collector.checkThat(
-          "The output field paragraph contains",
-          driver
-              .findElement(
-                  By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]"))
-              .getText(),
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]")).getText(),
           CoreMatchers.equalTo("After"));
       authenticationIT.logoutUser("admin");
 
@@ -199,17 +175,10 @@ public class PersonalizeActionsIT extends AbstractZeppelinIT {
       locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
       element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        pollingWait(
-                By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
-                MAX_BROWSER_TIMEOUT_SEC)
-            .click();
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"), MAX_BROWSER_TIMEOUT_SEC).click();
       }
-      collector.checkThat(
-          "The output field paragraph contains",
-          driver
-              .findElement(
-                  By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]"))
-              .getText(),
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]")).getText(),
           CoreMatchers.equalTo("Before"));
       authenticationIT.logoutUser("user1");
     } catch (Exception e) {
@@ -220,58 +189,42 @@ public class PersonalizeActionsIT extends AbstractZeppelinIT {
   @Test
   public void testGraphAction() throws Exception {
     try {
-      // step 1 : (admin) create a new note, run a paragraph, change active graph to 'Bar chart',
-      // turn on personalized mode
+      // step 1 : (admin) create a new note, run a paragraph, change active graph to 'Bar chart', turn on personalized mode
       AuthenticationIT authenticationIT = new AuthenticationIT();
       authenticationIT.authenticationUser("admin", "password1");
-      By locator =
-          By.xpath(
-              "//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" + " note')]");
+      By locator = By.xpath("//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" +
+          " note')]");
       WebDriverWait wait = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
       WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
         createNewNote();
       }
       String noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
-      setTextOfParagraph(
-          1, "print(s\"\"\"%table\\n" + "name\\tsize\\n" + "sun\\t100\\n" + "moon\\t10\"\"\")");
+      setTextOfParagraph(1, "print(s\"\"\"%table\\n" +
+          "name\\tsize\\n" +
+          "sun\\t100\\n" +
+          "moon\\t10\"\"\")");
 
       runParagraph(1);
       try {
         waitForParagraph(1, "FINISHED");
       } catch (TimeoutException e) {
         waitForParagraph(1, "ERROR");
-        collector.checkThat(
-            "Exception in PersonalizeActionsIT while testGraphAction, status of 1st Spark Paragraph ",
-            "ERROR",
-            CoreMatchers.equalTo("FINISHED"));
+        collector.checkThat("Exception in PersonalizeActionsIT while testGraphAction, status of 1st Spark Paragraph ",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
       }
 
-      pollingWait(
-              By.xpath(getParagraphXPath(1) + "//button[contains(@uib-tooltip, 'Bar Chart')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .click();
-      collector.checkThat(
-          "The output of graph mode is changed",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1)
-                          + "//button[contains(@class,"
-                          + "'btn btn-default btn-sm ng-binding ng-scope active')]//i"))
-              .getAttribute("class"),
+      pollingWait(By.xpath(getParagraphXPath(1) +
+          "//button[contains(@uib-tooltip, 'Bar Chart')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      collector.checkThat("The output of graph mode is changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//button[contains(@class," +
+              "'btn btn-default btn-sm ng-binding ng-scope active')]//i")).getAttribute("class"),
           CoreMatchers.equalTo("fa fa-bar-chart"));
 
-      pollingWait(
-              By.xpath(
-                  "//*[@id='actionbar']"
-                      + "//button[contains(@uib-tooltip, 'Switch to personal mode')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .click();
-      clickAndWait(
-          By.xpath(
-              "//div[@class='modal-dialog'][contains(.,'Do you want to personalize your analysis?')"
-                  + "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
+      pollingWait(By.xpath("//*[@id='actionbar']" +
+          "//button[contains(@uib-tooltip, 'Switch to personal mode')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to personalize your analysis?')" +
+          "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
       authenticationIT.logoutUser("admin");
 
       // step 2 : (user1) make sure it is on personalized mode and active graph is 'Bar chart',
@@ -280,45 +233,24 @@ public class PersonalizeActionsIT extends AbstractZeppelinIT {
       locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
       element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        pollingWait(
-                By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
-                MAX_BROWSER_TIMEOUT_SEC)
-            .click();
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
       }
-      collector.checkThat(
-          "The personalized mode enables",
-          driver
-              .findElement(
-                  By.xpath(
-                      "//*[@id='actionbar']"
-                          + "//button[contains(@class, 'btn btn-default btn-xs ng-scope ng-hide')]"))
-              .getAttribute("uib-tooltip"),
+      collector.checkThat("The personalized mode enables",
+          driver.findElement(By.xpath("//*[@id='actionbar']" +
+              "//button[contains(@class, 'btn btn-default btn-xs ng-scope ng-hide')]")).getAttribute("uib-tooltip"),
           CoreMatchers.equalTo("Switch to personal mode (owner can change)"));
 
-      collector.checkThat(
-          "Make sure the output of graph mode is",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1)
-                          + "//button[contains(@class,"
-                          + "'btn btn-default btn-sm ng-binding ng-scope active')]//i"))
-              .getAttribute("class"),
+      collector.checkThat("Make sure the output of graph mode is",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//button[contains(@class," +
+              "'btn btn-default btn-sm ng-binding ng-scope active')]//i")).getAttribute("class"),
           CoreMatchers.equalTo("fa fa-bar-chart"));
 
-      pollingWait(
-              By.xpath(getParagraphXPath(1) + "//button[contains(@uib-tooltip, 'Table')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .click();
-      collector.checkThat(
-          "The output of graph mode is not changed",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1)
-                          + "//button[contains(@class,"
-                          + "'btn btn-default btn-sm ng-binding ng-scope active')]//i"))
-              .getAttribute("class"),
+      pollingWait(By.xpath(getParagraphXPath(1) +
+          "//button[contains(@uib-tooltip, 'Table')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      collector.checkThat("The output of graph mode is not changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//button[contains(@class," +
+              "'btn btn-default btn-sm ng-binding ng-scope active')]//i")).getAttribute("class"),
           CoreMatchers.equalTo("fa fa-bar-chart"));
       authenticationIT.logoutUser("user1");
 
@@ -330,13 +262,11 @@ public class PersonalizeActionsIT extends AbstractZeppelinIT {
   @Test
   public void testDynamicFormAction() throws Exception {
     try {
-      // step 1 : (admin) login, create a new note, run a paragraph with data of spark tutorial,
-      // logout.
+      // step 1 : (admin) login, create a new note, run a paragraph with data of spark tutorial, logout.
       AuthenticationIT authenticationIT = new AuthenticationIT();
       authenticationIT.authenticationUser("admin", "password1");
-      By locator =
-          By.xpath(
-              "//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" + " note')]");
+      By locator = By.xpath("//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" +
+          " note')]");
       WebDriverWait wait = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
       WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
@@ -349,29 +279,19 @@ public class PersonalizeActionsIT extends AbstractZeppelinIT {
         waitForParagraph(1, "FINISHED");
       } catch (TimeoutException e) {
         waitForParagraph(1, "ERROR");
-        collector.checkThat(
-            "Exception in PersonalizeActionsIT while testDynamicFormAction, status of 1st Spark Paragraph ",
-            "ERROR",
-            CoreMatchers.equalTo("FINISHED"));
+        collector.checkThat("Exception in PersonalizeActionsIT while testDynamicFormAction, status of 1st Spark Paragraph ",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
       }
 
-      collector.checkThat(
-          "The output of graph mode is changed",
-          driver
-              .findElement(By.xpath(getParagraphXPath(1) + "//input[contains(@name, 'name')]"))
-              .getAttribute("value"),
+      collector.checkThat("The output of graph mode is changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) +
+              "//input[contains(@name, 'name')]")).getAttribute("value"),
           CoreMatchers.equalTo("Before"));
 
-      pollingWait(
-              By.xpath(
-                  "//*[@id='actionbar']"
-                      + "//button[contains(@uib-tooltip, 'Switch to personal mode')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .click();
-      clickAndWait(
-          By.xpath(
-              "//div[@class='modal-dialog'][contains(.,'Do you want to personalize your analysis?')"
-                  + "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
+      pollingWait(By.xpath("//*[@id='actionbar']" +
+          "//button[contains(@uib-tooltip, 'Switch to personal mode')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to personalize your analysis?')" +
+          "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
       authenticationIT.logoutUser("admin");
 
       // step 2 : (user1) make sure it is on personalized mode and  dynamic form value is 'Before',
@@ -380,55 +300,35 @@ public class PersonalizeActionsIT extends AbstractZeppelinIT {
       locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
       element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
       if (element.isDisplayed()) {
-        pollingWait(
-                By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
-                MAX_BROWSER_TIMEOUT_SEC)
-            .click();
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
       }
-      collector.checkThat(
-          "The personalized mode enables",
-          driver
-              .findElement(
-                  By.xpath(
-                      "//*[@id='actionbar']"
-                          + "//button[contains(@class, 'btn btn-default btn-xs ng-scope ng-hide')]"))
-              .getAttribute("uib-tooltip"),
+      collector.checkThat("The personalized mode enables",
+          driver.findElement(By.xpath("//*[@id='actionbar']" +
+              "//button[contains(@class, 'btn btn-default btn-xs ng-scope ng-hide')]")).getAttribute("uib-tooltip"),
           CoreMatchers.equalTo("Switch to personal mode (owner can change)"));
 
-      collector.checkThat(
-          "The output of graph mode is changed",
-          driver
-              .findElement(By.xpath(getParagraphXPath(1) + "//input[contains(@name, 'name')]"))
-              .getAttribute("value"),
+      collector.checkThat("The output of graph mode is changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) +
+              "//input[contains(@name, 'name')]")).getAttribute("value"),
           CoreMatchers.equalTo("Before"));
 
-      pollingWait(
-              By.xpath(getParagraphXPath(1) + "//input[contains(@name, 'name')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .clear();
-      pollingWait(
-              By.xpath(getParagraphXPath(1) + "//input[contains(@name, 'name')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .sendKeys("After");
+      pollingWait(By.xpath(getParagraphXPath(1) +
+          "//input[contains(@name, 'name')]"), MAX_BROWSER_TIMEOUT_SEC).clear();
+      pollingWait(By.xpath(getParagraphXPath(1) +
+          "//input[contains(@name, 'name')]"), MAX_BROWSER_TIMEOUT_SEC).sendKeys("After");
 
       runParagraph(1);
       try {
         waitForParagraph(1, "FINISHED");
       } catch (TimeoutException e) {
         waitForParagraph(1, "ERROR");
-        collector.checkThat(
-            "Exception in PersonalizeActionsIT while testDynamicFormAction, status of 1st Spark Paragraph ",
-            "ERROR",
-            CoreMatchers.equalTo("FINISHED"));
+        collector.checkThat("Exception in PersonalizeActionsIT while testDynamicFormAction, status of 1st Spark Paragraph ",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
       }
 
-      collector.checkThat(
-          "The output of graph mode is changed",
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]"))
-              .getText(),
+      collector.checkThat("The output of graph mode is changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
           CoreMatchers.equalTo("Status: Before"));
       authenticationIT.logoutUser("user1");
 


[25/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterContext.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterContext.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterContext.java
index 96e201a..f1f36fc 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterContext.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterContext.java
@@ -1,89 +1,73 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2018-8-9")
-public class RemoteInterpreterContext
-    implements org.apache.thrift.TBase<RemoteInterpreterContext, RemoteInterpreterContext._Fields>,
-        java.io.Serializable,
-        Cloneable,
-        Comparable<RemoteInterpreterContext> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
-      new org.apache.thrift.protocol.TStruct("RemoteInterpreterContext");
-
-  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "noteId", org.apache.thrift.protocol.TType.STRING, (short) 1);
-  private static final org.apache.thrift.protocol.TField NOTE_NAME_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "noteName", org.apache.thrift.protocol.TType.STRING, (short) 2);
-  private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "paragraphId", org.apache.thrift.protocol.TType.STRING, (short) 3);
-  private static final org.apache.thrift.protocol.TField REPL_NAME_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "replName", org.apache.thrift.protocol.TType.STRING, (short) 4);
-  private static final org.apache.thrift.protocol.TField PARAGRAPH_TITLE_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "paragraphTitle", org.apache.thrift.protocol.TType.STRING, (short) 5);
-  private static final org.apache.thrift.protocol.TField PARAGRAPH_TEXT_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "paragraphText", org.apache.thrift.protocol.TType.STRING, (short) 6);
-  private static final org.apache.thrift.protocol.TField AUTHENTICATION_INFO_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "authenticationInfo", org.apache.thrift.protocol.TType.STRING, (short) 7);
-  private static final org.apache.thrift.protocol.TField CONFIG_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "config", org.apache.thrift.protocol.TType.STRING, (short) 8);
-  private static final org.apache.thrift.protocol.TField GUI_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "gui", org.apache.thrift.protocol.TType.STRING, (short) 9);
-  private static final org.apache.thrift.protocol.TField NOTE_GUI_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "noteGui", org.apache.thrift.protocol.TType.STRING, (short) 10);
-  private static final org.apache.thrift.protocol.TField LOCAL_PROPERTIES_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "localProperties", org.apache.thrift.protocol.TType.MAP, (short) 11);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
-      new HashMap<Class<? extends IScheme>, SchemeFactory>();
-
+public class RemoteInterpreterContext implements org.apache.thrift.TBase<RemoteInterpreterContext, RemoteInterpreterContext._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteInterpreterContext> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteInterpreterContext");
+
+  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("noteId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField NOTE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("noteName", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("paragraphId", org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField REPL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("replName", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField PARAGRAPH_TITLE_FIELD_DESC = new org.apache.thrift.protocol.TField("paragraphTitle", org.apache.thrift.protocol.TType.STRING, (short)5);
+  private static final org.apache.thrift.protocol.TField PARAGRAPH_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("paragraphText", org.apache.thrift.protocol.TType.STRING, (short)6);
+  private static final org.apache.thrift.protocol.TField AUTHENTICATION_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("authenticationInfo", org.apache.thrift.protocol.TType.STRING, (short)7);
+  private static final org.apache.thrift.protocol.TField CONFIG_FIELD_DESC = new org.apache.thrift.protocol.TField("config", org.apache.thrift.protocol.TType.STRING, (short)8);
+  private static final org.apache.thrift.protocol.TField GUI_FIELD_DESC = new org.apache.thrift.protocol.TField("gui", org.apache.thrift.protocol.TType.STRING, (short)9);
+  private static final org.apache.thrift.protocol.TField NOTE_GUI_FIELD_DESC = new org.apache.thrift.protocol.TField("noteGui", org.apache.thrift.protocol.TType.STRING, (short)10);
+  private static final org.apache.thrift.protocol.TField LOCAL_PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("localProperties", org.apache.thrift.protocol.TType.MAP, (short)11);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
     schemes.put(StandardScheme.class, new RemoteInterpreterContextStandardSchemeFactory());
     schemes.put(TupleScheme.class, new RemoteInterpreterContextTupleSchemeFactory());
@@ -99,24 +83,21 @@ public class RemoteInterpreterContext
   public String config; // required
   public String gui; // required
   public String noteGui; // required
-  public Map<String, String> localProperties; // required
+  public Map<String,String> localProperties; // required
 
-  /**
-   * The set of fields this struct contains, along with convenience methods for finding and
-   * manipulating them.
-   */
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    NOTE_ID((short) 1, "noteId"),
-    NOTE_NAME((short) 2, "noteName"),
-    PARAGRAPH_ID((short) 3, "paragraphId"),
-    REPL_NAME((short) 4, "replName"),
-    PARAGRAPH_TITLE((short) 5, "paragraphTitle"),
-    PARAGRAPH_TEXT((short) 6, "paragraphText"),
-    AUTHENTICATION_INFO((short) 7, "authenticationInfo"),
-    CONFIG((short) 8, "config"),
-    GUI((short) 9, "gui"),
-    NOTE_GUI((short) 10, "noteGui"),
-    LOCAL_PROPERTIES((short) 11, "localProperties");
+    NOTE_ID((short)1, "noteId"),
+    NOTE_NAME((short)2, "noteName"),
+    PARAGRAPH_ID((short)3, "paragraphId"),
+    REPL_NAME((short)4, "replName"),
+    PARAGRAPH_TITLE((short)5, "paragraphTitle"),
+    PARAGRAPH_TEXT((short)6, "paragraphText"),
+    AUTHENTICATION_INFO((short)7, "authenticationInfo"),
+    CONFIG((short)8, "config"),
+    GUI((short)9, "gui"),
+    NOTE_GUI((short)10, "noteGui"),
+    LOCAL_PROPERTIES((short)11, "localProperties");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -126,9 +107,11 @@ public class RemoteInterpreterContext
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
     public static _Fields findByThriftId(int fieldId) {
-      switch (fieldId) {
+      switch(fieldId) {
         case 1: // NOTE_ID
           return NOTE_ID;
         case 2: // NOTE_NAME
@@ -156,15 +139,19 @@ public class RemoteInterpreterContext
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null)
-        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
 
-    /** Find the _Fields constant that matches name, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
@@ -188,110 +175,52 @@ public class RemoteInterpreterContext
 
   // isset id assignments
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
-        new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(
-        _Fields.NOTE_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "noteId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.NOTE_NAME,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "noteName",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.PARAGRAPH_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "paragraphId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.REPL_NAME,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "replName",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.PARAGRAPH_TITLE,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "paragraphTitle",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.PARAGRAPH_TEXT,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "paragraphText",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.AUTHENTICATION_INFO,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "authenticationInfo",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.CONFIG,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "config",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.GUI,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "gui",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.NOTE_GUI,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "noteGui",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.LOCAL_PROPERTIES,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "localProperties",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.MapMetaData(
-                org.apache.thrift.protocol.TType.MAP,
-                new org.apache.thrift.meta_data.FieldValueMetaData(
-                    org.apache.thrift.protocol.TType.STRING),
-                new org.apache.thrift.meta_data.FieldValueMetaData(
-                    org.apache.thrift.protocol.TType.STRING))));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.NOTE_ID, new org.apache.thrift.meta_data.FieldMetaData("noteId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.NOTE_NAME, new org.apache.thrift.meta_data.FieldMetaData("noteName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PARAGRAPH_ID, new org.apache.thrift.meta_data.FieldMetaData("paragraphId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.REPL_NAME, new org.apache.thrift.meta_data.FieldMetaData("replName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PARAGRAPH_TITLE, new org.apache.thrift.meta_data.FieldMetaData("paragraphTitle", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PARAGRAPH_TEXT, new org.apache.thrift.meta_data.FieldMetaData("paragraphText", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.AUTHENTICATION_INFO, new org.apache.thrift.meta_data.FieldMetaData("authenticationInfo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.CONFIG, new org.apache.thrift.meta_data.FieldMetaData("config", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.GUI, new org.apache.thrift.meta_data.FieldMetaData("gui", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.NOTE_GUI, new org.apache.thrift.meta_data.FieldMetaData("noteGui", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.LOCAL_PROPERTIES, new org.apache.thrift.meta_data.FieldMetaData("localProperties", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
-        RemoteInterpreterContext.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RemoteInterpreterContext.class, metaDataMap);
   }
 
-  public RemoteInterpreterContext() {}
+  public RemoteInterpreterContext() {
+  }
 
   public RemoteInterpreterContext(
-      String noteId,
-      String noteName,
-      String paragraphId,
-      String replName,
-      String paragraphTitle,
-      String paragraphText,
-      String authenticationInfo,
-      String config,
-      String gui,
-      String noteGui,
-      Map<String, String> localProperties) {
+    String noteId,
+    String noteName,
+    String paragraphId,
+    String replName,
+    String paragraphTitle,
+    String paragraphText,
+    String authenticationInfo,
+    String config,
+    String gui,
+    String noteGui,
+    Map<String,String> localProperties)
+  {
     this();
     this.noteId = noteId;
     this.noteName = noteName;
@@ -306,7 +235,9 @@ public class RemoteInterpreterContext
     this.localProperties = localProperties;
   }
 
-  /** Performs a deep copy on <i>other</i>. */
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
   public RemoteInterpreterContext(RemoteInterpreterContext other) {
     if (other.isSetNoteId()) {
       this.noteId = other.noteId;
@@ -339,8 +270,7 @@ public class RemoteInterpreterContext
       this.noteGui = other.noteGui;
     }
     if (other.isSetLocalProperties()) {
-      Map<String, String> __this__localProperties =
-          new HashMap<String, String>(other.localProperties);
+      Map<String,String> __this__localProperties = new HashMap<String,String>(other.localProperties);
       this.localProperties = __this__localProperties;
     }
   }
@@ -521,9 +451,7 @@ public class RemoteInterpreterContext
     this.authenticationInfo = null;
   }
 
-  /**
-   * Returns true if field authenticationInfo is set (has been assigned a value) and false otherwise
-   */
+  /** Returns true if field authenticationInfo is set (has been assigned a value) and false otherwise */
   public boolean isSetAuthenticationInfo() {
     return this.authenticationInfo != null;
   }
@@ -612,16 +540,16 @@ public class RemoteInterpreterContext
 
   public void putToLocalProperties(String key, String val) {
     if (this.localProperties == null) {
-      this.localProperties = new HashMap<String, String>();
+      this.localProperties = new HashMap<String,String>();
     }
     this.localProperties.put(key, val);
   }
 
-  public Map<String, String> getLocalProperties() {
+  public Map<String,String> getLocalProperties() {
     return this.localProperties;
   }
 
-  public RemoteInterpreterContext setLocalProperties(Map<String, String> localProperties) {
+  public RemoteInterpreterContext setLocalProperties(Map<String,String> localProperties) {
     this.localProperties = localProperties;
     return this;
   }
@@ -630,9 +558,7 @@ public class RemoteInterpreterContext
     this.localProperties = null;
   }
 
-  /**
-   * Returns true if field localProperties is set (has been assigned a value) and false otherwise
-   */
+  /** Returns true if field localProperties is set (has been assigned a value) and false otherwise */
   public boolean isSetLocalProperties() {
     return this.localProperties != null;
   }
@@ -645,256 +571,279 @@ public class RemoteInterpreterContext
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-      case NOTE_ID:
-        if (value == null) {
-          unsetNoteId();
-        } else {
-          setNoteId((String) value);
-        }
-        break;
+    case NOTE_ID:
+      if (value == null) {
+        unsetNoteId();
+      } else {
+        setNoteId((String)value);
+      }
+      break;
 
-      case NOTE_NAME:
-        if (value == null) {
-          unsetNoteName();
-        } else {
-          setNoteName((String) value);
-        }
-        break;
+    case NOTE_NAME:
+      if (value == null) {
+        unsetNoteName();
+      } else {
+        setNoteName((String)value);
+      }
+      break;
 
-      case PARAGRAPH_ID:
-        if (value == null) {
-          unsetParagraphId();
-        } else {
-          setParagraphId((String) value);
-        }
-        break;
+    case PARAGRAPH_ID:
+      if (value == null) {
+        unsetParagraphId();
+      } else {
+        setParagraphId((String)value);
+      }
+      break;
 
-      case REPL_NAME:
-        if (value == null) {
-          unsetReplName();
-        } else {
-          setReplName((String) value);
-        }
-        break;
+    case REPL_NAME:
+      if (value == null) {
+        unsetReplName();
+      } else {
+        setReplName((String)value);
+      }
+      break;
 
-      case PARAGRAPH_TITLE:
-        if (value == null) {
-          unsetParagraphTitle();
-        } else {
-          setParagraphTitle((String) value);
-        }
-        break;
+    case PARAGRAPH_TITLE:
+      if (value == null) {
+        unsetParagraphTitle();
+      } else {
+        setParagraphTitle((String)value);
+      }
+      break;
 
-      case PARAGRAPH_TEXT:
-        if (value == null) {
-          unsetParagraphText();
-        } else {
-          setParagraphText((String) value);
-        }
-        break;
+    case PARAGRAPH_TEXT:
+      if (value == null) {
+        unsetParagraphText();
+      } else {
+        setParagraphText((String)value);
+      }
+      break;
 
-      case AUTHENTICATION_INFO:
-        if (value == null) {
-          unsetAuthenticationInfo();
-        } else {
-          setAuthenticationInfo((String) value);
-        }
-        break;
+    case AUTHENTICATION_INFO:
+      if (value == null) {
+        unsetAuthenticationInfo();
+      } else {
+        setAuthenticationInfo((String)value);
+      }
+      break;
 
-      case CONFIG:
-        if (value == null) {
-          unsetConfig();
-        } else {
-          setConfig((String) value);
-        }
-        break;
+    case CONFIG:
+      if (value == null) {
+        unsetConfig();
+      } else {
+        setConfig((String)value);
+      }
+      break;
 
-      case GUI:
-        if (value == null) {
-          unsetGui();
-        } else {
-          setGui((String) value);
-        }
-        break;
+    case GUI:
+      if (value == null) {
+        unsetGui();
+      } else {
+        setGui((String)value);
+      }
+      break;
 
-      case NOTE_GUI:
-        if (value == null) {
-          unsetNoteGui();
-        } else {
-          setNoteGui((String) value);
-        }
-        break;
+    case NOTE_GUI:
+      if (value == null) {
+        unsetNoteGui();
+      } else {
+        setNoteGui((String)value);
+      }
+      break;
+
+    case LOCAL_PROPERTIES:
+      if (value == null) {
+        unsetLocalProperties();
+      } else {
+        setLocalProperties((Map<String,String>)value);
+      }
+      break;
 
-      case LOCAL_PROPERTIES:
-        if (value == null) {
-          unsetLocalProperties();
-        } else {
-          setLocalProperties((Map<String, String>) value);
-        }
-        break;
     }
   }
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-      case NOTE_ID:
-        return getNoteId();
+    case NOTE_ID:
+      return getNoteId();
+
+    case NOTE_NAME:
+      return getNoteName();
 
-      case NOTE_NAME:
-        return getNoteName();
+    case PARAGRAPH_ID:
+      return getParagraphId();
 
-      case PARAGRAPH_ID:
-        return getParagraphId();
+    case REPL_NAME:
+      return getReplName();
 
-      case REPL_NAME:
-        return getReplName();
+    case PARAGRAPH_TITLE:
+      return getParagraphTitle();
 
-      case PARAGRAPH_TITLE:
-        return getParagraphTitle();
+    case PARAGRAPH_TEXT:
+      return getParagraphText();
 
-      case PARAGRAPH_TEXT:
-        return getParagraphText();
+    case AUTHENTICATION_INFO:
+      return getAuthenticationInfo();
 
-      case AUTHENTICATION_INFO:
-        return getAuthenticationInfo();
+    case CONFIG:
+      return getConfig();
 
-      case CONFIG:
-        return getConfig();
+    case GUI:
+      return getGui();
 
-      case GUI:
-        return getGui();
+    case NOTE_GUI:
+      return getNoteGui();
 
-      case NOTE_GUI:
-        return getNoteGui();
+    case LOCAL_PROPERTIES:
+      return getLocalProperties();
 
-      case LOCAL_PROPERTIES:
-        return getLocalProperties();
     }
     throw new IllegalStateException();
   }
 
-  /**
-   * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
-   * otherwise
-   */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
     }
 
     switch (field) {
-      case NOTE_ID:
-        return isSetNoteId();
-      case NOTE_NAME:
-        return isSetNoteName();
-      case PARAGRAPH_ID:
-        return isSetParagraphId();
-      case REPL_NAME:
-        return isSetReplName();
-      case PARAGRAPH_TITLE:
-        return isSetParagraphTitle();
-      case PARAGRAPH_TEXT:
-        return isSetParagraphText();
-      case AUTHENTICATION_INFO:
-        return isSetAuthenticationInfo();
-      case CONFIG:
-        return isSetConfig();
-      case GUI:
-        return isSetGui();
-      case NOTE_GUI:
-        return isSetNoteGui();
-      case LOCAL_PROPERTIES:
-        return isSetLocalProperties();
+    case NOTE_ID:
+      return isSetNoteId();
+    case NOTE_NAME:
+      return isSetNoteName();
+    case PARAGRAPH_ID:
+      return isSetParagraphId();
+    case REPL_NAME:
+      return isSetReplName();
+    case PARAGRAPH_TITLE:
+      return isSetParagraphTitle();
+    case PARAGRAPH_TEXT:
+      return isSetParagraphText();
+    case AUTHENTICATION_INFO:
+      return isSetAuthenticationInfo();
+    case CONFIG:
+      return isSetConfig();
+    case GUI:
+      return isSetGui();
+    case NOTE_GUI:
+      return isSetNoteGui();
+    case LOCAL_PROPERTIES:
+      return isSetLocalProperties();
     }
     throw new IllegalStateException();
   }
 
   @Override
   public boolean equals(Object that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
     if (that instanceof RemoteInterpreterContext)
-      return this.equals((RemoteInterpreterContext) that);
+      return this.equals((RemoteInterpreterContext)that);
     return false;
   }
 
   public boolean equals(RemoteInterpreterContext that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
 
     boolean this_present_noteId = true && this.isSetNoteId();
     boolean that_present_noteId = true && that.isSetNoteId();
     if (this_present_noteId || that_present_noteId) {
-      if (!(this_present_noteId && that_present_noteId)) return false;
-      if (!this.noteId.equals(that.noteId)) return false;
+      if (!(this_present_noteId && that_present_noteId))
+        return false;
+      if (!this.noteId.equals(that.noteId))
+        return false;
     }
 
     boolean this_present_noteName = true && this.isSetNoteName();
     boolean that_present_noteName = true && that.isSetNoteName();
     if (this_present_noteName || that_present_noteName) {
-      if (!(this_present_noteName && that_present_noteName)) return false;
-      if (!this.noteName.equals(that.noteName)) return false;
+      if (!(this_present_noteName && that_present_noteName))
+        return false;
+      if (!this.noteName.equals(that.noteName))
+        return false;
     }
 
     boolean this_present_paragraphId = true && this.isSetParagraphId();
     boolean that_present_paragraphId = true && that.isSetParagraphId();
     if (this_present_paragraphId || that_present_paragraphId) {
-      if (!(this_present_paragraphId && that_present_paragraphId)) return false;
-      if (!this.paragraphId.equals(that.paragraphId)) return false;
+      if (!(this_present_paragraphId && that_present_paragraphId))
+        return false;
+      if (!this.paragraphId.equals(that.paragraphId))
+        return false;
     }
 
     boolean this_present_replName = true && this.isSetReplName();
     boolean that_present_replName = true && that.isSetReplName();
     if (this_present_replName || that_present_replName) {
-      if (!(this_present_replName && that_present_replName)) return false;
-      if (!this.replName.equals(that.replName)) return false;
+      if (!(this_present_replName && that_present_replName))
+        return false;
+      if (!this.replName.equals(that.replName))
+        return false;
     }
 
     boolean this_present_paragraphTitle = true && this.isSetParagraphTitle();
     boolean that_present_paragraphTitle = true && that.isSetParagraphTitle();
     if (this_present_paragraphTitle || that_present_paragraphTitle) {
-      if (!(this_present_paragraphTitle && that_present_paragraphTitle)) return false;
-      if (!this.paragraphTitle.equals(that.paragraphTitle)) return false;
+      if (!(this_present_paragraphTitle && that_present_paragraphTitle))
+        return false;
+      if (!this.paragraphTitle.equals(that.paragraphTitle))
+        return false;
     }
 
     boolean this_present_paragraphText = true && this.isSetParagraphText();
     boolean that_present_paragraphText = true && that.isSetParagraphText();
     if (this_present_paragraphText || that_present_paragraphText) {
-      if (!(this_present_paragraphText && that_present_paragraphText)) return false;
-      if (!this.paragraphText.equals(that.paragraphText)) return false;
+      if (!(this_present_paragraphText && that_present_paragraphText))
+        return false;
+      if (!this.paragraphText.equals(that.paragraphText))
+        return false;
     }
 
     boolean this_present_authenticationInfo = true && this.isSetAuthenticationInfo();
     boolean that_present_authenticationInfo = true && that.isSetAuthenticationInfo();
     if (this_present_authenticationInfo || that_present_authenticationInfo) {
-      if (!(this_present_authenticationInfo && that_present_authenticationInfo)) return false;
-      if (!this.authenticationInfo.equals(that.authenticationInfo)) return false;
+      if (!(this_present_authenticationInfo && that_present_authenticationInfo))
+        return false;
+      if (!this.authenticationInfo.equals(that.authenticationInfo))
+        return false;
     }
 
     boolean this_present_config = true && this.isSetConfig();
     boolean that_present_config = true && that.isSetConfig();
     if (this_present_config || that_present_config) {
-      if (!(this_present_config && that_present_config)) return false;
-      if (!this.config.equals(that.config)) return false;
+      if (!(this_present_config && that_present_config))
+        return false;
+      if (!this.config.equals(that.config))
+        return false;
     }
 
     boolean this_present_gui = true && this.isSetGui();
     boolean that_present_gui = true && that.isSetGui();
     if (this_present_gui || that_present_gui) {
-      if (!(this_present_gui && that_present_gui)) return false;
-      if (!this.gui.equals(that.gui)) return false;
+      if (!(this_present_gui && that_present_gui))
+        return false;
+      if (!this.gui.equals(that.gui))
+        return false;
     }
 
     boolean this_present_noteGui = true && this.isSetNoteGui();
     boolean that_present_noteGui = true && that.isSetNoteGui();
     if (this_present_noteGui || that_present_noteGui) {
-      if (!(this_present_noteGui && that_present_noteGui)) return false;
-      if (!this.noteGui.equals(that.noteGui)) return false;
+      if (!(this_present_noteGui && that_present_noteGui))
+        return false;
+      if (!this.noteGui.equals(that.noteGui))
+        return false;
     }
 
     boolean this_present_localProperties = true && this.isSetLocalProperties();
     boolean that_present_localProperties = true && that.isSetLocalProperties();
     if (this_present_localProperties || that_present_localProperties) {
-      if (!(this_present_localProperties && that_present_localProperties)) return false;
-      if (!this.localProperties.equals(that.localProperties)) return false;
+      if (!(this_present_localProperties && that_present_localProperties))
+        return false;
+      if (!this.localProperties.equals(that.localProperties))
+        return false;
     }
 
     return true;
@@ -906,47 +855,58 @@ public class RemoteInterpreterContext
 
     boolean present_noteId = true && (isSetNoteId());
     list.add(present_noteId);
-    if (present_noteId) list.add(noteId);
+    if (present_noteId)
+      list.add(noteId);
 
     boolean present_noteName = true && (isSetNoteName());
     list.add(present_noteName);
-    if (present_noteName) list.add(noteName);
+    if (present_noteName)
+      list.add(noteName);
 
     boolean present_paragraphId = true && (isSetParagraphId());
     list.add(present_paragraphId);
-    if (present_paragraphId) list.add(paragraphId);
+    if (present_paragraphId)
+      list.add(paragraphId);
 
     boolean present_replName = true && (isSetReplName());
     list.add(present_replName);
-    if (present_replName) list.add(replName);
+    if (present_replName)
+      list.add(replName);
 
     boolean present_paragraphTitle = true && (isSetParagraphTitle());
     list.add(present_paragraphTitle);
-    if (present_paragraphTitle) list.add(paragraphTitle);
+    if (present_paragraphTitle)
+      list.add(paragraphTitle);
 
     boolean present_paragraphText = true && (isSetParagraphText());
     list.add(present_paragraphText);
-    if (present_paragraphText) list.add(paragraphText);
+    if (present_paragraphText)
+      list.add(paragraphText);
 
     boolean present_authenticationInfo = true && (isSetAuthenticationInfo());
     list.add(present_authenticationInfo);
-    if (present_authenticationInfo) list.add(authenticationInfo);
+    if (present_authenticationInfo)
+      list.add(authenticationInfo);
 
     boolean present_config = true && (isSetConfig());
     list.add(present_config);
-    if (present_config) list.add(config);
+    if (present_config)
+      list.add(config);
 
     boolean present_gui = true && (isSetGui());
     list.add(present_gui);
-    if (present_gui) list.add(gui);
+    if (present_gui)
+      list.add(gui);
 
     boolean present_noteGui = true && (isSetNoteGui());
     list.add(present_noteGui);
-    if (present_noteGui) list.add(noteGui);
+    if (present_noteGui)
+      list.add(noteGui);
 
     boolean present_localProperties = true && (isSetLocalProperties());
     list.add(present_localProperties);
-    if (present_localProperties) list.add(localProperties);
+    if (present_localProperties)
+      list.add(localProperties);
 
     return list.hashCode();
   }
@@ -1004,8 +964,7 @@ public class RemoteInterpreterContext
       return lastComparison;
     }
     if (isSetParagraphTitle()) {
-      lastComparison =
-          org.apache.thrift.TBaseHelper.compareTo(this.paragraphTitle, other.paragraphTitle);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paragraphTitle, other.paragraphTitle);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -1015,21 +974,17 @@ public class RemoteInterpreterContext
       return lastComparison;
     }
     if (isSetParagraphText()) {
-      lastComparison =
-          org.apache.thrift.TBaseHelper.compareTo(this.paragraphText, other.paragraphText);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paragraphText, other.paragraphText);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison =
-        Boolean.valueOf(isSetAuthenticationInfo()).compareTo(other.isSetAuthenticationInfo());
+    lastComparison = Boolean.valueOf(isSetAuthenticationInfo()).compareTo(other.isSetAuthenticationInfo());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetAuthenticationInfo()) {
-      lastComparison =
-          org.apache.thrift.TBaseHelper.compareTo(
-              this.authenticationInfo, other.authenticationInfo);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authenticationInfo, other.authenticationInfo);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -1064,14 +1019,12 @@ public class RemoteInterpreterContext
         return lastComparison;
       }
     }
-    lastComparison =
-        Boolean.valueOf(isSetLocalProperties()).compareTo(other.isSetLocalProperties());
+    lastComparison = Boolean.valueOf(isSetLocalProperties()).compareTo(other.isSetLocalProperties());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetLocalProperties()) {
-      lastComparison =
-          org.apache.thrift.TBaseHelper.compareTo(this.localProperties, other.localProperties);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.localProperties, other.localProperties);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -1087,8 +1040,7 @@ public class RemoteInterpreterContext
     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
-  public void write(org.apache.thrift.protocol.TProtocol oprot)
-      throws org.apache.thrift.TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
@@ -1195,20 +1147,15 @@ public class RemoteInterpreterContext
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
     try {
-      write(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(out)));
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in)
-      throws java.io.IOException, ClassNotFoundException {
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
-      read(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(in)));
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
@@ -1220,16 +1167,15 @@ public class RemoteInterpreterContext
     }
   }
 
-  private static class RemoteInterpreterContextStandardScheme
-      extends StandardScheme<RemoteInterpreterContext> {
+  private static class RemoteInterpreterContextStandardScheme extends StandardScheme<RemoteInterpreterContext> {
 
-    public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteInterpreterContext struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteInterpreterContext struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
       iprot.readStructBegin();
-      while (true) {
+      while (true)
+      {
         schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
           break;
         }
         switch (schemeField.id) {
@@ -1237,7 +1183,7 @@ public class RemoteInterpreterContext
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.noteId = iprot.readString();
               struct.setNoteIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -1245,7 +1191,7 @@ public class RemoteInterpreterContext
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.noteName = iprot.readString();
               struct.setNoteNameIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -1253,7 +1199,7 @@ public class RemoteInterpreterContext
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.paragraphId = iprot.readString();
               struct.setParagraphIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -1261,7 +1207,7 @@ public class RemoteInterpreterContext
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.replName = iprot.readString();
               struct.setReplNameIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -1269,7 +1215,7 @@ public class RemoteInterpreterContext
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.paragraphTitle = iprot.readString();
               struct.setParagraphTitleIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -1277,7 +1223,7 @@ public class RemoteInterpreterContext
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.paragraphText = iprot.readString();
               struct.setParagraphTextIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -1285,7 +1231,7 @@ public class RemoteInterpreterContext
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.authenticationInfo = iprot.readString();
               struct.setAuthenticationInfoIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -1293,7 +1239,7 @@ public class RemoteInterpreterContext
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.config = iprot.readString();
               struct.setConfigIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -1301,7 +1247,7 @@ public class RemoteInterpreterContext
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.gui = iprot.readString();
               struct.setGuiIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -1309,7 +1255,7 @@ public class RemoteInterpreterContext
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.noteGui = iprot.readString();
               struct.setNoteGuiIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -1317,10 +1263,11 @@ public class RemoteInterpreterContext
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
                 org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
-                struct.localProperties = new HashMap<String, String>(2 * _map0.size);
+                struct.localProperties = new HashMap<String,String>(2*_map0.size);
                 String _key1;
                 String _val2;
-                for (int _i3 = 0; _i3 < _map0.size; ++_i3) {
+                for (int _i3 = 0; _i3 < _map0.size; ++_i3)
+                {
                   _key1 = iprot.readString();
                   _val2 = iprot.readString();
                   struct.localProperties.put(_key1, _val2);
@@ -1328,7 +1275,7 @@ public class RemoteInterpreterContext
                 iprot.readMapEnd();
               }
               struct.setLocalPropertiesIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -1343,8 +1290,7 @@ public class RemoteInterpreterContext
       struct.validate();
     }
 
-    public void write(org.apache.thrift.protocol.TProtocol oprot, RemoteInterpreterContext struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol oprot, RemoteInterpreterContext struct) throws org.apache.thrift.TException {
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
@@ -1401,12 +1347,9 @@ public class RemoteInterpreterContext
       if (struct.localProperties != null) {
         oprot.writeFieldBegin(LOCAL_PROPERTIES_FIELD_DESC);
         {
-          oprot.writeMapBegin(
-              new org.apache.thrift.protocol.TMap(
-                  org.apache.thrift.protocol.TType.STRING,
-                  org.apache.thrift.protocol.TType.STRING,
-                  struct.localProperties.size()));
-          for (Map.Entry<String, String> _iter4 : struct.localProperties.entrySet()) {
+          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.localProperties.size()));
+          for (Map.Entry<String, String> _iter4 : struct.localProperties.entrySet())
+          {
             oprot.writeString(_iter4.getKey());
             oprot.writeString(_iter4.getValue());
           }
@@ -1417,6 +1360,7 @@ public class RemoteInterpreterContext
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
+
   }
 
   private static class RemoteInterpreterContextTupleSchemeFactory implements SchemeFactory {
@@ -1425,12 +1369,10 @@ public class RemoteInterpreterContext
     }
   }
 
-  private static class RemoteInterpreterContextTupleScheme
-      extends TupleScheme<RemoteInterpreterContext> {
+  private static class RemoteInterpreterContextTupleScheme extends TupleScheme<RemoteInterpreterContext> {
 
     @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterContext struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterContext struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
       if (struct.isSetNoteId()) {
@@ -1500,7 +1442,8 @@ public class RemoteInterpreterContext
       if (struct.isSetLocalProperties()) {
         {
           oprot.writeI32(struct.localProperties.size());
-          for (Map.Entry<String, String> _iter5 : struct.localProperties.entrySet()) {
+          for (Map.Entry<String, String> _iter5 : struct.localProperties.entrySet())
+          {
             oprot.writeString(_iter5.getKey());
             oprot.writeString(_iter5.getValue());
           }
@@ -1509,8 +1452,7 @@ public class RemoteInterpreterContext
     }
 
     @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterContext struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterContext struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(11);
       if (incoming.get(0)) {
@@ -1555,15 +1497,12 @@ public class RemoteInterpreterContext
       }
       if (incoming.get(10)) {
         {
-          org.apache.thrift.protocol.TMap _map6 =
-              new org.apache.thrift.protocol.TMap(
-                  org.apache.thrift.protocol.TType.STRING,
-                  org.apache.thrift.protocol.TType.STRING,
-                  iprot.readI32());
-          struct.localProperties = new HashMap<String, String>(2 * _map6.size);
+          org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.localProperties = new HashMap<String,String>(2*_map6.size);
           String _key7;
           String _val8;
-          for (int _i9 = 0; _i9 < _map6.size; ++_i9) {
+          for (int _i9 = 0; _i9 < _map6.size; ++_i9)
+          {
             _key7 = iprot.readString();
             _val8 = iprot.readString();
             struct.localProperties.put(_key7, _val8);
@@ -1573,4 +1512,6 @@ public class RemoteInterpreterContext
       }
     }
   }
+
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterEvent.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterEvent.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterEvent.java
index 729ae1e..c8bfa44 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterEvent.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterEvent.java
@@ -1,80 +1,84 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2018-8-9")
-public class RemoteInterpreterEvent
-    implements org.apache.thrift.TBase<RemoteInterpreterEvent, RemoteInterpreterEvent._Fields>,
-        java.io.Serializable,
-        Cloneable,
-        Comparable<RemoteInterpreterEvent> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
-      new org.apache.thrift.protocol.TStruct("RemoteInterpreterEvent");
-
-  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "type", org.apache.thrift.protocol.TType.I32, (short) 1);
-  private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "data", org.apache.thrift.protocol.TType.STRING, (short) 2);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
-      new HashMap<Class<? extends IScheme>, SchemeFactory>();
+public class RemoteInterpreterEvent implements org.apache.thrift.TBase<RemoteInterpreterEvent, RemoteInterpreterEvent._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteInterpreterEvent> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteInterpreterEvent");
+
+  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1);
+  private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)2);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
     schemes.put(StandardScheme.class, new RemoteInterpreterEventStandardSchemeFactory());
     schemes.put(TupleScheme.class, new RemoteInterpreterEventTupleSchemeFactory());
   }
 
-  /** @see RemoteInterpreterEventType */
+  /**
+   * 
+   * @see RemoteInterpreterEventType
+   */
   public RemoteInterpreterEventType type; // required
-
   public String data; // required
 
-  /**
-   * The set of fields this struct contains, along with convenience methods for finding and
-   * manipulating them.
-   */
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    /** @see RemoteInterpreterEventType */
-    TYPE((short) 1, "type"),
-    DATA((short) 2, "data");
+    /**
+     * 
+     * @see RemoteInterpreterEventType
+     */
+    TYPE((short)1, "type"),
+    DATA((short)2, "data");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -84,9 +88,11 @@ public class RemoteInterpreterEvent
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
     public static _Fields findByThriftId(int fieldId) {
-      switch (fieldId) {
+      switch(fieldId) {
         case 1: // TYPE
           return TYPE;
         case 2: // DATA
@@ -96,15 +102,19 @@ public class RemoteInterpreterEvent
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null)
-        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
 
-    /** Find the _Fields constant that matches name, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
@@ -128,38 +138,31 @@ public class RemoteInterpreterEvent
 
   // isset id assignments
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
-        new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(
-        _Fields.TYPE,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "type",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.EnumMetaData(
-                org.apache.thrift.protocol.TType.ENUM, RemoteInterpreterEventType.class)));
-    tmpMap.put(
-        _Fields.DATA,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "data",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, RemoteInterpreterEventType.class)));
+    tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
-        RemoteInterpreterEvent.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RemoteInterpreterEvent.class, metaDataMap);
   }
 
-  public RemoteInterpreterEvent() {}
+  public RemoteInterpreterEvent() {
+  }
 
-  public RemoteInterpreterEvent(RemoteInterpreterEventType type, String data) {
+  public RemoteInterpreterEvent(
+    RemoteInterpreterEventType type,
+    String data)
+  {
     this();
     this.type = type;
     this.data = data;
   }
 
-  /** Performs a deep copy on <i>other</i>. */
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
   public RemoteInterpreterEvent(RemoteInterpreterEvent other) {
     if (other.isSetType()) {
       this.type = other.type;
@@ -179,12 +182,18 @@ public class RemoteInterpreterEvent
     this.data = null;
   }
 
-  /** @see RemoteInterpreterEventType */
+  /**
+   * 
+   * @see RemoteInterpreterEventType
+   */
   public RemoteInterpreterEventType getType() {
     return this.type;
   }
 
-  /** @see RemoteInterpreterEventType */
+  /**
+   * 
+   * @see RemoteInterpreterEventType
+   */
   public RemoteInterpreterEvent setType(RemoteInterpreterEventType type) {
     this.type = type;
     return this;
@@ -231,75 +240,81 @@ public class RemoteInterpreterEvent
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-      case TYPE:
-        if (value == null) {
-          unsetType();
-        } else {
-          setType((RemoteInterpreterEventType) value);
-        }
-        break;
+    case TYPE:
+      if (value == null) {
+        unsetType();
+      } else {
+        setType((RemoteInterpreterEventType)value);
+      }
+      break;
+
+    case DATA:
+      if (value == null) {
+        unsetData();
+      } else {
+        setData((String)value);
+      }
+      break;
 
-      case DATA:
-        if (value == null) {
-          unsetData();
-        } else {
-          setData((String) value);
-        }
-        break;
     }
   }
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-      case TYPE:
-        return getType();
+    case TYPE:
+      return getType();
+
+    case DATA:
+      return getData();
 
-      case DATA:
-        return getData();
     }
     throw new IllegalStateException();
   }
 
-  /**
-   * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
-   * otherwise
-   */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
     }
 
     switch (field) {
-      case TYPE:
-        return isSetType();
-      case DATA:
-        return isSetData();
+    case TYPE:
+      return isSetType();
+    case DATA:
+      return isSetData();
     }
     throw new IllegalStateException();
   }
 
   @Override
   public boolean equals(Object that) {
-    if (that == null) return false;
-    if (that instanceof RemoteInterpreterEvent) return this.equals((RemoteInterpreterEvent) that);
+    if (that == null)
+      return false;
+    if (that instanceof RemoteInterpreterEvent)
+      return this.equals((RemoteInterpreterEvent)that);
     return false;
   }
 
   public boolean equals(RemoteInterpreterEvent that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
 
     boolean this_present_type = true && this.isSetType();
     boolean that_present_type = true && that.isSetType();
     if (this_present_type || that_present_type) {
-      if (!(this_present_type && that_present_type)) return false;
-      if (!this.type.equals(that.type)) return false;
+      if (!(this_present_type && that_present_type))
+        return false;
+      if (!this.type.equals(that.type))
+        return false;
     }
 
     boolean this_present_data = true && this.isSetData();
     boolean that_present_data = true && that.isSetData();
     if (this_present_data || that_present_data) {
-      if (!(this_present_data && that_present_data)) return false;
-      if (!this.data.equals(that.data)) return false;
+      if (!(this_present_data && that_present_data))
+        return false;
+      if (!this.data.equals(that.data))
+        return false;
     }
 
     return true;
@@ -311,11 +326,13 @@ public class RemoteInterpreterEvent
 
     boolean present_type = true && (isSetType());
     list.add(present_type);
-    if (present_type) list.add(type.getValue());
+    if (present_type)
+      list.add(type.getValue());
 
     boolean present_data = true && (isSetData());
     list.add(present_data);
-    if (present_data) list.add(data);
+    if (present_data)
+      list.add(data);
 
     return list.hashCode();
   }
@@ -359,8 +376,7 @@ public class RemoteInterpreterEvent
     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
-  public void write(org.apache.thrift.protocol.TProtocol oprot)
-      throws org.apache.thrift.TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
@@ -395,20 +411,15 @@ public class RemoteInterpreterEvent
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
     try {
-      write(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(out)));
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in)
-      throws java.io.IOException, ClassNotFoundException {
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
-      read(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(in)));
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
@@ -420,26 +431,23 @@ public class RemoteInterpreterEvent
     }
   }
 
-  private static class RemoteInterpreterEventStandardScheme
-      extends StandardScheme<RemoteInterpreterEvent> {
+  private static class RemoteInterpreterEventStandardScheme extends StandardScheme<RemoteInterpreterEvent> {
 
-    public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteInterpreterEvent struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteInterpreterEvent struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
       iprot.readStructBegin();
-      while (true) {
+      while (true)
+      {
         schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
           break;
         }
         switch (schemeField.id) {
           case 1: // TYPE
             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-              struct.type =
-                  org.apache.zeppelin.interpreter.thrift.RemoteInterpreterEventType.findByValue(
-                      iprot.readI32());
+              struct.type = org.apache.zeppelin.interpreter.thrift.RemoteInterpreterEventType.findByValue(iprot.readI32());
               struct.setTypeIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -447,7 +455,7 @@ public class RemoteInterpreterEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.data = iprot.readString();
               struct.setDataIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -462,8 +470,7 @@ public class RemoteInterpreterEvent
       struct.validate();
     }
 
-    public void write(org.apache.thrift.protocol.TProtocol oprot, RemoteInterpreterEvent struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol oprot, RemoteInterpreterEvent struct) throws org.apache.thrift.TException {
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
@@ -480,6 +487,7 @@ public class RemoteInterpreterEvent
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
+
   }
 
   private static class RemoteInterpreterEventTupleSchemeFactory implements SchemeFactory {
@@ -488,12 +496,10 @@ public class RemoteInterpreterEvent
     }
   }
 
-  private static class RemoteInterpreterEventTupleScheme
-      extends TupleScheme<RemoteInterpreterEvent> {
+  private static class RemoteInterpreterEventTupleScheme extends TupleScheme<RemoteInterpreterEvent> {
 
     @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterEvent struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
       if (struct.isSetType()) {
@@ -512,14 +518,11 @@ public class RemoteInterpreterEvent
     }
 
     @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterEvent struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(2);
       if (incoming.get(0)) {
-        struct.type =
-            org.apache.zeppelin.interpreter.thrift.RemoteInterpreterEventType.findByValue(
-                iprot.readI32());
+        struct.type = org.apache.zeppelin.interpreter.thrift.RemoteInterpreterEventType.findByValue(iprot.readI32());
         struct.setTypeIsSet(true);
       }
       if (incoming.get(1)) {
@@ -528,4 +531,6 @@ public class RemoteInterpreterEvent
       }
     }
   }
+
 }
+


[49/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/alluxio/src/test/java/org/apache/zeppelin/alluxio/AlluxioInterpreterTest.java
----------------------------------------------------------------------
diff --git a/alluxio/src/test/java/org/apache/zeppelin/alluxio/AlluxioInterpreterTest.java b/alluxio/src/test/java/org/apache/zeppelin/alluxio/AlluxioInterpreterTest.java
index 0b0d81d..06711de 100644
--- a/alluxio/src/test/java/org/apache/zeppelin/alluxio/AlluxioInterpreterTest.java
+++ b/alluxio/src/test/java/org/apache/zeppelin/alluxio/AlluxioInterpreterTest.java
@@ -1,19 +1,37 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.alluxio;
 
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+
 import alluxio.AlluxioURI;
 import alluxio.Constants;
 import alluxio.client.FileSystemTestUtils;
@@ -28,22 +46,11 @@ import alluxio.shell.command.CommandUtils;
 import alluxio.util.FormatUtils;
 import alluxio.util.io.BufferUtils;
 import alluxio.util.io.PathUtils;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
+
 import org.apache.zeppelin.completer.CompletionType;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.InterpreterResult.Code;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
 
 public class AlluxioInterpreterTest {
   private AlluxioInterpreter alluxioInterpreter;
@@ -74,29 +81,26 @@ public class AlluxioInterpreterTest {
 
   @Test
   public void testCompletion() {
-    List expectedResultOne =
-        Arrays.asList(
-            new InterpreterCompletion("cat", "cat", CompletionType.command.name()),
-            new InterpreterCompletion("chgrp", "chgrp", CompletionType.command.name()),
-            new InterpreterCompletion("chmod", "chmod", CompletionType.command.name()),
-            new InterpreterCompletion("chown", "chown", CompletionType.command.name()),
-            new InterpreterCompletion(
-                "copyFromLocal", "copyFromLocal", CompletionType.command.name()),
-            new InterpreterCompletion("copyToLocal", "copyToLocal", CompletionType.command.name()),
-            new InterpreterCompletion("count", "count", CompletionType.command.name()),
-            new InterpreterCompletion(
-                "createLineage", "createLineage", CompletionType.command.name()));
-    List expectedResultTwo =
-        Arrays.asList(
-            new InterpreterCompletion(
-                "copyFromLocal", "copyFromLocal", CompletionType.command.name()),
-            new InterpreterCompletion("copyToLocal", "copyToLocal", CompletionType.command.name()),
-            new InterpreterCompletion("count", "count", CompletionType.command.name()));
-    List expectedResultThree =
-        Arrays.asList(
-            new InterpreterCompletion(
-                "copyFromLocal", "copyFromLocal", CompletionType.command.name()),
-            new InterpreterCompletion("copyToLocal", "copyToLocal", CompletionType.command.name()));
+    List expectedResultOne = Arrays.asList(
+        new InterpreterCompletion("cat", "cat", CompletionType.command.name()),
+        new InterpreterCompletion("chgrp", "chgrp", CompletionType.command.name()),
+        new InterpreterCompletion("chmod", "chmod", CompletionType.command.name()),
+        new InterpreterCompletion("chown", "chown", CompletionType.command.name()),
+        new InterpreterCompletion("copyFromLocal", "copyFromLocal", CompletionType.command.name()),
+        new InterpreterCompletion("copyToLocal", "copyToLocal", CompletionType.command.name()),
+        new InterpreterCompletion("count", "count", CompletionType.command.name()),
+        new InterpreterCompletion("createLineage", "createLineage", CompletionType.command.name()));
+    List expectedResultTwo = Arrays.asList(
+        new InterpreterCompletion("copyFromLocal", "copyFromLocal",
+              CompletionType.command.name()),
+        new InterpreterCompletion("copyToLocal", "copyToLocal",
+              CompletionType.command.name()),
+        new InterpreterCompletion("count", "count", CompletionType.command.name()));
+    List expectedResultThree = Arrays.asList(
+        new InterpreterCompletion("copyFromLocal", "copyFromLocal",
+              CompletionType.command.name()),
+        new InterpreterCompletion("copyToLocal", "copyToLocal",
+              CompletionType.command.name()));
     List expectedResultNone = new ArrayList<>();
 
     List<InterpreterCompletion> resultOne = alluxioInterpreter.completion("c", 0, null);
@@ -119,11 +123,11 @@ public class AlluxioInterpreterTest {
 
   @Test
   public void catDirectoryTest() throws IOException {
-    String expected =
-        "Successfully created directory /testDir\n\n" + "Path /testDir must be a file\n";
+    String expected = "Successfully created directory /testDir\n\n" +
+            "Path /testDir must be a file\n";
 
-    InterpreterResult output =
-        alluxioInterpreter.interpret("mkdir /testDir" + "\ncat /testDir", null);
+    InterpreterResult output = alluxioInterpreter.interpret("mkdir /testDir" +
+            "\ncat /testDir", null);
 
     Assert.assertEquals(Code.ERROR, output.code());
     Assert.assertEquals(expected, output.message().get(0).getData());
@@ -137,20 +141,16 @@ public class AlluxioInterpreterTest {
 
   @Test
   public void catTest() throws IOException {
-    FileSystemTestUtils.createByteFile(fs, "/testFile", WriteType.MUST_CACHE, 10, 10);
+    FileSystemTestUtils.createByteFile(fs, "/testFile", WriteType.MUST_CACHE,
+            10, 10);
     InterpreterResult output = alluxioInterpreter.interpret("cat /testFile", null);
 
     byte[] expected = BufferUtils.getIncreasingByteArray(10);
 
     Assert.assertEquals(Code.SUCCESS, output.code());
-    Assert.assertArrayEquals(
-        expected,
-        output
-            .message()
-            .get(0)
-            .getData()
-            .substring(0, output.message().get(0).getData().length() - 1)
-            .getBytes());
+    Assert.assertArrayEquals(expected,
+            output.message().get(0).getData().substring(0,
+                    output.message().get(0).getData().length() - 1).getBytes());
   }
 
   @Test
@@ -162,12 +162,11 @@ public class AlluxioInterpreterTest {
     fos.write(toWrite);
     fos.close();
 
-    InterpreterResult output =
-        alluxioInterpreter.interpret(
-            "copyFromLocal " + testFile.getAbsolutePath() + " /testFile", null);
+    InterpreterResult output = alluxioInterpreter.interpret("copyFromLocal " +
+            testFile.getAbsolutePath() + " /testFile", null);
     Assert.assertEquals(
-        "Copied " + testFile.getAbsolutePath() + " to /testFile\n\n",
-        output.message().get(0).getData());
+            "Copied " + testFile.getAbsolutePath() + " to /testFile\n\n",
+            output.message().get(0).getData());
 
     long fileLength = fs.getStatus(new AlluxioURI("/testFile")).getLength();
     Assert.assertEquals(SIZE_BYTES, fileLength);
@@ -196,10 +195,10 @@ public class AlluxioInterpreterTest {
     FileSystemTestUtils.createByteFile(fs, "/testRoot/testFileA", WriteType.CACHE_THROUGH, 10, 10);
     FileSystemTestUtils.createByteFile(fs, "/testRoot/testFileB", WriteType.MUST_CACHE, 10, 10);
 
-    int memPercentageA =
-        fs.getStatus(new AlluxioURI("/testRoot/testFileA")).getInMemoryPercentage();
-    int memPercentageB =
-        fs.getStatus(new AlluxioURI("/testRoot/testFileB")).getInMemoryPercentage();
+    int memPercentageA = fs.getStatus(
+            new AlluxioURI("/testRoot/testFileA")).getInMemoryPercentage();
+    int memPercentageB = fs.getStatus(
+            new AlluxioURI("/testRoot/testFileB")).getInMemoryPercentage();
     Assert.assertFalse(memPercentageA == 0);
     Assert.assertTrue(memPercentageB == 100);
 
@@ -218,15 +217,16 @@ public class AlluxioInterpreterTest {
     File testDirInner = new File(mLocalAlluxioCluster.getAlluxioHome() + "/testDir/testDirInner");
     testDirInner.mkdir();
     File testFile =
-        generateFileContent("/testDir/testFile", BufferUtils.getIncreasingByteArray(10));
+            generateFileContent("/testDir/testFile", BufferUtils.getIncreasingByteArray(10));
 
-    generateFileContent(
-        "/testDir/testDirInner/testFile2", BufferUtils.getIncreasingByteArray(10, 20));
+    generateFileContent("/testDir/testDirInner/testFile2",
+            BufferUtils.getIncreasingByteArray(10, 20));
 
-    InterpreterResult output =
-        alluxioInterpreter.interpret("copyFromLocal " + testFile.getParent() + " /testDir", null);
+    InterpreterResult output = alluxioInterpreter.interpret("copyFromLocal " +
+            testFile.getParent() + " /testDir", null);
     Assert.assertEquals(
-        "Copied " + testFile.getParent() + " to /testDir\n\n", output.message().get(0).getData());
+            "Copied " + testFile.getParent() + " to /testDir\n\n",
+            output.message().get(0).getData());
 
     long fileLength1 = fs.getStatus(new AlluxioURI("/testDir/testFile")).getLength();
     long fileLength2 = fs.getStatus(new AlluxioURI("/testDir/testDirInner/testFile2")).getLength();
@@ -246,17 +246,14 @@ public class AlluxioInterpreterTest {
   @Test
   public void copyFromLocalTestWithFullURI() throws IOException, AlluxioException {
     File testFile = generateFileContent("/srcFileURI", BufferUtils.getIncreasingByteArray(10));
-    String uri =
-        "tachyon://"
-            + mLocalAlluxioCluster.getMasterHostname()
-            + ":"
-            + mLocalAlluxioCluster.getMasterPort()
-            + "/destFileURI";
-
-    InterpreterResult output =
-        alluxioInterpreter.interpret("copyFromLocal " + testFile.getPath() + " " + uri, null);
+    String uri = "tachyon://" + mLocalAlluxioCluster.getMasterHostname() + ":"
+            + mLocalAlluxioCluster.getMasterPort() + "/destFileURI";
+
+    InterpreterResult output = alluxioInterpreter.interpret("copyFromLocal " +
+            testFile.getPath() + " " + uri, null);
     Assert.assertEquals(
-        "Copied " + testFile.getPath() + " to " + uri + "\n\n", output.message().get(0).getData());
+            "Copied " + testFile.getPath() + " to " + uri + "\n\n",
+            output.message().get(0).getData());
 
     long fileLength = fs.getStatus(new AlluxioURI("/destFileURI")).getLength();
     Assert.assertEquals(10L, fileLength);
@@ -299,13 +296,12 @@ public class AlluxioInterpreterTest {
   private void copyToLocalWithBytes(int bytes) throws IOException {
     FileSystemTestUtils.createByteFile(fs, "/testFile", WriteType.MUST_CACHE, 10, 10);
 
-    InterpreterResult output =
-        alluxioInterpreter.interpret(
-            "copyToLocal /testFile " + mLocalAlluxioCluster.getAlluxioHome() + "/testFile", null);
+    InterpreterResult output = alluxioInterpreter.interpret("copyToLocal /testFile " +
+            mLocalAlluxioCluster.getAlluxioHome() + "/testFile", null);
 
     Assert.assertEquals(
-        "Copied /testFile to " + mLocalAlluxioCluster.getAlluxioHome() + "/testFile\n\n",
-        output.message().get(0).getData());
+            "Copied /testFile to " + mLocalAlluxioCluster.getAlluxioHome() + "/testFile\n\n",
+            output.message().get(0).getData());
     fileReadTest("/testFile", 10);
   }
 
@@ -313,17 +309,18 @@ public class AlluxioInterpreterTest {
   public void countNotExistTest() throws IOException {
     InterpreterResult output = alluxioInterpreter.interpret("count /NotExistFile", null);
     Assert.assertEquals(Code.ERROR, output.code());
-    Assert.assertEquals(
-        ExceptionMessage.PATH_DOES_NOT_EXIST.getMessage("/NotExistFile") + "\n",
-        output.message().get(0).getData());
+    Assert.assertEquals(ExceptionMessage.PATH_DOES_NOT_EXIST.getMessage("/NotExistFile") + "\n",
+            output.message().get(0).getData());
   }
 
   @Test
   public void countTest() throws IOException {
-    FileSystemTestUtils.createByteFile(fs, "/testRoot/testFileA", WriteType.CACHE_THROUGH, 10, 10);
-    FileSystemTestUtils.createByteFile(
-        fs, "/testRoot/testDir/testFileB", WriteType.CACHE_THROUGH, 20, 20);
-    FileSystemTestUtils.createByteFile(fs, "/testRoot/testFileB", WriteType.CACHE_THROUGH, 30, 30);
+    FileSystemTestUtils.createByteFile(fs, "/testRoot/testFileA",
+            WriteType.CACHE_THROUGH, 10, 10);
+    FileSystemTestUtils.createByteFile(fs, "/testRoot/testDir/testFileB",
+            WriteType.CACHE_THROUGH, 20, 20);
+    FileSystemTestUtils.createByteFile(fs, "/testRoot/testFileB",
+            WriteType.CACHE_THROUGH, 30, 30);
 
     InterpreterResult output = alluxioInterpreter.interpret("count /testRoot", null);
 
@@ -338,18 +335,16 @@ public class AlluxioInterpreterTest {
   @Test
   public void fileinfoNotExistTest() throws IOException {
     InterpreterResult output = alluxioInterpreter.interpret("fileInfo /NotExistFile", null);
-    Assert.assertEquals(
-        ExceptionMessage.PATH_DOES_NOT_EXIST.getMessage("/NotExistFile") + "\n",
-        output.message().get(0).getData());
+    Assert.assertEquals(ExceptionMessage.PATH_DOES_NOT_EXIST.getMessage("/NotExistFile") + "\n",
+            output.message().get(0).getData());
     Assert.assertEquals(Code.ERROR, output.code());
   }
 
   @Test
   public void locationNotExistTest() throws IOException {
     InterpreterResult output = alluxioInterpreter.interpret("location /NotExistFile", null);
-    Assert.assertEquals(
-        ExceptionMessage.PATH_DOES_NOT_EXIST.getMessage("/NotExistFile") + "\n",
-        output.message().get(0).getData());
+    Assert.assertEquals(ExceptionMessage.PATH_DOES_NOT_EXIST.getMessage("/NotExistFile") + "\n",
+            output.message().get(0).getData());
     Assert.assertEquals(Code.ERROR, output.code());
   }
 
@@ -357,10 +352,12 @@ public class AlluxioInterpreterTest {
   public void lsTest() throws IOException, AlluxioException {
     URIStatus[] files = new URIStatus[3];
 
-    FileSystemTestUtils.createByteFile(fs, "/testRoot/testFileA", WriteType.MUST_CACHE, 10, 10);
-    FileSystemTestUtils.createByteFile(
-        fs, "/testRoot/testDir/testFileB", WriteType.MUST_CACHE, 20, 20);
-    FileSystemTestUtils.createByteFile(fs, "/testRoot/testFileC", WriteType.THROUGH, 30, 30);
+    FileSystemTestUtils.createByteFile(fs, "/testRoot/testFileA",
+            WriteType.MUST_CACHE, 10, 10);
+    FileSystemTestUtils.createByteFile(fs, "/testRoot/testDir/testFileB",
+            WriteType.MUST_CACHE, 20, 20);
+    FileSystemTestUtils.createByteFile(fs, "/testRoot/testFileC",
+            WriteType.THROUGH, 30, 30);
 
     files[0] = fs.getStatus(new AlluxioURI("/testRoot/testFileA"));
     files[1] = fs.getStatus(new AlluxioURI("/testRoot/testDir"));
@@ -370,26 +367,13 @@ public class AlluxioInterpreterTest {
 
     String expected = "";
     String format = "%-10s%-25s%-15s%-5s\n";
-    expected +=
-        String.format(
-            format,
-            FormatUtils.getSizeFromBytes(10),
-            CommandUtils.convertMsToDate(files[0].getCreationTimeMs()),
-            "In Memory",
+    expected += String.format(format, FormatUtils.getSizeFromBytes(10),
+            CommandUtils.convertMsToDate(files[0].getCreationTimeMs()), "In Memory",
             "/testRoot/testFileA");
-    expected +=
-        String.format(
-            format,
-            FormatUtils.getSizeFromBytes(0),
-            CommandUtils.convertMsToDate(files[1].getCreationTimeMs()),
-            "",
-            "/testRoot/testDir");
-    expected +=
-        String.format(
-            format,
-            FormatUtils.getSizeFromBytes(30),
-            CommandUtils.convertMsToDate(files[2].getCreationTimeMs()),
-            "Not In Memory",
+    expected += String.format(format, FormatUtils.getSizeFromBytes(0),
+            CommandUtils.convertMsToDate(files[1].getCreationTimeMs()), "", "/testRoot/testDir");
+    expected += String.format(format, FormatUtils.getSizeFromBytes(30),
+            CommandUtils.convertMsToDate(files[2].getCreationTimeMs()), "Not In Memory",
             "/testRoot/testFileC");
     expected += "\n";
 
@@ -401,10 +385,12 @@ public class AlluxioInterpreterTest {
   public void lsRecursiveTest() throws IOException, AlluxioException {
     URIStatus[] files = new URIStatus[4];
 
-    FileSystemTestUtils.createByteFile(fs, "/testRoot/testFileA", WriteType.MUST_CACHE, 10, 10);
-    FileSystemTestUtils.createByteFile(
-        fs, "/testRoot/testDir/testFileB", WriteType.MUST_CACHE, 20, 20);
-    FileSystemTestUtils.createByteFile(fs, "/testRoot/testFileC", WriteType.THROUGH, 30, 30);
+    FileSystemTestUtils.createByteFile(fs, "/testRoot/testFileA",
+            WriteType.MUST_CACHE, 10, 10);
+    FileSystemTestUtils.createByteFile(fs, "/testRoot/testDir/testFileB",
+            WriteType.MUST_CACHE, 20, 20);
+    FileSystemTestUtils.createByteFile(fs, "/testRoot/testFileC",
+            WriteType.THROUGH, 30, 30);
 
     files[0] = fs.getStatus(new AlluxioURI("/testRoot/testFileA"));
     files[1] = fs.getStatus(new AlluxioURI("/testRoot/testDir"));
@@ -416,33 +402,21 @@ public class AlluxioInterpreterTest {
     String expected = "";
     String format = "%-10s%-25s%-15s%-5s\n";
     expected +=
-        String.format(
-            format,
-            FormatUtils.getSizeFromBytes(10),
-            CommandUtils.convertMsToDate(files[0].getCreationTimeMs()),
-            "In Memory",
-            "/testRoot/testFileA");
+            String.format(format, FormatUtils.getSizeFromBytes(10),
+                    CommandUtils.convertMsToDate(files[0].getCreationTimeMs()), "In Memory",
+                    "/testRoot/testFileA");
     expected +=
-        String.format(
-            format,
-            FormatUtils.getSizeFromBytes(0),
-            CommandUtils.convertMsToDate(files[1].getCreationTimeMs()),
-            "",
-            "/testRoot/testDir");
+            String.format(format, FormatUtils.getSizeFromBytes(0),
+                    CommandUtils.convertMsToDate(files[1].getCreationTimeMs()), "",
+                    "/testRoot/testDir");
     expected +=
-        String.format(
-            format,
-            FormatUtils.getSizeFromBytes(20),
-            CommandUtils.convertMsToDate(files[2].getCreationTimeMs()),
-            "In Memory",
-            "/testRoot/testDir/testFileB");
+            String.format(format, FormatUtils.getSizeFromBytes(20),
+                    CommandUtils.convertMsToDate(files[2].getCreationTimeMs()), "In Memory",
+                    "/testRoot/testDir/testFileB");
     expected +=
-        String.format(
-            format,
-            FormatUtils.getSizeFromBytes(30),
-            CommandUtils.convertMsToDate(files[3].getCreationTimeMs()),
-            "Not In Memory",
-            "/testRoot/testFileC");
+            String.format(format, FormatUtils.getSizeFromBytes(30),
+                    CommandUtils.convertMsToDate(files[3].getCreationTimeMs()), "Not In Memory",
+                    "/testRoot/testFileC");
     expected += "\n";
 
     Assert.assertEquals(expected, output.message().get(0).getData());
@@ -450,13 +424,13 @@ public class AlluxioInterpreterTest {
 
   @Test
   public void mkdirComplexPathTest() throws IOException, AlluxioException {
-    InterpreterResult output =
-        alluxioInterpreter.interpret("mkdir /Complex!@#$%^&*()-_=+[]{};\"'<>,.?/File", null);
+    InterpreterResult output = alluxioInterpreter.interpret(
+            "mkdir /Complex!@#$%^&*()-_=+[]{};\"'<>,.?/File", null);
 
     boolean existsDir = fs.exists(new AlluxioURI("/Complex!@#$%^&*()-_=+[]{};\"'<>,.?/File"));
     Assert.assertEquals(
-        "Successfully created directory /Complex!@#$%^&*()-_=+[]{};\"'<>,.?/File\n\n",
-        output.message().get(0).getData());
+            "Successfully created directory /Complex!@#$%^&*()-_=+[]{};\"'<>,.?/File\n\n",
+            output.message().get(0).getData());
     Assert.assertTrue(existsDir);
   }
 
@@ -470,7 +444,8 @@ public class AlluxioInterpreterTest {
   @Test
   public void mkdirInvalidPathTest() throws IOException {
     Assert.assertEquals(
-        Code.ERROR, alluxioInterpreter.interpret("mkdir /test File Invalid Path", null).code());
+            Code.ERROR,
+            alluxioInterpreter.interpret("mkdir /test File Invalid Path", null).code());
   }
 
   @Test
@@ -478,27 +453,26 @@ public class AlluxioInterpreterTest {
     InterpreterResult output = alluxioInterpreter.interpret("mkdir /root/testFile1", null);
     boolean existsDir = fs.exists(new AlluxioURI("/root/testFile1"));
     Assert.assertEquals(
-        "Successfully created directory /root/testFile1\n\n", output.message().get(0).getData());
+            "Successfully created directory /root/testFile1\n\n",
+            output.message().get(0).getData());
     Assert.assertTrue(existsDir);
   }
 
   @Test
   public void mkdirTest() throws IOException, AlluxioException {
     String qualifiedPath =
-        "tachyon://"
-            + mLocalAlluxioCluster.getMasterHostname()
-            + ":"
-            + mLocalAlluxioCluster.getMasterPort()
-            + "/root/testFile1";
+            "tachyon://" + mLocalAlluxioCluster.getMasterHostname() + ":"
+                    + mLocalAlluxioCluster.getMasterPort() + "/root/testFile1";
     InterpreterResult output = alluxioInterpreter.interpret("mkdir " + qualifiedPath, null);
     boolean existsDir = fs.exists(new AlluxioURI("/root/testFile1"));
     Assert.assertEquals(
-        "Successfully created directory " + qualifiedPath + "\n\n",
-        output.message().get(0).getData());
+            "Successfully created directory " + qualifiedPath + "\n\n",
+            output.message().get(0).getData());
     Assert.assertTrue(existsDir);
   }
 
-  private File generateFileContent(String path, byte[] toWrite) throws IOException {
+  private File generateFileContent(String path, byte[] toWrite)
+          throws IOException {
     File testFile = new File(mLocalAlluxioCluster.getAlluxioHome() + path);
     testFile.createNewFile();
     FileOutputStream fos = new FileOutputStream(testFile);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/angular/pom.xml
----------------------------------------------------------------------
diff --git a/angular/pom.xml b/angular/pom.xml
index f9d7448..47ffbf3 100644
--- a/angular/pom.xml
+++ b/angular/pom.xml
@@ -72,6 +72,13 @@
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/angular/src/main/java/org/apache/zeppelin/angular/AngularInterpreter.java
----------------------------------------------------------------------
diff --git a/angular/src/main/java/org/apache/zeppelin/angular/AngularInterpreter.java b/angular/src/main/java/org/apache/zeppelin/angular/AngularInterpreter.java
index 12fdd25..696e450 100644
--- a/angular/src/main/java/org/apache/zeppelin/angular/AngularInterpreter.java
+++ b/angular/src/main/java/org/apache/zeppelin/angular/AngularInterpreter.java
@@ -20,6 +20,7 @@ package org.apache.zeppelin.angular;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Properties;
+
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
@@ -29,7 +30,9 @@ import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
 
-/** */
+/**
+ *
+ */
 public class AngularInterpreter extends Interpreter {
 
   public AngularInterpreter(Properties property) {
@@ -37,10 +40,12 @@ public class AngularInterpreter extends Interpreter {
   }
 
   @Override
-  public void open() {}
+  public void open() {
+  }
 
   @Override
-  public void close() {}
+  public void close() {
+  }
 
   @Override
   public InterpreterResult interpret(String st, InterpreterContext context) {
@@ -48,7 +53,8 @@ public class AngularInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+  }
 
   @Override
   public FormType getFormType() {
@@ -61,14 +67,14 @@ public class AngularInterpreter extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return new LinkedList<>();
   }
 
   @Override
   public Scheduler getScheduler() {
-    return SchedulerFactory.singleton()
-        .createOrGetFIFOScheduler(AngularInterpreter.class.getName() + this.hashCode());
+    return SchedulerFactory.singleton().createOrGetFIFOScheduler(
+        AngularInterpreter.class.getName() + this.hashCode());
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/beam/pom.xml
----------------------------------------------------------------------
diff --git a/beam/pom.xml b/beam/pom.xml
index 77203f7..1ad5b87 100644
--- a/beam/pom.xml
+++ b/beam/pom.xml
@@ -259,6 +259,13 @@
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/beam/src/main/java/org/apache/zeppelin/beam/BeamInterpreter.java
----------------------------------------------------------------------
diff --git a/beam/src/main/java/org/apache/zeppelin/beam/BeamInterpreter.java b/beam/src/main/java/org/apache/zeppelin/beam/BeamInterpreter.java
index 5ab271e..06ab33b 100644
--- a/beam/src/main/java/org/apache/zeppelin/beam/BeamInterpreter.java
+++ b/beam/src/main/java/org/apache/zeppelin/beam/BeamInterpreter.java
@@ -17,13 +17,17 @@
 
 package org.apache.zeppelin.beam;
 
-import java.util.Properties;
 import org.apache.zeppelin.java.JavaInterpreter;
 
-/** Beam interpreter */
+import java.util.Properties;
+
+/**
+ * Beam interpreter
+ */
 public class BeamInterpreter extends JavaInterpreter {
 
   public BeamInterpreter(Properties property) {
     super(property);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/bigquery/pom.xml
----------------------------------------------------------------------
diff --git a/bigquery/pom.xml b/bigquery/pom.xml
index c116c2f..66fe3f2 100644
--- a/bigquery/pom.xml
+++ b/bigquery/pom.xml
@@ -133,6 +133,13 @@
           </descriptorRefs>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 3c6dd6f..0973fda 100644
--- a/bigquery/src/main/java/org/apache/zeppelin/bigquery/BigQueryInterpreter.java
+++ b/bigquery/src/main/java/org/apache/zeppelin/bigquery/BigQueryInterpreter.java
@@ -36,6 +36,10 @@ import com.google.api.services.bigquery.model.TableCell;
 import com.google.api.services.bigquery.model.TableFieldSchema;
 import com.google.api.services.bigquery.model.TableRow;
 import com.google.common.base.Function;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -43,6 +47,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.NoSuchElementException;
 import java.util.Properties;
+
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
@@ -50,37 +55,35 @@ import org.apache.zeppelin.interpreter.InterpreterResult.Code;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * BigQuery interpreter for Zeppelin.
- *
+ * 
  * <ul>
  * <li>{@code zeppelin.bigquery.project_id} - Project ID in GCP</li>
  * <li>{@code zeppelin.bigquery.wait_time} - Query Timeout in ms</li>
  * <li>{@code zeppelin.bigquery.max_no_of_rows} - Max Result size</li>
  * </ul>
- *
+ * 
  * <p>
  * How to use: <br/>
  * {@code %bigquery.sql<br/>
  * {@code
- *  SELECT departure_airport,count(case when departure_delay>0 then 1 else 0 end) as no_of_delays
- *  FROM [bigquery-samples:airline_ontime_data.flights]
- *  group by departure_airport
- *  order by 2 desc
+ *  SELECT departure_airport,count(case when departure_delay>0 then 1 else 0 end) as no_of_delays 
+ *  FROM [bigquery-samples:airline_ontime_data.flights] 
+ *  group by departure_airport 
+ *  order by 2 desc 
  *  limit 10
  * }
  * </p>
- *
+ * 
  */
 public class BigQueryInterpreter extends Interpreter {
   private static Logger logger = LoggerFactory.getLogger(BigQueryInterpreter.class);
   private static final char NEWLINE = '\n';
   private static final char TAB = '\t';
   private static Bigquery service = null;
-  // Mutex created to create the singleton in thread-safe fashion.
+  //Mutex created to create the singleton in thread-safe fashion.
   private static Object serviceLock = new Object();
 
   static final String PROJECT_ID = "zeppelin.bigquery.project_id";
@@ -96,16 +99,16 @@ public class BigQueryInterpreter extends Interpreter {
 
   private static final Function<CharSequence, String> sequenceToStringTransformer =
       new Function<CharSequence, String>() {
-        public String apply(CharSequence seq) {
-          return seq.toString();
-        }
-      };
+      public String apply(CharSequence seq) {
+        return seq.toString();
+      }
+    };
 
   public BigQueryInterpreter(Properties property) {
     super(property);
   }
 
-  // Function to return valid BigQuery Service
+  //Function to return valid BigQuery Service
   @Override
   public void open() {
     if (service == null) {
@@ -117,7 +120,7 @@ public class BigQueryInterpreter extends Interpreter {
             logger.info("Opened BigQuery SQL Connection");
           } catch (IOException e) {
             logger.error("Cannot open connection", e);
-            exceptionOnConnect = e;
+            exceptionOnConnect = e;   
             close();
           }
         }
@@ -125,11 +128,11 @@ public class BigQueryInterpreter extends Interpreter {
     }
   }
 
-  // Function that Creates an authorized client to Google Bigquery.
+  //Function that Creates an authorized client to Google Bigquery.
   private static Bigquery createAuthorizedClient() throws IOException {
     HttpTransport transport = new NetHttpTransport();
     JsonFactory jsonFactory = new JacksonFactory();
-    GoogleCredential credential = GoogleCredential.getApplicationDefault(transport, jsonFactory);
+    GoogleCredential credential =  GoogleCredential.getApplicationDefault(transport, jsonFactory);
 
     if (credential.createScopedRequired()) {
       Collection<String> bigqueryScopes = BigqueryScopes.all();
@@ -137,16 +140,15 @@ public class BigQueryInterpreter extends Interpreter {
     }
 
     return new Bigquery.Builder(transport, jsonFactory, credential)
-        .setApplicationName("Zeppelin/1.0 (GPN:Apache Zeppelin;)")
-        .build();
+        .setApplicationName("Zeppelin/1.0 (GPN:Apache Zeppelin;)").build();
   }
 
-  // Function that generates and returns the schema and the rows as string
+  //Function that generates and returns the schema and the rows as string
   public static String printRows(final GetQueryResultsResponse response) {
     StringBuilder msg = new StringBuilder();
     try {
       List<String> schemNames = new ArrayList<String>();
-      for (TableFieldSchema schem : response.getSchema().getFields()) {
+      for (TableFieldSchema schem: response.getSchema().getFields()) {
         schemNames.add(schem.getName());
       }
       msg.append(Joiner.on(TAB).join(schemNames));
@@ -165,34 +167,32 @@ public class BigQueryInterpreter extends Interpreter {
     }
   }
 
-  // Function to poll a job for completion. Future use
-  public static Job pollJob(final Bigquery.Jobs.Get request, final long interval)
+  //Function to poll a job for completion. Future use
+  public static Job pollJob(final Bigquery.Jobs.Get request, final long interval) 
       throws IOException, InterruptedException {
     Job job = request.execute();
     while (!job.getStatus().getState().equals("DONE")) {
-      System.out.println(
-          "Job is " + job.getStatus().getState() + " waiting " + interval + " milliseconds...");
+      System.out.println("Job is " 
+          + job.getStatus().getState() 
+          + " waiting " + interval + " milliseconds...");
       Thread.sleep(interval);
       job = request.execute();
     }
     return job;
   }
 
-  // Function to page through the results of an arbitrary bigQuery request
+  //Function to page through the results of an arbitrary bigQuery request
   public static <T extends GenericJson> Iterator<T> getPages(
       final BigqueryRequest<T> requestTemplate) {
     class PageIterator implements Iterator<T> {
       private BigqueryRequest<T> request;
       private boolean hasNext = true;
-
       PageIterator(final BigqueryRequest<T> requestTemplate) {
         this.request = requestTemplate;
       }
-
       public boolean hasNext() {
         return hasNext;
       }
-
       public T next() {
         if (!hasNext) {
           throw new NoSuchElementException();
@@ -217,8 +217,8 @@ public class BigQueryInterpreter extends Interpreter {
 
     return new PageIterator(requestTemplate);
   }
-
-  // Function to call bigQuery to run SQL and return results to the Interpreter for output
+  
+  //Function to call bigQuery to run SQL and return results to the Interpreter for output
   private InterpreterResult executeSql(String sql) {
     int counter = 0;
     StringBuilder finalmessage = null;
@@ -256,31 +256,25 @@ public class BigQueryInterpreter extends Interpreter {
     }
   }
 
-  // Function to run the SQL on bigQuery service
-  public static Iterator<GetQueryResultsResponse> run(
-      final String queryString,
-      final String projId,
-      final long wTime,
-      final long maxRows,
-      Boolean useLegacySql)
-      throws IOException {
+  //Function to run the SQL on bigQuery service
+  public static Iterator<GetQueryResultsResponse> run(final String queryString,
+      final String projId, final long wTime, final long maxRows, Boolean useLegacySql)
+          throws IOException {
     try {
       logger.info("Use legacy sql: {}", useLegacySql);
       QueryResponse query;
-      query =
-          service
-              .jobs()
-              .query(
-                  projId,
-                  new QueryRequest()
-                      .setTimeoutMs(wTime)
-                      .setUseLegacySql(useLegacySql)
-                      .setQuery(queryString)
-                      .setMaxResults(maxRows))
-              .execute();
+      query = service
+          .jobs()
+          .query(
+              projId,
+              new QueryRequest().setTimeoutMs(wTime)
+                  .setUseLegacySql(useLegacySql).setQuery(queryString)
+                  .setMaxResults(maxRows)).execute();
       jobId = query.getJobReference().getJobId();
       projectId = query.getJobReference().getProjectId();
-      GetQueryResults getRequest = service.jobs().getQueryResults(projectId, jobId);
+      GetQueryResults getRequest = service.jobs().getQueryResults(
+          projectId,
+          jobId);
       return getPages(getRequest);
     } catch (IOException ex) {
       throw ex;
@@ -302,8 +296,8 @@ public class BigQueryInterpreter extends Interpreter {
 
   @Override
   public Scheduler getScheduler() {
-    return SchedulerFactory.singleton()
-        .createOrGetFIFOScheduler(BigQueryInterpreter.class.getName() + this.hashCode());
+    return SchedulerFactory.singleton().createOrGetFIFOScheduler(
+        BigQueryInterpreter.class.getName() + this.hashCode());
   }
 
   @Override
@@ -335,8 +329,8 @@ public class BigQueryInterpreter extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return NO_COMPLETION;
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 b5411c8..9dcd9f8 100644
--- a/bigquery/src/test/java/org/apache/zeppelin/bigquery/BigQueryInterpreterTest.java
+++ b/bigquery/src/test/java/org/apache/zeppelin/bigquery/BigQueryInterpreterTest.java
@@ -21,15 +21,18 @@ import static org.junit.Assert.assertEquals;
 import com.google.gson.Gson;
 import com.google.gson.JsonIOException;
 import com.google.gson.JsonSyntaxException;
+
+import org.junit.Before;
+import org.junit.Test;
+
 import java.io.FileNotFoundException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.util.Properties;
+
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterGroup;
 import org.apache.zeppelin.interpreter.InterpreterResult;
-import org.junit.Before;
-import org.junit.Test;
 
 public class BigQueryInterpreterTest {
   protected static class Constants {
@@ -45,7 +48,7 @@ public class BigQueryInterpreterTest {
       return oneQuery;
     }
 
-    public String getWrong() {
+    public String getWrong()  {
       return wrongQuery;
     }
   }
@@ -95,8 +98,8 @@ public class BigQueryInterpreterTest {
 
   @Test
   public void testWithQueryPrefix() {
-    InterpreterResult ret =
-        bqInterpreter.interpret("#standardSQL\n WITH t AS (select 1) SELECT * FROM t", context);
+    InterpreterResult ret = bqInterpreter.interpret(
+        "#standardSQL\n WITH t AS (select 1) SELECT * FROM t", context);
     assertEquals(InterpreterResult.Code.SUCCESS, ret.code());
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/cassandra/pom.xml
----------------------------------------------------------------------
diff --git a/cassandra/pom.xml b/cassandra/pom.xml
index a07ed82..c5b08f7 100644
--- a/cassandra/pom.xml
+++ b/cassandra/pom.xml
@@ -249,6 +249,13 @@
             <plugin>
                 <artifactId>maven-resources-plugin</artifactId>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <configuration>
+                    <skip>false</skip>
+                </configuration>
+            </plugin>
         </plugins>
 
     </build>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/cassandra/src/main/java/org/apache/zeppelin/cassandra/CassandraInterpreter.java
----------------------------------------------------------------------
diff --git a/cassandra/src/main/java/org/apache/zeppelin/cassandra/CassandraInterpreter.java b/cassandra/src/main/java/org/apache/zeppelin/cassandra/CassandraInterpreter.java
index 65e40e5..105e271 100644
--- a/cassandra/src/main/java/org/apache/zeppelin/cassandra/CassandraInterpreter.java
+++ b/cassandra/src/main/java/org/apache/zeppelin/cassandra/CassandraInterpreter.java
@@ -18,10 +18,9 @@ package org.apache.zeppelin.cassandra;
 
 import static java.lang.Integer.parseInt;
 
-import com.datastax.driver.core.Cluster;
-import com.datastax.driver.core.JdkSSLOptions;
-import com.datastax.driver.core.ProtocolOptions.Compression;
-import com.datastax.driver.core.Session;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.InputStream;
 import java.nio.file.Files;
 import java.nio.file.Paths;
@@ -29,24 +28,31 @@ import java.security.KeyStore;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Properties;
+
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.TrustManagerFactory;
+
+import com.datastax.driver.core.Cluster;
+import com.datastax.driver.core.JdkSSLOptions;
+import com.datastax.driver.core.ProtocolOptions.Compression;
+import com.datastax.driver.core.Session;
+
 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.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Interpreter for Apache Cassandra CQL query language. */
+/**
+ * Interpreter for Apache Cassandra CQL query language.
+ */
 public class CassandraInterpreter extends Interpreter {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(CassandraInterpreter.class);
 
   public static final String CASSANDRA_INTERPRETER_PARALLELISM =
-      "cassandra.interpreter.parallelism";
+          "cassandra.interpreter.parallelism";
   public static final String CASSANDRA_HOSTS = "cassandra.hosts";
   public static final String CASSANDRA_PORT = "cassandra.native.port";
   public static final String CASSANDRA_PROTOCOL_VERSION = "cassandra.protocol.version";
@@ -59,54 +65,62 @@ public class CassandraInterpreter extends Interpreter {
   public static final String CASSANDRA_RETRY_POLICY = "cassandra.retry.policy";
   public static final String CASSANDRA_RECONNECTION_POLICY = "cassandra.reconnection.policy";
   public static final String CASSANDRA_SPECULATIVE_EXECUTION_POLICY =
-      "cassandra.speculative.execution.policy";
+          "cassandra.speculative.execution.policy";
   public static final String CASSANDRA_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS =
-      "cassandra.max.schema.agreement.wait.second";
+          "cassandra.max.schema.agreement.wait.second";
   public static final String CASSANDRA_POOLING_NEW_CONNECTION_THRESHOLD_LOCAL =
-      "cassandra.pooling.new.connection.threshold.local";
+          "cassandra.pooling.new.connection.threshold.local";
   public static final String CASSANDRA_POOLING_NEW_CONNECTION_THRESHOLD_REMOTE =
-      "cassandra.pooling.new.connection.threshold.remote";
+          "cassandra.pooling.new.connection.threshold.remote";
   public static final String CASSANDRA_POOLING_MAX_CONNECTION_PER_HOST_LOCAL =
-      "cassandra.pooling.max.connection.per.host.local";
+          "cassandra.pooling.max.connection.per.host.local";
   public static final String CASSANDRA_POOLING_MAX_CONNECTION_PER_HOST_REMOTE =
-      "cassandra.pooling.max.connection.per.host.remote";
+          "cassandra.pooling.max.connection.per.host.remote";
   public static final String CASSANDRA_POOLING_CORE_CONNECTION_PER_HOST_LOCAL =
-      "cassandra.pooling.core.connection.per.host.local";
+          "cassandra.pooling.core.connection.per.host.local";
   public static final String CASSANDRA_POOLING_CORE_CONNECTION_PER_HOST_REMOTE =
-      "cassandra.pooling.core.connection.per.host.remote";
+          "cassandra.pooling.core.connection.per.host.remote";
   public static final String CASSANDRA_POOLING_MAX_REQUESTS_PER_CONNECTION_LOCAL =
-      "cassandra.pooling.max.request.per.connection.local";
+          "cassandra.pooling.max.request.per.connection.local";
   public static final String CASSANDRA_POOLING_MAX_REQUESTS_PER_CONNECTION_REMOTE =
-      "cassandra.pooling.max.request.per.connection.remote";
+          "cassandra.pooling.max.request.per.connection.remote";
   public static final String CASSANDRA_POOLING_IDLE_TIMEOUT_SECONDS =
-      "cassandra.pooling.idle.timeout.seconds";
+          "cassandra.pooling.idle.timeout.seconds";
   public static final String CASSANDRA_POOLING_POOL_TIMEOUT_MILLIS =
-      "cassandra.pooling.pool.timeout.millisecs";
+          "cassandra.pooling.pool.timeout.millisecs";
   public static final String CASSANDRA_POOLING_HEARTBEAT_INTERVAL_SECONDS =
-      "cassandra.pooling.heartbeat.interval.seconds";
+          "cassandra.pooling.heartbeat.interval.seconds";
   public static final String CASSANDRA_QUERY_DEFAULT_CONSISTENCY =
-      "cassandra.query.default.consistency";
+          "cassandra.query.default.consistency";
   public static final String CASSANDRA_QUERY_DEFAULT_SERIAL_CONSISTENCY =
-      "cassandra.query.default.serial.consistency";
+          "cassandra.query.default.serial.consistency";
   public static final String CASSANDRA_QUERY_DEFAULT_FETCH_SIZE =
-      "cassandra.query.default.fetchSize";
+          "cassandra.query.default.fetchSize";
   public static final String CASSANDRA_QUERY_DEFAULT_IDEMPOTENCE =
-      "cassandra.query.default.idempotence";
+          "cassandra.query.default.idempotence";
   public static final String CASSANDRA_SOCKET_CONNECTION_TIMEOUT_MILLIS =
-      "cassandra.socket.connection.timeout.millisecs";
-  public static final String CASSANDRA_SOCKET_KEEP_ALIVE = "cassandra.socket.keep.alive";
+          "cassandra.socket.connection.timeout.millisecs";
+  public static final String CASSANDRA_SOCKET_KEEP_ALIVE =
+          "cassandra.socket.keep.alive";
   public static final String CASSANDRA_SOCKET_READ_TIMEOUT_MILLIS =
-      "cassandra.socket.read.timeout.millisecs";
+          "cassandra.socket.read.timeout.millisecs";
   public static final String CASSANDRA_SOCKET_RECEIVED_BUFFER_SIZE_BYTES =
-      "cassandra.socket.received.buffer.size.bytes";
-  public static final String CASSANDRA_SOCKET_REUSE_ADDRESS = "cassandra.socket.reuse.address";
+          "cassandra.socket.received.buffer.size.bytes";
+  public static final String CASSANDRA_SOCKET_REUSE_ADDRESS =
+          "cassandra.socket.reuse.address";
   public static final String CASSANDRA_SOCKET_SEND_BUFFER_SIZE_BYTES =
-      "cassandra.socket.send.buffer.size.bytes";
-  public static final String CASSANDRA_SOCKET_SO_LINGER = "cassandra.socket.soLinger";
-  public static final String CASSANDRA_SOCKET_TCP_NO_DELAY = "cassandra.socket.tcp.no_delay";
-  public static final String CASSANDRA_WITH_SSL = "cassandra.ssl.enabled";
-  public static final String CASSANDRA_TRUSTSTORE_PATH = "cassandra.ssl.truststore.path";
-  public static final String CASSANDRA_TRUSTSTORE_PASSWORD = "cassandra.ssl.truststore.password";
+          "cassandra.socket.send.buffer.size.bytes";
+  public static final String CASSANDRA_SOCKET_SO_LINGER =
+          "cassandra.socket.soLinger";
+  public static final String CASSANDRA_SOCKET_TCP_NO_DELAY =
+          "cassandra.socket.tcp.no_delay";
+  public static final String CASSANDRA_WITH_SSL =
+          "cassandra.ssl.enabled";
+  public static final String CASSANDRA_TRUSTSTORE_PATH =
+          "cassandra.ssl.truststore.path";
+  public static final String CASSANDRA_TRUSTSTORE_PASSWORD =
+          "cassandra.ssl.truststore.password";
+
 
   public static final String DEFAULT_HOST = "localhost";
   public static final String DEFAULT_PORT = "9042";
@@ -163,30 +177,25 @@ public class CassandraInterpreter extends Interpreter {
       hosts.append(address).append(",");
     }
 
-    LOGGER.info(
-        "Bootstrapping Cassandra Java Driver to connect to "
-            + hosts.toString()
-            + "on port "
-            + port);
+    LOGGER.info("Bootstrapping Cassandra Java Driver to connect to " + hosts.toString() +
+            "on port " + port);
 
     Compression compression = driverConfig.getCompressionProtocol(this);
 
-    clusterBuilder =
-        Cluster.builder()
+    clusterBuilder = Cluster.builder()
             .addContactPoints(addresses)
             .withPort(port)
             .withProtocolVersion(driverConfig.getProtocolVersion(this))
             .withClusterName(getProperty(CASSANDRA_CLUSTER_NAME))
             .withCompression(compression)
-            .withCredentials(
-                getProperty(CASSANDRA_CREDENTIALS_USERNAME),
-                getProperty(CASSANDRA_CREDENTIALS_PASSWORD))
+            .withCredentials(getProperty(CASSANDRA_CREDENTIALS_USERNAME),
+                    getProperty(CASSANDRA_CREDENTIALS_PASSWORD))
             .withLoadBalancingPolicy(driverConfig.getLoadBalancingPolicy(this))
             .withRetryPolicy(driverConfig.getRetryPolicy(this))
             .withReconnectionPolicy(driverConfig.getReconnectionPolicy(this))
             .withSpeculativeExecutionPolicy(driverConfig.getSpeculativeExecutionPolicy(this))
             .withMaxSchemaAgreementWaitSeconds(
-                parseInt(getProperty(CASSANDRA_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS)))
+                    parseInt(getProperty(CASSANDRA_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS)))
             .withPoolingOptions(driverConfig.getPoolingOptions(this))
             .withQueryOptions(driverConfig.getQueryOptions(this))
             .withSocketOptions(driverConfig.getSocketOptions(this));
@@ -199,19 +208,20 @@ public class CassandraInterpreter extends Interpreter {
         final SSLContext sslContext;
         {
           final KeyStore trustStore = KeyStore.getInstance("JKS");
-          final InputStream stream =
-              Files.newInputStream(Paths.get(getProperty(CASSANDRA_TRUSTSTORE_PATH)));
+          final InputStream stream = Files.newInputStream(Paths.get(
+                  getProperty(CASSANDRA_TRUSTSTORE_PATH)));
           trustStore.load(stream, getProperty(CASSANDRA_TRUSTSTORE_PASSWORD).toCharArray());
 
-          final TrustManagerFactory trustManagerFactory =
-              TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
+          final TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(
+                  TrustManagerFactory.getDefaultAlgorithm());
           trustManagerFactory.init(trustStore);
 
           sslContext = SSLContext.getInstance("TLS");
           sslContext.init(null, trustManagerFactory.getTrustManagers(), null);
         }
-        clusterBuilder =
-            clusterBuilder.withSSL(JdkSSLOptions.builder().withSSLContext(sslContext).build());
+        clusterBuilder = clusterBuilder.withSSL(JdkSSLOptions.builder()
+                .withSSLContext(sslContext)
+                .build());
       } catch (Exception e) {
         LOGGER.error(e.toString());
       }
@@ -236,7 +246,8 @@ public class CassandraInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+  }
 
   @Override
   public FormType getFormType() {
@@ -249,16 +260,15 @@ public class CassandraInterpreter extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return NO_COMPLETION;
   }
 
   @Override
   public Scheduler getScheduler() {
     return SchedulerFactory.singleton()
-        .createOrGetParallelScheduler(
-            CassandraInterpreter.class.getName() + this.hashCode(),
-            parseInt(getProperty(CASSANDRA_INTERPRETER_PARALLELISM)));
+            .createOrGetParallelScheduler(CassandraInterpreter.class.getName() + this.hashCode(),
+                    parseInt(getProperty(CASSANDRA_INTERPRETER_PARALLELISM)));
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/cassandra/src/main/java/org/apache/zeppelin/cassandra/ParsingException.java
----------------------------------------------------------------------
diff --git a/cassandra/src/main/java/org/apache/zeppelin/cassandra/ParsingException.java b/cassandra/src/main/java/org/apache/zeppelin/cassandra/ParsingException.java
index 20e1971..b87e8b2 100644
--- a/cassandra/src/main/java/org/apache/zeppelin/cassandra/ParsingException.java
+++ b/cassandra/src/main/java/org/apache/zeppelin/cassandra/ParsingException.java
@@ -16,8 +16,10 @@
  */
 package org.apache.zeppelin.cassandra;
 
-/** Parsing Exception for Cassandra CQL statement. */
-public class ParsingException extends RuntimeException {
+/**
+ * Parsing Exception for Cassandra CQL statement.
+ */
+public class ParsingException extends RuntimeException{
   public ParsingException(String message) {
     super(message);
   }


[05/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumTest.java
index 3357151..bdd639e 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumTest.java
@@ -16,28 +16,27 @@
  */
 package org.apache.zeppelin.helium;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
 import com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException;
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
 import org.apache.commons.io.FileUtils;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 public class HeliumTest {
   private File tmpDir;
   private File localRegistryPath;
 
   @Before
   public void setUp() throws Exception {
-    tmpDir =
-        new File(
-            System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis());
+    tmpDir = new File(System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis());
     tmpDir.mkdirs();
     localRegistryPath = new File(tmpDir, "helium");
     localRegistryPath.mkdirs();
@@ -52,14 +51,8 @@ public class HeliumTest {
   public void testSaveLoadConf() throws IOException, URISyntaxException, TaskRunnerException {
     // given
     File heliumConf = new File(tmpDir, "helium.conf");
-    Helium helium =
-        new Helium(
-            heliumConf.getAbsolutePath(),
-            localRegistryPath.getAbsolutePath(),
-            null,
-            null,
-            null,
-            null);
+    Helium helium = new Helium(heliumConf.getAbsolutePath(), localRegistryPath.getAbsolutePath(),
+        null, null, null, null);
     assertFalse(heliumConf.exists());
 
     // when
@@ -69,55 +62,40 @@ public class HeliumTest {
     assertTrue(heliumConf.exists());
 
     // then load without exception
-    Helium heliumRestored =
-        new Helium(
-            heliumConf.getAbsolutePath(),
-            localRegistryPath.getAbsolutePath(),
-            null,
-            null,
-            null,
-            null);
+    Helium heliumRestored = new Helium(
+        heliumConf.getAbsolutePath(), localRegistryPath.getAbsolutePath(), null, null, null, null);
   }
 
   @Test
-  public void testRestoreRegistryInstances()
-      throws IOException, URISyntaxException, TaskRunnerException {
+  public void testRestoreRegistryInstances() throws IOException, URISyntaxException, TaskRunnerException {
     File heliumConf = new File(tmpDir, "helium.conf");
-    Helium helium =
-        new Helium(
-            heliumConf.getAbsolutePath(),
-            localRegistryPath.getAbsolutePath(),
-            null,
-            null,
-            null,
-            null);
+    Helium helium = new Helium(
+        heliumConf.getAbsolutePath(), localRegistryPath.getAbsolutePath(), null, null, null, null);
     HeliumTestRegistry registry1 = new HeliumTestRegistry("r1", "r1");
     HeliumTestRegistry registry2 = new HeliumTestRegistry("r2", "r2");
     helium.addRegistry(registry1);
     helium.addRegistry(registry2);
 
     // when
-    registry1.add(
-        new HeliumPackage(
-            HeliumType.APPLICATION,
-            "name1",
-            "desc1",
-            "artifact1",
-            "className1",
-            new String[][] {},
-            "",
-            ""));
-
-    registry2.add(
-        new HeliumPackage(
-            HeliumType.APPLICATION,
-            "name2",
-            "desc2",
-            "artifact2",
-            "className2",
-            new String[][] {},
-            "",
-            ""));
+    registry1.add(new HeliumPackage(
+        HeliumType.APPLICATION,
+        "name1",
+        "desc1",
+        "artifact1",
+        "className1",
+        new String[][]{},
+        "",
+        ""));
+
+    registry2.add(new HeliumPackage(
+        HeliumType.APPLICATION,
+        "name2",
+        "desc2",
+        "artifact2",
+        "className2",
+        new String[][]{},
+        "",
+        ""));
 
     // then
     assertEquals(2, helium.getAllPackageInfo().size());
@@ -126,43 +104,35 @@ public class HeliumTest {
   @Test
   public void testRefresh() throws IOException, URISyntaxException, TaskRunnerException {
     File heliumConf = new File(tmpDir, "helium.conf");
-    Helium helium =
-        new Helium(
-            heliumConf.getAbsolutePath(),
-            localRegistryPath.getAbsolutePath(),
-            null,
-            null,
-            null,
-            null);
+    Helium helium = new Helium(
+        heliumConf.getAbsolutePath(), localRegistryPath.getAbsolutePath(), null, null, null, null);
     HeliumTestRegistry registry1 = new HeliumTestRegistry("r1", "r1");
     helium.addRegistry(registry1);
 
     // when
-    registry1.add(
-        new HeliumPackage(
-            HeliumType.APPLICATION,
-            "name1",
-            "desc1",
-            "artifact1",
-            "className1",
-            new String[][] {},
-            "",
-            ""));
+    registry1.add(new HeliumPackage(
+        HeliumType.APPLICATION,
+        "name1",
+        "desc1",
+        "artifact1",
+        "className1",
+        new String[][]{},
+        "",
+        ""));
 
     // then
     assertEquals(1, helium.getAllPackageInfo().size());
 
     // when
-    registry1.add(
-        new HeliumPackage(
-            HeliumType.APPLICATION,
-            "name2",
-            "desc2",
-            "artifact2",
-            "className2",
-            new String[][] {},
-            "",
-            ""));
+    registry1.add(new HeliumPackage(
+        HeliumType.APPLICATION,
+        "name2",
+        "desc2",
+        "artifact2",
+        "className2",
+        new String[][]{},
+        "",
+        ""));
 
     // then
     assertEquals(2, helium.getAllPackageInfo(true, null).size());

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumTestApplication.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumTestApplication.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumTestApplication.java
index f13eec3..2e66a3f 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumTestApplication.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumTestApplication.java
@@ -16,13 +16,13 @@
  */
 package org.apache.zeppelin.helium;
 
+import org.apache.zeppelin.resource.ResourceSet;
+
 import java.io.IOException;
 import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.zeppelin.resource.ResourceSet;
 
 public class HeliumTestApplication extends Application {
   private AtomicInteger numRun = new AtomicInteger(0);
-
   public HeliumTestApplication(ApplicationContext context) {
     super(context);
   }
@@ -39,5 +39,7 @@ public class HeliumTestApplication extends Application {
   }
 
   @Override
-  public void unload() throws ApplicationException {}
+  public void unload() throws ApplicationException {
+
+  }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumTestRegistry.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumTestRegistry.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumTestRegistry.java
index e8ab9c1..a7b1538 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumTestRegistry.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumTestRegistry.java
@@ -17,6 +17,7 @@
 package org.apache.zeppelin.helium;
 
 import java.io.IOException;
+import java.net.URI;
 import java.util.LinkedList;
 import java.util.List;
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/AbstractInterpreterTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/AbstractInterpreterTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/AbstractInterpreterTest.java
index 3476d74..cd556a6 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/AbstractInterpreterTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/AbstractInterpreterTest.java
@@ -1,8 +1,5 @@
 package org.apache.zeppelin.interpreter;
 
-import static org.mockito.Mockito.mock;
-
-import java.io.File;
 import org.apache.commons.io.FileUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.display.AngularObjectRegistryListener;
@@ -14,11 +11,17 @@ import org.junit.Before;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+
+import static org.mockito.Mockito.mock;
+
 /**
- * This class will load configuration files under src/test/resources/interpreter
- * src/test/resources/conf
+ * This class will load configuration files under
+ *   src/test/resources/interpreter
+ *   src/test/resources/conf
+ *
+ * to construct InterpreterSettingManager and InterpreterFactory properly
  *
- * <p>to construct InterpreterSettingManager and InterpreterFactory properly
  */
 public abstract class AbstractInterpreterTest {
   protected static final Logger LOGGER = LoggerFactory.getLogger(AbstractInterpreterTest.class);
@@ -47,26 +50,15 @@ public abstract class AbstractInterpreterTest {
     FileUtils.copyDirectory(new File("src/test/resources/interpreter"), interpreterDir);
     FileUtils.copyDirectory(new File("src/test/resources/conf"), confDir);
 
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(), zeppelinHome.getAbsolutePath());
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_CONF_DIR.getVarName(), confDir.getAbsolutePath());
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_DIR.getVarName(),
-        interpreterDir.getAbsolutePath());
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(),
-        notebookDir.getAbsolutePath());
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_GROUP_DEFAULT.getVarName(), "test");
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(), zeppelinHome.getAbsolutePath());
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_CONF_DIR.getVarName(), confDir.getAbsolutePath());
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_DIR.getVarName(), interpreterDir.getAbsolutePath());
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), notebookDir.getAbsolutePath());
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_GROUP_DEFAULT.getVarName(), "test");
 
     conf = new ZeppelinConfiguration();
-    interpreterSettingManager =
-        new InterpreterSettingManager(
-            conf,
-            mock(AngularObjectRegistryListener.class),
-            mock(RemoteInterpreterProcessListener.class),
-            mock(ApplicationEventListener.class));
+    interpreterSettingManager = new InterpreterSettingManager(conf,
+        mock(AngularObjectRegistryListener.class), mock(RemoteInterpreterProcessListener.class), mock(ApplicationEventListener.class));
     interpreterFactory = new InterpreterFactory(interpreterSettingManager);
   }
 
@@ -79,19 +71,13 @@ public abstract class AbstractInterpreterTest {
   }
 
   protected Note createNote() {
-    return new Note(
-        "test",
-        "test",
-        null,
-        interpreterFactory,
-        interpreterSettingManager,
-        null,
-        null,
-        null,
-        null);
+    return new Note("test", "test", null, interpreterFactory, interpreterSettingManager, null, null, null, null);
   }
 
   protected InterpreterContext createDummyInterpreterContext() {
-    return InterpreterContext.builder().setNoteId("noteId").setParagraphId("paragraphId").build();
+    return InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .build();
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/ConfInterpreterTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/ConfInterpreterTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/ConfInterpreterTest.java
index 9e73590..d39b0ec 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/ConfInterpreterTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/ConfInterpreterTest.java
@@ -17,35 +17,31 @@
 
 package org.apache.zeppelin.interpreter;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
 import org.apache.zeppelin.interpreter.remote.RemoteInterpreter;
 import org.junit.Test;
 
+import java.io.IOException;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 public class ConfInterpreterTest extends AbstractInterpreterTest {
 
   @Test
   public void testCorrectConf() throws IOException, InterpreterException {
-    assertTrue(
-        interpreterFactory.getInterpreter("user1", "note1", "test.conf", "test")
-            instanceof ConfInterpreter);
-    ConfInterpreter confInterpreter =
-        (ConfInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test.conf", "test");
+    assertTrue(interpreterFactory.getInterpreter("user1", "note1", "test.conf", "test") instanceof ConfInterpreter);
+    ConfInterpreter confInterpreter = (ConfInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test.conf", "test");
 
-    InterpreterContext context =
-        InterpreterContext.builder().setNoteId("noteId").setParagraphId("paragraphId").build();
+    InterpreterContext context = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .build();
 
-    InterpreterResult result =
-        confInterpreter.interpret("property_1\tnew_value\nnew_property\tdummy_value", context);
+    InterpreterResult result = confInterpreter.interpret("property_1\tnew_value\nnew_property\tdummy_value", context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code);
 
-    assertTrue(
-        interpreterFactory.getInterpreter("user1", "note1", "test", "test")
-            instanceof RemoteInterpreter);
-    RemoteInterpreter remoteInterpreter =
-        (RemoteInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test", "test");
+    assertTrue(interpreterFactory.getInterpreter("user1", "note1", "test", "test") instanceof RemoteInterpreter);
+    RemoteInterpreter remoteInterpreter = (RemoteInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test", "test");
     remoteInterpreter.interpret("hello world", context);
     assertEquals(7, remoteInterpreter.getProperties().size());
     assertEquals("new_value", remoteInterpreter.getProperty("property_1"));
@@ -57,51 +53,46 @@ public class ConfInterpreterTest extends AbstractInterpreterTest {
     assertEquals(InterpreterResult.Code.SUCCESS, result.code);
 
     // run the paragraph with the same properties would result in ERROR
-    result =
-        confInterpreter.interpret("property_1\tnew_value_2\nnew_property\tdummy_value", context);
+    result = confInterpreter.interpret("property_1\tnew_value_2\nnew_property\tdummy_value", context);
     assertEquals(InterpreterResult.Code.ERROR, result.code);
   }
 
   @Test
   public void testEmptyConf() throws IOException, InterpreterException {
-    assertTrue(
-        interpreterFactory.getInterpreter("user1", "note1", "test.conf", "test")
-            instanceof ConfInterpreter);
-    ConfInterpreter confInterpreter =
-        (ConfInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test.conf", "test");
-
-    InterpreterContext context =
-        InterpreterContext.builder().setNoteId("noteId").setParagraphId("paragraphId").build();
+    assertTrue(interpreterFactory.getInterpreter("user1", "note1", "test.conf", "test") instanceof ConfInterpreter);
+    ConfInterpreter confInterpreter = (ConfInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test.conf", "test");
+
+    InterpreterContext context = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .build();
     InterpreterResult result = confInterpreter.interpret("", context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code);
 
-    assertTrue(
-        interpreterFactory.getInterpreter("user1", "note1", "test", "test")
-            instanceof RemoteInterpreter);
-    RemoteInterpreter remoteInterpreter =
-        (RemoteInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test", "test");
+    assertTrue(interpreterFactory.getInterpreter("user1", "note1", "test", "test") instanceof RemoteInterpreter);
+    RemoteInterpreter remoteInterpreter = (RemoteInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test", "test");
     assertEquals(6, remoteInterpreter.getProperties().size());
     assertEquals("value_1", remoteInterpreter.getProperty("property_1"));
     assertEquals("value_3", remoteInterpreter.getProperty("property_3"));
   }
 
+
   @Test
   public void testRunningAfterOtherInterpreter() throws IOException, InterpreterException {
-    assertTrue(
-        interpreterFactory.getInterpreter("user1", "note1", "test.conf", "test")
-            instanceof ConfInterpreter);
-    ConfInterpreter confInterpreter =
-        (ConfInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test.conf", "test");
+    assertTrue(interpreterFactory.getInterpreter("user1", "note1", "test.conf", "test") instanceof ConfInterpreter);
+    ConfInterpreter confInterpreter = (ConfInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test.conf", "test");
 
-    InterpreterContext context =
-        InterpreterContext.builder().setNoteId("noteId").setParagraphId("paragraphId").build();
+    InterpreterContext context = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .build();
 
-    RemoteInterpreter remoteInterpreter =
-        (RemoteInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test", "test");
+    RemoteInterpreter remoteInterpreter = (RemoteInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test", "test");
     InterpreterResult result = remoteInterpreter.interpret("hello world", context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code);
 
     result = confInterpreter.interpret("property_1\tnew_value\nnew_property\tdummy_value", context);
     assertEquals(InterpreterResult.Code.ERROR, result.code);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/DoubleEchoInterpreter.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/DoubleEchoInterpreter.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/DoubleEchoInterpreter.java
index 13d72c2..be3d5be 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/DoubleEchoInterpreter.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/DoubleEchoInterpreter.java
@@ -15,10 +15,12 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.interpreter;
 
 import java.util.Properties;
 
+
 public class DoubleEchoInterpreter extends Interpreter {
 
   public DoubleEchoInterpreter(Properties property) {
@@ -26,10 +28,14 @@ public class DoubleEchoInterpreter extends Interpreter {
   }
 
   @Override
-  public void open() {}
+  public void open() {
+
+  }
 
   @Override
-  public void close() {}
+  public void close() {
+
+  }
 
   @Override
   public InterpreterResult interpret(String st, InterpreterContext context) {
@@ -37,7 +43,9 @@ public class DoubleEchoInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+
+  }
 
   @Override
   public FormType getFormType() {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/EchoInterpreter.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/EchoInterpreter.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/EchoInterpreter.java
index e7ac62d..cf1713f 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/EchoInterpreter.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/EchoInterpreter.java
@@ -15,11 +15,14 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.interpreter;
 
 import java.util.Properties;
 
-/** Just return the received statement back */
+/**
+ * Just return the received statement back
+ */
 public class EchoInterpreter extends Interpreter {
 
   public EchoInterpreter(Properties property) {
@@ -27,10 +30,14 @@ public class EchoInterpreter extends Interpreter {
   }
 
   @Override
-  public void open() {}
+  public void open() {
+
+  }
 
   @Override
-  public void close() {}
+  public void close() {
+
+  }
 
   @Override
   public InterpreterResult interpret(String st, InterpreterContext context) {
@@ -42,7 +49,9 @@ public class EchoInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+
+  }
 
   @Override
   public FormType getFormType() {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/FlinkIntegrationTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/FlinkIntegrationTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/FlinkIntegrationTest.java
index 0148c4d..57aacdb 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/FlinkIntegrationTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/FlinkIntegrationTest.java
@@ -1,12 +1,5 @@
 package org.apache.zeppelin.interpreter;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.EnumSet;
-import java.util.List;
 import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationsRequest;
 import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationsResponse;
 import org.apache.hadoop.yarn.api.records.YarnApplicationState;
@@ -19,6 +12,14 @@ import org.junit.runners.Parameterized;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.EnumSet;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 @RunWith(value = Parameterized.class)
 public class FlinkIntegrationTest {
   private static Logger LOGGER = LoggerFactory.getLogger(SparkIntegrationTest.class);
@@ -39,7 +40,11 @@ public class FlinkIntegrationTest {
 
   @Parameterized.Parameters
   public static List<Object[]> data() {
-    return Arrays.asList(new Object[][] {{"1.5.1"}, {"1.5.2"}});
+    return Arrays.asList(new Object[][]{
+        {"1.5.1"},
+        {"1.5.2"}
+    });
+
   }
 
   @BeforeClass
@@ -65,35 +70,26 @@ public class FlinkIntegrationTest {
 
   private void testInterpreterBasics() throws IOException, InterpreterException {
     // test FlinkInterpreter
-    Interpreter flinkInterpreter =
-        interpreterFactory.getInterpreter("user1", "note1", "flink", "flink");
+    Interpreter flinkInterpreter = interpreterFactory.getInterpreter("user1", "note1", "flink", "flink");
 
-    InterpreterContext context =
-        new InterpreterContext.Builder().setNoteId("note1").setParagraphId("paragraph_1").build();
+    InterpreterContext context = new InterpreterContext.Builder().setNoteId("note1").setParagraphId("paragraph_1").build();
     InterpreterResult interpreterResult = flinkInterpreter.interpret("1+1", context);
     assertEquals(InterpreterResult.Code.SUCCESS, interpreterResult.code);
     assertTrue(interpreterResult.msg.get(0).getData().contains("2"));
+
   }
 
   @Test
   public void testLocalMode() throws IOException, YarnException, InterpreterException {
-    InterpreterSetting flinkInterpreterSetting =
-        interpreterSettingManager.getInterpreterSettingByName("flink");
+    InterpreterSetting flinkInterpreterSetting = interpreterSettingManager.getInterpreterSettingByName("flink");
     flinkInterpreterSetting.setProperty("FLINK_HOME", flinkHome);
-    flinkInterpreterSetting.setProperty(
-        "ZEPPELIN_CONF_DIR", zeppelin.getZeppelinConfDir().getAbsolutePath());
+    flinkInterpreterSetting.setProperty("ZEPPELIN_CONF_DIR", zeppelin.getZeppelinConfDir().getAbsolutePath());
 
     testInterpreterBasics();
 
     // no yarn application launched
-    GetApplicationsRequest request =
-        GetApplicationsRequest.newInstance(EnumSet.of(YarnApplicationState.RUNNING));
-    GetApplicationsResponse response =
-        hadoopCluster
-            .getYarnCluster()
-            .getResourceManager()
-            .getClientRMService()
-            .getApplications(request);
+    GetApplicationsRequest request = GetApplicationsRequest.newInstance(EnumSet.of(YarnApplicationState.RUNNING));
+    GetApplicationsResponse response = hadoopCluster.getYarnCluster().getResourceManager().getClientRMService().getApplications(request);
     assertEquals(0, response.getApplicationList().size());
 
     interpreterSettingManager.close();
@@ -102,24 +98,16 @@ public class FlinkIntegrationTest {
   // TODO(zjffdu) enable it when make yarn integration test work
   //  @Test
   public void testYarnMode() throws IOException, InterpreterException, YarnException {
-    InterpreterSetting flinkInterpreterSetting =
-        interpreterSettingManager.getInterpreterSettingByName("flink");
+    InterpreterSetting flinkInterpreterSetting = interpreterSettingManager.getInterpreterSettingByName("flink");
     flinkInterpreterSetting.setProperty("HADOOP_CONF_DIR", hadoopCluster.getConfigPath());
     flinkInterpreterSetting.setProperty("FLINK_HOME", flinkHome);
-    flinkInterpreterSetting.setProperty(
-        "ZEPPELIN_CONF_DIR", zeppelin.getZeppelinConfDir().getAbsolutePath());
+    flinkInterpreterSetting.setProperty("ZEPPELIN_CONF_DIR", zeppelin.getZeppelinConfDir().getAbsolutePath());
     flinkInterpreterSetting.setProperty("flink.execution.mode", "YARN");
     testInterpreterBasics();
 
     // 1 yarn application launched
-    GetApplicationsRequest request =
-        GetApplicationsRequest.newInstance(EnumSet.of(YarnApplicationState.RUNNING));
-    GetApplicationsResponse response =
-        hadoopCluster
-            .getYarnCluster()
-            .getResourceManager()
-            .getClientRMService()
-            .getApplications(request);
+    GetApplicationsRequest request = GetApplicationsRequest.newInstance(EnumSet.of(YarnApplicationState.RUNNING));
+    GetApplicationsResponse response = hadoopCluster.getYarnCluster().getResourceManager().getClientRMService().getApplications(request);
     assertEquals(1, response.getApplicationList().size());
 
     interpreterSettingManager.close();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/InterpreterFactoryTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/InterpreterFactoryTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/InterpreterFactoryTest.java
index 3be77e7..6d4666a 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/InterpreterFactoryTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/InterpreterFactoryTest.java
@@ -17,54 +17,37 @@
 
 package org.apache.zeppelin.interpreter;
 
+import org.apache.zeppelin.interpreter.remote.RemoteInterpreter;
+import org.junit.Test;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import org.apache.zeppelin.interpreter.remote.RemoteInterpreter;
-import org.junit.Test;
-
 public class InterpreterFactoryTest extends AbstractInterpreterTest {
 
   @Test
   public void testGetFactory() throws InterpreterException {
 
-    assertTrue(
-        interpreterFactory.getInterpreter("user1", "note1", "", "test")
-            instanceof RemoteInterpreter);
-    RemoteInterpreter remoteInterpreter =
-        (RemoteInterpreter) interpreterFactory.getInterpreter("user1", "note1", "", "test");
+    assertTrue(interpreterFactory.getInterpreter("user1", "note1", "", "test") instanceof RemoteInterpreter);
+    RemoteInterpreter remoteInterpreter = (RemoteInterpreter) interpreterFactory.getInterpreter("user1", "note1", "", "test");
     // EchoInterpreter is the default interpreter because test is the default interpreter group
     assertEquals(EchoInterpreter.class.getName(), remoteInterpreter.getClassName());
 
-    assertTrue(
-        interpreterFactory.getInterpreter("user1", "note1", "double_echo", "test")
-            instanceof RemoteInterpreter);
-    remoteInterpreter =
-        (RemoteInterpreter)
-            interpreterFactory.getInterpreter("user1", "note1", "double_echo", "test");
+    assertTrue(interpreterFactory.getInterpreter("user1", "note1", "double_echo", "test") instanceof RemoteInterpreter);
+    remoteInterpreter = (RemoteInterpreter) interpreterFactory.getInterpreter("user1", "note1", "double_echo", "test");
     assertEquals(DoubleEchoInterpreter.class.getName(), remoteInterpreter.getClassName());
 
-    assertTrue(
-        interpreterFactory.getInterpreter("user1", "note1", "test", "test")
-            instanceof RemoteInterpreter);
-    remoteInterpreter =
-        (RemoteInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test", "test");
+    assertTrue(interpreterFactory.getInterpreter("user1", "note1", "test", "test") instanceof RemoteInterpreter);
+    remoteInterpreter = (RemoteInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test", "test");
     assertEquals(EchoInterpreter.class.getName(), remoteInterpreter.getClassName());
 
-    assertTrue(
-        interpreterFactory.getInterpreter("user1", "note1", "test2", "test")
-            instanceof RemoteInterpreter);
-    remoteInterpreter =
-        (RemoteInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test2", "test");
+    assertTrue(interpreterFactory.getInterpreter("user1", "note1", "test2", "test") instanceof RemoteInterpreter);
+    remoteInterpreter = (RemoteInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test2", "test");
     assertEquals(EchoInterpreter.class.getName(), remoteInterpreter.getClassName());
 
-    assertTrue(
-        interpreterFactory.getInterpreter("user1", "note1", "test2.double_echo", "test")
-            instanceof RemoteInterpreter);
-    remoteInterpreter =
-        (RemoteInterpreter)
-            interpreterFactory.getInterpreter("user1", "note1", "test2.double_echo", "test");
+    assertTrue(interpreterFactory.getInterpreter("user1", "note1", "test2.double_echo", "test") instanceof RemoteInterpreter);
+    remoteInterpreter = (RemoteInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test2.double_echo", "test");
     assertEquals(DoubleEchoInterpreter.class.getName(), remoteInterpreter.getClassName());
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/InterpreterSettingManagerTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/InterpreterSettingManagerTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/InterpreterSettingManagerTest.java
index 6418fac..1780960 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/InterpreterSettingManagerTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/InterpreterSettingManagerTest.java
@@ -15,19 +15,9 @@
  * limitations under the License.
  */
 
-package org.apache.zeppelin.interpreter;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.Mockito.mock;
+package org.apache.zeppelin.interpreter;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.dep.Dependency;
 import org.apache.zeppelin.display.AngularObjectRegistryListener;
@@ -38,6 +28,20 @@ import org.junit.Test;
 import org.sonatype.aether.RepositoryException;
 import org.sonatype.aether.repository.RemoteRepository;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.mock;
+
+
 public class InterpreterSettingManagerTest extends AbstractInterpreterTest {
 
   @Test
@@ -70,12 +74,8 @@ public class InterpreterSettingManagerTest extends AbstractInterpreterTest {
     assertEquals("central", repositories.get(0).getId());
 
     // Load it again
-    InterpreterSettingManager interpreterSettingManager2 =
-        new InterpreterSettingManager(
-            conf,
-            mock(AngularObjectRegistryListener.class),
-            mock(RemoteInterpreterProcessListener.class),
-            mock(ApplicationEventListener.class));
+    InterpreterSettingManager interpreterSettingManager2 = new InterpreterSettingManager(conf,
+        mock(AngularObjectRegistryListener.class), mock(RemoteInterpreterProcessListener.class), mock(ApplicationEventListener.class));
     assertEquals(5, interpreterSettingManager2.get().size());
     interpreterSetting = interpreterSettingManager2.getByName("test");
     assertEquals("test", interpreterSetting.getName());
@@ -92,6 +92,7 @@ public class InterpreterSettingManagerTest extends AbstractInterpreterTest {
     repositories = interpreterSettingManager2.getRepositories();
     assertEquals(2, repositories.size());
     assertEquals("central", repositories.get(0).getId());
+
   }
 
   @Test
@@ -101,18 +102,16 @@ public class InterpreterSettingManagerTest extends AbstractInterpreterTest {
     option.setPerNote("scoped");
     option.setPerUser("scoped");
     Map<String, InterpreterProperty> properties = new HashMap<>();
-    properties.put("property_4", new InterpreterProperty("property_4", "value_4"));
+    properties.put("property_4", new InterpreterProperty("property_4","value_4"));
 
     try {
-      interpreterSettingManager.createNewSetting(
-          "test2", "test", new ArrayList<Dependency>(), option, properties);
+      interpreterSettingManager.createNewSetting("test2", "test", new ArrayList<Dependency>(), option, properties);
       fail("Should fail due to interpreter already existed");
     } catch (IOException e) {
       assertTrue(e.getMessage().contains("already existed"));
     }
 
-    interpreterSettingManager.createNewSetting(
-        "test3", "test", new ArrayList<Dependency>(), option, properties);
+    interpreterSettingManager.createNewSetting("test3", "test", new ArrayList<Dependency>(), option, properties);
     assertEquals(6, interpreterSettingManager.get().size());
     InterpreterSetting interpreterSetting = interpreterSettingManager.getByName("test3");
     assertEquals("test3", interpreterSetting.getName());
@@ -133,12 +132,8 @@ public class InterpreterSettingManagerTest extends AbstractInterpreterTest {
     assertNotNull(interpreterSetting.getInterpreterSettingManager());
 
     // load it again, it should be saved in interpreter-setting.json. So we can restore it properly
-    InterpreterSettingManager interpreterSettingManager2 =
-        new InterpreterSettingManager(
-            conf,
-            mock(AngularObjectRegistryListener.class),
-            mock(RemoteInterpreterProcessListener.class),
-            mock(ApplicationEventListener.class));
+    InterpreterSettingManager interpreterSettingManager2 = new InterpreterSettingManager(conf,
+        mock(AngularObjectRegistryListener.class), mock(RemoteInterpreterProcessListener.class), mock(ApplicationEventListener.class));
     assertEquals(6, interpreterSettingManager2.get().size());
     interpreterSetting = interpreterSettingManager2.getByName("test3");
     assertEquals("test3", interpreterSetting.getName());
@@ -157,8 +152,7 @@ public class InterpreterSettingManagerTest extends AbstractInterpreterTest {
     newProperties.put("property_4", new InterpreterProperty("property_4", "new_value_4"));
     List<Dependency> newDependencies = new ArrayList<>();
     newDependencies.add(new Dependency("com.databricks:spark-avro_2.11:3.1.0"));
-    interpreterSettingManager.setPropertyAndRestart(
-        interpreterSetting.getId(), newOption, newProperties, newDependencies);
+    interpreterSettingManager.setPropertyAndRestart(interpreterSetting.getId(), newOption, newProperties, newDependencies);
     interpreterSetting = interpreterSettingManager.get(interpreterSetting.getId());
     assertEquals("test3", interpreterSetting.getName());
     assertEquals("test", interpreterSetting.getGroup());
@@ -190,29 +184,22 @@ public class InterpreterSettingManagerTest extends AbstractInterpreterTest {
     assertEquals(5, interpreterSettingManager.get().size());
 
     // load it again
-    InterpreterSettingManager interpreterSettingManager3 =
-        new InterpreterSettingManager(
-            new ZeppelinConfiguration(),
-            mock(AngularObjectRegistryListener.class),
-            mock(RemoteInterpreterProcessListener.class),
-            mock(ApplicationEventListener.class));
+    InterpreterSettingManager interpreterSettingManager3 = new InterpreterSettingManager(new ZeppelinConfiguration(),
+        mock(AngularObjectRegistryListener.class), mock(RemoteInterpreterProcessListener.class), mock(ApplicationEventListener.class));
     assertEquals(5, interpreterSettingManager3.get().size());
+
   }
 
   @Test
   public void testGetEditor() throws IOException, InterpreterNotFoundException {
-    Interpreter echoInterpreter =
-        interpreterFactory.getInterpreter("user1", "note1", "test.echo", "test");
+    Interpreter echoInterpreter = interpreterFactory.getInterpreter("user1", "note1", "test.echo", "test");
     // get editor setting from interpreter-setting.json
-    Map<String, Object> editor =
-        interpreterSettingManager.getEditorSetting(echoInterpreter, "user1", "note1", "test.echo");
+    Map<String, Object> editor = interpreterSettingManager.getEditorSetting(echoInterpreter, "user1", "note1", "test.echo");
     assertEquals("java", editor.get("language"));
 
     // when editor setting doesn't exit, return the default editor
-    Interpreter mock1Interpreter =
-        interpreterFactory.getInterpreter("user1", "note1", "mock1", "test");
-    editor =
-        interpreterSettingManager.getEditorSetting(mock1Interpreter, "user1", "note1", "mock1");
+    Interpreter mock1Interpreter = interpreterFactory.getInterpreter("user1", "note1", "mock1", "test");
+    editor = interpreterSettingManager.getEditorSetting(mock1Interpreter,"user1", "note1", "mock1");
     assertEquals("text", editor.get("language"));
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/InterpreterSettingTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/InterpreterSettingTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/InterpreterSettingTest.java
index 974c155..e3e47d3 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/InterpreterSettingTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/InterpreterSettingTest.java
@@ -17,13 +17,14 @@
 
 package org.apache.zeppelin.interpreter;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import org.junit.Test;
 
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
-import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
 
 public class InterpreterSettingTest {
 
@@ -31,44 +32,28 @@ public class InterpreterSettingTest {
   public void testCreateInterpreters() {
     InterpreterOption interpreterOption = new InterpreterOption();
     interpreterOption.setPerUser(InterpreterOption.SHARED);
-    InterpreterInfo interpreterInfo1 =
-        new InterpreterInfo(
-            EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
-    InterpreterInfo interpreterInfo2 =
-        new InterpreterInfo(
-            DoubleEchoInterpreter.class.getName(),
-            "double_echo",
-            false,
-            new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo1 = new InterpreterInfo(EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo2 = new InterpreterInfo(DoubleEchoInterpreter.class.getName(), "double_echo", false, new HashMap<String, Object>());
     List<InterpreterInfo> interpreterInfos = new ArrayList<>();
     interpreterInfos.add(interpreterInfo1);
     interpreterInfos.add(interpreterInfo2);
-    InterpreterSetting interpreterSetting =
-        new InterpreterSetting.Builder()
-            .setId("id")
-            .setName("test")
-            .setGroup("test")
-            .setInterpreterInfos(interpreterInfos)
-            .setOption(interpreterOption)
-            .create();
+    InterpreterSetting interpreterSetting = new InterpreterSetting.Builder()
+        .setId("id")
+        .setName("test")
+        .setGroup("test")
+        .setInterpreterInfos(interpreterInfos)
+        .setOption(interpreterOption)
+        .create();
 
     // create default interpreter for user1 and note1
-    assertEquals(
-        EchoInterpreter.class.getName(),
-        interpreterSetting.getDefaultInterpreter("user1", "note1").getClassName());
+    assertEquals(EchoInterpreter.class.getName(), interpreterSetting.getDefaultInterpreter("user1", "note1").getClassName());
 
     // create interpreter echo for user1 and note1
-    assertEquals(
-        EchoInterpreter.class.getName(),
-        interpreterSetting.getInterpreter("user1", "note1", "echo").getClassName());
-    assertEquals(
-        interpreterSetting.getDefaultInterpreter("user1", "note1"),
-        interpreterSetting.getInterpreter("user1", "note1", "echo"));
+    assertEquals(EchoInterpreter.class.getName(), interpreterSetting.getInterpreter("user1", "note1", "echo").getClassName());
+    assertEquals(interpreterSetting.getDefaultInterpreter("user1", "note1"), interpreterSetting.getInterpreter("user1", "note1", "echo"));
 
     // create interpreter double_echo for user1 and note1
-    assertEquals(
-        DoubleEchoInterpreter.class.getName(),
-        interpreterSetting.getInterpreter("user1", "note1", "double_echo").getClassName());
+    assertEquals(DoubleEchoInterpreter.class.getName(), interpreterSetting.getInterpreter("user1", "note1", "double_echo").getClassName());
 
     // create non-existed interpreter
     assertNull(interpreterSetting.getInterpreter("user1", "note1", "invalid_echo"));
@@ -78,26 +63,18 @@ public class InterpreterSettingTest {
   public void testSharedMode() {
     InterpreterOption interpreterOption = new InterpreterOption();
     interpreterOption.setPerUser(InterpreterOption.SHARED);
-    InterpreterInfo interpreterInfo1 =
-        new InterpreterInfo(
-            EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
-    InterpreterInfo interpreterInfo2 =
-        new InterpreterInfo(
-            DoubleEchoInterpreter.class.getName(),
-            "double_echo",
-            false,
-            new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo1 = new InterpreterInfo(EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo2 = new InterpreterInfo(DoubleEchoInterpreter.class.getName(), "double_echo", false, new HashMap<String, Object>());
     List<InterpreterInfo> interpreterInfos = new ArrayList<>();
     interpreterInfos.add(interpreterInfo1);
     interpreterInfos.add(interpreterInfo2);
-    InterpreterSetting interpreterSetting =
-        new InterpreterSetting.Builder()
-            .setId("id")
-            .setName("test")
-            .setGroup("test")
-            .setInterpreterInfos(interpreterInfos)
-            .setOption(interpreterOption)
-            .create();
+    InterpreterSetting interpreterSetting = new InterpreterSetting.Builder()
+        .setId("id")
+        .setName("test")
+        .setGroup("test")
+        .setInterpreterInfos(interpreterInfos)
+        .setOption(interpreterOption)
+        .create();
 
     // create default interpreter for user1 and note1
     interpreterSetting.getDefaultInterpreter("user1", "note1");
@@ -122,26 +99,18 @@ public class InterpreterSettingTest {
   public void testPerUserScopedMode() {
     InterpreterOption interpreterOption = new InterpreterOption();
     interpreterOption.setPerUser(InterpreterOption.SCOPED);
-    InterpreterInfo interpreterInfo1 =
-        new InterpreterInfo(
-            EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
-    InterpreterInfo interpreterInfo2 =
-        new InterpreterInfo(
-            DoubleEchoInterpreter.class.getName(),
-            "double_echo",
-            false,
-            new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo1 = new InterpreterInfo(EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo2 = new InterpreterInfo(DoubleEchoInterpreter.class.getName(), "double_echo", false, new HashMap<String, Object>());
     List<InterpreterInfo> interpreterInfos = new ArrayList<>();
     interpreterInfos.add(interpreterInfo1);
     interpreterInfos.add(interpreterInfo2);
-    InterpreterSetting interpreterSetting =
-        new InterpreterSetting.Builder()
-            .setId("id")
-            .setName("test")
-            .setGroup("test")
-            .setInterpreterInfos(interpreterInfos)
-            .setOption(interpreterOption)
-            .create();
+    InterpreterSetting interpreterSetting = new InterpreterSetting.Builder()
+        .setId("id")
+        .setName("test")
+        .setGroup("test")
+        .setInterpreterInfos(interpreterInfos)
+        .setOption(interpreterOption)
+        .create();
 
     // create interpreter for user1 and note1
     interpreterSetting.getDefaultInterpreter("user1", "note1");
@@ -166,26 +135,18 @@ public class InterpreterSettingTest {
   public void testPerNoteScopedMode() {
     InterpreterOption interpreterOption = new InterpreterOption();
     interpreterOption.setPerNote(InterpreterOption.SCOPED);
-    InterpreterInfo interpreterInfo1 =
-        new InterpreterInfo(
-            EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
-    InterpreterInfo interpreterInfo2 =
-        new InterpreterInfo(
-            DoubleEchoInterpreter.class.getName(),
-            "double_echo",
-            false,
-            new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo1 = new InterpreterInfo(EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo2 = new InterpreterInfo(DoubleEchoInterpreter.class.getName(), "double_echo", false, new HashMap<String, Object>());
     List<InterpreterInfo> interpreterInfos = new ArrayList<>();
     interpreterInfos.add(interpreterInfo1);
     interpreterInfos.add(interpreterInfo2);
-    InterpreterSetting interpreterSetting =
-        new InterpreterSetting.Builder()
-            .setId("id")
-            .setName("test")
-            .setGroup("test")
-            .setInterpreterInfos(interpreterInfos)
-            .setOption(interpreterOption)
-            .create();
+    InterpreterSetting interpreterSetting = new InterpreterSetting.Builder()
+        .setId("id")
+        .setName("test")
+        .setGroup("test")
+        .setInterpreterInfos(interpreterInfos)
+        .setOption(interpreterOption)
+        .create();
 
     // create interpreter for user1 and note1
     interpreterSetting.getDefaultInterpreter("user1", "note1");
@@ -210,26 +171,18 @@ public class InterpreterSettingTest {
   public void testPerUserIsolatedMode() {
     InterpreterOption interpreterOption = new InterpreterOption();
     interpreterOption.setPerUser(InterpreterOption.ISOLATED);
-    InterpreterInfo interpreterInfo1 =
-        new InterpreterInfo(
-            EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
-    InterpreterInfo interpreterInfo2 =
-        new InterpreterInfo(
-            DoubleEchoInterpreter.class.getName(),
-            "double_echo",
-            false,
-            new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo1 = new InterpreterInfo(EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo2 = new InterpreterInfo(DoubleEchoInterpreter.class.getName(), "double_echo", false, new HashMap<String, Object>());
     List<InterpreterInfo> interpreterInfos = new ArrayList<>();
     interpreterInfos.add(interpreterInfo1);
     interpreterInfos.add(interpreterInfo2);
-    InterpreterSetting interpreterSetting =
-        new InterpreterSetting.Builder()
-            .setId("id")
-            .setName("test")
-            .setGroup("test")
-            .setInterpreterInfos(interpreterInfos)
-            .setOption(interpreterOption)
-            .create();
+    InterpreterSetting interpreterSetting = new InterpreterSetting.Builder()
+        .setId("id")
+        .setName("test")
+        .setGroup("test")
+        .setInterpreterInfos(interpreterInfos)
+        .setOption(interpreterOption)
+        .create();
 
     // create interpreter for user1 and note1
     interpreterSetting.getDefaultInterpreter("user1", "note1");
@@ -254,26 +207,18 @@ public class InterpreterSettingTest {
   public void testPerNoteIsolatedMode() {
     InterpreterOption interpreterOption = new InterpreterOption();
     interpreterOption.setPerNote(InterpreterOption.ISOLATED);
-    InterpreterInfo interpreterInfo1 =
-        new InterpreterInfo(
-            EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
-    InterpreterInfo interpreterInfo2 =
-        new InterpreterInfo(
-            DoubleEchoInterpreter.class.getName(),
-            "double_echo",
-            false,
-            new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo1 = new InterpreterInfo(EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo2 = new InterpreterInfo(DoubleEchoInterpreter.class.getName(), "double_echo", false, new HashMap<String, Object>());
     List<InterpreterInfo> interpreterInfos = new ArrayList<>();
     interpreterInfos.add(interpreterInfo1);
     interpreterInfos.add(interpreterInfo2);
-    InterpreterSetting interpreterSetting =
-        new InterpreterSetting.Builder()
-            .setId("id")
-            .setName("test")
-            .setGroup("test")
-            .setInterpreterInfos(interpreterInfos)
-            .setOption(interpreterOption)
-            .create();
+    InterpreterSetting interpreterSetting = new InterpreterSetting.Builder()
+        .setId("id")
+        .setName("test")
+        .setGroup("test")
+        .setInterpreterInfos(interpreterInfos)
+        .setOption(interpreterOption)
+        .create();
 
     // create interpreter for user1 and note1
     interpreterSetting.getDefaultInterpreter("user1", "note1");
@@ -298,26 +243,18 @@ public class InterpreterSettingTest {
     InterpreterOption interpreterOption = new InterpreterOption();
     interpreterOption.setPerUser(InterpreterOption.ISOLATED);
     interpreterOption.setPerNote(InterpreterOption.SCOPED);
-    InterpreterInfo interpreterInfo1 =
-        new InterpreterInfo(
-            EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
-    InterpreterInfo interpreterInfo2 =
-        new InterpreterInfo(
-            DoubleEchoInterpreter.class.getName(),
-            "double_echo",
-            false,
-            new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo1 = new InterpreterInfo(EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo2 = new InterpreterInfo(DoubleEchoInterpreter.class.getName(), "double_echo", false, new HashMap<String, Object>());
     List<InterpreterInfo> interpreterInfos = new ArrayList<>();
     interpreterInfos.add(interpreterInfo1);
     interpreterInfos.add(interpreterInfo2);
-    InterpreterSetting interpreterSetting =
-        new InterpreterSetting.Builder()
-            .setId("id")
-            .setName("test")
-            .setGroup("test")
-            .setInterpreterInfos(interpreterInfos)
-            .setOption(interpreterOption)
-            .create();
+    InterpreterSetting interpreterSetting = new InterpreterSetting.Builder()
+        .setId("id")
+        .setName("test")
+        .setGroup("test")
+        .setInterpreterInfos(interpreterInfos)
+        .setOption(interpreterOption)
+        .create();
 
     // create interpreter for user1 and note1
     interpreterSetting.getDefaultInterpreter("user1", "note1");
@@ -333,9 +270,7 @@ public class InterpreterSettingTest {
     assertEquals(2, interpreterSetting.getAllInterpreterGroups().size());
 
     // group1 for user1 has 2 sessions, and group2 for user2 has 1 session
-    assertEquals(
-        interpreterSetting.getInterpreterGroup("user1", "note1"),
-        interpreterSetting.getInterpreterGroup("user1", "note2"));
+    assertEquals(interpreterSetting.getInterpreterGroup("user1", "note1"), interpreterSetting.getInterpreterGroup("user1", "note2"));
     assertEquals(2, interpreterSetting.getInterpreterGroup("user1", "note1").getSessionNum());
     assertEquals(2, interpreterSetting.getInterpreterGroup("user1", "note2").getSessionNum());
     assertEquals(1, interpreterSetting.getInterpreterGroup("user2", "note1").getSessionNum());
@@ -359,26 +294,18 @@ public class InterpreterSettingTest {
     InterpreterOption interpreterOption = new InterpreterOption();
     interpreterOption.setPerUser(InterpreterOption.ISOLATED);
     interpreterOption.setPerNote(InterpreterOption.ISOLATED);
-    InterpreterInfo interpreterInfo1 =
-        new InterpreterInfo(
-            EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
-    InterpreterInfo interpreterInfo2 =
-        new InterpreterInfo(
-            DoubleEchoInterpreter.class.getName(),
-            "double_echo",
-            false,
-            new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo1 = new InterpreterInfo(EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo2 = new InterpreterInfo(DoubleEchoInterpreter.class.getName(), "double_echo", false, new HashMap<String, Object>());
     List<InterpreterInfo> interpreterInfos = new ArrayList<>();
     interpreterInfos.add(interpreterInfo1);
     interpreterInfos.add(interpreterInfo2);
-    InterpreterSetting interpreterSetting =
-        new InterpreterSetting.Builder()
-            .setId("id")
-            .setName("test")
-            .setGroup("test")
-            .setInterpreterInfos(interpreterInfos)
-            .setOption(interpreterOption)
-            .create();
+    InterpreterSetting interpreterSetting = new InterpreterSetting.Builder()
+        .setId("id")
+        .setName("test")
+        .setGroup("test")
+        .setInterpreterInfos(interpreterInfos)
+        .setOption(interpreterOption)
+        .create();
 
     // create interpreter for user1 and note1
     interpreterSetting.getDefaultInterpreter("user1", "note1");
@@ -423,26 +350,18 @@ public class InterpreterSettingTest {
     InterpreterOption interpreterOption = new InterpreterOption();
     interpreterOption.setPerUser(InterpreterOption.SCOPED);
     interpreterOption.setPerNote(InterpreterOption.SCOPED);
-    InterpreterInfo interpreterInfo1 =
-        new InterpreterInfo(
-            EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
-    InterpreterInfo interpreterInfo2 =
-        new InterpreterInfo(
-            DoubleEchoInterpreter.class.getName(),
-            "double_echo",
-            false,
-            new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo1 = new InterpreterInfo(EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo2 = new InterpreterInfo(DoubleEchoInterpreter.class.getName(), "double_echo", false, new HashMap<String, Object>());
     List<InterpreterInfo> interpreterInfos = new ArrayList<>();
     interpreterInfos.add(interpreterInfo1);
     interpreterInfos.add(interpreterInfo2);
-    InterpreterSetting interpreterSetting =
-        new InterpreterSetting.Builder()
-            .setId("id")
-            .setName("test")
-            .setGroup("test")
-            .setInterpreterInfos(interpreterInfos)
-            .setOption(interpreterOption)
-            .create();
+    InterpreterSetting interpreterSetting = new InterpreterSetting.Builder()
+        .setId("id")
+        .setName("test")
+        .setGroup("test")
+        .setInterpreterInfos(interpreterInfos)
+        .setOption(interpreterOption)
+        .create();
 
     // create interpreter for user1 and note1
     interpreterSetting.getDefaultInterpreter("user1", "note1");

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/ManagedInterpreterGroupTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/ManagedInterpreterGroupTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/ManagedInterpreterGroupTest.java
index 010a2f8..aa73749 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/ManagedInterpreterGroupTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/ManagedInterpreterGroupTest.java
@@ -17,18 +17,20 @@
 
 package org.apache.zeppelin.interpreter;
 
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
 import org.junit.Before;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.sonatype.aether.RepositoryException;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+
+
 public class ManagedInterpreterGroupTest {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(ManagedInterpreterGroupTest.class);
@@ -39,32 +41,23 @@ public class ManagedInterpreterGroupTest {
   public void setUp() throws IOException, RepositoryException {
     InterpreterOption interpreterOption = new InterpreterOption();
     interpreterOption.setPerUser(InterpreterOption.SCOPED);
-    InterpreterInfo interpreterInfo1 =
-        new InterpreterInfo(
-            EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
-    InterpreterInfo interpreterInfo2 =
-        new InterpreterInfo(
-            DoubleEchoInterpreter.class.getName(),
-            "double_echo",
-            false,
-            new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo1 = new InterpreterInfo(EchoInterpreter.class.getName(), "echo", true, new HashMap<String, Object>());
+    InterpreterInfo interpreterInfo2 = new InterpreterInfo(DoubleEchoInterpreter.class.getName(), "double_echo", false, new HashMap<String, Object>());
     List<InterpreterInfo> interpreterInfos = new ArrayList<>();
     interpreterInfos.add(interpreterInfo1);
     interpreterInfos.add(interpreterInfo2);
-    interpreterSetting =
-        new InterpreterSetting.Builder()
-            .setId("id")
-            .setName("test")
-            .setGroup("test")
-            .setInterpreterInfos(interpreterInfos)
-            .setOption(interpreterOption)
-            .create();
+    interpreterSetting = new InterpreterSetting.Builder()
+        .setId("id")
+        .setName("test")
+        .setGroup("test")
+        .setInterpreterInfos(interpreterInfos)
+        .setOption(interpreterOption)
+        .create();
   }
 
   @Test
   public void testInterpreterGroup() {
-    ManagedInterpreterGroup interpreterGroup =
-        new ManagedInterpreterGroup("group_1", interpreterSetting);
+    ManagedInterpreterGroup interpreterGroup = new ManagedInterpreterGroup("group_1", interpreterSetting);
     assertEquals(0, interpreterGroup.getSessionNum());
 
     // create session_1

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/MiniHadoopCluster.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/MiniHadoopCluster.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/MiniHadoopCluster.java
index 4f29feb..b0799ae 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/MiniHadoopCluster.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/MiniHadoopCluster.java
@@ -1,8 +1,5 @@
 package org.apache.zeppelin.interpreter;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
@@ -12,7 +9,13 @@ import org.junit.BeforeClass;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+
 /**
+ *
  * Util class for creating a Mini Hadoop cluster in local machine to test scenarios that needs
  * hadoop cluster.
  */
@@ -31,31 +34,28 @@ public class MiniHadoopCluster {
     this.hadoopConf = new Configuration();
     new File(configPath).mkdirs();
     // start MiniDFSCluster
-    this.dfsCluster =
-        new MiniDFSCluster.Builder(hadoopConf)
-            .numDataNodes(2)
-            .format(true)
-            .waitSafeMode(true)
-            .build();
+    this.dfsCluster = new MiniDFSCluster.Builder(hadoopConf)
+        .numDataNodes(2)
+        .format(true)
+        .waitSafeMode(true)
+        .build();
     this.dfsCluster.waitActive();
     saveConfig(hadoopConf, configPath + "/core-site.xml");
 
     // start MiniYarnCluster
     YarnConfiguration baseConfig = new YarnConfiguration(hadoopConf);
-    baseConfig.set(
-        "yarn.nodemanager.disk-health-checker.max-disk-utilization-per-disk-percentage", "95");
-    this.yarnCluster = new MiniYARNCluster(getClass().getName(), 2, 1, 1);
+    baseConfig.set("yarn.nodemanager.disk-health-checker.max-disk-utilization-per-disk-percentage", "95");
+    this.yarnCluster = new MiniYARNCluster(getClass().getName(), 2,
+        1, 1);
     yarnCluster.init(baseConfig);
 
     // Install a shutdown hook for stop the service and kill all running applications.
-    Runtime.getRuntime()
-        .addShutdownHook(
-            new Thread() {
-              @Override
-              public void run() {
-                yarnCluster.stop();
-              }
-            });
+    Runtime.getRuntime().addShutdownHook(new Thread() {
+      @Override
+      public void run() {
+        yarnCluster.stop();
+      }
+    });
 
     yarnCluster.start();
 
@@ -77,7 +77,7 @@ public class MiniHadoopCluster {
     }
 
     LOGGER.info("RM address in configuration is " + yarnConfig.get(YarnConfiguration.RM_ADDRESS));
-    saveConfig(yarnConfig, configPath + "/yarn-site.xml");
+    saveConfig(yarnConfig,configPath + "/yarn-site.xml");
   }
 
   protected void saveConfig(Configuration conf, String dest) throws IOException {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/MiniZeppelin.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/MiniZeppelin.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/MiniZeppelin.java
index 9bb2976..1a1a2f3 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/MiniZeppelin.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/MiniZeppelin.java
@@ -1,10 +1,7 @@
 package org.apache.zeppelin.interpreter;
 
-import static org.mockito.Mockito.mock;
-
-import java.io.File;
-import java.io.IOException;
 import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.display.AngularObjectRegistryListener;
 import org.apache.zeppelin.helium.ApplicationEventListener;
@@ -12,6 +9,11 @@ import org.apache.zeppelin.interpreter.remote.RemoteInterpreterProcessListener;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.io.IOException;
+
+import static org.mockito.Mockito.mock;
+
 public class MiniZeppelin {
 
   protected static final Logger LOGGER = LoggerFactory.getLogger(MiniZeppelin.class);
@@ -25,32 +27,21 @@ public class MiniZeppelin {
 
   public void start() throws IOException {
     zeppelinHome = new File("..");
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(), zeppelinHome.getAbsolutePath());
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(),
+        zeppelinHome.getAbsolutePath());
     confDir = new File(zeppelinHome, "conf_" + getClass().getSimpleName());
     notebookDir = new File(zeppelinHome, "notebook_" + getClass().getSimpleName());
     confDir.mkdirs();
     notebookDir.mkdirs();
     LOGGER.info("ZEPPELIN_HOME: " + zeppelinHome.getAbsolutePath());
-    FileUtils.copyFile(
-        new File(zeppelinHome, "conf/log4j.properties"), new File(confDir, "log4j.properties"));
-    FileUtils.copyFile(
-        new File(zeppelinHome, "conf/log4j_yarn_cluster.properties"),
-        new File(confDir, "log4j_yarn_cluster.properties"));
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_CONF_DIR.getVarName(), confDir.getAbsolutePath());
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(),
-        notebookDir.getAbsolutePath());
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT.getVarName(), "120000");
+    FileUtils.copyFile(new File(zeppelinHome, "conf/log4j.properties"), new File(confDir, "log4j.properties"));
+    FileUtils.copyFile(new File(zeppelinHome, "conf/log4j_yarn_cluster.properties"), new File(confDir, "log4j_yarn_cluster.properties"));
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_CONF_DIR.getVarName(), confDir.getAbsolutePath());
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), notebookDir.getAbsolutePath());
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT.getVarName(), "120000");
     conf = new ZeppelinConfiguration();
-    interpreterSettingManager =
-        new InterpreterSettingManager(
-            conf,
-            mock(AngularObjectRegistryListener.class),
-            mock(RemoteInterpreterProcessListener.class),
-            mock(ApplicationEventListener.class));
+    interpreterSettingManager = new InterpreterSettingManager(conf,
+        mock(AngularObjectRegistryListener.class), mock(RemoteInterpreterProcessListener.class), mock(ApplicationEventListener.class));
     interpreterFactory = new InterpreterFactory(interpreterSettingManager);
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/SessionConfInterpreterTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/SessionConfInterpreterTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/SessionConfInterpreterTest.java
index f28d1ce..7baa2e2 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/SessionConfInterpreterTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/SessionConfInterpreterTest.java
@@ -15,17 +15,19 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.interpreter;
 
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import org.apache.zeppelin.interpreter.remote.RemoteInterpreter;
+import org.junit.Test;
 
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Properties;
-import org.apache.zeppelin.interpreter.remote.RemoteInterpreter;
-import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
 
 public class SessionConfInterpreterTest {
 
@@ -39,8 +41,8 @@ public class SessionConfInterpreterTest {
     Properties properties = new Properties();
     properties.setProperty("property_1", "value_1");
     properties.setProperty("property_2", "value_2");
-    SessionConfInterpreter confInterpreter =
-        new SessionConfInterpreter(properties, "session_1", "group_1", mockInterpreterSetting);
+    SessionConfInterpreter confInterpreter = new SessionConfInterpreter(
+        properties, "session_1", "group_1", mockInterpreterSetting);
 
     RemoteInterpreter remoteInterpreter =
         new RemoteInterpreter(properties, "session_1", "clasName", "user1", null);
@@ -50,8 +52,8 @@ public class SessionConfInterpreterTest {
     when(mockInterpreterGroup.get("session_1")).thenReturn(interpreters);
 
     InterpreterResult result =
-        confInterpreter.interpret(
-            "property_1\tupdated_value_1\nproperty_3\tvalue_3", mock(InterpreterContext.class));
+        confInterpreter.interpret("property_1\tupdated_value_1\nproperty_3\tvalue_3",
+            mock(InterpreterContext.class));
     assertEquals(InterpreterResult.Code.SUCCESS, result.code);
     assertEquals(3, remoteInterpreter.getProperties().size());
     assertEquals("updated_value_1", remoteInterpreter.getProperty("property_1"));
@@ -60,8 +62,8 @@ public class SessionConfInterpreterTest {
 
     remoteInterpreter.setOpened(true);
     result =
-        confInterpreter.interpret(
-            "property_1\tupdated_value_1\nproperty_3\tvalue_3", mock(InterpreterContext.class));
+        confInterpreter.interpret("property_1\tupdated_value_1\nproperty_3\tvalue_3",
+            mock(InterpreterContext.class));
     assertEquals(InterpreterResult.Code.ERROR, result.code);
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/SleepInterpreter.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/SleepInterpreter.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/SleepInterpreter.java
index eb2437f..7a904c6 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/SleepInterpreter.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/SleepInterpreter.java
@@ -1,10 +1,13 @@
 package org.apache.zeppelin.interpreter;
 
-import java.util.Properties;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
 
-/** Interpreter that only accept long value and sleep for such period */
+import java.util.Properties;
+
+/**
+ * Interpreter that only accept long value and sleep for such period
+ */
 public class SleepInterpreter extends Interpreter {
 
   public SleepInterpreter(Properties property) {
@@ -12,10 +15,14 @@ public class SleepInterpreter extends Interpreter {
   }
 
   @Override
-  public void open() {}
+  public void open() {
+
+  }
 
   @Override
-  public void close() {}
+  public void close() {
+
+  }
 
   @Override
   public InterpreterResult interpret(String st, InterpreterContext context) {
@@ -28,7 +35,9 @@ public class SleepInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+
+  }
 
   @Override
   public FormType getFormType() {
@@ -38,8 +47,8 @@ public class SleepInterpreter extends Interpreter {
   @Override
   public Scheduler getScheduler() {
     if (Boolean.parseBoolean(getProperty("zeppelin.SleepInterpreter.parallel", "false"))) {
-      return SchedulerFactory.singleton()
-          .createOrGetParallelScheduler("Parallel-" + SleepInterpreter.class.getName(), 10);
+      return SchedulerFactory.singleton().createOrGetParallelScheduler(
+          "Parallel-" + SleepInterpreter.class.getName(), 10);
     }
     return super.getScheduler();
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/SparkIntegrationTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/SparkIntegrationTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/SparkIntegrationTest.java
index a97751e..fed9ad2 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/SparkIntegrationTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/SparkIntegrationTest.java
@@ -1,12 +1,5 @@
 package org.apache.zeppelin.interpreter;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.EnumSet;
-import java.util.List;
 import org.apache.commons.io.IOUtils;
 import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationsRequest;
 import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationsResponse;
@@ -20,6 +13,14 @@ import org.junit.runners.Parameterized;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.EnumSet;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 @RunWith(value = Parameterized.class)
 public class SparkIntegrationTest {
   private static Logger LOGGER = LoggerFactory.getLogger(SparkIntegrationTest.class);
@@ -40,7 +41,12 @@ public class SparkIntegrationTest {
 
   @Parameterized.Parameters
   public static List<Object[]> data() {
-    return Arrays.asList(new Object[][] {{"2.2.1"}, {"2.1.2"}, {"2.0.2"}, {"1.6.3"}});
+    return Arrays.asList(new Object[][]{
+        {"2.2.1"},
+        {"2.1.2"},
+        {"2.0.2"},
+        {"1.6.3"}
+    });
   }
 
   @BeforeClass
@@ -66,54 +72,40 @@ public class SparkIntegrationTest {
 
   private void testInterpreterBasics() throws IOException, InterpreterException {
     // test SparkInterpreter
-    Interpreter sparkInterpreter =
-        interpreterFactory.getInterpreter("user1", "note1", "spark.spark", "test");
+    Interpreter sparkInterpreter = interpreterFactory.getInterpreter("user1", "note1", "spark.spark", "test");
 
-    InterpreterContext context =
-        new InterpreterContext.Builder().setNoteId("note1").setParagraphId("paragraph_1").build();
+    InterpreterContext context = new InterpreterContext.Builder().setNoteId("note1").setParagraphId("paragraph_1").build();
     InterpreterResult interpreterResult = sparkInterpreter.interpret("sc.version", context);
     assertEquals(InterpreterResult.Code.SUCCESS, interpreterResult.code);
     String detectedSparkVersion = interpreterResult.message().get(0).getData();
-    assertTrue(
-        detectedSparkVersion + " doesn't contain " + this.sparkVersion,
-        detectedSparkVersion.contains(this.sparkVersion));
+    assertTrue(detectedSparkVersion +" doesn't contain " + this.sparkVersion, detectedSparkVersion.contains(this.sparkVersion));
     interpreterResult = sparkInterpreter.interpret("sc.range(1,10).sum()", context);
     assertEquals(InterpreterResult.Code.SUCCESS, interpreterResult.code);
     assertTrue(interpreterResult.msg.get(0).getData().contains("45"));
 
     // test PySparkInterpreter
-    Interpreter pySparkInterpreter =
-        interpreterFactory.getInterpreter("user1", "note1", "spark.pyspark", "test");
-    interpreterResult =
-        pySparkInterpreter.interpret(
-            "sqlContext.createDataFrame([(1,'a'),(2,'b')], ['id','name']).registerTempTable('test')",
-            context);
+    Interpreter pySparkInterpreter = interpreterFactory.getInterpreter("user1", "note1", "spark.pyspark", "test");
+    interpreterResult = pySparkInterpreter.interpret("sqlContext.createDataFrame([(1,'a'),(2,'b')], ['id','name']).registerTempTable('test')", context);
     assertEquals(InterpreterResult.Code.SUCCESS, interpreterResult.code);
 
     // test IPySparkInterpreter
-    Interpreter ipySparkInterpreter =
-        interpreterFactory.getInterpreter("user1", "note1", "spark.ipyspark", "test");
+    Interpreter ipySparkInterpreter = interpreterFactory.getInterpreter("user1", "note1", "spark.ipyspark", "test");
     interpreterResult = ipySparkInterpreter.interpret("sqlContext.table('test').show()", context);
     assertEquals(InterpreterResult.Code.SUCCESS, interpreterResult.code);
 
     // test SparkSQLInterpreter
-    Interpreter sqlInterpreter =
-        interpreterFactory.getInterpreter("user1", "note1", "spark.sql", "test");
+    Interpreter sqlInterpreter = interpreterFactory.getInterpreter("user1", "note1", "spark.sql", "test");
     interpreterResult = sqlInterpreter.interpret("select count(1) as c from test", context);
     assertEquals(InterpreterResult.Code.SUCCESS, interpreterResult.code);
     assertEquals(InterpreterResult.Type.TABLE, interpreterResult.message().get(0).getType());
     assertEquals("c\n2\n", interpreterResult.message().get(0).getData());
 
     // test SparkRInterpreter
-    Interpreter sparkrInterpreter =
-        interpreterFactory.getInterpreter("user1", "note1", "spark.r", "test");
+    Interpreter sparkrInterpreter = interpreterFactory.getInterpreter("user1", "note1", "spark.r", "test");
     if (isSpark2()) {
-      interpreterResult =
-          sparkrInterpreter.interpret("df <- as.DataFrame(faithful)\nhead(df)", context);
+      interpreterResult = sparkrInterpreter.interpret("df <- as.DataFrame(faithful)\nhead(df)", context);
     } else {
-      interpreterResult =
-          sparkrInterpreter.interpret(
-              "df <- createDataFrame(sqlContext, faithful)\nhead(df)", context);
+      interpreterResult = sparkrInterpreter.interpret("df <- createDataFrame(sqlContext, faithful)\nhead(df)", context);
     }
     assertEquals(InterpreterResult.Code.SUCCESS, interpreterResult.code);
     assertEquals(InterpreterResult.Type.TEXT, interpreterResult.message().get(0).getType());
@@ -122,41 +114,30 @@ public class SparkIntegrationTest {
 
   @Test
   public void testLocalMode() throws IOException, YarnException, InterpreterException {
-    InterpreterSetting sparkInterpreterSetting =
-        interpreterSettingManager.getInterpreterSettingByName("spark");
+    InterpreterSetting sparkInterpreterSetting = interpreterSettingManager.getInterpreterSettingByName("spark");
     sparkInterpreterSetting.setProperty("master", "local[*]");
     sparkInterpreterSetting.setProperty("SPARK_HOME", sparkHome);
-    sparkInterpreterSetting.setProperty(
-        "ZEPPELIN_CONF_DIR", zeppelin.getZeppelinConfDir().getAbsolutePath());
+    sparkInterpreterSetting.setProperty("ZEPPELIN_CONF_DIR", zeppelin.getZeppelinConfDir().getAbsolutePath());
     sparkInterpreterSetting.setProperty("zeppelin.spark.useHiveContext", "false");
     sparkInterpreterSetting.setProperty("zeppelin.pyspark.useIPython", "false");
 
     testInterpreterBasics();
 
     // no yarn application launched
-    GetApplicationsRequest request =
-        GetApplicationsRequest.newInstance(EnumSet.of(YarnApplicationState.RUNNING));
-    GetApplicationsResponse response =
-        hadoopCluster
-            .getYarnCluster()
-            .getResourceManager()
-            .getClientRMService()
-            .getApplications(request);
+    GetApplicationsRequest request = GetApplicationsRequest.newInstance(EnumSet.of(YarnApplicationState.RUNNING));
+    GetApplicationsResponse response = hadoopCluster.getYarnCluster().getResourceManager().getClientRMService().getApplications(request);
     assertEquals(0, response.getApplicationList().size());
 
     interpreterSettingManager.close();
   }
 
   @Test
-  public void testYarnClientMode()
-      throws IOException, YarnException, InterruptedException, InterpreterException {
-    InterpreterSetting sparkInterpreterSetting =
-        interpreterSettingManager.getInterpreterSettingByName("spark");
+  public void testYarnClientMode() throws IOException, YarnException, InterruptedException, InterpreterException {
+    InterpreterSetting sparkInterpreterSetting = interpreterSettingManager.getInterpreterSettingByName("spark");
     sparkInterpreterSetting.setProperty("master", "yarn-client");
     sparkInterpreterSetting.setProperty("HADOOP_CONF_DIR", hadoopCluster.getConfigPath());
     sparkInterpreterSetting.setProperty("SPARK_HOME", sparkHome);
-    sparkInterpreterSetting.setProperty(
-        "ZEPPELIN_CONF_DIR", zeppelin.getZeppelinConfDir().getAbsolutePath());
+    sparkInterpreterSetting.setProperty("ZEPPELIN_CONF_DIR", zeppelin.getZeppelinConfDir().getAbsolutePath());
     sparkInterpreterSetting.setProperty("zeppelin.spark.useHiveContext", "false");
     sparkInterpreterSetting.setProperty("zeppelin.pyspark.useIPython", "false");
     sparkInterpreterSetting.setProperty("PYSPARK_PYTHON", getPythonExec());
@@ -165,29 +146,20 @@ public class SparkIntegrationTest {
     testInterpreterBasics();
 
     // 1 yarn application launched
-    GetApplicationsRequest request =
-        GetApplicationsRequest.newInstance(EnumSet.of(YarnApplicationState.RUNNING));
-    GetApplicationsResponse response =
-        hadoopCluster
-            .getYarnCluster()
-            .getResourceManager()
-            .getClientRMService()
-            .getApplications(request);
+    GetApplicationsRequest request = GetApplicationsRequest.newInstance(EnumSet.of(YarnApplicationState.RUNNING));
+    GetApplicationsResponse response = hadoopCluster.getYarnCluster().getResourceManager().getClientRMService().getApplications(request);
     assertEquals(1, response.getApplicationList().size());
 
     interpreterSettingManager.close();
   }
 
   @Test
-  public void testYarnClusterMode()
-      throws IOException, YarnException, InterruptedException, InterpreterException {
-    InterpreterSetting sparkInterpreterSetting =
-        interpreterSettingManager.getInterpreterSettingByName("spark");
+  public void testYarnClusterMode() throws IOException, YarnException, InterruptedException, InterpreterException {
+    InterpreterSetting sparkInterpreterSetting = interpreterSettingManager.getInterpreterSettingByName("spark");
     sparkInterpreterSetting.setProperty("master", "yarn-cluster");
     sparkInterpreterSetting.setProperty("HADOOP_CONF_DIR", hadoopCluster.getConfigPath());
     sparkInterpreterSetting.setProperty("SPARK_HOME", sparkHome);
-    sparkInterpreterSetting.setProperty(
-        "ZEPPELIN_CONF_DIR", zeppelin.getZeppelinConfDir().getAbsolutePath());
+    sparkInterpreterSetting.setProperty("ZEPPELIN_CONF_DIR", zeppelin.getZeppelinConfDir().getAbsolutePath());
     sparkInterpreterSetting.setProperty("zeppelin.spark.useHiveContext", "false");
     sparkInterpreterSetting.setProperty("zeppelin.pyspark.useIPython", "false");
     sparkInterpreterSetting.setProperty("PYSPARK_PYTHON", getPythonExec());
@@ -196,14 +168,8 @@ public class SparkIntegrationTest {
     testInterpreterBasics();
 
     // 1 yarn application launched
-    GetApplicationsRequest request =
-        GetApplicationsRequest.newInstance(EnumSet.of(YarnApplicationState.RUNNING));
-    GetApplicationsResponse response =
-        hadoopCluster
-            .getYarnCluster()
-            .getResourceManager()
-            .getClientRMService()
-            .getApplications(request);
+    GetApplicationsRequest request = GetApplicationsRequest.newInstance(EnumSet.of(YarnApplicationState.RUNNING));
+    GetApplicationsResponse response = hadoopCluster.getYarnCluster().getResourceManager().getClientRMService().getApplications(request);
     assertEquals(1, response.getApplicationList().size());
 
     interpreterSettingManager.close();
@@ -214,7 +180,7 @@ public class SparkIntegrationTest {
   }
 
   private String getPythonExec() throws IOException, InterruptedException {
-    Process process = Runtime.getRuntime().exec(new String[] {"which", "python"});
+    Process process = Runtime.getRuntime().exec(new String[]{"which", "python"});
     if (process.waitFor() != 0) {
       throw new RuntimeException("Fail to run command: which python.");
     }


[31/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectRegistry.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectRegistry.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectRegistry.java
index 0bcec1e..930ed7c 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectRegistry.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectRegistry.java
@@ -24,32 +24,33 @@ import java.util.Map;
 
 /**
  * AngularObjectRegistry keeps all the object that binded to Angular Display System.
- * AngularObjectRegistry is created per interpreter group. It provides three different scope of
- * AngularObjects : - Paragraphscope : AngularObject is valid in specific paragraph - Notebook
- * scope: AngularObject is valid in a single notebook - Global scope : Shared to all notebook that
- * uses the same interpreter group
+ * AngularObjectRegistry is created per interpreter group.
+ * It provides three different scope of AngularObjects :
+ *  - Paragraphscope : AngularObject is valid in specific paragraph
+ *  - Notebook scope: AngularObject is valid in a single notebook
+ *  - Global scope : Shared to all notebook that uses the same interpreter group
  */
 public class AngularObjectRegistry {
   Map<String, Map<String, AngularObject>> registry = new HashMap<>();
   private final String GLOBAL_KEY = "_GLOBAL_";
   private AngularObjectRegistryListener listener;
   private String interpreterId;
+  
 
   AngularObjectListener angularObjectListener;
 
-  public AngularObjectRegistry(
-      final String interpreterId, final AngularObjectRegistryListener listener) {
+  public AngularObjectRegistry(final String interpreterId,
+      final AngularObjectRegistryListener listener) {
     this.interpreterId = interpreterId;
     this.listener = listener;
-    angularObjectListener =
-        new AngularObjectListener() {
-          @Override
-          public void updated(AngularObject updatedObject) {
-            if (listener != null) {
-              listener.onUpdate(interpreterId, updatedObject);
-            }
-          }
-        };
+    angularObjectListener = new AngularObjectListener() {
+      @Override
+      public void updated(AngularObject updatedObject) {
+        if (listener != null) {
+          listener.onUpdate(interpreterId, updatedObject);
+        }
+      }
+    };
   }
 
   public AngularObjectRegistryListener getListener() {
@@ -59,8 +60,9 @@ public class AngularObjectRegistry {
   /**
    * Add object into registry
    *
-   * <p>Paragraph scope when noteId and paragraphId both not null Notebook scope when paragraphId is
-   * null Global scope when noteId and paragraphId both null
+   * Paragraph scope when noteId and paragraphId both not null
+   * Notebook scope when paragraphId is null
+   * Global scope when noteId and paragraphId both null
    *
    * @param name Name of object
    * @param o Reference to the object
@@ -83,14 +85,14 @@ public class AngularObjectRegistry {
       }
     }
   }
-
+  
   private Map<String, AngularObject> getRegistryForKey(String noteId, String paragraphId) {
     synchronized (registry) {
       String key = getRegistryKey(noteId, paragraphId);
       if (!registry.containsKey(key)) {
         registry.put(key, new HashMap<String, AngularObject>());
       }
-
+      
       return registry.get(key);
     }
   }
@@ -98,8 +100,9 @@ public class AngularObjectRegistry {
   /**
    * Add object into registry
    *
-   * <p>Paragraph scope when noteId and paragraphId both not null Notebook scope when paragraphId is
-   * null Global scope when noteId and paragraphId both null
+   * Paragraph scope when noteId and paragraphId both not null
+   * Notebook scope when paragraphId is null
+   * Global scope when noteId and paragraphId both null
    *
    * @param name Name of object
    * @param o Reference to the object
@@ -108,7 +111,8 @@ public class AngularObjectRegistry {
    * @param emit skip firing onAdd event on false
    * @return AngularObject that added
    */
-  public AngularObject add(String name, Object o, String noteId, String paragraphId, boolean emit) {
+  public AngularObject add(String name, Object o, String noteId, String paragraphId,
+                           boolean emit) {
     AngularObject ao = createNewAngularObject(name, o, noteId, paragraphId);
 
     synchronized (registry) {
@@ -122,8 +126,8 @@ public class AngularObjectRegistry {
     return ao;
   }
 
-  protected AngularObject createNewAngularObject(
-      String name, Object o, String noteId, String paragraphId) {
+  protected AngularObject createNewAngularObject(String name, Object o, String noteId,
+                                                 String paragraphId) {
     return new AngularObject(name, o, noteId, paragraphId, angularObjectListener);
   }
 
@@ -166,9 +170,9 @@ public class AngularObjectRegistry {
   /**
    * Remove all angular object in the scope.
    *
-   * <p>Remove all paragraph scope angular object when noteId and paragraphId both not null Remove
-   * all notebook scope angular object when paragraphId is null Remove all global scope angular
-   * objects when noteId and paragraphId both null
+   * Remove all paragraph scope angular object when noteId and paragraphId both not null
+   * Remove all notebook scope angular object when paragraphId is null
+   * Remove all global scope angular objects when noteId and paragraphId both null
    *
    * @param noteId noteId
    * @param paragraphId paragraphId
@@ -184,7 +188,6 @@ public class AngularObjectRegistry {
 
   /**
    * Get a object from registry
-   *
    * @param name name of object
    * @param noteId noteId that belongs to
    * @param paragraphId paragraphId that belongs to
@@ -199,7 +202,6 @@ public class AngularObjectRegistry {
 
   /**
    * Get all object in the scope
-   *
    * @param noteId noteId that belongs to
    * @param paragraphId paragraphId that belongs to
    * @return all angularobject in the scope
@@ -214,10 +216,11 @@ public class AngularObjectRegistry {
     }
     return all;
   }
-
+  
   /**
-   * Get all angular object related to specific note. That includes all global scope objects,
-   * notebook scope objects and paragraph scope objects belongs to the noteId.
+   * Get all angular object related to specific note.
+   * That includes all global scope objects, notebook scope objects and paragraph scope objects
+   * belongs to the noteId.
    *
    * @param noteId
    * @return

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectRegistryListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectRegistryListener.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectRegistryListener.java
index c8f2bfa..081bb43 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectRegistryListener.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectRegistryListener.java
@@ -17,11 +17,12 @@
 
 package org.apache.zeppelin.display;
 
-/** */
+/**
+ *
+ *
+ */
 public interface AngularObjectRegistryListener {
   void onAdd(String interpreterGroupId, AngularObject object);
-
   void onUpdate(String interpreterGroupId, AngularObject object);
-
   void onRemove(String interpreterGroupId, String name, String noteId, String paragraphId);
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectWatcher.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectWatcher.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectWatcher.java
index 286a372..c5bd5e2 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectWatcher.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectWatcher.java
@@ -19,7 +19,9 @@ package org.apache.zeppelin.display;
 
 import org.apache.zeppelin.interpreter.InterpreterContext;
 
-/** */
+/**
+ *
+ */
 public abstract class AngularObjectWatcher {
   private InterpreterContext context;
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/GUI.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/GUI.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/GUI.java
index 767a466..8bae53f 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/GUI.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/GUI.java
@@ -19,6 +19,12 @@ package org.apache.zeppelin.display;
 
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
+import org.apache.zeppelin.display.ui.CheckBox;
+import org.apache.zeppelin.display.ui.OptionInput.ParamOption;
+import org.apache.zeppelin.display.ui.Password;
+import org.apache.zeppelin.display.ui.Select;
+import org.apache.zeppelin.display.ui.TextBox;
+
 import java.io.Serializable;
 import java.util.Collection;
 import java.util.HashMap;
@@ -26,22 +32,23 @@ import java.util.LinkedHashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-import org.apache.zeppelin.display.ui.CheckBox;
-import org.apache.zeppelin.display.ui.OptionInput.ParamOption;
-import org.apache.zeppelin.display.ui.Password;
-import org.apache.zeppelin.display.ui.Select;
-import org.apache.zeppelin.display.ui.TextBox;
 
-/** Settings of a form. */
+
+/**
+ * Settings of a form.
+ */
 public class GUI implements Serializable {
 
-  private static Gson gson =
-      new GsonBuilder().registerTypeAdapterFactory(Input.TypeAdapterFactory).create();
+  private static Gson gson = new GsonBuilder()
+      .registerTypeAdapterFactory(Input.TypeAdapterFactory)
+      .create();
 
   Map<String, Object> params = new HashMap<>(); // form parameters from client
   Map<String, Input> forms = new LinkedHashMap<>(); // form configuration
 
-  public GUI() {}
+  public GUI() {
+
+  }
 
   public void setParams(Map<String, Object> values) {
     this.params = values;
@@ -102,8 +109,8 @@ public class GUI implements Serializable {
     return value;
   }
 
-  public List<Object> checkbox(
-      String id, Collection<Object> defaultChecked, ParamOption[] options) {
+  public List<Object> checkbox(String id, Collection<Object> defaultChecked,
+                               ParamOption[] options) {
     Collection<Object> checked = (Collection<Object>) params.get(id);
     if (checked == null) {
       checked = defaultChecked;
@@ -146,6 +153,7 @@ public class GUI implements Serializable {
       return false;
     }
     return forms != null ? forms.equals(gui.forms) : gui.forms == null;
+
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/Input.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/Input.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/Input.java
index 80b1235..40878a8 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/Input.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/Input.java
@@ -17,6 +17,14 @@
 
 package org.apache.zeppelin.display;
 
+import org.apache.commons.lang.StringUtils;
+import org.apache.zeppelin.display.ui.CheckBox;
+import org.apache.zeppelin.display.ui.OptionInput;
+import org.apache.zeppelin.display.ui.OptionInput.ParamOption;
+import org.apache.zeppelin.display.ui.Password;
+import org.apache.zeppelin.display.ui.Select;
+import org.apache.zeppelin.display.ui.TextBox;
+
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -27,13 +35,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import org.apache.commons.lang.StringUtils;
-import org.apache.zeppelin.display.ui.CheckBox;
-import org.apache.zeppelin.display.ui.OptionInput;
-import org.apache.zeppelin.display.ui.OptionInput.ParamOption;
-import org.apache.zeppelin.display.ui.Password;
-import org.apache.zeppelin.display.ui.Select;
-import org.apache.zeppelin.display.ui.TextBox;
 
 /**
  * Base class for dynamic forms. Also used as factory class of dynamic forms.
@@ -61,7 +62,8 @@ public class Input<T> implements Serializable {
   protected boolean hidden;
   protected String argument;
 
-  public Input() {}
+  public Input() {
+  }
 
   public boolean isHidden() {
     return hidden;
@@ -116,17 +118,17 @@ public class Input<T> implements Serializable {
       return false;
     }
     if (defaultValue instanceof Object[]) {
-      if (defaultValue != null
-          ? !Arrays.equals((Object[]) defaultValue, (Object[]) input.defaultValue)
+      if (defaultValue != null ?
+          !Arrays.equals((Object[]) defaultValue, (Object[]) input.defaultValue)
           : input.defaultValue != null) {
         return false;
       }
-    } else if (defaultValue != null
-        ? !defaultValue.equals(input.defaultValue)
-        : input.defaultValue != null) {
+    } else if (defaultValue != null ?
+        !defaultValue.equals(input.defaultValue) : input.defaultValue != null) {
       return false;
     }
     return argument != null ? argument.equals(input.argument) : input.argument == null;
+
   }
 
   @Override
@@ -213,6 +215,7 @@ public class Input<T> implements Serializable {
       valuePart = null;
     }
 
+
     String varName;
     String displayName = null;
     String type = null;
@@ -265,9 +268,11 @@ public class Input<T> implements Serializable {
           }
         }
 
+
       } else { // no option
         defaultValue = valuePart;
       }
+
     }
 
     Input input = null;
@@ -290,8 +295,8 @@ public class Input<T> implements Serializable {
     return input;
   }
 
-  public static LinkedHashMap<String, Input> extractSimpleQueryForm(
-      String script, boolean noteForm) {
+  public static LinkedHashMap<String, Input> extractSimpleQueryForm(String script,
+                                                                    boolean noteForm) {
     LinkedHashMap<String, Input> forms = new LinkedHashMap<>();
     if (script == null) {
       return forms;
@@ -336,18 +341,16 @@ public class Input<T> implements Serializable {
       }
 
       String expanded;
-      if (value instanceof Object[] || value instanceof Collection) { // multi-selection
+      if (value instanceof Object[] || value instanceof Collection) {  // multi-selection
         OptionInput optionInput = (OptionInput) input;
         String delimiter = input.argument;
         if (delimiter == null) {
           delimiter = DEFAULT_DELIMITER;
         }
-        Collection<Object> checked =
-            value instanceof Collection
-                ? (Collection<Object>) value
-                : Arrays.asList((Object[]) value);
+        Collection<Object> checked = value instanceof Collection ? (Collection<Object>) value
+            : Arrays.asList((Object[]) value);
         List<Object> validChecked = new LinkedList<>();
-        for (Object o : checked) { // filter out obsolete checked values
+        for (Object o : checked) {  // filter out obsolete checked values
           for (ParamOption option : optionInput.getOptions()) {
             if (option.getValue().equals(o)) {
               validChecked.add(o);
@@ -357,7 +360,7 @@ public class Input<T> implements Serializable {
         }
         params.put(input.name, validChecked);
         expanded = StringUtils.join(validChecked, delimiter);
-      } else { // single-selection
+      } else {  // single-selection
         expanded = value.toString();
       }
       replaced = match.replaceFirst(expanded);
@@ -367,8 +370,10 @@ public class Input<T> implements Serializable {
     return replaced;
   }
 
+
   public static String[] split(String str) {
     return str.split(";(?=([^\"']*\"[^\"']*\")*[^\"']*$)");
+
   }
 
   /*
@@ -377,32 +382,28 @@ public class Input<T> implements Serializable {
    * str.split("\\|(?=([^\"']*\"[^\"']*\")*[^\"']*$)"); }
    */
 
+
   public static String[] splitPipe(String str) {
     return split(str, '|');
   }
 
   public static String[] split(String str, char split) {
-    return split(str, new String[] {String.valueOf(split)}, false);
+    return split(str, new String[]{String.valueOf(split)}, false);
   }
 
   public static String[] split(String str, String[] splitters, boolean includeSplitter) {
     String escapeSeq = "\"',;${}";
     char escapeChar = '\\';
 
-    String[] blockStart = new String[] {"\"", "'", "${", "N_(", "N_<"};
-    String[] blockEnd = new String[] {"\"", "'", "}", "N_)", "N_>"};
+    String[] blockStart = new String[]{"\"", "'", "${", "N_(", "N_<"};
+    String[] blockEnd = new String[]{"\"", "'", "}", "N_)", "N_>"};
 
     return split(str, escapeSeq, escapeChar, blockStart, blockEnd, splitters, includeSplitter);
+
   }
 
-  public static String[] split(
-      String str,
-      String escapeSeq,
-      char escapeChar,
-      String[] blockStart,
-      String[] blockEnd,
-      String[] splitters,
-      boolean includeSplitter) {
+  public static String[] split(String str, String escapeSeq, char escapeChar, String[] blockStart,
+                               String[] blockEnd, String[] splitters, boolean includeSplitter) {
 
     List<String> splits = new ArrayList<>();
 
@@ -455,10 +456,8 @@ public class Input<T> implements Serializable {
         if (isNestedBlock(blockStart[blockStack.get(0)]) == true) {
           // try to find nested block start
 
-          if (curString
-                  .substring(lastEscapeOffset + 1)
-                  .endsWith(getBlockStr(blockStart[blockStack.get(0)]))
-              == true) {
+          if (curString.substring(lastEscapeOffset + 1).endsWith(
+              getBlockStr(blockStart[blockStack.get(0)])) == true) {
             blockStack.add(0, blockStack.get(0)); // block is started
             blockStartPos = i;
             continue;
@@ -466,9 +465,8 @@ public class Input<T> implements Serializable {
         }
 
         // check if block is finishing
-        if (curString
-            .substring(lastEscapeOffset + 1)
-            .endsWith(getBlockStr(blockEnd[blockStack.get(0)]))) {
+        if (curString.substring(lastEscapeOffset + 1).endsWith(
+            getBlockStr(blockEnd[blockStack.get(0)]))) {
           // the block closer is one of the splitters (and not nested block)
           if (isNestedBlock(blockEnd[blockStack.get(0)]) == false) {
             for (String splitter : splitters) {
@@ -515,8 +513,8 @@ public class Input<T> implements Serializable {
 
         // check if block is started
         for (int b = 0; b < blockStart.length; b++) {
-          if (curString.substring(lastEscapeOffset + 1).endsWith(getBlockStr(blockStart[b]))
-              == true) {
+          if (curString.substring(lastEscapeOffset + 1)
+              .endsWith(getBlockStr(blockStart[b])) == true) {
             blockStack.add(0, b); // block is started
             blockStartPos = i;
             break;
@@ -527,7 +525,8 @@ public class Input<T> implements Serializable {
     if (curString.length() > 0) {
       splits.add(curString.toString().trim());
     }
-    return splits.toArray(new String[] {});
+    return splits.toArray(new String[]{});
+
   }
 
   private static String getBlockStr(String blockDef) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/OldInput.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/OldInput.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/OldInput.java
index 45ecba0..7c67dad 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/OldInput.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/OldInput.java
@@ -20,10 +20,11 @@ package org.apache.zeppelin.display;
 import org.apache.zeppelin.display.ui.OptionInput.ParamOption;
 
 /**
- * Old Input type. The reason I still keep Old Input is for compatibility. There's one bug in the
- * old input forms. There's 2 ways to create input forms: frontend & backend. The bug is in
- * frontend. The type would not be set correctly when input form is created in frontend
- * (Input.getInputForm).
+ * Old Input type.
+ * The reason I still keep Old Input is for compatibility. There's one bug in the old input forms.
+ * There's 2 ways to create input forms: frontend & backend.
+ * The bug is in frontend. The type would not be set correctly when input form
+ * is created in frontend (Input.getInputForm).
  */
 public class OldInput extends Input<Object> {
 
@@ -57,21 +58,27 @@ public class OldInput extends Input<Object> {
     this.options = options;
   }
 
-  /** */
+  /**
+   *
+   */
   public static class OldTextBox extends OldInput {
     public OldTextBox(String name, Object defaultValue) {
       super(name, defaultValue);
     }
   }
 
-  /** */
+  /**
+   *
+   */
   public static class OldSelect extends OldInput {
     public OldSelect(String name, Object defaultValue, ParamOption[] options) {
       super(name, defaultValue, options);
     }
   }
 
-  /** */
+  /**
+   *
+   */
   public static class OldCheckBox extends OldInput {
     public OldCheckBox(String name, Object defaultValue, ParamOption[] options) {
       super(name, defaultValue, options);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/RuntimeTypeAdapterFactory.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/RuntimeTypeAdapterFactory.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/RuntimeTypeAdapterFactory.java
index 88d32d1..65b4f6b 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/RuntimeTypeAdapterFactory.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/RuntimeTypeAdapterFactory.java
@@ -28,6 +28,7 @@ import com.google.gson.internal.Streams;
 import com.google.gson.reflect.TypeToken;
 import com.google.gson.stream.JsonReader;
 import com.google.gson.stream.JsonWriter;
+
 import java.io.IOException;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -52,26 +53,27 @@ public class RuntimeTypeAdapterFactory<T> implements TypeAdapterFactory {
   }
 
   /**
-   * Creates a new runtime type adapter using for {@code baseType} using {@code typeFieldName} as
-   * the type field name. Type field names are case sensitive.
+   * Creates a new runtime type adapter using for {@code baseType} using {@code
+   * typeFieldName} as the type field name. Type field names are case sensitive.
    */
   public static <T> RuntimeTypeAdapterFactory<T> of(Class<T> baseType, String typeFieldName) {
     return new RuntimeTypeAdapterFactory<T>(baseType, typeFieldName);
   }
 
   /**
-   * Creates a new runtime type adapter for {@code baseType} using {@code "type"} as the type field
-   * name.
+   * Creates a new runtime type adapter for {@code baseType} using {@code "type"} as
+   * the type field name.
    */
   public static <T> RuntimeTypeAdapterFactory<T> of(Class<T> baseType) {
     return new RuntimeTypeAdapterFactory<T>(baseType, "type");
   }
 
   /**
-   * Registers {@code type} identified by {@code label}. Labels are case sensitive.
+   * Registers {@code type} identified by {@code label}. Labels are case
+   * sensitive.
    *
-   * @throws IllegalArgumentException if either {@code type} or {@code label} have already been
-   *     registered on this type adapter.
+   * @throws IllegalArgumentException if either {@code type} or {@code label}
+   *     have already been registered on this type adapter.
    */
   public RuntimeTypeAdapterFactory<T> registerSubtype(Class<? extends T> type, String label) {
     if (type == null) {
@@ -86,11 +88,11 @@ public class RuntimeTypeAdapterFactory<T> implements TypeAdapterFactory {
   }
 
   /**
-   * Registers {@code type} identified by its {@link Class#getSimpleName simple name}. Labels are
-   * case sensitive.
+   * Registers {@code type} identified by its {@link Class#getSimpleName simple
+   * name}. Labels are case sensitive.
    *
-   * @throws IllegalArgumentException if either {@code type} or its simple name have already been
-   *     registered on this type adapter.
+   * @throws IllegalArgumentException if either {@code type} or its simple name
+   *     have already been registered on this type adapter.
    */
   public RuntimeTypeAdapterFactory<T> registerSubtype(Class<? extends T> type) {
     return registerSubtype(type, type.getSimpleName());
@@ -111,41 +113,32 @@ public class RuntimeTypeAdapterFactory<T> implements TypeAdapterFactory {
     }
 
     return new TypeAdapter<R>() {
-      @Override
-      public R read(JsonReader in) throws IOException {
+      @Override public R read(JsonReader in) throws IOException {
         JsonElement jsonElement = Streams.parse(in);
         JsonElement labelJsonElement = jsonElement.getAsJsonObject().remove(typeFieldName);
         String label = (labelJsonElement == null ? null : labelJsonElement.getAsString());
         @SuppressWarnings("unchecked") // registration requires that subtype extends T
-        TypeAdapter<R> delegate = (TypeAdapter<R>) labelToDelegate.get(label);
+            TypeAdapter<R> delegate = (TypeAdapter<R>) labelToDelegate.get(label);
         if (delegate == null) {
-          throw new JsonParseException(
-              "cannot deserialize "
-                  + baseType
-                  + " subtype named "
-                  + label
-                  + "; did you forget to register a subtype?");
+          throw new JsonParseException("cannot deserialize " + baseType + " subtype named "
+              + label + "; did you forget to register a subtype?");
         }
         return delegate.fromJsonTree(jsonElement);
       }
 
-      @Override
-      public void write(JsonWriter out, R value) throws IOException {
+      @Override public void write(JsonWriter out, R value) throws IOException {
         Class<?> srcType = value.getClass();
         String label = subtypeToLabel.get(srcType);
         @SuppressWarnings("unchecked") // registration requires that subtype extends T
-        TypeAdapter<R> delegate = (TypeAdapter<R>) subtypeToDelegate.get(srcType);
+            TypeAdapter<R> delegate = (TypeAdapter<R>) subtypeToDelegate.get(srcType);
         if (delegate == null) {
-          throw new JsonParseException(
-              "cannot serialize " + srcType.getName() + "; did you forget to register a subtype?");
+          throw new JsonParseException("cannot serialize " + srcType.getName()
+              + "; did you forget to register a subtype?");
         }
         JsonObject jsonObject = delegate.toJsonTree(value).getAsJsonObject();
         if (jsonObject.has(typeFieldName) && !srcType.getSimpleName().equals("OldInput")) {
-          throw new JsonParseException(
-              "cannot serialize "
-                  + srcType.getName()
-                  + " because it already defines a field named "
-                  + typeFieldName);
+          throw new JsonParseException("cannot serialize " + srcType.getName()
+              + " because it already defines a field named " + typeFieldName);
         }
         JsonObject clone = new JsonObject();
         if (!srcType.getSimpleName().equals("OldInput")) {
@@ -159,3 +152,4 @@ public class RuntimeTypeAdapterFactory<T> implements TypeAdapterFactory {
     }.nullSafe();
   }
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/CheckBox.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/CheckBox.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/CheckBox.java
index 6d3be2a..02a0ff4 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/CheckBox.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/CheckBox.java
@@ -15,14 +15,18 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.display.ui;
 
 import java.util.Collection;
 
-/** Html Checkbox */
+/**
+ * Html Checkbox
+ */
 public class CheckBox extends OptionInput<Object[]> {
 
-  public CheckBox() {}
+  public CheckBox() {
+  }
 
   public CheckBox(String name, Object[] defaultValue, ParamOption[] options) {
     this.name = name;
@@ -34,4 +38,5 @@ public class CheckBox extends OptionInput<Object[]> {
   public CheckBox(String name, Collection<Object> defaultValue, ParamOption[] options) {
     this(name, defaultValue.toArray(), options);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/OptionInput.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/OptionInput.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/OptionInput.java
index 95de795..d5a1c0d 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/OptionInput.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/OptionInput.java
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.display.ui;
 
 import org.apache.zeppelin.display.Input;
@@ -26,7 +27,9 @@ import org.apache.zeppelin.display.Input;
  */
 public abstract class OptionInput<T> extends Input<T> {
 
-  /** Parameters option. */
+  /**
+   * Parameters option.
+   */
   public static class ParamOption {
     Object value;
     String displayName;
@@ -46,6 +49,7 @@ public abstract class OptionInput<T> extends Input<T> {
 
       if (value != null ? !value.equals(that.value) : that.value != null) return false;
       return displayName != null ? displayName.equals(that.displayName) : that.displayName == null;
+
     }
 
     @Override
@@ -70,6 +74,7 @@ public abstract class OptionInput<T> extends Input<T> {
     public void setDisplayName(String displayName) {
       this.displayName = displayName;
     }
+
   }
 
   protected ParamOption[] options;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/Password.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/Password.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/Password.java
index fefa4d8..e3fd624 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/Password.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/Password.java
@@ -15,17 +15,22 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.display.ui;
 
 import org.apache.zeppelin.display.Input;
 
 public class Password extends Input<String> {
 
-  public Password() {}
+  public Password() {
+
+  }
 
   public Password(String name) {
     this.name = name;
     this.displayName = name;
     this.defaultValue = "";
   }
+
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/Select.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/Select.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/Select.java
index 54f06aa..212d3d7 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/Select.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/Select.java
@@ -17,10 +17,14 @@
 
 package org.apache.zeppelin.display.ui;
 
-/** Html Dropdown list */
+/**
+ * Html Dropdown list
+ */
 public class Select extends OptionInput<Object> {
 
-  public Select() {}
+  public Select() {
+
+  }
 
   public Select(String name, Object defaultValue, ParamOption[] options) {
     this.name = name;
@@ -28,4 +32,5 @@ public class Select extends OptionInput<Object> {
     this.defaultValue = defaultValue;
     this.options = options;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/TextBox.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/TextBox.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/TextBox.java
index c06d1bb..b9f9946 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/TextBox.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/TextBox.java
@@ -15,18 +15,24 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.display.ui;
 
 import org.apache.zeppelin.display.Input;
 
-/** Html TextBox control */
+/**
+ * Html TextBox control
+ */
 public class TextBox extends Input<String> {
 
-  public TextBox() {}
+  public TextBox() {
+
+  }
 
   public TextBox(String name, String defaultValue) {
     this.name = name;
     this.displayName = name;
     this.defaultValue = defaultValue;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/Application.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/Application.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/Application.java
index 260a9bb..d138595 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/Application.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/Application.java
@@ -16,13 +16,15 @@
  */
 package org.apache.zeppelin.helium;
 
-import java.io.IOException;
 import org.apache.zeppelin.annotation.Experimental;
 import org.apache.zeppelin.resource.ResourceSet;
 
+import java.io.IOException;
+
 /**
- * Base class for pluggable application (e.g. visualization) Application can access resources from
- * ResourcePool and interact with front-end using AngularDisplay system
+ * Base class for pluggable application (e.g. visualization)
+ * Application can access resources from ResourcePool and interact with front-end using
+ * AngularDisplay system
  */
 @Experimental
 public abstract class Application {
@@ -38,19 +40,22 @@ public abstract class Application {
   }
 
   /**
-   * This method can be invoked multiple times before unload(), Either just after application
-   * selected or when paragraph re-run after application load
+   * This method can be invoked multiple times before unload(),
+   * Either just after application selected or when paragraph re-run after application load
    */
   @Experimental
-  public abstract void run(ResourceSet args) throws ApplicationException, IOException;
+  public abstract void run(ResourceSet args)
+      throws ApplicationException, IOException;
 
-  /** this method is invoked just before application is removed */
+
+  /**
+   * this method is invoked just before application is removed
+   */
   @Experimental
   public abstract void unload() throws ApplicationException;
 
   /**
    * Print string on the notebook
-   *
    * @param string
    * @throws IOException
    */
@@ -61,7 +66,6 @@ public abstract class Application {
 
   /**
    * Print string on the notebook with newline
-   *
    * @param string
    * @throws IOException
    */
@@ -72,7 +76,6 @@ public abstract class Application {
 
   /**
    * Print resource on the notebook
-   *
    * @param resourceName
    * @throws IOException
    */
@@ -84,14 +87,14 @@ public abstract class Application {
   /**
    * Print resource as a javascript
    *
-   * <p>Using this method does not require print javascript inside of <script></script> tag.
-   * Javascript printed using this method will be run in the un-named function. i.e. each method
-   * call will creates different variable scope for the javascript code.
+   * Using this method does not require print javascript inside of <script></script> tag.
+   * Javascript printed using this method will be run in the un-named function.
+   * i.e. each method call will creates different variable scope for the javascript code.
    *
-   * <p>This method inject '$z' into the variable scope for convenience.
+   * This method inject '$z' into the variable scope for convenience.
    *
-   * <p>$z.scope : angularjs scope object for this application $z.id : unique id for this
-   * application instance
+   * $z.scope : angularjs scope object for this application
+   * $z.id : unique id for this application instance
    *
    * @param resourceName
    * @throws IOException
@@ -106,14 +109,14 @@ public abstract class Application {
   /**
    * Print string as a javascript
    *
-   * <p>Using this method does not require print javascript inside of <script></script> tag.
-   * Javascript printed using this method will be run in the un-named function. i.e. each method
-   * call will creates different variable scope for the javascript code.
+   * Using this method does not require print javascript inside of <script></script> tag.
+   * Javascript printed using this method will be run in the un-named function.
+   * i.e. each method call will creates different variable scope for the javascript code.
    *
-   * <p>This method inject '$z' into the variable scope for convenience.
+   * This method inject '$z' into the variable scope for convenience.
    *
-   * <p>$z.scope : angularjs scope object for this application $z.id : unique id for this
-   * application instance
+   * $z.scope : angularjs scope object for this application
+   * $z.id : unique id for this application instance
    *
    * @param js
    * @throws IOException
@@ -133,9 +136,8 @@ public abstract class Application {
     js.append("id : \"" + context.getApplicationInstanceId() + "\",\n");
     js.append("scope : angular.element(\"#app_js_" + js.hashCode() + "\").scope()\n");
     js.append("};\n");
-    js.append(
-        "$z.result = ($z.scope._devmodeResult) ? "
-            + "$z.scope._devmodeResult : $z.scope.$parent.paragraph.result;\n");
+    js.append("$z.result = ($z.scope._devmodeResult) ? " +
+        "$z.scope._devmodeResult : $z.scope.$parent.paragraph.result;\n");
     context.out.write(js.toString());
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationContext.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationContext.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationContext.java
index 1f8246a..8d3f67e 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationContext.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationContext.java
@@ -18,7 +18,9 @@ package org.apache.zeppelin.helium;
 
 import org.apache.zeppelin.interpreter.InterpreterOutput;
 
-/** ApplicationContext */
+/**
+ * ApplicationContext
+ */
 public class ApplicationContext {
   private final String noteId;
   private final String paragraphId;
@@ -26,12 +28,12 @@ public class ApplicationContext {
   private final HeliumAppAngularObjectRegistry angularObjectRegistry;
   public final InterpreterOutput out;
 
-  public ApplicationContext(
-      String noteId,
-      String paragraphId,
-      String applicationInstanceId,
-      HeliumAppAngularObjectRegistry angularObjectRegistry,
-      InterpreterOutput out) {
+
+  public ApplicationContext(String noteId,
+                            String paragraphId,
+                            String applicationInstanceId,
+                            HeliumAppAngularObjectRegistry angularObjectRegistry,
+                            InterpreterOutput out) {
     this.noteId = noteId;
     this.paragraphId = paragraphId;
     this.applicationInstanceId = applicationInstanceId;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationEventListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationEventListener.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationEventListener.java
index b34b715..ca971f5 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationEventListener.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationEventListener.java
@@ -18,19 +18,15 @@ package org.apache.zeppelin.helium;
 
 import org.apache.zeppelin.interpreter.InterpreterResult;
 
-/** Event from HeliumApplication running on remote interpreter process */
+/**
+ * Event from HeliumApplication running on remote interpreter process
+ */
 public interface ApplicationEventListener {
-  void onOutputAppend(String noteId, String paragraphId, int index, String appId, String output);
-
+  void onOutputAppend(
+      String noteId, String paragraphId, int index, String appId, String output);
   void onOutputUpdated(
-      String noteId,
-      String paragraphId,
-      int index,
-      String appId,
-      InterpreterResult.Type type,
-      String output);
-
+      String noteId, String paragraphId, int index, String appId,
+      InterpreterResult.Type type, String output);
   void onLoad(String noteId, String paragraphId, String appId, HeliumPackage pkg);
-
   void onStatusChange(String noteId, String paragraphId, String appId, String status);
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationException.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationException.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationException.java
index 5fa3553..d3c6488 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationException.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationException.java
@@ -16,7 +16,9 @@
  */
 package org.apache.zeppelin.helium;
 
-/** Application exception */
+/**
+ * Application exception
+ */
 public class ApplicationException extends Exception {
   public ApplicationException(String s) {
     super(s);
@@ -26,7 +28,9 @@ public class ApplicationException extends Exception {
     super(e);
   }
 
-  public ApplicationException() {}
+  public ApplicationException() {
+
+  }
 
   public ApplicationException(String message, Throwable cause) {
     super(message, cause);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationLoader.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationLoader.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationLoader.java
index 967d039..241273a 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationLoader.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ApplicationLoader.java
@@ -16,6 +16,14 @@
  */
 package org.apache.zeppelin.helium;
 
+import org.apache.zeppelin.dep.DependencyResolver;
+import org.apache.zeppelin.resource.DistributedResourcePool;
+import org.apache.zeppelin.resource.Resource;
+import org.apache.zeppelin.resource.ResourcePool;
+import org.apache.zeppelin.resource.ResourceSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.File;
 import java.lang.reflect.Constructor;
 import java.net.URL;
@@ -25,15 +33,10 @@ import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-import org.apache.zeppelin.dep.DependencyResolver;
-import org.apache.zeppelin.resource.DistributedResourcePool;
-import org.apache.zeppelin.resource.Resource;
-import org.apache.zeppelin.resource.ResourcePool;
-import org.apache.zeppelin.resource.ResourceSet;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Load application */
+/**
+ * Load application
+ */
 public class ApplicationLoader {
   Logger logger = LoggerFactory.getLogger(ApplicationLoader.class);
 
@@ -44,10 +47,13 @@ public class ApplicationLoader {
   public ApplicationLoader(ResourcePool resourcePool, DependencyResolver depResolver) {
     this.depResolver = depResolver;
     this.resourcePool = resourcePool;
-    cached = Collections.synchronizedMap(new HashMap<HeliumPackage, Class<Application>>());
+    cached = Collections.synchronizedMap(
+        new HashMap<HeliumPackage, Class<Application>>());
   }
 
-  /** Information of loaded application */
+  /**
+   * Information of loaded application
+   */
   private static class RunningApplication {
     HeliumPackage packageInfo;
     String noteId;
@@ -84,13 +90,13 @@ public class ApplicationLoader {
       }
 
       RunningApplication r = (RunningApplication) o;
-      return packageInfo.equals(r.getPackageInfo())
-          && paragraphId.equals(r.getParagraphId())
-          && noteId.equals(r.getNoteId());
+      return packageInfo.equals(r.getPackageInfo()) && paragraphId.equals(r.getParagraphId()) &&
+          noteId.equals(r.getNoteId());
     }
   }
 
   /**
+   *
    * Instantiate application
    *
    * @param packageInfo
@@ -98,7 +104,8 @@ public class ApplicationLoader {
    * @return
    * @throws Exception
    */
-  public Application load(HeliumPackage packageInfo, ApplicationContext context) throws Exception {
+  public Application load(HeliumPackage packageInfo, ApplicationContext context)
+      throws Exception {
     if (packageInfo.getType() != HeliumType.APPLICATION) {
       throw new ApplicationException(
           "Can't instantiate " + packageInfo.getType() + " package using ApplicationLoader");
@@ -109,9 +116,8 @@ public class ApplicationLoader {
         new RunningApplication(packageInfo, context.getNoteId(), context.getParagraphId());
 
     // get resource required by this package
-    ResourceSet resources =
-        findRequiredResourceSet(
-            packageInfo.getResources(), context.getNoteId(), context.getParagraphId());
+    ResourceSet resources = findRequiredResourceSet(packageInfo.getResources(),
+        context.getNoteId(), context.getParagraphId());
 
     // load class
     Class<Application> appClass = loadClass(packageInfo);
@@ -133,7 +139,7 @@ public class ApplicationLoader {
   }
 
   public ResourceSet findRequiredResourceSet(
-      String[][] requiredResources, String noteId, String paragraphId) {
+      String [][] requiredResources, String noteId, String paragraphId) {
     if (requiredResources == null || requiredResources.length == 0) {
       return new ResourceSet();
     }
@@ -148,8 +154,10 @@ public class ApplicationLoader {
     return findRequiredResourceSet(requiredResources, noteId, paragraphId, allResources);
   }
 
-  static ResourceSet findRequiredResourceSet(
-      String[][] requiredResources, String noteId, String paragraphId, ResourceSet resources) {
+  static ResourceSet findRequiredResourceSet(String [][] requiredResources,
+                                             String noteId,
+                                             String paragraphId,
+                                             ResourceSet resources) {
     ResourceSet args = new ResourceSet();
     if (requiredResources == null || requiredResources.length == 0) {
       return args;
@@ -157,7 +165,7 @@ public class ApplicationLoader {
 
     resources = resources.filterByNoteId(noteId).filterByParagraphId(paragraphId);
 
-    for (String[] requires : requiredResources) {
+    for (String [] requires : requiredResources) {
       args.clear();
 
       for (String require : requires) {
@@ -189,6 +197,7 @@ public class ApplicationLoader {
     return null;
   }
 
+
   private Class<Application> loadClass(HeliumPackage packageInfo) throws Exception {
     if (cached.containsKey(packageInfo)) {
       return cached.get(packageInfo);
@@ -210,7 +219,8 @@ public class ApplicationLoader {
     }
     URLClassLoader applicationClassLoader =
         new URLClassLoader(
-            urlList.toArray(new URL[] {}), Thread.currentThread().getContextClassLoader());
+            urlList.toArray(new URL[]{}),
+            Thread.currentThread().getContextClassLoader());
 
     Class<Application> cls =
         (Class<Application>) applicationClassLoader.loadClass(packageInfo.getClassName());

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ClassLoaderApplication.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ClassLoaderApplication.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ClassLoaderApplication.java
index 96fd261..272a152 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ClassLoaderApplication.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/ClassLoaderApplication.java
@@ -18,11 +18,12 @@ package org.apache.zeppelin.helium;
 
 import org.apache.zeppelin.resource.ResourceSet;
 
-/** Application wrapper */
+/**
+ * Application wrapper
+ */
 public class ClassLoaderApplication extends Application {
   Application app;
   ClassLoader cl;
-
   public ClassLoaderApplication(Application app, ClassLoader cl) throws ApplicationException {
     super(app.context());
     this.app = app;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/HeliumAppAngularObjectRegistry.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/HeliumAppAngularObjectRegistry.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/HeliumAppAngularObjectRegistry.java
index 2ff7ee8..dedb603 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/HeliumAppAngularObjectRegistry.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/HeliumAppAngularObjectRegistry.java
@@ -16,18 +16,22 @@
  */
 package org.apache.zeppelin.helium;
 
-import java.util.List;
 import org.apache.zeppelin.display.AngularObject;
 import org.apache.zeppelin.display.AngularObjectRegistry;
 
-/** Angular Registry for helium app */
+import java.util.List;
+
+/**
+ * Angular Registry for helium app
+ */
 public class HeliumAppAngularObjectRegistry {
   private final String noteId;
   private final String appId;
   private final AngularObjectRegistry angularObjectRegistry;
 
-  public HeliumAppAngularObjectRegistry(
-      AngularObjectRegistry angularObjectRegistry, String noteId, String appId) {
+  public HeliumAppAngularObjectRegistry(AngularObjectRegistry angularObjectRegistry,
+                                        String noteId,
+                                        String appId) {
     this.angularObjectRegistry = angularObjectRegistry;
     this.noteId = noteId;
     this.appId = appId;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/HeliumPackage.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/HeliumPackage.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/HeliumPackage.java
index 4571883..e9995c1 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/HeliumPackage.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/HeliumPackage.java
@@ -17,42 +17,44 @@
 package org.apache.zeppelin.helium;
 
 import com.google.gson.Gson;
-import java.util.Map;
 import org.apache.zeppelin.annotation.Experimental;
 import org.apache.zeppelin.common.JsonSerializable;
 
-/** Helium package definition */
+import java.util.Map;
+
+/**
+ * Helium package definition
+ */
 @Experimental
 public class HeliumPackage implements JsonSerializable {
   private static final Gson gson = new Gson();
 
   private HeliumType type;
-  private String name; // user friendly name of this application
-  private String description; // description
-  private String artifact; // artifact name e.g) groupId:artifactId:versionId
-  private String className; // entry point
+  private String name;           // user friendly name of this application
+  private String description;    // description
+  private String artifact;       // artifact name e.g) groupId:artifactId:versionId
+  private String className;      // entry point
   // resource classnames that requires [[ .. and .. and .. ] or [ .. and .. and ..] ..]
-  private String[][] resources;
+  private String [][] resources;
 
   private String license;
   private String icon;
   private String published;
 
-  private String groupId; // get groupId of INTERPRETER type package
-  private String artifactId; // get artifactId of INTERPRETER type package
+  private String groupId;        // get groupId of INTERPRETER type package
+  private String artifactId;     // get artifactId of INTERPRETER type package
 
   private SpellPackageInfo spell;
   private Map<String, Object> config;
 
-  public HeliumPackage(
-      HeliumType type,
-      String name,
-      String description,
-      String artifact,
-      String className,
-      String[][] resources,
-      String license,
-      String icon) {
+  public HeliumPackage(HeliumType type,
+                       String name,
+                       String description,
+                       String artifact,
+                       String className,
+                       String[][] resources,
+                       String license,
+                       String icon) {
     this.type = type;
     this.name = name;
     this.description = description;
@@ -83,7 +85,8 @@ public class HeliumPackage implements JsonSerializable {
   }
 
   public static boolean isBundleType(HeliumType type) {
-    return (type == HeliumType.VISUALIZATION || type == HeliumType.SPELL);
+    return (type == HeliumType.VISUALIZATION ||
+        type == HeliumType.SPELL);
   }
 
   public String getName() {
@@ -130,9 +133,7 @@ public class HeliumPackage implements JsonSerializable {
     return spell;
   }
 
-  public Map<String, Object> getConfig() {
-    return config;
-  }
+  public Map<String, Object> getConfig() { return config; }
 
   public String toJson() {
     return gson.toJson(this);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/HeliumType.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/HeliumType.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/HeliumType.java
index 02043d1..53360a0 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/HeliumType.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/HeliumType.java
@@ -17,7 +17,9 @@
 
 package org.apache.zeppelin.helium;
 
-/** Type of Helium Package */
+/**
+ * Type of Helium Package
+ */
 public enum HeliumType {
   INTERPRETER,
   NOTEBOOK_REPO,

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/SpellPackageInfo.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/SpellPackageInfo.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/SpellPackageInfo.java
index e55faa7..519d09d 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/SpellPackageInfo.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/helium/SpellPackageInfo.java
@@ -17,7 +17,9 @@
 
 package org.apache.zeppelin.helium;
 
-/** Info for Helium Spell Package. */
+/**
+ * Info for Helium Spell Package.
+ */
 public class SpellPackageInfo {
   private String magic;
   private String usage;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/BaseZeppelinContext.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/BaseZeppelinContext.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/BaseZeppelinContext.java
index da03dfa..6a44f12 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/BaseZeppelinContext.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/BaseZeppelinContext.java
@@ -17,11 +17,6 @@
 
 package org.apache.zeppelin.interpreter;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
 import org.apache.thrift.TException;
 import org.apache.zeppelin.annotation.Experimental;
 import org.apache.zeppelin.annotation.ZeppelinApi;
@@ -36,7 +31,15 @@ import org.apache.zeppelin.resource.ResourceSet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Base class for ZeppelinContext */
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Base class for ZeppelinContext
+ */
 public abstract class BaseZeppelinContext {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(BaseZeppelinContext.class);
@@ -70,14 +73,18 @@ public abstract class BaseZeppelinContext {
    */
   protected abstract String showData(Object obj);
 
-  /** @deprecated use z.textbox instead */
+  /**
+   * @deprecated use z.textbox instead
+   */
   @Deprecated
   @ZeppelinApi
   public Object input(String name) {
     return textbox(name);
   }
 
-  /** @deprecated use z.textbox instead */
+  /**
+   * @deprecated use z.textbox instead
+   */
   @Deprecated
   @ZeppelinApi
   public Object input(String name, Object defaultValue) {
@@ -114,7 +121,8 @@ public abstract class BaseZeppelinContext {
   }
 
   @ZeppelinApi
-  public List<Object> checkbox(String name, List<Object> defaultChecked, ParamOption[] options) {
+  public List<Object> checkbox(String name, List<Object> defaultChecked,
+                                     ParamOption[] options) {
     return checkbox(name, defaultChecked, options, false);
   }
 
@@ -139,8 +147,8 @@ public abstract class BaseZeppelinContext {
   }
 
   @ZeppelinApi
-  public List<Object> noteCheckbox(
-      String name, List<Object> defaultChecked, ParamOption[] options) {
+  public List<Object> noteCheckbox(String name, List<Object> defaultChecked,
+                                         ParamOption[] options) {
     return checkbox(name, defaultChecked, options, true);
   }
 
@@ -149,8 +157,9 @@ public abstract class BaseZeppelinContext {
     return select(name, defaultValue, paramOptions, true);
   }
 
-  private Object select(
-      String name, Object defaultValue, ParamOption[] paramOptions, boolean noteForm) {
+
+  private Object select(String name, Object defaultValue, ParamOption[] paramOptions,
+                        boolean noteForm) {
     if (noteForm) {
       return noteGui.select(name, defaultValue, paramOptions);
     } else {
@@ -166,7 +175,8 @@ public abstract class BaseZeppelinContext {
     }
   }
 
-  private List<Object> checkbox(String name, ParamOption[] options, boolean noteForm) {
+  private List<Object> checkbox(String name, ParamOption[] options,
+                                      boolean noteForm) {
     List<Object> defaultValues = new LinkedList<>();
     for (ParamOption option : options) {
       defaultValues.add(option.getValue());
@@ -178,8 +188,8 @@ public abstract class BaseZeppelinContext {
     }
   }
 
-  private List<Object> checkbox(
-      String name, List<Object> defaultChecked, ParamOption[] options, boolean noteForm) {
+  private List<Object> checkbox(String name, List<Object> defaultChecked,
+                                      ParamOption[] options, boolean noteForm) {
     if (noteForm) {
       return noteGui.checkbox(name, defaultChecked, options);
     } else {
@@ -195,6 +205,7 @@ public abstract class BaseZeppelinContext {
     return gui;
   }
 
+
   public GUI getNoteGui() {
     return noteGui;
   }
@@ -214,10 +225,10 @@ public abstract class BaseZeppelinContext {
   public void setMaxResult(int maxResult) {
     this.maxResult = maxResult;
   }
-
+  
   /**
-   * display special types of objects for interpreter. Each interpreter can has its own supported
-   * classes.
+   * display special types of objects for interpreter.
+   * Each interpreter can has its own supported classes.
    *
    * @param o object
    */
@@ -227,10 +238,10 @@ public abstract class BaseZeppelinContext {
   }
 
   /**
-   * display special types of objects for interpreter. Each interpreter can has its own supported
-   * classes.
+   * display special types of objects for interpreter.
+   * Each interpreter can has its own supported classes.
    *
-   * @param o object
+   * @param o         object
    * @param maxResult maximum number of rows to display
    */
   @ZeppelinApi
@@ -239,10 +250,8 @@ public abstract class BaseZeppelinContext {
       if (isSupportedObject(o)) {
         interpreterContext.out.write(showData(o));
       } else {
-        interpreterContext.out.write(
-            "ZeppelinContext doesn't support to show type: "
-                + o.getClass().getCanonicalName()
-                + "\n");
+        interpreterContext.out.write("ZeppelinContext doesn't support to show type: "
+            + o.getClass().getCanonicalName() + "\n");
         interpreterContext.out.write(o.toString());
       }
     } catch (IOException e) {
@@ -282,7 +291,8 @@ public abstract class BaseZeppelinContext {
   }
 
   @ZeppelinApi
-  public void run(String noteId, String paragraphId) throws IOException {
+  public void run(String noteId, String paragraphId)
+      throws IOException {
     run(noteId, paragraphId, InterpreterContext.get(), true);
   }
 
@@ -304,9 +314,8 @@ public abstract class BaseZeppelinContext {
    * @param context
    */
   @ZeppelinApi
-  public void run(
-      String noteId, String paragraphId, InterpreterContext context, boolean checkCurrentParagraph)
-      throws IOException {
+  public void run(String noteId, String paragraphId, InterpreterContext context,
+                  boolean checkCurrentParagraph) throws IOException {
 
     if (paragraphId.equals(context.getParagraphId()) && checkCurrentParagraph) {
       throw new RuntimeException("Can not run current Paragraph");
@@ -314,8 +323,7 @@ public abstract class BaseZeppelinContext {
     List<String> paragraphIds = new ArrayList<>();
     paragraphIds.add(paragraphId);
     List<Integer> paragraphIndices = new ArrayList<>();
-    context
-        .getIntpEventClient()
+    context.getIntpEventClient()
         .runParagraphs(noteId, paragraphIds, paragraphIndices, context.getParagraphId());
   }
 
@@ -326,8 +334,7 @@ public abstract class BaseZeppelinContext {
   public void runNote(String noteId, InterpreterContext context) throws IOException {
     List<String> paragraphIds = new ArrayList<>();
     List<Integer> paragraphIndices = new ArrayList<>();
-    context
-        .getIntpEventClient()
+    context.getIntpEventClient()
         .runParagraphs(noteId, paragraphIds, paragraphIndices, context.getParagraphId());
   }
 
@@ -342,10 +349,10 @@ public abstract class BaseZeppelinContext {
   }
 
   /**
-   * @param idx paragraph index
+   * @param idx                   paragraph index
    * @param checkCurrentParagraph check whether you call this run method in the current paragraph.
-   *     Set it to false only when you are sure you are not invoking this method to run current
-   *     paragraph. Otherwise you would run current paragraph in infinite loop.
+   *          Set it to false only when you are sure you are not invoking this method to run current
+   *          paragraph. Otherwise you would run current paragraph in infinite loop.
    */
   public void run(int idx, boolean checkCurrentParagraph) throws IOException {
     String noteId = interpreterContext.getNoteId();
@@ -356,7 +363,7 @@ public abstract class BaseZeppelinContext {
    * Run paragraph at index
    *
    * @param noteId
-   * @param idx index starting from 0
+   * @param idx     index starting from 0
    * @param context interpreter context
    */
   public void run(String noteId, int idx, InterpreterContext context) throws IOException {
@@ -365,20 +372,20 @@ public abstract class BaseZeppelinContext {
 
   /**
    * @param noteId
-   * @param idx paragraph index
-   * @param context interpreter context
-   * @param checkCurrentParagraph check whether you call this run method in the current paragraph.
-   *     Set it to false only when you are sure you are not invoking this method to run current
-   *     paragraph. Otherwise you would run current paragraph in infinite loop.
+   * @param idx                   paragraph index
+   * @param context               interpreter context
+   * @param checkCurrentParagraph
+   * check whether you call this run method in the current paragraph.
+   * Set it to false only when you are sure you are not invoking this method to run current
+   * paragraph. Otherwise you would run current paragraph in infinite loop.
    */
-  public void run(String noteId, int idx, InterpreterContext context, boolean checkCurrentParagraph)
-      throws IOException {
+  public void run(String noteId, int idx, InterpreterContext context,
+                  boolean checkCurrentParagraph) throws IOException {
 
     List<String> paragraphIds = new ArrayList<>();
     List<Integer> paragraphIndices = new ArrayList<>();
     paragraphIndices.add(idx);
-    context
-        .getIntpEventClient()
+    context.getIntpEventClient()
         .runParagraphs(noteId, paragraphIds, paragraphIndices, context.getParagraphId());
   }
 
@@ -387,7 +394,9 @@ public abstract class BaseZeppelinContext {
     runAll(interpreterContext);
   }
 
-  /** Run all paragraphs. except this. */
+  /**
+   * Run all paragraphs. except this.
+   */
   @ZeppelinApi
   public void runAll(InterpreterContext context) throws IOException {
     runNote(context.getNoteId());
@@ -409,6 +418,7 @@ public abstract class BaseZeppelinContext {
     return ao;
   }
 
+
   /**
    * Get angular object. Look up notebook scope first and then global scope
    *
@@ -443,11 +453,11 @@ public abstract class BaseZeppelinContext {
   }
 
   /**
-   * Create angular variable in notebook scope and bind with front end Angular display system. If
-   * variable exists, it'll be overwritten.
+   * Create angular variable in notebook scope and bind with front end Angular display system.
+   * If variable exists, it'll be overwritten.
    *
    * @param name name of the variable
-   * @param o value
+   * @param o    value
    */
   @ZeppelinApi
   public void angularBind(String name, Object o) throws TException {
@@ -455,11 +465,11 @@ public abstract class BaseZeppelinContext {
   }
 
   /**
-   * Create angular variable in global scope and bind with front end Angular display system. If
-   * variable exists, it'll be overwritten.
+   * Create angular variable in global scope and bind with front end Angular display system.
+   * If variable exists, it'll be overwritten.
    *
    * @param name name of the variable
-   * @param o value
+   * @param o    value
    */
   @Deprecated
   public void angularBindGlobal(String name, Object o) throws TException {
@@ -467,11 +477,11 @@ public abstract class BaseZeppelinContext {
   }
 
   /**
-   * Create angular variable in local scope and bind with front end Angular display system. If
-   * variable exists, value will be overwritten and watcher will be added.
+   * Create angular variable in local scope and bind with front end Angular display system.
+   * If variable exists, value will be overwritten and watcher will be added.
    *
-   * @param name name of variable
-   * @param o value
+   * @param name    name of variable
+   * @param o       value
    * @param watcher watcher of the variable
    */
   @ZeppelinApi
@@ -480,11 +490,11 @@ public abstract class BaseZeppelinContext {
   }
 
   /**
-   * Create angular variable in global scope and bind with front end Angular display system. If
-   * variable exists, value will be overwritten and watcher will be added.
+   * Create angular variable in global scope and bind with front end Angular display system.
+   * If variable exists, value will be overwritten and watcher will be added.
    *
-   * @param name name of variable
-   * @param o value
+   * @param name    name of variable
+   * @param o       value
    * @param watcher watcher of the variable
    */
   @Deprecated
@@ -496,7 +506,7 @@ public abstract class BaseZeppelinContext {
   /**
    * Add watcher into angular variable (local scope)
    *
-   * @param name name of the variable
+   * @param name    name of the variable
    * @param watcher watcher
    */
   @ZeppelinApi
@@ -507,7 +517,7 @@ public abstract class BaseZeppelinContext {
   /**
    * Add watcher into angular variable (global scope)
    *
-   * @param name name of the variable
+   * @param name    name of the variable
    * @param watcher watcher
    */
   @Deprecated
@@ -515,6 +525,7 @@ public abstract class BaseZeppelinContext {
     angularWatch(name, null, watcher);
   }
 
+
   /**
    * Remove watcher from angular variable (local)
    *
@@ -537,6 +548,7 @@ public abstract class BaseZeppelinContext {
     angularUnwatch(name, null, watcher);
   }
 
+
   /**
    * Remove all watchers for the angular variable (local)
    *
@@ -579,11 +591,11 @@ public abstract class BaseZeppelinContext {
   }
 
   /**
-   * Create angular variable in notebook scope and bind with front end Angular display system. If
-   * variable exists, it'll be overwritten.
+   * Create angular variable in notebook scope and bind with front end Angular display system.
+   * If variable exists, it'll be overwritten.
    *
    * @param name name of the variable
-   * @param o value
+   * @param o    value
    */
   public void angularBind(String name, Object o, String noteId) throws TException {
     AngularObjectRegistry registry = interpreterContext.getAngularObjectRegistry();
@@ -596,11 +608,12 @@ public abstract class BaseZeppelinContext {
   }
 
   /**
-   * Create angular variable in notebook scope and bind with front end Angular display system. If
-   * variable exists, value will be overwritten and watcher will be added.
+   * Create angular variable in notebook scope and bind with front end Angular display
+   * system.
+   * If variable exists, value will be overwritten and watcher will be added.
    *
-   * @param name name of variable
-   * @param o value
+   * @param name    name of variable
+   * @param o       value
    * @param watcher watcher of the variable
    */
   private void angularBind(String name, Object o, String noteId, AngularObjectWatcher watcher)
@@ -618,7 +631,7 @@ public abstract class BaseZeppelinContext {
   /**
    * Add watcher into angular binding variable
    *
-   * @param name name of the variable
+   * @param name    name of the variable
    * @param watcher watcher
    */
   public void angularWatch(String name, String noteId, AngularObjectWatcher watcher) {
@@ -680,8 +693,8 @@ public abstract class BaseZeppelinContext {
   /**
    * General function to register hook event
    *
-   * @param event The type of event to hook to (pre_exec, post_exec)
-   * @param cmd The code to be executed by the interpreter on given event
+   * @param event    The type of event to hook to (pre_exec, post_exec)
+   * @param cmd      The code to be executed by the interpreter on given event
    * @param replName Name of the interpreter
    */
   @Experimental
@@ -694,7 +707,7 @@ public abstract class BaseZeppelinContext {
    * registerHook() wrapper for current repl
    *
    * @param event The type of event to hook to (pre_exec, post_exec)
-   * @param cmd The code to be executed by the interpreter on given event
+   * @param cmd   The code to be executed by the interpreter on given event
    */
   @Experimental
   public void registerHook(String event, String cmd) throws InvalidHookException {
@@ -725,7 +738,7 @@ public abstract class BaseZeppelinContext {
   /**
    * Unbind code from given hook event and given repl
    *
-   * @param event The type of event to hook to (pre_exec, post_exec)
+   * @param event    The type of event to hook to (pre_exec, post_exec)
    * @param replName Name of the interpreter
    */
   @Experimental
@@ -748,7 +761,7 @@ public abstract class BaseZeppelinContext {
    * Unbind code from given hook event and given note
    *
    * @param noteId The id of note
-   * @param event The type of event to hook to (pre_exec, post_exec)
+   * @param event  The type of event to hook to (pre_exec, post_exec)
    */
   @Experimental
   public void unregisterNoteHook(String noteId, String event) {
@@ -756,11 +769,12 @@ public abstract class BaseZeppelinContext {
     hooks.unregister(noteId, className, event);
   }
 
+
   /**
    * Unbind code from given hook event, given note and given repl
    *
-   * @param noteId The id of note
-   * @param event The type of event to hook to (pre_exec, post_exec)
+   * @param noteId   The id of note
+   * @param event    The type of event to hook to (pre_exec, post_exec)
    * @param replName Name of the interpreter
    */
   @Experimental
@@ -769,6 +783,7 @@ public abstract class BaseZeppelinContext {
     hooks.unregister(noteId, className, event);
   }
 
+
   /**
    * Add object into resource pool
    *
@@ -782,7 +797,8 @@ public abstract class BaseZeppelinContext {
   }
 
   /**
-   * Get object from resource pool Search local process first and then the other processes
+   * Get object from resource pool
+   * Search local process first and then the other processes
    *
    * @param name
    * @return null if resource not found
@@ -822,7 +838,9 @@ public abstract class BaseZeppelinContext {
     return resource != null;
   }
 
-  /** Get all resources */
+  /**
+   * Get all resources
+   */
   @ZeppelinApi
   public ResourceSet getAll() {
     ResourcePool resourcePool = interpreterContext.getResourcePool();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Constants.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Constants.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Constants.java
index 20ddfdd..87748ff 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Constants.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Constants.java
@@ -21,7 +21,11 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
-/** Interpreter related constants */
+/**
+ * Interpreter related constants
+ * 
+ *
+ */
 public class Constants {
   public static final String ZEPPELIN_INTERPRETER_PORT = "zeppelin.interpreter.port";
 
@@ -45,4 +49,5 @@ public class Constants {
     TIME_SUFFIXES.put("h", TimeUnit.HOURS);
     TIME_SUFFIXES.put("d", TimeUnit.DAYS);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/DefaultInterpreterProperty.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/DefaultInterpreterProperty.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/DefaultInterpreterProperty.java
index b50e00d..f11cbc3 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/DefaultInterpreterProperty.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/DefaultInterpreterProperty.java
@@ -17,7 +17,9 @@
 
 package org.apache.zeppelin.interpreter;
 
-/** Property for registered interpreter */
+/**
+ * Property for registered interpreter
+ */
 public class DefaultInterpreterProperty {
   private String envName;
   private String propertyName;
@@ -25,8 +27,8 @@ public class DefaultInterpreterProperty {
   private String description;
   private String type;
 
-  public DefaultInterpreterProperty(
-      String envName, String propertyName, Object defaultValue, String description, String type) {
+  public DefaultInterpreterProperty(String envName, String propertyName, Object defaultValue,
+                                String description, String type) {
     this.envName = envName;
     this.propertyName = propertyName;
     this.defaultValue = defaultValue;
@@ -46,13 +48,9 @@ public class DefaultInterpreterProperty {
     this(envName, propertyName, defaultValue, null, InterpreterPropertyType.TEXTAREA.getValue());
   }
 
-  public DefaultInterpreterProperty(
-      String envName, String propertyName, String defaultValue, String description) {
-    this(
-        envName,
-        propertyName,
-        defaultValue,
-        description,
+  public DefaultInterpreterProperty(String envName, String propertyName, String defaultValue,
+      String description) {
+    this(envName, propertyName, defaultValue, description,
         InterpreterPropertyType.TEXTAREA.getValue());
   }
 
@@ -124,8 +122,7 @@ public class DefaultInterpreterProperty {
 
   @Override
   public String toString() {
-    return String.format(
-        "{envName=%s, propertyName=%s, defaultValue=%s, description=%20s, " + "type=%s}",
-        envName, propertyName, defaultValue, description, type);
+    return String.format("{envName=%s, propertyName=%s, defaultValue=%s, description=%20s, " +
+            "type=%s}", envName, propertyName, defaultValue, description, type);
   }
 }


[10/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/ConfInterpreter.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/ConfInterpreter.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/ConfInterpreter.java
index d76bb15..7d1df9b 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/ConfInterpreter.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/ConfInterpreter.java
@@ -17,13 +17,14 @@
 
 package org.apache.zeppelin.interpreter;
 
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.Properties;
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.Properties;
+
 /**
  * Special Interpreter for Interpreter Configuration customization. It is attached to each
  * InterpreterGroup implicitly by Zeppelin.
@@ -36,11 +37,11 @@ public class ConfInterpreter extends Interpreter {
   protected String interpreterGroupId;
   protected InterpreterSetting interpreterSetting;
 
-  public ConfInterpreter(
-      Properties properties,
-      String sessionId,
-      String interpreterGroupId,
-      InterpreterSetting interpreterSetting) {
+
+  public ConfInterpreter(Properties properties,
+                         String sessionId,
+                         String interpreterGroupId,
+                         InterpreterSetting interpreterSetting) {
     super(properties);
     this.sessionId = sessionId;
     this.interpreterGroupId = interpreterGroupId;
@@ -48,10 +49,14 @@ public class ConfInterpreter extends Interpreter {
   }
 
   @Override
-  public void open() throws InterpreterException {}
+  public void open() throws InterpreterException {
+
+  }
 
   @Override
-  public void close() throws InterpreterException {}
+  public void close() throws InterpreterException {
+
+  }
 
   @Override
   public InterpreterResult interpret(String st, InterpreterContext context)
@@ -63,8 +68,8 @@ public class ConfInterpreter extends Interpreter {
       Properties newProperties = new Properties();
       newProperties.load(new StringReader(st));
       finalProperties.putAll(newProperties);
-      LOGGER.debug(
-          "Properties for InterpreterGroup: " + interpreterGroupId + " is " + finalProperties);
+      LOGGER.debug("Properties for InterpreterGroup: " + interpreterGroupId + " is "
+          + finalProperties);
       interpreterSetting.setInterpreterGroupProperties(interpreterGroupId, finalProperties);
       return new InterpreterResult(InterpreterResult.Code.SUCCESS);
     } catch (IOException e) {
@@ -74,7 +79,9 @@ public class ConfInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) throws InterpreterException {}
+  public void cancel(InterpreterContext context) throws InterpreterException {
+
+  }
 
   @Override
   public FormType getFormType() throws InterpreterException {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java
index be8e961..e045a59 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java
@@ -17,14 +17,18 @@
 
 package org.apache.zeppelin.interpreter;
 
+import com.google.common.base.Preconditions;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.List;
+
 /**
  * //TODO(zjffdu) considering to move to InterpreterSettingManager
  *
- * <p>Factory class for creating interpreters.
+ * Factory class for creating interpreters.
+ *
  */
 public class InterpreterFactory {
   private static final Logger LOGGER = LoggerFactory.getLogger(InterpreterFactory.class);
@@ -35,8 +39,10 @@ public class InterpreterFactory {
     this.interpreterSettingManager = interpreterSettingManager;
   }
 
-  public Interpreter getInterpreter(
-      String user, String noteId, String replName, String defaultInterpreterSetting)
+  public Interpreter getInterpreter(String user,
+                                    String noteId,
+                                    String replName,
+                                    String defaultInterpreterSetting)
       throws InterpreterNotFoundException {
 
     if (StringUtils.isBlank(replName)) {
@@ -60,9 +66,10 @@ public class InterpreterFactory {
       }
       throw new InterpreterNotFoundException("No interpreter setting named: " + group);
 
-    } else if (replNameSplits.length == 1) {
+    } else if (replNameSplits.length == 1){
       // first assume group is omitted
-      InterpreterSetting setting = interpreterSettingManager.getByName(defaultInterpreterSetting);
+      InterpreterSetting setting =
+          interpreterSettingManager.getByName(defaultInterpreterSetting);
       if (setting != null) {
         Interpreter interpreter = setting.getInterpreter(user, noteId, replName);
         if (null != interpreter) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterInfo.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterInfo.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterInfo.java
index a721ea0..fd632ce 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterInfo.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterInfo.java
@@ -18,23 +18,21 @@
 package org.apache.zeppelin.interpreter;
 
 import com.google.gson.annotations.SerializedName;
+
 import java.util.Map;
 
 /**
- * Information of interpreters in this interpreter setting. this will be serialized for
- * conf/interpreter.json and REST api response.
+ * Information of interpreters in this interpreter setting.
+ * this will be serialized for conf/interpreter.json and REST api response.
  */
 public class InterpreterInfo {
   private String name;
-
-  @SerializedName("class")
-  private String className;
-
+  @SerializedName("class") private String className;
   private boolean defaultInterpreter = false;
   private Map<String, Object> editor;
 
-  public InterpreterInfo(
-      String className, String name, boolean defaultInterpreter, Map<String, Object> editor) {
+  public InterpreterInfo(String className, String name, boolean defaultInterpreter,
+      Map<String, Object> editor) {
     this.className = className;
     this.name = name;
     this.defaultInterpreter = defaultInterpreter;
@@ -74,10 +72,9 @@ public class InterpreterInfo {
 
     boolean sameName =
         null == getName() ? null == other.getName() : getName().equals(other.getName());
-    boolean sameClassName =
-        null == getClassName()
-            ? null == other.getClassName()
-            : getClassName().equals(other.getClassName());
+    boolean sameClassName = null == getClassName() ?
+        null == other.getClassName() :
+        getClassName().equals(other.getClassName());
     boolean sameIsDefaultInterpreter = defaultInterpreter == other.isDefaultInterpreter();
 
     return sameName && sameClassName && sameIsDefaultInterpreter;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterInfoSaving.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterInfoSaving.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterInfoSaving.java
index 22eb66c..8f89448 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterInfoSaving.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterInfoSaving.java
@@ -17,32 +17,37 @@
 
 package org.apache.zeppelin.interpreter;
 
-import static java.nio.file.attribute.PosixFilePermission.OWNER_READ;
-import static java.nio.file.attribute.PosixFilePermission.OWNER_WRITE;
-
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
+import com.google.gson.internal.StringMap;
+import org.apache.commons.io.IOUtils;
+import org.apache.zeppelin.common.JsonSerializable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.sonatype.aether.repository.RemoteRepository;
+
 import java.io.BufferedReader;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.OutputStreamWriter;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.attribute.PosixFilePermission;
 import java.util.*;
-import org.apache.commons.io.IOUtils;
-import org.apache.zeppelin.common.JsonSerializable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.sonatype.aether.repository.RemoteRepository;
 
-/** */
+import static java.nio.file.attribute.PosixFilePermission.OWNER_READ;
+import static java.nio.file.attribute.PosixFilePermission.OWNER_WRITE;
+
+/**
+ *
+ */
 public class InterpreterInfoSaving implements JsonSerializable {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(InterpreterInfoSaving.class);
-  private static final Gson gson = new GsonBuilder().setPrettyPrinting().create();
+  private static final Gson gson =  new GsonBuilder().setPrettyPrinting().create();
 
   public Map<String, InterpreterSetting> interpreterSettings = new HashMap<>();
   public List<RemoteRepository> interpreterRepositories = new ArrayList<>();
@@ -58,8 +63,7 @@ public class InterpreterInfoSaving implements JsonSerializable {
       if (infoSaving != null && infoSaving.interpreterSettings != null) {
         for (InterpreterSetting interpreterSetting : infoSaving.interpreterSettings.values()) {
           interpreterSetting.convertPermissionsFromUsersToOwners(
-              jsonObject
-                  .getAsJsonObject("interpreterSettings")
+              jsonObject.getAsJsonObject("interpreterSettings")
                   .getAsJsonObject(interpreterSetting.getId()));
         }
       }
@@ -76,8 +80,7 @@ public class InterpreterInfoSaving implements JsonSerializable {
       } catch (UnsupportedOperationException e) {
         // File system does not support Posix file permissions (likely windows) - continue anyway.
         LOGGER.warn("unable to setPosixFilePermissions on '{}'.", file);
-      }
-      ;
+      };
     }
     LOGGER.info("Save Interpreter Settings to " + file);
     IOUtils.write(this.toJson(), new FileOutputStream(file.toFile()));

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterNotFoundException.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterNotFoundException.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterNotFoundException.java
index 15b5fdb..192e822 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterNotFoundException.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterNotFoundException.java
@@ -1,9 +1,12 @@
 package org.apache.zeppelin.interpreter;
 
-/** Exception for no interpreter is found */
+/**
+ * Exception for no interpreter is found
+ */
 public class InterpreterNotFoundException extends InterpreterException {
 
-  public InterpreterNotFoundException() {}
+  public InterpreterNotFoundException() {
+  }
 
   public InterpreterNotFoundException(String message) {
     super(message);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 335503c..36fc1f1 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
@@ -17,10 +17,6 @@
 
 package org.apache.zeppelin.interpreter;
 
-import static org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_MAX_POOL_SIZE;
-import static org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_OUTPUT_LIMIT;
-import static org.apache.zeppelin.util.IdHashes.generateId;
-
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableMap;
@@ -29,19 +25,6 @@ import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
 import com.google.gson.annotations.SerializedName;
 import com.google.gson.internal.StringMap;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
 import org.apache.commons.io.FileUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.dep.Dependency;
@@ -62,29 +45,51 @@ import org.apache.zeppelin.plugin.PluginManager;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Represent one InterpreterSetting in the interpreter setting page */
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import static org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_MAX_POOL_SIZE;
+import static org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_OUTPUT_LIMIT;
+import static org.apache.zeppelin.util.IdHashes.generateId;
+
+/**
+ * Represent one InterpreterSetting in the interpreter setting page
+ */
 public class InterpreterSetting {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(InterpreterSetting.class);
   private static final String SHARED_PROCESS = "shared_process";
   private static final String SHARED_SESSION = "shared_session";
-  private static final Map<String, Object> DEFAULT_EDITOR =
-      ImmutableMap.of("language", (Object) "text", "editOnDblClick", false);
+  private static final Map<String, Object> DEFAULT_EDITOR = ImmutableMap.of(
+      "language", (Object) "text",
+      "editOnDblClick", false);
 
   private String id;
   private String name;
   // the original interpreter setting template name where it is created from
   private String group;
 
-  // TODO(zjffdu) make the interpreter.json consistent with interpreter-setting.json
+  //TODO(zjffdu) make the interpreter.json consistent with interpreter-setting.json
   /**
-   * properties can be either Properties or Map<String, InterpreterProperty> properties should be: -
-   * Properties when Interpreter instances are saved to `conf/interpreter.json` file - Map<String,
-   * InterpreterProperty> when Interpreters are registered : this is needed after
-   * https://github.com/apache/zeppelin/pull/1145 which changed the way of getting default
-   * interpreter setting AKA interpreterSettingsRef Note(mina): In order to simplify the
-   * implementation, I chose to change properties from Properties to Object instead of creating new
-   * classes.
+   * properties can be either Properties or Map<String, InterpreterProperty>
+   * properties should be:
+   * - Properties when Interpreter instances are saved to `conf/interpreter.json` file
+   * - Map<String, InterpreterProperty> when Interpreters are registered
+   * : this is needed after https://github.com/apache/zeppelin/pull/1145
+   * which changed the way of getting default interpreter setting AKA interpreterSettingsRef
+   * Note(mina): In order to simplify the implementation, I chose to change properties
+   * from Properties to Object instead of creating new classes.
    */
   private Object properties = new Properties();
 
@@ -125,7 +130,9 @@ public class InterpreterSetting {
   private transient RemoteInterpreterEventServer interpreterEventServer;
   ///////////////////////////////////////////////////////////////////////////////////////////
 
-  /** Builder class for InterpreterSetting */
+  /**
+   * Builder class for InterpreterSetting
+   */
   public static class Builder {
     private InterpreterSetting interpreterSetting;
 
@@ -199,14 +206,13 @@ public class InterpreterSetting {
       return this;
     }
 
-    public Builder setRemoteInterpreterEventServer(
-        RemoteInterpreterEventServer interpreterEventServer) {
+    public Builder setRemoteInterpreterEventServer(RemoteInterpreterEventServer interpreterEventServer) {
       interpreterSetting.interpreterEventServer = interpreterEventServer;
       return this;
     }
 
-    public Builder setRemoteInterpreterProcessListener(
-        RemoteInterpreterProcessListener remoteInterpreterProcessListener) {
+    public Builder setRemoteInterpreterProcessListener(RemoteInterpreterProcessListener
+                                                       remoteInterpreterProcessListener) {
       interpreterSetting.remoteInterpreterProcessListener = remoteInterpreterProcessListener;
       return this;
     }
@@ -271,8 +277,8 @@ public class InterpreterSetting {
     this.id = o.name;
     this.name = o.name;
     this.group = o.group;
-    this.properties =
-        convertInterpreterProperties((Map<String, DefaultInterpreterProperty>) o.getProperties());
+    this.properties = convertInterpreterProperties(
+        (Map<String, DefaultInterpreterProperty>) o.getProperties());
     this.interpreterInfos = new ArrayList<>(o.getInterpreterInfos());
     this.option = InterpreterOption.fromInterpreterOption(o.getOption());
     this.dependencies = new ArrayList<>(o.getDependencies());
@@ -282,8 +288,8 @@ public class InterpreterSetting {
   }
 
   private void createLauncher() throws IOException {
-    this.launcher =
-        PluginManager.get().loadInterpreterLauncher(getLauncherPlugin(), recoveryStorage);
+    this.launcher = PluginManager.get().loadInterpreterLauncher(
+        getLauncherPlugin(), recoveryStorage);
   }
 
   public AngularObjectRegistryListener getAngularObjectRegistryListener() {
@@ -306,8 +312,8 @@ public class InterpreterSetting {
     return interpreterSettingManager;
   }
 
-  public InterpreterSetting setAngularObjectRegistryListener(
-      AngularObjectRegistryListener angularObjectRegistryListener) {
+  public InterpreterSetting setAngularObjectRegistryListener(AngularObjectRegistryListener
+                                                   angularObjectRegistryListener) {
     this.angularObjectRegistryListener = angularObjectRegistryListener;
     return this;
   }
@@ -317,8 +323,8 @@ public class InterpreterSetting {
     return this;
   }
 
-  public InterpreterSetting setRemoteInterpreterProcessListener(
-      RemoteInterpreterProcessListener remoteInterpreterProcessListener) {
+  public InterpreterSetting setRemoteInterpreterProcessListener(RemoteInterpreterProcessListener
+                                                      remoteInterpreterProcessListener) {
     this.remoteInterpreterProcessListener = remoteInterpreterProcessListener;
     return this;
   }
@@ -380,7 +386,7 @@ public class InterpreterSetting {
       key = SHARED_PROCESS;
     }
 
-    // TODO(zjffdu) we encode interpreter setting id into groupId, this is not a good design
+    //TODO(zjffdu) we encode interpreter setting id into groupId, this is not a good design
     return id + ":" + key;
   }
 
@@ -406,18 +412,14 @@ public class InterpreterSetting {
     try {
       interpreterGroupWriteLock.lock();
       if (!interpreterGroups.containsKey(groupId)) {
-        LOGGER.info(
-            "Create InterpreterGroup with groupId: {} for user: {} and note: {}",
-            groupId,
-            user,
-            noteId);
+        LOGGER.info("Create InterpreterGroup with groupId: {} for user: {} and note: {}",
+            groupId, user, noteId);
         ManagedInterpreterGroup intpGroup = createInterpreterGroup(groupId);
         interpreterGroups.put(groupId, intpGroup);
       }
       return interpreterGroups.get(groupId);
     } finally {
-      interpreterGroupWriteLock.unlock();
-      ;
+      interpreterGroupWriteLock.unlock();;
     }
   }
 
@@ -436,8 +438,7 @@ public class InterpreterSetting {
       interpreterGroupReadLock.lock();
       return interpreterGroups.get(groupId);
     } finally {
-      interpreterGroupReadLock.unlock();
-      ;
+      interpreterGroupReadLock.unlock();;
     }
   }
 
@@ -495,6 +496,7 @@ public class InterpreterSetting {
     }
   }
 
+
   public Object getProperties() {
     return properties;
   }
@@ -511,25 +513,25 @@ public class InterpreterSetting {
     Map<String, InterpreterProperty> iProperties = (Map<String, InterpreterProperty>) properties;
     for (Map.Entry<String, InterpreterProperty> entry : iProperties.entrySet()) {
       if (entry.getValue().getValue() != null) {
-        jProperties.setProperty(
-            entry.getKey().trim(), entry.getValue().getValue().toString().trim());
+        jProperties.setProperty(entry.getKey().trim(),
+            entry.getValue().getValue().toString().trim());
       }
     }
 
     if (!jProperties.containsKey("zeppelin.interpreter.output.limit")) {
-      jProperties.setProperty(
-          "zeppelin.interpreter.output.limit", conf.getInt(ZEPPELIN_INTERPRETER_OUTPUT_LIMIT) + "");
+      jProperties.setProperty("zeppelin.interpreter.output.limit",
+          conf.getInt(ZEPPELIN_INTERPRETER_OUTPUT_LIMIT) + "");
     }
 
     if (!jProperties.containsKey("zeppelin.interpreter.max.poolsize")) {
-      jProperties.setProperty(
-          "zeppelin.interpreter.max.poolsize",
+      jProperties.setProperty("zeppelin.interpreter.max.poolsize",
           conf.getInt(ZEPPELIN_INTERPRETER_MAX_POOL_SIZE) + "");
     }
 
     String interpreterLocalRepoPath = conf.getInterpreterLocalRepoPath();
-    // TODO(zjffdu) change it to interpreterDir/{interpreter_name}
-    jProperties.setProperty("zeppelin.interpreter.localRepo", interpreterLocalRepoPath + "/" + id);
+    //TODO(zjffdu) change it to interpreterDir/{interpreter_name}
+    jProperties.setProperty("zeppelin.interpreter.localRepo",
+        interpreterLocalRepoPath + "/" + id);
     return jProperties;
   }
 
@@ -596,7 +598,9 @@ public class InterpreterSetting {
     this.name = name;
   }
 
-  /** * Interpreter status */
+  /***
+   * Interpreter status
+   */
   public enum Status {
     DOWNLOADING_DEPENDENCIES,
     ERROR,
@@ -658,19 +662,15 @@ public class InterpreterSetting {
     List<InterpreterInfo> interpreterInfos = getInterpreterInfos();
     Properties intpProperties = getJavaProperties();
     for (InterpreterInfo info : interpreterInfos) {
-      Interpreter interpreter =
-          new RemoteInterpreter(
-              intpProperties, sessionId, info.getClassName(), user, lifecycleManager);
+      Interpreter interpreter = new RemoteInterpreter(intpProperties, sessionId,
+          info.getClassName(), user, lifecycleManager);
       if (info.isDefaultInterpreter()) {
         interpreters.add(0, interpreter);
       } else {
         interpreters.add(interpreter);
       }
-      LOGGER.info(
-          "Interpreter {} created for user: {}, sessionId: {}",
-          interpreter.getClassName(),
-          user,
-          sessionId);
+      LOGGER.info("Interpreter {} created for user: {}, sessionId: {}",
+          interpreter.getClassName(), user, sessionId);
     }
 
     // TODO(zjffdu) this kind of hardcode is ugly. For now SessionConfInterpreter is used
@@ -685,23 +685,16 @@ public class InterpreterSetting {
     return interpreters;
   }
 
-  synchronized RemoteInterpreterProcess createInterpreterProcess(
-      String interpreterGroupId, String userName, Properties properties) throws IOException {
+  synchronized RemoteInterpreterProcess createInterpreterProcess(String interpreterGroupId,
+                                                                 String userName,
+                                                                 Properties properties)
+      throws IOException {
     if (launcher == null) {
       createLauncher();
     }
-    InterpreterLaunchContext launchContext =
-        new InterpreterLaunchContext(
-            properties,
-            option,
-            interpreterRunner,
-            userName,
-            interpreterGroupId,
-            id,
-            group,
-            name,
-            interpreterEventServer.getPort(),
-            interpreterEventServer.getHost());
+    InterpreterLaunchContext launchContext = new
+        InterpreterLaunchContext(properties, option, interpreterRunner, userName,
+        interpreterGroupId, id, group, name, interpreterEventServer.getPort(), interpreterEventServer.getHost());
     RemoteInterpreterProcess process = (RemoteInterpreterProcess) launcher.launch(launchContext);
     recoveryStorage.onInterpreterClientStart(process);
     return process;
@@ -709,8 +702,8 @@ public class InterpreterSetting {
 
   List<Interpreter> getOrCreateSession(String user, String noteId) {
     ManagedInterpreterGroup interpreterGroup = getOrCreateInterpreterGroup(user, noteId);
-    Preconditions.checkNotNull(
-        interpreterGroup, "No InterpreterGroup existed for user {}, " + "noteId {}", user, noteId);
+    Preconditions.checkNotNull(interpreterGroup, "No InterpreterGroup existed for user {}, " +
+        "noteId {}", user, noteId);
     String sessionId = getInterpreterSessionId(user, noteId);
     return interpreterGroup.getOrCreateSession(user, sessionId);
   }
@@ -745,7 +738,7 @@ public class InterpreterSetting {
         return info.getClassName();
       }
     }
-    // TODO(zjffdu) It requires user can not create interpreter with name `conf`,
+    //TODO(zjffdu) It requires user can not create interpreter with name `conf`,
     // conf is a reserved word of interpreter name
     if (replName.equals("conf")) {
       if (group.equals("livy")) {
@@ -778,12 +771,11 @@ public class InterpreterSetting {
     ManagedInterpreterGroup interpreterGroup = this.interpreterGroups.get(interpreterGroupId);
     for (List<Interpreter> session : interpreterGroup.sessions.values()) {
       for (Interpreter intp : session) {
-        if (!intp.getProperties().equals(properties)
-            && interpreterGroup.getRemoteInterpreterProcess() != null
-            && interpreterGroup.getRemoteInterpreterProcess().isRunning()) {
-          throw new IOException(
-              "Can not change interpreter properties when interpreter process "
-                  + "has already been launched");
+        if (!intp.getProperties().equals(properties) &&
+            interpreterGroup.getRemoteInterpreterProcess() != null &&
+            interpreterGroup.getRemoteInterpreterProcess().isRunning()) {
+          throw new IOException("Can not change interpreter properties when interpreter process " +
+              "has already been launched");
         }
         intp.setProperties(properties);
       }
@@ -793,58 +785,53 @@ public class InterpreterSetting {
   private void loadInterpreterDependencies() {
     setStatus(Status.DOWNLOADING_DEPENDENCIES);
     setErrorReason(null);
-    Thread t =
-        new Thread() {
-          public void run() {
+    Thread t = new Thread() {
+      public void run() {
+        try {
+          // dependencies to prevent library conflict
+          File localRepoDir = new File(conf.getInterpreterLocalRepoPath() + "/" + id);
+          if (localRepoDir.exists()) {
             try {
-              // dependencies to prevent library conflict
-              File localRepoDir = new File(conf.getInterpreterLocalRepoPath() + "/" + id);
-              if (localRepoDir.exists()) {
-                try {
-                  FileUtils.forceDelete(localRepoDir);
-                } catch (FileNotFoundException e) {
-                  LOGGER.info("A file that does not exist cannot be deleted, nothing to worry", e);
-                }
-              }
+              FileUtils.forceDelete(localRepoDir);
+            } catch (FileNotFoundException e) {
+              LOGGER.info("A file that does not exist cannot be deleted, nothing to worry", e);
+            }
+          }
 
-              // load dependencies
-              List<Dependency> deps = getDependencies();
-              if (deps != null) {
-                for (Dependency d : deps) {
-                  File destDir =
-                      new File(
-                          conf.getRelativeDir(
-                              ZeppelinConfiguration.ConfVars.ZEPPELIN_DEP_LOCALREPO));
-
-                  if (d.getExclusions() != null) {
-                    dependencyResolver.load(
-                        d.getGroupArtifactVersion(), d.getExclusions(), new File(destDir, id));
-                  } else {
-                    dependencyResolver.load(d.getGroupArtifactVersion(), new File(destDir, id));
-                  }
-                }
+          // load dependencies
+          List<Dependency> deps = getDependencies();
+          if (deps != null) {
+            for (Dependency d : deps) {
+              File destDir = new File(
+                  conf.getRelativeDir(ZeppelinConfiguration.ConfVars.ZEPPELIN_DEP_LOCALREPO));
+
+              if (d.getExclusions() != null) {
+                dependencyResolver.load(d.getGroupArtifactVersion(), d.getExclusions(),
+                    new File(destDir, id));
+              } else {
+                dependencyResolver
+                    .load(d.getGroupArtifactVersion(), new File(destDir, id));
               }
-
-              setStatus(Status.READY);
-              setErrorReason(null);
-            } catch (Exception e) {
-              LOGGER.error(
-                  String.format(
-                      "Error while downloading repos for interpreter group : %s,"
-                          + " go to interpreter setting page click on edit and save it again to make "
-                          + "this interpreter work properly. : %s",
-                      getGroup(), e.getLocalizedMessage()),
-                  e);
-              setErrorReason(e.getLocalizedMessage());
-              setStatus(Status.ERROR);
             }
           }
-        };
+
+          setStatus(Status.READY);
+          setErrorReason(null);
+        } catch (Exception e) {
+          LOGGER.error(String.format("Error while downloading repos for interpreter group : %s," +
+                  " go to interpreter setting page click on edit and save it again to make " +
+                  "this interpreter work properly. : %s",
+              getGroup(), e.getLocalizedMessage()), e);
+          setErrorReason(e.getLocalizedMessage());
+          setStatus(Status.ERROR);
+        }
+      }
+    };
 
     t.start();
   }
 
-  // TODO(zjffdu) ugly code, should not use JsonObject as parameter. not readable
+  //TODO(zjffdu) ugly code, should not use JsonObject as parameter. not readable
   public void convertPermissionsFromUsersToOwners(JsonObject jsonObject) {
     if (jsonObject != null) {
       JsonObject option = jsonObject.getAsJsonObject("option");
@@ -870,11 +857,10 @@ public class InterpreterSetting {
       for (Object o : p.entrySet()) {
         Map.Entry entry = (Map.Entry) o;
         if (!(entry.getValue() instanceof StringMap)) {
-          InterpreterProperty newProperty =
-              new InterpreterProperty(
-                  entry.getKey().toString(),
-                  entry.getValue(),
-                  InterpreterPropertyType.STRING.getValue());
+          InterpreterProperty newProperty = new InterpreterProperty(
+              entry.getKey().toString(),
+              entry.getValue(),
+              InterpreterPropertyType.STRING.getValue());
           newProperties.put(entry.getKey().toString(), newProperty);
         } else {
           // already converted
@@ -884,7 +870,8 @@ public class InterpreterSetting {
       return newProperties;
 
     } else if (properties instanceof Map) {
-      Map<String, Object> dProperties = (Map<String, Object>) properties;
+      Map<String, Object> dProperties =
+          (Map<String, Object>) properties;
       Map<String, InterpreterProperty> newProperties = new HashMap<>();
       for (String key : dProperties.keySet()) {
         Object value = dProperties.get(key);
@@ -892,29 +879,31 @@ public class InterpreterSetting {
           return (Map<String, InterpreterProperty>) properties;
         } else if (value instanceof StringMap) {
           StringMap stringMap = (StringMap) value;
-          InterpreterProperty newProperty =
-              new InterpreterProperty(
-                  key,
-                  stringMap.get("value"),
-                  stringMap.containsKey("type") ? stringMap.get("type").toString() : "string");
+          InterpreterProperty newProperty = new InterpreterProperty(
+              key,
+              stringMap.get("value"),
+              stringMap.containsKey("type") ? stringMap.get("type").toString() : "string");
 
           newProperties.put(newProperty.getName(), newProperty);
-        } else if (value instanceof DefaultInterpreterProperty) {
+        } else if (value instanceof DefaultInterpreterProperty){
           DefaultInterpreterProperty dProperty = (DefaultInterpreterProperty) value;
-          InterpreterProperty property =
-              new InterpreterProperty(
-                  key,
-                  dProperty.getValue(),
-                  dProperty.getType() != null ? dProperty.getType() : "string"
-                  // in case user forget to specify type in interpreter-setting.json
-                  );
+          InterpreterProperty property = new InterpreterProperty(
+              key,
+              dProperty.getValue(),
+              dProperty.getType() != null ? dProperty.getType() : "string"
+              // in case user forget to specify type in interpreter-setting.json
+          );
           newProperties.put(key, property);
         } else if (value instanceof String) {
-          InterpreterProperty newProperty = new InterpreterProperty(key, value, "string");
+          InterpreterProperty newProperty = new InterpreterProperty(
+              key,
+              value,
+              "string");
 
           newProperties.put(newProperty.getName(), newProperty);
         } else {
-          throw new RuntimeException("Can not convert this type of property: " + value.getClass());
+          throw new RuntimeException("Can not convert this type of property: " +
+              value.getClass());
         }
       }
       return newProperties;
@@ -923,9 +912,8 @@ public class InterpreterSetting {
   }
 
   public void waitForReady() throws InterruptedException {
-    while (getStatus()
-        .equals(
-            org.apache.zeppelin.interpreter.InterpreterSetting.Status.DOWNLOADING_DEPENDENCIES)) {
+    while (getStatus().equals(
+        org.apache.zeppelin.interpreter.InterpreterSetting.Status.DOWNLOADING_DEPENDENCIES)) {
       Thread.sleep(200);
     }
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 d96c59f..d730db4 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
@@ -25,26 +25,6 @@ import com.google.common.collect.Sets;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.reflect.TypeToken;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.lang.reflect.Type;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.nio.file.DirectoryStream.Filter;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
 import java.util.Set;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.ArrayUtils;
@@ -63,38 +43,65 @@ import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService;
 import org.apache.zeppelin.resource.Resource;
 import org.apache.zeppelin.resource.ResourcePool;
 import org.apache.zeppelin.resource.ResourceSet;
-import org.apache.zeppelin.storage.ConfigStorage;
 import org.apache.zeppelin.util.ReflectionUtils;
+import org.apache.zeppelin.storage.ConfigStorage;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.sonatype.aether.repository.Authentication;
 import org.sonatype.aether.repository.Proxy;
 import org.sonatype.aether.repository.RemoteRepository;
+import org.sonatype.aether.repository.Authentication;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.lang.reflect.Type;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.nio.file.DirectoryStream.Filter;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
 
 /**
  * InterpreterSettingManager is the component which manage all the interpreter settings.
- * (load/create/update/remove/get) TODO(zjffdu) We could move it into another separated component.
+ * (load/create/update/remove/get)
+ * TODO(zjffdu) We could move it into another separated component.
  */
 public class InterpreterSettingManager implements InterpreterSettingManagerMBean {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(InterpreterSettingManager.class);
-  private static final Map<String, Object> DEFAULT_EDITOR =
-      ImmutableMap.of("language", (Object) "text", "editOnDblClick", false);
+  private static final Map<String, Object> DEFAULT_EDITOR = ImmutableMap.of(
+      "language", (Object) "text",
+      "editOnDblClick", false);
 
   private final ZeppelinConfiguration conf;
   private final Path interpreterDirPath;
 
   /**
-   * This is only InterpreterSetting templates with default name and properties name -->
-   * InterpreterSetting
+   * This is only InterpreterSetting templates with default name and properties
+   * name --> InterpreterSetting
    */
   private final Map<String, InterpreterSetting> interpreterSettingTemplates =
       Maps.newConcurrentMap();
   /**
-   * This is used by creating and running Interpreters id --> InterpreterSetting TODO(zjffdu) change
-   * it to name --> InterpreterSetting
+   * This is used by creating and running Interpreters
+   * id --> InterpreterSetting
+   * TODO(zjffdu) change it to name --> InterpreterSetting
    */
-  private final Map<String, InterpreterSetting> interpreterSettings = Maps.newConcurrentMap();
+  private final Map<String, InterpreterSetting> interpreterSettings =
+      Maps.newConcurrentMap();
 
   private final List<RemoteRepository> interpreterRepositories;
   private InterpreterOption defaultOption;
@@ -110,23 +117,20 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
   private ConfigStorage configStorage;
   private RemoteInterpreterEventServer interpreterEventServer;
 
-  public InterpreterSettingManager(
-      ZeppelinConfiguration zeppelinConfiguration,
-      AngularObjectRegistryListener angularObjectRegistryListener,
-      RemoteInterpreterProcessListener remoteInterpreterProcessListener,
-      ApplicationEventListener appEventListener)
+  public InterpreterSettingManager(ZeppelinConfiguration zeppelinConfiguration,
+                                   AngularObjectRegistryListener angularObjectRegistryListener,
+                                   RemoteInterpreterProcessListener
+                                       remoteInterpreterProcessListener,
+                                   ApplicationEventListener appEventListener)
       throws IOException {
-    this(
-        zeppelinConfiguration,
-        new InterpreterOption(),
+    this(zeppelinConfiguration, new InterpreterOption(),
         angularObjectRegistryListener,
         remoteInterpreterProcessListener,
         appEventListener,
         ConfigStorage.getInstance(zeppelinConfiguration));
   }
 
-  public InterpreterSettingManager(
-      ZeppelinConfiguration conf,
+  public InterpreterSettingManager(ZeppelinConfiguration conf,
       InterpreterOption defaultOption,
       AngularObjectRegistryListener angularObjectRegistryListener,
       RemoteInterpreterProcessListener remoteInterpreterProcessListener,
@@ -174,7 +178,7 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
       loadInterpreterSettingFromDefaultDir(false);
       Set<String> newlyAddedInterpreters = Sets.newHashSet(interpreterSettingTemplates.keySet());
       newlyAddedInterpreters.removeAll(installedInterpreters);
-      if (!newlyAddedInterpreters.isEmpty()) {
+      if(!newlyAddedInterpreters.isEmpty()) {
         saveToFile();
       }
     } catch (IOException e) {
@@ -182,9 +186,9 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
     }
   }
 
+
   private void initInterpreterSetting(InterpreterSetting interpreterSetting) {
-    interpreterSetting
-        .setConf(conf)
+    interpreterSetting.setConf(conf)
         .setInterpreterSettingManager(this)
         .setAngularObjectRegistryListener(angularObjectRegistryListener)
         .setRemoteInterpreterProcessListener(remoteInterpreterProcessListener)
@@ -196,9 +200,12 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
         .postProcessing();
   }
 
-  /** Load interpreter setting from interpreter.json */
+  /**
+   * Load interpreter setting from interpreter.json
+   */
   private void loadFromFile() throws IOException {
-    InterpreterInfoSaving infoSaving = configStorage.loadInterpreterSettings();
+    InterpreterInfoSaving infoSaving =
+        configStorage.loadInterpreterSettings();
     if (infoSaving == null) {
       // it is fresh zeppelin instance if there's no interpreter.json, just create interpreter
       // setting from interpreterSettingTemplates
@@ -210,10 +217,11 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
       return;
     }
 
-    // TODO(zjffdu) still ugly (should move all to InterpreterInfoSaving)
+    //TODO(zjffdu) still ugly (should move all to InterpreterInfoSaving)
     for (InterpreterSetting savedInterpreterSetting : infoSaving.interpreterSettings.values()) {
-      savedInterpreterSetting.setProperties(
-          InterpreterSetting.convertInterpreterProperties(savedInterpreterSetting.getProperties()));
+      savedInterpreterSetting.setProperties(InterpreterSetting.convertInterpreterProperties(
+          savedInterpreterSetting.getProperties()
+      ));
       initInterpreterSetting(savedInterpreterSetting);
 
       InterpreterSetting interpreterSettingTemplate =
@@ -225,16 +233,14 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
         savedInterpreterSetting.setInterpreterDir(interpreterSettingTemplate.getInterpreterDir());
         // merge properties from interpreter-setting.json and interpreter.json
         Map<String, InterpreterProperty> mergedProperties =
-            new HashMap<>(
-                InterpreterSetting.convertInterpreterProperties(
-                    interpreterSettingTemplate.getProperties()));
-        Map<String, InterpreterProperty> savedProperties =
-            InterpreterSetting.convertInterpreterProperties(
-                savedInterpreterSetting.getProperties());
+            new HashMap<>(InterpreterSetting.convertInterpreterProperties(
+                interpreterSettingTemplate.getProperties()));
+        Map<String, InterpreterProperty> savedProperties = InterpreterSetting
+            .convertInterpreterProperties(savedInterpreterSetting.getProperties());
         for (Map.Entry<String, InterpreterProperty> entry : savedProperties.entrySet()) {
           // only merge properties whose value is not empty
-          if (entry.getValue().getValue() != null
-              && !StringUtils.isBlank(entry.getValue().toString())) {
+          if (entry.getValue().getValue() != null && !
+              StringUtils.isBlank(entry.getValue().toString())) {
             mergedProperties.put(entry.getKey(), entry.getValue());
           }
         }
@@ -245,11 +251,9 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
         savedInterpreterSetting.setInterpreterRunner(
             interpreterSettingTemplate.getInterpreterRunner());
       } else {
-        LOGGER.warn(
-            "No InterpreterSetting Template found for InterpreterSetting: "
-                + savedInterpreterSetting.getGroup()
-                + ", but it is found in interpreter.json, "
-                + "it would be skipped.");
+        LOGGER.warn("No InterpreterSetting Template found for InterpreterSetting: "
+            + savedInterpreterSetting.getGroup() + ", but it is found in interpreter.json, "
+            + "it would be skipped.");
         continue;
       }
 
@@ -261,8 +265,8 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
         }
       }
       savedInterpreterSetting.postProcessing();
-      LOGGER.info(
-          "Create Interpreter Setting {} from interpreter.json", savedInterpreterSetting.getName());
+      LOGGER.info("Create Interpreter Setting {} from interpreter.json",
+          savedInterpreterSetting.getName());
       interpreterSettings.put(savedInterpreterSetting.getId(), savedInterpreterSetting);
     }
 
@@ -301,24 +305,24 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
     String interpreterJson = conf.getInterpreterJson();
     ClassLoader cl = Thread.currentThread().getContextClassLoader();
     if (Files.exists(interpreterDirPath)) {
-      for (Path interpreterDir :
-          Files.newDirectoryStream(
-              interpreterDirPath,
-              new Filter<Path>() {
-                @Override
-                public boolean accept(Path entry) throws IOException {
-                  return Files.exists(entry) && Files.isDirectory(entry);
-                }
-              })) {
+      for (Path interpreterDir : Files
+          .newDirectoryStream(interpreterDirPath, new Filter<Path>() {
+            @Override
+            public boolean accept(Path entry) throws IOException {
+              return Files.exists(entry) && Files.isDirectory(entry);
+            }
+          })) {
         String interpreterDirString = interpreterDir.toString();
         /**
-         * Register interpreter by the following ordering 1. Register it from path
-         * {ZEPPELIN_HOME}/interpreter/{interpreter_name}/ interpreter-setting.json 2. Register it
-         * from interpreter-setting.json in classpath {ZEPPELIN_HOME}/interpreter/{interpreter_name}
+         * Register interpreter by the following ordering
+         * 1. Register it from path {ZEPPELIN_HOME}/interpreter/{interpreter_name}/
+         *    interpreter-setting.json
+         * 2. Register it from interpreter-setting.json in classpath
+         *    {ZEPPELIN_HOME}/interpreter/{interpreter_name}
          */
         if (!registerInterpreterFromPath(interpreterDirString, interpreterJson, override)) {
-          if (!registerInterpreterFromResource(
-              cl, interpreterDirString, interpreterJson, override)) {
+          if (!registerInterpreterFromResource(cl, interpreterDirString, interpreterJson,
+              override)) {
             LOGGER.warn("No interpreter-setting.json found in " + interpreterDirString);
           }
         }
@@ -336,9 +340,8 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
     return appEventListener;
   }
 
-  private boolean registerInterpreterFromResource(
-      ClassLoader cl, String interpreterDir, String interpreterJson, boolean override)
-      throws IOException {
+  private boolean registerInterpreterFromResource(ClassLoader cl, String interpreterDir,
+      String interpreterJson, boolean override) throws IOException {
     URL[] urls = recursiveBuildLibList(new File(interpreterDir));
     ClassLoader tempClassLoader = new URLClassLoader(urls, null);
 
@@ -354,8 +357,8 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
     return true;
   }
 
-  private boolean registerInterpreterFromPath(
-      String interpreterDir, String interpreterJson, boolean override) throws IOException {
+  private boolean registerInterpreterFromPath(String interpreterDir, String interpreterJson,
+      boolean override) throws IOException {
 
     Path interpreterJsonPath = Paths.get(interpreterDir, interpreterJson);
     if (Files.exists(interpreterJsonPath)) {
@@ -369,12 +372,13 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
   }
 
   private List<RegisteredInterpreter> getInterpreterListFromJson(InputStream stream) {
-    Type registeredInterpreterListType = new TypeToken<List<RegisteredInterpreter>>() {}.getType();
+    Type registeredInterpreterListType = new TypeToken<List<RegisteredInterpreter>>() {
+    }.getType();
     return gson.fromJson(new InputStreamReader(stream), registeredInterpreterListType);
   }
 
-  private void registerInterpreterSetting(
-      List<RegisteredInterpreter> registeredInterpreters, String interpreterDir, boolean override) {
+  private void registerInterpreterSetting(List<RegisteredInterpreter> registeredInterpreters,
+      String interpreterDir, boolean override) {
 
     Map<String, DefaultInterpreterProperty> properties = new HashMap<>();
     List<InterpreterInfo> interpreterInfos = new ArrayList<>();
@@ -382,13 +386,10 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
     String group = null;
     InterpreterRunner runner = null;
     for (RegisteredInterpreter registeredInterpreter : registeredInterpreters) {
-      // TODO(zjffdu) merge RegisteredInterpreter & InterpreterInfo
+      //TODO(zjffdu) merge RegisteredInterpreter & InterpreterInfo
       InterpreterInfo interpreterInfo =
-          new InterpreterInfo(
-              registeredInterpreter.getClassName(),
-              registeredInterpreter.getName(),
-              registeredInterpreter.isDefaultInterpreter(),
-              registeredInterpreter.getEditor());
+          new InterpreterInfo(registeredInterpreter.getClassName(), registeredInterpreter.getName(),
+              registeredInterpreter.isDefaultInterpreter(), registeredInterpreter.getEditor());
       group = registeredInterpreter.getGroup();
       runner = registeredInterpreter.getRunner();
       // use defaultOption if it is not specified in interpreter-setting.json
@@ -399,23 +400,22 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
       interpreterInfos.add(interpreterInfo);
     }
 
-    InterpreterSetting interpreterSettingTemplate =
-        new InterpreterSetting.Builder()
-            .setGroup(group)
-            .setName(group)
-            .setInterpreterInfos(interpreterInfos)
-            .setProperties(properties)
-            .setDependencies(new ArrayList<Dependency>())
-            .setOption(option)
-            .setRunner(runner)
-            .setInterpreterDir(interpreterDir)
-            .setRunner(runner)
-            .setConf(conf)
-            .setIntepreterSettingManager(this)
-            .create();
+    InterpreterSetting interpreterSettingTemplate = new InterpreterSetting.Builder()
+        .setGroup(group)
+        .setName(group)
+        .setInterpreterInfos(interpreterInfos)
+        .setProperties(properties)
+        .setDependencies(new ArrayList<Dependency>())
+        .setOption(option)
+        .setRunner(runner)
+        .setInterpreterDir(interpreterDir)
+        .setRunner(runner)
+        .setConf(conf)
+        .setIntepreterSettingManager(this)
+        .create();
 
     String key = interpreterSettingTemplate.getName();
-    if (override || !interpreterSettingTemplates.containsKey(key)) {
+    if(override || !interpreterSettingTemplates.containsKey(key)) {
       LOGGER.info("Register InterpreterSettingTemplate: {}", key);
       interpreterSettingTemplates.put(key, interpreterSettingTemplate);
     }
@@ -453,9 +453,9 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
     return null;
   }
 
-  // TODO(zjffdu) logic here is a little ugly
-  public Map<String, Object> getEditorSetting(
-      Interpreter interpreter, String user, String noteId, String replName) {
+  //TODO(zjffdu) logic here is a little ugly
+  public Map<String, Object> getEditorSetting(Interpreter interpreter, String user, String noteId,
+      String replName) {
     Map<String, Object> editor = DEFAULT_EDITOR;
     String group = StringUtils.EMPTY;
     try {
@@ -491,7 +491,7 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
     return interpreterGroups;
   }
 
-  // TODO(zjffdu) move Resource related api to ResourceManager
+  //TODO(zjffdu) move Resource related api to ResourceManager
   public ResourceSet getAllResources() {
     return getAllResourcesExcept(null);
   }
@@ -499,8 +499,8 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
   private ResourceSet getAllResourcesExcept(String interpreterGroupExcludsion) {
     ResourceSet resourceSet = new ResourceSet();
     for (ManagedInterpreterGroup intpGroup : getAllInterpreterGroup()) {
-      if (interpreterGroupExcludsion != null
-          && intpGroup.getId().equals(interpreterGroupExcludsion)) {
+      if (interpreterGroupExcludsion != null &&
+          intpGroup.getId().equals(interpreterGroupExcludsion)) {
         continue;
       }
 
@@ -511,15 +511,13 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
           resourceSet.addAll(localPool.getAll());
         }
       } else if (remoteInterpreterProcess.isRunning()) {
-        List<String> resourceList =
-            remoteInterpreterProcess.callRemoteFunction(
-                new RemoteInterpreterProcess.RemoteFunction<List<String>>() {
-                  @Override
-                  public List<String> call(RemoteInterpreterService.Client client)
-                      throws Exception {
-                    return client.resourcePoolGetAll();
-                  }
-                });
+        List<String> resourceList = remoteInterpreterProcess.callRemoteFunction(
+            new RemoteInterpreterProcess.RemoteFunction<List<String>>() {
+              @Override
+              public List<String> call(RemoteInterpreterService.Client client) throws Exception {
+                return client.resourcePoolGetAll();
+              }
+            });
         if (resourceList != null) {
           for (String res : resourceList) {
             resourceSet.add(Resource.fromJson(res));
@@ -557,15 +555,13 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
               r.getResourceId().getName());
         }
       } else if (remoteInterpreterProcess.isRunning()) {
-        List<String> resourceList =
-            remoteInterpreterProcess.callRemoteFunction(
-                new RemoteInterpreterProcess.RemoteFunction<List<String>>() {
-                  @Override
-                  public List<String> call(RemoteInterpreterService.Client client)
-                      throws Exception {
-                    return client.resourcePoolGetAll();
-                  }
-                });
+        List<String> resourceList = remoteInterpreterProcess.callRemoteFunction(
+            new RemoteInterpreterProcess.RemoteFunction<List<String>>() {
+              @Override
+              public List<String> call(RemoteInterpreterService.Client client) throws Exception {
+                return client.resourcePoolGetAll();
+              }
+            });
         for (String res : resourceList) {
           resourceSet.add(Resource.fromJson(res));
         }
@@ -605,45 +601,42 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
    */
   private void copyDependenciesFromLocalPath(final InterpreterSetting setting) {
     setting.setStatus(InterpreterSetting.Status.DOWNLOADING_DEPENDENCIES);
-    final Thread t =
-        new Thread() {
-          public void run() {
-            try {
-              List<Dependency> deps = setting.getDependencies();
-              if (deps != null) {
-                for (Dependency d : deps) {
-                  File destDir = new File(conf.getRelativeDir(ConfVars.ZEPPELIN_DEP_LOCALREPO));
-
-                  int numSplits = d.getGroupArtifactVersion().split(":").length;
-                  if (!(numSplits >= 3 && numSplits <= 6)) {
-                    dependencyResolver.copyLocalDependency(
-                        d.getGroupArtifactVersion(), new File(destDir, setting.getId()));
-                  }
+      final Thread t = new Thread() {
+        public void run() {
+          try {
+            List<Dependency> deps = setting.getDependencies();
+            if (deps != null) {
+              for (Dependency d : deps) {
+                File destDir = new File(
+                    conf.getRelativeDir(ConfVars.ZEPPELIN_DEP_LOCALREPO));
+
+                int numSplits = d.getGroupArtifactVersion().split(":").length;
+                if (!(numSplits >= 3 && numSplits <= 6)) {
+                  dependencyResolver.copyLocalDependency(d.getGroupArtifactVersion(),
+                      new File(destDir, setting.getId()));
                 }
               }
-              setting.setStatus(InterpreterSetting.Status.READY);
-            } catch (Exception e) {
-              LOGGER.error(
-                  String.format(
-                      "Error while copying deps for interpreter group : %s,"
-                          + " go to interpreter setting page click on edit and save it again to make "
-                          + "this interpreter work properly.",
-                      setting.getGroup()),
-                  e);
-              setting.setErrorReason(e.getLocalizedMessage());
-              setting.setStatus(InterpreterSetting.Status.ERROR);
-            } finally {
-
             }
+            setting.setStatus(InterpreterSetting.Status.READY);
+          } catch (Exception e) {
+            LOGGER.error(String.format("Error while copying deps for interpreter group : %s," +
+                    " go to interpreter setting page click on edit and save it again to make " +
+                    "this interpreter work properly.",
+                setting.getGroup()), e);
+            setting.setErrorReason(e.getLocalizedMessage());
+            setting.setStatus(InterpreterSetting.Status.ERROR);
+          } finally {
+
           }
-        };
-    t.start();
+        }
+      };
+      t.start();
   }
 
   /**
-   * Return ordered interpreter setting list. The list does not contain more than one setting from
-   * the same interpreter class. Order by InterpreterClass (order defined by ZEPPELIN_INTERPRETERS),
-   * Interpreter setting name
+   * Return ordered interpreter setting list.
+   * The list does not contain more than one setting from the same interpreter class.
+   * Order by InterpreterClass (order defined by ZEPPELIN_INTERPRETERS), Interpreter setting name
    */
   public List<String> getInterpreterSettingIds() {
     List<String> settingIdList = new ArrayList<>();
@@ -653,12 +646,8 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
     return settingIdList;
   }
 
-  public InterpreterSetting createNewSetting(
-      String name,
-      String group,
-      List<Dependency> dependencies,
-      InterpreterOption option,
-      Map<String, InterpreterProperty> p)
+  public InterpreterSetting createNewSetting(String name, String group,
+      List<Dependency> dependencies, InterpreterOption option, Map<String, InterpreterProperty> p)
       throws IOException {
 
     if (name.indexOf(".") >= 0) {
@@ -673,7 +662,7 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
     InterpreterSetting setting = new InterpreterSetting(interpreterSettingTemplates.get(group));
     setting.setName(name);
     setting.setGroup(group);
-    // TODO(zjffdu) Should use setDependencies
+    //TODO(zjffdu) Should use setDependencies
     setting.appendDependencies(dependencies);
     setting.setInterpreterOption(option);
     setting.setProperties(p);
@@ -683,6 +672,8 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
     return setting;
   }
 
+
+
   @VisibleForTesting
   public void closeNote(String user, String noteId) {
     // close interpreters in this note session
@@ -712,7 +703,7 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
       }
       return urls;
     } else {
-      return new URL[] {path.toURI().toURL()};
+      return new URL[]{path.toURI().toURL()};
     }
   }
 
@@ -720,9 +711,8 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
     return this.interpreterRepositories;
   }
 
-  public void addRepository(
-      String id, String url, boolean snapshot, Authentication auth, Proxy proxy)
-      throws IOException {
+  public void addRepository(String id, String url, boolean snapshot, Authentication auth,
+      Proxy proxy) throws IOException {
     dependencyResolver.addRepo(id, url, snapshot, auth, proxy);
     saveToFile();
   }
@@ -807,23 +797,23 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
     FileUtils.deleteDirectory(localRepoDir);
   }
 
-  /** Get interpreter settings */
+  /**
+   * Get interpreter settings
+   */
   public List<InterpreterSetting> get() {
     List<InterpreterSetting> orderedSettings = new ArrayList<>(interpreterSettings.values());
-    Collections.sort(
-        orderedSettings,
-        new Comparator<InterpreterSetting>() {
-          @Override
-          public int compare(InterpreterSetting o1, InterpreterSetting o2) {
-            if (o1.getName().equals(defaultInterpreterGroup)) {
-              return -1;
-            } else if (o2.getName().equals(defaultInterpreterGroup)) {
-              return 1;
-            } else {
-              return o1.getName().compareTo(o2.getName());
-            }
-          }
-        });
+    Collections.sort(orderedSettings, new Comparator<InterpreterSetting>() {
+      @Override
+      public int compare(InterpreterSetting o1, InterpreterSetting o2) {
+        if (o1.getName().equals(defaultInterpreterGroup)) {
+          return -1;
+        } else if (o2.getName().equals(defaultInterpreterGroup)) {
+          return 1;
+        } else {
+          return o1.getName().compareTo(o2.getName());
+        }
+      }
+    });
     return orderedSettings;
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/LifecycleManager.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/LifecycleManager.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/LifecycleManager.java
index adcdcd4..f36cb0d 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/LifecycleManager.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/LifecycleManager.java
@@ -15,12 +15,18 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.interpreter;
 
-/** Interface for managing the lifecycle of interpreters */
+
+/**
+ * Interface for managing the lifecycle of interpreters
+ */
 public interface LifecycleManager {
 
   void onInterpreterProcessStarted(ManagedInterpreterGroup interpreterGroup);
 
-  void onInterpreterUse(ManagedInterpreterGroup interpreterGroup, String sessionId);
+  void onInterpreterUse(ManagedInterpreterGroup interpreterGroup,
+                        String sessionId);
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/ManagedInterpreterGroup.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/ManagedInterpreterGroup.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/ManagedInterpreterGroup.java
index c6d5216..e1470df 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/ManagedInterpreterGroup.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/ManagedInterpreterGroup.java
@@ -15,12 +15,10 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.interpreter;
 
-import java.io.IOException;
-import java.util.Collection;
-import java.util.List;
-import java.util.Properties;
+import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.zeppelin.interpreter.remote.RemoteInterpreterProcess;
 import org.apache.zeppelin.scheduler.Job;
 import org.apache.zeppelin.scheduler.Scheduler;
@@ -28,7 +26,14 @@ import org.apache.zeppelin.scheduler.SchedulerFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** ManagedInterpreterGroup runs under zeppelin server */
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * ManagedInterpreterGroup runs under zeppelin server
+ */
 public class ManagedInterpreterGroup extends InterpreterGroup {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(ManagedInterpreterGroup.class);
@@ -38,7 +43,6 @@ public class ManagedInterpreterGroup extends InterpreterGroup {
 
   /**
    * Create InterpreterGroup with given id and interpreterSetting, used in ZeppelinServer
-   *
    * @param id
    * @param interpreterSetting
    */
@@ -51,16 +55,16 @@ public class ManagedInterpreterGroup extends InterpreterGroup {
     return interpreterSetting;
   }
 
-  public synchronized RemoteInterpreterProcess getOrCreateInterpreterProcess(
-      String userName, Properties properties) throws IOException {
+  public synchronized RemoteInterpreterProcess getOrCreateInterpreterProcess(String userName,
+                                                                             Properties properties)
+      throws IOException {
     if (remoteInterpreterProcess == null) {
       LOGGER.info("Create InterpreterProcess for InterpreterGroup: " + getId());
-      remoteInterpreterProcess =
-          interpreterSetting.createInterpreterProcess(id, userName, properties);
+      remoteInterpreterProcess = interpreterSetting.createInterpreterProcess(id, userName,
+          properties);
       remoteInterpreterProcess.start(userName);
       interpreterSetting.getLifecycleManager().onInterpreterProcessStarted(this);
-      getInterpreterSetting()
-          .getRecoveryStorage()
+      getInterpreterSetting().getRecoveryStorage()
           .onInterpreterClientStart(remoteInterpreterProcess);
     }
     return remoteInterpreterProcess;
@@ -74,7 +78,10 @@ public class ManagedInterpreterGroup extends InterpreterGroup {
     return remoteInterpreterProcess;
   }
 
-  /** Close all interpreter instances in this group */
+
+  /**
+   * Close all interpreter instances in this group
+   */
   public synchronized void close() {
     LOGGER.info("Close InterpreterGroup: " + id);
     for (String sessionId : sessions.keySet()) {
@@ -84,17 +91,13 @@ public class ManagedInterpreterGroup extends InterpreterGroup {
 
   /**
    * Close all interpreter instances in this session
-   *
    * @param sessionId
    */
   public synchronized void close(String sessionId) {
-    LOGGER.info(
-        "Close Session: "
-            + sessionId
-            + " for interpreter setting: "
-            + interpreterSetting.getName());
+    LOGGER.info("Close Session: " + sessionId + " for interpreter setting: " +
+        interpreterSetting.getName());
     close(sessions.remove(sessionId));
-    // TODO(zjffdu) whether close InterpreterGroup if there's no session left in Zeppelin Server
+    //TODO(zjffdu) whether close InterpreterGroup if there's no session left in Zeppelin Server
     if (sessions.isEmpty() && interpreterSetting != null) {
       LOGGER.info("Remove this InterpreterGroup: {} as all the sessions are closed", id);
       interpreterSetting.removeInterpreterGroup(id);
@@ -134,7 +137,7 @@ public class ManagedInterpreterGroup extends InterpreterGroup {
       } catch (InterpreterException e) {
         LOGGER.warn("Fail to close interpreter " + interpreter.getClassName(), e);
       }
-      // TODO(zjffdu) move the close of schedule to Interpreter
+      //TODO(zjffdu) move the close of schedule to Interpreter
       if (null != scheduler) {
         SchedulerFactory.singleton().removeScheduler(scheduler.getName());
       }
@@ -154,4 +157,5 @@ public class ManagedInterpreterGroup extends InterpreterGroup {
       return interpreters;
     }
   }
+
 }


[09/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/RemoteInterpreterEventServer.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/RemoteInterpreterEventServer.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/RemoteInterpreterEventServer.java
index a535c96..5b7223c 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/RemoteInterpreterEventServer.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/RemoteInterpreterEventServer.java
@@ -19,15 +19,6 @@ package org.apache.zeppelin.interpreter;
 
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
 import org.apache.thrift.TException;
 import org.apache.thrift.server.TThreadPoolServer;
 import org.apache.thrift.transport.TServerSocket;
@@ -44,10 +35,10 @@ import org.apache.zeppelin.interpreter.remote.RemoteInterpreterUtils;
 import org.apache.zeppelin.interpreter.thrift.AppOutputAppendEvent;
 import org.apache.zeppelin.interpreter.thrift.AppOutputUpdateEvent;
 import org.apache.zeppelin.interpreter.thrift.AppStatusUpdateEvent;
+import org.apache.zeppelin.interpreter.thrift.RegisterInfo;
 import org.apache.zeppelin.interpreter.thrift.OutputAppendEvent;
 import org.apache.zeppelin.interpreter.thrift.OutputUpdateAllEvent;
 import org.apache.zeppelin.interpreter.thrift.OutputUpdateEvent;
-import org.apache.zeppelin.interpreter.thrift.RegisterInfo;
 import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterEventService;
 import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage;
 import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService;
@@ -60,6 +51,16 @@ import org.apache.zeppelin.resource.ResourceSet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
+
 public class RemoteInterpreterEventServer implements RemoteInterpreterEventService.Iface {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(RemoteInterpreterEventServer.class);
@@ -78,8 +79,8 @@ public class RemoteInterpreterEventServer implements RemoteInterpreterEventServi
   private final ApplicationEventListener appListener;
   private final Gson gson = new Gson();
 
-  public RemoteInterpreterEventServer(
-      ZeppelinConfiguration zConf, InterpreterSettingManager interpreterSettingManager) {
+  public RemoteInterpreterEventServer(ZeppelinConfiguration zConf,
+                                      InterpreterSettingManager interpreterSettingManager) {
     this.portRange = zConf.getZeppelinServerRPCPortRange();
     this.interpreterSettingManager = interpreterSettingManager;
     this.listener = interpreterSettingManager.getRemoteInterpreterProcessListener();
@@ -99,33 +100,32 @@ public class RemoteInterpreterEventServer implements RemoteInterpreterEventServi
     LOGGER.info("InterpreterEventServer will start. Port: {}", port);
     RemoteInterpreterEventService.Processor processor =
         new RemoteInterpreterEventService.Processor(this);
-    this.thriftServer =
-        new TThreadPoolServer(new TThreadPoolServer.Args(tSocket).processor(processor));
+    this.thriftServer = new TThreadPoolServer(
+        new TThreadPoolServer.Args(tSocket).processor(processor));
     this.thriftServer.serve();
   }
 
   public void start() throws IOException {
-    Thread startingThread =
-        new Thread() {
-          @Override
-          public void run() {
-            TServerSocket tSocket = null;
-            try {
-              tSocket = RemoteInterpreterUtils.createTServerSocket(portRange);
-              port = tSocket.getServerSocket().getLocalPort();
-              host = RemoteInterpreterUtils.findAvailableHostAddress();
-            } catch (IOException e1) {
-              throw new RuntimeException(e1);
-            }
+    Thread startingThread = new Thread() {
+      @Override
+      public void run() {
+        TServerSocket tSocket = null;
+        try {
+          tSocket = RemoteInterpreterUtils.createTServerSocket(portRange);
+          port = tSocket.getServerSocket().getLocalPort();
+          host = RemoteInterpreterUtils.findAvailableHostAddress();
+        } catch (IOException e1) {
+          throw new RuntimeException(e1);
+        }
 
-            LOGGER.info("InterpreterEventServer will start. Port: {}", port);
-            RemoteInterpreterEventService.Processor processor =
-                new RemoteInterpreterEventService.Processor(RemoteInterpreterEventServer.this);
-            thriftServer =
-                new TThreadPoolServer(new TThreadPoolServer.Args(tSocket).processor(processor));
-            thriftServer.serve();
-          }
-        };
+        LOGGER.info("InterpreterEventServer will start. Port: {}", port);
+        RemoteInterpreterEventService.Processor processor =
+            new RemoteInterpreterEventService.Processor(RemoteInterpreterEventServer.this);
+        thriftServer = new TThreadPoolServer(
+            new TThreadPoolServer.Args(tSocket).processor(processor));
+        thriftServer.serve();
+      }
+    };
     startingThread.start();
     long start = System.currentTimeMillis();
     while ((System.currentTimeMillis() - start) < 30 * 1000) {
@@ -145,9 +145,8 @@ public class RemoteInterpreterEventServer implements RemoteInterpreterEventServi
     LOGGER.info("InterpreterEventServer is started");
 
     runner = new AppendOutputRunner(listener);
-    appendFuture =
-        appendService.scheduleWithFixedDelay(
-            runner, 0, AppendOutputRunner.BUFFER_TIME_MS, TimeUnit.MILLISECONDS);
+    appendFuture = appendService.scheduleWithFixedDelay(
+        runner, 0, AppendOutputRunner.BUFFER_TIME_MS, TimeUnit.MILLISECONDS);
   }
 
   public void stop() {
@@ -159,6 +158,7 @@ public class RemoteInterpreterEventServer implements RemoteInterpreterEventServi
     }
   }
 
+
   public int getPort() {
     return port;
   }
@@ -178,9 +178,8 @@ public class RemoteInterpreterEventServer implements RemoteInterpreterEventServi
     RemoteInterpreterProcess interpreterProcess =
         ((ManagedInterpreterGroup) interpreterGroup).getInterpreterProcess();
     if (interpreterProcess == null) {
-      LOGGER.warn(
-          "Interpreter process does not existed yet for InterpreterGroup: "
-              + registerInfo.getInterpreterGroupId());
+      LOGGER.warn("Interpreter process does not existed yet for InterpreterGroup: " +
+          registerInfo.getInterpreterGroupId());
     }
     ((RemoteInterpreterManagedProcess) interpreterProcess)
         .processStarted(registerInfo.port, registerInfo.host);
@@ -192,32 +191,19 @@ public class RemoteInterpreterEventServer implements RemoteInterpreterEventServi
       runner.appendBuffer(
           event.getNoteId(), event.getParagraphId(), event.getIndex(), event.getData());
     } else {
-      appListener.onOutputAppend(
-          event.getNoteId(),
-          event.getParagraphId(),
-          event.getIndex(),
-          event.getAppId(),
-          event.getData());
+      appListener.onOutputAppend(event.getNoteId(), event.getParagraphId(), event.getIndex(),
+          event.getAppId(), event.getData());
     }
   }
 
   @Override
   public void updateOutput(OutputUpdateEvent event) throws TException {
     if (event.getAppId() == null) {
-      listener.onOutputUpdated(
-          event.getNoteId(),
-          event.getParagraphId(),
-          event.getIndex(),
-          InterpreterResult.Type.valueOf(event.getType()),
-          event.getData());
+      listener.onOutputUpdated(event.getNoteId(), event.getParagraphId(), event.getIndex(),
+          InterpreterResult.Type.valueOf(event.getType()), event.getData());
     } else {
-      appListener.onOutputUpdated(
-          event.getNoteId(),
-          event.getParagraphId(),
-          event.getIndex(),
-          event.getAppId(),
-          InterpreterResult.Type.valueOf(event.getType()),
-          event.getData());
+      appListener.onOutputUpdated(event.getNoteId(), event.getParagraphId(), event.getIndex(),
+          event.getAppId(), InterpreterResult.Type.valueOf(event.getType()), event.getData());
     }
   }
 
@@ -226,30 +212,21 @@ public class RemoteInterpreterEventServer implements RemoteInterpreterEventServi
     listener.onOutputClear(event.getNoteId(), event.getParagraphId());
     for (int i = 0; i < event.getMsg().size(); i++) {
       RemoteInterpreterResultMessage msg = event.getMsg().get(i);
-      listener.onOutputUpdated(
-          event.getNoteId(),
-          event.getParagraphId(),
-          i,
-          InterpreterResult.Type.valueOf(msg.getType()),
-          msg.getData());
+      listener.onOutputUpdated(event.getNoteId(), event.getParagraphId(), i,
+          InterpreterResult.Type.valueOf(msg.getType()), msg.getData());
     }
   }
 
   @Override
   public void appendAppOutput(AppOutputAppendEvent event) throws TException {
-    appListener.onOutputAppend(
-        event.noteId, event.paragraphId, event.index, event.appId, event.data);
+    appListener.onOutputAppend(event.noteId, event.paragraphId, event.index, event.appId,
+        event.data);
   }
 
   @Override
   public void updateAppOutput(AppOutputUpdateEvent event) throws TException {
-    appListener.onOutputUpdated(
-        event.noteId,
-        event.paragraphId,
-        event.index,
-        event.appId,
-        InterpreterResult.Type.valueOf(event.type),
-        event.data);
+    appListener.onOutputUpdated(event.noteId, event.paragraphId, event.index, event.appId,
+        InterpreterResult.Type.valueOf(event.type), event.data);
   }
 
   @Override
@@ -260,14 +237,11 @@ public class RemoteInterpreterEventServer implements RemoteInterpreterEventServi
   @Override
   public void runParagraphs(RunParagraphsEvent event) throws TException {
     try {
-      listener.runParagraphs(
-          event.getNoteId(),
-          event.getParagraphIndices(),
-          event.getParagraphIds(),
-          event.getCurParagraphId());
+      listener.runParagraphs(event.getNoteId(), event.getParagraphIndices(),
+          event.getParagraphIds(), event.getCurParagraphId());
       if (InterpreterContext.get() != null) {
-        LOGGER.info(
-            "complete runParagraphs." + InterpreterContext.get().getParagraphId() + " " + event);
+        LOGGER.info("complete runParagraphs." + InterpreterContext.get().getParagraphId() + " "
+          + event);
       } else {
         LOGGER.info("complete runParagraphs." + event);
       }
@@ -284,13 +258,8 @@ public class RemoteInterpreterEventServer implements RemoteInterpreterEventServi
     if (interpreterGroup == null) {
       throw new TException("Invalid InterpreterGroupId: " + intpGroupId);
     }
-    interpreterGroup
-        .getAngularObjectRegistry()
-        .add(
-            angularObject.getName(),
-            angularObject.get(),
-            angularObject.getNoteId(),
-            angularObject.getParagraphId());
+    interpreterGroup.getAngularObjectRegistry().add(angularObject.getName(),
+        angularObject.get(), angularObject.getNoteId(), angularObject.getParagraphId());
   }
 
   @Override
@@ -301,22 +270,22 @@ public class RemoteInterpreterEventServer implements RemoteInterpreterEventServi
     if (interpreterGroup == null) {
       throw new TException("Invalid InterpreterGroupId: " + intpGroupId);
     }
-    AngularObject localAngularObject =
-        interpreterGroup
-            .getAngularObjectRegistry()
-            .get(
-                angularObject.getName(), angularObject.getNoteId(), angularObject.getParagraphId());
+    AngularObject localAngularObject = interpreterGroup.getAngularObjectRegistry().get(
+        angularObject.getName(), angularObject.getNoteId(), angularObject.getParagraphId());
     if (localAngularObject instanceof RemoteAngularObject) {
       // to avoid ping-pong loop
-      ((RemoteAngularObject) localAngularObject).set(angularObject.get(), true, false);
+      ((RemoteAngularObject) localAngularObject).set(
+          angularObject.get(), true, false);
     } else {
       localAngularObject.set(angularObject.get());
     }
   }
 
   @Override
-  public void removeAngularObject(
-      String intpGroupId, String noteId, String paragraphId, String name) throws TException {
+  public void removeAngularObject(String intpGroupId,
+                                  String noteId,
+                                  String paragraphId,
+                                  String name) throws TException {
     InterpreterGroup interpreterGroup =
         interpreterSettingManager.getInterpreterGroupById(intpGroupId);
     if (interpreterGroup == null) {
@@ -333,11 +302,13 @@ public class RemoteInterpreterEventServer implements RemoteInterpreterEventServi
       throw new TException("Invalid InterpreterGroupId: " + intpGroupId);
     }
 
-    Map<String, String> paraInfos =
-        gson.fromJson(json, new TypeToken<Map<String, String>>() {}.getType());
+    Map<String, String> paraInfos = gson.fromJson(json,
+        new TypeToken<Map<String, String>>() {
+        }.getType());
     String noteId = paraInfos.get("noteId");
     String paraId = paraInfos.get("paraId");
-    String settingId = RemoteInterpreterUtils.getInterpreterSettingId(interpreterGroup.getId());
+    String settingId = RemoteInterpreterUtils.
+        getInterpreterSettingId(interpreterGroup.getId());
     if (noteId != null && paraId != null && settingId != null) {
       listener.onParaInfosReceived(noteId, paraId, settingId, paraInfos);
     }
@@ -388,8 +359,8 @@ public class RemoteInterpreterEventServer implements RemoteInterpreterEventServi
     return obj;
   }
 
-  private Object invokeResourceMethod(
-      String intpGroupId, final InvokeResourceMethodEventMessage message) {
+  private Object invokeResourceMethod(String intpGroupId,
+                                      final InvokeResourceMethodEventMessage message) {
     final ResourceId resourceId = message.resourceId;
     ManagedInterpreterGroup intpGroup =
         interpreterSettingManager.getInterpreterGroupById(resourceId.getResourcePoolId());
@@ -422,26 +393,21 @@ public class RemoteInterpreterEventServer implements RemoteInterpreterEventServi
         LOGGER.error("no resource pool");
         return null;
       }
-    } else if (interpreterSettingManager
-        .getInterpreterGroupById(intpGroupId)
-        .getInterpreterProcess()
-        .isRunning()) {
-      ByteBuffer res =
-          interpreterSettingManager
-              .getInterpreterGroupById(intpGroupId)
-              .getInterpreterProcess()
-              .callRemoteFunction(
-                  new RemoteInterpreterProcess.RemoteFunction<ByteBuffer>() {
-                    @Override
-                    public ByteBuffer call(RemoteInterpreterService.Client client)
-                        throws Exception {
-                      return client.resourceInvokeMethod(
-                          resourceId.getNoteId(),
-                          resourceId.getParagraphId(),
-                          resourceId.getName(),
-                          message.toJson());
-                    }
-                  });
+    } else if (interpreterSettingManager.getInterpreterGroupById(intpGroupId)
+        .getInterpreterProcess().isRunning()) {
+      ByteBuffer res = interpreterSettingManager.getInterpreterGroupById(intpGroupId)
+          .getInterpreterProcess().callRemoteFunction(
+          new RemoteInterpreterProcess.RemoteFunction<ByteBuffer>() {
+            @Override
+            public ByteBuffer call(RemoteInterpreterService.Client client) throws Exception {
+              return client.resourceInvokeMethod(
+                  resourceId.getNoteId(),
+                  resourceId.getParagraphId(),
+                  resourceId.getName(),
+                  message.toJson());
+            }
+          }
+      );
 
       try {
         return Resource.deserializeObject(res);
@@ -454,21 +420,23 @@ public class RemoteInterpreterEventServer implements RemoteInterpreterEventServi
   }
 
   private Object getResource(final ResourceId resourceId) {
-    ManagedInterpreterGroup intpGroup =
-        interpreterSettingManager.getInterpreterGroupById(resourceId.getResourcePoolId());
+    ManagedInterpreterGroup intpGroup = interpreterSettingManager
+        .getInterpreterGroupById(resourceId.getResourcePoolId());
     if (intpGroup == null) {
       return null;
     }
     RemoteInterpreterProcess remoteInterpreterProcess = intpGroup.getRemoteInterpreterProcess();
-    ByteBuffer buffer =
-        remoteInterpreterProcess.callRemoteFunction(
-            new RemoteInterpreterProcess.RemoteFunction<ByteBuffer>() {
-              @Override
-              public ByteBuffer call(RemoteInterpreterService.Client client) throws Exception {
-                return client.resourceGet(
-                    resourceId.getNoteId(), resourceId.getParagraphId(), resourceId.getName());
-              }
-            });
+    ByteBuffer buffer = remoteInterpreterProcess.callRemoteFunction(
+        new RemoteInterpreterProcess.RemoteFunction<ByteBuffer>() {
+          @Override
+          public ByteBuffer call(RemoteInterpreterService.Client client) throws Exception {
+            return  client.resourceGet(
+                resourceId.getNoteId(),
+                resourceId.getParagraphId(),
+                resourceId.getName());
+          }
+        }
+    );
 
     try {
       Object o = Resource.deserializeObject(buffer);
@@ -493,15 +461,14 @@ public class RemoteInterpreterEventServer implements RemoteInterpreterEventServi
           resourceSet.addAll(localPool.getAll());
         }
       } else if (remoteInterpreterProcess.isRunning()) {
-        List<String> resourceList =
-            remoteInterpreterProcess.callRemoteFunction(
-                new RemoteInterpreterProcess.RemoteFunction<List<String>>() {
-                  @Override
-                  public List<String> call(RemoteInterpreterService.Client client)
-                      throws Exception {
-                    return client.resourcePoolGetAll();
-                  }
-                });
+        List<String> resourceList = remoteInterpreterProcess.callRemoteFunction(
+            new RemoteInterpreterProcess.RemoteFunction<List<String>>() {
+              @Override
+              public List<String> call(RemoteInterpreterService.Client client) throws Exception {
+                return client.resourcePoolGetAll();
+              }
+            }
+        );
         for (String res : resourceList) {
           resourceSet.add(RemoteResource.fromJson(res));
         }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/SessionConfInterpreter.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/SessionConfInterpreter.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/SessionConfInterpreter.java
index 4dd0eb2..e303ee6 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/SessionConfInterpreter.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/SessionConfInterpreter.java
@@ -17,24 +17,24 @@
 
 package org.apache.zeppelin.interpreter;
 
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.List;
-import java.util.Properties;
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.zeppelin.interpreter.remote.RemoteInterpreter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.List;
+import java.util.Properties;
+
 public class SessionConfInterpreter extends ConfInterpreter {
 
   private static Logger LOGGER = LoggerFactory.getLogger(SessionConfInterpreter.class);
 
-  public SessionConfInterpreter(
-      Properties properties,
-      String sessionId,
-      String interpreterGroupId,
-      InterpreterSetting interpreterSetting) {
+  public SessionConfInterpreter(Properties properties,
+                                String sessionId,
+                                String interpreterGroupId,
+                                InterpreterSetting interpreterSetting) {
     super(properties, sessionId, interpreterGroupId, interpreterSetting);
   }
 
@@ -56,8 +56,7 @@ public class SessionConfInterpreter extends ConfInterpreter {
         if (intp instanceof RemoteInterpreter) {
           RemoteInterpreter remoteInterpreter = (RemoteInterpreter) intp;
           if (remoteInterpreter.isOpened()) {
-            return new InterpreterResult(
-                InterpreterResult.Code.ERROR,
+            return new InterpreterResult(InterpreterResult.Code.ERROR,
                 "Can not change interpreter session properties after this session is started");
           }
           remoteInterpreter.setProperties(finalProperties);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/SparkDownloadUtils.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/SparkDownloadUtils.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/SparkDownloadUtils.java
index a336bcd..9bef4d9 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/SparkDownloadUtils.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/SparkDownloadUtils.java
@@ -12,7 +12,10 @@ import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Utility class for downloading spark. This is used for spark integration test. */
+/**
+ * Utility class for downloading spark. This is used for spark integration test.
+ *
+ */
 public class SparkDownloadUtils {
   private static Logger LOGGER = LoggerFactory.getLogger(SparkDownloadUtils.class);
 
@@ -26,6 +29,7 @@ public class SparkDownloadUtils {
     }
   }
 
+
   public static String downloadSpark(String version) {
     File targetSparkHomeFolder = new File(downloadFolder + "/spark-" + version + "-bin-hadoop2.6");
     if (targetSparkHomeFolder.exists()) {
@@ -36,19 +40,11 @@ public class SparkDownloadUtils {
     boolean downloaded = false;
     for (int i = 0; i < 3; i++) {
       try {
-        String preferredMirror =
-            IOUtils.toString(new URL("https://www.apache.org/dyn/closer.lua?preferred=true"));
+        String preferredMirror = IOUtils.toString(new URL("https://www.apache.org/dyn/closer.lua?preferred=true"));
         File downloadFile = new File(downloadFolder + "/spark-" + version + "-bin-hadoop2.6.tgz");
-        String downloadURL =
-            preferredMirror
-                + "/spark/spark-"
-                + version
-                + "/spark-"
-                + version
-                + "-bin-hadoop2.6.tgz";
+        String downloadURL = preferredMirror + "/spark/spark-" + version + "/spark-" + version + "-bin-hadoop2.6.tgz";
         runShellCommand(new String[] {"wget", downloadURL, "-P", downloadFolder});
-        runShellCommand(
-            new String[] {"tar", "-xvf", downloadFile.getAbsolutePath(), "-C", downloadFolder});
+        runShellCommand(new String[]{"tar", "-xvf", downloadFile.getAbsolutePath(), "-C", downloadFolder});
         downloaded = true;
         break;
       } catch (Exception e) {
@@ -86,20 +82,11 @@ public class SparkDownloadUtils {
     // Try mirrors a few times until one succeeds
     for (int i = 0; i < 3; i++) {
       try {
-        String preferredMirror =
-            IOUtils.toString(new URL("https://www.apache.org/dyn/closer.lua?preferred=true"));
-        File downloadFile =
-            new File(downloadFolder + "/flink-" + version + "-bin-hadoop27-scala_2.11.tgz");
-        String downloadURL =
-            preferredMirror
-                + "/flink/flink-"
-                + version
-                + "/flink-"
-                + version
-                + "-bin-hadoop27-scala_2.11.tgz";
+        String preferredMirror = IOUtils.toString(new URL("https://www.apache.org/dyn/closer.lua?preferred=true"));
+        File downloadFile = new File(downloadFolder + "/flink-" + version + "-bin-hadoop27-scala_2.11.tgz");
+        String downloadURL = preferredMirror + "/flink/flink-" + version + "/flink-" + version + "-bin-hadoop27-scala_2.11.tgz";
         runShellCommand(new String[] {"wget", downloadURL, "-P", downloadFolder});
-        runShellCommand(
-            new String[] {"tar", "-xvf", downloadFile.getAbsolutePath(), "-C", downloadFolder});
+        runShellCommand(new String[]{"tar", "-xvf", downloadFile.getAbsolutePath(), "-C", downloadFolder});
         downloaded = true;
         break;
       } catch (Exception e) {
@@ -109,8 +96,7 @@ public class SparkDownloadUtils {
 
     // fallback to use apache archive
     if (!downloaded) {
-      File downloadFile =
-          new File(downloadFolder + "/flink-" + version + "-bin-hadoop27-scala_2.11.tgz");
+      File downloadFile = new File(downloadFolder + "/flink-" + version + "-bin-hadoop27-scala_2.11.tgz");
       String downloadURL =
           "https://archive.apache.org/dist/flink/flink-"
               + version
@@ -155,7 +141,7 @@ public class SparkDownloadUtils {
         BufferedReader br = new BufferedReader(isr);
         String line = null;
         long startTime = System.currentTimeMillis();
-        while ((line = br.readLine()) != null) {
+        while ( (line = br.readLine()) != null) {
           // logging per 5 seconds
           if ((System.currentTimeMillis() - startTime) > 5000) {
             LOGGER.info(line);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/install/InstallInterpreter.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/install/InstallInterpreter.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/install/InstallInterpreter.java
index c5d330b..0817595 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/install/InstallInterpreter.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/install/InstallInterpreter.java
@@ -16,6 +16,12 @@
  */
 package org.apache.zeppelin.interpreter.install;
 
+import org.apache.commons.io.FileUtils;
+import org.apache.zeppelin.conf.ZeppelinConfiguration;
+import org.apache.zeppelin.dep.DependencyResolver;
+import org.apache.zeppelin.util.Util;
+import org.sonatype.aether.RepositoryException;
+
 import java.io.File;
 import java.io.IOException;
 import java.net.URL;
@@ -24,13 +30,10 @@ import java.util.List;
 import java.util.Locale;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import org.apache.commons.io.FileUtils;
-import org.apache.zeppelin.conf.ZeppelinConfiguration;
-import org.apache.zeppelin.dep.DependencyResolver;
-import org.apache.zeppelin.util.Util;
-import org.sonatype.aether.RepositoryException;
 
-/** Commandline utility to install interpreter from maven repository */
+/**
+ * Commandline utility to install interpreter from maven repository
+ */
 public class InstallInterpreter {
   private final File interpreterListFile;
   private final File interpreterBaseDir;
@@ -41,6 +44,7 @@ public class InstallInterpreter {
   private String proxyPassword;
 
   /**
+   *
    * @param interpreterListFile
    * @param interpreterBaseDir interpreter directory for installing binaries
    * @throws IOException
@@ -54,7 +58,10 @@ public class InstallInterpreter {
     readAvailableInterpreters();
   }
 
-  /** Information for available informations */
+
+  /**
+   * Information for available informations
+   */
   private static class AvailableInterpreterInfo {
     public final String name;
     public final String artifact;
@@ -114,7 +121,7 @@ public class InstallInterpreter {
     }
   }
 
-  public void install(String[] names) {
+  public void install(String [] names) {
     for (String name : names) {
       install(name);
     }
@@ -132,7 +139,7 @@ public class InstallInterpreter {
     throw new RuntimeException("Can't find interpreter '" + name + "'");
   }
 
-  public void install(String[] names, String[] artifacts) {
+  public void install(String [] names, String [] artifacts) {
     if (names.length != artifacts.length) {
       throw new RuntimeException("Length of given names and artifacts are different");
     }
@@ -150,18 +157,19 @@ public class InstallInterpreter {
 
     File installDir = new File(interpreterBaseDir, name);
     if (installDir.exists()) {
-      System.err.println(
-          "Directory " + installDir.getAbsolutePath() + " already exists" + "\n\nSkipped");
+      System.err.println("Directory " + installDir.getAbsolutePath()
+        + " already exists"
+        + "\n\nSkipped");
       return;
     }
 
-    System.out.println(
-        "Install " + name + "(" + artifact + ") to " + installDir.getAbsolutePath() + " ... ");
+    System.out.println("Install " + name + "(" + artifact + ") to "
+        + installDir.getAbsolutePath() + " ... ");
 
     try {
       depResolver.load(artifact, installDir);
-      System.out.println(
-          "Interpreter " + name + " installed under " + installDir.getAbsolutePath() + ".");
+      System.out.println("Interpreter " + name + " installed under " +
+          installDir.getAbsolutePath() + ".");
       startTip();
     } catch (RepositoryException e) {
       e.printStackTrace();
@@ -180,32 +188,29 @@ public class InstallInterpreter {
     System.out.println("Options");
     System.out.println("  -l, --list                   List available interpreters");
     System.out.println("  -a, --all                    Install all available interpreters");
-    System.out.println(
-        "  -n, --name       [NAMES]     Install interpreters (comma separated "
-            + "list)"
-            + "e.g. md,shell,jdbc,python,angular");
-    System.out.println(
-        "  -t, --artifact   [ARTIFACTS] (Optional with -n) custom artifact names"
-            + ". "
-            + "(comma separated list correspond to --name) "
-            + "e.g. customGroup:customArtifact:customVersion");
+    System.out.println("  -n, --name       [NAMES]     Install interpreters (comma separated " +
+        "list)" +
+        "e.g. md,shell,jdbc,python,angular");
+    System.out.println("  -t, --artifact   [ARTIFACTS] (Optional with -n) custom artifact names" +
+        ". " +
+        "(comma separated list correspond to --name) " +
+        "e.g. customGroup:customArtifact:customVersion");
     System.out.println("  --proxy-url      [url]       (Optional) proxy url. http(s)://host:port");
     System.out.println("  --proxy-user     [user]      (Optional) proxy user");
     System.out.println("  --proxy-password [password]  (Optional) proxy password");
   }
 
-  public static void main(String[] args) throws IOException {
+  public static void main(String [] args) throws IOException {
     if (args.length == 0) {
       usage();
       return;
     }
 
     ZeppelinConfiguration conf = ZeppelinConfiguration.create();
-    InstallInterpreter installer =
-        new InstallInterpreter(
-            new File(conf.getInterpreterListPath()),
-            new File(conf.getInterpreterDir()),
-            conf.getInterpreterLocalRepoPath());
+    InstallInterpreter installer = new InstallInterpreter(
+        new File(conf.getInterpreterListPath()),
+        new File(conf.getInterpreterDir()),
+        conf.getInterpreterLocalRepoPath());
 
     String names = null;
     String artifacts = null;
@@ -276,9 +281,8 @@ public class InstallInterpreter {
   }
 
   private static void startTip() {
-    System.out.println(
-        "\n1. Restart Zeppelin"
-            + "\n2. Create interpreter setting in 'Interpreter' menu on Zeppelin GUI"
-            + "\n3. Then you can bind the interpreter on your note");
+    System.out.println("\n1. Restart Zeppelin"
+      + "\n2. Create interpreter setting in 'Interpreter' menu on Zeppelin GUI"
+      + "\n3. Then you can bind the interpreter on your note");
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/lifecycle/NullLifecycleManager.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/lifecycle/NullLifecycleManager.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/lifecycle/NullLifecycleManager.java
index 3baa05c..5a62d22 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/lifecycle/NullLifecycleManager.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/lifecycle/NullLifecycleManager.java
@@ -15,20 +15,29 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.interpreter.lifecycle;
 
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.interpreter.LifecycleManager;
 import org.apache.zeppelin.interpreter.ManagedInterpreterGroup;
 
-/** Do nothing for the lifecycle of interpreter. User need to explicitly start/stop interpreter. */
+/**
+ * Do nothing for the lifecycle of interpreter. User need to explicitly start/stop interpreter.
+ */
 public class NullLifecycleManager implements LifecycleManager {
 
-  public NullLifecycleManager(ZeppelinConfiguration zConf) {}
+  public NullLifecycleManager(ZeppelinConfiguration zConf) {
+
+  }
 
   @Override
-  public void onInterpreterProcessStarted(ManagedInterpreterGroup interpreterGroup) {}
+  public void onInterpreterProcessStarted(ManagedInterpreterGroup interpreterGroup) {
+
+  }
 
   @Override
-  public void onInterpreterUse(ManagedInterpreterGroup interpreterGroup, String sessionId) {}
+  public void onInterpreterUse(ManagedInterpreterGroup interpreterGroup, String sessionId) {
+
+  }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/lifecycle/TimeoutLifecycleManager.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/lifecycle/TimeoutLifecycleManager.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/lifecycle/TimeoutLifecycleManager.java
index b580c49..90f3f55 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/lifecycle/TimeoutLifecycleManager.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/lifecycle/TimeoutLifecycleManager.java
@@ -1,22 +1,24 @@
 package org.apache.zeppelin.interpreter.lifecycle;
 
-import java.util.Map;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.concurrent.ConcurrentHashMap;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.interpreter.LifecycleManager;
 import org.apache.zeppelin.interpreter.ManagedInterpreterGroup;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.Map;
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.concurrent.ConcurrentHashMap;
+
+
 /**
  * This lifecycle manager would close interpreter after it is timeout. By default, it is timeout
  * after no using in 1 hour.
  *
- * <p>For now, this class only manage the lifecycle of interpreter group (will close interpreter
- * process after timeout). Managing the lifecycle of interpreter session could be done in future if
- * necessary.
+ * For now, this class only manage the lifecycle of interpreter group (will close interpreter
+ * process after timeout). Managing the lifecycle of interpreter session could be done in future
+ * if necessary.
  */
 public class TimeoutLifecycleManager implements LifecycleManager {
 
@@ -31,38 +33,28 @@ public class TimeoutLifecycleManager implements LifecycleManager {
   private Timer checkTimer;
 
   public TimeoutLifecycleManager(ZeppelinConfiguration zConf) {
-    this.checkInterval =
-        zConf.getLong(
-            ZeppelinConfiguration.ConfVars
-                .ZEPPELIN_INTERPRETER_LIFECYCLE_MANAGER_TIMEOUT_CHECK_INTERVAL);
-    this.timeoutThreshold =
-        zConf.getLong(
-            ZeppelinConfiguration.ConfVars
-                .ZEPPELIN_INTERPRETER_LIFECYCLE_MANAGER_TIMEOUT_THRESHOLD);
+    this.checkInterval = zConf.getLong(ZeppelinConfiguration.ConfVars
+            .ZEPPELIN_INTERPRETER_LIFECYCLE_MANAGER_TIMEOUT_CHECK_INTERVAL);
+    this.timeoutThreshold = zConf.getLong(
+        ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_LIFECYCLE_MANAGER_TIMEOUT_THRESHOLD);
     this.checkTimer = new Timer(true);
-    this.checkTimer.scheduleAtFixedRate(
-        new TimerTask() {
-          @Override
-          public void run() {
-            long now = System.currentTimeMillis();
-            for (Map.Entry<ManagedInterpreterGroup, Long> entry : interpreterGroups.entrySet()) {
-              ManagedInterpreterGroup interpreterGroup = entry.getKey();
-              Long lastTimeUsing = entry.getValue();
-              if ((now - lastTimeUsing) > timeoutThreshold) {
-                LOGGER.info("InterpreterGroup {} is timeout.", interpreterGroup.getId());
-                interpreterGroup.close();
-                interpreterGroups.remove(entry.getKey());
-              }
-            }
+    this.checkTimer.scheduleAtFixedRate(new TimerTask() {
+      @Override
+      public void run() {
+        long now = System.currentTimeMillis();
+        for (Map.Entry<ManagedInterpreterGroup, Long> entry : interpreterGroups.entrySet()) {
+          ManagedInterpreterGroup interpreterGroup = entry.getKey();
+          Long lastTimeUsing = entry.getValue();
+          if ((now - lastTimeUsing) > timeoutThreshold )  {
+            LOGGER.info("InterpreterGroup {} is timeout.", interpreterGroup.getId());
+            interpreterGroup.close();
+            interpreterGroups.remove(entry.getKey());
           }
-        },
-        checkInterval,
-        checkInterval);
-    LOGGER.info(
-        "TimeoutLifecycleManager is started with checkinterval: "
-            + checkInterval
-            + ", timeoutThreshold: "
-            + timeoutThreshold);
+        }
+      }
+    }, checkInterval, checkInterval);
+    LOGGER.info("TimeoutLifecycleManager is started with checkinterval: " + checkInterval
+        + ", timeoutThreshold: " + timeoutThreshold);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/recovery/FileSystemRecoveryStorage.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/recovery/FileSystemRecoveryStorage.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/recovery/FileSystemRecoveryStorage.java
index e854702..4dffff1 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/recovery/FileSystemRecoveryStorage.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/recovery/FileSystemRecoveryStorage.java
@@ -17,11 +17,6 @@
 
 package org.apache.zeppelin.interpreter.recovery;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
 import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.fs.Path;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
@@ -35,10 +30,18 @@ import org.apache.zeppelin.notebook.FileSystemStorage;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
 /**
  * Hadoop compatible FileSystem based RecoveryStorage implementation.
  *
- * <p>Save InterpreterProcess in the format of: InterpreterGroupId host:port
+ * Save InterpreterProcess in the format of:
+ * InterpreterGroupId host:port
  */
 public class FileSystemRecoveryStorage extends RecoveryStorage {
 
@@ -48,15 +51,15 @@ public class FileSystemRecoveryStorage extends RecoveryStorage {
   private FileSystemStorage fs;
   private Path recoveryDir;
 
-  public FileSystemRecoveryStorage(
-      ZeppelinConfiguration zConf, InterpreterSettingManager interpreterSettingManager)
+  public FileSystemRecoveryStorage(ZeppelinConfiguration zConf,
+                                   InterpreterSettingManager interpreterSettingManager)
       throws IOException {
     super(zConf);
     this.interpreterSettingManager = interpreterSettingManager;
     this.zConf = zConf;
     this.fs = new FileSystemStorage(zConf, zConf.getRecoveryDir());
-    LOGGER.info(
-        "Creating FileSystem: " + this.fs.getFs().getClass().getName() + " for Zeppelin Recovery.");
+    LOGGER.info("Creating FileSystem: " + this.fs.getFs().getClass().getName() +
+        " for Zeppelin Recovery.");
     this.recoveryDir = this.fs.makeQualified(new Path(zConf.getRecoveryDir()));
     LOGGER.info("Using folder {} to store recovery data", recoveryDir);
     this.fs.tryMkDir(recoveryDir);
@@ -79,12 +82,8 @@ public class FileSystemRecoveryStorage extends RecoveryStorage {
     for (ManagedInterpreterGroup interpreterGroup : interpreterSetting.getAllInterpreterGroups()) {
       RemoteInterpreterProcess interpreterProcess = interpreterGroup.getInterpreterProcess();
       if (interpreterProcess != null) {
-        recoveryContent.add(
-            interpreterGroup.getId()
-                + "\t"
-                + interpreterProcess.getHost()
-                + ":"
-                + interpreterProcess.getPort());
+        recoveryContent.add(interpreterGroup.getId() + "\t" + interpreterProcess.getHost() + ":" +
+            interpreterProcess.getPort());
       }
     }
     LOGGER.debug("Updating recovery data for interpreterSetting: " + interpreterSettingName);
@@ -100,8 +99,8 @@ public class FileSystemRecoveryStorage extends RecoveryStorage {
 
     for (Path path : paths) {
       String fileName = path.getName();
-      String interpreterSettingName =
-          fileName.substring(0, fileName.length() - ".recovery".length());
+      String interpreterSettingName = fileName.substring(0,
+          fileName.length() - ".recovery".length());
       String recoveryContent = fs.readFile(path);
       if (!StringUtils.isBlank(recoveryContent)) {
         for (String line : recoveryContent.split(System.lineSeparator())) {
@@ -110,12 +109,8 @@ public class FileSystemRecoveryStorage extends RecoveryStorage {
           String[] hostPort = tokens[1].split(":");
           int connectTimeout =
               zConf.getInt(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT);
-          RemoteInterpreterRunningProcess client =
-              new RemoteInterpreterRunningProcess(
-                  interpreterSettingName,
-                  connectTimeout,
-                  hostPort[0],
-                  Integer.parseInt(hostPort[1]));
+          RemoteInterpreterRunningProcess client = new RemoteInterpreterRunningProcess(
+              interpreterSettingName, connectTimeout, hostPort[0], Integer.parseInt(hostPort[1]));
           // interpreterSettingManager may be null when this class is used when it is used
           // stop-interpreter.sh
           clients.put(groupId, client);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/recovery/NullRecoveryStorage.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/recovery/NullRecoveryStorage.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/recovery/NullRecoveryStorage.java
index c0bcdca..3a7d12c 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/recovery/NullRecoveryStorage.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/recovery/NullRecoveryStorage.java
@@ -17,26 +17,35 @@
 
 package org.apache.zeppelin.interpreter.recovery;
 
-import java.io.IOException;
-import java.util.Map;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.interpreter.InterpreterSettingManager;
 import org.apache.zeppelin.interpreter.launcher.InterpreterClient;
 
-/** RecoveryStorage that do nothing, used when recovery is not enabled. */
+import java.io.IOException;
+import java.util.Map;
+
+
+/**
+ * RecoveryStorage that do nothing, used when recovery is not enabled.
+ *
+ */
 public class NullRecoveryStorage extends RecoveryStorage {
 
-  public NullRecoveryStorage(
-      ZeppelinConfiguration zConf, InterpreterSettingManager interpreterSettingManager)
+  public NullRecoveryStorage(ZeppelinConfiguration zConf,
+                             InterpreterSettingManager interpreterSettingManager)
       throws IOException {
     super(zConf);
   }
 
   @Override
-  public void onInterpreterClientStart(InterpreterClient client) throws IOException {}
+  public void onInterpreterClientStart(InterpreterClient client) throws IOException {
+
+  }
 
   @Override
-  public void onInterpreterClientStop(InterpreterClient client) throws IOException {}
+  public void onInterpreterClientStop(InterpreterClient client) throws IOException {
+
+  }
 
   @Override
   public Map<String, InterpreterClient> restore() throws IOException {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/recovery/StopInterpreter.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/recovery/StopInterpreter.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/recovery/StopInterpreter.java
index 7808bf2..d74b162 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/recovery/StopInterpreter.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/recovery/StopInterpreter.java
@@ -1,7 +1,5 @@
 package org.apache.zeppelin.interpreter.recovery;
 
-import java.io.IOException;
-import java.util.Map;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.interpreter.InterpreterSettingManager;
 import org.apache.zeppelin.interpreter.launcher.InterpreterClient;
@@ -9,10 +7,14 @@ import org.apache.zeppelin.util.ReflectionUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.util.Map;
+
+
 /**
- * Utility class for stopping interpreter in the case that you want to stop all the interpreter
- * process even when you enable recovery, or you want to kill interpreter process to avoid orphan
- * process.
+ * Utility class for stopping interpreter in the case that you want to stop all the
+ * interpreter process even when you enable recovery, or you want to kill interpreter process
+ * to avoid orphan process.
  */
 public class StopInterpreter {
 
@@ -22,11 +24,9 @@ public class StopInterpreter {
     ZeppelinConfiguration zConf = ZeppelinConfiguration.create();
     RecoveryStorage recoveryStorage = null;
 
-    recoveryStorage =
-        ReflectionUtils.createClazzInstance(
-            zConf.getRecoveryStorageClass(),
-            new Class[] {ZeppelinConfiguration.class, InterpreterSettingManager.class},
-            new Object[] {zConf, null});
+    recoveryStorage = ReflectionUtils.createClazzInstance(zConf.getRecoveryStorageClass(),
+        new Class[] {ZeppelinConfiguration.class, InterpreterSettingManager.class},
+        new Object[] {zConf, null});
 
     LOGGER.info("Using RecoveryStorage: " + recoveryStorage.getClass().getName());
     Map<String, InterpreterClient> restoredClients = recoveryStorage.restore();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/AppendOutputBuffer.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/AppendOutputBuffer.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/AppendOutputBuffer.java
index e6f08da..b139404 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/AppendOutputBuffer.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/AppendOutputBuffer.java
@@ -17,7 +17,10 @@
 
 package org.apache.zeppelin.interpreter.remote;
 
-/** This element stores the buffered append-data of paragraph's output. */
+/**
+ * This element stores the buffered
+ * append-data of paragraph's output.
+ */
 public class AppendOutputBuffer {
 
   private String noteId;
@@ -47,4 +50,5 @@ public class AppendOutputBuffer {
   public String getData() {
     return data;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/AppendOutputRunner.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/AppendOutputRunner.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/AppendOutputRunner.java
index 54a75ac..2a88dc2 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/AppendOutputRunner.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/AppendOutputRunner.java
@@ -17,22 +17,26 @@
 
 package org.apache.zeppelin.interpreter.remote;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.LinkedBlockingQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
- * This thread sends paragraph's append-data periodically, rather than continously, with a period of
- * BUFFER_TIME_MS. It handles append-data for all paragraphs across all notebooks.
+ * This thread sends paragraph's append-data
+ * periodically, rather than continously, with
+ * a period of BUFFER_TIME_MS. It handles append-data
+ * for all paragraphs across all notebooks.
  */
 public class AppendOutputRunner implements Runnable {
 
-  private static final Logger logger = LoggerFactory.getLogger(AppendOutputRunner.class);
+  private static final Logger logger =
+      LoggerFactory.getLogger(AppendOutputRunner.class);
   public static final Long BUFFER_TIME_MS = new Long(100);
   private static final Long SAFE_PROCESSING_TIME = new Long(10);
   private static final Long SAFE_PROCESSING_STRING_SIZE = new Long(100000);
@@ -66,16 +70,14 @@ public class AppendOutputRunner implements Runnable {
     Long processingStartTime = System.currentTimeMillis();
     queue.drainTo(list);
 
-    for (AppendOutputBuffer buffer : list) {
+    for (AppendOutputBuffer buffer: list) {
       String noteId = buffer.getNoteId();
       String paragraphId = buffer.getParagraphId();
       int index = buffer.getIndex();
       String stringBufferKey = noteId + ":" + paragraphId + ":" + index;
 
-      StringBuilder builder =
-          stringBufferMap.containsKey(stringBufferKey)
-              ? stringBufferMap.get(stringBufferKey)
-              : new StringBuilder();
+      StringBuilder builder = stringBufferMap.containsKey(stringBufferKey) ?
+          stringBufferMap.get(stringBufferKey) : new StringBuilder();
 
       builder.append(buffer.getData());
       stringBufferMap.put(stringBufferKey, builder);
@@ -83,12 +85,11 @@ public class AppendOutputRunner implements Runnable {
     Long processingTime = System.currentTimeMillis() - processingStartTime;
 
     if (processingTime > SAFE_PROCESSING_TIME) {
-      logger.warn(
-          "Processing time for buffered append-output is high: "
-              + processingTime
-              + " milliseconds.");
+      logger.warn("Processing time for buffered append-output is high: " +
+          processingTime + " milliseconds.");
     } else {
-      logger.debug("Processing time for append-output took " + processingTime + " milliseconds");
+      logger.debug("Processing time for append-output took "
+          + processingTime + " milliseconds");
     }
 
     Long sizeProcessed = new Long(0);
@@ -100,14 +101,16 @@ public class AppendOutputRunner implements Runnable {
     }
 
     if (sizeProcessed > SAFE_PROCESSING_STRING_SIZE) {
-      logger.warn(
-          "Processing size for buffered append-output is high: " + sizeProcessed + " characters.");
+      logger.warn("Processing size for buffered append-output is high: " +
+          sizeProcessed + " characters.");
     } else {
-      logger.debug("Processing size for append-output is " + sizeProcessed + " characters");
+      logger.debug("Processing size for append-output is " +
+          sizeProcessed + " characters");
     }
   }
 
   public void appendBuffer(String noteId, String paragraphId, int index, String outputToAppend) {
     queue.offer(new AppendOutputBuffer(noteId, paragraphId, index, outputToAppend));
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/ClientFactory.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/ClientFactory.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/ClientFactory.java
index 346bb26..b2cb78f 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/ClientFactory.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/ClientFactory.java
@@ -19,6 +19,7 @@ package org.apache.zeppelin.interpreter.remote;
 
 import java.util.HashMap;
 import java.util.Map;
+
 import org.apache.commons.pool2.BasePooledObjectFactory;
 import org.apache.commons.pool2.PooledObject;
 import org.apache.commons.pool2.impl.DefaultPooledObject;
@@ -30,8 +31,10 @@ import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService;
 import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService.Client;
 
-/** */
-public class ClientFactory extends BasePooledObjectFactory<Client> {
+/**
+ *
+ */
+public class ClientFactory extends BasePooledObjectFactory<Client>{
   private String host;
   private int port;
   Map<Client, TSocket> clientSocketMap = new HashMap<>();
@@ -50,7 +53,7 @@ public class ClientFactory extends BasePooledObjectFactory<Client> {
       throw new InterpreterException(e);
     }
 
-    TProtocol protocol = new TBinaryProtocol(transport);
+    TProtocol protocol = new  TBinaryProtocol(transport);
     Client client = new RemoteInterpreterService.Client(protocol);
 
     synchronized (clientSocketMap) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteAngularObject.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteAngularObject.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteAngularObject.java
index 896ec47..62c8efd 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteAngularObject.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteAngularObject.java
@@ -19,27 +19,26 @@ package org.apache.zeppelin.interpreter.remote;
 
 import org.apache.zeppelin.display.AngularObject;
 import org.apache.zeppelin.display.AngularObjectListener;
+import org.apache.zeppelin.interpreter.InterpreterGroup;
 import org.apache.zeppelin.interpreter.ManagedInterpreterGroup;
 
-/** Proxy for AngularObject that exists in remote interpreter process */
+/**
+ * Proxy for AngularObject that exists in remote interpreter process
+ */
 public class RemoteAngularObject extends AngularObject {
 
   private transient ManagedInterpreterGroup interpreterGroup;
 
-  RemoteAngularObject(
-      String name,
-      Object o,
-      String noteId,
-      String paragraphId,
-      ManagedInterpreterGroup interpreterGroup,
-      AngularObjectListener listener) {
+  RemoteAngularObject(String name, Object o, String noteId, String paragraphId,
+                      ManagedInterpreterGroup interpreterGroup,
+                      AngularObjectListener listener) {
     super(name, o, noteId, paragraphId, listener);
     this.interpreterGroup = interpreterGroup;
   }
 
   @Override
   public void set(Object o, boolean emit) {
-    set(o, emit, true);
+    set(o,  emit, true);
   }
 
   public void set(Object o, boolean emitWeb, boolean emitRemoteProcess) {
@@ -47,9 +46,9 @@ public class RemoteAngularObject extends AngularObject {
 
     if (emitRemoteProcess) {
       // send updated value to remote interpreter
-      interpreterGroup
-          .getRemoteInterpreterProcess()
-          .updateRemoteAngularObject(getName(), getNoteId(), getParagraphId(), o);
+      interpreterGroup.getRemoteInterpreterProcess().
+          updateRemoteAngularObject(
+              getName(), getNoteId(), getParagraphId(), o);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteAngularObjectRegistry.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteAngularObjectRegistry.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteAngularObjectRegistry.java
index db7a330..7458ce5 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteAngularObjectRegistry.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteAngularObjectRegistry.java
@@ -18,24 +18,28 @@
 package org.apache.zeppelin.interpreter.remote;
 
 import com.google.gson.Gson;
-import java.util.List;
+import org.apache.thrift.TException;
 import org.apache.zeppelin.display.AngularObject;
 import org.apache.zeppelin.display.AngularObjectRegistry;
 import org.apache.zeppelin.display.AngularObjectRegistryListener;
+import org.apache.zeppelin.interpreter.InterpreterGroup;
 import org.apache.zeppelin.interpreter.ManagedInterpreterGroup;
 import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService.Client;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Proxy for AngularObjectRegistry that exists in remote interpreter process */
+import java.util.List;
+
+/**
+ * Proxy for AngularObjectRegistry that exists in remote interpreter process
+ */
 public class RemoteAngularObjectRegistry extends AngularObjectRegistry {
   Logger logger = LoggerFactory.getLogger(RemoteAngularObjectRegistry.class);
   private ManagedInterpreterGroup interpreterGroup;
 
-  public RemoteAngularObjectRegistry(
-      String interpreterId,
-      AngularObjectRegistryListener listener,
-      ManagedInterpreterGroup interpreterGroup) {
+  public RemoteAngularObjectRegistry(String interpreterId,
+                                     AngularObjectRegistryListener listener,
+                                     ManagedInterpreterGroup interpreterGroup) {
     super(interpreterId, listener);
     this.interpreterGroup = interpreterGroup;
   }
@@ -45,16 +49,17 @@ public class RemoteAngularObjectRegistry extends AngularObjectRegistry {
   }
 
   /**
-   * When ZeppelinServer side code want to add angularObject to the registry, this method should be
-   * used instead of add()
-   *
+   * When ZeppelinServer side code want to add angularObject to the registry,
+   * this method should be used instead of add()
    * @param name
    * @param o
    * @param noteId
    * @return
    */
-  public AngularObject addAndNotifyRemoteProcess(
-      final String name, final Object o, final String noteId, final String paragraphId) {
+  public AngularObject addAndNotifyRemoteProcess(final String name,
+                                                 final Object o,
+                                                 final String noteId,
+                                                 final String paragraphId) {
 
     RemoteInterpreterProcess remoteInterpreterProcess = getRemoteInterpreterProcess();
     if (!remoteInterpreterProcess.isRunning()) {
@@ -69,38 +74,41 @@ public class RemoteAngularObjectRegistry extends AngularObjectRegistry {
             client.angularObjectAdd(name, noteId, paragraphId, gson.toJson(o));
             return null;
           }
-        });
+        }
+    );
 
     return super.add(name, o, noteId, paragraphId, true);
+
   }
 
   /**
-   * When ZeppelinServer side code want to remove angularObject from the registry, this method
-   * should be used instead of remove()
-   *
+   * When ZeppelinServer side code want to remove angularObject from the registry,
+   * this method should be used instead of remove()
    * @param name
    * @param noteId
    * @param paragraphId
    * @return
    */
-  public AngularObject removeAndNotifyRemoteProcess(
-      final String name, final String noteId, final String paragraphId) {
+  public AngularObject removeAndNotifyRemoteProcess(final String name,
+                                                    final String noteId,
+                                                    final String paragraphId) {
     RemoteInterpreterProcess remoteInterpreterProcess = getRemoteInterpreterProcess();
     if (remoteInterpreterProcess == null || !remoteInterpreterProcess.isRunning()) {
       return super.remove(name, noteId, paragraphId);
     }
     remoteInterpreterProcess.callRemoteFunction(
-        new RemoteInterpreterProcess.RemoteFunction<Void>() {
-          @Override
-          public Void call(Client client) throws Exception {
-            client.angularObjectRemove(name, noteId, paragraphId);
-            return null;
-          }
-        });
+      new RemoteInterpreterProcess.RemoteFunction<Void>() {
+        @Override
+        public Void call(Client client) throws Exception {
+          client.angularObjectRemove(name, noteId, paragraphId);
+          return null;
+        }
+      }
+    );
 
     return super.remove(name, noteId, paragraphId);
   }
-
+  
   public void removeAllAndNotifyRemoteProcess(String noteId, String paragraphId) {
     List<AngularObject> all = getAll(noteId, paragraphId);
     for (AngularObject ao : all) {
@@ -109,9 +117,9 @@ public class RemoteAngularObjectRegistry extends AngularObjectRegistry {
   }
 
   @Override
-  protected AngularObject createNewAngularObject(
-      String name, Object o, String noteId, String paragraphId) {
-    return new RemoteAngularObject(
-        name, o, noteId, paragraphId, interpreterGroup, getAngularObjectListener());
+  protected AngularObject createNewAngularObject(String name, Object o, String noteId, String
+          paragraphId) {
+    return new RemoteAngularObject(name, o, noteId, paragraphId, interpreterGroup,
+        getAngularObjectListener());
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java
index 795b02f..6f9f81f 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java
@@ -20,10 +20,6 @@ package org.apache.zeppelin.interpreter.remote;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
 import org.apache.thrift.TException;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.display.AngularObject;
@@ -49,11 +45,20 @@ import org.apache.zeppelin.scheduler.SchedulerFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Proxy for Interpreter instance that runs on separate process */
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * Proxy for Interpreter instance that runs on separate process
+ */
 public class RemoteInterpreter extends Interpreter {
   private static final Logger LOGGER = LoggerFactory.getLogger(RemoteInterpreter.class);
   private static final Gson gson = new Gson();
 
+
   private String className;
   private String sessionId;
   private FormType formType;
@@ -64,13 +69,14 @@ public class RemoteInterpreter extends Interpreter {
 
   private LifecycleManager lifecycleManager;
 
-  /** Remote interpreter and manage interpreter process */
-  public RemoteInterpreter(
-      Properties properties,
-      String sessionId,
-      String className,
-      String userName,
-      LifecycleManager lifecycleManager) {
+  /**
+   * Remote interpreter and manage interpreter process
+   */
+  public RemoteInterpreter(Properties properties,
+                           String sessionId,
+                           String className,
+                           String userName,
+                           LifecycleManager lifecycleManager) {
     super(properties);
     this.sessionId = sessionId;
     this.className = className;
@@ -118,8 +124,8 @@ public class RemoteInterpreter extends Interpreter {
         // The why we we create all the interpreter of the session is because some interpreter
         // depends on other interpreter. e.g. PySparkInterpreter depends on SparkInterpreter.
         // also see method Interpreter.getInterpreterInTheSameSessionByClassName
-        for (Interpreter interpreter :
-            getInterpreterGroup().getOrCreateSession(this.getUserName(), sessionId)) {
+        for (Interpreter interpreter : getInterpreterGroup()
+                                        .getOrCreateSession(this.getUserName(), sessionId)) {
           try {
             if (!(interpreter instanceof ConfInterpreter)) {
               ((RemoteInterpreter) interpreter).internal_create();
@@ -129,23 +135,22 @@ public class RemoteInterpreter extends Interpreter {
           }
         }
 
-        interpreterProcess.callRemoteFunction(
-            new RemoteInterpreterProcess.RemoteFunction<Void>() {
-              @Override
-              public Void call(Client client) throws Exception {
-                LOGGER.info("Open RemoteInterpreter {}", getClassName());
-                // open interpreter here instead of in the jobRun method in RemoteInterpreterServer
-                // client.open(sessionId, className);
-                // Push angular object loaded from JSON file to remote interpreter
-                synchronized (getInterpreterGroup()) {
-                  if (!getInterpreterGroup().isAngularRegistryPushed()) {
-                    pushAngularObjectRegistryToRemote(client);
-                    getInterpreterGroup().setAngularRegistryPushed(true);
-                  }
-                }
-                return null;
+        interpreterProcess.callRemoteFunction(new RemoteInterpreterProcess.RemoteFunction<Void>() {
+          @Override
+          public Void call(Client client) throws Exception {
+            LOGGER.info("Open RemoteInterpreter {}", getClassName());
+            // open interpreter here instead of in the jobRun method in RemoteInterpreterServer
+            // client.open(sessionId, className);
+            // Push angular object loaded from JSON file to remote interpreter
+            synchronized (getInterpreterGroup()) {
+              if (!getInterpreterGroup().isAngularRegistryPushed()) {
+                pushAngularObjectRegistryToRemote(client);
+                getInterpreterGroup().setAngularRegistryPushed(true);
               }
-            });
+            }
+            return null;
+          }
+        });
         isOpened = true;
         this.lifecycleManager.onInterpreterUse(this.getInterpreterGroup(), sessionId);
       }
@@ -156,25 +161,21 @@ public class RemoteInterpreter extends Interpreter {
     synchronized (this) {
       if (!isCreated) {
         this.interpreterProcess = getOrCreateInterpreterProcess();
-        interpreterProcess.callRemoteFunction(
-            new RemoteInterpreterProcess.RemoteFunction<Void>() {
-              @Override
-              public Void call(Client client) throws Exception {
-                LOGGER.info("Create RemoteInterpreter {}", getClassName());
-                client.createInterpreter(
-                    getInterpreterGroup().getId(),
-                    sessionId,
-                    className,
-                    (Map) getProperties(),
-                    getUserName());
-                return null;
-              }
-            });
+        interpreterProcess.callRemoteFunction(new RemoteInterpreterProcess.RemoteFunction<Void>() {
+          @Override
+          public Void call(Client client) throws Exception {
+            LOGGER.info("Create RemoteInterpreter {}", getClassName());
+            client.createInterpreter(getInterpreterGroup().getId(), sessionId,
+                className, (Map) getProperties(), getUserName());
+            return null;
+          }
+        });
         isCreated = true;
       }
     }
   }
 
+
   @Override
   public void close() throws InterpreterException {
     if (isOpened) {
@@ -184,14 +185,13 @@ public class RemoteInterpreter extends Interpreter {
       } catch (IOException e) {
         throw new InterpreterException(e);
       }
-      interpreterProcess.callRemoteFunction(
-          new RemoteInterpreterProcess.RemoteFunction<Void>() {
-            @Override
-            public Void call(Client client) throws Exception {
-              client.close(sessionId, className);
-              return null;
-            }
-          });
+      interpreterProcess.callRemoteFunction(new RemoteInterpreterProcess.RemoteFunction<Void>() {
+        @Override
+        public Void call(Client client) throws Exception {
+          client.close(sessionId, className);
+          return null;
+        }
+      });
       isOpened = false;
       this.lifecycleManager.onInterpreterUse(this.getInterpreterGroup(), sessionId);
     } else {
@@ -219,13 +219,11 @@ public class RemoteInterpreter extends Interpreter {
           @Override
           public InterpreterResult call(Client client) throws Exception {
 
-            RemoteInterpreterResult remoteResult =
-                client.interpret(sessionId, className, st, convert(context));
-            Map<String, Object> remoteConfig =
-                (Map<String, Object>)
-                    gson.fromJson(
-                        remoteResult.getConfig(),
-                        new TypeToken<Map<String, Object>>() {}.getType());
+            RemoteInterpreterResult remoteResult = client.interpret(
+                sessionId, className, st, convert(context));
+            Map<String, Object> remoteConfig = (Map<String, Object>) gson.fromJson(
+                remoteResult.getConfig(), new TypeToken<Map<String, Object>>() {
+                }.getType());
             context.getConfig().clear();
             if (remoteConfig != null) {
               context.getConfig().putAll(remoteConfig);
@@ -253,7 +251,9 @@ public class RemoteInterpreter extends Interpreter {
             InterpreterResult result = convert(remoteResult);
             return result;
           }
-        });
+        }
+    );
+
   }
 
   @Override
@@ -269,14 +269,13 @@ public class RemoteInterpreter extends Interpreter {
       throw new InterpreterException(e);
     }
     this.lifecycleManager.onInterpreterUse(this.getInterpreterGroup(), sessionId);
-    interpreterProcess.callRemoteFunction(
-        new RemoteInterpreterProcess.RemoteFunction<Void>() {
-          @Override
-          public Void call(Client client) throws Exception {
-            client.cancel(sessionId, className, convert(context));
-            return null;
-          }
-        });
+    interpreterProcess.callRemoteFunction(new RemoteInterpreterProcess.RemoteFunction<Void>() {
+      @Override
+      public Void call(Client client) throws Exception {
+        client.cancel(sessionId, className, convert(context));
+        return null;
+      }
+    });
   }
 
   @Override
@@ -298,18 +297,18 @@ public class RemoteInterpreter extends Interpreter {
       throw new InterpreterException(e);
     }
     this.lifecycleManager.onInterpreterUse(this.getInterpreterGroup(), sessionId);
-    FormType type =
-        interpreterProcess.callRemoteFunction(
-            new RemoteInterpreterProcess.RemoteFunction<FormType>() {
-              @Override
-              public FormType call(Client client) throws Exception {
-                formType = FormType.valueOf(client.getFormType(sessionId, className));
-                return formType;
-              }
-            });
+    FormType type = interpreterProcess.callRemoteFunction(
+        new RemoteInterpreterProcess.RemoteFunction<FormType>() {
+          @Override
+          public FormType call(Client client) throws Exception {
+            formType = FormType.valueOf(client.getFormType(sessionId, className));
+            return formType;
+          }
+        });
     return type;
   }
 
+
   @Override
   public int getProgress(final InterpreterContext context) throws InterpreterException {
     if (!isOpened) {
@@ -332,9 +331,10 @@ public class RemoteInterpreter extends Interpreter {
         });
   }
 
+
   @Override
-  public List<InterpreterCompletion> completion(
-      final String buf, final int cursor, final InterpreterContext interpreterContext)
+  public List<InterpreterCompletion> completion(final String buf, final int cursor,
+                                                final InterpreterContext interpreterContext)
       throws InterpreterException {
     if (!isOpened) {
       open();
@@ -350,8 +350,8 @@ public class RemoteInterpreter extends Interpreter {
         new RemoteInterpreterProcess.RemoteFunction<List<InterpreterCompletion>>() {
           @Override
           public List<InterpreterCompletion> call(Client client) throws Exception {
-            return client.completion(
-                sessionId, className, buf, cursor, convert(interpreterContext));
+            return client.completion(sessionId, className, buf, cursor,
+                convert(interpreterContext));
           }
         });
   }
@@ -377,48 +377,36 @@ public class RemoteInterpreter extends Interpreter {
         });
   }
 
+
   @Override
   public Scheduler getScheduler() {
-    int maxConcurrency =
-        Integer.parseInt(
-            getProperty(
-                "zeppelin.interpreter.max.poolsize",
-                ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_MAX_POOL_SIZE.getIntValue()
-                    + ""));
+    int maxConcurrency = Integer.parseInt(
+        getProperty("zeppelin.interpreter.max.poolsize",
+            ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_MAX_POOL_SIZE.getIntValue() + ""));
     // one session own one Scheduler, so that when one session is closed, all the jobs/paragraphs
     // running under the scheduler of this session will be aborted.
-    Scheduler s =
-        new RemoteScheduler(
-            RemoteInterpreter.class.getSimpleName()
-                + "-"
-                + getInterpreterGroup().getId()
-                + "-"
-                + sessionId,
-            SchedulerFactory.singleton().getExecutor(),
-            sessionId,
-            this,
-            SchedulerFactory.singleton(),
-            maxConcurrency);
+    Scheduler s = new RemoteScheduler(
+        RemoteInterpreter.class.getSimpleName() + "-" + getInterpreterGroup().getId() + "-"
+            + sessionId,
+        SchedulerFactory.singleton().getExecutor(),
+        sessionId,
+        this,
+        SchedulerFactory.singleton(),
+        maxConcurrency);
     return SchedulerFactory.singleton().createOrGetScheduler(s);
   }
 
   private RemoteInterpreterContext convert(InterpreterContext ic) {
-    return new RemoteInterpreterContext(
-        ic.getNoteId(),
-        ic.getNoteName(),
-        ic.getParagraphId(),
-        ic.getReplName(),
-        ic.getParagraphTitle(),
-        ic.getParagraphText(),
-        gson.toJson(ic.getAuthenticationInfo()),
-        gson.toJson(ic.getConfig()),
-        ic.getGui().toJson(),
+    return new RemoteInterpreterContext(ic.getNoteId(), ic.getNoteName(), ic.getParagraphId(),
+        ic.getReplName(), ic.getParagraphTitle(), ic.getParagraphText(),
+        gson.toJson(ic.getAuthenticationInfo()), gson.toJson(ic.getConfig()), ic.getGui().toJson(),
         gson.toJson(ic.getNoteGui()),
         ic.getLocalProperties());
   }
 
   private InterpreterResult convert(RemoteInterpreterResult result) {
-    InterpreterResult r = new InterpreterResult(InterpreterResult.Code.valueOf(result.getCode()));
+    InterpreterResult r = new InterpreterResult(
+        InterpreterResult.Code.valueOf(result.getCode()));
 
     for (RemoteInterpreterResultMessage m : result.getMsg()) {
       r.add(InterpreterResult.Type.valueOf(m.getType()), m.getData());
@@ -428,20 +416,21 @@ public class RemoteInterpreter extends Interpreter {
   }
 
   /**
-   * Push local angular object registry to remote interpreter. This method should be call ONLY once
-   * when the first Interpreter is created
+   * Push local angular object registry to
+   * remote interpreter. This method should be
+   * call ONLY once when the first Interpreter is created
    */
   private void pushAngularObjectRegistryToRemote(Client client) throws TException {
-    final AngularObjectRegistry angularObjectRegistry =
-        this.getInterpreterGroup().getAngularObjectRegistry();
+    final AngularObjectRegistry angularObjectRegistry = this.getInterpreterGroup()
+        .getAngularObjectRegistry();
     if (angularObjectRegistry != null && angularObjectRegistry.getRegistry() != null) {
-      final Map<String, Map<String, AngularObject>> registry = angularObjectRegistry.getRegistry();
-      LOGGER.info(
-          "Push local angular object registry from ZeppelinServer to"
-              + " remote interpreter group {}",
-          this.getInterpreterGroup().getId());
-      final java.lang.reflect.Type registryType =
-          new TypeToken<Map<String, Map<String, AngularObject>>>() {}.getType();
+      final Map<String, Map<String, AngularObject>> registry = angularObjectRegistry
+          .getRegistry();
+      LOGGER.info("Push local angular object registry from ZeppelinServer to" +
+          " remote interpreter group {}", this.getInterpreterGroup().getId());
+      final java.lang.reflect.Type registryType = new TypeToken<Map<String,
+          Map<String, AngularObject>>>() {
+      }.getType();
       client.angularRegistryPush(gson.toJson(registry, registryType));
     }
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterManagedProcess.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterManagedProcess.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterManagedProcess.java
index 1572fc2..db6d263 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterManagedProcess.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterManagedProcess.java
@@ -18,11 +18,6 @@
 package org.apache.zeppelin.interpreter.remote;
 
 import com.google.common.annotations.VisibleForTesting;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicBoolean;
 import org.apache.commons.exec.CommandLine;
 import org.apache.commons.exec.DefaultExecutor;
 import org.apache.commons.exec.ExecuteException;
@@ -35,11 +30,19 @@ import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** This class manages start / stop of remote interpreter process */
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+/**
+ * This class manages start / stop of remote interpreter process
+ */
 public class RemoteInterpreterManagedProcess extends RemoteInterpreterProcess
     implements ExecuteResultHandler {
-  private static final Logger logger =
-      LoggerFactory.getLogger(RemoteInterpreterManagedProcess.class);
+  private static final Logger logger = LoggerFactory.getLogger(
+      RemoteInterpreterManagedProcess.class);
 
   private final String interpreterRunner;
   private final int zeppelinServerRPCPort;
@@ -144,15 +147,11 @@ public class RemoteInterpreterManagedProcess extends RemoteInterpreterProcess
         }
       }
       if (!running.get()) {
-        throw new IOException(
-            new String(
-                String.format(
-                        "Interpreter Process creation is time out in %d seconds",
-                        getConnectTimeout() / 1000)
-                    + "\n"
-                    + "You can increase timeout threshold via "
-                    + "setting zeppelin.interpreter.connect.timeout of this interpreter.\n"
-                    + cmdOut.toString()));
+        throw new IOException(new String(
+            String.format("Interpreter Process creation is time out in %d seconds",
+                getConnectTimeout()/1000) + "\n" + "You can increase timeout threshold via " +
+                "setting zeppelin.interpreter.connect.timeout of this interpreter.\n" +
+                cmdOut.toString()));
       }
     } catch (InterruptedException e) {
       logger.error("Remote interpreter is not accessible");
@@ -164,14 +163,13 @@ public class RemoteInterpreterManagedProcess extends RemoteInterpreterProcess
     if (isRunning()) {
       logger.info("Kill interpreter process");
       try {
-        callRemoteFunction(
-            new RemoteFunction<Void>() {
-              @Override
-              public Void call(RemoteInterpreterService.Client client) throws Exception {
-                client.shutdown();
-                return null;
-              }
-            });
+        callRemoteFunction(new RemoteFunction<Void>() {
+          @Override
+          public Void call(RemoteInterpreterService.Client client) throws Exception {
+            client.shutdown();
+            return null;
+          }
+        });
       } catch (Exception e) {
         logger.warn("ignore the exception when shutting down");
       }
@@ -188,6 +186,7 @@ public class RemoteInterpreterManagedProcess extends RemoteInterpreterProcess
   public void onProcessComplete(int exitValue) {
     logger.info("Interpreter process exited {}", exitValue);
     running.set(false);
+
   }
 
   // called by RemoteInterpreterServer to notify that RemoteInterpreter Process is started
@@ -254,7 +253,7 @@ public class RemoteInterpreterManagedProcess extends RemoteInterpreterProcess
     }
 
     @Override
-    public void write(byte[] b) throws IOException {
+    public void write(byte [] b) throws IOException {
       super.write(b);
 
       if (out != null) {
@@ -267,7 +266,7 @@ public class RemoteInterpreterManagedProcess extends RemoteInterpreterProcess
     }
 
     @Override
-    public void write(byte[] b, int offset, int len) throws IOException {
+    public void write(byte [] b, int offset, int len) throws IOException {
       super.write(b, offset, len);
 
       if (out != null) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterProcess.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterProcess.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterProcess.java
index 5e50265..e8b3482 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterProcess.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterProcess.java
@@ -24,14 +24,17 @@ import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService.Client;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Abstract class for interpreter process */
+/**
+ * Abstract class for interpreter process
+ */
 public abstract class RemoteInterpreterProcess implements InterpreterClient {
   private static final Logger logger = LoggerFactory.getLogger(RemoteInterpreterProcess.class);
 
   private GenericObjectPool<Client> clientPool;
   private int connectTimeout;
 
-  public RemoteInterpreterProcess(int connectTimeout) {
+  public RemoteInterpreterProcess(
+      int connectTimeout) {
     this.connectTimeout = connectTimeout;
   }
 
@@ -71,8 +74,8 @@ public abstract class RemoteInterpreterProcess implements InterpreterClient {
   }
 
   /**
-   * Called when angular object is updated in client side to propagate change to the remote process
-   *
+   * Called when angular object is updated in client side to propagate
+   * change to the remote process
    * @param name
    * @param o
    */
@@ -82,10 +85,8 @@ public abstract class RemoteInterpreterProcess implements InterpreterClient {
       client = getClient();
     } catch (NullPointerException e) {
       // remote process not started
-      logger.info(
-          "NullPointerException in RemoteInterpreterProcess while "
-              + "updateRemoteAngularObject getClient, remote process not started",
-          e);
+      logger.info("NullPointerException in RemoteInterpreterProcess while " +
+          "updateRemoteAngularObject getClient, remote process not started", e);
       return;
     } catch (Exception e) {
       logger.error("Can't update angular object", e);
@@ -129,7 +130,10 @@ public abstract class RemoteInterpreterProcess implements InterpreterClient {
     return null;
   }
 
-  /** @param <T> */
+  /**
+   *
+   * @param <T>
+   */
   public interface RemoteFunction<T> {
     T call(Client client) throws Exception;
   }


[27/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputAppendEvent.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputAppendEvent.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputAppendEvent.java
index bbbdb94..ec175e0 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputAppendEvent.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputAppendEvent.java
@@ -1,72 +1,67 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2018-8-9")
-public class OutputAppendEvent
-    implements org.apache.thrift.TBase<OutputAppendEvent, OutputAppendEvent._Fields>,
-        java.io.Serializable,
-        Cloneable,
-        Comparable<OutputAppendEvent> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
-      new org.apache.thrift.protocol.TStruct("OutputAppendEvent");
-
-  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "noteId", org.apache.thrift.protocol.TType.STRING, (short) 1);
-  private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "paragraphId", org.apache.thrift.protocol.TType.STRING, (short) 2);
-  private static final org.apache.thrift.protocol.TField INDEX_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "index", org.apache.thrift.protocol.TType.I32, (short) 3);
-  private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "data", org.apache.thrift.protocol.TType.STRING, (short) 4);
-  private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "appId", org.apache.thrift.protocol.TType.STRING, (short) 5);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
-      new HashMap<Class<? extends IScheme>, SchemeFactory>();
+public class OutputAppendEvent implements org.apache.thrift.TBase<OutputAppendEvent, OutputAppendEvent._Fields>, java.io.Serializable, Cloneable, Comparable<OutputAppendEvent> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OutputAppendEvent");
 
+  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("noteId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("paragraphId", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("index", org.apache.thrift.protocol.TType.I32, (short)3);
+  private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("appId", org.apache.thrift.protocol.TType.STRING, (short)5);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
     schemes.put(StandardScheme.class, new OutputAppendEventStandardSchemeFactory());
     schemes.put(TupleScheme.class, new OutputAppendEventTupleSchemeFactory());
@@ -78,16 +73,13 @@ public class OutputAppendEvent
   public String data; // required
   public String appId; // required
 
-  /**
-   * The set of fields this struct contains, along with convenience methods for finding and
-   * manipulating them.
-   */
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    NOTE_ID((short) 1, "noteId"),
-    PARAGRAPH_ID((short) 2, "paragraphId"),
-    INDEX((short) 3, "index"),
-    DATA((short) 4, "data"),
-    APP_ID((short) 5, "appId");
+    NOTE_ID((short)1, "noteId"),
+    PARAGRAPH_ID((short)2, "paragraphId"),
+    INDEX((short)3, "index"),
+    DATA((short)4, "data"),
+    APP_ID((short)5, "appId");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -97,9 +89,11 @@ public class OutputAppendEvent
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
     public static _Fields findByThriftId(int fieldId) {
-      switch (fieldId) {
+      switch(fieldId) {
         case 1: // NOTE_ID
           return NOTE_ID;
         case 2: // PARAGRAPH_ID
@@ -115,15 +109,19 @@ public class OutputAppendEvent
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null)
-        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
 
-    /** Find the _Fields constant that matches name, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
@@ -149,54 +147,32 @@ public class OutputAppendEvent
   private static final int __INDEX_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
-        new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(
-        _Fields.NOTE_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "noteId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.PARAGRAPH_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "paragraphId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.INDEX,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "index",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.I32)));
-    tmpMap.put(
-        _Fields.DATA,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "data",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.APP_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "appId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.NOTE_ID, new org.apache.thrift.meta_data.FieldMetaData("noteId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PARAGRAPH_ID, new org.apache.thrift.meta_data.FieldMetaData("paragraphId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.INDEX, new org.apache.thrift.meta_data.FieldMetaData("index", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.APP_ID, new org.apache.thrift.meta_data.FieldMetaData("appId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
-        OutputAppendEvent.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OutputAppendEvent.class, metaDataMap);
   }
 
-  public OutputAppendEvent() {}
+  public OutputAppendEvent() {
+  }
 
   public OutputAppendEvent(
-      String noteId, String paragraphId, int index, String data, String appId) {
+    String noteId,
+    String paragraphId,
+    int index,
+    String data,
+    String appId)
+  {
     this();
     this.noteId = noteId;
     this.paragraphId = paragraphId;
@@ -206,7 +182,9 @@ public class OutputAppendEvent
     this.appId = appId;
   }
 
-  /** Performs a deep copy on <i>other</i>. */
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
   public OutputAppendEvent(OutputAppendEvent other) {
     __isset_bitfield = other.__isset_bitfield;
     if (other.isSetNoteId()) {
@@ -359,135 +337,147 @@ public class OutputAppendEvent
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-      case NOTE_ID:
-        if (value == null) {
-          unsetNoteId();
-        } else {
-          setNoteId((String) value);
-        }
-        break;
+    case NOTE_ID:
+      if (value == null) {
+        unsetNoteId();
+      } else {
+        setNoteId((String)value);
+      }
+      break;
 
-      case PARAGRAPH_ID:
-        if (value == null) {
-          unsetParagraphId();
-        } else {
-          setParagraphId((String) value);
-        }
-        break;
+    case PARAGRAPH_ID:
+      if (value == null) {
+        unsetParagraphId();
+      } else {
+        setParagraphId((String)value);
+      }
+      break;
 
-      case INDEX:
-        if (value == null) {
-          unsetIndex();
-        } else {
-          setIndex((Integer) value);
-        }
-        break;
+    case INDEX:
+      if (value == null) {
+        unsetIndex();
+      } else {
+        setIndex((Integer)value);
+      }
+      break;
 
-      case DATA:
-        if (value == null) {
-          unsetData();
-        } else {
-          setData((String) value);
-        }
-        break;
+    case DATA:
+      if (value == null) {
+        unsetData();
+      } else {
+        setData((String)value);
+      }
+      break;
+
+    case APP_ID:
+      if (value == null) {
+        unsetAppId();
+      } else {
+        setAppId((String)value);
+      }
+      break;
 
-      case APP_ID:
-        if (value == null) {
-          unsetAppId();
-        } else {
-          setAppId((String) value);
-        }
-        break;
     }
   }
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-      case NOTE_ID:
-        return getNoteId();
+    case NOTE_ID:
+      return getNoteId();
 
-      case PARAGRAPH_ID:
-        return getParagraphId();
+    case PARAGRAPH_ID:
+      return getParagraphId();
 
-      case INDEX:
-        return Integer.valueOf(getIndex());
+    case INDEX:
+      return Integer.valueOf(getIndex());
 
-      case DATA:
-        return getData();
+    case DATA:
+      return getData();
+
+    case APP_ID:
+      return getAppId();
 
-      case APP_ID:
-        return getAppId();
     }
     throw new IllegalStateException();
   }
 
-  /**
-   * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
-   * otherwise
-   */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
     }
 
     switch (field) {
-      case NOTE_ID:
-        return isSetNoteId();
-      case PARAGRAPH_ID:
-        return isSetParagraphId();
-      case INDEX:
-        return isSetIndex();
-      case DATA:
-        return isSetData();
-      case APP_ID:
-        return isSetAppId();
+    case NOTE_ID:
+      return isSetNoteId();
+    case PARAGRAPH_ID:
+      return isSetParagraphId();
+    case INDEX:
+      return isSetIndex();
+    case DATA:
+      return isSetData();
+    case APP_ID:
+      return isSetAppId();
     }
     throw new IllegalStateException();
   }
 
   @Override
   public boolean equals(Object that) {
-    if (that == null) return false;
-    if (that instanceof OutputAppendEvent) return this.equals((OutputAppendEvent) that);
+    if (that == null)
+      return false;
+    if (that instanceof OutputAppendEvent)
+      return this.equals((OutputAppendEvent)that);
     return false;
   }
 
   public boolean equals(OutputAppendEvent that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
 
     boolean this_present_noteId = true && this.isSetNoteId();
     boolean that_present_noteId = true && that.isSetNoteId();
     if (this_present_noteId || that_present_noteId) {
-      if (!(this_present_noteId && that_present_noteId)) return false;
-      if (!this.noteId.equals(that.noteId)) return false;
+      if (!(this_present_noteId && that_present_noteId))
+        return false;
+      if (!this.noteId.equals(that.noteId))
+        return false;
     }
 
     boolean this_present_paragraphId = true && this.isSetParagraphId();
     boolean that_present_paragraphId = true && that.isSetParagraphId();
     if (this_present_paragraphId || that_present_paragraphId) {
-      if (!(this_present_paragraphId && that_present_paragraphId)) return false;
-      if (!this.paragraphId.equals(that.paragraphId)) return false;
+      if (!(this_present_paragraphId && that_present_paragraphId))
+        return false;
+      if (!this.paragraphId.equals(that.paragraphId))
+        return false;
     }
 
     boolean this_present_index = true;
     boolean that_present_index = true;
     if (this_present_index || that_present_index) {
-      if (!(this_present_index && that_present_index)) return false;
-      if (this.index != that.index) return false;
+      if (!(this_present_index && that_present_index))
+        return false;
+      if (this.index != that.index)
+        return false;
     }
 
     boolean this_present_data = true && this.isSetData();
     boolean that_present_data = true && that.isSetData();
     if (this_present_data || that_present_data) {
-      if (!(this_present_data && that_present_data)) return false;
-      if (!this.data.equals(that.data)) return false;
+      if (!(this_present_data && that_present_data))
+        return false;
+      if (!this.data.equals(that.data))
+        return false;
     }
 
     boolean this_present_appId = true && this.isSetAppId();
     boolean that_present_appId = true && that.isSetAppId();
     if (this_present_appId || that_present_appId) {
-      if (!(this_present_appId && that_present_appId)) return false;
-      if (!this.appId.equals(that.appId)) return false;
+      if (!(this_present_appId && that_present_appId))
+        return false;
+      if (!this.appId.equals(that.appId))
+        return false;
     }
 
     return true;
@@ -499,23 +489,28 @@ public class OutputAppendEvent
 
     boolean present_noteId = true && (isSetNoteId());
     list.add(present_noteId);
-    if (present_noteId) list.add(noteId);
+    if (present_noteId)
+      list.add(noteId);
 
     boolean present_paragraphId = true && (isSetParagraphId());
     list.add(present_paragraphId);
-    if (present_paragraphId) list.add(paragraphId);
+    if (present_paragraphId)
+      list.add(paragraphId);
 
     boolean present_index = true;
     list.add(present_index);
-    if (present_index) list.add(index);
+    if (present_index)
+      list.add(index);
 
     boolean present_data = true && (isSetData());
     list.add(present_data);
-    if (present_data) list.add(data);
+    if (present_data)
+      list.add(data);
 
     boolean present_appId = true && (isSetAppId());
     list.add(present_appId);
-    if (present_appId) list.add(appId);
+    if (present_appId)
+      list.add(appId);
 
     return list.hashCode();
   }
@@ -589,8 +584,7 @@ public class OutputAppendEvent
     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
-  public void write(org.apache.thrift.protocol.TProtocol oprot)
-      throws org.apache.thrift.TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
@@ -645,23 +639,17 @@ public class OutputAppendEvent
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
     try {
-      write(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(out)));
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in)
-      throws java.io.IOException, ClassNotFoundException {
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
-      // it doesn't seem like you should have to do this, but java serialization is wacky, and
-      // doesn't call the default constructor.
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
       __isset_bitfield = 0;
-      read(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(in)));
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
@@ -675,13 +663,13 @@ public class OutputAppendEvent
 
   private static class OutputAppendEventStandardScheme extends StandardScheme<OutputAppendEvent> {
 
-    public void read(org.apache.thrift.protocol.TProtocol iprot, OutputAppendEvent struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol iprot, OutputAppendEvent struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
       iprot.readStructBegin();
-      while (true) {
+      while (true)
+      {
         schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
           break;
         }
         switch (schemeField.id) {
@@ -689,7 +677,7 @@ public class OutputAppendEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.noteId = iprot.readString();
               struct.setNoteIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -697,7 +685,7 @@ public class OutputAppendEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.paragraphId = iprot.readString();
               struct.setParagraphIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -705,7 +693,7 @@ public class OutputAppendEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
               struct.index = iprot.readI32();
               struct.setIndexIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -713,7 +701,7 @@ public class OutputAppendEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.data = iprot.readString();
               struct.setDataIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -721,7 +709,7 @@ public class OutputAppendEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.appId = iprot.readString();
               struct.setAppIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -736,8 +724,7 @@ public class OutputAppendEvent
       struct.validate();
     }
 
-    public void write(org.apache.thrift.protocol.TProtocol oprot, OutputAppendEvent struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol oprot, OutputAppendEvent struct) throws org.apache.thrift.TException {
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
@@ -767,6 +754,7 @@ public class OutputAppendEvent
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
+
   }
 
   private static class OutputAppendEventTupleSchemeFactory implements SchemeFactory {
@@ -778,8 +766,7 @@ public class OutputAppendEvent
   private static class OutputAppendEventTupleScheme extends TupleScheme<OutputAppendEvent> {
 
     @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, OutputAppendEvent struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol prot, OutputAppendEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
       if (struct.isSetNoteId()) {
@@ -816,8 +803,7 @@ public class OutputAppendEvent
     }
 
     @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, OutputAppendEvent struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol prot, OutputAppendEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(5);
       if (incoming.get(0)) {
@@ -842,4 +828,6 @@ public class OutputAppendEvent
       }
     }
   }
+
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateAllEvent.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateAllEvent.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateAllEvent.java
index c7cbfd2..9ee8858 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateAllEvent.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateAllEvent.java
@@ -1,65 +1,65 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2018-8-9")
-public class OutputUpdateAllEvent
-    implements org.apache.thrift.TBase<OutputUpdateAllEvent, OutputUpdateAllEvent._Fields>,
-        java.io.Serializable,
-        Cloneable,
-        Comparable<OutputUpdateAllEvent> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
-      new org.apache.thrift.protocol.TStruct("OutputUpdateAllEvent");
-
-  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "noteId", org.apache.thrift.protocol.TType.STRING, (short) 1);
-  private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "paragraphId", org.apache.thrift.protocol.TType.STRING, (short) 2);
-  private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "msg", org.apache.thrift.protocol.TType.LIST, (short) 3);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
-      new HashMap<Class<? extends IScheme>, SchemeFactory>();
+public class OutputUpdateAllEvent implements org.apache.thrift.TBase<OutputUpdateAllEvent, OutputUpdateAllEvent._Fields>, java.io.Serializable, Cloneable, Comparable<OutputUpdateAllEvent> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OutputUpdateAllEvent");
 
+  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("noteId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("paragraphId", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.LIST, (short)3);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
     schemes.put(StandardScheme.class, new OutputUpdateAllEventStandardSchemeFactory());
     schemes.put(TupleScheme.class, new OutputUpdateAllEventTupleSchemeFactory());
@@ -67,17 +67,13 @@ public class OutputUpdateAllEvent
 
   public String noteId; // required
   public String paragraphId; // required
-  public List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>
-      msg; // required
+  public List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> msg; // required
 
-  /**
-   * The set of fields this struct contains, along with convenience methods for finding and
-   * manipulating them.
-   */
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    NOTE_ID((short) 1, "noteId"),
-    PARAGRAPH_ID((short) 2, "paragraphId"),
-    MSG((short) 3, "msg");
+    NOTE_ID((short)1, "noteId"),
+    PARAGRAPH_ID((short)2, "paragraphId"),
+    MSG((short)3, "msg");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -87,9 +83,11 @@ public class OutputUpdateAllEvent
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
     public static _Fields findByThriftId(int fieldId) {
-      switch (fieldId) {
+      switch(fieldId) {
         case 1: // NOTE_ID
           return NOTE_ID;
         case 2: // PARAGRAPH_ID
@@ -101,15 +99,19 @@ public class OutputUpdateAllEvent
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null)
-        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
 
-    /** Find the _Fields constant that matches name, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
@@ -133,52 +135,36 @@ public class OutputUpdateAllEvent
 
   // isset id assignments
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
-        new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(
-        _Fields.NOTE_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "noteId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.PARAGRAPH_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "paragraphId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.MSG,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "msg",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.ListMetaData(
-                org.apache.thrift.protocol.TType.LIST,
-                new org.apache.thrift.meta_data.StructMetaData(
-                    org.apache.thrift.protocol.TType.STRUCT,
-                    org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage.class))));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.NOTE_ID, new org.apache.thrift.meta_data.FieldMetaData("noteId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PARAGRAPH_ID, new org.apache.thrift.meta_data.FieldMetaData("paragraphId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage.class))));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
-        OutputUpdateAllEvent.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OutputUpdateAllEvent.class, metaDataMap);
   }
 
-  public OutputUpdateAllEvent() {}
+  public OutputUpdateAllEvent() {
+  }
 
   public OutputUpdateAllEvent(
-      String noteId,
-      String paragraphId,
-      List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> msg) {
+    String noteId,
+    String paragraphId,
+    List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> msg)
+  {
     this();
     this.noteId = noteId;
     this.paragraphId = paragraphId;
     this.msg = msg;
   }
 
-  /** Performs a deep copy on <i>other</i>. */
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
   public OutputUpdateAllEvent(OutputUpdateAllEvent other) {
     if (other.isSetNoteId()) {
       this.noteId = other.noteId;
@@ -187,14 +173,9 @@ public class OutputUpdateAllEvent
       this.paragraphId = other.paragraphId;
     }
     if (other.isSetMsg()) {
-      List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> __this__msg =
-          new ArrayList<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>(
-              other.msg.size());
-      for (org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage other_element :
-          other.msg) {
-        __this__msg.add(
-            new org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage(
-                other_element));
+      List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> __this__msg = new ArrayList<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>(other.msg.size());
+      for (org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage other_element : other.msg) {
+        __this__msg.add(new org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage(other_element));
       }
       this.msg = __this__msg;
     }
@@ -263,15 +244,13 @@ public class OutputUpdateAllEvent
     return (this.msg == null) ? 0 : this.msg.size();
   }
 
-  public java.util.Iterator<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>
-      getMsgIterator() {
+  public java.util.Iterator<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> getMsgIterator() {
     return (this.msg == null) ? null : this.msg.iterator();
   }
 
   public void addToMsg(org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage elem) {
     if (this.msg == null) {
-      this.msg =
-          new ArrayList<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>();
+      this.msg = new ArrayList<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>();
     }
     this.msg.add(elem);
   }
@@ -280,8 +259,7 @@ public class OutputUpdateAllEvent
     return this.msg;
   }
 
-  public OutputUpdateAllEvent setMsg(
-      List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> msg) {
+  public OutputUpdateAllEvent setMsg(List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> msg) {
     this.msg = msg;
     return this;
   }
@@ -303,96 +281,103 @@ public class OutputUpdateAllEvent
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-      case NOTE_ID:
-        if (value == null) {
-          unsetNoteId();
-        } else {
-          setNoteId((String) value);
-        }
-        break;
+    case NOTE_ID:
+      if (value == null) {
+        unsetNoteId();
+      } else {
+        setNoteId((String)value);
+      }
+      break;
+
+    case PARAGRAPH_ID:
+      if (value == null) {
+        unsetParagraphId();
+      } else {
+        setParagraphId((String)value);
+      }
+      break;
+
+    case MSG:
+      if (value == null) {
+        unsetMsg();
+      } else {
+        setMsg((List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>)value);
+      }
+      break;
 
-      case PARAGRAPH_ID:
-        if (value == null) {
-          unsetParagraphId();
-        } else {
-          setParagraphId((String) value);
-        }
-        break;
-
-      case MSG:
-        if (value == null) {
-          unsetMsg();
-        } else {
-          setMsg(
-              (List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>) value);
-        }
-        break;
     }
   }
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-      case NOTE_ID:
-        return getNoteId();
+    case NOTE_ID:
+      return getNoteId();
+
+    case PARAGRAPH_ID:
+      return getParagraphId();
 
-      case PARAGRAPH_ID:
-        return getParagraphId();
+    case MSG:
+      return getMsg();
 
-      case MSG:
-        return getMsg();
     }
     throw new IllegalStateException();
   }
 
-  /**
-   * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
-   * otherwise
-   */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
     }
 
     switch (field) {
-      case NOTE_ID:
-        return isSetNoteId();
-      case PARAGRAPH_ID:
-        return isSetParagraphId();
-      case MSG:
-        return isSetMsg();
+    case NOTE_ID:
+      return isSetNoteId();
+    case PARAGRAPH_ID:
+      return isSetParagraphId();
+    case MSG:
+      return isSetMsg();
     }
     throw new IllegalStateException();
   }
 
   @Override
   public boolean equals(Object that) {
-    if (that == null) return false;
-    if (that instanceof OutputUpdateAllEvent) return this.equals((OutputUpdateAllEvent) that);
+    if (that == null)
+      return false;
+    if (that instanceof OutputUpdateAllEvent)
+      return this.equals((OutputUpdateAllEvent)that);
     return false;
   }
 
   public boolean equals(OutputUpdateAllEvent that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
 
     boolean this_present_noteId = true && this.isSetNoteId();
     boolean that_present_noteId = true && that.isSetNoteId();
     if (this_present_noteId || that_present_noteId) {
-      if (!(this_present_noteId && that_present_noteId)) return false;
-      if (!this.noteId.equals(that.noteId)) return false;
+      if (!(this_present_noteId && that_present_noteId))
+        return false;
+      if (!this.noteId.equals(that.noteId))
+        return false;
     }
 
     boolean this_present_paragraphId = true && this.isSetParagraphId();
     boolean that_present_paragraphId = true && that.isSetParagraphId();
     if (this_present_paragraphId || that_present_paragraphId) {
-      if (!(this_present_paragraphId && that_present_paragraphId)) return false;
-      if (!this.paragraphId.equals(that.paragraphId)) return false;
+      if (!(this_present_paragraphId && that_present_paragraphId))
+        return false;
+      if (!this.paragraphId.equals(that.paragraphId))
+        return false;
     }
 
     boolean this_present_msg = true && this.isSetMsg();
     boolean that_present_msg = true && that.isSetMsg();
     if (this_present_msg || that_present_msg) {
-      if (!(this_present_msg && that_present_msg)) return false;
-      if (!this.msg.equals(that.msg)) return false;
+      if (!(this_present_msg && that_present_msg))
+        return false;
+      if (!this.msg.equals(that.msg))
+        return false;
     }
 
     return true;
@@ -404,15 +389,18 @@ public class OutputUpdateAllEvent
 
     boolean present_noteId = true && (isSetNoteId());
     list.add(present_noteId);
-    if (present_noteId) list.add(noteId);
+    if (present_noteId)
+      list.add(noteId);
 
     boolean present_paragraphId = true && (isSetParagraphId());
     list.add(present_paragraphId);
-    if (present_paragraphId) list.add(paragraphId);
+    if (present_paragraphId)
+      list.add(paragraphId);
 
     boolean present_msg = true && (isSetMsg());
     list.add(present_msg);
-    if (present_msg) list.add(msg);
+    if (present_msg)
+      list.add(msg);
 
     return list.hashCode();
   }
@@ -466,8 +454,7 @@ public class OutputUpdateAllEvent
     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
-  public void write(org.apache.thrift.protocol.TProtocol oprot)
-      throws org.apache.thrift.TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
@@ -510,20 +497,15 @@ public class OutputUpdateAllEvent
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
     try {
-      write(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(out)));
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in)
-      throws java.io.IOException, ClassNotFoundException {
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
-      read(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(in)));
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
@@ -535,16 +517,15 @@ public class OutputUpdateAllEvent
     }
   }
 
-  private static class OutputUpdateAllEventStandardScheme
-      extends StandardScheme<OutputUpdateAllEvent> {
+  private static class OutputUpdateAllEventStandardScheme extends StandardScheme<OutputUpdateAllEvent> {
 
-    public void read(org.apache.thrift.protocol.TProtocol iprot, OutputUpdateAllEvent struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol iprot, OutputUpdateAllEvent struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
       iprot.readStructBegin();
-      while (true) {
+      while (true)
+      {
         schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
           break;
         }
         switch (schemeField.id) {
@@ -552,7 +533,7 @@ public class OutputUpdateAllEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.noteId = iprot.readString();
               struct.setNoteIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -560,7 +541,7 @@ public class OutputUpdateAllEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.paragraphId = iprot.readString();
               struct.setParagraphIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -568,21 +549,18 @@ public class OutputUpdateAllEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
                 org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
-                struct.msg =
-                    new ArrayList<
-                        org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>(
-                        _list0.size);
+                struct.msg = new ArrayList<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>(_list0.size);
                 org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage _elem1;
-                for (int _i2 = 0; _i2 < _list0.size; ++_i2) {
-                  _elem1 =
-                      new org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage();
+                for (int _i2 = 0; _i2 < _list0.size; ++_i2)
+                {
+                  _elem1 = new org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage();
                   _elem1.read(iprot);
                   struct.msg.add(_elem1);
                 }
                 iprot.readListEnd();
               }
               struct.setMsgIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -597,8 +575,7 @@ public class OutputUpdateAllEvent
       struct.validate();
     }
 
-    public void write(org.apache.thrift.protocol.TProtocol oprot, OutputUpdateAllEvent struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol oprot, OutputUpdateAllEvent struct) throws org.apache.thrift.TException {
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
@@ -615,11 +592,9 @@ public class OutputUpdateAllEvent
       if (struct.msg != null) {
         oprot.writeFieldBegin(MSG_FIELD_DESC);
         {
-          oprot.writeListBegin(
-              new org.apache.thrift.protocol.TList(
-                  org.apache.thrift.protocol.TType.STRUCT, struct.msg.size()));
-          for (org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage _iter3 :
-              struct.msg) {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.msg.size()));
+          for (org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage _iter3 : struct.msg)
+          {
             _iter3.write(oprot);
           }
           oprot.writeListEnd();
@@ -629,6 +604,7 @@ public class OutputUpdateAllEvent
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
+
   }
 
   private static class OutputUpdateAllEventTupleSchemeFactory implements SchemeFactory {
@@ -640,8 +616,7 @@ public class OutputUpdateAllEvent
   private static class OutputUpdateAllEventTupleScheme extends TupleScheme<OutputUpdateAllEvent> {
 
     @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, OutputUpdateAllEvent struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol prot, OutputUpdateAllEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
       if (struct.isSetNoteId()) {
@@ -663,8 +638,8 @@ public class OutputUpdateAllEvent
       if (struct.isSetMsg()) {
         {
           oprot.writeI32(struct.msg.size());
-          for (org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage _iter4 :
-              struct.msg) {
+          for (org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage _iter4 : struct.msg)
+          {
             _iter4.write(oprot);
           }
         }
@@ -672,8 +647,7 @@ public class OutputUpdateAllEvent
     }
 
     @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, OutputUpdateAllEvent struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol prot, OutputUpdateAllEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(3);
       if (incoming.get(0)) {
@@ -686,14 +660,11 @@ public class OutputUpdateAllEvent
       }
       if (incoming.get(2)) {
         {
-          org.apache.thrift.protocol.TList _list5 =
-              new org.apache.thrift.protocol.TList(
-                  org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.msg =
-              new ArrayList<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>(
-                  _list5.size);
+          org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.msg = new ArrayList<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>(_list5.size);
           org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage _elem6;
-          for (int _i7 = 0; _i7 < _list5.size; ++_i7) {
+          for (int _i7 = 0; _i7 < _list5.size; ++_i7)
+          {
             _elem6 = new org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage();
             _elem6.read(iprot);
             struct.msg.add(_elem6);
@@ -703,4 +674,6 @@ public class OutputUpdateAllEvent
       }
     }
   }
+
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateEvent.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateEvent.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateEvent.java
index f021d8f..1cf328c 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateEvent.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateEvent.java
@@ -1,75 +1,68 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2018-8-9")
-public class OutputUpdateEvent
-    implements org.apache.thrift.TBase<OutputUpdateEvent, OutputUpdateEvent._Fields>,
-        java.io.Serializable,
-        Cloneable,
-        Comparable<OutputUpdateEvent> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
-      new org.apache.thrift.protocol.TStruct("OutputUpdateEvent");
-
-  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "noteId", org.apache.thrift.protocol.TType.STRING, (short) 1);
-  private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "paragraphId", org.apache.thrift.protocol.TType.STRING, (short) 2);
-  private static final org.apache.thrift.protocol.TField INDEX_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "index", org.apache.thrift.protocol.TType.I32, (short) 3);
-  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "type", org.apache.thrift.protocol.TType.STRING, (short) 4);
-  private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "data", org.apache.thrift.protocol.TType.STRING, (short) 5);
-  private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "appId", org.apache.thrift.protocol.TType.STRING, (short) 6);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
-      new HashMap<Class<? extends IScheme>, SchemeFactory>();
+public class OutputUpdateEvent implements org.apache.thrift.TBase<OutputUpdateEvent, OutputUpdateEvent._Fields>, java.io.Serializable, Cloneable, Comparable<OutputUpdateEvent> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OutputUpdateEvent");
+
+  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("noteId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("paragraphId", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("index", org.apache.thrift.protocol.TType.I32, (short)3);
+  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)5);
+  private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("appId", org.apache.thrift.protocol.TType.STRING, (short)6);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
     schemes.put(StandardScheme.class, new OutputUpdateEventStandardSchemeFactory());
     schemes.put(TupleScheme.class, new OutputUpdateEventTupleSchemeFactory());
@@ -82,17 +75,14 @@ public class OutputUpdateEvent
   public String data; // required
   public String appId; // required
 
-  /**
-   * The set of fields this struct contains, along with convenience methods for finding and
-   * manipulating them.
-   */
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    NOTE_ID((short) 1, "noteId"),
-    PARAGRAPH_ID((short) 2, "paragraphId"),
-    INDEX((short) 3, "index"),
-    TYPE((short) 4, "type"),
-    DATA((short) 5, "data"),
-    APP_ID((short) 6, "appId");
+    NOTE_ID((short)1, "noteId"),
+    PARAGRAPH_ID((short)2, "paragraphId"),
+    INDEX((short)3, "index"),
+    TYPE((short)4, "type"),
+    DATA((short)5, "data"),
+    APP_ID((short)6, "appId");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -102,9 +92,11 @@ public class OutputUpdateEvent
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
     public static _Fields findByThriftId(int fieldId) {
-      switch (fieldId) {
+      switch(fieldId) {
         case 1: // NOTE_ID
           return NOTE_ID;
         case 2: // PARAGRAPH_ID
@@ -122,15 +114,19 @@ public class OutputUpdateEvent
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null)
-        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
 
-    /** Find the _Fields constant that matches name, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
@@ -156,61 +152,35 @@ public class OutputUpdateEvent
   private static final int __INDEX_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
-        new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(
-        _Fields.NOTE_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "noteId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.PARAGRAPH_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "paragraphId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.INDEX,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "index",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.I32)));
-    tmpMap.put(
-        _Fields.TYPE,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "type",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.DATA,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "data",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.APP_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "appId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.NOTE_ID, new org.apache.thrift.meta_data.FieldMetaData("noteId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PARAGRAPH_ID, new org.apache.thrift.meta_data.FieldMetaData("paragraphId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.INDEX, new org.apache.thrift.meta_data.FieldMetaData("index", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.APP_ID, new org.apache.thrift.meta_data.FieldMetaData("appId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
-        OutputUpdateEvent.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OutputUpdateEvent.class, metaDataMap);
   }
 
-  public OutputUpdateEvent() {}
+  public OutputUpdateEvent() {
+  }
 
   public OutputUpdateEvent(
-      String noteId, String paragraphId, int index, String type, String data, String appId) {
+    String noteId,
+    String paragraphId,
+    int index,
+    String type,
+    String data,
+    String appId)
+  {
     this();
     this.noteId = noteId;
     this.paragraphId = paragraphId;
@@ -221,7 +191,9 @@ public class OutputUpdateEvent
     this.appId = appId;
   }
 
-  /** Performs a deep copy on <i>other</i>. */
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
   public OutputUpdateEvent(OutputUpdateEvent other) {
     __isset_bitfield = other.__isset_bitfield;
     if (other.isSetNoteId()) {
@@ -402,155 +374,169 @@ public class OutputUpdateEvent
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-      case NOTE_ID:
-        if (value == null) {
-          unsetNoteId();
-        } else {
-          setNoteId((String) value);
-        }
-        break;
+    case NOTE_ID:
+      if (value == null) {
+        unsetNoteId();
+      } else {
+        setNoteId((String)value);
+      }
+      break;
 
-      case PARAGRAPH_ID:
-        if (value == null) {
-          unsetParagraphId();
-        } else {
-          setParagraphId((String) value);
-        }
-        break;
+    case PARAGRAPH_ID:
+      if (value == null) {
+        unsetParagraphId();
+      } else {
+        setParagraphId((String)value);
+      }
+      break;
 
-      case INDEX:
-        if (value == null) {
-          unsetIndex();
-        } else {
-          setIndex((Integer) value);
-        }
-        break;
+    case INDEX:
+      if (value == null) {
+        unsetIndex();
+      } else {
+        setIndex((Integer)value);
+      }
+      break;
 
-      case TYPE:
-        if (value == null) {
-          unsetType();
-        } else {
-          setType((String) value);
-        }
-        break;
+    case TYPE:
+      if (value == null) {
+        unsetType();
+      } else {
+        setType((String)value);
+      }
+      break;
 
-      case DATA:
-        if (value == null) {
-          unsetData();
-        } else {
-          setData((String) value);
-        }
-        break;
+    case DATA:
+      if (value == null) {
+        unsetData();
+      } else {
+        setData((String)value);
+      }
+      break;
+
+    case APP_ID:
+      if (value == null) {
+        unsetAppId();
+      } else {
+        setAppId((String)value);
+      }
+      break;
 
-      case APP_ID:
-        if (value == null) {
-          unsetAppId();
-        } else {
-          setAppId((String) value);
-        }
-        break;
     }
   }
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-      case NOTE_ID:
-        return getNoteId();
+    case NOTE_ID:
+      return getNoteId();
 
-      case PARAGRAPH_ID:
-        return getParagraphId();
+    case PARAGRAPH_ID:
+      return getParagraphId();
 
-      case INDEX:
-        return Integer.valueOf(getIndex());
+    case INDEX:
+      return Integer.valueOf(getIndex());
 
-      case TYPE:
-        return getType();
+    case TYPE:
+      return getType();
 
-      case DATA:
-        return getData();
+    case DATA:
+      return getData();
+
+    case APP_ID:
+      return getAppId();
 
-      case APP_ID:
-        return getAppId();
     }
     throw new IllegalStateException();
   }
 
-  /**
-   * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
-   * otherwise
-   */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
     }
 
     switch (field) {
-      case NOTE_ID:
-        return isSetNoteId();
-      case PARAGRAPH_ID:
-        return isSetParagraphId();
-      case INDEX:
-        return isSetIndex();
-      case TYPE:
-        return isSetType();
-      case DATA:
-        return isSetData();
-      case APP_ID:
-        return isSetAppId();
+    case NOTE_ID:
+      return isSetNoteId();
+    case PARAGRAPH_ID:
+      return isSetParagraphId();
+    case INDEX:
+      return isSetIndex();
+    case TYPE:
+      return isSetType();
+    case DATA:
+      return isSetData();
+    case APP_ID:
+      return isSetAppId();
     }
     throw new IllegalStateException();
   }
 
   @Override
   public boolean equals(Object that) {
-    if (that == null) return false;
-    if (that instanceof OutputUpdateEvent) return this.equals((OutputUpdateEvent) that);
+    if (that == null)
+      return false;
+    if (that instanceof OutputUpdateEvent)
+      return this.equals((OutputUpdateEvent)that);
     return false;
   }
 
   public boolean equals(OutputUpdateEvent that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
 
     boolean this_present_noteId = true && this.isSetNoteId();
     boolean that_present_noteId = true && that.isSetNoteId();
     if (this_present_noteId || that_present_noteId) {
-      if (!(this_present_noteId && that_present_noteId)) return false;
-      if (!this.noteId.equals(that.noteId)) return false;
+      if (!(this_present_noteId && that_present_noteId))
+        return false;
+      if (!this.noteId.equals(that.noteId))
+        return false;
     }
 
     boolean this_present_paragraphId = true && this.isSetParagraphId();
     boolean that_present_paragraphId = true && that.isSetParagraphId();
     if (this_present_paragraphId || that_present_paragraphId) {
-      if (!(this_present_paragraphId && that_present_paragraphId)) return false;
-      if (!this.paragraphId.equals(that.paragraphId)) return false;
+      if (!(this_present_paragraphId && that_present_paragraphId))
+        return false;
+      if (!this.paragraphId.equals(that.paragraphId))
+        return false;
     }
 
     boolean this_present_index = true;
     boolean that_present_index = true;
     if (this_present_index || that_present_index) {
-      if (!(this_present_index && that_present_index)) return false;
-      if (this.index != that.index) return false;
+      if (!(this_present_index && that_present_index))
+        return false;
+      if (this.index != that.index)
+        return false;
     }
 
     boolean this_present_type = true && this.isSetType();
     boolean that_present_type = true && that.isSetType();
     if (this_present_type || that_present_type) {
-      if (!(this_present_type && that_present_type)) return false;
-      if (!this.type.equals(that.type)) return false;
+      if (!(this_present_type && that_present_type))
+        return false;
+      if (!this.type.equals(that.type))
+        return false;
     }
 
     boolean this_present_data = true && this.isSetData();
     boolean that_present_data = true && that.isSetData();
     if (this_present_data || that_present_data) {
-      if (!(this_present_data && that_present_data)) return false;
-      if (!this.data.equals(that.data)) return false;
+      if (!(this_present_data && that_present_data))
+        return false;
+      if (!this.data.equals(that.data))
+        return false;
     }
 
     boolean this_present_appId = true && this.isSetAppId();
     boolean that_present_appId = true && that.isSetAppId();
     if (this_present_appId || that_present_appId) {
-      if (!(this_present_appId && that_present_appId)) return false;
-      if (!this.appId.equals(that.appId)) return false;
+      if (!(this_present_appId && that_present_appId))
+        return false;
+      if (!this.appId.equals(that.appId))
+        return false;
     }
 
     return true;
@@ -562,27 +548,33 @@ public class OutputUpdateEvent
 
     boolean present_noteId = true && (isSetNoteId());
     list.add(present_noteId);
-    if (present_noteId) list.add(noteId);
+    if (present_noteId)
+      list.add(noteId);
 
     boolean present_paragraphId = true && (isSetParagraphId());
     list.add(present_paragraphId);
-    if (present_paragraphId) list.add(paragraphId);
+    if (present_paragraphId)
+      list.add(paragraphId);
 
     boolean present_index = true;
     list.add(present_index);
-    if (present_index) list.add(index);
+    if (present_index)
+      list.add(index);
 
     boolean present_type = true && (isSetType());
     list.add(present_type);
-    if (present_type) list.add(type);
+    if (present_type)
+      list.add(type);
 
     boolean present_data = true && (isSetData());
     list.add(present_data);
-    if (present_data) list.add(data);
+    if (present_data)
+      list.add(data);
 
     boolean present_appId = true && (isSetAppId());
     list.add(present_appId);
-    if (present_appId) list.add(appId);
+    if (present_appId)
+      list.add(appId);
 
     return list.hashCode();
   }
@@ -666,8 +658,7 @@ public class OutputUpdateEvent
     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
-  public void write(org.apache.thrift.protocol.TProtocol oprot)
-      throws org.apache.thrift.TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
@@ -730,23 +721,17 @@ public class OutputUpdateEvent
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
     try {
-      write(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(out)));
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in)
-      throws java.io.IOException, ClassNotFoundException {
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
-      // it doesn't seem like you should have to do this, but java serialization is wacky, and
-      // doesn't call the default constructor.
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
       __isset_bitfield = 0;
-      read(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(in)));
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
@@ -760,13 +745,13 @@ public class OutputUpdateEvent
 
   private static class OutputUpdateEventStandardScheme extends StandardScheme<OutputUpdateEvent> {
 
-    public void read(org.apache.thrift.protocol.TProtocol iprot, OutputUpdateEvent struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol iprot, OutputUpdateEvent struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
       iprot.readStructBegin();
-      while (true) {
+      while (true)
+      {
         schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
           break;
         }
         switch (schemeField.id) {
@@ -774,7 +759,7 @@ public class OutputUpdateEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.noteId = iprot.readString();
               struct.setNoteIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -782,7 +767,7 @@ public class OutputUpdateEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.paragraphId = iprot.readString();
               struct.setParagraphIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -790,7 +775,7 @@ public class OutputUpdateEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
               struct.index = iprot.readI32();
               struct.setIndexIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -798,7 +783,7 @@ public class OutputUpdateEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.type = iprot.readString();
               struct.setTypeIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -806,7 +791,7 @@ public class OutputUpdateEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.data = iprot.readString();
               struct.setDataIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -814,7 +799,7 @@ public class OutputUpdateEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.appId = iprot.readString();
               struct.setAppIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -829,8 +814,7 @@ public class OutputUpdateEvent
       struct.validate();
     }
 
-    public void write(org.apache.thrift.protocol.TProtocol oprot, OutputUpdateEvent struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol oprot, OutputUpdateEvent struct) throws org.apache.thrift.TException {
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
@@ -865,6 +849,7 @@ public class OutputUpdateEvent
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
+
   }
 
   private static class OutputUpdateEventTupleSchemeFactory implements SchemeFactory {
@@ -876,8 +861,7 @@ public class OutputUpdateEvent
   private static class OutputUpdateEventTupleScheme extends TupleScheme<OutputUpdateEvent> {
 
     @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, OutputUpdateEvent struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol prot, OutputUpdateEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
       if (struct.isSetNoteId()) {
@@ -920,8 +904,7 @@ public class OutputUpdateEvent
     }
 
     @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, OutputUpdateEvent struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol prot, OutputUpdateEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(6);
       if (incoming.get(0)) {
@@ -950,4 +933,6 @@ public class OutputUpdateEvent
       }
     }
   }
+
 }
+


[42/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 be700c3..4504089 100644
--- a/livy/src/test/java/org/apache/zeppelin/livy/LivyInterpreterIT.java
+++ b/livy/src/test/java/org/apache/zeppelin/livy/LivyInterpreterIT.java
@@ -17,14 +17,6 @@
 
 package org.apache.zeppelin.livy;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
 import org.apache.commons.io.IOUtils;
 import org.apache.livy.test.framework.Cluster;
 import org.apache.livy.test.framework.Cluster$;
@@ -45,6 +37,15 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+
 public class LivyInterpreterIT {
   private static final Logger LOGGER = LoggerFactory.getLogger(LivyInterpreterIT.class);
   private static Cluster cluster;
@@ -84,6 +85,7 @@ public class LivyInterpreterIT {
     return true;
   }
 
+
   @Test
   public void testSparkInterpreter() throws InterpreterException {
     if (!checkPreCondition()) {
@@ -97,13 +99,12 @@ public class LivyInterpreterIT {
     AuthenticationInfo authInfo = new AuthenticationInfo("user1");
     MyInterpreterOutputListener outputListener = new MyInterpreterOutputListener();
     InterpreterOutput output = new InterpreterOutput(outputListener);
-    InterpreterContext context =
-        InterpreterContext.builder()
-            .setNoteId("noteId")
-            .setParagraphId("paragraphId")
-            .setAuthenticationInfo(authInfo)
-            .setInterpreterOut(output)
-            .build();
+    InterpreterContext context = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .setAuthenticationInfo(authInfo)
+        .setInterpreterOut(output)
+        .build();
     sparkInterpreter.open();
 
     LivySparkSQLInterpreter sqlInterpreter = new LivySparkSQLInterpreter(properties);
@@ -131,13 +132,12 @@ public class LivyInterpreterIT {
     AuthenticationInfo authInfo = new AuthenticationInfo("user1");
     MyInterpreterOutputListener outputListener = new MyInterpreterOutputListener();
     InterpreterOutput output = new InterpreterOutput(outputListener);
-    final InterpreterContext context =
-        InterpreterContext.builder()
-            .setNoteId("noteId")
-            .setParagraphId("paragraphId")
-            .setAuthenticationInfo(authInfo)
-            .setInterpreterOut(output)
-            .build();
+    final InterpreterContext context = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .setAuthenticationInfo(authInfo)
+        .setInterpreterOut(output)
+        .build();
     ;
 
     InterpreterResult result = sparkInterpreter.interpret("sc.parallelize(1 to 10).sum()", context);
@@ -158,15 +158,18 @@ public class LivyInterpreterIT {
     assertEquals(1, result.message().size());
 
     // multi-line string
-    String multiLineString = "val str = \"\"\"multiple\n" + "line\"\"\"\n" + "println(str)";
+    String multiLineString = "val str = \"\"\"multiple\n" +
+        "line\"\"\"\n" +
+        "println(str)";
     result = sparkInterpreter.interpret(multiLineString, context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals(1, result.message().size());
     assertTrue(result.message().get(0).getData().contains("multiple\nline"));
 
     // case class
-    String caseClassCode =
-        "case class Person(id:Int, \n" + "name:String)\n" + "val p=Person(1, \"name_a\")";
+    String caseClassCode = "case class Person(id:Int, \n" +
+        "name:String)\n" +
+        "val p=Person(1, \"name_a\")";
     result = sparkInterpreter.interpret(caseClassCode, context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals(1, result.message().size());
@@ -204,78 +207,60 @@ public class LivyInterpreterIT {
 
     // cancel
     if (sparkInterpreter.livyVersion.newerThanEquals(LivyVersion.LIVY_0_3_0)) {
-      Thread cancelThread =
-          new Thread() {
-            @Override
-            public void run() {
-              // invoke cancel after 1 millisecond to wait job starting
-              try {
-                Thread.sleep(1);
-              } catch (InterruptedException e) {
-                e.printStackTrace();
-              }
-              sparkInterpreter.cancel(context);
-            }
-          };
+      Thread cancelThread = new Thread() {
+        @Override
+        public void run() {
+          // invoke cancel after 1 millisecond to wait job starting
+          try {
+            Thread.sleep(1);
+          } catch (InterruptedException e) {
+            e.printStackTrace();
+          }
+          sparkInterpreter.cancel(context);
+        }
+      };
       cancelThread.start();
-      result =
-          sparkInterpreter.interpret(
-              "sc.parallelize(1 to 10).foreach(e=>Thread.sleep(10*1000))", context);
+      result = sparkInterpreter
+          .interpret("sc.parallelize(1 to 10).foreach(e=>Thread.sleep(10*1000))", context);
       assertEquals(InterpreterResult.Code.ERROR, result.code());
       String message = result.message().get(0).getData();
       // 2 possibilities, sometimes livy doesn't return the real cancel exception
-      assertTrue(
-          message.contains("cancelled part of cancelled job group")
-              || message.contains("Job is cancelled"));
+      assertTrue(message.contains("cancelled part of cancelled job group") ||
+          message.contains("Job is cancelled"));
     }
   }
 
-  private void testDataFrame(
-      LivySparkInterpreter sparkInterpreter,
-      final LivySparkSQLInterpreter sqlInterpreter,
-      boolean isSpark2)
-      throws LivyException {
+  private void testDataFrame(LivySparkInterpreter sparkInterpreter,
+                             final LivySparkSQLInterpreter sqlInterpreter,
+                             boolean isSpark2) throws LivyException {
     AuthenticationInfo authInfo = new AuthenticationInfo("user1");
     MyInterpreterOutputListener outputListener = new MyInterpreterOutputListener();
     InterpreterOutput output = new InterpreterOutput(outputListener);
-    final InterpreterContext context =
-        InterpreterContext.builder()
-            .setNoteId("noteId")
-            .setParagraphId("paragraphId")
-            .setAuthenticationInfo(authInfo)
-            .setInterpreterOut(output)
-            .build();
+    final InterpreterContext context = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .setAuthenticationInfo(authInfo)
+        .setInterpreterOut(output)
+        .build();
 
     InterpreterResult result = null;
     // test DataFrame api
     if (!isSpark2) {
-      result =
-          sparkInterpreter.interpret(
-              "val df=sqlContext.createDataFrame(Seq((\"hello\",20))).toDF(\"col_1\", \"col_2\")\n"
-                  + "df.collect()",
-              context);
+      result = sparkInterpreter.interpret(
+          "val df=sqlContext.createDataFrame(Seq((\"hello\",20))).toDF(\"col_1\", \"col_2\")\n"
+              + "df.collect()", context);
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
       assertEquals(1, result.message().size());
-      assertTrue(
-          result
-              .message()
-              .get(0)
-              .getData()
-              .contains("Array[org.apache.spark.sql.Row] = Array([hello,20])"));
+      assertTrue(result.message().get(0).getData()
+          .contains("Array[org.apache.spark.sql.Row] = Array([hello,20])"));
     } else {
-      result =
-          sparkInterpreter.interpret(
-              "val df=spark.createDataFrame(Seq((\"hello\",20))).toDF(\"col_1\", \"col_2\")\n"
-                  + "df.collect()",
-              context);
+      result = sparkInterpreter.interpret(
+          "val df=spark.createDataFrame(Seq((\"hello\",20))).toDF(\"col_1\", \"col_2\")\n"
+              + "df.collect()", context);
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
       assertEquals(1, result.message().size());
-      assertTrue(
-          result
-              .message()
-              .get(0)
-              .getData()
-              .contains("Array[org.apache.spark.sql.Row] = Array([hello,20])"));
+      assertTrue(result.message().get(0).getData()
+          .contains("Array[org.apache.spark.sql.Row] = Array([hello,20])"));
     }
     sparkInterpreter.interpret("df.registerTempTable(\"df\")", context);
     // test LivySparkSQLInterpreter which share the same SparkContext with LivySparkInterpreter
@@ -314,70 +299,57 @@ public class LivyInterpreterIT {
 
     // test sql cancel
     if (sqlInterpreter.getLivyVersion().newerThanEquals(LivyVersion.LIVY_0_3_0)) {
-      Thread cancelThread =
-          new Thread() {
-            @Override
-            public void run() {
-              sqlInterpreter.cancel(context);
-            }
-          };
+      Thread cancelThread = new Thread() {
+        @Override
+        public void run() {
+          sqlInterpreter.cancel(context);
+        }
+      };
       cancelThread.start();
-      // sleep so that cancelThread performs a cancel.
+      //sleep so that cancelThread performs a cancel.
       try {
         Thread.sleep(1);
       } catch (InterruptedException e) {
         e.printStackTrace();
       }
-      result = sqlInterpreter.interpret("select count(1) from df", context);
+      result = sqlInterpreter
+          .interpret("select count(1) from df", context);
       if (result.code().equals(InterpreterResult.Code.ERROR)) {
         String message = result.message().get(0).getData();
         // 2 possibilities, sometimes livy doesn't return the real cancel exception
-        assertTrue(
-            message.contains("cancelled part of cancelled job group")
-                || message.contains("Job is cancelled"));
+        assertTrue(message.contains("cancelled part of cancelled job group") ||
+            message.contains("Job is cancelled"));
       }
     }
 
     // test result string truncate
     if (!isSpark2) {
-      result =
-          sparkInterpreter.interpret(
-              "val df=sqlContext.createDataFrame(Seq((\"12characters12characters\",20)))"
-                  + ".toDF(\"col_1\", \"col_2\")\n"
-                  + "df.collect()",
-              context);
+      result = sparkInterpreter.interpret(
+          "val df=sqlContext.createDataFrame(Seq((\"12characters12characters\",20)))"
+              + ".toDF(\"col_1\", \"col_2\")\n"
+              + "df.collect()", context);
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
       assertEquals(1, result.message().size());
-      assertTrue(
-          result
-              .message()
-              .get(0)
-              .getData()
-              .contains("Array[org.apache.spark.sql.Row] = Array([12characters12characters,20])"));
+      assertTrue(result.message().get(0).getData()
+          .contains("Array[org.apache.spark.sql.Row] = Array([12characters12characters,20])"));
     } else {
-      result =
-          sparkInterpreter.interpret(
-              "val df=spark.createDataFrame(Seq((\"12characters12characters\",20)))"
-                  + ".toDF(\"col_1\", \"col_2\")\n"
-                  + "df.collect()",
-              context);
+      result = sparkInterpreter.interpret(
+          "val df=spark.createDataFrame(Seq((\"12characters12characters\",20)))"
+              + ".toDF(\"col_1\", \"col_2\")\n"
+              + "df.collect()", context);
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
       assertEquals(1, result.message().size());
-      assertTrue(
-          result
-              .message()
-              .get(0)
-              .getData()
-              .contains("Array[org.apache.spark.sql.Row] = Array([12characters12characters,20])"));
+      assertTrue(result.message().get(0).getData()
+          .contains("Array[org.apache.spark.sql.Row] = Array([12characters12characters,20])"));
     }
     sparkInterpreter.interpret("df.registerTempTable(\"df\")", context);
     // test LivySparkSQLInterpreter which share the same SparkContext with LivySparkInterpreter
-    result =
-        sqlInterpreter.interpret(
-            "select * from df where col_1='12characters12characters'", context);
+    result = sqlInterpreter.interpret("select * from df where col_1='12characters12characters'",
+        context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals(InterpreterResult.Type.TABLE, result.message().get(0).getType());
     assertEquals("col_1\tcol_2\n12characters12cha...\t20", result.message().get(0).getData());
+
   }
 
   @Test
@@ -391,13 +363,12 @@ public class LivyInterpreterIT {
     AuthenticationInfo authInfo = new AuthenticationInfo("user1");
     MyInterpreterOutputListener outputListener = new MyInterpreterOutputListener();
     InterpreterOutput output = new InterpreterOutput(outputListener);
-    final InterpreterContext context =
-        InterpreterContext.builder()
-            .setNoteId("noteId")
-            .setParagraphId("paragraphId")
-            .setAuthenticationInfo(authInfo)
-            .setInterpreterOut(output)
-            .build();
+    final InterpreterContext context = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .setAuthenticationInfo(authInfo)
+        .setInterpreterOut(output)
+        .build();
     pysparkInterpreter.open();
 
     // test traceback msg
@@ -405,8 +376,8 @@ public class LivyInterpreterIT {
       pysparkInterpreter.getLivyVersion();
       // for livy version >=0.3 , input some erroneous spark code, check the shown result is more
       // than one line
-      InterpreterResult result =
-          pysparkInterpreter.interpret("sc.parallelize(wrongSyntax(1, 2)).count()", context);
+      InterpreterResult result = pysparkInterpreter.interpret(
+          "sc.parallelize(wrongSyntax(1, 2)).count()", context);
       assertEquals(InterpreterResult.Code.ERROR, result.code());
       assertTrue(result.message().get(0).getData().split("\n").length > 1);
       assertTrue(result.message().get(0).getData().contains("Traceback"));
@@ -426,7 +397,7 @@ public class LivyInterpreterIT {
     assertEquals(InterpreterResult.Code.SUCCESS, reslt.code());
     assertTrue(reslt.message().get(0).getData().contains(utf8Str));
 
-    // test special characters
+    //test special characters
     String charStr = "açñiñíûÑoç";
     InterpreterResult res = pysparkInterpreter.interpret("print(\"" + charStr + "\")", context);
     assertEquals(InterpreterResult.Code.SUCCESS, res.code());
@@ -447,34 +418,28 @@ public class LivyInterpreterIT {
 
       // test DataFrame api
       if (!isSpark2) {
-        pysparkInterpreter.interpret(
-            "from pyspark.sql import SQLContext\n" + "sqlContext = SQLContext(sc)", context);
-        result =
-            pysparkInterpreter.interpret(
-                "df=sqlContext.createDataFrame([(\"hello\",20)])\n" + "df.collect()", context);
+        pysparkInterpreter.interpret("from pyspark.sql import SQLContext\n"
+            + "sqlContext = SQLContext(sc)", context);
+        result = pysparkInterpreter.interpret("df=sqlContext.createDataFrame([(\"hello\",20)])\n"
+            + "df.collect()", context);
         assertEquals(InterpreterResult.Code.SUCCESS, result.code());
         assertEquals(1, result.message().size());
-        // python2 has u and python3 don't have u
-        assertTrue(
-            result.message().get(0).getData().contains("[Row(_1=u'hello', _2=20)]")
-                || result.message().get(0).getData().contains("[Row(_1='hello', _2=20)]"));
+        //python2 has u and python3 don't have u
+        assertTrue(result.message().get(0).getData().contains("[Row(_1=u'hello', _2=20)]")
+            || result.message().get(0).getData().contains("[Row(_1='hello', _2=20)]"));
       } else {
-        result =
-            pysparkInterpreter.interpret(
-                "df=spark.createDataFrame([(\"hello\",20)])\n" + "df.collect()", context);
+        result = pysparkInterpreter.interpret("df=spark.createDataFrame([(\"hello\",20)])\n"
+            + "df.collect()", context);
         assertEquals(InterpreterResult.Code.SUCCESS, result.code());
         assertEquals(1, result.message().size());
-        // python2 has u and python3 don't have u
-        assertTrue(
-            result.message().get(0).getData().contains("[Row(_1=u'hello', _2=20)]")
-                || result.message().get(0).getData().contains("[Row(_1='hello', _2=20)]"));
+        //python2 has u and python3 don't have u
+        assertTrue(result.message().get(0).getData().contains("[Row(_1=u'hello', _2=20)]")
+            || result.message().get(0).getData().contains("[Row(_1='hello', _2=20)]"));
       }
 
       // test magic api
-      pysparkInterpreter.interpret(
-          "t = [{\"name\":\"userA\", \"role\":\"roleA\"},"
-              + "{\"name\":\"userB\", \"role\":\"roleB\"}]",
-          context);
+      pysparkInterpreter.interpret("t = [{\"name\":\"userA\", \"role\":\"roleA\"},"
+          + "{\"name\":\"userB\", \"role\":\"roleB\"}]", context);
       result = pysparkInterpreter.interpret("%table t", context);
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
       assertEquals(1, result.message().size());
@@ -489,29 +454,27 @@ public class LivyInterpreterIT {
 
       // cancel
       if (pysparkInterpreter.livyVersion.newerThanEquals(LivyVersion.LIVY_0_3_0)) {
-        Thread cancelThread =
-            new Thread() {
-              @Override
-              public void run() {
-                // invoke cancel after 1 millisecond to wait job starting
-                try {
-                  Thread.sleep(1);
-                } catch (InterruptedException e) {
-                  e.printStackTrace();
-                }
-                pysparkInterpreter.cancel(context);
-              }
-            };
+        Thread cancelThread = new Thread() {
+          @Override
+          public void run() {
+            // invoke cancel after 1 millisecond to wait job starting
+            try {
+              Thread.sleep(1);
+            } catch (InterruptedException e) {
+              e.printStackTrace();
+            }
+            pysparkInterpreter.cancel(context);
+          }
+        };
         cancelThread.start();
-        result =
-            pysparkInterpreter.interpret(
-                "import time\n" + "sc.range(1, 10).foreach(lambda a: time.sleep(10))", context);
+        result = pysparkInterpreter
+            .interpret("import time\n" +
+                "sc.range(1, 10).foreach(lambda a: time.sleep(10))", context);
         assertEquals(InterpreterResult.Code.ERROR, result.code());
         String message = result.message().get(0).getData();
         // 2 possibilities, sometimes livy doesn't return the real cancel exception
-        assertTrue(
-            message.contains("cancelled part of cancelled job group")
-                || message.contains("Job is cancelled"));
+        assertTrue(message.contains("cancelled part of cancelled job group") ||
+            message.contains("Job is cancelled"));
       }
     } finally {
       pysparkInterpreter.close();
@@ -537,13 +500,12 @@ public class LivyInterpreterIT {
     AuthenticationInfo authInfo = new AuthenticationInfo("user1");
     MyInterpreterOutputListener outputListener = new MyInterpreterOutputListener();
     InterpreterOutput output = new InterpreterOutput(outputListener);
-    InterpreterContext context =
-        InterpreterContext.builder()
-            .setNoteId("noteId")
-            .setParagraphId("paragraphId")
-            .setAuthenticationInfo(authInfo)
-            .setInterpreterOut(output)
-            .build();
+    InterpreterContext context = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .setAuthenticationInfo(authInfo)
+        .setInterpreterOut(output)
+        .build();
     sparkInterpreter.open();
 
     LivySparkSQLInterpreter sqlInterpreter = new LivySparkSQLInterpreter(properties2);
@@ -573,43 +535,28 @@ public class LivyInterpreterIT {
       boolean isSpark2 = isSpark2(sparkInterpreter, context);
 
       if (!isSpark2) {
-        result =
-            sparkInterpreter.interpret(
-                "val df=sqlContext.createDataFrame(Seq((\"12characters12characters\",20)))"
-                    + ".toDF(\"col_1\", \"col_2\")\n"
-                    + "df.collect()",
-                context);
+        result = sparkInterpreter.interpret(
+            "val df=sqlContext.createDataFrame(Seq((\"12characters12characters\",20)))"
+                + ".toDF(\"col_1\", \"col_2\")\n"
+                + "df.collect()", context);
         assertEquals(InterpreterResult.Code.SUCCESS, result.code());
         assertEquals(2, result.message().size());
-        assertTrue(
-            result
-                .message()
-                .get(0)
-                .getData()
-                .contains(
-                    "Array[org.apache.spark.sql.Row] = Array([12characters12characters,20])"));
+        assertTrue(result.message().get(0).getData()
+            .contains("Array[org.apache.spark.sql.Row] = Array([12characters12characters,20])"));
       } else {
-        result =
-            sparkInterpreter.interpret(
-                "val df=spark.createDataFrame(Seq((\"12characters12characters\",20)))"
-                    + ".toDF(\"col_1\", \"col_2\")\n"
-                    + "df.collect()",
-                context);
+        result = sparkInterpreter.interpret(
+            "val df=spark.createDataFrame(Seq((\"12characters12characters\",20)))"
+                + ".toDF(\"col_1\", \"col_2\")\n"
+                + "df.collect()", context);
         assertEquals(InterpreterResult.Code.SUCCESS, result.code());
         assertEquals(2, result.message().size());
-        assertTrue(
-            result
-                .message()
-                .get(0)
-                .getData()
-                .contains(
-                    "Array[org.apache.spark.sql.Row] = Array([12characters12characters,20])"));
+        assertTrue(result.message().get(0).getData()
+            .contains("Array[org.apache.spark.sql.Row] = Array([12characters12characters,20])"));
       }
       sparkInterpreter.interpret("df.registerTempTable(\"df\")", context);
       // test LivySparkSQLInterpreter which share the same SparkContext with LivySparkInterpreter
-      result =
-          sqlInterpreter.interpret(
-              "select * from df where col_1='12characters12characters'", context);
+      result = sqlInterpreter.interpret("select * from df where col_1='12characters12characters'",
+          context);
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
       assertEquals(InterpreterResult.Type.TABLE, result.message().get(0).getType());
       assertEquals("col_1\tcol_2\n12characters12characters\t20", result.message().get(0).getData());
@@ -637,13 +584,12 @@ public class LivyInterpreterIT {
     AuthenticationInfo authInfo = new AuthenticationInfo("user1");
     MyInterpreterOutputListener outputListener = new MyInterpreterOutputListener();
     InterpreterOutput output = new InterpreterOutput(outputListener);
-    final InterpreterContext context =
-        InterpreterContext.builder()
-            .setNoteId("noteId")
-            .setParagraphId("paragraphId")
-            .setAuthenticationInfo(authInfo)
-            .setInterpreterOut(output)
-            .build();
+    final InterpreterContext context = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .setAuthenticationInfo(authInfo)
+        .setInterpreterOut(output)
+        .build();
     sparkRInterpreter.open();
 
     try {
@@ -658,36 +604,30 @@ public class LivyInterpreterIT {
         assertTrue(result.message().get(0).getData().contains("eruptions waiting"));
 
         // cancel
-        Thread cancelThread =
-            new Thread() {
-              @Override
-              public void run() {
-                // invoke cancel after 1 millisecond to wait job starting
-                try {
-                  Thread.sleep(1);
-                } catch (InterruptedException e) {
-                  e.printStackTrace();
-                }
-                sparkRInterpreter.cancel(context);
-              }
-            };
+        Thread cancelThread = new Thread() {
+          @Override
+          public void run() {
+            // invoke cancel after 1 millisecond to wait job starting
+            try {
+              Thread.sleep(1);
+            } catch (InterruptedException e) {
+              e.printStackTrace();
+            }
+            sparkRInterpreter.cancel(context);
+          }
+        };
         cancelThread.start();
-        result =
-            sparkRInterpreter.interpret(
-                "df <- as.DataFrame(faithful)\n"
-                    + "df1 <- dapplyCollect(df, function(x) "
-                    + "{ Sys.sleep(10); x <- cbind(x, x$waiting * 60) })",
-                context);
+        result = sparkRInterpreter.interpret("df <- as.DataFrame(faithful)\n" +
+            "df1 <- dapplyCollect(df, function(x) " +
+            "{ Sys.sleep(10); x <- cbind(x, x$waiting * 60) })", context);
         assertEquals(InterpreterResult.Code.ERROR, result.code());
         String message = result.message().get(0).getData();
         // 2 possibilities, sometimes livy doesn't return the real cancel exception
-        assertTrue(
-            message.contains("cancelled part of cancelled job group")
-                || message.contains("Job is cancelled"));
+        assertTrue(message.contains("cancelled part of cancelled job group") ||
+            message.contains("Job is cancelled"));
       } else {
-        result =
-            sparkRInterpreter.interpret(
-                "df <- createDataFrame(sqlContext, faithful)" + "\nhead(df)", context);
+        result = sparkRInterpreter.interpret("df <- createDataFrame(sqlContext, faithful)" +
+            "\nhead(df)", context);
         assertEquals(InterpreterResult.Code.SUCCESS, result.code());
         assertEquals(1, result.message().size());
         assertTrue(result.message().get(0).getData().contains("eruptions waiting"));
@@ -710,12 +650,12 @@ public class LivyInterpreterIT {
     }
     InterpreterGroup interpreterGroup = new InterpreterGroup("group_1");
     interpreterGroup.put("session_1", new ArrayList<Interpreter>());
-    LazyOpenInterpreter sparkInterpreter =
-        new LazyOpenInterpreter(new LivySparkInterpreter(properties));
+    LazyOpenInterpreter sparkInterpreter = new LazyOpenInterpreter(
+        new LivySparkInterpreter(properties));
     sparkInterpreter.setInterpreterGroup(interpreterGroup);
     interpreterGroup.get("session_1").add(sparkInterpreter);
-    LazyOpenInterpreter sqlInterpreter =
-        new LazyOpenInterpreter(new LivySparkSQLInterpreter(properties));
+    LazyOpenInterpreter sqlInterpreter = new LazyOpenInterpreter(
+        new LivySparkSQLInterpreter(properties));
     interpreterGroup.get("session_1").add(sqlInterpreter);
     sqlInterpreter.setInterpreterGroup(interpreterGroup);
     sqlInterpreter.open();
@@ -724,13 +664,12 @@ public class LivyInterpreterIT {
       AuthenticationInfo authInfo = new AuthenticationInfo("user1");
       MyInterpreterOutputListener outputListener = new MyInterpreterOutputListener();
       InterpreterOutput output = new InterpreterOutput(outputListener);
-      InterpreterContext context =
-          InterpreterContext.builder()
-              .setNoteId("noteId")
-              .setParagraphId("paragraphId")
-              .setAuthenticationInfo(authInfo)
-              .setInterpreterOut(output)
-              .build();
+      InterpreterContext context = InterpreterContext.builder()
+          .setNoteId("noteId")
+          .setParagraphId("paragraphId")
+          .setAuthenticationInfo(authInfo)
+          .setInterpreterOut(output)
+          .build();
 
       String p1 = IOUtils.toString(getClass().getResourceAsStream("/livy_tutorial_1.scala"));
       InterpreterResult result = sparkInterpreter.interpret(p1, context);
@@ -753,28 +692,28 @@ public class LivyInterpreterIT {
     }
     InterpreterGroup interpreterGroup = new InterpreterGroup("group_1");
     interpreterGroup.put("session_1", new ArrayList<Interpreter>());
-    LazyOpenInterpreter sparkInterpreter =
-        new LazyOpenInterpreter(new LivySparkInterpreter(properties));
+    LazyOpenInterpreter sparkInterpreter = new LazyOpenInterpreter(
+        new LivySparkInterpreter(properties));
     sparkInterpreter.setInterpreterGroup(interpreterGroup);
     interpreterGroup.get("session_1").add(sparkInterpreter);
 
-    LazyOpenInterpreter sqlInterpreter =
-        new LazyOpenInterpreter(new LivySparkSQLInterpreter(properties));
+    LazyOpenInterpreter sqlInterpreter = new LazyOpenInterpreter(
+        new LivySparkSQLInterpreter(properties));
     interpreterGroup.get("session_1").add(sqlInterpreter);
     sqlInterpreter.setInterpreterGroup(interpreterGroup);
 
-    LazyOpenInterpreter pysparkInterpreter =
-        new LazyOpenInterpreter(new LivyPySparkInterpreter(properties));
+    LazyOpenInterpreter pysparkInterpreter = new LazyOpenInterpreter(
+        new LivyPySparkInterpreter(properties));
     interpreterGroup.get("session_1").add(pysparkInterpreter);
     pysparkInterpreter.setInterpreterGroup(interpreterGroup);
 
-    LazyOpenInterpreter sparkRInterpreter =
-        new LazyOpenInterpreter(new LivySparkRInterpreter(properties));
+    LazyOpenInterpreter sparkRInterpreter = new LazyOpenInterpreter(
+        new LivySparkRInterpreter(properties));
     interpreterGroup.get("session_1").add(sparkRInterpreter);
     sparkRInterpreter.setInterpreterGroup(interpreterGroup);
 
-    LazyOpenInterpreter sharedInterpreter =
-        new LazyOpenInterpreter(new LivySharedInterpreter(properties));
+    LazyOpenInterpreter sharedInterpreter = new LazyOpenInterpreter(
+        new LivySharedInterpreter(properties));
     interpreterGroup.get("session_1").add(sharedInterpreter);
     sharedInterpreter.setInterpreterGroup(interpreterGroup);
 
@@ -787,91 +726,68 @@ public class LivyInterpreterIT {
       AuthenticationInfo authInfo = new AuthenticationInfo("user1");
       MyInterpreterOutputListener outputListener = new MyInterpreterOutputListener();
       InterpreterOutput output = new InterpreterOutput(outputListener);
-      InterpreterContext context =
-          InterpreterContext.builder()
-              .setNoteId("noteId")
-              .setParagraphId("paragraphId")
-              .setAuthenticationInfo(authInfo)
-              .setInterpreterOut(output)
-              .build();
+      InterpreterContext context = InterpreterContext.builder()
+          .setNoteId("noteId")
+          .setParagraphId("paragraphId")
+          .setAuthenticationInfo(authInfo)
+          .setInterpreterOut(output)
+          .build();
       // detect spark version
       InterpreterResult result = sparkInterpreter.interpret("sc.version", context);
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
       assertEquals(1, result.message().size());
 
-      boolean isSpark2 =
-          isSpark2((BaseLivyInterpreter) sparkInterpreter.getInnerInterpreter(), context);
+      boolean isSpark2 = isSpark2((BaseLivyInterpreter) sparkInterpreter.getInnerInterpreter(),
+          context);
 
       if (!isSpark2) {
-        result =
-            sparkInterpreter.interpret(
-                "val df=sqlContext.createDataFrame(Seq((\"hello\",20))).toDF(\"col_1\", \"col_2\")\n"
-                    + "df.collect()",
-                context);
+        result = sparkInterpreter.interpret(
+            "val df=sqlContext.createDataFrame(Seq((\"hello\",20))).toDF(\"col_1\", \"col_2\")\n"
+                + "df.collect()", context);
         assertEquals(InterpreterResult.Code.SUCCESS, result.code());
         assertEquals(1, result.message().size());
-        assertTrue(
-            result
-                .message()
-                .get(0)
-                .getData()
-                .contains("Array[org.apache.spark.sql.Row] = Array([hello,20])"));
+        assertTrue(result.message().get(0).getData()
+            .contains("Array[org.apache.spark.sql.Row] = Array([hello,20])"));
         sparkInterpreter.interpret("df.registerTempTable(\"df\")", context);
 
         // access table from pyspark
-        result =
-            pysparkInterpreter.interpret("sqlContext.sql(\"select * from df\").show()", context);
+        result = pysparkInterpreter.interpret("sqlContext.sql(\"select * from df\").show()",
+            context);
         assertEquals(InterpreterResult.Code.SUCCESS, result.code());
         assertEquals(1, result.message().size());
-        assertTrue(
-            result
-                .message()
-                .get(0)
-                .getData()
-                .contains(
-                    "+-----+-----+\n"
-                        + "|col_1|col_2|\n"
-                        + "+-----+-----+\n"
-                        + "|hello|   20|\n"
-                        + "+-----+-----+"));
+        assertTrue(result.message().get(0).getData()
+            .contains("+-----+-----+\n" +
+                "|col_1|col_2|\n" +
+                "+-----+-----+\n" +
+                "|hello|   20|\n" +
+                "+-----+-----+"));
 
         // access table from sparkr
-        result =
-            sparkRInterpreter.interpret("head(sql(sqlContext, \"select * from df\"))", context);
+        result = sparkRInterpreter.interpret("head(sql(sqlContext, \"select * from df\"))",
+            context);
         assertEquals(InterpreterResult.Code.SUCCESS, result.code());
         assertEquals(1, result.message().size());
         assertTrue(result.message().get(0).getData().contains("col_1 col_2\n1 hello    20"));
       } else {
-        result =
-            sparkInterpreter.interpret(
-                "val df=spark.createDataFrame(Seq((\"hello\",20))).toDF(\"col_1\", \"col_2\")\n"
-                    + "df.collect()",
-                context);
+        result = sparkInterpreter.interpret(
+            "val df=spark.createDataFrame(Seq((\"hello\",20))).toDF(\"col_1\", \"col_2\")\n"
+                + "df.collect()", context);
         assertEquals(InterpreterResult.Code.SUCCESS, result.code());
         assertEquals(1, result.message().size());
-        assertTrue(
-            result
-                .message()
-                .get(0)
-                .getData()
-                .contains("Array[org.apache.spark.sql.Row] = Array([hello,20])"));
+        assertTrue(result.message().get(0).getData()
+            .contains("Array[org.apache.spark.sql.Row] = Array([hello,20])"));
         sparkInterpreter.interpret("df.registerTempTable(\"df\")", context);
 
         // access table from pyspark
         result = pysparkInterpreter.interpret("spark.sql(\"select * from df\").show()", context);
         assertEquals(InterpreterResult.Code.SUCCESS, result.code());
         assertEquals(1, result.message().size());
-        assertTrue(
-            result
-                .message()
-                .get(0)
-                .getData()
-                .contains(
-                    "+-----+-----+\n"
-                        + "|col_1|col_2|\n"
-                        + "+-----+-----+\n"
-                        + "|hello|   20|\n"
-                        + "+-----+-----+"));
+        assertTrue(result.message().get(0).getData()
+            .contains("+-----+-----+\n" +
+                "|col_1|col_2|\n" +
+                "+-----+-----+\n" +
+                "|hello|   20|\n" +
+                "+-----+-----+"));
 
         // access table from sparkr
         result = sparkRInterpreter.interpret("head(sql(\"select * from df\"))", context);
@@ -881,28 +797,27 @@ public class LivyInterpreterIT {
       }
 
       // test plotting of python
-      result =
-          pysparkInterpreter.interpret(
-              "import matplotlib.pyplot as plt\n"
-                  + "plt.switch_backend('agg')\n"
-                  + "data=[1,2,3,4]\n"
-                  + "plt.figure()\n"
-                  + "plt.plot(data)\n"
-                  + "%matplot plt",
-              context);
+      result = pysparkInterpreter.interpret(
+          "import matplotlib.pyplot as plt\n" +
+              "plt.switch_backend('agg')\n" +
+              "data=[1,2,3,4]\n" +
+              "plt.figure()\n" +
+              "plt.plot(data)\n" +
+              "%matplot plt", context);
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
       assertEquals(1, result.message().size());
       assertEquals(InterpreterResult.Type.IMG, result.message().get(0).getType());
 
       // test plotting of R
-      result = sparkRInterpreter.interpret("hist(mtcars$mpg)", context);
+      result = sparkRInterpreter.interpret(
+          "hist(mtcars$mpg)", context);
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
       assertEquals(1, result.message().size());
       assertEquals(InterpreterResult.Type.IMG, result.message().get(0).getType());
 
       // test code completion
-      List<InterpreterCompletion> completionResult =
-          sparkInterpreter.completion("df.sho", 6, context);
+      List<InterpreterCompletion> completionResult = sparkInterpreter
+          .completion("df.sho", 6, context);
       assertEquals(1, completionResult.size());
       assertEquals("show", completionResult.get(0).name);
 
@@ -934,12 +849,17 @@ public class LivyInterpreterIT {
 
   public static class MyInterpreterOutputListener implements InterpreterOutputListener {
     @Override
-    public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {}
+    public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
+    }
 
     @Override
-    public void onUpdate(int index, InterpreterResultMessageOutput out) {}
+    public void onUpdate(int index, InterpreterResultMessageOutput out) {
+
+    }
 
     @Override
-    public void onUpdateAll(InterpreterOutput out) {}
+    public void onUpdateAll(InterpreterOutput out) {
+
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/livy/src/test/java/org/apache/zeppelin/livy/LivySQLInterpreterTest.java
----------------------------------------------------------------------
diff --git a/livy/src/test/java/org/apache/zeppelin/livy/LivySQLInterpreterTest.java b/livy/src/test/java/org/apache/zeppelin/livy/LivySQLInterpreterTest.java
index 8e1a83d..8821a86 100644
--- a/livy/src/test/java/org/apache/zeppelin/livy/LivySQLInterpreterTest.java
+++ b/livy/src/test/java/org/apache/zeppelin/livy/LivySQLInterpreterTest.java
@@ -21,12 +21,15 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertTrue;
 
-import java.util.List;
-import java.util.Properties;
 import org.junit.Before;
 import org.junit.Test;
 
-/** Unit test for LivySQLInterpreter. */
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * Unit test for LivySQLInterpreter.
+ */
 public class LivySQLInterpreterTest {
 
   private LivySparkSQLInterpreter sqlInterpreter;
@@ -55,11 +58,14 @@ public class LivySQLInterpreterTest {
     //    |  a|  b|
     //    +---+---+
     //    +---+---+
-    List<String> rows =
-        sqlInterpreter.parseSQLOutput("+---+---+\n" + "|  a|  b|\n" + "+---+---+\n" + "+---+---+");
+    List<String> rows = sqlInterpreter.parseSQLOutput("+---+---+\n" +
+                                  "|  a|  b|\n" +
+                                  "+---+---+\n" +
+                                  "+---+---+");
     assertEquals(1, rows.size());
     assertEquals("a\tb", rows.get(0));
 
+
     //  sql output with 2 rows
     //    +---+---+
     //    |  a|  b|
@@ -67,19 +73,18 @@ public class LivySQLInterpreterTest {
     //    |  1| 1a|
     //    |  2| 2b|
     //    +---+---+
-    rows =
-        sqlInterpreter.parseSQLOutput(
-            "+---+---+\n"
-                + "|  a|  b|\n"
-                + "+---+---+\n"
-                + "|  1| 1a|\n"
-                + "|  2| 2b|\n"
-                + "+---+---+");
+    rows = sqlInterpreter.parseSQLOutput("+---+---+\n" +
+        "|  a|  b|\n" +
+        "+---+---+\n" +
+        "|  1| 1a|\n" +
+        "|  2| 2b|\n" +
+        "+---+---+");
     assertEquals(3, rows.size());
     assertEquals("a\tb", rows.get(0));
     assertEquals("1\t1a", rows.get(1));
     assertEquals("2\t2b", rows.get(2));
 
+
     //  sql output with 3 rows and showing "only showing top 3 rows"
     //    +---+---+
     //    |  a|  b|
@@ -89,22 +94,21 @@ public class LivySQLInterpreterTest {
     //    |  3| 3c|
     //    +---+---+
     //    only showing top 3 rows
-    rows =
-        sqlInterpreter.parseSQLOutput(
-            "+---+---+\n"
-                + "|  a|  b|\n"
-                + "+---+---+\n"
-                + "|  1| 1a|\n"
-                + "|  2| 2b|\n"
-                + "|  3| 3c|\n"
-                + "+---+---+\n"
-                + "only showing top 3 rows");
+    rows = sqlInterpreter.parseSQLOutput("+---+---+\n" +
+        "|  a|  b|\n" +
+        "+---+---+\n" +
+        "|  1| 1a|\n" +
+        "|  2| 2b|\n" +
+        "|  3| 3c|\n" +
+        "+---+---+\n" +
+        "only showing top 3 rows");
     assertEquals(4, rows.size());
     assertEquals("a\tb", rows.get(0));
     assertEquals("1\t1a", rows.get(1));
     assertEquals("2\t2b", rows.get(2));
     assertEquals("3\t3c", rows.get(3));
 
+
     //  sql output with 1 rows and showing "only showing top 1 rows"
     //    +---+
     //    |  a|
@@ -112,13 +116,17 @@ public class LivySQLInterpreterTest {
     //    |  1|
     //    +---+
     //    only showing top 1 rows
-    rows =
-        sqlInterpreter.parseSQLOutput(
-            "+---+\n" + "|  a|\n" + "+---+\n" + "|  1|\n" + "+---+\n" + "only showing top 1 rows");
+    rows = sqlInterpreter.parseSQLOutput("+---+\n" +
+        "|  a|\n" +
+        "+---+\n" +
+        "|  1|\n" +
+        "+---+\n" +
+        "only showing top 1 rows");
     assertEquals(2, rows.size());
     assertEquals("a", rows.get(0));
     assertEquals("1", rows.get(1));
 
+
     //  sql output with 3 rows, 3 columns, showing "only showing top 3 rows" with a line break in
     //  the data
     //    +---+---+---+
@@ -130,22 +138,21 @@ public class LivySQLInterpreterTest {
     //    | 3a| 3b| 3c|
     //    +---+---+---+
     //    only showing top 3 rows
-    rows =
-        sqlInterpreter.parseSQLOutput(
-            "+---+----+---+\n"
-                + "|  a|   b|  c|\n"
-                + "+---+----+---+\n"
-                + "| 1a|  1b| 1c|\n"
-                + "| 2a| 2\nb| 2c|\n"
-                + "| 3a|  3b| 3c|\n"
-                + "+---+---+---+\n"
-                + "only showing top 3 rows");
+    rows = sqlInterpreter.parseSQLOutput("+---+----+---+\n" +
+            "|  a|   b|  c|\n" +
+            "+---+----+---+\n" +
+            "| 1a|  1b| 1c|\n" +
+            "| 2a| 2\nb| 2c|\n" +
+            "| 3a|  3b| 3c|\n" +
+            "+---+---+---+\n" +
+            "only showing top 3 rows");
     assertEquals(4, rows.size());
     assertEquals("a\tb\tc", rows.get(0));
     assertEquals("1a\t1b\t1c", rows.get(1));
     assertEquals("2a\t2\\nb\t2c", rows.get(2));
     assertEquals("3a\t3b\t3c", rows.get(3));
 
+
     //  sql output with 2 rows and one containing a tab
     //    +---+---+
     //    |  a|  b|
@@ -153,14 +160,12 @@ public class LivySQLInterpreterTest {
     //    |  1| \ta|
     //    |  2| 2b|
     //    +---+---+
-    rows =
-        sqlInterpreter.parseSQLOutput(
-            "+---+---+\n"
-                + "|  a|  b|\n"
-                + "+---+---+\n"
-                + "|  1| \ta|\n"
-                + "|  2| 2b|\n"
-                + "+---+---+");
+    rows = sqlInterpreter.parseSQLOutput("+---+---+\n" +
+            "|  a|  b|\n" +
+            "+---+---+\n" +
+            "|  1| \ta|\n" +
+            "|  2| 2b|\n" +
+            "+---+---+");
     assertEquals(3, rows.size());
     assertEquals("a\tb", rows.get(0));
     assertEquals("1\t\\ta", rows.get(1));

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/markdown/pom.xml
----------------------------------------------------------------------
diff --git a/markdown/pom.xml b/markdown/pom.xml
index dce5157..79cabc1 100644
--- a/markdown/pom.xml
+++ b/markdown/pom.xml
@@ -93,6 +93,13 @@
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java
----------------------------------------------------------------------
diff --git a/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java b/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java
index 233dd16..83b4069 100644
--- a/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java
+++ b/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java
@@ -17,8 +17,12 @@
 
 package org.apache.zeppelin.markdown;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.util.List;
 import java.util.Properties;
+
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
@@ -27,16 +31,18 @@ import org.apache.zeppelin.interpreter.InterpreterUtils;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** MarkdownInterpreter interpreter for Zeppelin. */
+/**
+ * MarkdownInterpreter interpreter for Zeppelin.
+ */
 public class Markdown extends Interpreter {
   private static final Logger LOGGER = LoggerFactory.getLogger(Markdown.class);
 
   private MarkdownParser parser;
 
-  /** Markdown Parser Type. */
+  /**
+   * Markdown Parser Type.
+   */
   public enum MarkdownParserType {
     PEGDOWN {
       @Override
@@ -79,7 +85,8 @@ public class Markdown extends Interpreter {
   }
 
   @Override
-  public void close() {}
+  public void close() {
+  }
 
   @Override
   public InterpreterResult interpret(String markdownText, InterpreterContext interpreterContext) {
@@ -96,7 +103,8 @@ public class Markdown extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+  }
 
   @Override
   public FormType getFormType() {
@@ -115,8 +123,8 @@ public class Markdown extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return null;
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown4jParser.java
----------------------------------------------------------------------
diff --git a/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown4jParser.java b/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown4jParser.java
index 77fd4a3..215540d 100644
--- a/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown4jParser.java
+++ b/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown4jParser.java
@@ -17,10 +17,13 @@
 
 package org.apache.zeppelin.markdown;
 
-import java.io.IOException;
 import org.markdown4j.Markdown4jProcessor;
 
-/** Markdown Parser using markdown4j processor. */
+import java.io.IOException;
+
+/**
+ * Markdown Parser using markdown4j processor.
+ */
 public class Markdown4jParser implements MarkdownParser {
   private Markdown4jProcessor processor;
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/markdown/src/main/java/org/apache/zeppelin/markdown/MarkdownParser.java
----------------------------------------------------------------------
diff --git a/markdown/src/main/java/org/apache/zeppelin/markdown/MarkdownParser.java b/markdown/src/main/java/org/apache/zeppelin/markdown/MarkdownParser.java
index 056ca26..2f8717e 100644
--- a/markdown/src/main/java/org/apache/zeppelin/markdown/MarkdownParser.java
+++ b/markdown/src/main/java/org/apache/zeppelin/markdown/MarkdownParser.java
@@ -17,7 +17,9 @@
 
 package org.apache.zeppelin.markdown;
 
-/** Abstract Markdown Parser. */
+/**
+ * Abstract Markdown Parser.
+ */
 public interface MarkdownParser {
   String render(String markdownText);
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/markdown/src/main/java/org/apache/zeppelin/markdown/ParamVar.java
----------------------------------------------------------------------
diff --git a/markdown/src/main/java/org/apache/zeppelin/markdown/ParamVar.java b/markdown/src/main/java/org/apache/zeppelin/markdown/ParamVar.java
index 37b864e..14828e0 100644
--- a/markdown/src/main/java/org/apache/zeppelin/markdown/ParamVar.java
+++ b/markdown/src/main/java/org/apache/zeppelin/markdown/ParamVar.java
@@ -17,9 +17,10 @@
 
 package org.apache.zeppelin.markdown;
 
+import org.parboiled.support.Var;
+
 import java.util.HashMap;
 import java.util.Map;
-import org.parboiled.support.Var;
 
 /**
  * Implementation of Var to support parameter parsing.

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownParser.java
----------------------------------------------------------------------
diff --git a/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownParser.java b/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownParser.java
index 3152f99..fb99f05 100644
--- a/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownParser.java
+++ b/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownParser.java
@@ -21,7 +21,9 @@ import org.pegdown.Extensions;
 import org.pegdown.PegDownProcessor;
 import org.pegdown.plugins.PegDownPlugins;
 
-/** Markdown Parser using pegdown processor. */
+/**
+ * Markdown Parser using pegdown processor.
+ */
 public class PegdownParser implements MarkdownParser {
   private PegDownProcessor processor;
 
@@ -29,11 +31,10 @@ public class PegdownParser implements MarkdownParser {
   public static final int OPTIONS = Extensions.ALL_WITH_OPTIONALS - Extensions.ANCHORLINKS;
 
   public PegdownParser() {
-    PegDownPlugins plugins =
-        new PegDownPlugins.Builder()
-            .withPlugin(PegdownYumlPlugin.class)
-            .withPlugin(PegdownWebSequencelPlugin.class)
-            .build();
+    PegDownPlugins plugins = new PegDownPlugins.Builder()
+        .withPlugin(PegdownYumlPlugin.class)
+        .withPlugin(PegdownWebSequencelPlugin.class)
+        .build();
     processor = new PegDownProcessor(OPTIONS, PARSING_TIMEOUT_AS_MILLIS, plugins);
   }
 
@@ -52,7 +53,9 @@ public class PegdownParser implements MarkdownParser {
     return html;
   }
 
-  /** wrap with markdown class div to styling DOM using css. */
+  /**
+   * wrap with markdown class div to styling DOM using css.
+   */
   public static String wrapWithMarkdownClassDiv(String html) {
     return new StringBuilder()
         .append("<div class=\"markdown-body\">\n")

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownWebSequencelPlugin.java
----------------------------------------------------------------------
diff --git a/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownWebSequencelPlugin.java b/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownWebSequencelPlugin.java
index 88184df..6238f95 100644
--- a/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownWebSequencelPlugin.java
+++ b/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownWebSequencelPlugin.java
@@ -17,14 +17,6 @@
 
 package org.apache.zeppelin.markdown;
 
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLEncoder;
-import java.nio.charset.StandardCharsets;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.parboiled.BaseParser;
@@ -36,17 +28,29 @@ import org.pegdown.ast.TextNode;
 import org.pegdown.plugins.BlockPluginParser;
 import org.pegdown.plugins.PegDownPlugins;
 
-/** Pegdown plugin for Websequence diagram. */
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Pegdown plugin for Websequence diagram.
+ */
 public class PegdownWebSequencelPlugin extends Parser implements BlockPluginParser {
   private static final String WEBSEQ_URL = "http://www.websequencediagrams.com";
 
   public PegdownWebSequencelPlugin() {
-    super(
-        PegdownParser.OPTIONS, PegdownParser.PARSING_TIMEOUT_AS_MILLIS, DefaultParseRunnerProvider);
+    super(PegdownParser.OPTIONS,
+        PegdownParser.PARSING_TIMEOUT_AS_MILLIS,
+        DefaultParseRunnerProvider);
   }
 
-  public PegdownWebSequencelPlugin(
-      Integer opts, Long millis, ParseRunnerProvider provider, PegDownPlugins plugins) {
+  public PegdownWebSequencelPlugin(Integer opts, Long millis, ParseRunnerProvider provider,
+                                   PegDownPlugins plugins) {
     super(opts, millis, provider, plugins);
   }
 
@@ -70,14 +74,16 @@ public class PegdownWebSequencelPlugin extends Parser implements BlockPluginPars
 
     return NodeSequence(
         startMarker(),
-        Optional(String("style="), Sequence(OneOrMore(Letter()), style.append(match()), Spn1())),
+        Optional(
+            String("style="),
+            Sequence(OneOrMore(Letter()), style.append(match()), Spn1())),
         Sequence(body(), body.append(match())),
         endMarker(),
         push(
-            new ExpImageNode(
-                "title",
+            new ExpImageNode("title",
                 createWebsequenceUrl(style.getString(), body.getString()),
-                new TextNode(""))));
+                new TextNode("")))
+    );
   }
 
   public static String createWebsequenceUrl(String style, String content) {
@@ -89,14 +95,13 @@ public class PegdownWebSequencelPlugin extends Parser implements BlockPluginPars
     String webSeqUrl = "";
 
     try {
-      String query =
-          new StringBuilder()
-              .append("style=")
-              .append(style)
-              .append("&message=")
-              .append(URLEncoder.encode(content, "UTF-8"))
-              .append("&apiVersion=1")
-              .toString();
+      String query = new StringBuilder()
+          .append("style=")
+          .append(style)
+          .append("&message=")
+          .append(URLEncoder.encode(content, "UTF-8"))
+          .append("&apiVersion=1")
+          .toString();
 
       URL url = new URL(WEBSEQ_URL);
       URLConnection conn = url.openConnection();
@@ -106,8 +111,8 @@ public class PegdownWebSequencelPlugin extends Parser implements BlockPluginPars
       writer.flush();
 
       StringBuilder response = new StringBuilder();
-      reader =
-          new BufferedReader(new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8));
+      reader = new BufferedReader(
+          new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8));
       String line;
       while ((line = reader.readLine()) != null) {
         response.append(line);
@@ -136,6 +141,6 @@ public class PegdownWebSequencelPlugin extends Parser implements BlockPluginPars
 
   @Override
   public Rule[] blockPluginRules() {
-    return new Rule[] {blockRule()};
+    return new Rule[]{blockRule()};
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownYumlPlugin.java
----------------------------------------------------------------------
diff --git a/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownYumlPlugin.java b/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownYumlPlugin.java
index e9ac9ad..c9e942a 100644
--- a/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownYumlPlugin.java
+++ b/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownYumlPlugin.java
@@ -19,9 +19,6 @@ package org.apache.zeppelin.markdown;
 
 import static org.apache.commons.lang3.StringUtils.defaultString;
 
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.Map;
 import org.parboiled.BaseParser;
 import org.parboiled.Rule;
 import org.parboiled.support.StringBuilderVar;
@@ -31,18 +28,24 @@ import org.pegdown.ast.TextNode;
 import org.pegdown.plugins.BlockPluginParser;
 import org.pegdown.plugins.PegDownPlugins;
 
-/** Pegdown plugin for YUML. */
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.Map;
+
+/**
+ * Pegdown plugin for YUML.
+ */
 public class PegdownYumlPlugin extends Parser implements BlockPluginParser {
   public PegdownYumlPlugin() {
-    super(
-        PegdownParser.OPTIONS, PegdownParser.PARSING_TIMEOUT_AS_MILLIS, DefaultParseRunnerProvider);
+    super(PegdownParser.OPTIONS,
+        PegdownParser.PARSING_TIMEOUT_AS_MILLIS,
+        DefaultParseRunnerProvider);
   }
 
-  public PegdownYumlPlugin(
-      Integer options,
-      Long maxParsingTimeInMillis,
-      ParseRunnerProvider parseRunnerProvider,
-      PegDownPlugins plugins) {
+  public PegdownYumlPlugin(Integer options,
+                           Long maxParsingTimeInMillis,
+                           ParseRunnerProvider parseRunnerProvider,
+                           PegDownPlugins plugins) {
     super(options, maxParsingTimeInMillis, parseRunnerProvider, plugins);
   }
 
@@ -74,21 +77,19 @@ public class PegdownYumlPlugin extends Parser implements BlockPluginParser {
         startMarker(),
         ZeroOrMore(
             Sequence(
-                parameterName(),
-                name.append(match()),
+                parameterName(), name.append(match()),
                 String("="),
-                OneOrMore(Alphanumeric()),
-                value.append(match())),
+                OneOrMore(Alphanumeric()), value.append(match())),
             Sp(),
             params.put(name.getString(), value.getString()),
-            name.clear(),
-            value.clear()),
+            name.clear(), value.clear()),
         body(),
         body.append(match()),
         endMarker(),
         push(
             new ExpImageNode(
-                "title", createYumlUrl(params.get(), body.getString()), new TextNode(""))));
+                "title", createYumlUrl(params.get(), body.getString()), new TextNode("")))
+    );
   }
 
   public static String createYumlUrl(Map<String, String> params, String body) {
@@ -136,6 +137,6 @@ public class PegdownYumlPlugin extends Parser implements BlockPluginParser {
 
   @Override
   public Rule[] blockPluginRules() {
-    return new Rule[] {blockRule()};
+    return new Rule[]{blockRule()};
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/markdown/src/test/java/org/apache/zeppelin/markdown/Markdown4jParserTest.java
----------------------------------------------------------------------
diff --git a/markdown/src/test/java/org/apache/zeppelin/markdown/Markdown4jParserTest.java b/markdown/src/test/java/org/apache/zeppelin/markdown/Markdown4jParserTest.java
index 444f42d..fe381ee 100644
--- a/markdown/src/test/java/org/apache/zeppelin/markdown/Markdown4jParserTest.java
+++ b/markdown/src/test/java/org/apache/zeppelin/markdown/Markdown4jParserTest.java
@@ -19,12 +19,14 @@ package org.apache.zeppelin.markdown;
 
 import static org.junit.Assert.assertEquals;
 
-import java.util.Properties;
-import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.util.Properties;
+
+import org.apache.zeppelin.interpreter.InterpreterResult;
+
 public class Markdown4jParserTest {
   Markdown md;
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/markdown/src/test/java/org/apache/zeppelin/markdown/PegdownParserTest.java
----------------------------------------------------------------------
diff --git a/markdown/src/test/java/org/apache/zeppelin/markdown/PegdownParserTest.java b/markdown/src/test/java/org/apache/zeppelin/markdown/PegdownParserTest.java
index a07c470..a608a05 100644
--- a/markdown/src/test/java/org/apache/zeppelin/markdown/PegdownParserTest.java
+++ b/markdown/src/test/java/org/apache/zeppelin/markdown/PegdownParserTest.java
@@ -17,13 +17,11 @@
 
 package org.apache.zeppelin.markdown;
 
-import static org.apache.zeppelin.markdown.PegdownParser.wrapWithMarkdownClassDiv;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertThat;
 
-import java.util.ArrayList;
-import java.util.Properties;
-import org.apache.zeppelin.interpreter.InterpreterResult;
+import static org.apache.zeppelin.markdown.PegdownParser.wrapWithMarkdownClassDiv;
+
 import org.hamcrest.CoreMatchers;
 import org.junit.After;
 import org.junit.Before;
@@ -33,11 +31,17 @@ import org.junit.rules.ErrorCollector;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.ArrayList;
+import java.util.Properties;
+
+import org.apache.zeppelin.interpreter.InterpreterResult;
+
 public class PegdownParserTest {
   Logger logger = LoggerFactory.getLogger(PegdownParserTest.class);
   Markdown md;
 
-  @Rule public ErrorCollector collector = new ErrorCollector();
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
 
   @Before
   public void setUp() {
@@ -56,18 +60,18 @@ public class PegdownParserTest {
   public void testMultipleThread() {
     ArrayList<Thread> arrThreads = new ArrayList<>();
     for (int i = 0; i < 10; i++) {
-      Thread t =
-          new Thread() {
-            public void run() {
-              String r1 = null;
-              try {
-                r1 = md.interpret("# H1", null).code().name();
-              } catch (Exception e) {
-                logger.error("testTestMultipleThread failed to interpret", e);
-              }
-              collector.checkThat("SUCCESS", CoreMatchers.containsString(r1));
-            }
-          };
+      Thread t = new Thread() {
+        public void run() {
+          String r1 = null;
+          try {
+            r1 = md.interpret("# H1", null).code().name();
+          } catch (Exception e) {
+            logger.error("testTestMultipleThread failed to interpret", e);
+          }
+          collector.checkThat("SUCCESS",
+              CoreMatchers.containsString(r1));
+        }
+      };
       t.start();
       arrThreads.add(t);
     }
@@ -113,7 +117,7 @@ public class PegdownParserTest {
     InterpreterResult result = md.interpret("This is ~~deleted~~ text", null);
     assertEquals(
         wrapWithMarkdownClassDiv("<p>This is <del>deleted</del> text</p>"),
-        result.message().get(0).getData());
+            result.message().get(0).getData());
   }
 
   @Test
@@ -121,7 +125,7 @@ public class PegdownParserTest {
     InterpreterResult result = md.interpret("This is *italics* text", null);
     assertEquals(
         wrapWithMarkdownClassDiv("<p>This is <em>italics</em> text</p>"),
-        result.message().get(0).getData());
+            result.message().get(0).getData());
   }
 
   @Test
@@ -182,7 +186,7 @@ public class PegdownParserTest {
             .append("\n")
             .append(
                 "[I'm an inline-style link with title](https://www.google.com "
-                    + "\"Google's Homepage\")\n")
+                        + "\"Google's Homepage\")\n")
             .append("\n")
             .append("[I'm a reference-style link][Arbitrary case-insensitive reference text]\n")
             .append("\n")
@@ -209,23 +213,23 @@ public class PegdownParserTest {
                 "<p><a href=\"https://www.google.com\">I&rsquo;m an inline-style link</a></p>\n")
             .append(
                 "<p><a href=\"https://www.google.com\" title=\"Google&#39;s Homepage\">I&rsquo;m "
-                    + "an inline-style link with title</a></p>\n")
+                        + "an inline-style link with title</a></p>\n")
             .append(
                 "<p><a href=\"https://www.mozilla.org\">I&rsquo;m a reference-style link</a></p>\n")
             .append(
                 "<p><a href=\"../blob/master/LICENSE\">I&rsquo;m a relative reference to a "
-                    + "repository file</a></p>\n")
+                        + "repository file</a></p>\n")
             .append(
                 "<p><a href=\"http://slashdot.org\">You can use numbers for reference-style link "
-                    + "definitions</a></p>\n")
+                        + "definitions</a></p>\n")
             .append(
                 "<p>Or leave it empty and use the <a href=\"http://www.reddit.com\">link text "
-                    + "itself</a>.</p>\n")
+                        + "itself</a>.</p>\n")
             .append(
                 "<p>URLs and URLs in angle brackets will automatically get turned into links."
-                    + "<br/><a href=\"http://www.example.com\">http://www.example.com</a> or "
-                    + "<a href=\"http://www.example.com\">http://www.example.com</a> and "
-                    + "sometimes<br/>example.com (but not on Github, for example).</p>\n")
+                        + "<br/><a href=\"http://www.example.com\">http://www.example.com</a> or "
+                        + "<a href=\"http://www.example.com\">http://www.example.com</a> and "
+                        + "sometimes<br/>example.com (but not on Github, for example).</p>\n")
             .append("<p>Some text to show that the reference links can follow later.</p>")
             .toString();
 
@@ -252,26 +256,26 @@ public class PegdownParserTest {
     assertEquals(
         wrapWithMarkdownClassDiv(
             "<blockquote>\n"
-                + "  <p>Blockquotes are very handy in email to emulate reply text.<br/>This "
-                + "line is part of the same quote.</p>\n"
-                + "</blockquote>"),
+                    + "  <p>Blockquotes are very handy in email to emulate reply text.<br/>This "
+                    + "line is part of the same quote.</p>\n"
+                    + "</blockquote>"),
         r1.message().get(0).getData());
 
     InterpreterResult r2 =
         md.interpret(
             "> This is a very long line that will still be quoted properly when it "
-                + "wraps. Oh boy let's keep writing to make sure this is long enough to "
-                + "actually wrap for everyone. Oh, you can *put* **MarkdownInterpreter** "
-                + "into a blockquote. ",
+                    + "wraps. Oh boy let's keep writing to make sure this is long enough to "
+                    + "actually wrap for everyone. Oh, you can *put* **MarkdownInterpreter** "
+                    + "into a blockquote. ",
             null);
     assertEquals(
         wrapWithMarkdownClassDiv(
             "<blockquote>\n"
-                + "  <p>This is a very long line that will still be quoted properly when "
-                + "it wraps. Oh boy let&rsquo;s keep writing to make sure this is long enough "
-                + "to actually wrap for everyone. Oh, you can <em>put</em> "
-                + "<strong>MarkdownInterpreter</strong> into a blockquote. </p>\n"
-                + "</blockquote>"),
+                    + "  <p>This is a very long line that will still be quoted properly when "
+                    + "it wraps. Oh boy let&rsquo;s keep writing to make sure this is long enough "
+                    + "to actually wrap for everyone. Oh, you can <em>put</em> "
+                    + "<strong>MarkdownInterpreter</strong> into a blockquote. </p>\n"
+                    + "</blockquote>"),
         r2.message().get(0).getData());
   }
 
@@ -375,32 +379,25 @@ public class PegdownParserTest {
     // CoreMatchers.containsString("<img src=\"http://www.websequencediagrams.com/?png="));
 
     System.err.println(result.message().get(0).getData());
-    if (!result
-        .message()
-        .get(0)
-        .getData()
-        .contains("<img src=\"http://www.websequencediagrams.com/?png=")) {
-      logger.error(
-          "Expected {} but found {}",
-          "<img src=\"http://www.websequencediagrams.com/?png=",
-          result.message().get(0).getData());
+    if (!result.message().get(0).getData().contains(
+        "<img src=\"http://www.websequencediagrams.com/?png=")) {
+      logger.error("Expected {} but found {}",
+          "<img src=\"http://www.websequencediagrams.com/?png=", result.message().get(0).getData());
     }
   }
 
   @Test
   public void testYumlPlugin() {
-    String input =
-        new StringBuilder()
-            .append("\n \n %%% yuml style=nofunky scale=120 format=svg\n")
-            .append("[Customer]<>-orders>[Order]\n")
-            .append("[Order]++-0..>[LineItem]\n")
-            .append("[Order]-[note:Aggregate root.]\n")
-            .append("  %%%  ")
-            .toString();
+    String input = new StringBuilder()
+        .append("\n \n %%% yuml style=nofunky scale=120 format=svg\n")
+        .append("[Customer]<>-orders>[Order]\n")
+        .append("[Order]++-0..>[LineItem]\n")
+        .append("[Order]-[note:Aggregate root.]\n")
+        .append("  %%%  ")
+        .toString();
 
     InterpreterResult result = md.interpret(input, null);
-    assertThat(
-        result.message().get(0).getData(),
-        CoreMatchers.containsString("<img src=\"http://yuml.me/diagram/"));
+    assertThat(result.message().get(0).getData(),
+            CoreMatchers.containsString("<img src=\"http://yuml.me/diagram/"));
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 2e57570..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,17 +17,7 @@
 
 package org.apache.zeppelin.graph.neo4j;
 
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Properties;
-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;
@@ -38,10 +28,24 @@ import org.neo4j.driver.v1.StatementResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Neo4j connection manager for Zeppelin. */
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.zeppelin.interpreter.InterpreterContext;
+import org.apache.zeppelin.resource.Resource;
+import org.apache.zeppelin.resource.ResourcePool;
+
+/**
+ * Neo4j connection manager for Zeppelin.
+ */
 public class Neo4jConnectionManager {
   static final Logger LOGGER = LoggerFactory.getLogger(Neo4jConnectionManager.class);
-
+  
   public static final String NEO4J_SERVER_URL = "neo4j.url";
   public static final String NEO4J_AUTH_TYPE = "neo4j.auth.type";
   public static final String NEO4J_AUTH_USER = "neo4j.auth.user";
@@ -62,18 +66,16 @@ public class Neo4jConnectionManager {
 
   private final AuthToken authToken;
 
-  /** Enum type for the AuthToken. */
-  public enum Neo4jAuthType {
-    NONE,
-    BASIC
-  }
+  /**
+   * Enum type for the AuthToken.
+   */
+  public enum Neo4jAuthType {NONE, BASIC}
 
   public Neo4jConnectionManager(Properties properties) {
     this.neo4jUrl = properties.getProperty(NEO4J_SERVER_URL);
-    this.config =
-        Config.build()
-            .withMaxIdleSessions(Integer.parseInt(properties.getProperty(NEO4J_MAX_CONCURRENCY)))
-            .toConfig();
+    this.config = Config.build()
+          .withMaxIdleSessions(Integer.parseInt(properties.getProperty(NEO4J_MAX_CONCURRENCY)))
+          .toConfig();
     String authType = properties.getProperty(NEO4J_AUTH_TYPE);
     switch (Neo4jAuthType.valueOf(authType.toUpperCase())) {
       case BASIC:
@@ -109,7 +111,8 @@ public class Neo4jConnectionManager {
     return getDriver().session();
   }
 
-  public StatementResult execute(String cypherQuery, InterpreterContext interpreterContext) {
+  public StatementResult execute(String cypherQuery,
+      InterpreterContext interpreterContext) {
     Map<String, Object> params = new HashMap<>();
     if (interpreterContext != null) {
       ResourcePool resourcePool = interpreterContext.getResourcePool();
@@ -125,8 +128,8 @@ public class Neo4jConnectionManager {
     LOGGER.debug("Executing cypher query {} with params {}", cypherQuery, params);
     StatementResult result;
     try (Session session = getSession()) {
-      result =
-          params.isEmpty() ? getSession().run(cypherQuery) : getSession().run(cypherQuery, params);
+      result = params.isEmpty()
+            ? getSession().run(cypherQuery) : getSession().run(cypherQuery, params);
     }
     return result;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 b/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreter.java
index 6999b5f..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
@@ -17,7 +17,17 @@
 
 package org.apache.zeppelin.graph.neo4j;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.lang.StringUtils;
+import org.neo4j.driver.internal.types.InternalTypeSystem;
+import org.neo4j.driver.internal.util.Iterables;
+import org.neo4j.driver.v1.Record;
+import org.neo4j.driver.v1.StatementResult;
+import org.neo4j.driver.v1.Value;
+import org.neo4j.driver.v1.types.Node;
+import org.neo4j.driver.v1.types.Relationship;
+import org.neo4j.driver.v1.types.TypeSystem;
+import org.neo4j.driver.v1.util.Pair;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashSet;
@@ -27,7 +37,9 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.Set;
-import org.apache.commons.lang.StringUtils;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
 import org.apache.zeppelin.graph.neo4j.utils.Neo4jConversionUtils;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
@@ -36,17 +48,10 @@ import org.apache.zeppelin.interpreter.InterpreterResult.Code;
 import org.apache.zeppelin.interpreter.graph.GraphResult;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
-import org.neo4j.driver.internal.types.InternalTypeSystem;
-import org.neo4j.driver.internal.util.Iterables;
-import org.neo4j.driver.v1.Record;
-import org.neo4j.driver.v1.StatementResult;
-import org.neo4j.driver.v1.Value;
-import org.neo4j.driver.v1.types.Node;
-import org.neo4j.driver.v1.types.Relationship;
-import org.neo4j.driver.v1.types.TypeSystem;
-import org.neo4j.driver.v1.util.Pair;
 
-/** Neo4j interpreter for Zeppelin. */
+/**
+ * Neo4j interpreter for Zeppelin.
+ */
 public class Neo4jCypherInterpreter extends Interpreter {
   private static final String TABLE = "%table";
   public static final String NEW_LINE = "\n";
@@ -57,9 +62,9 @@ public class Neo4jCypherInterpreter extends Interpreter {
   private Map<String, String> labels;
 
   private Set<String> types;
-
+  
   private final Neo4jConnectionManager neo4jConnectionManager;
-
+  
   private final ObjectMapper jsonMapper = new ObjectMapper();
 
   public Neo4jCypherInterpreter(Properties properties) {
@@ -79,8 +84,8 @@ public class Neo4jCypherInterpreter extends Interpreter {
 
   public Map<String, String> getLabels(boolean refresh) {
     if (labels == null || refresh) {
-      Map<String, String> old =
-          labels == null ? new LinkedHashMap<String, String>() : new LinkedHashMap<>(labels);
+      Map<String, String> old = labels == null ?
+          new LinkedHashMap<String, String>() : new LinkedHashMap<>(labels);
       labels = new LinkedHashMap<>();
       StatementResult result = this.neo4jConnectionManager.execute("CALL db.labels()");
       Set<String> colors = new HashSet<>();
@@ -117,7 +122,8 @@ public class Neo4jCypherInterpreter extends Interpreter {
       return new InterpreterResult(Code.SUCCESS);
     }
     try {
-      StatementResult result = this.neo4jConnectionManager.execute(cypherQuery, interpreterContext);
+      StatementResult result = this.neo4jConnectionManager.execute(cypherQuery,
+              interpreterContext);
       Set<Node> nodes = new HashSet<>();
       Set<Relationship> relationships = new HashSet<>();
       List<String> columns = new ArrayList<>();
@@ -135,8 +141,8 @@ public class Neo4jCypherInterpreter extends Interpreter {
             nodes.addAll(Iterables.asList(field.value().asPath().nodes()));
             relationships.addAll(Iterables.asList(field.value().asPath().relationships()));
           } else {
-            setTabularResult(
-                field.key(), field.value(), columns, line, InternalTypeSystem.TYPE_SYSTEM);
+            setTabularResult(field.key(), field.value(), columns, line,
+                    InternalTypeSystem.TYPE_SYSTEM);
           }
         }
         if (!line.isEmpty()) {
@@ -154,19 +160,15 @@ public class Neo4jCypherInterpreter extends Interpreter {
     }
   }
 
-  private void setTabularResult(
-      String key, Object obj, List<String> columns, List<String> line, TypeSystem typeSystem) {
+  private void setTabularResult(String key, Object obj, List<String> columns, List<String> line,
+      TypeSystem typeSystem) {
     if (obj instanceof Value) {
       Value value = (Value) obj;
       if (value.hasType(typeSystem.MAP())) {
         Map<String, Object> map = value.asMap();
         for (Entry<String, Object> entry : map.entrySet()) {
-          setTabularResult(
-              String.format(MAP_KEY_TEMPLATE, key, entry.getKey()),
-              entry.getValue(),
-              columns,
-              line,
-              typeSystem);
+          setTabularResult(String.format(MAP_KEY_TEMPLATE, key, entry.getKey()), entry.getValue(),
+                columns, line, typeSystem);
         }
       } else {
         addValueToLine(key, columns, line, value);
@@ -174,12 +176,8 @@ public class Neo4jCypherInterpreter extends Interpreter {
     } else if (obj instanceof Map) {
       Map<String, Object> map = (Map<String, Object>) obj;
       for (Entry<String, Object> entry : map.entrySet()) {
-        setTabularResult(
-            String.format(MAP_KEY_TEMPLATE, key, entry.getKey()),
-            entry.getValue(),
-            columns,
-            line,
-            typeSystem);
+        setTabularResult(String.format(MAP_KEY_TEMPLATE, key, entry.getKey()), entry.getValue(),
+                columns, line, typeSystem);
       }
     } else {
       addValueToLine(key, columns, line, obj);
@@ -239,7 +237,8 @@ public class Neo4jCypherInterpreter extends Interpreter {
     return new InterpreterResult(Code.SUCCESS, msg.toString());
   }
 
-  private InterpreterResult renderGraph(Set<Node> nodes, Set<Relationship> relationships) {
+  private InterpreterResult renderGraph(Set<Node> nodes,
+      Set<Relationship> relationships) {
     logger.info("Executing renderGraph method");
     List<org.apache.zeppelin.tabledata.Node> nodesList = new ArrayList<>();
     List<org.apache.zeppelin.tabledata.Relationship> relsList = new ArrayList<>();
@@ -250,15 +249,14 @@ public class Neo4jCypherInterpreter extends Interpreter {
     for (Node node : nodes) {
       nodesList.add(Neo4jConversionUtils.toZeppelinNode(node, labels));
     }
-    return new GraphResult(
-        Code.SUCCESS, new GraphResult.Graph(nodesList, relsList, labels, getTypes(true), true));
+    return new GraphResult(Code.SUCCESS,
+        new GraphResult.Graph(nodesList, relsList, labels, getTypes(true), true));
   }
 
   @Override
   public Scheduler getScheduler() {
     return SchedulerFactory.singleton()
-        .createOrGetParallelScheduler(
-            Neo4jCypherInterpreter.class.getName() + this.hashCode(),
+        .createOrGetParallelScheduler(Neo4jCypherInterpreter.class.getName() + this.hashCode(),
             Integer.parseInt(getProperty(Neo4jConnectionManager.NEO4J_MAX_CONCURRENCY)));
   }
 
@@ -273,5 +271,6 @@ public class Neo4jCypherInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+  }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/utils/Neo4jConversionUtils.java
----------------------------------------------------------------------
diff --git a/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/utils/Neo4jConversionUtils.java b/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/utils/Neo4jConversionUtils.java
index ddbc283..571afa9 100644
--- a/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/utils/Neo4jConversionUtils.java
+++ b/neo4j/src/main/java/org/apache/zeppelin/graph/neo4j/utils/Neo4jConversionUtils.java
@@ -17,22 +17,25 @@
 
 package org.apache.zeppelin.graph.neo4j.utils;
 
+import org.neo4j.driver.v1.types.Node;
+import org.neo4j.driver.v1.types.Relationship;
+
 import java.util.LinkedHashSet;
 import java.util.Map;
 import java.util.Set;
-import org.neo4j.driver.v1.types.Node;
-import org.neo4j.driver.v1.types.Relationship;
 
-/** Neo4jConversionUtils. */
+/**
+ * Neo4jConversionUtils.
+ */
 public class Neo4jConversionUtils {
   private Neo4jConversionUtils() {}
-
+  
   private static final String[] LETTERS = "0123456789ABCDEF".split("");
 
   public static final String COLOR_GREY = "#D3D3D3";
-
-  public static org.apache.zeppelin.tabledata.Node toZeppelinNode(
-      Node n, Map<String, String> graphLabels) {
+  
+  public static org.apache.zeppelin.tabledata.Node toZeppelinNode(Node n,
+      Map<String, String> graphLabels) {
     Set<String> labels = new LinkedHashSet<>();
     String firstLabel = null;
     for (String label : n.labels()) {
@@ -41,12 +44,13 @@ public class Neo4jConversionUtils {
       }
       labels.add(label);
     }
-    return new org.apache.zeppelin.tabledata.Node(n.id(), n.asMap(), labels);
+    return new org.apache.zeppelin.tabledata.Node(n.id(), n.asMap(),
+        labels);
   }
-
+  
   public static org.apache.zeppelin.tabledata.Relationship toZeppelinRelationship(Relationship r) {
-    return new org.apache.zeppelin.tabledata.Relationship(
-        r.id(), r.asMap(), r.startNodeId(), r.endNodeId(), r.type());
+    return new org.apache.zeppelin.tabledata.Relationship(r.id(), r.asMap(),
+        r.startNodeId(), r.endNodeId(), r.type());
   }
 
   public static String getRandomLabelColor() {


[15/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/service/InterpreterService.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/service/InterpreterService.java b/zeppelin-server/src/main/java/org/apache/zeppelin/service/InterpreterService.java
index e97cc09..331f838 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/service/InterpreterService.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/service/InterpreterService.java
@@ -154,9 +154,8 @@ public class InterpreterService {
       if (null != serviceCallback) {
         try {
           serviceCallback.onFailure(
-              new Exception(
-                  "Error while downloading " + request.getName() + " as " + e.getMessage()),
-              null);
+              new Exception("Error while downloading " + request.getName() + " as " +
+                  e.getMessage()), null);
         } catch (IOException e1) {
           logger.error("ServiceCallback failure", e1);
         }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/service/JobManagerService.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/service/JobManagerService.java b/zeppelin-server/src/main/java/org/apache/zeppelin/service/JobManagerService.java
index 95628c2..374d8ff 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/service/JobManagerService.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/service/JobManagerService.java
@@ -17,10 +17,6 @@
 
 package org.apache.zeppelin.service;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.zeppelin.notebook.Note;
 import org.apache.zeppelin.notebook.Notebook;
@@ -29,7 +25,14 @@ import org.apache.zeppelin.scheduler.Job;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Service class for JobManager Page */
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Service class for JobManager Page
+ */
 public class JobManagerService {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(JobManagerService.class);
@@ -40,8 +43,9 @@ public class JobManagerService {
     this.notebook = notebook;
   }
 
-  public List<NoteJobInfo> getNoteJobInfo(
-      String noteId, ServiceContext context, ServiceCallback<List<NoteJobInfo>> callback)
+  public List<NoteJobInfo> getNoteJobInfo(String noteId,
+                                          ServiceContext context,
+                                          ServiceCallback<List<NoteJobInfo>> callback)
       throws IOException {
     List<NoteJobInfo> notesJobInfo = new ArrayList<>();
     Note jobNote = notebook.getNote(noteId);
@@ -50,11 +54,12 @@ public class JobManagerService {
     return notesJobInfo;
   }
 
-  /** Get all NoteJobInfo after lastUpdateServerUnixTime */
-  public List<NoteJobInfo> getNoteJobInfoByUnixTime(
-      long lastUpdateServerUnixTime,
-      ServiceContext context,
-      ServiceCallback<List<NoteJobInfo>> callback)
+  /**
+   * Get all NoteJobInfo after lastUpdateServerUnixTime
+   */
+  public List<NoteJobInfo> getNoteJobInfoByUnixTime(long lastUpdateServerUnixTime,
+                                                    ServiceContext context,
+                                                    ServiceCallback<List<NoteJobInfo>> callback)
       throws IOException {
     List<Note> notes = notebook.getAllNotes();
     List<NoteJobInfo> notesJobInfo = new ArrayList<>();
@@ -68,9 +73,9 @@ public class JobManagerService {
     return notesJobInfo;
   }
 
-  public void removeNoteJobInfo(
-      String noteId, ServiceContext context, ServiceCallback<List<NoteJobInfo>> callback)
-      throws IOException {
+  public void removeNoteJobInfo(String noteId,
+                                ServiceContext context,
+                                ServiceCallback<List<NoteJobInfo>> callback) throws IOException {
     List<NoteJobInfo> notesJobInfo = new ArrayList<>();
     notesJobInfo.add(new NoteJobInfo(noteId, true));
     callback.onSuccess(notesJobInfo, context);
@@ -86,6 +91,7 @@ public class JobManagerService {
     }
   }
 
+
   public static class ParagraphJobInfo {
     private String id;
     private String name;
@@ -143,8 +149,8 @@ public class JobManagerService {
     }
 
     private boolean isCron(Note note) {
-      return note.getConfig().containsKey("cron")
-          && !StringUtils.isBlank(note.getConfig().get("cron").toString());
+      return note.getConfig().containsKey("cron") &&
+          !StringUtils.isBlank(note.getConfig().get("cron").toString());
     }
 
     public NoteJobInfo(String noteId, boolean isRemoved) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java b/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java
index f59fe8b..e7a5f03 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java
@@ -17,14 +17,6 @@
 
 package org.apache.zeppelin.service;
 
-import static org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_HOMESCREEN;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.interpreter.Interpreter;
@@ -46,7 +38,18 @@ import org.apache.zeppelin.scheduler.Job;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Service class for Notebook related operations. */
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import static org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_HOMESCREEN;
+
+/**
+ * Service class for Notebook related operations.
+ */
 public class NotebookService {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(NotebookService.class);
@@ -61,15 +64,15 @@ public class NotebookService {
     this.zConf = notebook.getConf();
   }
 
-  public Note getHomeNote(ServiceContext context, ServiceCallback<Note> callback)
-      throws IOException {
+  public Note getHomeNote(ServiceContext context,
+                          ServiceCallback<Note> callback) throws IOException {
     String noteId = notebook.getConf().getString(ZEPPELIN_NOTEBOOK_HOMESCREEN);
     Note note = null;
     if (noteId != null) {
       note = notebook.getNote(noteId);
       if (note != null) {
-        if (!checkPermission(
-            noteId, Permission.READER, Message.OP.GET_HOME_NOTE, context, callback)) {
+        if (!checkPermission(noteId, Permission.READER, Message.OP.GET_HOME_NOTE, context,
+            callback)) {
           return null;
         }
       }
@@ -78,15 +81,17 @@ public class NotebookService {
     return note;
   }
 
-  public Note getNote(String noteId, ServiceContext context, ServiceCallback<Note> callback)
-      throws IOException {
+  public Note getNote(String noteId,
+                      ServiceContext context,
+                      ServiceCallback<Note> callback) throws IOException {
     Note note = notebook.getNote(noteId);
     if (note == null) {
       callback.onFailure(new NoteNotFoundException(noteId), context);
       return null;
     }
 
-    if (!checkPermission(noteId, Permission.READER, Message.OP.GET_NOTE, context, callback)) {
+    if (!checkPermission(noteId, Permission.READER, Message.OP.GET_NOTE, context,
+        callback)) {
       return null;
     }
     if (note.isPersonalizedMode()) {
@@ -96,15 +101,14 @@ public class NotebookService {
     return note;
   }
 
-  public Note createNote(
-      String noteName,
-      String defaultInterpreterGroup,
-      ServiceContext context,
-      ServiceCallback<Note> callback)
-      throws IOException {
+
+  public Note createNote(String noteName,
+                         String defaultInterpreterGroup,
+                         ServiceContext context,
+                         ServiceCallback<Note> callback) throws IOException {
     if (defaultInterpreterGroup == null) {
-      defaultInterpreterGroup =
-          zConf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_GROUP_DEFAULT);
+      defaultInterpreterGroup = zConf.getString(
+          ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_GROUP_DEFAULT);
     }
     if (StringUtils.isBlank(noteName)) {
       noteName = "Untitled Note";
@@ -123,8 +127,10 @@ public class NotebookService {
     }
   }
 
-  public void removeNote(String noteId, ServiceContext context, ServiceCallback<String> callback)
-      throws IOException {
+
+  public void removeNote(String noteId,
+                         ServiceContext context,
+                         ServiceCallback<String> callback) throws IOException {
     if (!checkPermission(noteId, Permission.OWNER, Message.OP.DEL_NOTE, context, callback)) {
       return;
     }
@@ -136,10 +142,9 @@ public class NotebookService {
     }
   }
 
-  public List<Map<String, String>> listNotes(
-      boolean needsReload,
-      ServiceContext context,
-      ServiceCallback<List<Map<String, String>>> callback)
+  public List<Map<String, String>> listNotes(boolean needsReload,
+                                             ServiceContext context,
+                                             ServiceCallback<List<Map<String, String>>> callback)
       throws IOException {
 
     ZeppelinConfiguration conf = notebook.getConf();
@@ -170,9 +175,10 @@ public class NotebookService {
     return notesInfo;
   }
 
-  public void renameNote(
-      String noteId, String newNoteName, ServiceContext context, ServiceCallback<Note> callback)
-      throws IOException {
+  public void renameNote(String noteId,
+                         String newNoteName,
+                         ServiceContext context,
+                         ServiceCallback<Note> callback) throws IOException {
     if (!checkPermission(noteId, Permission.WRITER, Message.OP.NOTE_RENAME, context, callback)) {
       return;
     }
@@ -186,37 +192,38 @@ public class NotebookService {
     } else {
       callback.onFailure(new NoteNotFoundException(noteId), context);
     }
+
   }
 
-  public Note cloneNote(
-      String noteId, String newNoteName, ServiceContext context, ServiceCallback<Note> callback)
-      throws IOException {
+  public Note cloneNote(String noteId,
+                        String newNoteName,
+                        ServiceContext context,
+                        ServiceCallback<Note> callback) throws IOException {
     Note newNote = notebook.cloneNote(noteId, newNoteName, context.getAutheInfo());
     callback.onSuccess(newNote, context);
     return newNote;
   }
 
-  public Note importNote(
-      String noteName, String noteJson, ServiceContext context, ServiceCallback<Note> callback)
-      throws IOException {
+  public Note importNote(String noteName,
+                         String noteJson,
+                         ServiceContext context,
+                         ServiceCallback<Note> callback) throws IOException {
     Note note = notebook.importNote(noteJson, noteName, context.getAutheInfo());
     note.persist(context.getAutheInfo());
     callback.onSuccess(note, context);
     return note;
   }
 
-  public boolean runParagraph(
-      String noteId,
-      String paragraphId,
-      String title,
-      String text,
-      Map<String, Object> params,
-      Map<String, Object> config,
-      boolean failIfDisabled,
-      boolean blocking,
-      ServiceContext context,
-      ServiceCallback<Paragraph> callback)
-      throws IOException {
+  public boolean runParagraph(String noteId,
+                              String paragraphId,
+                              String title,
+                              String text,
+                              Map<String, Object> params,
+                              Map<String, Object> config,
+                              boolean failIfDisabled,
+                              boolean blocking,
+                              ServiceContext context,
+                              ServiceCallback<Paragraph> callback) throws IOException {
 
     if (!checkPermission(noteId, Permission.RUNNER, Message.OP.RUN_PARAGRAPH, context, callback)) {
       return false;
@@ -265,14 +272,12 @@ public class NotebookService {
     }
   }
 
-  public void runAllParagraphs(
-      String noteId,
-      List<Map<String, Object>> paragraphs,
-      ServiceContext context,
-      ServiceCallback<Paragraph> callback)
-      throws IOException {
-    if (!checkPermission(
-        noteId, Permission.RUNNER, Message.OP.RUN_ALL_PARAGRAPHS, context, callback)) {
+  public void runAllParagraphs(String noteId,
+                               List<Map<String, Object>> paragraphs,
+                               ServiceContext context,
+                               ServiceCallback<Paragraph> callback) throws IOException {
+    if (!checkPermission(noteId, Permission.RUNNER, Message.OP.RUN_ALL_PARAGRAPHS, context,
+        callback)) {
       return;
     }
 
@@ -292,22 +297,20 @@ public class NotebookService {
       Map<String, Object> params = (Map<String, Object>) raw.get("params");
       Map<String, Object> config = (Map<String, Object>) raw.get("config");
 
-      if (runParagraph(
-          noteId, paragraphId, title, text, params, config, false, true, context, callback)) {
+      if (runParagraph(noteId, paragraphId, title, text, params, config, false, true,
+          context, callback)) {
         // stop execution when one paragraph fails.
         break;
       }
     }
   }
 
-  public void cancelParagraph(
-      String noteId,
-      String paragraphId,
-      ServiceContext context,
-      ServiceCallback<Paragraph> callback)
-      throws IOException {
-    if (!checkPermission(
-        noteId, Permission.RUNNER, Message.OP.CANCEL_PARAGRAPH, context, callback)) {
+  public void cancelParagraph(String noteId,
+                              String paragraphId,
+                              ServiceContext context,
+                              ServiceCallback<Paragraph> callback) throws IOException {
+    if (!checkPermission(noteId, Permission.RUNNER, Message.OP.CANCEL_PARAGRAPH, context,
+        callback)) {
       return;
     }
     Note note = notebook.getNote(noteId);
@@ -322,14 +325,13 @@ public class NotebookService {
     callback.onSuccess(p, context);
   }
 
-  public void moveParagraph(
-      String noteId,
-      String paragraphId,
-      int newIndex,
-      ServiceContext context,
-      ServiceCallback<Paragraph> callback)
-      throws IOException {
-    if (!checkPermission(noteId, Permission.WRITER, Message.OP.MOVE_PARAGRAPH, context, callback)) {
+  public void moveParagraph(String noteId,
+                            String paragraphId,
+                            int newIndex,
+                            ServiceContext context,
+                            ServiceCallback<Paragraph> callback) throws IOException {
+    if (!checkPermission(noteId, Permission.WRITER, Message.OP.MOVE_PARAGRAPH, context,
+        callback)) {
       return;
     }
     Note note = notebook.getNote(noteId);
@@ -340,8 +342,8 @@ public class NotebookService {
       throw new ParagraphNotFoundException(paragraphId);
     }
     if (newIndex >= note.getParagraphCount()) {
-      callback.onFailure(
-          new BadRequestException("newIndex " + newIndex + " is out of bounds"), context);
+      callback.onFailure(new BadRequestException("newIndex " + newIndex + " is out of bounds"),
+          context);
       return;
     }
     note.moveParagraph(paragraphId, newIndex);
@@ -349,14 +351,12 @@ public class NotebookService {
     callback.onSuccess(note.getParagraph(newIndex), context);
   }
 
-  public void removeParagraph(
-      String noteId,
-      String paragraphId,
-      ServiceContext context,
-      ServiceCallback<Paragraph> callback)
-      throws IOException {
-    if (!checkPermission(
-        noteId, Permission.WRITER, Message.OP.PARAGRAPH_REMOVE, context, callback)) {
+  public void removeParagraph(String noteId,
+                              String paragraphId,
+                              ServiceContext context,
+                              ServiceCallback<Paragraph> callback) throws IOException {
+    if (!checkPermission(noteId, Permission.WRITER, Message.OP.PARAGRAPH_REMOVE, context,
+        callback)) {
       return;
     }
     Note note = notebook.getNote(noteId);
@@ -371,15 +371,13 @@ public class NotebookService {
     callback.onSuccess(p, context);
   }
 
-  public Paragraph insertParagraph(
-      String noteId,
-      int index,
-      Map<String, Object> config,
-      ServiceContext context,
-      ServiceCallback<Paragraph> callback)
-      throws IOException {
-    if (!checkPermission(
-        noteId, Permission.WRITER, Message.OP.INSERT_PARAGRAPH, context, callback)) {
+  public Paragraph insertParagraph(String noteId,
+                                   int index,
+                                   Map<String, Object> config,
+                                   ServiceContext context,
+                                   ServiceCallback<Paragraph> callback) throws IOException {
+    if (!checkPermission(noteId, Permission.WRITER, Message.OP.INSERT_PARAGRAPH, context,
+        callback)) {
       return null;
     }
     Note note = notebook.getNote(noteId);
@@ -393,9 +391,11 @@ public class NotebookService {
     return newPara;
   }
 
-  public void restoreNote(String noteId, ServiceContext context, ServiceCallback<Note> callback)
-      throws IOException {
-    if (!checkPermission(noteId, Permission.WRITER, Message.OP.RESTORE_NOTE, context, callback)) {
+  public void restoreNote(String noteId,
+                          ServiceContext context,
+                          ServiceCallback<Note> callback) throws IOException {
+    if (!checkPermission(noteId, Permission.WRITER, Message.OP.RESTORE_NOTE, context,
+        callback)) {
       return;
     }
     Note note = notebook.getNote(noteId);
@@ -403,7 +403,7 @@ public class NotebookService {
       callback.onFailure(new NoteNotFoundException(noteId), context);
       return;
     }
-    // restore cron
+    //restore cron
     Map<String, Object> config = note.getConfig();
     if (config.get("cron") != null) {
       notebook.refreshCron(note.getId());
@@ -413,25 +413,21 @@ public class NotebookService {
       String newName = note.getName().replaceFirst(Folder.TRASH_FOLDER_ID + "/", "");
       renameNote(noteId, newName, context, callback);
     } else {
-      callback.onFailure(
-          new IOException(
-              String.format("Trying to restore a note {} " + "which is not in Trash", noteId)),
-          context);
+      callback.onFailure(new IOException(String.format("Trying to restore a note {} " +
+          "which is not in Trash", noteId)), context);
     }
   }
 
-  public void updateParagraph(
-      String noteId,
-      String paragraphId,
-      String title,
-      String text,
-      Map<String, Object> params,
-      Map<String, Object> config,
-      ServiceContext context,
-      ServiceCallback<Paragraph> callback)
-      throws IOException {
-    if (!checkPermission(
-        noteId, Permission.WRITER, Message.OP.COMMIT_PARAGRAPH, context, callback)) {
+  public void updateParagraph(String noteId,
+                              String paragraphId,
+                              String title,
+                              String text,
+                              Map<String, Object> params,
+                              Map<String, Object> config,
+                              ServiceContext context,
+                              ServiceCallback<Paragraph> callback) throws IOException {
+    if (!checkPermission(noteId, Permission.WRITER, Message.OP.COMMIT_PARAGRAPH, context,
+        callback)) {
       return;
     }
     Note note = notebook.getNote(noteId);
@@ -460,14 +456,12 @@ public class NotebookService {
     callback.onSuccess(p, context);
   }
 
-  public void clearParagraphOutput(
-      String noteId,
-      String paragraphId,
-      ServiceContext context,
-      ServiceCallback<Paragraph> callback)
-      throws IOException {
-    if (!checkPermission(
-        noteId, Permission.WRITER, Message.OP.PARAGRAPH_CLEAR_OUTPUT, context, callback)) {
+  public void clearParagraphOutput(String noteId,
+                                   String paragraphId,
+                                   ServiceContext context,
+                                   ServiceCallback<Paragraph> callback) throws IOException {
+    if (!checkPermission(noteId, Permission.WRITER, Message.OP.PARAGRAPH_CLEAR_OUTPUT, context,
+        callback)) {
       return;
     }
     Note note = notebook.getNote(noteId);
@@ -482,8 +476,8 @@ public class NotebookService {
     }
     Paragraph returnedParagraph = null;
     if (note.isPersonalizedMode()) {
-      returnedParagraph =
-          note.clearPersonalizedParagraphOutput(paragraphId, context.getAutheInfo().getUser());
+      returnedParagraph = note.clearPersonalizedParagraphOutput(paragraphId,
+          context.getAutheInfo().getUser());
     } else {
       note.clearParagraphOutput(paragraphId);
       returnedParagraph = note.getParagraph(paragraphId);
@@ -491,10 +485,11 @@ public class NotebookService {
     callback.onSuccess(returnedParagraph, context);
   }
 
-  public void clearAllParagraphOutput(
-      String noteId, ServiceContext context, ServiceCallback<Note> callback) throws IOException {
-    if (!checkPermission(
-        noteId, Permission.WRITER, Message.OP.PARAGRAPH_CLEAR_ALL_OUTPUT, context, callback)) {
+  public void clearAllParagraphOutput(String noteId,
+                                      ServiceContext context,
+                                      ServiceCallback<Note> callback) throws IOException {
+    if (!checkPermission(noteId, Permission.WRITER, Message.OP.PARAGRAPH_CLEAR_ALL_OUTPUT, context,
+        callback)) {
       return;
     }
     Note note = notebook.getNote(noteId);
@@ -507,14 +502,15 @@ public class NotebookService {
     callback.onSuccess(note, context);
   }
 
-  public void updateNote(
-      String noteId,
-      String name,
-      Map<String, Object> config,
-      ServiceContext context,
-      ServiceCallback<Note> callback)
-      throws IOException {
-    if (!checkPermission(noteId, Permission.WRITER, Message.OP.NOTE_UPDATE, context, callback)) {
+
+
+  public void updateNote(String noteId,
+                         String name,
+                         Map<String, Object> config,
+                         ServiceContext context,
+                         ServiceCallback<Note> callback) throws IOException {
+    if (!checkPermission(noteId, Permission.WRITER, Message.OP.NOTE_UPDATE, context,
+        callback)) {
       return;
     }
 
@@ -540,11 +536,11 @@ public class NotebookService {
     callback.onSuccess(note, context);
   }
 
+
   private boolean isCronUpdated(Map<String, Object> configA, Map<String, Object> configB) {
     boolean cronUpdated = false;
-    if (configA.get("cron") != null
-        && configB.get("cron") != null
-        && configA.get("cron").equals(configB.get("cron"))) {
+    if (configA.get("cron") != null && configB.get("cron") != null && configA.get("cron")
+        .equals(configB.get("cron"))) {
       cronUpdated = true;
     } else if (configA.get("cron") == null && configB.get("cron") == null) {
       cronUpdated = false;
@@ -555,14 +551,12 @@ public class NotebookService {
     return cronUpdated;
   }
 
-  public void saveNoteForms(
-      String noteId,
-      Map<String, Object> noteParams,
-      ServiceContext context,
-      ServiceCallback<Note> callback)
-      throws IOException {
-    if (!checkPermission(
-        noteId, Permission.WRITER, Message.OP.SAVE_NOTE_FORMS, context, callback)) {
+  public void saveNoteForms(String noteId,
+                            Map<String, Object> noteParams,
+                            ServiceContext context,
+                            ServiceCallback<Note> callback) throws IOException {
+    if (!checkPermission(noteId, Permission.WRITER, Message.OP.SAVE_NOTE_FORMS, context,
+        callback)) {
       return;
     }
 
@@ -577,17 +571,18 @@ public class NotebookService {
     callback.onSuccess(note, context);
   }
 
-  public void removeNoteForms(
-      String noteId, String formName, ServiceContext context, ServiceCallback<Note> callback)
-      throws IOException {
+  public void removeNoteForms(String noteId,
+                              String formName,
+                              ServiceContext context,
+                              ServiceCallback<Note> callback) throws IOException {
     Note note = notebook.getNote(noteId);
     if (note == null) {
       callback.onFailure(new NoteNotFoundException(noteId), context);
       return;
     }
 
-    if (!checkPermission(
-        noteId, Permission.WRITER, Message.OP.REMOVE_NOTE_FORMS, context, callback)) {
+    if (!checkPermission(noteId, Permission.WRITER, Message.OP.REMOVE_NOTE_FORMS, context,
+        callback)) {
       return;
     }
 
@@ -601,8 +596,7 @@ public class NotebookService {
       String noteId,
       String commitMessage,
       ServiceContext context,
-      ServiceCallback<NotebookRepoWithVersionControl.Revision> callback)
-      throws IOException {
+      ServiceCallback<NotebookRepoWithVersionControl.Revision> callback) throws IOException {
 
     Note note = notebook.getNote(noteId);
     if (note == null) {
@@ -610,8 +604,8 @@ public class NotebookService {
       return null;
     }
 
-    if (!checkPermission(
-        noteId, Permission.WRITER, Message.OP.REMOVE_NOTE_FORMS, context, callback)) {
+    if (!checkPermission(noteId, Permission.WRITER, Message.OP.REMOVE_NOTE_FORMS, context,
+        callback)) {
       return null;
     }
 
@@ -624,8 +618,7 @@ public class NotebookService {
   public List<NotebookRepoWithVersionControl.Revision> listRevisionHistory(
       String noteId,
       ServiceContext context,
-      ServiceCallback<List<NotebookRepoWithVersionControl.Revision>> callback)
-      throws IOException {
+      ServiceCallback<List<NotebookRepoWithVersionControl.Revision>> callback) throws IOException {
 
     Note note = notebook.getNote(noteId);
     if (note == null) {
@@ -645,17 +638,19 @@ public class NotebookService {
     return revisions;
   }
 
-  public Note setNoteRevision(
-      String noteId, String revisionId, ServiceContext context, ServiceCallback<Note> callback)
-      throws IOException {
+
+  public Note setNoteRevision(String noteId,
+                              String revisionId,
+                              ServiceContext context,
+                              ServiceCallback<Note> callback) throws IOException {
     Note note = notebook.getNote(noteId);
     if (note == null) {
       callback.onFailure(new NoteNotFoundException(noteId), context);
       return null;
     }
 
-    if (!checkPermission(
-        noteId, Permission.WRITER, Message.OP.SET_NOTE_REVISION, context, callback)) {
+    if (!checkPermission(noteId, Permission.WRITER, Message.OP.SET_NOTE_REVISION, context,
+        callback)) {
       return null;
     }
 
@@ -669,9 +664,10 @@ public class NotebookService {
     }
   }
 
-  public void getNotebyRevision(
-      String noteId, String revisionId, ServiceContext context, ServiceCallback<Note> callback)
-      throws IOException {
+  public void getNotebyRevision(String noteId,
+                                String revisionId,
+                                ServiceContext context,
+                                ServiceCallback<Note> callback) throws IOException {
 
     Note note = notebook.getNote(noteId);
     if (note == null) {
@@ -679,16 +675,18 @@ public class NotebookService {
       return;
     }
 
-    if (!checkPermission(noteId, Permission.READER, Message.OP.NOTE_REVISION, context, callback)) {
+    if (!checkPermission(noteId, Permission.READER, Message.OP.NOTE_REVISION, context,
+        callback)) {
       return;
     }
     Note revisionNote = notebook.getNoteByRevision(noteId, revisionId, context.getAutheInfo());
     callback.onSuccess(revisionNote, context);
   }
 
-  public void getNoteByRevisionForCompare(
-      String noteId, String revisionId, ServiceContext context, ServiceCallback<Note> callback)
-      throws IOException {
+  public void getNoteByRevisionForCompare(String noteId,
+                                          String revisionId,
+                                          ServiceContext context,
+                                          ServiceCallback<Note> callback) throws IOException {
 
     Note note = notebook.getNote(noteId);
     if (note == null) {
@@ -696,8 +694,8 @@ public class NotebookService {
       return;
     }
 
-    if (!checkPermission(
-        noteId, Permission.READER, Message.OP.NOTE_REVISION_FOR_COMPARE, context, callback)) {
+    if (!checkPermission(noteId, Permission.READER, Message.OP.NOTE_REVISION_FOR_COMPARE, context,
+        callback)) {
       return;
     }
     Note revisionNote = null;
@@ -715,8 +713,7 @@ public class NotebookService {
       String buffer,
       int cursor,
       ServiceContext context,
-      ServiceCallback<List<InterpreterCompletion>> callback)
-      throws IOException {
+      ServiceCallback<List<InterpreterCompletion>> callback) throws IOException {
 
     Note note = notebook.getNote(noteId);
     if (note == null) {
@@ -724,7 +721,8 @@ public class NotebookService {
       return null;
     }
 
-    if (!checkPermission(noteId, Permission.WRITER, Message.OP.COMPLETION, context, callback)) {
+    if (!checkPermission(noteId, Permission.WRITER, Message.OP.COMPLETION, context,
+        callback)) {
       return null;
     }
 
@@ -738,12 +736,10 @@ public class NotebookService {
     }
   }
 
-  public void getEditorSetting(
-      String noteId,
-      String replName,
-      ServiceContext context,
-      ServiceCallback<Map<String, Object>> callback)
-      throws IOException {
+  public void getEditorSetting(String noteId,
+                               String replName,
+                               ServiceContext context,
+                               ServiceCallback<Map<String, Object>> callback) throws IOException {
 
     Note note = notebook.getNote(noteId);
     if (note == null) {
@@ -751,18 +747,11 @@ public class NotebookService {
       return;
     }
     try {
-      Interpreter intp =
-          notebook
-              .getInterpreterFactory()
-              .getInterpreter(
-                  context.getAutheInfo().getUser(),
-                  noteId,
-                  replName,
-                  notebook.getNote(noteId).getDefaultInterpreterGroup());
-      Map<String, Object> settings =
-          notebook
-              .getInterpreterSettingManager()
-              .getEditorSetting(intp, context.getAutheInfo().getUser(), noteId, replName);
+      Interpreter intp = notebook.getInterpreterFactory().getInterpreter(
+          context.getAutheInfo().getUser(), noteId, replName,
+          notebook.getNote(noteId).getDefaultInterpreterGroup());
+      Map<String, Object> settings = notebook.getInterpreterSettingManager().
+          getEditorSetting(intp, context.getAutheInfo().getUser(), noteId, replName);
       callback.onSuccess(settings, context);
     } catch (InterpreterNotFoundException e) {
       callback.onFailure(new IOException("Fail to find interpreter", e), context);
@@ -770,6 +759,7 @@ public class NotebookService {
     }
   }
 
+
   enum Permission {
     READER,
     WRITER,
@@ -778,8 +768,8 @@ public class NotebookService {
   }
 
   /**
-   * Return null when it is allowed, otherwise return the error message which could be propagated to
-   * frontend
+   * Return null when it is allowed, otherwise return the error message which could be
+   * propagated to frontend
    *
    * @param noteId
    * @param context
@@ -787,13 +777,11 @@ public class NotebookService {
    * @param op
    * @return
    */
-  private <T> boolean checkPermission(
-      String noteId,
-      Permission permission,
-      Message.OP op,
-      ServiceContext context,
-      ServiceCallback<T> callback)
-      throws IOException {
+  private <T> boolean checkPermission(String noteId,
+                                      Permission permission,
+                                      Message.OP op,
+                                      ServiceContext context,
+                                      ServiceCallback<T> callback) throws IOException {
     boolean isAllowed = false;
     Set<String> allowed = null;
     switch (permission) {
@@ -817,17 +805,9 @@ public class NotebookService {
     if (isAllowed) {
       return true;
     } else {
-      String errorMsg =
-          "Insufficient privileges to "
-              + permission
-              + " note.\n"
-              + "Allowed users or roles: "
-              + allowed
-              + "\n"
-              + "But the user "
-              + context.getAutheInfo().getUser()
-              + " belongs to: "
-              + context.getUserAndRoles();
+      String errorMsg = "Insufficient privileges to " + permission + " note.\n" +
+          "Allowed users or roles: " + allowed + "\n" + "But the user " +
+          context.getAutheInfo().getUser() + " belongs to: " + context.getUserAndRoles();
       callback.onFailure(new ForbiddenException(errorMsg), context);
       return false;
     }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/service/ServiceCallback.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/service/ServiceCallback.java b/zeppelin-server/src/main/java/org/apache/zeppelin/service/ServiceCallback.java
index a1ab090..fd5af9e 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/service/ServiceCallback.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/service/ServiceCallback.java
@@ -19,12 +19,13 @@ package org.apache.zeppelin.service;
 
 import java.io.IOException;
 
-/** This will be used by service classes as callback mechanism. */
+/**
+ * This will be used by service classes as callback mechanism.
+ */
 public interface ServiceCallback<T> {
 
   /**
    * Called when this service call is starting
-   *
    * @param message
    * @param context
    * @throws IOException
@@ -33,7 +34,6 @@ public interface ServiceCallback<T> {
 
   /**
    * Called when this service call is succeed
-   *
    * @param result
    * @param context
    * @throws IOException
@@ -41,11 +41,11 @@ public interface ServiceCallback<T> {
   void onSuccess(T result, ServiceContext context) throws IOException;
 
   /**
-   * Called when this service call is failed
-   *
+   * Called when this service call is failed 
    * @param ex
    * @param context
    * @throws IOException
    */
   void onFailure(Exception ex, ServiceContext context) throws IOException;
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/service/ServiceContext.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/service/ServiceContext.java b/zeppelin-server/src/main/java/org/apache/zeppelin/service/ServiceContext.java
index 390801c..3db8bf8 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/service/ServiceContext.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/service/ServiceContext.java
@@ -15,12 +15,16 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.service;
 
-import java.util.Set;
 import org.apache.zeppelin.user.AuthenticationInfo;
 
-/** Context info for Service call */
+import java.util.Set;
+
+/**
+ * Context info for Service call
+ */
 public class ServiceContext {
 
   private AuthenticationInfo autheInfo;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/service/SimpleServiceCallback.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/service/SimpleServiceCallback.java b/zeppelin-server/src/main/java/org/apache/zeppelin/service/SimpleServiceCallback.java
index 699f3e2..6957707 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/service/SimpleServiceCallback.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/service/SimpleServiceCallback.java
@@ -15,13 +15,18 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.service;
 
-import java.io.IOException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** @param <T> */
+import java.io.IOException;
+
+/**
+ *
+ * @param <T>
+ */
 public class SimpleServiceCallback<T> implements ServiceCallback<T> {
 
   private static Logger LOGGER = LoggerFactory.getLogger(SimpleServiceCallback.class);
@@ -40,4 +45,5 @@ public class SimpleServiceCallback<T> implements ServiceCallback<T> {
   public void onFailure(Exception ex, ServiceContext context) throws IOException {
     LOGGER.warn(ex.getMessage());
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/socket/ConnectionManager.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/ConnectionManager.java b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/ConnectionManager.java
index 34351b5..5d02d9f 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/ConnectionManager.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/ConnectionManager.java
@@ -17,22 +17,11 @@
 
 package org.apache.zeppelin.socket;
 
+
 import com.google.common.collect.Queues;
 import com.google.common.collect.Sets;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-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 org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.display.GUI;
@@ -48,17 +37,30 @@ import org.apache.zeppelin.util.WatcherSecurityKey;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Manager class for managing websocket connections */
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+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;
+
+/**
+ * Manager class for managing websocket connections
+ */
 public class ConnectionManager {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(ConnectionManager.class);
-  private static Gson gson =
-      new GsonBuilder()
-          .setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
-          .registerTypeAdapter(Date.class, new NotebookImportDeserializer())
-          .setPrettyPrinting()
-          .registerTypeAdapterFactory(Input.TypeAdapterFactory)
-          .create();
+  private static Gson gson = new GsonBuilder()
+      .setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
+      .registerTypeAdapter(Date.class, new NotebookImportDeserializer())
+      .setPrettyPrinting()
+      .registerTypeAdapterFactory(Input.TypeAdapterFactory).create();
 
   final Queue<NotebookSocket> connectedSockets = new ConcurrentLinkedQueue<>();
   // noteId -> connection
@@ -67,15 +69,18 @@ public class ConnectionManager {
   final Map<String, Queue<NotebookSocket>> userSocketMap = new ConcurrentHashMap<>();
 
   /**
-   * This is a special endpoint in the notebook websoket, Every connection in this Queue will be
-   * able to watch every websocket event, it doesnt need to be listed into the map of noteSocketMap.
-   * This can be used to get information about websocket traffic and watch what is going on.
+   * This is a special endpoint in the notebook websoket, Every connection in this Queue
+   * will be able to watch every websocket event, it doesnt need to be listed into the map of
+   * noteSocketMap. This can be used to get information about websocket traffic and watch what
+   * is going on.
    */
   final Queue<NotebookSocket> watcherSockets = Queues.newConcurrentLinkedQueue();
 
   private HashSet<String> collaborativeModeList = new HashSet<>();
-  private Boolean collaborativeModeEnable =
-      ZeppelinConfiguration.create().isZeppelinNotebookCollaborativeModeEnable();
+  private Boolean collaborativeModeEnable = ZeppelinConfiguration
+      .create()
+      .isZeppelinNotebookCollaborativeModeEnable();
+
 
   public void addConnection(NotebookSocket conn) {
     connectedSockets.add(conn);
@@ -198,6 +203,7 @@ public class ConnectionManager {
     broadcast(noteId, message);
   }
 
+
   protected String serializeMessage(Message m) {
     return gson.toJson(m);
   }
@@ -239,11 +245,8 @@ public class ConnectionManager {
       for (NotebookSocket watcher : watcherSockets) {
         try {
           watcher.send(
-              WatcherMessage.builder(noteId)
-                  .subject(subject)
-                  .message(serializeMessage(message))
-                  .build()
-                  .toJson());
+              WatcherMessage.builder(noteId).subject(subject).message(serializeMessage(message))
+                  .build().toJson());
         } catch (IOException e) {
           LOGGER.error("Cannot broadcast message to watcher", e);
         }
@@ -275,7 +278,9 @@ public class ConnectionManager {
     }
   }
 
-  /** Send websocket message to all connections regardless of notebook id. */
+  /**
+   * Send websocket message to all connections regardless of notebook id.
+   */
   public void broadcastToAllConnections(String serialized) {
     broadcastToAllConnectionsExcept(null, serialized);
   }
@@ -304,6 +309,7 @@ public class ConnectionManager {
     return connectedUsers;
   }
 
+
   public void multicastToUser(String user, Message m) {
     if (!userSocketMap.containsKey(user)) {
       LOGGER.warn("Multicasting to user {} that is not in connections map", user);
@@ -340,15 +346,15 @@ public class ConnectionManager {
     }
   }
 
-  public void broadcastNoteListExcept(
-      List<Map<String, String>> notesInfo, AuthenticationInfo subject) {
+  public void broadcastNoteListExcept(List<Map<String, String>> notesInfo,
+                                      AuthenticationInfo subject) {
     Set<String> userAndRoles;
     NotebookAuthorization authInfo = NotebookAuthorization.getInstance();
     for (String user : userSocketMap.keySet()) {
       if (subject.getUser().equals(user)) {
         continue;
       }
-      // reloaded already above; parameter - false
+      //reloaded already above; parameter - false
       userAndRoles = authInfo.getRoles(user);
       userAndRoles.add(user);
       // TODO(zjffdu) is it ok for comment the following line ?
@@ -371,12 +377,12 @@ public class ConnectionManager {
     }
   }
 
-  public void broadcastParagraphs(
-      Map<String, Paragraph> userParagraphMap, Paragraph defaultParagraph) {
+  public void broadcastParagraphs(Map<String, Paragraph> userParagraphMap,
+                                  Paragraph defaultParagraph) {
     if (null != userParagraphMap) {
       for (String user : userParagraphMap.keySet()) {
-        multicastToUser(
-            user, new Message(Message.OP.PARAGRAPH).put("paragraph", userParagraphMap.get(user)));
+        multicastToUser(user,
+            new Message(Message.OP.PARAGRAPH).put("paragraph", userParagraphMap.get(user)));
       }
     }
   }
@@ -384,8 +390,7 @@ public class ConnectionManager {
   private void broadcastNewParagraph(Note note, Paragraph para) {
     LOGGER.info("Broadcasting paragraph on run call instead of note.");
     int paraIndex = note.getParagraphs().indexOf(para);
-    broadcast(
-        note.getId(),
+    broadcast(note.getId(),
         new Message(Message.OP.PARAGRAPH_ADDED).put("paragraph", para).put("index", paraIndex));
   }
 
@@ -401,12 +406,13 @@ public class ConnectionManager {
   //    broadcastNoteListExcept(notesInfo, subject);
   //  }
 
+
   private void broadcastNoteForms(Note note) {
     GUI formsSettings = new GUI();
     formsSettings.setForms(note.getNoteForms());
     formsSettings.setParams(note.getNoteParams());
-    broadcast(
-        note.getId(), new Message(Message.OP.SAVE_NOTE_FORMS).put("formsData", formsSettings));
+    broadcast(note.getId(), new Message(Message.OP.SAVE_NOTE_FORMS)
+        .put("formsData", formsSettings));
   }
 
   public void switchConnectionToWatcher(NotebookSocket conn) {
@@ -430,7 +436,7 @@ public class ConnectionManager {
 
   private boolean isSessionAllowedToSwitchToWatcher(NotebookSocket session) {
     String watcherSecurityKey = session.getRequest().getHeader(WatcherSecurityKey.HTTP_HEADER);
-    return !(StringUtils.isBlank(watcherSecurityKey)
-        || !watcherSecurityKey.equals(WatcherSecurityKey.getKey()));
+    return !(StringUtils.isBlank(watcherSecurityKey) || !watcherSecurityKey
+        .equals(WatcherSecurityKey.getKey()));
   }
 }


[32/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/SparkParagraphIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/SparkParagraphIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/SparkParagraphIT.java
index 479eae5..1804fc4 100644
--- a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/SparkParagraphIT.java
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/SparkParagraphIT.java
@@ -17,7 +17,7 @@
 
 package org.apache.zeppelin.integration;
 
-import java.util.List;
+
 import org.apache.zeppelin.AbstractZeppelinIT;
 import org.apache.zeppelin.WebDriverManager;
 import org.hamcrest.CoreMatchers;
@@ -32,10 +32,13 @@ import org.openqa.selenium.WebElement;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.List;
+
 public class SparkParagraphIT extends AbstractZeppelinIT {
   private static final Logger LOG = LoggerFactory.getLogger(SparkParagraphIT.class);
 
-  @Rule public ErrorCollector collector = new ErrorCollector();
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
 
   @Before
   public void startUp() {
@@ -69,35 +72,33 @@ public class SparkParagraphIT extends AbstractZeppelinIT {
       val bank = bankText.map(s => s.split(";")).filter(s => s(0) != "\"age\"").map(s => Bank(s(0).toInt,s(1).replaceAll("\"", ""),s(2).replaceAll("\"", ""),s(3).replaceAll("\"", ""),s(5).replaceAll("\"", "").toInt)).toDF()
       bank.registerTempTable("bank")
        */
-      setTextOfParagraph(
-          2,
-          "import org.apache.commons.io.IOUtils\\n"
-              + "import java.net.URL\\n"
-              + "import java.nio.charset.Charset\\n"
-              + "val bankText = sc.parallelize(IOUtils.toString(new URL(\"https://s3.amazonaws.com/apache-zeppelin/tutorial/bank/bank.csv\"),Charset.forName(\"utf8\")).split(\"\\\\n\"))\\n"
-              + "case class Bank(age: Integer, job: String, marital: String, education: String, balance: Integer)\\n"
-              + "\\n"
-              + "val bank = bankText.map(s => s.split(\";\")).filter(s => s(0) != \"\\\\\"age\\\\\"\").map(s => Bank(s(0).toInt,s(1).replaceAll(\"\\\\\"\", \"\"),s(2).replaceAll(\"\\\\\"\", \"\"),s(3).replaceAll(\"\\\\\"\", \"\"),s(5).replaceAll(\"\\\\\"\", \"\").toInt)).toDF()\\n"
-              + "bank.registerTempTable(\"bank\")");
+      setTextOfParagraph(2, "import org.apache.commons.io.IOUtils\\n" +
+          "import java.net.URL\\n" +
+          "import java.nio.charset.Charset\\n" +
+          "val bankText = sc.parallelize(IOUtils.toString(new URL(\"https://s3.amazonaws.com/apache-zeppelin/tutorial/bank/bank.csv\"),Charset.forName(\"utf8\")).split(\"\\\\n\"))\\n" +
+          "case class Bank(age: Integer, job: String, marital: String, education: String, balance: Integer)\\n" +
+          "\\n" +
+          "val bank = bankText.map(s => s.split(\";\")).filter(s => s(0) != \"\\\\\"age\\\\\"\").map(s => Bank(s(0).toInt,s(1).replaceAll(\"\\\\\"\", \"\"),s(2).replaceAll(\"\\\\\"\", \"\"),s(3).replaceAll(\"\\\\\"\", \"\"),s(5).replaceAll(\"\\\\\"\", \"\").toInt)).toDF()\\n" +
+          "bank.registerTempTable(\"bank\")");
       runParagraph(2);
 
       try {
         waitForParagraph(2, "FINISHED");
       } catch (TimeoutException e) {
         waitForParagraph(2, "ERROR");
-        collector.checkThat(
-            "2nd Paragraph from SparkParagraphIT of testSpark status:",
-            "ERROR",
-            CoreMatchers.equalTo("FINISHED"));
+        collector.checkThat("2nd Paragraph from SparkParagraphIT of testSpark status:",
+            "ERROR", CoreMatchers.equalTo("FINISHED")
+        );
       }
 
-      WebElement paragraph2Result =
-          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@id,\"_text\")]"));
+      WebElement paragraph2Result = driver.findElement(By.xpath(
+          getParagraphXPath(2) + "//div[contains(@id,\"_text\")]"));
 
-      collector.checkThat(
-          "2nd Paragraph from SparkParagraphIT of testSpark result: ",
-          paragraph2Result.getText().toString(),
-          CoreMatchers.containsString("import org.apache.commons.io.IOUtils"));
+      collector.checkThat("2nd Paragraph from SparkParagraphIT of testSpark result: ",
+          paragraph2Result.getText().toString(), CoreMatchers.containsString(
+              "import org.apache.commons.io.IOUtils"
+          )
+      );
 
     } catch (Exception e) {
       handleException("Exception in SparkParagraphIT while testSpark", e);
@@ -107,8 +108,9 @@ public class SparkParagraphIT extends AbstractZeppelinIT {
   @Test
   public void testPySpark() throws Exception {
     try {
-      setTextOfParagraph(
-          1, "%pyspark\\n" + "for x in range(0, 3):\\n" + "    print \"test loop %d\" % (x)");
+      setTextOfParagraph(1, "%pyspark\\n" +
+          "for x in range(0, 3):\\n" +
+          "    print \"test loop %d\" % (x)");
 
       runParagraph(1);
 
@@ -116,37 +118,35 @@ public class SparkParagraphIT extends AbstractZeppelinIT {
         waitForParagraph(1, "FINISHED");
       } catch (TimeoutException e) {
         waitForParagraph(1, "ERROR");
-        collector.checkThat(
-            "Paragraph from SparkParagraphIT of testPySpark status: ",
-            "ERROR",
-            CoreMatchers.equalTo("FINISHED"));
+        collector.checkThat("Paragraph from SparkParagraphIT of testPySpark status: ",
+            "ERROR", CoreMatchers.equalTo("FINISHED")
+        );
       }
 
-      WebElement paragraph1Result =
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@id,\"_text\")]"));
-      collector.checkThat(
-          "Paragraph from SparkParagraphIT of testPySpark result: ",
-          paragraph1Result.getText().toString(),
-          CoreMatchers.containsString("test loop 0\ntest loop 1\ntest loop 2"));
+      WebElement paragraph1Result = driver.findElement(By.xpath(
+          getParagraphXPath(1) + "//div[contains(@id,\"_text\")]"));
+      collector.checkThat("Paragraph from SparkParagraphIT of testPySpark result: ",
+          paragraph1Result.getText().toString(), CoreMatchers.containsString("test loop 0\ntest loop 1\ntest loop 2")
+      );
 
       // the last statement's evaluation result is printed
-      setTextOfParagraph(2, "%pyspark\\n" + "sc.version\\n" + "1+1");
+      setTextOfParagraph(2, "%pyspark\\n" +
+          "sc.version\\n" +
+          "1+1");
       runParagraph(2);
       try {
         waitForParagraph(2, "FINISHED");
       } catch (TimeoutException e) {
         waitForParagraph(2, "ERROR");
-        collector.checkThat(
-            "Paragraph from SparkParagraphIT of testPySpark status: ",
-            "ERROR",
-            CoreMatchers.equalTo("FINISHED"));
+        collector.checkThat("Paragraph from SparkParagraphIT of testPySpark status: ",
+                "ERROR", CoreMatchers.equalTo("FINISHED")
+        );
       }
-      WebElement paragraph2Result =
-          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@id,\"_text\")]"));
-      collector.checkThat(
-          "Paragraph from SparkParagraphIT of testPySpark result: ",
-          paragraph2Result.getText().toString(),
-          CoreMatchers.equalTo("2"));
+      WebElement paragraph2Result = driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@id,\"_text\")]"));
+      collector.checkThat("Paragraph from SparkParagraphIT of testPySpark result: ",
+          paragraph2Result.getText().toString(), CoreMatchers.equalTo("2")
+      );
 
     } catch (Exception e) {
       handleException("Exception in SparkParagraphIT while testPySpark", e);
@@ -156,86 +156,74 @@ public class SparkParagraphIT extends AbstractZeppelinIT {
   @Test
   public void testSqlSpark() throws Exception {
     try {
-      setTextOfParagraph(1, "%sql\\n" + "select * from bank limit 1");
+      setTextOfParagraph(1,"%sql\\n" +
+          "select * from bank limit 1");
       runParagraph(1);
 
       try {
         waitForParagraph(1, "FINISHED");
       } catch (TimeoutException e) {
         waitForParagraph(1, "ERROR");
-        collector.checkThat(
-            "Paragraph from SparkParagraphIT of testSqlSpark status: ",
-            "ERROR",
-            CoreMatchers.equalTo("FINISHED"));
+        collector.checkThat("Paragraph from SparkParagraphIT of testSqlSpark status: ",
+            "ERROR", CoreMatchers.equalTo("FINISHED")
+        );
       }
 
       // Age, Job, Marital, Education, Balance
-      List<WebElement> tableHeaders =
-          driver.findElements(By.cssSelector("span.ui-grid-header-cell-label"));
+      List<WebElement> tableHeaders = driver.findElements(By.cssSelector("span.ui-grid-header-cell-label"));
       String headerNames = "";
 
-      for (WebElement header : tableHeaders) {
+      for(WebElement header : tableHeaders) {
         headerNames += header.getText().toString() + "|";
       }
 
-      collector.checkThat(
-          "Paragraph from SparkParagraphIT of testSqlSpark result: ",
-          headerNames,
-          CoreMatchers.equalTo("age|job|marital|education|balance|"));
+      collector.checkThat("Paragraph from SparkParagraphIT of testSqlSpark result: ",
+          headerNames, CoreMatchers.equalTo("age|job|marital|education|balance|"));
     } catch (Exception e) {
       handleException("Exception in SparkParagraphIT while testSqlSpark", e);
     }
   }
 
-  //  @Test
+//  @Test
   public void testDep() throws Exception {
     try {
       // restart spark interpreter before running %dep
       clickAndWait(By.xpath("//span[@uib-tooltip='Interpreter binding']"));
-      clickAndWait(
-          By.xpath(
-              "//div[font[contains(text(), 'spark')]]/preceding-sibling::a[@uib-tooltip='Restart']"));
+      clickAndWait(By.xpath("//div[font[contains(text(), 'spark')]]/preceding-sibling::a[@uib-tooltip='Restart']"));
       clickAndWait(By.xpath("//button[contains(.,'OK')]"));
 
-      setTextOfParagraph(1, "%dep z.load(\"org.apache.commons:commons-csv:1.1\")");
+      setTextOfParagraph(1,"%dep z.load(\"org.apache.commons:commons-csv:1.1\")");
       runParagraph(1);
 
       try {
         waitForParagraph(1, "FINISHED");
-        WebElement paragraph1Result =
-            driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@id,'_text')]"));
-        collector.checkThat(
-            "Paragraph from SparkParagraphIT of testSqlSpark result: ",
-            paragraph1Result.getText(),
-            CoreMatchers.containsString(
-                "res0: org.apache.zeppelin.dep.Dependency = org.apache.zeppelin.dep.Dependency"));
+        WebElement paragraph1Result = driver.findElement(By.xpath(getParagraphXPath(1) +
+            "//div[contains(@id,'_text')]"));
+        collector.checkThat("Paragraph from SparkParagraphIT of testSqlSpark result: ",
+            paragraph1Result.getText(), CoreMatchers.containsString("res0: org.apache.zeppelin.dep.Dependency = org.apache.zeppelin.dep.Dependency"));
 
         setTextOfParagraph(2, "import org.apache.commons.csv.CSVFormat");
         runParagraph(2);
 
         try {
           waitForParagraph(2, "FINISHED");
-          WebElement paragraph2Result =
-              driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@id,'_text')]"));
-          collector.checkThat(
-              "Paragraph from SparkParagraphIT of testSqlSpark result: ",
-              paragraph2Result.getText(),
-              CoreMatchers.equalTo("import org.apache.commons.csv.CSVFormat"));
+          WebElement paragraph2Result = driver.findElement(By.xpath(getParagraphXPath(2) +
+              "//div[contains(@id,'_text')]"));
+          collector.checkThat("Paragraph from SparkParagraphIT of testSqlSpark result: ",
+              paragraph2Result.getText(), CoreMatchers.equalTo("import org.apache.commons.csv.CSVFormat"));
 
         } catch (TimeoutException e) {
           waitForParagraph(2, "ERROR");
-          collector.checkThat(
-              "Second paragraph from SparkParagraphIT of testDep status: ",
-              "ERROR",
-              CoreMatchers.equalTo("FINISHED"));
+          collector.checkThat("Second paragraph from SparkParagraphIT of testDep status: ",
+              "ERROR", CoreMatchers.equalTo("FINISHED")
+          );
         }
 
       } catch (TimeoutException e) {
         waitForParagraph(1, "ERROR");
-        collector.checkThat(
-            "First paragraph from SparkParagraphIT of testDep status: ",
-            "ERROR",
-            CoreMatchers.equalTo("FINISHED"));
+        collector.checkThat("First paragraph from SparkParagraphIT of testDep status: ",
+            "ERROR", CoreMatchers.equalTo("FINISHED")
+        );
       }
     } catch (Exception e) {
       handleException("Exception in SparkParagraphIT while testDep", e);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java
index a26af43..74c3326 100644
--- a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java
@@ -17,10 +17,6 @@
 
 package org.apache.zeppelin.integration;
 
-import static org.apache.commons.lang3.StringUtils.isNotBlank;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
 import org.apache.zeppelin.AbstractZeppelinIT;
 import org.apache.zeppelin.WebDriverManager;
 import org.apache.zeppelin.ZeppelinITUtils;
@@ -38,19 +34,26 @@ import org.openqa.selenium.WebElement;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.apache.commons.lang3.StringUtils.isNotBlank;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 /**
  * Test Zeppelin with web browser.
  *
- * <p>To test, ZeppelinServer should be running on port 8080 On OSX, you'll need firefox 42.0
- * installed, then you can run with
+ * To test, ZeppelinServer should be running on port 8080
+ * On OSX, you'll need firefox 42.0 installed, then you can run with
+ *
+ * PATH=~/Applications/Firefox.app/Contents/MacOS/:$PATH TEST_SELENIUM="" \
+ *    mvn -Dtest=org.apache.zeppelin.integration.ZeppelinIT -Denforcer.skip=true \
+ *    test -pl zeppelin-server
  *
- * <p>PATH=~/Applications/Firefox.app/Contents/MacOS/:$PATH TEST_SELENIUM="" \ mvn
- * -Dtest=org.apache.zeppelin.integration.ZeppelinIT -Denforcer.skip=true \ test -pl zeppelin-server
  */
 public class ZeppelinIT extends AbstractZeppelinIT {
   private static final Logger LOG = LoggerFactory.getLogger(ZeppelinIT.class);
 
-  @Rule public ErrorCollector collector = new ErrorCollector();
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
 
   @Before
   public void startUp() {
@@ -74,15 +77,13 @@ public class ZeppelinIT extends AbstractZeppelinIT {
        * print angular template
        * %angular <div id='angularTestButton' ng-click='myVar=myVar+1'>BindingTest_{{myVar}}_</div>
        */
-      setTextOfParagraph(
-          1,
-          "println(\"%angular <div id=\\'angularTestButton\\' ng-click=\\'myVar=myVar+1\\'>BindingTest_{{myVar}}_</div>\")");
+      setTextOfParagraph(1, "println(\"%angular <div id=\\'angularTestButton\\' ng-click=\\'myVar=myVar+1\\'>BindingTest_{{myVar}}_</div>\")");
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
 
       // check expected text
-      waitForText(
-          "BindingTest__", By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
+      waitForText("BindingTest__", By.xpath(
+              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
 
       /*
        * Bind variable
@@ -94,8 +95,9 @@ public class ZeppelinIT extends AbstractZeppelinIT {
       waitForParagraph(2, "FINISHED");
 
       // check expected text
-      waitForText(
-          "BindingTest_1_", By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
+      waitForText("BindingTest_1_", By.xpath(
+              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
+
 
       /*
        * print variable
@@ -106,20 +108,18 @@ public class ZeppelinIT extends AbstractZeppelinIT {
       waitForParagraph(3, "FINISHED");
 
       // check expected text
-      waitForText(
-          "myVar=1",
-          By.xpath(getParagraphXPath(3) + "//div[contains(@id,\"_text\") and @class=\"text\"]"));
+      waitForText("myVar=1", By.xpath(
+              getParagraphXPath(3) + "//div[contains(@id,\"_text\") and @class=\"text\"]"));
 
       /*
        * Click element
        */
-      driver
-          .findElement(By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"))
-          .click();
+      driver.findElement(By.xpath(
+              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]")).click();
 
       // check expected text
-      waitForText(
-          "BindingTest_2_", By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
+      waitForText("BindingTest_2_", By.xpath(
+              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
 
       /*
        * Register watcher
@@ -127,44 +127,40 @@ public class ZeppelinIT extends AbstractZeppelinIT {
        *   z.run(2, context)
        * }
        */
-      setTextOfParagraph(
-          4,
-          "z.angularWatch(\"myVar\", (before:Object, after:Object, context:org.apache.zeppelin.interpreter.InterpreterContext)=>{ z.run(2, false)})");
+      setTextOfParagraph(4, "z.angularWatch(\"myVar\", (before:Object, after:Object, context:org.apache.zeppelin.interpreter.InterpreterContext)=>{ z.run(2, false)})");
       runParagraph(4);
       waitForParagraph(4, "FINISHED");
 
+
       /*
        * Click element, again and see watcher works
        */
-      driver
-          .findElement(By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"))
-          .click();
+      driver.findElement(By.xpath(
+              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]")).click();
 
       // check expected text
-      waitForText(
-          "BindingTest_3_", By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
+      waitForText("BindingTest_3_", By.xpath(
+              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
       waitForParagraph(3, "FINISHED");
 
       // check expected text by watcher
-      waitForText(
-          "myVar=3",
-          By.xpath(getParagraphXPath(3) + "//div[contains(@id,\"_text\") and @class=\"text\"]"));
+      waitForText("myVar=3", By.xpath(
+              getParagraphXPath(3) + "//div[contains(@id,\"_text\") and @class=\"text\"]"));
+
 
       /*
        * Click element, again and see watcher still works
        */
-      driver
-          .findElement(By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"))
-          .click();
+      driver.findElement(By.xpath(
+          getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]")).click();
       // check expected text
-      waitForText(
-          "BindingTest_4_", By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
+      waitForText("BindingTest_4_", By.xpath(
+          getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
       waitForParagraph(3, "FINISHED");
 
       // check expected text by watcher
-      waitForText(
-          "myVar=4",
-          By.xpath(getParagraphXPath(3) + "//div[contains(@id,\"_text\") and @class=\"text\"]"));
+      waitForText("myVar=4", By.xpath(
+          getParagraphXPath(3) + "//div[contains(@id,\"_text\") and @class=\"text\"]"));
 
       /*
        * Unbind
@@ -175,8 +171,8 @@ public class ZeppelinIT extends AbstractZeppelinIT {
       waitForParagraph(5, "FINISHED");
 
       // check expected text
-      waitForText(
-          "BindingTest__", By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
+      waitForText("BindingTest__",
+          By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
 
       /*
        * Bind again and see rebind works.
@@ -185,19 +181,14 @@ public class ZeppelinIT extends AbstractZeppelinIT {
       waitForParagraph(2, "FINISHED");
 
       // check expected text
-      waitForText(
-          "BindingTest_1_", By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
+      waitForText("BindingTest_1_",
+          By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
 
-      driver
-          .findElement(By.xpath(".//*[@id='main']//button[@ng-click='moveNoteToTrash(note.id)']"))
+      driver.findElement(By.xpath(".//*[@id='main']//button[@ng-click='moveNoteToTrash(note.id)']"))
           .sendKeys(Keys.ENTER);
       ZeppelinITUtils.sleep(1000, false);
-      driver
-          .findElement(
-              By.xpath(
-                  "//div[@class='modal-dialog'][contains(.,'This note will be moved to trash')]"
-                      + "//div[@class='modal-footer']//button[contains(.,'OK')]"))
-          .click();
+      driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'This note will be moved to trash')]" +
+          "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
       ZeppelinITUtils.sleep(100, false);
 
       LOG.info("testCreateNotebook Test executed");
@@ -210,36 +201,28 @@ public class ZeppelinIT extends AbstractZeppelinIT {
   public void testSparkInterpreterDependencyLoading() throws Exception {
     try {
       // navigate to interpreter page
-      WebElement settingButton =
-          driver.findElement(By.xpath("//button[@class='nav-btn dropdown-toggle ng-scope']"));
+      WebElement settingButton = driver.findElement(By.xpath("//button[@class='nav-btn dropdown-toggle ng-scope']"));
       settingButton.click();
       WebElement interpreterLink = driver.findElement(By.xpath("//a[@href='#/interpreter']"));
       interpreterLink.click();
 
       // add new dependency to spark interpreter
-      driver
-          .findElement(By.xpath("//div[@id='spark']//button[contains(.,'edit')]"))
-          .sendKeys(Keys.ENTER);
+      driver.findElement(By.xpath("//div[@id='spark']//button[contains(.,'edit')]")).sendKeys(Keys.ENTER);
 
-      WebElement depArtifact =
-          pollingWait(
-              By.xpath("//input[@ng-model='setting.depArtifact']"), MAX_BROWSER_TIMEOUT_SEC);
+      WebElement depArtifact = pollingWait(By.xpath("//input[@ng-model='setting.depArtifact']"),
+          MAX_BROWSER_TIMEOUT_SEC);
       String artifact = "org.apache.commons:commons-csv:1.1";
       depArtifact.sendKeys(artifact);
       driver.findElement(By.xpath("//div[@id='spark']//form//button[1]")).click();
-      clickAndWait(
-          By.xpath(
-              "//div[@class='modal-dialog'][contains(.,'Do you want to update this interpreter and restart with new settings?')]"
-                  + "//div[@class='modal-footer']//button[contains(.,'OK')]"));
+      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to update this interpreter and restart with new settings?')]" +
+          "//div[@class='modal-footer']//button[contains(.,'OK')]"));
 
       try {
-        clickAndWait(
-            By.xpath(
-                "//div[@class='modal-dialog'][contains(.,'Do you want to "
-                    + "update this interpreter and restart with new settings?')]//"
-                    + "div[@class='bootstrap-dialog-close-button']/button"));
+        clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to " +
+            "update this interpreter and restart with new settings?')]//" +
+            "div[@class='bootstrap-dialog-close-button']/button"));
       } catch (TimeoutException | StaleElementReferenceException e) {
-        // Modal dialog got closed earlier than expected nothing to worry.
+        //Modal dialog got closed earlier than expected nothing to worry.
       }
 
       driver.navigate().back();
@@ -253,36 +236,29 @@ public class ZeppelinIT extends AbstractZeppelinIT {
       waitForParagraph(1, "FINISHED");
 
       // check expected text
-      WebElement paragraph1Result =
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@id,\"_text\")]"));
+      WebElement paragraph1Result = driver.findElement(By.xpath(
+          getParagraphXPath(1) + "//div[contains(@id,\"_text\")]"));
 
-      collector.checkThat(
-          "Paragraph from ZeppelinIT of testSparkInterpreterDependencyLoading result: ",
-          paragraph1Result.getText().toString(),
-          CoreMatchers.containsString("import org.apache.commons.csv.CSVFormat"));
+      collector.checkThat("Paragraph from ZeppelinIT of testSparkInterpreterDependencyLoading result: ",
+          paragraph1Result.getText().toString(), CoreMatchers.containsString(
+              "import org.apache.commons.csv.CSVFormat"
+          )
+      );
 
-      // delete created notebook for cleanup.
+      //delete created notebook for cleanup.
       deleteTestNotebook(driver);
       ZeppelinITUtils.sleep(1000, false);
 
       // reset dependency
       settingButton.click();
       interpreterLink.click();
-      driver
-          .findElement(By.xpath("//div[@id='spark']//button[contains(.,'edit')]"))
-          .sendKeys(Keys.ENTER);
-      WebElement testDepRemoveBtn =
-          pollingWait(
-              By.xpath("//tr[descendant::text()[contains(.,'" + artifact + "')]]/td[3]/button"),
-              MAX_IMPLICIT_WAIT);
+      driver.findElement(By.xpath("//div[@id='spark']//button[contains(.,'edit')]")).sendKeys(Keys.ENTER);
+      WebElement testDepRemoveBtn = pollingWait(By.xpath("//tr[descendant::text()[contains(.,'" +
+          artifact + "')]]/td[3]/button"), MAX_IMPLICIT_WAIT);
       testDepRemoveBtn.sendKeys(Keys.ENTER);
       driver.findElement(By.xpath("//div[@id='spark']//form//button[1]")).click();
-      driver
-          .findElement(
-              By.xpath(
-                  "//div[@class='modal-dialog'][contains(.,'Do you want to update this interpreter and restart with new settings?')]"
-                      + "//div[@class='modal-footer']//button[contains(.,'OK')]"))
-          .click();
+      driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to update this interpreter and restart with new settings?')]" +
+          "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
     } catch (Exception e) {
       handleException("Exception in ZeppelinIT while testSparkInterpreterDependencyLoading ", e);
     }
@@ -297,13 +273,12 @@ public class ZeppelinIT extends AbstractZeppelinIT {
       waitForParagraph(1, "READY");
 
       // Create 1st paragraph
-      setTextOfParagraph(
-          1, "%angular <div id=\\'angularRunParagraph\\'>Run second paragraph</div>");
+      setTextOfParagraph(1,
+              "%angular <div id=\\'angularRunParagraph\\'>Run second paragraph</div>");
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
-      waitForText(
-          "Run second paragraph",
-          By.xpath(getParagraphXPath(1) + "//div[@id=\"angularRunParagraph\"]"));
+      waitForText("Run second paragraph", By.xpath(
+              getParagraphXPath(1) + "//div[@id=\"angularRunParagraph\"]"));
 
       // Create 2nd paragraph
       setTextOfParagraph(2, "%sh echo TEST");
@@ -311,22 +286,17 @@ public class ZeppelinIT extends AbstractZeppelinIT {
       waitForParagraph(2, "FINISHED");
 
       // Get 2nd paragraph id
-      final String secondParagraphId =
-          driver
-              .findElement(
-                  By.xpath(
-                      getParagraphXPath(2)
-                          + "//div[@class=\"control ng-scope\"]//ul[@class=\"dropdown-menu dropdown-menu-right\"]/li[1]"))
+      final String secondParagraphId = driver.findElement(By.xpath(getParagraphXPath(2)
+              + "//div[@class=\"control ng-scope\"]//ul[@class=\"dropdown-menu dropdown-menu-right\"]/li[1]"))
               .getAttribute("textContent");
 
       assertTrue("Cannot find paragraph id for the 2nd paragraph", isNotBlank(secondParagraphId));
 
       // Update first paragraph to call z.runParagraph() with 2nd paragraph id
-      setTextOfParagraph(
-          1,
-          "%angular <div id=\\'angularRunParagraph\\' ng-click=\\'z.runParagraph(\""
-              + secondParagraphId.trim()
-              + "\")\\'>Run second paragraph</div>");
+      setTextOfParagraph(1,
+              "%angular <div id=\\'angularRunParagraph\\' ng-click=\\'z.runParagraph(\""
+                      + secondParagraphId.trim()
+                      + "\")\\'>Run second paragraph</div>");
       runParagraph(1);
       waitForParagraph(1, "FINISHED");
 
@@ -334,24 +304,23 @@ public class ZeppelinIT extends AbstractZeppelinIT {
       setTextOfParagraph(2, "%sh echo NEW_VALUE");
 
       // Click on 1 paragraph to trigger z.runParagraph() function
-      driver
-          .findElement(By.xpath(getParagraphXPath(1) + "//div[@id=\"angularRunParagraph\"]"))
-          .click();
+      driver.findElement(By.xpath(
+              getParagraphXPath(1) + "//div[@id=\"angularRunParagraph\"]")).click();
 
       waitForParagraph(2, "FINISHED");
 
       // Check that 2nd paragraph has been executed
-      waitForText(
-          "NEW_VALUE",
-          By.xpath(getParagraphXPath(2) + "//div[contains(@id,\"_text\") and @class=\"text\"]"));
+      waitForText("NEW_VALUE", By.xpath(
+              getParagraphXPath(2) + "//div[contains(@id,\"_text\") and @class=\"text\"]"));
 
-      // delete created notebook for cleanup.
+      //delete created notebook for cleanup.
       deleteTestNotebook(driver);
       ZeppelinITUtils.sleep(1000, false);
 
       LOG.info("testAngularRunParagraph Test executed");
-    } catch (Exception e) {
+    }  catch (Exception e) {
       handleException("Exception in ZeppelinIT while testAngularRunParagraph", e);
     }
+
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/pom.xml
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/pom.xml b/zeppelin-interpreter/pom.xml
index 38259c7..4ee1080 100644
--- a/zeppelin-interpreter/pom.xml
+++ b/zeppelin-interpreter/pom.xml
@@ -248,6 +248,14 @@
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-dependency-plugin</artifactId>
       </plugin>
     </plugins>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/annotation/Experimental.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/annotation/Experimental.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/annotation/Experimental.java
index ffb4067..c21ea43 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/annotation/Experimental.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/annotation/Experimental.java
@@ -21,15 +21,12 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
-/** Experimental API Might change or be removed at anytime, or be adopted as ZeppelinApi */
+/**
+ * Experimental API
+ * Might change or be removed at anytime, or be adopted as ZeppelinApi
+ */
 @Retention(RetentionPolicy.RUNTIME)
-@Target({
-  ElementType.TYPE,
-  ElementType.FIELD,
-  ElementType.METHOD,
-  ElementType.PARAMETER,
-  ElementType.CONSTRUCTOR,
-  ElementType.LOCAL_VARIABLE,
-  ElementType.PACKAGE
-})
-public @interface Experimental {}
+@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER,
+    ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.PACKAGE})
+public @interface Experimental {
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/annotation/ZeppelinApi.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/annotation/ZeppelinApi.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/annotation/ZeppelinApi.java
index d41be51..e4a45ee 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/annotation/ZeppelinApi.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/annotation/ZeppelinApi.java
@@ -21,15 +21,11 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
-/** APIs exposed to extends pluggable components or exposed to enduser */
+/**
+ * APIs exposed to extends pluggable components or exposed to enduser
+ */
 @Retention(RetentionPolicy.RUNTIME)
-@Target({
-  ElementType.TYPE,
-  ElementType.FIELD,
-  ElementType.METHOD,
-  ElementType.PARAMETER,
-  ElementType.CONSTRUCTOR,
-  ElementType.LOCAL_VARIABLE,
-  ElementType.PACKAGE
-})
-public @interface ZeppelinApi {}
+@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER,
+    ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.PACKAGE})
+public @interface ZeppelinApi {
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/common/JsonSerializable.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/common/JsonSerializable.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/common/JsonSerializable.java
index d932abf..7764138 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/common/JsonSerializable.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/common/JsonSerializable.java
@@ -17,7 +17,9 @@
 
 package org.apache.zeppelin.common;
 
-/** Interface for class that can be serialized to json */
+/**
+ * Interface for class that can be serialized to json
+ */
 public interface JsonSerializable {
 
   String toJson();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/completer/CachedCompleter.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/completer/CachedCompleter.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/completer/CachedCompleter.java
index af738db..ef2223e 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/completer/CachedCompleter.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/completer/CachedCompleter.java
@@ -5,18 +5,20 @@
  * "License"); you may not use this file except in compliance with the License. You may obtain a
  * copy of the License at
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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.
+ * 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.completer;
 
 import jline.console.completer.Completer;
 
-/** Completer with time to live */
+/**
+ * Completer with time to live
+ */
 public class CachedCompleter {
   private Completer completer;
   private int ttlInSeconds;
@@ -29,8 +31,8 @@ public class CachedCompleter {
   }
 
   public boolean isExpired() {
-    if (ttlInSeconds == -1
-        || (ttlInSeconds > 0 && (System.currentTimeMillis() - createdAt) / 1000 > ttlInSeconds)) {
+    if (ttlInSeconds == -1 || (ttlInSeconds > 0 &&
+        (System.currentTimeMillis() - createdAt) / 1000 > ttlInSeconds)) {
       return true;
     }
     return false;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/completer/CompletionType.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/completer/CompletionType.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/completer/CompletionType.java
index 67fd069..fc5f380 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/completer/CompletionType.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/completer/CompletionType.java
@@ -5,16 +5,18 @@
  * "License"); you may not use this file except in compliance with the License. You may obtain a
  * copy of the License at
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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.
+ * 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.completer;
 
-/** Types of completion */
+/**
+ * Types of completion
+ */
 public enum CompletionType {
   schema,
   table,

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/completer/StringsCompleter.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/completer/StringsCompleter.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/completer/StringsCompleter.java
index 63868cd..c117441 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/completer/StringsCompleter.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/completer/StringsCompleter.java
@@ -5,12 +5,12 @@
  * "License"); you may not use this file except in compliance with the License. You may obtain a
  * copy of the License at
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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.
+ * 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.completer;
 
@@ -20,21 +20,23 @@ import java.util.List;
 import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
+
 import jline.console.completer.Completer;
 import jline.internal.Preconditions;
 
-/** Case-insensitive completer for a set of strings. */
+/**
+ * Case-insensitive completer for a set of strings.
+ */
 public class StringsCompleter implements Completer {
-  private final SortedSet<String> strings =
-      new TreeSet<String>(
-          new Comparator<String>() {
-            @Override
-            public int compare(String o1, String o2) {
-              return o1.compareToIgnoreCase(o2);
-            }
-          });
+  private final SortedSet<String> strings = new TreeSet<String>(new Comparator<String>() {
+    @Override
+    public int compare(String o1, String o2) {
+      return o1.compareToIgnoreCase(o2);
+    }
+  });
 
-  public StringsCompleter() {}
+  public StringsCompleter() {
+  }
 
   public StringsCompleter(final Collection<String> strings) {
     Preconditions.checkNotNull(strings);
@@ -53,8 +55,8 @@ public class StringsCompleter implements Completer {
     return completeCollection(buffer, cursor, candidates);
   }
 
-  private int completeCollection(
-      final String buffer, final int cursor, final Collection<CharSequence> candidates) {
+  private int completeCollection(final String buffer, final int cursor,
+      final Collection<CharSequence> candidates) {
     Preconditions.checkNotNull(candidates);
     if (buffer == null) {
       candidates.addAll(strings);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 2fcf60d..2b2f3b6 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
@@ -24,6 +24,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.function.Predicate;
+
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.XMLConfiguration;
 import org.apache.commons.configuration.tree.ConfigurationNode;
@@ -32,7 +33,10 @@ import org.apache.zeppelin.util.Util;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Zeppelin configuration. */
+/**
+ * Zeppelin configuration.
+ *
+ */
 public class ZeppelinConfiguration extends XMLConfiguration {
   private static final String ZEPPELIN_SITE_XML = "zeppelin-site.xml";
   private static final long serialVersionUID = 4749305895693848035L;
@@ -64,6 +68,7 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     }
   }
 
+
   public ZeppelinConfiguration() {
     ConfVars[] vars = ConfVars.values();
     for (ConfVars v : vars) {
@@ -81,11 +86,13 @@ public class ZeppelinConfiguration extends XMLConfiguration {
         throw new RuntimeException("Unsupported VarType");
       }
     }
+
   }
 
+
   /**
-   * Load from resource. url = ZeppelinConfiguration.class.getResource(ZEPPELIN_SITE_XML);
-   *
+   * Load from resource.
+   *url = ZeppelinConfiguration.class.getResource(ZEPPELIN_SITE_XML);
    * @throws ConfigurationException
    */
   public static synchronized ZeppelinConfiguration create() {
@@ -132,6 +139,7 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     return conf;
   }
 
+
   private String getStringValue(String name, String d) {
     String value = this.properties.get(name);
     if (value != null) {
@@ -279,7 +287,10 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     if (path != null && path.startsWith("/") || isWindowsPath(path)) {
       return path;
     } else {
-      return getRelativeDir(String.format("%s/%s", getConfDir(), path));
+      return getRelativeDir(
+          String.format("%s/%s",
+              getConfDir(),
+              path));
     }
   }
 
@@ -308,7 +319,10 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     if (path != null && path.startsWith("/") || isWindowsPath(path)) {
       return path;
     } else {
-      return getRelativeDir(String.format("%s/%s", getConfDir(), path));
+      return getRelativeDir(
+          String.format("%s/%s",
+              getConfDir(),
+              path));
     }
   }
 
@@ -351,8 +365,8 @@ public class ZeppelinConfiguration extends XMLConfiguration {
   }
 
   public boolean isRecoveryEnabled() {
-    return !getString(ConfVars.ZEPPELIN_RECOVERY_STORAGE_CLASS)
-        .equals("org.apache.zeppelin.interpreter.recovery.NullRecoveryStorage");
+    return !getString(ConfVars.ZEPPELIN_RECOVERY_STORAGE_CLASS).equals(
+        "org.apache.zeppelin.interpreter.recovery.NullRecoveryStorage");
   }
 
   public String getGCSStorageDir() {
@@ -500,7 +514,7 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     return getString(ConfVars.ZEPPELIN_INTERPRETER_RPC_PORTRANGE);
   }
 
-  public boolean isWindowsPath(String path) {
+  public boolean isWindowsPath(String path){
     return path.matches("^[A-Za-z]:\\\\.*");
   }
 
@@ -523,15 +537,12 @@ public class ZeppelinConfiguration extends XMLConfiguration {
   public String getConfigFSDir() {
     String fsConfigDir = getString(ConfVars.ZEPPELIN_CONFIG_FS_DIR);
     if (StringUtils.isBlank(fsConfigDir)) {
-      LOG.warn(
-          ConfVars.ZEPPELIN_CONFIG_FS_DIR.varName
-              + " is not specified, fall back to local "
-              + "conf directory "
-              + ConfVars.ZEPPELIN_CONF_DIR.varName);
+      LOG.warn(ConfVars.ZEPPELIN_CONFIG_FS_DIR.varName + " is not specified, fall back to local " +
+          "conf directory " + ConfVars.ZEPPELIN_CONF_DIR.varName);
       return getConfDir();
     }
     if (getString(ConfVars.ZEPPELIN_CONFIG_STORAGE_CLASS)
-        .equals("org.apache.zeppelin.storage.LocalConfigStorage")) {
+                .equals("org.apache.zeppelin.storage.LocalConfigStorage")) {
       // only apply getRelativeDir when it is LocalConfigStorage
       return getRelativeDir(fsConfigDir);
     } else {
@@ -539,7 +550,8 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     }
   }
 
-  public List<String> getAllowedOrigins() {
+  public List<String> getAllowedOrigins()
+  {
     if (getString(ConfVars.ZEPPELIN_ALLOWED_ORIGINS).isEmpty()) {
       return Arrays.asList(new String[0]);
     }
@@ -563,6 +575,7 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     return getBoolean(ConfVars.ZEPPELIN_SERVER_AUTHORIZATION_HEADER_CLEAR);
   }
 
+
   public String getXFrameOptions() {
     return getString(ConfVars.ZEPPELIN_SERVER_XFRAME_OPTIONS);
   }
@@ -580,15 +593,15 @@ public class ZeppelinConfiguration extends XMLConfiguration {
   }
 
   public String getZeppelinNotebookGitURL() {
-    return getString(ConfVars.ZEPPELIN_NOTEBOOK_GIT_REMOTE_URL);
+    return  getString(ConfVars.ZEPPELIN_NOTEBOOK_GIT_REMOTE_URL);
   }
 
   public String getZeppelinNotebookGitUsername() {
-    return getString(ConfVars.ZEPPELIN_NOTEBOOK_GIT_REMOTE_USERNAME);
+    return  getString(ConfVars.ZEPPELIN_NOTEBOOK_GIT_REMOTE_USERNAME);
   }
 
   public String getZeppelinNotebookGitAccessToken() {
-    return getString(ConfVars.ZEPPELIN_NOTEBOOK_GIT_REMOTE_ACCESS_TOKEN);
+    return  getString(ConfVars.ZEPPELIN_NOTEBOOK_GIT_REMOTE_ACCESS_TOKEN);
   }
 
   public String getZeppelinNotebookGitRemoteOrigin() {
@@ -658,7 +671,9 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     return properties;
   }
 
-  /** Wrapper class. */
+  /**
+   * Wrapper class.
+   */
   public enum ConfVars {
     ZEPPELIN_HOME("zeppelin.home", "./"),
     ZEPPELIN_ADDR("zeppelin.server.addr", "0.0.0.0"),
@@ -680,8 +695,8 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     ZEPPELIN_INTERPRETER_JSON("zeppelin.interpreter.setting", "interpreter-setting.json"),
     ZEPPELIN_INTERPRETER_DIR("zeppelin.interpreter.dir", "interpreter"),
     ZEPPELIN_INTERPRETER_LOCALREPO("zeppelin.interpreter.localRepo", "local-repo"),
-    ZEPPELIN_INTERPRETER_DEP_MVNREPO(
-        "zeppelin.interpreter.dep.mvnRepo", "http://repo1.maven.org/maven2/"),
+    ZEPPELIN_INTERPRETER_DEP_MVNREPO("zeppelin.interpreter.dep.mvnRepo",
+        "http://repo1.maven.org/maven2/"),
     ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT("zeppelin.interpreter.connect.timeout", 60000),
     ZEPPELIN_INTERPRETER_MAX_POOL_SIZE("zeppelin.interpreter.max.poolsize", 10),
     ZEPPELIN_INTERPRETER_GROUP_DEFAULT("zeppelin.interpreter.group.default", "spark"),
@@ -689,8 +704,7 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     ZEPPELIN_ENCODING("zeppelin.encoding", "UTF-8"),
     ZEPPELIN_NOTEBOOK_DIR("zeppelin.notebook.dir", "notebook"),
     ZEPPELIN_RECOVERY_DIR("zeppelin.recovery.dir", "recovery"),
-    ZEPPELIN_RECOVERY_STORAGE_CLASS(
-        "zeppelin.recovery.storage.class",
+    ZEPPELIN_RECOVERY_STORAGE_CLASS("zeppelin.recovery.storage.class",
         "org.apache.zeppelin.interpreter.recovery.NullRecoveryStorage"),
     ZEPPELIN_PLUGINS_DIR("zeppelin.plugins.dir", "plugins"),
 
@@ -715,31 +729,28 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     ZEPPELIN_NOTEBOOK_MONGO_COLLECTION("zeppelin.notebook.mongo.collection", "notes"),
     ZEPPELIN_NOTEBOOK_MONGO_URI("zeppelin.notebook.mongo.uri", "mongodb://localhost"),
     ZEPPELIN_NOTEBOOK_MONGO_AUTOIMPORT("zeppelin.notebook.mongo.autoimport", false),
-    ZEPPELIN_NOTEBOOK_STORAGE(
-        "zeppelin.notebook.storage", "org.apache.zeppelin.notebook.repo.GitNotebookRepo"),
+    ZEPPELIN_NOTEBOOK_STORAGE("zeppelin.notebook.storage",
+        "org.apache.zeppelin.notebook.repo.GitNotebookRepo"),
     ZEPPELIN_NOTEBOOK_ONE_WAY_SYNC("zeppelin.notebook.one.way.sync", false),
     // whether by default note is public or private
     ZEPPELIN_NOTEBOOK_PUBLIC("zeppelin.notebook.public", true),
-    ZEPPELIN_INTERPRETER_REMOTE_RUNNER(
-        "zeppelin.interpreter.remoterunner",
-        System.getProperty("os.name").startsWith("Windows")
-            ? "bin/interpreter.cmd"
-            : "bin/interpreter.sh"),
+    ZEPPELIN_INTERPRETER_REMOTE_RUNNER("zeppelin.interpreter.remoterunner",
+        System.getProperty("os.name")
+                .startsWith("Windows") ? "bin/interpreter.cmd" : "bin/interpreter.sh"),
     // Decide when new note is created, interpreter settings will be binded automatically or not.
     ZEPPELIN_NOTEBOOK_AUTO_INTERPRETER_BINDING("zeppelin.notebook.autoInterpreterBinding", true),
     ZEPPELIN_CONF_DIR("zeppelin.conf.dir", "conf"),
     ZEPPELIN_CONFIG_FS_DIR("zeppelin.config.fs.dir", ""),
-    ZEPPELIN_CONFIG_STORAGE_CLASS(
-        "zeppelin.config.storage.class", "org.apache.zeppelin.storage.LocalConfigStorage"),
+    ZEPPELIN_CONFIG_STORAGE_CLASS("zeppelin.config.storage.class",
+        "org.apache.zeppelin.storage.LocalConfigStorage"),
     ZEPPELIN_DEP_LOCALREPO("zeppelin.dep.localrepo", "local-repo"),
     ZEPPELIN_HELIUM_REGISTRY("zeppelin.helium.registry", "helium," + HELIUM_PACKAGE_DEFAULT_URL),
-    ZEPPELIN_HELIUM_NODE_INSTALLER_URL(
-        "zeppelin.helium.node.installer.url", "https://nodejs.org/dist/"),
-    ZEPPELIN_HELIUM_NPM_INSTALLER_URL(
-        "zeppelin.helium.npm.installer.url", "http://registry.npmjs.org/"),
-    ZEPPELIN_HELIUM_YARNPKG_INSTALLER_URL(
-        "zeppelin.helium.yarnpkg.installer.url",
-        "https://github.com/yarnpkg/yarn/releases/download/"),
+    ZEPPELIN_HELIUM_NODE_INSTALLER_URL("zeppelin.helium.node.installer.url",
+            "https://nodejs.org/dist/"),
+    ZEPPELIN_HELIUM_NPM_INSTALLER_URL("zeppelin.helium.npm.installer.url",
+            "http://registry.npmjs.org/"),
+    ZEPPELIN_HELIUM_YARNPKG_INSTALLER_URL("zeppelin.helium.yarnpkg.installer.url",
+            "https://github.com/yarnpkg/yarn/releases/download/"),
     // Allows a way to specify a ',' separated list of allowed origins for rest and websockets
     // i.e. http://localhost:8080
     ZEPPELIN_ALLOWED_ORIGINS("zeppelin.server.allowed.origins", "*"),
@@ -762,8 +773,7 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     ZEPPELIN_SERVER_RPC_PORTRANGE("zeppelin.server.rpc.portRange", ":"),
     ZEPPELIN_INTERPRETER_RPC_PORTRANGE("zeppelin.interpreter.rpc.portRange", ":"),
 
-    ZEPPELIN_INTERPRETER_LIFECYCLE_MANAGER_CLASS(
-        "zeppelin.interpreter.lifecyclemanager.class",
+    ZEPPELIN_INTERPRETER_LIFECYCLE_MANAGER_CLASS("zeppelin.interpreter.lifecyclemanager.class",
         "org.apache.zeppelin.interpreter.lifecycle.NullLifecycleManager"),
     ZEPPELIN_INTERPRETER_LIFECYCLE_MANAGER_TIMEOUT_CHECK_INTERVAL(
         "zeppelin.interpreter.lifecyclemanager.timeout.checkinterval", 6000L),
@@ -776,8 +786,8 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     ZEPPELIN_NOTEBOOK_GIT_REMOTE_USERNAME("zeppelin.notebook.git.remote.username", "token"),
     ZEPPELIN_NOTEBOOK_GIT_REMOTE_ACCESS_TOKEN("zeppelin.notebook.git.remote.access-token", ""),
     ZEPPELIN_NOTEBOOK_GIT_REMOTE_ORIGIN("zeppelin.notebook.git.remote.origin", "origin"),
-    ZEPPELIN_NOTEBOOK_COLLABORATIVE_MODE_ENABLE(
-        "zeppelin.notebook.collaborative.mode.enable", true),
+    ZEPPELIN_NOTEBOOK_COLLABORATIVE_MODE_ENABLE("zeppelin.notebook.collaborative.mode.enable",
+            true),
     ZEPPELIN_NOTEBOOK_CRON_ENABLE("zeppelin.notebook.cron.enable", false),
     ZEPPELIN_NOTEBOOK_CRON_FOLDERS("zeppelin.notebook.cron.folders", null),
     ZEPPELIN_PROXY_URL("zeppelin.proxy.url", null),
@@ -787,10 +797,8 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     ZEPPELIN_SEARCH_TEMP_PATH("zeppelin.search.temp.path", System.getProperty("java.io.tmpdir"));
 
     private String varName;
-
     @SuppressWarnings("rawtypes")
     private Class varClass;
-
     private String stringValue;
     private VarType type;
     private int intValue;
@@ -798,6 +806,7 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     private boolean booleanValue;
     private long longValue;
 
+
     ConfVars(String varName, String varValue) {
       this.varName = varName;
       this.varClass = String.class;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/AbstractDependencyResolver.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/AbstractDependencyResolver.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/AbstractDependencyResolver.java
index cbe8b4a..0de790a 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/AbstractDependencyResolver.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/AbstractDependencyResolver.java
@@ -22,6 +22,7 @@ import java.util.Collection;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
+
 import org.sonatype.aether.RepositorySystem;
 import org.sonatype.aether.RepositorySystemSession;
 import org.sonatype.aether.repository.Authentication;
@@ -30,12 +31,15 @@ import org.sonatype.aether.repository.RemoteRepository;
 import org.sonatype.aether.repository.RepositoryPolicy;
 import org.sonatype.aether.resolution.ArtifactResult;
 
-/** Abstract dependency resolver. Add new dependencies from mvn repo (at runtime) Zeppelin. */
+/**
+ * Abstract dependency resolver.
+ * Add new dependencies from mvn repo (at runtime) Zeppelin.
+ */
 public abstract class AbstractDependencyResolver {
   protected RepositorySystem system = Booter.newRepositorySystem();
   protected List<RemoteRepository> repos = new LinkedList<>();
   protected RepositorySystemSession session;
-
+  
   public AbstractDependencyResolver(String localRepoPath) {
     session = Booter.newRepositorySystemSession(system, localRepoPath);
     repos.add(Booter.newCentralRepository()); // add maven central
@@ -55,15 +59,15 @@ public abstract class AbstractDependencyResolver {
   public List<RemoteRepository> getRepos() {
     return this.repos;
   }
-
+  
   public void addRepo(String id, String url, boolean snapshot) {
     synchronized (repos) {
       delRepo(id);
       RemoteRepository rr = new RemoteRepository(id, "default", url);
-      rr.setPolicy(
-          snapshot,
-          new RepositoryPolicy(
-              true, RepositoryPolicy.UPDATE_POLICY_DAILY, RepositoryPolicy.CHECKSUM_POLICY_WARN));
+      rr.setPolicy(snapshot, new RepositoryPolicy(
+          true,
+          RepositoryPolicy.UPDATE_POLICY_DAILY,
+          RepositoryPolicy.CHECKSUM_POLICY_WARN));
       repos.add(rr);
     }
   }
@@ -72,10 +76,10 @@ public abstract class AbstractDependencyResolver {
     synchronized (repos) {
       delRepo(id);
       RemoteRepository rr = new RemoteRepository(id, "default", url);
-      rr.setPolicy(
-          snapshot,
-          new RepositoryPolicy(
-              true, RepositoryPolicy.UPDATE_POLICY_DAILY, RepositoryPolicy.CHECKSUM_POLICY_WARN));
+      rr.setPolicy(snapshot, new RepositoryPolicy(
+          true,
+          RepositoryPolicy.UPDATE_POLICY_DAILY,
+          RepositoryPolicy.CHECKSUM_POLICY_WARN));
       rr.setAuthentication(auth);
       rr.setProxy(proxy);
       repos.add(rr);
@@ -96,6 +100,6 @@ public abstract class AbstractDependencyResolver {
     return null;
   }
 
-  public abstract List<ArtifactResult> getArtifactsWithDep(
-      String dependency, Collection<String> excludes) throws Exception;
+  public abstract List<ArtifactResult> getArtifactsWithDep(String dependency,
+      Collection<String> excludes) throws Exception;
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/Booter.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/Booter.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/Booter.java
index e109cbe..6339a4f 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/Booter.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/Booter.java
@@ -17,7 +17,6 @@
 
 package org.apache.zeppelin.dep;
 
-import java.nio.file.Paths;
 import org.apache.commons.lang.Validate;
 import org.apache.maven.repository.internal.MavenRepositorySystemSession;
 import org.slf4j.Logger;
@@ -27,7 +26,11 @@ import org.sonatype.aether.RepositorySystemSession;
 import org.sonatype.aether.repository.LocalRepository;
 import org.sonatype.aether.repository.RemoteRepository;
 
-/** Manage mvn repository. */
+import java.nio.file.Paths;
+
+/**
+ * Manage mvn repository.
+ */
 public class Booter {
   private static Logger logger = LoggerFactory.getLogger(Booter.class);
 
@@ -81,7 +84,7 @@ public class Booter {
   }
 
   public static RemoteRepository newLocalRepository() {
-    return new RemoteRepository(
-        "local", "default", "file://" + System.getProperty("user.home") + "/.m2/repository");
+    return new RemoteRepository("local",
+        "default", "file://" + System.getProperty("user.home") + "/.m2/repository");
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/Dependency.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/Dependency.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/Dependency.java
index cc9f446..eec6592 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/Dependency.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/Dependency.java
@@ -20,12 +20,15 @@ package org.apache.zeppelin.dep;
 import java.util.LinkedList;
 import java.util.List;
 
-/** */
+/**
+ *
+ */
 public class Dependency {
   private String groupArtifactVersion;
   private boolean local = false;
   private List<String> exclusions;
 
+
   public Dependency(String groupArtifactVersion) {
     this.groupArtifactVersion = groupArtifactVersion;
     exclusions = new LinkedList<>();
@@ -42,7 +45,6 @@ public class Dependency {
 
   /**
    * Don't add artifact into SparkContext (sc.addJar())
-   *
    * @return
    */
   public Dependency local() {
@@ -56,6 +58,7 @@ public class Dependency {
   }
 
   /**
+   *
    * @param exclusions comma or newline separated list of "groupId:ArtifactId"
    * @return
    */
@@ -67,6 +70,7 @@ public class Dependency {
     return this;
   }
 
+
   public String getGroupArtifactVersion() {
     return groupArtifactVersion;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/DependencyContext.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/DependencyContext.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/DependencyContext.java
index f185808..9bac9e4 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/DependencyContext.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/DependencyContext.java
@@ -21,6 +21,7 @@ import java.io.File;
 import java.net.MalformedURLException;
 import java.util.LinkedList;
 import java.util.List;
+
 import org.sonatype.aether.RepositorySystem;
 import org.sonatype.aether.RepositorySystemSession;
 import org.sonatype.aether.artifact.Artifact;
@@ -36,7 +37,10 @@ import org.sonatype.aether.util.artifact.JavaScopes;
 import org.sonatype.aether.util.filter.DependencyFilterUtils;
 import org.sonatype.aether.util.filter.PatternExclusionsDependencyFilter;
 
-/** */
+
+/**
+ *
+ */
 public class DependencyContext {
   List<Dependency> dependencies = new LinkedList<>();
   List<Repository> repositories = new LinkedList<>();
@@ -76,16 +80,16 @@ public class DependencyContext {
     filesDist = new LinkedList<>();
   }
 
+
   /**
    * fetch all artifacts
-   *
    * @return
    * @throws MalformedURLException
    * @throws ArtifactResolutionException
    * @throws DependencyResolutionException
    */
-  public List<File> fetch()
-      throws MalformedURLException, DependencyResolutionException, ArtifactResolutionException {
+  public List<File> fetch() throws MalformedURLException,
+      DependencyResolutionException, ArtifactResolutionException {
 
     for (Dependency dep : dependencies) {
       if (!dep.isLocalFsArtifact()) {
@@ -111,12 +115,14 @@ public class DependencyContext {
       throws DependencyResolutionException, ArtifactResolutionException {
     Artifact artifact = new DefaultArtifact(dep.getGroupArtifactVersion());
 
-    DependencyFilter classpathFilter = DependencyFilterUtils.classpathFilter(JavaScopes.COMPILE);
-    PatternExclusionsDependencyFilter exclusionFilter =
-        new PatternExclusionsDependencyFilter(dep.getExclusions());
+    DependencyFilter classpathFilter = DependencyFilterUtils
+        .classpathFilter(JavaScopes.COMPILE);
+    PatternExclusionsDependencyFilter exclusionFilter = new PatternExclusionsDependencyFilter(
+        dep.getExclusions());
 
     CollectRequest collectRequest = new CollectRequest();
-    collectRequest.setRoot(new org.sonatype.aether.graph.Dependency(artifact, JavaScopes.COMPILE));
+    collectRequest.setRoot(new org.sonatype.aether.graph.Dependency(artifact,
+        JavaScopes.COMPILE));
 
     collectRequest.addRepository(mavenCentral);
     collectRequest.addRepository(mavenLocal);
@@ -126,9 +132,8 @@ public class DependencyContext {
       collectRequest.addRepository(rr);
     }
 
-    DependencyRequest dependencyRequest =
-        new DependencyRequest(
-            collectRequest, DependencyFilterUtils.andFilter(exclusionFilter, classpathFilter));
+    DependencyRequest dependencyRequest = new DependencyRequest(collectRequest,
+        DependencyFilterUtils.andFilter(exclusionFilter, classpathFilter));
 
     return system.resolveDependencies(session, dependencyRequest).getArtifactResults();
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/DependencyResolver.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/DependencyResolver.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/DependencyResolver.java
index fbd3561..495c69b 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/DependencyResolver.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/DependencyResolver.java
@@ -24,6 +24,7 @@ import java.util.Collection;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
+
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
@@ -42,25 +43,26 @@ import org.sonatype.aether.util.artifact.JavaScopes;
 import org.sonatype.aether.util.filter.DependencyFilterUtils;
 import org.sonatype.aether.util.filter.PatternExclusionsDependencyFilter;
 
-/** Deps resolver. Add new dependencies from mvn repo (at runtime) to Zeppelin. */
+/**
+ * Deps resolver.
+ * Add new dependencies from mvn repo (at runtime) to Zeppelin.
+ */
 public class DependencyResolver extends AbstractDependencyResolver {
   private Logger logger = LoggerFactory.getLogger(DependencyResolver.class);
 
-  private final String[] exclusions =
-      new String[] {
-        "org.apache.zeppelin:zeppelin-zengine",
-        "org.apache.zeppelin:zeppelin-interpreter",
-        "org.apache.zeppelin:zeppelin-server"
-      };
+  private final String[] exclusions = new String[] {"org.apache.zeppelin:zeppelin-zengine",
+                                                    "org.apache.zeppelin:zeppelin-interpreter",
+                                                    "org.apache.zeppelin:zeppelin-server"};
 
   public DependencyResolver(String localRepoPath) {
     super(localRepoPath);
   }
 
-  public List<File> load(String artifact) throws RepositoryException, IOException {
+  public List<File> load(String artifact)
+      throws RepositoryException, IOException {
     return load(artifact, new LinkedList<String>());
   }
-
+  
   public synchronized List<File> load(String artifact, Collection<String> excludes)
       throws RepositoryException, IOException {
     if (StringUtils.isBlank(artifact)) {
@@ -101,7 +103,8 @@ public class DependencyResolver extends AbstractDependencyResolver {
     return libs;
   }
 
-  public synchronized void copyLocalDependency(String srcPath, File destPath) throws IOException {
+  public synchronized void copyLocalDependency(String srcPath, File destPath)
+      throws IOException {
     if (StringUtils.isBlank(srcPath)) {
       return;
     }
@@ -152,12 +155,13 @@ public class DependencyResolver extends AbstractDependencyResolver {
    * @throws Exception
    */
   @Override
-  public List<ArtifactResult> getArtifactsWithDep(String dependency, Collection<String> excludes)
+  public List<ArtifactResult> getArtifactsWithDep(String dependency,
+                                                  Collection<String> excludes)
       throws RepositoryException {
     Artifact artifact = new DefaultArtifact(dependency);
     DependencyFilter classpathFilter = DependencyFilterUtils.classpathFilter(JavaScopes.COMPILE);
     PatternExclusionsDependencyFilter exclusionFilter =
-        new PatternExclusionsDependencyFilter(excludes);
+            new PatternExclusionsDependencyFilter(excludes);
 
     CollectRequest collectRequest = new CollectRequest();
     collectRequest.setRoot(new Dependency(artifact, JavaScopes.COMPILE));
@@ -167,14 +171,13 @@ public class DependencyResolver extends AbstractDependencyResolver {
         collectRequest.addRepository(repo);
       }
     }
-    DependencyRequest dependencyRequest =
-        new DependencyRequest(
-            collectRequest, DependencyFilterUtils.andFilter(exclusionFilter, classpathFilter));
+    DependencyRequest dependencyRequest = new DependencyRequest(collectRequest,
+            DependencyFilterUtils.andFilter(exclusionFilter, classpathFilter));
     try {
       return system.resolveDependencies(session, dependencyRequest).getArtifactResults();
     } catch (NullPointerException | DependencyResolutionException ex) {
       throw new RepositoryException(
-          String.format("Cannot fetch dependencies for %s", dependency), ex);
+              String.format("Cannot fetch dependencies for %s", dependency), ex);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/Repository.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/Repository.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/Repository.java
index 8b0d0c1..74adce8 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/Repository.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/Repository.java
@@ -16,7 +16,6 @@
  */
 
 package org.apache.zeppelin.dep;
-
 import static org.apache.commons.lang.StringUtils.isNotBlank;
 
 import com.google.gson.Gson;
@@ -24,7 +23,10 @@ import org.apache.zeppelin.common.JsonSerializable;
 import org.sonatype.aether.repository.Authentication;
 import org.sonatype.aether.repository.Proxy;
 
-/** */
+/**
+ *
+ *
+ */
 public class Repository implements JsonSerializable {
   private static final Gson gson = new Gson();
 
@@ -39,7 +41,7 @@ public class Repository implements JsonSerializable {
   private String proxyLogin = null;
   private String proxyPassword = null;
 
-  public Repository(String id) {
+  public Repository(String id){
     this.id = id;
   }
 
@@ -64,23 +66,23 @@ public class Repository implements JsonSerializable {
   public String getUrl() {
     return url;
   }
-
+  
   public Repository username(String username) {
     this.username = username;
     return this;
   }
-
+  
   public Repository password(String password) {
     this.password = password;
     return this;
   }
-
+  
   public Repository credentials(String username, String password) {
     this.username = username;
     this.password = password;
     return this;
   }
-
+  
   public Authentication getAuthentication() {
     Authentication auth = null;
     if (this.username != null && this.password != null) {
@@ -92,8 +94,8 @@ public class Repository implements JsonSerializable {
   public Proxy getProxy() {
     if (isNotBlank(proxyHost) && proxyPort != null) {
       if (isNotBlank(proxyLogin)) {
-        return new Proxy(
-            proxyProtocol, proxyHost, proxyPort, new Authentication(proxyLogin, proxyPassword));
+        return new Proxy(proxyProtocol, proxyHost, proxyPort,
+                new Authentication(proxyLogin, proxyPassword));
       } else {
         return new Proxy(proxyProtocol, proxyHost, proxyPort, null);
       }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/RepositoryListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/RepositoryListener.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/RepositoryListener.java
index 4ea2963..9f62d5f 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/RepositoryListener.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/RepositoryListener.java
@@ -22,7 +22,9 @@ import org.slf4j.LoggerFactory;
 import org.sonatype.aether.AbstractRepositoryListener;
 import org.sonatype.aether.RepositoryEvent;
 
-/** Simple listener that print log. */
+/**
+ * Simple listener that print log.
+ */
 public class RepositoryListener extends AbstractRepositoryListener {
   Logger logger = LoggerFactory.getLogger(RepositoryListener.class);
 
@@ -40,11 +42,8 @@ public class RepositoryListener extends AbstractRepositoryListener {
 
   @Override
   public void artifactDescriptorInvalid(RepositoryEvent event) {
-    logger.info(
-        "Invalid artifact descriptor for "
-            + event.getArtifact()
-            + ": "
-            + event.getException().getMessage());
+    logger.info("Invalid artifact descriptor for " + event.getArtifact() + ": "
+                                                   + event.getException().getMessage());
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/RepositorySystemFactory.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/RepositorySystemFactory.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/RepositorySystemFactory.java
index 6e0187f..a224603 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/RepositorySystemFactory.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/RepositorySystemFactory.java
@@ -27,7 +27,9 @@ import org.sonatype.aether.connector.wagon.WagonProvider;
 import org.sonatype.aether.connector.wagon.WagonRepositoryConnectorFactory;
 import org.sonatype.aether.spi.connector.RepositoryConnectorFactory;
 
-/** Get maven repository instance. */
+/**
+ * Get maven repository instance.
+ */
 public class RepositorySystemFactory {
   public static RepositorySystem newRepositorySystem() {
     DefaultServiceLocator locator = new DefaultServiceLocator();
@@ -38,7 +40,9 @@ public class RepositorySystemFactory {
     return locator.getService(RepositorySystem.class);
   }
 
-  /** ManualWagonProvider */
+  /**
+   * ManualWagonProvider
+   */
   public static class ManualWagonProvider implements WagonProvider {
 
     @Override
@@ -55,6 +59,8 @@ public class RepositorySystemFactory {
     }
 
     @Override
-    public void release(Wagon arg0) {}
+    public void release(Wagon arg0) {
+
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/TransferListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/TransferListener.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/TransferListener.java
index 173f51c..7f25e3b 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/TransferListener.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/TransferListener.java
@@ -22,13 +22,16 @@ import java.text.DecimalFormatSymbols;
 import java.util.Locale;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.sonatype.aether.transfer.AbstractTransferListener;
 import org.sonatype.aether.transfer.TransferEvent;
 import org.sonatype.aether.transfer.TransferResource;
 
-/** Simple listener that show deps downloading progress. */
+/**
+ * Simple listener that show deps downloading progress.
+ */
 public class TransferListener extends AbstractTransferListener {
   private Logger logger = LoggerFactory.getLogger(TransferListener.class);
 
@@ -43,11 +46,8 @@ public class TransferListener extends AbstractTransferListener {
     String message =
         event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploading" : "Downloading";
 
-    logger.info(
-        message
-            + ": "
-            + event.getResource().getRepositoryUrl()
-            + event.getResource().getResourceName());
+    logger.info(message + ": " + event.getResource().getRepositoryUrl()
+                + event.getResource().getResourceName());
   }
 
   @Override
@@ -112,15 +112,8 @@ public class TransferListener extends AbstractTransferListener {
         throughput = " at " + format.format(kbPerSec) + " KB/sec";
       }
 
-      logger.info(
-          type
-              + ": "
-              + resource.getRepositoryUrl()
-              + resource.getResourceName()
-              + " ("
-              + len
-              + throughput
-              + ")");
+      logger.info(type + ": " + resource.getRepositoryUrl() + resource.getResourceName() + " ("
+          + len + throughput + ")");
     }
   }
 
@@ -146,4 +139,5 @@ public class TransferListener extends AbstractTransferListener {
   private long toKB(long bytes) {
     return (bytes + 1023) / 1024;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObject.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObject.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObject.java
index 976ba5f..1959e3d 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObject.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObject.java
@@ -18,19 +18,20 @@
 package org.apache.zeppelin.display;
 
 import com.google.gson.Gson;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Objects;
-import java.util.concurrent.ExecutorService;
 import org.apache.zeppelin.common.JsonSerializable;
 import org.apache.zeppelin.scheduler.ExecutorFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Objects;
+import java.util.concurrent.ExecutorService;
+
 /**
- * AngularObject provides binding between back-end (interpreter) and front-end User provided object
- * will automatically synchronized with front-end side. i.e. update from back-end will be sent to
- * front-end, update from front-end will sent-to backend
+ * AngularObject provides binding between back-end (interpreter) and front-end
+ * User provided object will automatically synchronized with front-end side.
+ * i.e. update from back-end will be sent to front-end, update from front-end will sent-to backend
  *
  * @param <T>
  */
@@ -40,20 +41,21 @@ public class AngularObject<T> implements JsonSerializable {
 
   private String name;
   private T object;
-
+  
   private transient AngularObjectListener listener;
   private transient List<AngularObjectWatcher> watchers = new LinkedList<>();
-
-  private String noteId; // noteId belonging to. null for global scope
+  
+  private String noteId;   // noteId belonging to. null for global scope 
   private String paragraphId; // paragraphId belongs to. null for notebook scope
 
   /**
    * Public constructor, neccessary for the deserialization when using Thrift angularRegistryPush()
-   * Without public constructor, GSON library will instantiate the AngularObject using serialization
-   * so the <strong>watchers</strong> list won't be initialized and will throw NullPointerException
-   * the first time it is accessed
+   * Without public constructor, GSON library will instantiate the AngularObject using
+   * serialization so the <strong>watchers</strong> list won't be initialized and will throw
+   * NullPointerException the first time it is accessed
    */
-  public AngularObject() {}
+  public AngularObject() {
+  }
 
   /**
    * To create new AngularObject, use AngularObjectRegistry.add()
@@ -64,8 +66,8 @@ public class AngularObject<T> implements JsonSerializable {
    * @param paragraphId paragraphId belongs to. can be null
    * @param listener event listener
    */
-  public AngularObject(
-      String name, T o, String noteId, String paragraphId, AngularObjectListener listener) {
+  public AngularObject(String name, T o, String noteId, String paragraphId,
+      AngularObjectListener listener) {
     this.name = name;
     this.noteId = noteId;
     this.paragraphId = paragraphId;
@@ -75,7 +77,6 @@ public class AngularObject<T> implements JsonSerializable {
 
   /**
    * Get name of this object
-   *
    * @return name
    */
   public String getName() {
@@ -84,7 +85,6 @@ public class AngularObject<T> implements JsonSerializable {
 
   /**
    * Set noteId
-   *
    * @param noteId noteId belongs to. can be null
    */
   public void setNoteId(String noteId) {
@@ -93,7 +93,6 @@ public class AngularObject<T> implements JsonSerializable {
 
   /**
    * Get noteId
-   *
    * @return noteId
    */
   public String getNoteId() {
@@ -102,7 +101,6 @@ public class AngularObject<T> implements JsonSerializable {
 
   /**
    * get ParagraphId
-   *
    * @return paragraphId
    */
   public String getParagraphId() {
@@ -111,7 +109,6 @@ public class AngularObject<T> implements JsonSerializable {
 
   /**
    * Set paragraphId
-   *
    * @param paragraphId paragraphId. can be null
    */
   public void setParagraphId(String paragraphId) {
@@ -120,7 +117,6 @@ public class AngularObject<T> implements JsonSerializable {
 
   /**
    * Check if it is global scope object
-   *
    * @return true it is global scope
    */
   public boolean isGlobal() {
@@ -132,9 +128,9 @@ public class AngularObject<T> implements JsonSerializable {
     if (this == o) return true;
     if (o == null || getClass() != o.getClass()) return false;
     AngularObject<?> that = (AngularObject<?>) o;
-    return Objects.equals(name, that.name)
-        && Objects.equals(noteId, that.noteId)
-        && Objects.equals(paragraphId, that.paragraphId);
+    return Objects.equals(name, that.name) &&
+            Objects.equals(noteId, that.noteId) &&
+            Objects.equals(paragraphId, that.paragraphId);
   }
 
   @Override
@@ -144,14 +140,16 @@ public class AngularObject<T> implements JsonSerializable {
 
   /**
    * Get value
-   *
    * @return
    */
   public Object get() {
     return object;
   }
 
-  /** fire updated() event for listener Note that it does not invoke watcher.watch() */
+  /**
+   * fire updated() event for listener
+   * Note that it does not invoke watcher.watch()
+   */
   public void emit() {
     if (listener != null) {
       listener.updated(this);
@@ -160,7 +158,6 @@ public class AngularObject<T> implements JsonSerializable {
 
   /**
    * Set value
-   *
    * @param o reference to new user provided object
    */
   public void set(T o) {
@@ -169,10 +166,9 @@ public class AngularObject<T> implements JsonSerializable {
 
   /**
    * Set value
-   *
    * @param o reference to new user provided object
    * @param emit false on skip firing event for listener. note that it does not skip invoke
-   *     watcher.watch() in any case
+   *             watcher.watch() in any case
    */
   public void set(T o, boolean emit) {
     final T before = object;
@@ -190,23 +186,21 @@ public class AngularObject<T> implements JsonSerializable {
 
     ExecutorService executor = ExecutorFactory.singleton().createOrGet("angularObjectWatcher", 50);
     for (final AngularObjectWatcher w : ws) {
-      executor.submit(
-          new Runnable() {
-            @Override
-            public void run() {
-              try {
-                w.watch(before, after);
-              } catch (Exception e) {
-                logger.error("Exception on watch", e);
-              }
-            }
-          });
+      executor.submit(new Runnable() {
+        @Override
+        public void run() {
+          try {
+            w.watch(before, after);
+          } catch (Exception e) {
+            logger.error("Exception on watch", e);
+          }
+        }
+      });
     }
   }
 
   /**
    * Set event listener for this object
-   *
    * @param listener
    */
   public void setListener(AngularObjectListener listener) {
@@ -215,7 +209,6 @@ public class AngularObject<T> implements JsonSerializable {
 
   /**
    * Get event listener of this object
-   *
    * @return event listener
    */
   public AngularObjectListener getListener() {
@@ -223,7 +216,8 @@ public class AngularObject<T> implements JsonSerializable {
   }
 
   /**
-   * Add a watcher for this object. Multiple watcher can be registered.
+   * Add a watcher for this object.
+   * Multiple watcher can be registered.
    *
    * @param watcher watcher to add
    */
@@ -235,7 +229,6 @@ public class AngularObject<T> implements JsonSerializable {
 
   /**
    * Remove a watcher from this object
-   *
    * @param watcher watcher to remove
    */
   public void removeWatcher(AngularObjectWatcher watcher) {
@@ -244,7 +237,9 @@ public class AngularObject<T> implements JsonSerializable {
     }
   }
 
-  /** Remove all watchers from this object */
+  /**
+   * Remove all watchers from this object
+   */
   public void clearAllWatchers() {
     synchronized (watchers) {
       watchers.clear();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectListener.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectListener.java
index c5bcd4e..20f34af 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectListener.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObjectListener.java
@@ -17,7 +17,9 @@
 
 package org.apache.zeppelin.display;
 
-/** */
+/**
+ *
+ */
 public interface AngularObjectListener {
   void updated(AngularObject updatedObject);
 }


[02/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/scheduler/RemoteSchedulerTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/scheduler/RemoteSchedulerTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/scheduler/RemoteSchedulerTest.java
index 132ec33..8dd83dd 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/scheduler/RemoteSchedulerTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/scheduler/RemoteSchedulerTest.java
@@ -17,14 +17,6 @@
 
 package org.apache.zeppelin.scheduler;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
 import org.apache.zeppelin.interpreter.AbstractInterpreterTest;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -38,6 +30,15 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
 public class RemoteSchedulerTest extends AbstractInterpreterTest
     implements RemoteInterpreterProcessListener {
 
@@ -60,54 +61,50 @@ public class RemoteSchedulerTest extends AbstractInterpreterTest
 
   @Test
   public void test() throws Exception {
-    final RemoteInterpreter intpA =
-        (RemoteInterpreter) interpreterSetting.getInterpreter("user1", "note1", "mock");
+    final RemoteInterpreter intpA = (RemoteInterpreter) interpreterSetting.getInterpreter("user1", "note1", "mock");
 
     intpA.open();
 
     Scheduler scheduler = intpA.getScheduler();
 
-    Job job =
-        new Job("jobId", "jobName", null) {
-          Object results;
-
-          @Override
-          public Object getReturn() {
-            return results;
-          }
-
-          @Override
-          public int progress() {
-            return 0;
-          }
-
-          @Override
-          public Map<String, Object> info() {
-            return null;
-          }
-
-          @Override
-          protected Object jobRun() throws Throwable {
-            intpA.interpret(
-                "1000",
-                InterpreterContext.builder()
-                    .setNoteId("noteId")
-                    .setParagraphId("jobId")
-                    .setResourcePool(new LocalResourcePool("pool1"))
-                    .build());
-            return "1000";
-          }
-
-          @Override
-          protected boolean jobAbort() {
-            return false;
-          }
-
-          @Override
-          public void setResult(Object results) {
-            this.results = results;
-          }
-        };
+    Job job = new Job("jobId", "jobName", null) {
+      Object results;
+
+      @Override
+      public Object getReturn() {
+        return results;
+      }
+
+      @Override
+      public int progress() {
+        return 0;
+      }
+
+      @Override
+      public Map<String, Object> info() {
+        return null;
+      }
+
+      @Override
+      protected Object jobRun() throws Throwable {
+        intpA.interpret("1000", InterpreterContext.builder()
+                .setNoteId("noteId")
+                .setParagraphId("jobId")
+                .setResourcePool(new LocalResourcePool("pool1"))
+                .build());
+        return "1000";
+      }
+
+      @Override
+      protected boolean jobAbort() {
+        return false;
+      }
+
+      @Override
+      public void setResult(Object results) {
+        this.results = results;
+      }
+    };
     scheduler.submit(job);
 
     int cycles = 0;
@@ -138,115 +135,111 @@ public class RemoteSchedulerTest extends AbstractInterpreterTest
 
   @Test
   public void testAbortOnPending() throws Exception {
-    final RemoteInterpreter intpA =
-        (RemoteInterpreter) interpreterSetting.getInterpreter("user1", "note1", "mock");
+    final RemoteInterpreter intpA = (RemoteInterpreter) interpreterSetting.getInterpreter("user1", "note1", "mock");
     intpA.open();
 
     Scheduler scheduler = intpA.getScheduler();
 
-    Job job1 =
-        new Job("jobId1", "jobName1", null) {
-          Object results;
-          InterpreterContext context =
-              InterpreterContext.builder()
-                  .setNoteId("noteId")
-                  .setParagraphId("jobId1")
-                  .setResourcePool(new LocalResourcePool("pool1"))
-                  .build();
-
-          @Override
-          public Object getReturn() {
-            return results;
+    Job job1 = new Job("jobId1", "jobName1", null) {
+      Object results;
+      InterpreterContext context = InterpreterContext.builder()
+          .setNoteId("noteId")
+          .setParagraphId("jobId1")
+          .setResourcePool(new LocalResourcePool("pool1"))
+          .build();
+
+      @Override
+      public Object getReturn() {
+        return results;
+      }
+
+      @Override
+      public int progress() {
+        return 0;
+      }
+
+      @Override
+      public Map<String, Object> info() {
+        return null;
+      }
+
+      @Override
+      protected Object jobRun() throws Throwable {
+        intpA.interpret("1000", context);
+        return "1000";
+      }
+
+      @Override
+      protected boolean jobAbort() {
+        if (isRunning()) {
+          try {
+            intpA.cancel(context);
+          } catch (InterpreterException e) {
+            e.printStackTrace();
           }
-
-          @Override
-          public int progress() {
-            return 0;
+        }
+        return true;
+      }
+
+      @Override
+      public void setResult(Object results) {
+        this.results = results;
+      }
+    };
+
+    Job job2 = new Job("jobId2", "jobName2", null) {
+      public Object results;
+      InterpreterContext context = InterpreterContext.builder()
+          .setNoteId("noteId")
+          .setParagraphId("jobId2")
+          .setResourcePool(new LocalResourcePool("pool1"))
+          .build();
+
+      @Override
+      public Object getReturn() {
+        return results;
+      }
+
+      @Override
+      public int progress() {
+        return 0;
+      }
+
+      @Override
+      public Map<String, Object> info() {
+        return null;
+      }
+
+      @Override
+      protected Object jobRun() throws Throwable {
+        intpA.interpret("1000", context);
+        return "1000";
+      }
+
+      @Override
+      protected boolean jobAbort() {
+        if (isRunning()) {
+          try {
+            intpA.cancel(context);
+          } catch (InterpreterException e) {
+            e.printStackTrace();
           }
+        }
+        return true;
+      }
 
-          @Override
-          public Map<String, Object> info() {
-            return null;
-          }
-
-          @Override
-          protected Object jobRun() throws Throwable {
-            intpA.interpret("1000", context);
-            return "1000";
-          }
-
-          @Override
-          protected boolean jobAbort() {
-            if (isRunning()) {
-              try {
-                intpA.cancel(context);
-              } catch (InterpreterException e) {
-                e.printStackTrace();
-              }
-            }
-            return true;
-          }
-
-          @Override
-          public void setResult(Object results) {
-            this.results = results;
-          }
-        };
-
-    Job job2 =
-        new Job("jobId2", "jobName2", null) {
-          public Object results;
-          InterpreterContext context =
-              InterpreterContext.builder()
-                  .setNoteId("noteId")
-                  .setParagraphId("jobId2")
-                  .setResourcePool(new LocalResourcePool("pool1"))
-                  .build();
-
-          @Override
-          public Object getReturn() {
-            return results;
-          }
-
-          @Override
-          public int progress() {
-            return 0;
-          }
-
-          @Override
-          public Map<String, Object> info() {
-            return null;
-          }
-
-          @Override
-          protected Object jobRun() throws Throwable {
-            intpA.interpret("1000", context);
-            return "1000";
-          }
-
-          @Override
-          protected boolean jobAbort() {
-            if (isRunning()) {
-              try {
-                intpA.cancel(context);
-              } catch (InterpreterException e) {
-                e.printStackTrace();
-              }
-            }
-            return true;
-          }
-
-          @Override
-          public void setResult(Object results) {
-            this.results = results;
-          }
-        };
+      @Override
+      public void setResult(Object results) {
+        this.results = results;
+      }
+    };
 
     job2.setResult("result2");
 
     scheduler.submit(job1);
     scheduler.submit(job2);
 
+
     int cycles = 0;
     while (!job1.isRunning() && cycles < MAX_WAIT_CYCLES) {
       Thread.sleep(TICK_WAIT);
@@ -274,27 +267,28 @@ public class RemoteSchedulerTest extends AbstractInterpreterTest
   }
 
   @Override
-  public void onOutputAppend(String noteId, String paragraphId, int index, String output) {}
+  public void onOutputAppend(String noteId, String paragraphId, int index, String output) {
+
+  }
 
   @Override
-  public void onOutputUpdated(
-      String noteId, String paragraphId, int index, InterpreterResult.Type type, String output) {}
+  public void onOutputUpdated(String noteId, String paragraphId, int index, InterpreterResult.Type type, String output) {
+
+  }
 
   @Override
-  public void onOutputClear(String noteId, String paragraphId) {}
+  public void onOutputClear(String noteId, String paragraphId) {
+
+  }
 
   @Override
-  public void runParagraphs(
-      String noteId,
-      List<Integer> paragraphIndices,
-      List<String> paragraphIds,
-      String curParagraphId)
-      throws IOException {}
+  public void runParagraphs(String noteId, List<Integer> paragraphIndices, List<String> paragraphIds, String curParagraphId) throws IOException {
+
+  }
 
   @Override
-  public void onParaInfosReceived(
-      String noteId,
-      String paragraphId,
-      String interpreterSettingId,
-      Map<String, String> metaInfos) {}
+  public void onParaInfosReceived(String noteId, String paragraphId,
+                                  String interpreterSettingId, Map<String, String> metaInfos) {
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/user/CredentialsTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/user/CredentialsTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/user/CredentialsTest.java
index 233d446..84a1244 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/user/CredentialsTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/user/CredentialsTest.java
@@ -17,10 +17,11 @@
 
 package org.apache.zeppelin.user;
 
-import static org.junit.Assert.assertEquals;
+import org.junit.Test;
 
 import java.io.IOException;
-import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
 
 public class CredentialsTest {
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/user/EncryptorTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/user/EncryptorTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/user/EncryptorTest.java
index aebf45a..9950be6 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/user/EncryptorTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/user/EncryptorTest.java
@@ -17,12 +17,13 @@
 
 package org.apache.zeppelin.user;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-
 import java.io.IOException;
+
 import org.junit.Test;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+
 public class EncryptorTest {
 
   @Test

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/util/UtilTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/util/UtilTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/util/UtilTest.java
index 004a2e4..3c3ea48 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/util/UtilTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/util/UtilTest.java
@@ -17,20 +17,19 @@
 
 package org.apache.zeppelin.util;
 
-import static org.junit.Assert.assertNotNull;
-
 import org.junit.Test;
+import static org.junit.Assert.assertNotNull;
 
 public class UtilTest {
 
-  @Test
-  public void getVersionTest() {
-    assertNotNull(Util.getVersion());
-  }
+    @Test
+    public void getVersionTest() {
+        assertNotNull(Util.getVersion());
+    }
 
-  @Test
-  public void getGitInfoTest() {
-    assertNotNull(Util.getGitCommitId());
-    assertNotNull(Util.getGitTimestamp());
-  }
+    @Test
+    public void getGitInfoTest() {
+        assertNotNull(Util.getGitCommitId());
+        assertNotNull(Util.getGitTimestamp());
+    }
 }


[04/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/install/InstallInterpreterTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/install/InstallInterpreterTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/install/InstallInterpreterTest.java
index a03cee9..e934f1a 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/install/InstallInterpreterTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/install/InstallInterpreterTest.java
@@ -1,16 +1,17 @@
 package org.apache.zeppelin.interpreter.install;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.IOException;
 import org.apache.commons.io.FileUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.File;
+import java.io.IOException;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -34,9 +35,7 @@ public class InstallInterpreterTest {
 
   @Before
   public void setUp() throws IOException {
-    tmpDir =
-        new File(
-            System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis());
+    tmpDir = new File(System.getProperty("java.io.tmpdir")+"/ZeppelinLTest_"+System.currentTimeMillis());
     new File(tmpDir, "conf").mkdirs();
     interpreterBaseDir = new File(tmpDir, "interpreter");
     File localRepoDir = new File(tmpDir, "local-repo");
@@ -45,9 +44,9 @@ public class InstallInterpreterTest {
 
     File interpreterListFile = new File(tmpDir, "conf/interpreter-list");
 
+
     // create interpreter list file
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(), tmpDir.getAbsolutePath());
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(), tmpDir.getAbsolutePath());
 
     String interpreterList = "";
     interpreterList += "intp1   org.apache.commons:commons-csv:1.1   test interpreter 1\n";
@@ -55,9 +54,8 @@ public class InstallInterpreterTest {
 
     FileUtils.writeStringToFile(new File(tmpDir, "conf/interpreter-list"), interpreterList);
 
-    installer =
-        new InstallInterpreter(
-            interpreterListFile, interpreterBaseDir, localRepoDir.getAbsolutePath());
+    installer = new InstallInterpreter(interpreterListFile, interpreterBaseDir, localRepoDir
+        .getAbsolutePath());
   }
 
   @After
@@ -65,6 +63,7 @@ public class InstallInterpreterTest {
     FileUtils.deleteDirectory(tmpDir);
   }
 
+
   @Test
   public void testList() {
     assertEquals(2, installer.list().size());

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/lifecycle/TimeoutLifecycleManagerTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/lifecycle/TimeoutLifecycleManagerTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/lifecycle/TimeoutLifecycleManagerTest.java
index 0576e9b..db08016 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/lifecycle/TimeoutLifecycleManagerTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/lifecycle/TimeoutLifecycleManagerTest.java
@@ -17,12 +17,6 @@
 
 package org.apache.zeppelin.interpreter.lifecycle;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.Map;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.interpreter.AbstractInterpreterTest;
 import org.apache.zeppelin.interpreter.InterpreterContext;
@@ -32,43 +26,39 @@ import org.apache.zeppelin.interpreter.remote.RemoteInterpreter;
 import org.apache.zeppelin.scheduler.Job;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 public class TimeoutLifecycleManagerTest extends AbstractInterpreterTest {
 
   @Override
   public void setUp() throws Exception {
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_LIFECYCLE_MANAGER_CLASS.getVarName(),
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_LIFECYCLE_MANAGER_CLASS.getVarName(),
         TimeoutLifecycleManager.class.getName());
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_LIFECYCLE_MANAGER_TIMEOUT_CHECK_INTERVAL
-            .getVarName(),
-        "1000");
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_LIFECYCLE_MANAGER_TIMEOUT_THRESHOLD
-            .getVarName(),
-        "10000");
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_LIFECYCLE_MANAGER_TIMEOUT_CHECK_INTERVAL.getVarName(), "1000");
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_LIFECYCLE_MANAGER_TIMEOUT_THRESHOLD.getVarName(), "10000");
     super.setUp();
   }
 
   @Test
   public void testTimeout_1() throws InterpreterException, InterruptedException, IOException {
-    assertTrue(
-        interpreterFactory.getInterpreter("user1", "note1", "test.echo", "test")
-            instanceof RemoteInterpreter);
-    RemoteInterpreter remoteInterpreter =
-        (RemoteInterpreter)
-            interpreterFactory.getInterpreter("user1", "note1", "test.echo", "test");
+    assertTrue(interpreterFactory.getInterpreter("user1", "note1", "test.echo", "test") instanceof RemoteInterpreter);
+    RemoteInterpreter remoteInterpreter = (RemoteInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test.echo", "test");
     assertFalse(remoteInterpreter.isOpened());
-    InterpreterSetting interpreterSetting =
-        interpreterSettingManager.getInterpreterSettingByName("test");
+    InterpreterSetting interpreterSetting = interpreterSettingManager.getInterpreterSettingByName("test");
     assertEquals(1, interpreterSetting.getAllInterpreterGroups().size());
-    Thread.sleep(15 * 1000);
-    // InterpreterGroup is not removed after 15 seconds, as TimeoutLifecycleManager only manage it
-    // after it is started
+    Thread.sleep(15*1000);
+    // InterpreterGroup is not removed after 15 seconds, as TimeoutLifecycleManager only manage it after it is started
     assertEquals(1, interpreterSetting.getAllInterpreterGroups().size());
 
-    InterpreterContext context =
-        InterpreterContext.builder().setNoteId("noteId").setParagraphId("paragraphId").build();
+    InterpreterContext context = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .build();
     remoteInterpreter.interpret("hello world", context);
     assertTrue(remoteInterpreter.isOpened());
 
@@ -80,59 +70,52 @@ public class TimeoutLifecycleManagerTest extends AbstractInterpreterTest {
 
   @Test
   public void testTimeout_2() throws InterpreterException, InterruptedException, IOException {
-    assertTrue(
-        interpreterFactory.getInterpreter("user1", "note1", "test.sleep", "test")
-            instanceof RemoteInterpreter);
-    final RemoteInterpreter remoteInterpreter =
-        (RemoteInterpreter)
-            interpreterFactory.getInterpreter("user1", "note1", "test.sleep", "test");
+    assertTrue(interpreterFactory.getInterpreter("user1", "note1", "test.sleep", "test") instanceof RemoteInterpreter);
+    final RemoteInterpreter remoteInterpreter = (RemoteInterpreter) interpreterFactory.getInterpreter("user1", "note1", "test.sleep", "test");
 
     // simulate how zeppelin submit paragraph
-    remoteInterpreter
-        .getScheduler()
-        .submit(
-            new Job("test-job", null) {
-              @Override
-              public Object getReturn() {
-                return null;
-              }
-
-              @Override
-              public int progress() {
-                return 0;
-              }
-
-              @Override
-              public Map<String, Object> info() {
-                return null;
-              }
-
-              @Override
-              protected Object jobRun() throws Throwable {
-                InterpreterContext context =
-                    InterpreterContext.builder()
-                        .setNoteId("noteId")
-                        .setParagraphId("paragraphId")
-                        .build();
-                return remoteInterpreter.interpret("100000", context);
-              }
-
-              @Override
-              protected boolean jobAbort() {
-                return false;
-              }
-
-              @Override
-              public void setResult(Object results) {}
-            });
-
-    while (!remoteInterpreter.isOpened()) {
+    remoteInterpreter.getScheduler().submit(new Job("test-job", null) {
+      @Override
+      public Object getReturn() {
+        return null;
+      }
+
+      @Override
+      public int progress() {
+        return 0;
+      }
+
+      @Override
+      public Map<String, Object> info() {
+        return null;
+      }
+
+      @Override
+      protected Object jobRun() throws Throwable {
+        InterpreterContext context = InterpreterContext.builder()
+            .setNoteId("noteId")
+            .setParagraphId("paragraphId")
+            .build();
+        return remoteInterpreter.interpret("100000", context);
+      }
+
+      @Override
+      protected boolean jobAbort() {
+        return false;
+      }
+
+      @Override
+      public void setResult(Object results) {
+
+      }
+    });
+
+    while(!remoteInterpreter.isOpened()) {
       Thread.sleep(1000);
       LOGGER.info("Wait for interpreter to be started");
     }
 
-    InterpreterSetting interpreterSetting =
-        interpreterSettingManager.getInterpreterSettingByName("test");
+    InterpreterSetting interpreterSetting = interpreterSettingManager.getInterpreterSettingByName("test");
     assertEquals(1, interpreterSetting.getAllInterpreterGroups().size());
 
     Thread.sleep(15 * 1000);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/mock/MockInterpreter1.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/mock/MockInterpreter1.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/mock/MockInterpreter1.java
index c466641..500c4f7 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/mock/MockInterpreter1.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/mock/MockInterpreter1.java
@@ -1,28 +1,22 @@
 /*
- * 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.
- */
+* 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.interpreter.mock;
 
-import java.lang.management.ManagementFactory;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
@@ -30,86 +24,92 @@ import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
 
+import java.lang.management.ManagementFactory;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.atomic.AtomicInteger;
+
 public class MockInterpreter1 extends Interpreter {
 
-  private static AtomicInteger IdGenerator = new AtomicInteger();
-
-  private int object_id;
-  private String pid;
-  Map<String, Object> vars = new HashMap<>();
-
-  public MockInterpreter1(Properties property) {
-    super(property);
-    this.object_id = IdGenerator.getAndIncrement();
-    this.pid = ManagementFactory.getRuntimeMXBean().getName().split("@")[0];
-  }
-
-  boolean open;
-
-  @Override
-  public void open() {
-    open = true;
-  }
-
-  @Override
-  public void close() {
-    open = false;
-  }
-
-  public boolean isOpen() {
-    return open;
-  }
-
-  @Override
-  public InterpreterResult interpret(String st, InterpreterContext context) {
-    InterpreterResult result;
-
-    if ("getId".equals(st)) {
-      // get unique id of this interpreter instance
-      result =
-          new InterpreterResult(
-              InterpreterResult.Code.SUCCESS, "" + this.object_id + "-" + this.pid);
-    } else if (st.startsWith("sleep")) {
-      try {
-        Thread.sleep(Integer.parseInt(st.split(" ")[1]));
-      } catch (InterruptedException e) {
-        // nothing to do
-      }
-      result = new InterpreterResult(InterpreterResult.Code.SUCCESS, "repl1: " + st);
-    } else {
-      result = new InterpreterResult(InterpreterResult.Code.SUCCESS, "repl1: " + st);
-    }
-
-    if (context.getResourcePool() != null) {
-      context
-          .getResourcePool()
-          .put(context.getNoteId(), context.getParagraphId(), "result", result);
-    }
-
-    return result;
-  }
-
-  @Override
-  public void cancel(InterpreterContext context) {}
-
-  @Override
-  public FormType getFormType() {
-    return FormType.SIMPLE;
-  }
-
-  @Override
-  public int getProgress(InterpreterContext context) {
-    return 0;
-  }
-
-  @Override
-  public Scheduler getScheduler() {
-    return SchedulerFactory.singleton().createOrGetFIFOScheduler("test_" + this.hashCode());
-  }
-
-  @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
-    return null;
-  }
+	private static AtomicInteger IdGenerator = new AtomicInteger();
+
+	private int object_id;
+	private String pid;
+	Map<String, Object> vars = new HashMap<>();
+
+	public MockInterpreter1(Properties property) {
+		super(property);
+		this.object_id = IdGenerator.getAndIncrement();
+		this.pid = ManagementFactory.getRuntimeMXBean().getName().split("@")[0];
+	}
+
+	boolean open;
+
+
+	@Override
+	public void open() {
+		open = true;
+	}
+
+	@Override
+	public void close() {
+		open = false;
+	}
+
+
+	public boolean isOpen() {
+		return open;
+	}
+
+	@Override
+	public InterpreterResult interpret(String st, InterpreterContext context) {
+		InterpreterResult result;
+
+		if ("getId".equals(st)) {
+			// get unique id of this interpreter instance
+			result = new InterpreterResult(InterpreterResult.Code.SUCCESS, "" + this.object_id + "-" + this.pid);
+		} else if (st.startsWith("sleep")) {
+			try {
+				Thread.sleep(Integer.parseInt(st.split(" ")[1]));
+			} catch (InterruptedException e) {
+				// nothing to do
+			}
+			result = new InterpreterResult(InterpreterResult.Code.SUCCESS, "repl1: " + st);
+		} else {
+			result = new InterpreterResult(InterpreterResult.Code.SUCCESS, "repl1: " + st);
+		}
+
+		if (context.getResourcePool() != null) {
+			context.getResourcePool().put(context.getNoteId(), context.getParagraphId(), "result", result);
+		}
+
+		return result;
+	}
+
+	@Override
+	public void cancel(InterpreterContext context) {
+	}
+
+	@Override
+	public FormType getFormType() {
+		return FormType.SIMPLE;
+	}
+
+	@Override
+	public int getProgress(InterpreterContext context) {
+		return 0;
+	}
+
+	@Override
+	public Scheduler getScheduler() {
+		return SchedulerFactory.singleton().createOrGetFIFOScheduler("test_"+this.hashCode());
+	}
+
+	@Override
+	public List<InterpreterCompletion> completion(String buf, int cursor,
+			InterpreterContext interpreterContext) {
+		return null;
+	}
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/mock/MockInterpreter2.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/mock/MockInterpreter2.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/mock/MockInterpreter2.java
index 0d70635..f36df56 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/mock/MockInterpreter2.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/mock/MockInterpreter2.java
@@ -17,10 +17,6 @@
 
 package org.apache.zeppelin.interpreter.mock;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
@@ -28,76 +24,81 @@ import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
 
-public class MockInterpreter2 extends Interpreter {
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+public class MockInterpreter2 extends Interpreter{
   Map<String, Object> vars = new HashMap<>();
 
-  public MockInterpreter2(Properties property) {
-    super(property);
-  }
-
-  boolean open;
-
-  @Override
-  public void open() {
-    open = true;
-  }
-
-  @Override
-  public void close() {
-    open = false;
-  }
-
-  public boolean isOpen() {
-    return open;
-  }
-
-  @Override
-  public InterpreterResult interpret(String st, InterpreterContext context) {
-    InterpreterResult result;
-
-    if ("getId".equals(st)) {
-      // get unique id of this interpreter instance
-      result = new InterpreterResult(InterpreterResult.Code.SUCCESS, "" + this.hashCode());
-    } else if (st.startsWith("sleep")) {
-      try {
-        Thread.sleep(Integer.parseInt(st.split(" ")[1]));
-      } catch (InterruptedException e) {
-        // nothing to do
-      }
-      result = new InterpreterResult(InterpreterResult.Code.SUCCESS, "repl2: " + st);
-    } else {
-      result = new InterpreterResult(InterpreterResult.Code.SUCCESS, "repl2: " + st);
-    }
-
-    if (context.getResourcePool() != null) {
-      context
-          .getResourcePool()
-          .put(context.getNoteId(), context.getParagraphId(), "result", result);
-    }
-    return result;
-  }
-
-  @Override
-  public void cancel(InterpreterContext context) {}
-
-  @Override
-  public FormType getFormType() {
-    return FormType.SIMPLE;
-  }
-
-  @Override
-  public int getProgress(InterpreterContext context) {
-    return 0;
-  }
-
-  @Override
-  public Scheduler getScheduler() {
-    return SchedulerFactory.singleton().createOrGetFIFOScheduler("test_" + this.hashCode());
-  }
-
-  @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
-    return null;
-  }
+	public MockInterpreter2(Properties property) {
+		super(property);
+	}
+
+	boolean open;
+
+	@Override
+	public void open() {
+		open = true;
+	}
+
+	@Override
+	public void close() {
+		open = false;
+	}
+
+	public boolean isOpen() {
+		return open;
+	}
+
+
+	@Override
+	public InterpreterResult interpret(String st, InterpreterContext context) {
+		InterpreterResult result;
+
+		if ("getId".equals(st)) {
+			// get unique id of this interpreter instance
+			result = new InterpreterResult(InterpreterResult.Code.SUCCESS, "" + this.hashCode());
+		} else if (st.startsWith("sleep")) {
+			try {
+				Thread.sleep(Integer.parseInt(st.split(" ")[1]));
+			} catch (InterruptedException e) {
+				// nothing to do
+			}
+			result = new InterpreterResult(InterpreterResult.Code.SUCCESS, "repl2: " + st);
+		} else {
+			result = new InterpreterResult(InterpreterResult.Code.SUCCESS, "repl2: " + st);
+		}
+
+		if (context.getResourcePool() != null) {
+			context.getResourcePool().put(context.getNoteId(), context.getParagraphId(), "result", result);
+		}
+		return result;
+	}
+
+	@Override
+	public void cancel(InterpreterContext context) {
+	}
+
+	@Override
+	public FormType getFormType() {
+		return FormType.SIMPLE;
+	}
+
+	@Override
+	public int getProgress(InterpreterContext context) {
+		return 0;
+	}
+
+	@Override
+	public Scheduler getScheduler() {
+		return SchedulerFactory.singleton().createOrGetFIFOScheduler("test_"+this.hashCode());
+	}
+
+	@Override
+	public List<InterpreterCompletion> completion(String buf, int cursor,
+			InterpreterContext interpreterContext) {
+		return null;
+	}
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/recovery/FileSystemRecoveryStorageTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/recovery/FileSystemRecoveryStorageTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/recovery/FileSystemRecoveryStorageTest.java
index c0b4f3a..2eaed74 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/recovery/FileSystemRecoveryStorageTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/recovery/FileSystemRecoveryStorageTest.java
@@ -1,10 +1,6 @@
 package org.apache.zeppelin.interpreter.recovery;
 
-import static org.junit.Assert.assertEquals;
-
 import com.google.common.io.Files;
-import java.io.File;
-import java.io.IOException;
 import org.apache.commons.io.FileUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.interpreter.AbstractInterpreterTest;
@@ -17,19 +13,21 @@ import org.apache.zeppelin.interpreter.remote.RemoteInterpreter;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.File;
+import java.io.IOException;
+
+import static org.junit.Assert.assertEquals;
+
 public class FileSystemRecoveryStorageTest extends AbstractInterpreterTest {
 
   private File recoveryDir = null;
 
   @Before
   public void setUp() throws Exception {
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_RECOVERY_STORAGE_CLASS.getVarName(),
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_RECOVERY_STORAGE_CLASS.getVarName(),
         FileSystemRecoveryStorage.class.getName());
     recoveryDir = Files.createTempDir();
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_RECOVERY_DIR.getVarName(),
-        recoveryDir.getAbsolutePath());
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_RECOVERY_DIR.getVarName(), recoveryDir.getAbsolutePath());
     super.setUp();
   }
 
@@ -46,8 +44,10 @@ public class FileSystemRecoveryStorageTest extends AbstractInterpreterTest {
 
     Interpreter interpreter1 = interpreterSetting.getDefaultInterpreter("user1", "note1");
     RemoteInterpreter remoteInterpreter1 = (RemoteInterpreter) interpreter1;
-    InterpreterContext context1 =
-        InterpreterContext.builder().setNoteId("noteId").setParagraphId("paragraphId").build();
+    InterpreterContext context1 = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .build();
     remoteInterpreter1.interpret("hello", context1);
 
     assertEquals(1, interpreterSettingManager.getRecoveryStorage().restore().size());
@@ -63,15 +63,19 @@ public class FileSystemRecoveryStorageTest extends AbstractInterpreterTest {
 
     Interpreter interpreter1 = interpreterSetting.getDefaultInterpreter("user1", "note1");
     RemoteInterpreter remoteInterpreter1 = (RemoteInterpreter) interpreter1;
-    InterpreterContext context1 =
-        InterpreterContext.builder().setNoteId("noteId").setParagraphId("paragraphId").build();
+    InterpreterContext context1 = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .build();
     remoteInterpreter1.interpret("hello", context1);
     assertEquals(1, interpreterSettingManager.getRecoveryStorage().restore().size());
 
     Interpreter interpreter2 = interpreterSetting.getDefaultInterpreter("user2", "note2");
     RemoteInterpreter remoteInterpreter2 = (RemoteInterpreter) interpreter2;
-    InterpreterContext context2 =
-        InterpreterContext.builder().setNoteId("noteId").setParagraphId("paragraphId").build();
+    InterpreterContext context2 = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .build();
     remoteInterpreter2.interpret("hello", context2);
 
     assertEquals(2, interpreterSettingManager.getRecoveryStorage().restore().size());
@@ -82,4 +86,5 @@ public class FileSystemRecoveryStorageTest extends AbstractInterpreterTest {
     interpreterSetting.close();
     assertEquals(0, interpreterSettingManager.getRecoveryStorage().restore().size());
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/AppendOutputRunnerTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/AppendOutputRunnerTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/AppendOutputRunnerTest.java
index decc19d..7bbd2b8 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/AppendOutputRunnerTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/AppendOutputRunnerTest.java
@@ -17,18 +17,6 @@
 
 package org.apache.zeppelin.interpreter.remote;
 
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Mockito.*;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
 import org.apache.log4j.AppenderSkeleton;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
@@ -38,18 +26,30 @@ import org.junit.Test;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Mockito.*;
+
 public class AppendOutputRunnerTest {
 
   private static final int NUM_EVENTS = 10000;
   private static final int NUM_CLUBBED_EVENTS = 100;
-  private static final ScheduledExecutorService service =
-      Executors.newSingleThreadScheduledExecutor();
+  private static final ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();
   private static ScheduledFuture<?> future = null;
   /* It is being accessed by multiple threads.
    * While loop for 'loopForBufferCompletion' could
    * run for-ever.
    */
-  private static volatile int numInvocations = 0;
+  private volatile static int numInvocations = 0;
 
   @After
   public void afterEach() {
@@ -64,8 +64,7 @@ public class AppendOutputRunnerTest {
     String[][] buffer = {{"note", "para", "data\n"}};
 
     loopForCompletingEvents(listener, 1, buffer);
-    verify(listener, times(1))
-        .onOutputAppend(any(String.class), any(String.class), anyInt(), any(String.class));
+    verify(listener, times(1)).onOutputAppend(any(String.class), any(String.class), anyInt(), any(String.class));
     verify(listener, times(1)).onOutputAppend("note", "para", 0, "data\n");
   }
 
@@ -75,14 +74,13 @@ public class AppendOutputRunnerTest {
     String note1 = "note1";
     String para1 = "para1";
     String[][] buffer = {
-      {note1, para1, "data1\n"},
-      {note1, para1, "data2\n"},
-      {note1, para1, "data3\n"}
+        {note1, para1, "data1\n"},
+        {note1, para1, "data2\n"},
+        {note1, para1, "data3\n"}
     };
 
     loopForCompletingEvents(listener, 1, buffer);
-    verify(listener, times(1))
-        .onOutputAppend(any(String.class), any(String.class), anyInt(), any(String.class));
+    verify(listener, times(1)).onOutputAppend(any(String.class), any(String.class), anyInt(), any(String.class));
     verify(listener, times(1)).onOutputAppend(note1, para1, 0, "data1\ndata2\ndata3\n");
   }
 
@@ -94,15 +92,14 @@ public class AppendOutputRunnerTest {
     String para1 = "para1";
     String para2 = "para2";
     String[][] buffer = {
-      {note1, para1, "data1\n"},
-      {note1, para2, "data2\n"},
-      {note2, para1, "data3\n"},
-      {note2, para2, "data4\n"}
+        {note1, para1, "data1\n"},
+        {note1, para2, "data2\n"},
+        {note2, para1, "data3\n"},
+        {note2, para2, "data4\n"}
     };
     loopForCompletingEvents(listener, 4, buffer);
 
-    verify(listener, times(4))
-        .onOutputAppend(any(String.class), any(String.class), anyInt(), any(String.class));
+    verify(listener, times(4)).onOutputAppend(any(String.class), any(String.class), anyInt(), any(String.class));
     verify(listener, times(1)).onOutputAppend(note1, para1, 0, "data1\n");
     verify(listener, times(1)).onOutputAppend(note1, para2, 0, "data2\n");
     verify(listener, times(1)).onOutputAppend(note2, para1, 0, "data3\n");
@@ -113,9 +110,8 @@ public class AppendOutputRunnerTest {
   public void testClubbedData() throws InterruptedException {
     RemoteInterpreterProcessListener listener = mock(RemoteInterpreterProcessListener.class);
     AppendOutputRunner runner = new AppendOutputRunner(listener);
-    future =
-        service.scheduleWithFixedDelay(
-            runner, 0, AppendOutputRunner.BUFFER_TIME_MS, TimeUnit.MILLISECONDS);
+    future = service.scheduleWithFixedDelay(runner, 0,
+        AppendOutputRunner.BUFFER_TIME_MS, TimeUnit.MILLISECONDS);
     Thread thread = new Thread(new BombardEvents(runner));
     thread.start();
     thread.join();
@@ -126,8 +122,7 @@ public class AppendOutputRunnerTest {
      * calls, 30-40 Web-socket calls are made. Keeping
      * the unit-test to a pessimistic 100 web-socket calls.
      */
-    verify(listener, atMost(NUM_CLUBBED_EVENTS))
-        .onOutputAppend(any(String.class), any(String.class), anyInt(), any(String.class));
+    verify(listener, atMost(NUM_CLUBBED_EVENTS)).onOutputAppend(any(String.class), any(String.class), anyInt(), any(String.class));
   }
 
   @Test
@@ -137,7 +132,7 @@ public class AppendOutputRunnerTest {
     String data = "data\n";
     int numEvents = 100000;
 
-    for (int i = 0; i < numEvents; i++) {
+    for (int i=0; i<numEvents; i++) {
       runner.appendBuffer("noteId", "paraId", 0, data);
     }
 
@@ -153,18 +148,16 @@ public class AppendOutputRunnerTest {
     do {
       warnLogCounter = 0;
       log = appender.getLog();
-      for (LoggingEvent logEntry : log) {
+      for (LoggingEvent logEntry: log) {
         if (Level.WARN.equals(logEntry.getLevel())) {
           sizeWarnLogEntry = logEntry;
           warnLogCounter += 1;
         }
       }
-    } while (warnLogCounter != 2);
+    } while(warnLogCounter != 2);
 
-    String loggerString =
-        "Processing size for buffered append-output is high: "
-            + (data.length() * numEvents)
-            + " characters.";
+    String loggerString = "Processing size for buffered append-output is high: " +
+        (data.length() * numEvents) + " characters.";
     assertTrue(loggerString.equals(sizeWarnLogEntry.getMessage()));
   }
 
@@ -180,7 +173,7 @@ public class AppendOutputRunnerTest {
     public void run() {
       String noteId = "noteId";
       String paraId = "paraId";
-      for (int i = 0; i < NUM_EVENTS; i++) {
+      for (int i=0; i<NUM_EVENTS; i++) {
         runner.appendBuffer(noteId, paraId, 0, "data\n");
       }
     }
@@ -191,51 +184,48 @@ public class AppendOutputRunnerTest {
 
     @Override
     public boolean requiresLayout() {
-      return false;
+        return false;
     }
 
     @Override
     protected void append(final LoggingEvent loggingEvent) {
-      log.add(loggingEvent);
+        log.add(loggingEvent);
     }
 
     @Override
-    public void close() {}
+    public void close() {
+    }
 
     public List<LoggingEvent> getLog() {
-      return new ArrayList<>(log);
+        return new ArrayList<>(log);
     }
   }
 
   private void prepareInvocationCounts(RemoteInterpreterProcessListener listener) {
-    doAnswer(
-            new Answer<Void>() {
-              @Override
-              public Void answer(InvocationOnMock invocation) throws Throwable {
-                numInvocations += 1;
-                return null;
-              }
-            })
-        .when(listener)
-        .onOutputAppend(any(String.class), any(String.class), anyInt(), any(String.class));
+    doAnswer(new Answer<Void>() {
+      @Override
+      public Void answer(InvocationOnMock invocation) throws Throwable {
+        numInvocations += 1;
+        return null;
+      }
+    }).when(listener).onOutputAppend(any(String.class), any(String.class), anyInt(), any(String.class));
   }
 
-  private void loopForCompletingEvents(
-      RemoteInterpreterProcessListener listener, int numTimes, String[][] buffer) {
+  private void loopForCompletingEvents(RemoteInterpreterProcessListener listener,
+      int numTimes, String[][] buffer) {
     numInvocations = 0;
     prepareInvocationCounts(listener);
     AppendOutputRunner runner = new AppendOutputRunner(listener);
-    for (String[] bufferElement : buffer) {
+    for (String[] bufferElement: buffer) {
       runner.appendBuffer(bufferElement[0], bufferElement[1], 0, bufferElement[2]);
     }
-    future =
-        service.scheduleWithFixedDelay(
-            runner, 0, AppendOutputRunner.BUFFER_TIME_MS, TimeUnit.MILLISECONDS);
+    future = service.scheduleWithFixedDelay(runner, 0,
+        AppendOutputRunner.BUFFER_TIME_MS, TimeUnit.MILLISECONDS);
     long startTimeMs = System.currentTimeMillis();
-    while (numInvocations != numTimes) {
+    while(numInvocations != numTimes) {
       if (System.currentTimeMillis() - startTimeMs > 2000) {
         fail("Buffered events were not sent for 2 seconds");
       }
     }
   }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteAngularObjectTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteAngularObjectTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteAngularObjectTest.java
index 757e402..1029696 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteAngularObjectTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteAngularObjectTest.java
@@ -17,9 +17,6 @@
 
 package org.apache.zeppelin.interpreter.remote;
 
-import static org.junit.Assert.assertEquals;
-
-import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.zeppelin.display.AngularObject;
 import org.apache.zeppelin.display.AngularObjectRegistry;
 import org.apache.zeppelin.display.AngularObjectRegistryListener;
@@ -32,6 +29,10 @@ import org.apache.zeppelin.resource.LocalResourcePool;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.util.concurrent.atomic.AtomicInteger;
+
+import static org.junit.Assert.assertEquals;
+
 public class RemoteAngularObjectTest extends AbstractInterpreterTest
     implements AngularObjectRegistryListener {
 
@@ -54,24 +55,21 @@ public class RemoteAngularObjectTest extends AbstractInterpreterTest
 
     interpreterSetting = interpreterSettingManager.getInterpreterSettingByName("test");
     intp = (RemoteInterpreter) interpreterSetting.getInterpreter("user1", "note1", "mock_ao");
-    localRegistry =
-        (RemoteAngularObjectRegistry) intp.getInterpreterGroup().getAngularObjectRegistry();
-
-    context =
-        InterpreterContext.builder()
-            .setNoteId("note")
-            .setParagraphId("id")
-            .setAngularObjectRegistry(
-                new AngularObjectRegistry(intp.getInterpreterGroup().getId(), null))
-            .setResourcePool(new LocalResourcePool("pool1"))
-            .build();
+    localRegistry = (RemoteAngularObjectRegistry) intp.getInterpreterGroup().getAngularObjectRegistry();
+
+    context = InterpreterContext.builder()
+        .setNoteId("note")
+        .setParagraphId("id")
+        .setAngularObjectRegistry(new AngularObjectRegistry(intp.getInterpreterGroup().getId(), null))
+        .setResourcePool(new LocalResourcePool("pool1"))
+        .build();
 
     intp.open();
+
   }
 
   @Test
-  public void testAngularObjectInterpreterSideCRUD()
-      throws InterruptedException, InterpreterException {
+  public void testAngularObjectInterpreterSideCRUD() throws InterruptedException, InterpreterException {
     InterpreterResult ret = intp.interpret("get", context);
     Thread.sleep(500); // waitFor eventpoller pool event
     String[] result = ret.message().get(0).getData().split(" ");
@@ -104,8 +102,7 @@ public class RemoteAngularObjectTest extends AbstractInterpreterTest
   }
 
   @Test
-  public void testAngularObjectRemovalOnZeppelinServerSide()
-      throws InterruptedException, InterpreterException {
+  public void testAngularObjectRemovalOnZeppelinServerSide() throws InterruptedException, InterpreterException {
     // test if angularobject removal from server side propagate to interpreter process's registry.
     // will happen when notebook is removed.
 
@@ -130,8 +127,7 @@ public class RemoteAngularObjectTest extends AbstractInterpreterTest
   }
 
   @Test
-  public void testAngularObjectAddOnZeppelinServerSide()
-      throws InterruptedException, InterpreterException {
+  public void testAngularObjectAddOnZeppelinServerSide() throws InterruptedException, InterpreterException {
     // test if angularobject add from server side propagate to interpreter process's registry.
     // will happen when zeppelin server loads notebook and restore the object into registry
 
@@ -164,4 +160,5 @@ public class RemoteAngularObjectTest extends AbstractInterpreterTest
   public void onRemove(String interpreterGroupId, String name, String noteId, String paragraphId) {
     onRemove.incrementAndGet();
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterOutputTestStream.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterOutputTestStream.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterOutputTestStream.java
index 25e6f72..5e1cb7d 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterOutputTestStream.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterOutputTestStream.java
@@ -17,11 +17,6 @@
 
 package org.apache.zeppelin.interpreter.remote;
 
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
 import org.apache.zeppelin.interpreter.AbstractInterpreterTest;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -31,10 +26,20 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-/** Test for remote interpreter output stream */
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+
+
+/**
+ * Test for remote interpreter output stream
+ */
 public class RemoteInterpreterOutputTestStream extends AbstractInterpreterTest
     implements RemoteInterpreterProcessListener {
 
+
   private InterpreterSetting interpreterSetting;
 
   @Before
@@ -49,13 +54,15 @@ public class RemoteInterpreterOutputTestStream extends AbstractInterpreterTest
   }
 
   private InterpreterContext createInterpreterContext() {
-    return InterpreterContext.builder().setNoteId("noteId").setParagraphId("id").build();
+    return InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("id")
+        .build();
   }
 
   @Test
   public void testInterpreterResultOnly() throws InterpreterException {
-    RemoteInterpreter intp =
-        (RemoteInterpreter) interpreterSetting.getInterpreter("user1", "note1", "mock_stream");
+    RemoteInterpreter intp = (RemoteInterpreter) interpreterSetting.getInterpreter("user1", "note1", "mock_stream");
     InterpreterResult ret = intp.interpret("SUCCESS::staticresult", createInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, ret.code());
     assertEquals("staticresult", ret.message().get(0).getData());
@@ -71,8 +78,7 @@ public class RemoteInterpreterOutputTestStream extends AbstractInterpreterTest
 
   @Test
   public void testInterpreterOutputStreamOnly() throws InterpreterException {
-    RemoteInterpreter intp =
-        (RemoteInterpreter) interpreterSetting.getInterpreter("user1", "note1", "mock_stream");
+    RemoteInterpreter intp = (RemoteInterpreter) interpreterSetting.getInterpreter("user1", "note1", "mock_stream");
     InterpreterResult ret = intp.interpret("SUCCESS:streamresult:", createInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, ret.code());
     assertEquals("streamresult", ret.message().get(0).getData());
@@ -84,8 +90,7 @@ public class RemoteInterpreterOutputTestStream extends AbstractInterpreterTest
 
   @Test
   public void testInterpreterResultOutputStreamMixed() throws InterpreterException {
-    RemoteInterpreter intp =
-        (RemoteInterpreter) interpreterSetting.getInterpreter("user1", "note1", "mock_stream");
+    RemoteInterpreter intp = (RemoteInterpreter) interpreterSetting.getInterpreter("user1", "note1", "mock_stream");
     InterpreterResult ret = intp.interpret("SUCCESS:stream:static", createInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, ret.code());
     assertEquals("stream", ret.message().get(0).getData());
@@ -94,8 +99,7 @@ public class RemoteInterpreterOutputTestStream extends AbstractInterpreterTest
 
   @Test
   public void testOutputType() throws InterpreterException {
-    RemoteInterpreter intp =
-        (RemoteInterpreter) interpreterSetting.getInterpreter("user1", "note1", "mock_stream");
+    RemoteInterpreter intp = (RemoteInterpreter) interpreterSetting.getInterpreter("user1", "note1", "mock_stream");
 
     InterpreterResult ret = intp.interpret("SUCCESS:%html hello:", createInterpreterContext());
     assertEquals(InterpreterResult.Type.HTML, ret.message().get(0).getType());
@@ -113,27 +117,28 @@ public class RemoteInterpreterOutputTestStream extends AbstractInterpreterTest
   }
 
   @Override
-  public void onOutputAppend(String noteId, String paragraphId, int index, String output) {}
+  public void onOutputAppend(String noteId, String paragraphId, int index, String output) {
+
+  }
 
   @Override
-  public void onOutputUpdated(
-      String noteId, String paragraphId, int index, InterpreterResult.Type type, String output) {}
+  public void onOutputUpdated(String noteId, String paragraphId, int index, InterpreterResult.Type type, String output) {
+
+  }
 
   @Override
-  public void onOutputClear(String noteId, String paragraphId) {}
+  public void onOutputClear(String noteId, String paragraphId) {
+
+  }
 
   @Override
-  public void runParagraphs(
-      String noteId,
-      List<Integer> paragraphIndices,
-      List<String> paragraphIds,
-      String curParagraphId)
-      throws IOException {}
+  public void runParagraphs(String noteId, List<Integer> paragraphIndices, List<String> paragraphIds, String curParagraphId) throws IOException {
+
+  }
 
   @Override
-  public void onParaInfosReceived(
-      String noteId,
-      String paragraphId,
-      String interpreterSettingId,
-      Map<String, String> metaInfos) {}
+  public void onParaInfosReceived(String noteId, String paragraphId,
+      String interpreterSettingId, Map<String, String> metaInfos) {
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterTest.java
index 3086550..5b059ef 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterTest.java
@@ -17,13 +17,6 @@
 
 package org.apache.zeppelin.interpreter.remote;
 
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
 import org.apache.thrift.transport.TTransportException;
 import org.apache.zeppelin.display.AngularObjectRegistry;
 import org.apache.zeppelin.display.GUI;
@@ -31,9 +24,22 @@ import org.apache.zeppelin.display.Input;
 import org.apache.zeppelin.display.ui.OptionInput;
 import org.apache.zeppelin.interpreter.*;
 import org.apache.zeppelin.interpreter.InterpreterResult.Code;
+import org.apache.zeppelin.interpreter.remote.mock.GetAngularObjectSizeInterpreter;
+import org.apache.zeppelin.interpreter.remote.mock.GetEnvPropertyInterpreter;
+import org.apache.zeppelin.user.AuthenticationInfo;
+import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.junit.Assert.*;
+
 public class RemoteInterpreterTest extends AbstractInterpreterTest {
 
   private InterpreterSetting interpreterSetting;
@@ -58,17 +64,14 @@ public class RemoteInterpreterTest extends AbstractInterpreterTest {
     assertEquals(remoteInterpreter1.getScheduler(), remoteInterpreter2.getScheduler());
 
     InterpreterContext context1 = createDummyInterpreterContext();
-    assertEquals(
-        "hello", remoteInterpreter1.interpret("hello", context1).message().get(0).getData());
+    assertEquals("hello", remoteInterpreter1.interpret("hello", context1).message().get(0).getData());
     assertEquals(Interpreter.FormType.NATIVE, interpreter1.getFormType());
     assertEquals(0, remoteInterpreter1.getProgress(context1));
     assertNotNull(remoteInterpreter1.getOrCreateInterpreterProcess());
     assertTrue(remoteInterpreter1.getInterpreterGroup().getRemoteInterpreterProcess().isRunning());
 
-    assertEquals(
-        "hello", remoteInterpreter2.interpret("hello", context1).message().get(0).getData());
-    assertEquals(
-        remoteInterpreter1.getInterpreterGroup().getRemoteInterpreterProcess(),
+    assertEquals("hello", remoteInterpreter2.interpret("hello", context1).message().get(0).getData());
+    assertEquals(remoteInterpreter1.getInterpreterGroup().getRemoteInterpreterProcess(),
         remoteInterpreter2.getInterpreterGroup().getRemoteInterpreterProcess());
 
     // Call InterpreterGroup.close instead of Interpreter.close, otherwise we will have the
@@ -76,16 +79,14 @@ public class RemoteInterpreterTest extends AbstractInterpreterTest {
     remoteInterpreter1.getInterpreterGroup().close(remoteInterpreter1.getSessionId());
     assertNull(remoteInterpreter1.getInterpreterGroup().getRemoteInterpreterProcess());
     try {
-      assertEquals(
-          "hello", remoteInterpreter1.interpret("hello", context1).message().get(0).getData());
+      assertEquals("hello", remoteInterpreter1.interpret("hello", context1).message().get(0).getData());
       fail("Should not be able to call interpret after interpreter is closed");
     } catch (Exception e) {
       e.printStackTrace();
     }
 
     try {
-      assertEquals(
-          "hello", remoteInterpreter2.interpret("hello", context1).message().get(0).getData());
+      assertEquals("hello", remoteInterpreter2.interpret("hello", context1).message().get(0).getData());
       fail("Should not be able to call getProgress after RemoterInterpreterProcess is stoped");
     } catch (Exception e) {
       e.printStackTrace();
@@ -106,33 +107,28 @@ public class RemoteInterpreterTest extends AbstractInterpreterTest {
     assertNotEquals(interpreter1.getScheduler(), interpreter2.getScheduler());
 
     InterpreterContext context1 = createDummyInterpreterContext();
-    assertEquals(
-        "hello", remoteInterpreter1.interpret("hello", context1).message().get(0).getData());
-    assertEquals(
-        "hello", remoteInterpreter2.interpret("hello", context1).message().get(0).getData());
+    assertEquals("hello", remoteInterpreter1.interpret("hello", context1).message().get(0).getData());
+    assertEquals("hello", remoteInterpreter2.interpret("hello", context1).message().get(0).getData());
     assertEquals(Interpreter.FormType.NATIVE, interpreter1.getFormType());
     assertEquals(0, remoteInterpreter1.getProgress(context1));
 
     assertNotNull(remoteInterpreter1.getOrCreateInterpreterProcess());
     assertTrue(remoteInterpreter1.getInterpreterGroup().getRemoteInterpreterProcess().isRunning());
 
-    assertEquals(
-        remoteInterpreter1.getInterpreterGroup().getRemoteInterpreterProcess(),
+    assertEquals(remoteInterpreter1.getInterpreterGroup().getRemoteInterpreterProcess(),
         remoteInterpreter2.getInterpreterGroup().getRemoteInterpreterProcess());
     // Call InterpreterGroup.close instead of Interpreter.close, otherwise we will have the
     // RemoteInterpreterProcess leakage.
     remoteInterpreter1.getInterpreterGroup().close(remoteInterpreter1.getSessionId());
     try {
-      assertEquals(
-          "hello", remoteInterpreter1.interpret("hello", context1).message().get(0).getData());
+      assertEquals("hello", remoteInterpreter1.interpret("hello", context1).message().get(0).getData());
       fail("Should not be able to call interpret after interpreter is closed");
     } catch (Exception e) {
       e.printStackTrace();
     }
 
     assertTrue(remoteInterpreter2.getInterpreterGroup().getRemoteInterpreterProcess().isRunning());
-    assertEquals(
-        "hello", remoteInterpreter2.interpret("hello", context1).message().get(0).getData());
+    assertEquals("hello", remoteInterpreter2.interpret("hello", context1).message().get(0).getData());
     remoteInterpreter2.getInterpreterGroup().close(remoteInterpreter2.getSessionId());
     try {
       assertEquals("hello", remoteInterpreter2.interpret("hello", context1));
@@ -157,17 +153,14 @@ public class RemoteInterpreterTest extends AbstractInterpreterTest {
     assertNotEquals(interpreter1.getScheduler(), interpreter2.getScheduler());
 
     InterpreterContext context1 = createDummyInterpreterContext();
-    assertEquals(
-        "hello", remoteInterpreter1.interpret("hello", context1).message().get(0).getData());
-    assertEquals(
-        "hello", remoteInterpreter2.interpret("hello", context1).message().get(0).getData());
+    assertEquals("hello", remoteInterpreter1.interpret("hello", context1).message().get(0).getData());
+    assertEquals("hello", remoteInterpreter2.interpret("hello", context1).message().get(0).getData());
     assertEquals(Interpreter.FormType.NATIVE, interpreter1.getFormType());
     assertEquals(0, remoteInterpreter1.getProgress(context1));
     assertNotNull(remoteInterpreter1.getOrCreateInterpreterProcess());
     assertTrue(remoteInterpreter1.getInterpreterGroup().getRemoteInterpreterProcess().isRunning());
 
-    assertNotEquals(
-        remoteInterpreter1.getInterpreterGroup().getRemoteInterpreterProcess(),
+    assertNotEquals(remoteInterpreter1.getInterpreterGroup().getRemoteInterpreterProcess(),
         remoteInterpreter2.getInterpreterGroup().getRemoteInterpreterProcess());
     // Call InterpreterGroup.close instead of Interpreter.close, otherwise we will have the
     // RemoteInterpreterProcess leakage.
@@ -181,33 +174,29 @@ public class RemoteInterpreterTest extends AbstractInterpreterTest {
       e.printStackTrace();
     }
 
-    assertEquals(
-        "hello", remoteInterpreter2.interpret("hello", context1).message().get(0).getData());
+    assertEquals("hello", remoteInterpreter2.interpret("hello", context1).message().get(0).getData());
     remoteInterpreter2.getInterpreterGroup().close(remoteInterpreter2.getSessionId());
     try {
-      assertEquals(
-          "hello", remoteInterpreter2.interpret("hello", context1).message().get(0).getData());
+      assertEquals("hello", remoteInterpreter2.interpret("hello", context1).message().get(0).getData());
       fail("Should not be able to call interpret after interpreter is closed");
     } catch (Exception e) {
       e.printStackTrace();
     }
     assertNull(remoteInterpreter2.getInterpreterGroup().getRemoteInterpreterProcess());
+
   }
 
   @Test
-  public void testExecuteIncorrectPrecode()
-      throws TTransportException, IOException, InterpreterException {
+  public void testExecuteIncorrectPrecode() throws TTransportException, IOException, InterpreterException {
     interpreterSetting.getOption().setPerUser(InterpreterOption.SHARED);
     interpreterSetting.setProperty("zeppelin.SleepInterpreter.precode", "fail test");
     Interpreter interpreter1 = interpreterSetting.getInterpreter("user1", "note1", "sleep");
-    InterpreterContext context1 = createDummyInterpreterContext();
-    ;
+    InterpreterContext context1 = createDummyInterpreterContext();;
     assertEquals(Code.ERROR, interpreter1.interpret("10", context1).code());
   }
 
   @Test
-  public void testExecuteCorrectPrecode()
-      throws TTransportException, IOException, InterpreterException {
+  public void testExecuteCorrectPrecode() throws TTransportException, IOException, InterpreterException {
     interpreterSetting.getOption().setPerUser(InterpreterOption.SHARED);
     interpreterSetting.setProperty("zeppelin.SleepInterpreter.precode", "1");
     Interpreter interpreter1 = interpreterSetting.getInterpreter("user1", "note1", "sleep");
@@ -216,8 +205,7 @@ public class RemoteInterpreterTest extends AbstractInterpreterTest {
   }
 
   @Test
-  public void testRemoteInterperterErrorStatus()
-      throws TTransportException, IOException, InterpreterException {
+  public void testRemoteInterperterErrorStatus() throws TTransportException, IOException, InterpreterException {
     interpreterSetting.setProperty("zeppelin.interpreter.echo.fail", "true");
     interpreterSetting.getOption().setPerUser(InterpreterOption.SHARED);
 
@@ -225,8 +213,7 @@ public class RemoteInterpreterTest extends AbstractInterpreterTest {
     assertTrue(interpreter1 instanceof RemoteInterpreter);
     RemoteInterpreter remoteInterpreter1 = (RemoteInterpreter) interpreter1;
 
-    InterpreterContext context1 = createDummyInterpreterContext();
-    ;
+    InterpreterContext context1 = createDummyInterpreterContext();;
     assertEquals(Code.ERROR, remoteInterpreter1.interpret("hello", context1).code());
   }
 
@@ -240,30 +227,28 @@ public class RemoteInterpreterTest extends AbstractInterpreterTest {
     // run this dummy interpret method first to launch the RemoteInterpreterProcess to avoid the
     // time overhead of launching the process.
     interpreter1.interpret("1", context1);
-    Thread thread1 =
-        new Thread() {
-          @Override
-          public void run() {
-            try {
-              assertEquals(Code.SUCCESS, interpreter1.interpret("100", context1).code());
-            } catch (InterpreterException e) {
-              e.printStackTrace();
-              fail();
-            }
-          }
-        };
-    Thread thread2 =
-        new Thread() {
-          @Override
-          public void run() {
-            try {
-              assertEquals(Code.SUCCESS, interpreter1.interpret("100", context1).code());
-            } catch (InterpreterException e) {
-              e.printStackTrace();
-              fail();
-            }
-          }
-        };
+    Thread thread1 = new Thread() {
+      @Override
+      public void run() {
+        try {
+          assertEquals(Code.SUCCESS, interpreter1.interpret("100", context1).code());
+        } catch (InterpreterException e) {
+          e.printStackTrace();
+          fail();
+        }
+      }
+    };
+    Thread thread2 = new Thread() {
+      @Override
+      public void run() {
+        try {
+          assertEquals(Code.SUCCESS, interpreter1.interpret("100", context1).code());
+        } catch (InterpreterException e) {
+          e.printStackTrace();
+          fail();
+        }
+      }
+    };
     long start = System.currentTimeMillis();
     thread1.start();
     thread2.start();
@@ -284,30 +269,28 @@ public class RemoteInterpreterTest extends AbstractInterpreterTest {
     // run this dummy interpret method first to launch the RemoteInterpreterProcess to avoid the
     // time overhead of launching the process.
     interpreter1.interpret("1", context1);
-    Thread thread1 =
-        new Thread() {
-          @Override
-          public void run() {
-            try {
-              assertEquals(Code.SUCCESS, interpreter1.interpret("100", context1).code());
-            } catch (InterpreterException e) {
-              e.printStackTrace();
-              fail();
-            }
-          }
-        };
-    Thread thread2 =
-        new Thread() {
-          @Override
-          public void run() {
-            try {
-              assertEquals(Code.SUCCESS, interpreter1.interpret("100", context1).code());
-            } catch (InterpreterException e) {
-              e.printStackTrace();
-              fail();
-            }
-          }
-        };
+    Thread thread1 = new Thread() {
+      @Override
+      public void run() {
+        try {
+          assertEquals(Code.SUCCESS, interpreter1.interpret("100", context1).code());
+        } catch (InterpreterException e) {
+          e.printStackTrace();
+          fail();
+        }
+      }
+    };
+    Thread thread2 = new Thread() {
+      @Override
+      public void run() {
+        try {
+          assertEquals(Code.SUCCESS, interpreter1.interpret("100", context1).code());
+        } catch (InterpreterException e) {
+          e.printStackTrace();
+          fail();
+        }
+      }
+    };
     long start = System.currentTimeMillis();
     thread1.start();
     thread2.start();
@@ -331,14 +314,12 @@ public class RemoteInterpreterTest extends AbstractInterpreterTest {
     interpreterSetting.getOption().setPerUser(InterpreterOption.SCOPED);
     Interpreter interpreter1_user1 = interpreterSetting.getInterpreter("user1", "note1", "sleep");
     Interpreter interpreter2_user1 = interpreterSetting.getInterpreter("user1", "note1", "echo");
-    assertEquals(
-        interpreter1_user1.getInterpreterGroup(), interpreter2_user1.getInterpreterGroup());
+    assertEquals(interpreter1_user1.getInterpreterGroup(), interpreter2_user1.getInterpreterGroup());
     assertEquals(interpreter1_user1.getScheduler(), interpreter2_user1.getScheduler());
 
     Interpreter interpreter1_user2 = interpreterSetting.getInterpreter("user2", "note1", "sleep");
     Interpreter interpreter2_user2 = interpreterSetting.getInterpreter("user2", "note1", "echo");
-    assertEquals(
-        interpreter1_user2.getInterpreterGroup(), interpreter2_user2.getInterpreterGroup());
+    assertEquals(interpreter1_user2.getInterpreterGroup(), interpreter2_user2.getInterpreterGroup());
     assertEquals(interpreter1_user2.getScheduler(), interpreter2_user2.getScheduler());
 
     // scheduler is shared in session but not across session
@@ -380,29 +361,19 @@ public class RemoteInterpreterTest extends AbstractInterpreterTest {
     final Interpreter interpreter1 = interpreterSetting.getInterpreter("user1", "note1", "get");
     final InterpreterContext context1 = createDummyInterpreterContext();
 
-    assertEquals(
-        "VALUE_1", interpreter1.interpret("getEnv ENV_1", context1).message().get(0).getData());
-    assertEquals(
-        "null", interpreter1.interpret("getEnv ENV_2", context1).message().get(0).getData());
-
-    assertEquals(
-        "value_1",
-        interpreter1.interpret("getProperty property_1", context1).message().get(0).getData());
-    assertEquals(
-        "null",
-        interpreter1
-            .interpret("getProperty not_existed_property", context1)
-            .message()
-            .get(0)
-            .getData());
+    assertEquals("VALUE_1", interpreter1.interpret("getEnv ENV_1", context1).message().get(0).getData());
+    assertEquals("null", interpreter1.interpret("getEnv ENV_2", context1).message().get(0).getData());
+
+    assertEquals("value_1", interpreter1.interpret("getProperty property_1", context1).message().get(0).getData());
+    assertEquals("null", interpreter1.interpret("getProperty not_existed_property", context1).message().get(0).getData());
   }
 
   @Test
   public void testConvertDynamicForms() throws InterpreterException {
     GUI gui = new GUI();
     OptionInput.ParamOption[] paramOptions = {
-      new OptionInput.ParamOption("value1", "param1"),
-      new OptionInput.ParamOption("value2", "param2")
+        new OptionInput.ParamOption("value1", "param1"),
+        new OptionInput.ParamOption("value2", "param2")
     };
     List<Object> defaultValues = new ArrayList();
     defaultValues.add("default1");
@@ -417,4 +388,5 @@ public class RemoteInterpreterTest extends AbstractInterpreterTest {
     interpreter.interpret("text", context);
     assertArrayEquals(expected.values().toArray(), gui.getForms().values().toArray());
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/GetAngularObjectSizeInterpreter.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/GetAngularObjectSizeInterpreter.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/GetAngularObjectSizeInterpreter.java
index 551e10e..6d6495f 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/GetAngularObjectSizeInterpreter.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/GetAngularObjectSizeInterpreter.java
@@ -17,11 +17,13 @@
 
 package org.apache.zeppelin.interpreter.remote.mock;
 
-import java.util.Properties;
+
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 
+import java.util.Properties;
+
 public class GetAngularObjectSizeInterpreter extends Interpreter {
 
   public GetAngularObjectSizeInterpreter(Properties property) {
@@ -29,20 +31,25 @@ public class GetAngularObjectSizeInterpreter extends Interpreter {
   }
 
   @Override
-  public void open() {}
+  public void open() {
+
+  }
 
   @Override
-  public void close() {}
+  public void close() {
+
+  }
 
   @Override
   public InterpreterResult interpret(String st, InterpreterContext context) {
-    return new InterpreterResult(
-        InterpreterResult.Code.SUCCESS,
+    return new InterpreterResult(InterpreterResult.Code.SUCCESS,
         "" + context.getAngularObjectRegistry().getRegistry().size());
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+
+  }
 
   @Override
   public FormType getFormType() {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/GetEnvPropertyInterpreter.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/GetEnvPropertyInterpreter.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/GetEnvPropertyInterpreter.java
index 9d1b381..a039a59 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/GetEnvPropertyInterpreter.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/GetEnvPropertyInterpreter.java
@@ -16,8 +16,6 @@
  */
 package org.apache.zeppelin.interpreter.remote.mock;
 
-import java.util.List;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
@@ -25,6 +23,10 @@ import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
 
+import java.util.List;
+import java.util.Properties;
+
+
 public class GetEnvPropertyInterpreter extends Interpreter {
 
   public GetEnvPropertyInterpreter(Properties property) {
@@ -32,29 +34,29 @@ public class GetEnvPropertyInterpreter extends Interpreter {
   }
 
   @Override
-  public void open() {}
+  public void open() {
+  }
 
   @Override
-  public void close() {}
+  public void close() {
+  }
 
   @Override
   public InterpreterResult interpret(String st, InterpreterContext context) {
     String[] cmd = st.split(" ");
     if (cmd[0].equals("getEnv")) {
-      return new InterpreterResult(
-          InterpreterResult.Code.SUCCESS,
-          System.getenv(cmd[1]) == null ? "null" : System.getenv(cmd[1]));
-    } else if (cmd[0].equals("getProperty")) {
-      return new InterpreterResult(
-          InterpreterResult.Code.SUCCESS,
-          System.getProperty(cmd[1]) == null ? "null" : System.getProperty(cmd[1]));
+      return new InterpreterResult(InterpreterResult.Code.SUCCESS, System.getenv(cmd[1]) == null ? "null" : System.getenv(cmd[1]));
+    } else if (cmd[0].equals("getProperty")){
+      return new InterpreterResult(InterpreterResult.Code.SUCCESS, System.getProperty(cmd[1]) == null ? "null" : System.getProperty(cmd[1]));
     } else {
       return new InterpreterResult(InterpreterResult.Code.ERROR, cmd[0]);
     }
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+
+  }
 
   @Override
   public FormType getFormType() {
@@ -67,8 +69,8 @@ public class GetEnvPropertyInterpreter extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return null;
   }
 
@@ -77,3 +79,4 @@ public class GetEnvPropertyInterpreter extends Interpreter {
     return SchedulerFactory.singleton().createOrGetFIFOScheduler("interpreter_" + this.hashCode());
   }
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterA.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterA.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterA.java
index a4ba9e6..dbd2df7 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterA.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterA.java
@@ -17,8 +17,6 @@
 
 package org.apache.zeppelin.interpreter.remote.mock;
 
-import java.util.List;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -28,6 +26,9 @@ import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
 
+import java.util.List;
+import java.util.Properties;
+
 public class MockInterpreterA extends Interpreter {
 
   private String lastSt;
@@ -38,11 +39,12 @@ public class MockInterpreterA extends Interpreter {
 
   @Override
   public void open() {
-    // new RuntimeException().printStackTrace();
+    //new RuntimeException().printStackTrace();
   }
 
   @Override
-  public void close() {}
+  public void close() {
+  }
 
   public String getLastStatement() {
     return lastSt;
@@ -64,7 +66,9 @@ public class MockInterpreterA extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+
+  }
 
   @Override
   public FormType getFormType() {
@@ -77,19 +81,17 @@ public class MockInterpreterA extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return null;
   }
 
   @Override
   public Scheduler getScheduler() {
     if (getProperty("parallel") != null && getProperty("parallel").equals("true")) {
-      return SchedulerFactory.singleton()
-          .createOrGetParallelScheduler("interpreter_" + this.hashCode(), 10);
+      return SchedulerFactory.singleton().createOrGetParallelScheduler("interpreter_" + this.hashCode(), 10);
     } else {
-      return SchedulerFactory.singleton()
-          .createOrGetFIFOScheduler("interpreter_" + this.hashCode());
+      return SchedulerFactory.singleton().createOrGetFIFOScheduler("interpreter_" + this.hashCode());
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterAngular.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterAngular.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterAngular.java
index 2e253bd..ec89241 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterAngular.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterAngular.java
@@ -17,9 +17,6 @@
 
 package org.apache.zeppelin.interpreter.remote.mock;
 
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.zeppelin.display.AngularObjectRegistry;
 import org.apache.zeppelin.display.AngularObjectWatcher;
 import org.apache.zeppelin.interpreter.Interpreter;
@@ -28,6 +25,10 @@ import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.InterpreterResult.Code;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.atomic.AtomicInteger;
+
 public class MockInterpreterAngular extends Interpreter {
 
   AtomicInteger numWatch = new AtomicInteger(0);
@@ -37,10 +38,13 @@ public class MockInterpreterAngular extends Interpreter {
   }
 
   @Override
-  public void open() {}
+  public void open() {
+  }
 
   @Override
-  public void close() {}
+  public void close() {
+
+  }
 
   @Override
   public InterpreterResult interpret(String st, InterpreterContext context) {
@@ -59,16 +63,16 @@ public class MockInterpreterAngular extends Interpreter {
 
     if (cmd.equals("add")) {
       registry.add(name, value, context.getNoteId(), null);
-      registry
-          .get(name, context.getNoteId(), null)
-          .addWatcher(
-              new AngularObjectWatcher(null) {
-
-                @Override
-                public void watch(Object oldObject, Object newObject, InterpreterContext context) {
-                  numWatch.incrementAndGet();
-                }
-              });
+      registry.get(name, context.getNoteId(), null).addWatcher(new AngularObjectWatcher
+              (null) {
+
+        @Override
+        public void watch(Object oldObject, Object newObject,
+            InterpreterContext context) {
+          numWatch.incrementAndGet();
+        }
+
+      });
     } else if (cmd.equalsIgnoreCase("update")) {
       registry.get(name, context.getNoteId(), null).set(value);
     } else if (cmd.equals("remove")) {
@@ -81,13 +85,14 @@ public class MockInterpreterAngular extends Interpreter {
       logger.error("Exception in MockInterpreterAngular while interpret Thread.sleep", e);
     }
 
-    String msg =
-        registry.getAll(context.getNoteId(), null).size() + " " + Integer.toString(numWatch.get());
+    String msg = registry.getAll(context.getNoteId(), null).size() + " " + Integer.toString(numWatch
+            .get());
     return new InterpreterResult(Code.SUCCESS, msg);
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+  }
 
   @Override
   public FormType getFormType() {
@@ -100,8 +105,8 @@ public class MockInterpreterAngular extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return null;
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterOutputStream.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterOutputStream.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterOutputStream.java
index aefd9c5..7a5321a 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterOutputStream.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterOutputStream.java
@@ -16,9 +16,6 @@
  */
 package org.apache.zeppelin.interpreter.remote.mock;
 
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -27,7 +24,13 @@ import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
 
-/** MockInterpreter to test outputstream */
+import java.io.IOException;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * MockInterpreter to test outputstream
+ */
 public class MockInterpreterOutputStream extends Interpreter {
   private String lastSt;
 
@@ -37,11 +40,12 @@ public class MockInterpreterOutputStream extends Interpreter {
 
   @Override
   public void open() {
-    // new RuntimeException().printStackTrace();
+    //new RuntimeException().printStackTrace();
   }
 
   @Override
-  public void close() {}
+  public void close() {
+  }
 
   public String getLastStatement() {
     return lastSt;
@@ -58,12 +62,14 @@ public class MockInterpreterOutputStream extends Interpreter {
     } catch (IOException e) {
       throw new InterpreterException(e);
     }
-    return new InterpreterResult(
-        InterpreterResult.Code.valueOf(ret[0]), (ret.length > 2) ? ret[2] : "");
+    return new InterpreterResult(InterpreterResult.Code.valueOf(ret[0]), (ret.length > 2) ?
+            ret[2] : "");
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+
+  }
 
   @Override
   public FormType getFormType() {
@@ -76,8 +82,8 @@ public class MockInterpreterOutputStream extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return null;
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterResourcePool.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterResourcePool.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterResourcePool.java
index b5604eb..ee9f15c 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterResourcePool.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/remote/mock/MockInterpreterResourcePool.java
@@ -18,9 +18,6 @@
 package org.apache.zeppelin.interpreter.remote.mock;
 
 import com.google.gson.Gson;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
@@ -29,6 +26,10 @@ import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.resource.Resource;
 import org.apache.zeppelin.resource.ResourcePool;
 
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.atomic.AtomicInteger;
+
 public class MockInterpreterResourcePool extends Interpreter {
 
   AtomicInteger numWatch = new AtomicInteger(0);
@@ -38,10 +39,13 @@ public class MockInterpreterResourcePool extends Interpreter {
   }
 
   @Override
-  public void open() {}
+  public void open() {
+  }
 
   @Override
-  public void close() {}
+  public void close() {
+
+  }
 
   @Override
   public InterpreterResult interpret(String st, InterpreterContext context) {
@@ -82,7 +86,7 @@ public class MockInterpreterResourcePool extends Interpreter {
       ret = resourcePool.getAll();
     } else if (cmd.equals("invoke")) {
       Resource resource = resourcePool.get(noteId, paragraphId, name);
-      if (stmt.length >= 4) {
+      if (stmt.length >=4) {
         Resource res = resource.invokeMethod(value, null, null, stmt[3]);
         ret = res.get();
       } else {
@@ -100,7 +104,8 @@ public class MockInterpreterResourcePool extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+  }
 
   @Override
   public FormType getFormType() {
@@ -113,8 +118,8 @@ public class MockInterpreterResourcePool extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return null;
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/FolderTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/FolderTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/FolderTest.java
index 29b46eb..d756e14 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/FolderTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/FolderTest.java
@@ -17,10 +17,6 @@
 
 package org.apache.zeppelin.notebook;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterFactory;
 import org.apache.zeppelin.interpreter.InterpreterSettingManager;
@@ -34,25 +30,38 @@ import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 @RunWith(MockitoJUnitRunner.class)
 public class FolderTest {
-  @Mock NotebookRepo repo;
+  @Mock
+  NotebookRepo repo;
 
-  @Mock ParagraphJobListener paragraphJobListener;
+  @Mock
+  ParagraphJobListener paragraphJobListener;
 
-  @Mock SearchService index;
+  @Mock
+  SearchService index;
 
-  @Mock Credentials credentials;
+  @Mock
+  Credentials credentials;
 
-  @Mock Interpreter interpreter;
+  @Mock
+  Interpreter interpreter;
 
-  @Mock Scheduler scheduler;
+  @Mock
+  Scheduler scheduler;
 
-  @Mock NoteEventListener noteEventListener;
+  @Mock
+  NoteEventListener noteEventListener;
 
-  @Mock InterpreterFactory interpreterFactory;
+  @Mock
+  InterpreterFactory interpreterFactory;
 
-  @Mock InterpreterSettingManager interpreterSettingManager;
+  @Mock
+  InterpreterSettingManager interpreterSettingManager;
 
   Folder folder;
 
@@ -62,43 +71,13 @@ public class FolderTest {
 
   @Before
   public void createFolderAndNotes() {
-    note1 =
-        new Note(
-            "test",
-            "",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
+    note1 = new Note("test", "", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
     note1.setName("this/is/a/folder/note1");
 
-    note2 =
-        new Note(
-            "test",
-            "",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
+    note2 = new Note("test", "", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
     note2.setName("this/is/a/folder/note2");
 
-    note3 =
-        new Note(
-            "test",
-            "",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
+    note3 = new Note("test", "", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
     note3.setName("this/is/a/folder/note3");
 
     folder = new Folder("this/is/a/folder");
@@ -139,17 +118,7 @@ public class FolderTest {
 
   @Test
   public void addNoteTest() {
-    Note note4 =
-        new Note(
-            "test",
-            "",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
+    Note note4 = new Note("test", "", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
     note4.setName("this/is/a/folder/note4");
 
     folder.addNote(note4);


[19/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterUtilsTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterUtilsTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterUtilsTest.java
index 577dd92..68981da 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterUtilsTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterUtilsTest.java
@@ -17,31 +17,32 @@
 
 package org.apache.zeppelin.interpreter.remote;
 
-import static org.junit.Assert.assertTrue;
+import org.junit.Test;
 
 import java.io.IOException;
-import org.junit.Test;
+
+import static org.junit.Assert.assertTrue;
 
 public class RemoteInterpreterUtilsTest {
 
   @Test
   public void testCreateTServerSocket() throws IOException {
-    assertTrue(
-        RemoteInterpreterUtils.createTServerSocket(":").getServerSocket().getLocalPort() > 0);
+    assertTrue(RemoteInterpreterUtils.createTServerSocket(":")
+        .getServerSocket().getLocalPort() > 0);
 
     String portRange = ":30000";
-    assertTrue(
-        RemoteInterpreterUtils.createTServerSocket(portRange).getServerSocket().getLocalPort()
-            <= 30000);
+    assertTrue(RemoteInterpreterUtils.createTServerSocket(portRange)
+        .getServerSocket().getLocalPort() <= 30000);
 
     portRange = "30000:";
-    assertTrue(
-        RemoteInterpreterUtils.createTServerSocket(portRange).getServerSocket().getLocalPort()
-            >= 30000);
+    assertTrue(RemoteInterpreterUtils.createTServerSocket(portRange)
+        .getServerSocket().getLocalPort() >= 30000);
 
     portRange = "30000:40000";
-    int port =
-        RemoteInterpreterUtils.createTServerSocket(portRange).getServerSocket().getLocalPort();
+    int port = RemoteInterpreterUtils.createTServerSocket(portRange)
+        .getServerSocket().getLocalPort();
     assertTrue(port >= 30000 && port <= 40000);
   }
+
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/resource/LocalResourcePoolTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/resource/LocalResourcePoolTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/resource/LocalResourcePoolTest.java
index afdcfc6..8b42dc8 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/resource/LocalResourcePoolTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/resource/LocalResourcePoolTest.java
@@ -16,14 +16,16 @@
  */
 package org.apache.zeppelin.resource;
 
+import org.junit.Test;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
-import org.junit.Test;
-
-/** Unittest for LocalResourcePool */
+/**
+ * Unittest for LocalResourcePool
+ */
 public class LocalResourcePoolTest {
 
   @Test

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/resource/ResourceSetTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/resource/ResourceSetTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/resource/ResourceSetTest.java
index 23267f1..cc1cad1 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/resource/ResourceSetTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/resource/ResourceSetTest.java
@@ -16,11 +16,13 @@
  */
 package org.apache.zeppelin.resource;
 
-import static org.junit.Assert.assertEquals;
-
 import org.junit.Test;
 
-/** Unit test for ResourceSet */
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Unit test for ResourceSet
+ */
 public class ResourceSetTest {
 
   @Test

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/resource/ResourceTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/resource/ResourceTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/resource/ResourceTest.java
index 5d06c4e..fb8b271 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/resource/ResourceTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/resource/ResourceTest.java
@@ -16,13 +16,16 @@
  */
 package org.apache.zeppelin.resource;
 
-import static org.junit.Assert.assertEquals;
+import org.junit.Test;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
-import org.junit.Test;
 
-/** Test for Resource */
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Test for Resource
+ */
 public class ResourceTest {
   @Test
   public void testSerializeDeserialize() throws IOException, ClassNotFoundException {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/FIFOSchedulerTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/FIFOSchedulerTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/FIFOSchedulerTest.java
index 15bf7a5..807b5ee 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/FIFOSchedulerTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/FIFOSchedulerTest.java
@@ -30,7 +30,9 @@ public class FIFOSchedulerTest extends TestCase {
   }
 
   @Override
-  public void tearDown() {}
+  public void tearDown() {
+
+  }
 
   public void testRun() throws InterruptedException {
     Scheduler s = schedulerSvc.createOrGetFIFOScheduler("test");
@@ -49,12 +51,14 @@ public class FIFOSchedulerTest extends TestCase {
     assertEquals(1, s.getJobsRunning().size());
     assertEquals(1, s.getJobsWaiting().size());
 
+
     Thread.sleep(500);
     assertEquals(Status.FINISHED, job1.getStatus());
     assertEquals(Status.RUNNING, job2.getStatus());
     assertTrue((500 < (Long) job1.getReturn()));
     assertEquals(1, s.getJobsRunning().size());
     assertEquals(0, s.getJobsWaiting().size());
+
   }
 
   public void testAbort() throws InterruptedException {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/JobTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/JobTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/JobTest.java
index 96aeb79..73d45e9 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/JobTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/JobTest.java
@@ -17,13 +17,6 @@
 
 package org.apache.zeppelin.scheduler;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.spy;
-
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -36,6 +29,13 @@ import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.spy;
+
 @RunWith(MockitoJUnitRunner.class)
 public class JobTest {
 
@@ -48,7 +48,12 @@ public class JobTest {
   public void setUp() throws Exception {
     InterpretJob interpretJob =
         new InterpretJob(
-            "jobid", "jobName", mockJobListener, mockInterpreter, "script", mockInterpreterContext);
+            "jobid",
+            "jobName",
+            mockJobListener,
+            mockInterpreter,
+            "script",
+            mockInterpreterContext);
     spyInterpretJob = spy(interpretJob);
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/ParallelSchedulerTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/ParallelSchedulerTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/ParallelSchedulerTest.java
index edac0a6..2495142 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/ParallelSchedulerTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/ParallelSchedulerTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.zeppelin.scheduler;
 
+
 import junit.framework.TestCase;
 import org.apache.zeppelin.scheduler.Job.Status;
 
@@ -30,7 +31,9 @@ public class ParallelSchedulerTest extends TestCase {
   }
 
   @Override
-  public void tearDown() {}
+  public void tearDown() {
+
+  }
 
   public void testRun() throws InterruptedException {
     Scheduler s = schedulerSvc.createOrGetParallelScheduler("test", 2);
@@ -59,5 +62,7 @@ public class ParallelSchedulerTest extends TestCase {
     assertEquals(Status.RUNNING, job3.getStatus());
     assertEquals(1, s.getJobsRunning().size());
     assertEquals(0, s.getJobsWaiting().size());
+
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/SleepingJob.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/SleepingJob.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/SleepingJob.java
index dc112f1..fb788ef 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/SleepingJob.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/scheduler/SleepingJob.java
@@ -17,12 +17,15 @@
 
 package org.apache.zeppelin.scheduler;
 
-import java.util.HashMap;
-import java.util.Map;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** */
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ */
 public class SleepingJob extends Job {
 
   private int time;
@@ -33,6 +36,7 @@ public class SleepingJob extends Job {
   static Logger LOGGER = LoggerFactory.getLogger(SleepingJob.class);
   private Object results;
 
+
   public SleepingJob(String jobName, JobListener listener, int time) {
     super(jobName, listener);
     this.time = time;
@@ -90,4 +94,6 @@ public class SleepingJob extends Job {
     i.put("LoopCount", Integer.toString(count));
     return i;
   }
+
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/tabledata/InterpreterResultTableDataTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/tabledata/InterpreterResultTableDataTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/tabledata/InterpreterResultTableDataTest.java
index 100e90e..0618d3b 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/tabledata/InterpreterResultTableDataTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/tabledata/InterpreterResultTableDataTest.java
@@ -16,20 +16,21 @@
  */
 package org.apache.zeppelin.tabledata;
 
-import static junit.framework.TestCase.assertFalse;
-import static org.junit.Assert.assertEquals;
-
-import java.util.Iterator;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.InterpreterResultMessage;
 import org.junit.Test;
 
+import java.util.Iterator;
+
+import static junit.framework.TestCase.assertFalse;
+import static org.junit.Assert.assertEquals;
+
 public class InterpreterResultTableDataTest {
   @Test
   public void test() {
-    InterpreterResultMessage msg =
-        new InterpreterResultMessage(
-            InterpreterResult.Type.TABLE, "key\tvalue\nsun\t100\nmoon\t200\n");
+    InterpreterResultMessage msg = new InterpreterResultMessage(
+        InterpreterResult.Type.TABLE,
+        "key\tvalue\nsun\t100\nmoon\t200\n");
     InterpreterResultTableData table = new InterpreterResultTableData(msg);
 
     ColumnDef[] cols = table.columns();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/tabledata/TableDataProxyTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/tabledata/TableDataProxyTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/tabledata/TableDataProxyTest.java
index 03d1ae1..a4a8ffe 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/tabledata/TableDataProxyTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/tabledata/TableDataProxyTest.java
@@ -16,16 +16,17 @@
  */
 package org.apache.zeppelin.tabledata;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-
-import java.util.Iterator;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.InterpreterResultMessage;
 import org.apache.zeppelin.resource.LocalResourcePool;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.util.Iterator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+
 public class TableDataProxyTest {
   private LocalResourcePool pool;
 
@@ -36,9 +37,9 @@ public class TableDataProxyTest {
 
   @Test
   public void testProxyTable() {
-    InterpreterResultMessage msg =
-        new InterpreterResultMessage(
-            InterpreterResult.Type.TABLE, "key\tvalue\nsun\t100\nmoon\t200\n");
+    InterpreterResultMessage msg = new InterpreterResultMessage(
+        InterpreterResult.Type.TABLE,
+        "key\tvalue\nsun\t100\nmoon\t200\n");
     InterpreterResultTableData table = new InterpreterResultTableData(msg);
 
     pool.put("table", table);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/user/AuthenticationInfoTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/user/AuthenticationInfoTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/user/AuthenticationInfoTest.java
index 9262319..b757033 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/user/AuthenticationInfoTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/user/AuthenticationInfoTest.java
@@ -21,6 +21,7 @@ import static org.junit.Assert.assertEquals;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+
 import org.junit.Test;
 
 public class AuthenticationInfoTest {
@@ -29,10 +30,13 @@ public class AuthenticationInfoTest {
   public void testRoles() {
     final String roles = "[\"role1\", \"role2\", \"role with space\"]";
 
-    final AuthenticationInfo authenticationInfo = new AuthenticationInfo("foo", roles, "bar");
+    final AuthenticationInfo authenticationInfo = new AuthenticationInfo("foo",
+        roles, "bar");
 
     assertEquals(
         new ArrayList<>(Arrays.asList("role1", "role2", "role with space")),
         authenticationInfo.getRoles());
+
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/JupyterUtil.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/JupyterUtil.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/JupyterUtil.java
index 541e1be..5cdbbbb 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/JupyterUtil.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/JupyterUtil.java
@@ -16,10 +16,6 @@
  */
 package org.apache.zeppelin.jupyter;
 
-import com.google.common.base.Joiner;
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-import com.google.gson.typeadapters.RuntimeTypeAdapterFactory;
 import java.io.BufferedReader;
 import java.io.FileReader;
 import java.io.FileWriter;
@@ -28,13 +24,20 @@ import java.io.Reader;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
+
+import com.google.common.base.Joiner;
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.typeadapters.RuntimeTypeAdapterFactory;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.CommandLineParser;
 import org.apache.commons.cli.DefaultParser;
 import org.apache.commons.cli.HelpFormatter;
 import org.apache.commons.cli.Options;
 import org.apache.commons.cli.ParseException;
+
 import org.apache.zeppelin.jupyter.nbformat.Cell;
 import org.apache.zeppelin.jupyter.nbformat.CodeCell;
 import org.apache.zeppelin.jupyter.nbformat.DisplayData;
@@ -53,7 +56,9 @@ import org.apache.zeppelin.jupyter.zformat.TypeData;
 import org.apache.zeppelin.markdown.MarkdownParser;
 import org.apache.zeppelin.markdown.PegdownParser;
 
-/** */
+/**
+ *
+ */
 public class JupyterUtil {
 
   private final RuntimeTypeAdapterFactory<Cell> cellTypeFactory;
@@ -62,18 +67,13 @@ public class JupyterUtil {
   private final MarkdownParser markdownProcessor;
 
   public JupyterUtil() {
-    this.cellTypeFactory =
-        RuntimeTypeAdapterFactory.of(Cell.class, "cell_type")
-            .registerSubtype(MarkdownCell.class, "markdown")
-            .registerSubtype(CodeCell.class, "code")
-            .registerSubtype(RawCell.class, "raw")
-            .registerSubtype(HeadingCell.class, "heading");
-    this.outputTypeFactory =
-        RuntimeTypeAdapterFactory.of(Output.class, "output_type")
-            .registerSubtype(ExecuteResult.class, "execute_result")
-            .registerSubtype(DisplayData.class, "display_data")
-            .registerSubtype(Stream.class, "stream")
-            .registerSubtype(Error.class, "error");
+    this.cellTypeFactory = RuntimeTypeAdapterFactory.of(Cell.class, "cell_type")
+        .registerSubtype(MarkdownCell.class, "markdown").registerSubtype(CodeCell.class, "code")
+        .registerSubtype(RawCell.class, "raw").registerSubtype(HeadingCell.class, "heading");
+    this.outputTypeFactory = RuntimeTypeAdapterFactory.of(Output.class, "output_type")
+        .registerSubtype(ExecuteResult.class, "execute_result")
+        .registerSubtype(DisplayData.class, "display_data").registerSubtype(Stream.class, "stream")
+        .registerSubtype(Error.class, "error");
     this.markdownProcessor = new PegdownParser();
   }
 
@@ -89,8 +89,8 @@ public class JupyterUtil {
     return getNote(in, new GsonBuilder(), codeReplaced, markdownReplaced);
   }
 
-  public Note getNote(
-      Reader in, GsonBuilder gsonBuilder, String codeReplaced, String markdownReplaced) {
+  public Note getNote(Reader in, GsonBuilder gsonBuilder, String codeReplaced,
+      String markdownReplaced) {
     return getNote(getNbformat(in, gsonBuilder), codeReplaced, markdownReplaced);
   }
 
@@ -102,7 +102,7 @@ public class JupyterUtil {
       name = "Note converted from Jupyter";
     }
     note.setName(name);
-
+    
     String lineSeparator = System.lineSeparator();
     Paragraph paragraph;
     List<Paragraph> paragraphs = new ArrayList<>();
@@ -160,11 +160,11 @@ public class JupyterUtil {
     return note;
   }
 
+
+  
   private Gson getGson(GsonBuilder gsonBuilder) {
-    return gsonBuilder
-        .registerTypeAdapterFactory(cellTypeFactory)
-        .registerTypeAdapterFactory(outputTypeFactory)
-        .create();
+    return gsonBuilder.registerTypeAdapterFactory(cellTypeFactory)
+        .registerTypeAdapterFactory(outputTypeFactory).create();
   }
 
   public static void main(String[] args) throws ParseException, IOException {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Author.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Author.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Author.java
index 7a6c474..c3e23e5 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Author.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Author.java
@@ -18,9 +18,12 @@ package org.apache.zeppelin.jupyter.nbformat;
 
 import com.google.gson.annotations.SerializedName;
 
-/** */
+/**
+ *
+ */
 public class Author {
 
   @SerializedName("name")
   private String name;
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Cell.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Cell.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Cell.java
index 874518a..f593da5 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Cell.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Cell.java
@@ -17,8 +17,11 @@
 package org.apache.zeppelin.jupyter.nbformat;
 
 import com.google.gson.annotations.SerializedName;
+import java.util.List;
 
-/** */
+/**
+ *
+ */
 public abstract class Cell {
 
   @SerializedName("cell_type")

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/CellMetadata.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/CellMetadata.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/CellMetadata.java
index 2580e6d..a35a262 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/CellMetadata.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/CellMetadata.java
@@ -19,7 +19,9 @@ package org.apache.zeppelin.jupyter.nbformat;
 import com.google.gson.annotations.SerializedName;
 import java.util.List;
 
-/** */
+/**
+ *
+ */
 public class CellMetadata {
 
   @SerializedName("name")
@@ -27,4 +29,5 @@ public class CellMetadata {
 
   @SerializedName("tags")
   private List<String> tags;
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/CodeCell.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/CodeCell.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/CodeCell.java
index db7826c..973448c 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/CodeCell.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/CodeCell.java
@@ -19,7 +19,9 @@ package org.apache.zeppelin.jupyter.nbformat;
 import com.google.gson.annotations.SerializedName;
 import java.util.List;
 
-/** */
+/**
+ *
+ */
 public class CodeCell extends Cell {
 
   @SerializedName("outputs")

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/DisplayData.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/DisplayData.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/DisplayData.java
index 50e980e..6566e1d 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/DisplayData.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/DisplayData.java
@@ -16,12 +16,19 @@
  */
 package org.apache.zeppelin.jupyter.nbformat;
 
+import com.google.common.base.Joiner;
+import com.google.common.collect.Lists;
 import com.google.gson.annotations.SerializedName;
-import java.util.Map;
+import org.apache.zeppelin.jupyter.types.JupyterOutputType;
 import org.apache.zeppelin.jupyter.types.ZeppelinOutputType;
 import org.apache.zeppelin.jupyter.zformat.TypeData;
 
-/** */
+import java.util.List;
+import java.util.Map;
+
+/**
+ *
+ */
 public class DisplayData extends Output {
 
   @SerializedName("data")
@@ -43,21 +50,17 @@ public class DisplayData extends Output {
 
   private static class ZeppelinResultGenerator {
     public static String toBase64ImageHtmlElement(String image) {
-      return "<div style='width:auto;height:auto'><img src=data:image/png;base64,"
-          + image
-          + " style='width=auto;height:auto'/></div>";
+      return "<div style='width:auto;height:auto'><img src=data:image/png;base64," + image
+              + " style='width=auto;height:auto'/></div>";
     }
-
     public static String toLatex(String latexCode) {
       String latexContents = latexCode;
-      return "<div>"
-          + "<div class='class=\"alert alert-warning\"'>"
-          + "<strong>Warning!</strong> Currently, Latex is not supported."
-          + "</div>"
-          + "<div>"
-          + latexContents
-          + "</div>"
-          + "</div>";
+      return "<div>" +
+              "<div class='class=\"alert alert-warning\"'>" +
+              "<strong>Warning!</strong> Currently, Latex is not supported." +
+              "</div>" +
+              "<div>" + latexContents + "</div>" +
+              "</div>";
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Error.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Error.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Error.java
index a87e971..679f4cc 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Error.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Error.java
@@ -18,12 +18,15 @@ package org.apache.zeppelin.jupyter.nbformat;
 
 import com.google.common.base.Joiner;
 import com.google.gson.annotations.SerializedName;
-import java.util.Arrays;
-import java.util.List;
 import org.apache.zeppelin.jupyter.types.ZeppelinOutputType;
 import org.apache.zeppelin.jupyter.zformat.TypeData;
 
-/** */
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ *
+ */
 public class Error extends Output {
   @SerializedName("ename")
   private String ename;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/ExecuteResult.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/ExecuteResult.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/ExecuteResult.java
index 2262501..9e8fe05 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/ExecuteResult.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/ExecuteResult.java
@@ -17,11 +17,15 @@
 package org.apache.zeppelin.jupyter.nbformat;
 
 import com.google.gson.annotations.SerializedName;
-import java.util.Map;
+import org.apache.zeppelin.jupyter.types.JupyterOutputType;
 import org.apache.zeppelin.jupyter.types.ZeppelinOutputType;
 import org.apache.zeppelin.jupyter.zformat.TypeData;
 
-/** */
+import java.util.Map;
+
+/**
+ *
+ */
 public class ExecuteResult extends Output {
 
   @SerializedName("execution_count")

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/HeadingCell.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/HeadingCell.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/HeadingCell.java
index 3fe9506..7007088 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/HeadingCell.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/HeadingCell.java
@@ -18,7 +18,9 @@ package org.apache.zeppelin.jupyter.nbformat;
 
 import com.google.gson.annotations.SerializedName;
 
-/** */
+/**
+ *
+ */
 public class HeadingCell extends Cell {
 
   @SerializedName("level")

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Kernelspec.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Kernelspec.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Kernelspec.java
index 49fe2b1..6232416 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Kernelspec.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Kernelspec.java
@@ -18,7 +18,9 @@ package org.apache.zeppelin.jupyter.nbformat;
 
 import com.google.gson.annotations.SerializedName;
 
-/** */
+/**
+ *
+ */
 public class Kernelspec {
 
   @SerializedName("name")

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/LanguageInfo.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/LanguageInfo.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/LanguageInfo.java
index 461e063..cc74089 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/LanguageInfo.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/LanguageInfo.java
@@ -18,7 +18,9 @@ package org.apache.zeppelin.jupyter.nbformat;
 
 import com.google.gson.annotations.SerializedName;
 
-/** */
+/**
+ *
+ */
 public class LanguageInfo {
 
   @SerializedName("name")
@@ -35,4 +37,5 @@ public class LanguageInfo {
 
   @SerializedName("pygments_lexer")
   private String pygmentsLexer;
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/MarkdownCell.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/MarkdownCell.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/MarkdownCell.java
index e403978..a1b220b 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/MarkdownCell.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/MarkdownCell.java
@@ -16,5 +16,9 @@
  */
 package org.apache.zeppelin.jupyter.nbformat;
 
-/** */
-public class MarkdownCell extends Cell {}
+/**
+ *
+ */
+public class MarkdownCell extends Cell {
+
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Metadata.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Metadata.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Metadata.java
index b35540a..f2da8e4 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Metadata.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Metadata.java
@@ -19,7 +19,9 @@ package org.apache.zeppelin.jupyter.nbformat;
 import com.google.gson.annotations.SerializedName;
 import java.util.List;
 
-/** */
+/**
+ *
+ */
 public class Metadata {
 
   @SerializedName("kernelspec")

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Nbformat.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Nbformat.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Nbformat.java
index 535afd2..9ca4146 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Nbformat.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Nbformat.java
@@ -19,7 +19,9 @@ package org.apache.zeppelin.jupyter.nbformat;
 import com.google.gson.annotations.SerializedName;
 import java.util.List;
 
-/** */
+/**
+ *
+ */
 public class Nbformat {
 
   @SerializedName("metadata")

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Output.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Output.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Output.java
index 6fd8c4f..a37272a 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Output.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Output.java
@@ -18,14 +18,17 @@ package org.apache.zeppelin.jupyter.nbformat;
 
 import com.google.common.base.Joiner;
 import com.google.gson.annotations.SerializedName;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
 import org.apache.zeppelin.jupyter.types.JupyterOutputType;
 import org.apache.zeppelin.jupyter.types.ZeppelinOutputType;
 import org.apache.zeppelin.jupyter.zformat.TypeData;
 
-/** */
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ *
+ */
 public abstract class Output {
 
   @SerializedName("output_type")
@@ -68,6 +71,7 @@ public abstract class Output {
     return jupyterOutputType;
   }
 
+
   protected TypeData getZeppelinResult(Map<String, Object> data, JupyterOutputType type) {
     TypeData result = null;
     Object outputsObject = data.get(type.toString());
@@ -82,18 +86,20 @@ public abstract class Output {
     if (type == JupyterOutputType.IMAGE_PNG) {
       String base64CodeRaw = outputData;
       String base64Code = base64CodeRaw.replace("\n", "");
-      result =
-          new TypeData(
+      result = new TypeData(
               type.getZeppelinType().toString(),
-              ZeppelinResultGenerator.toBase64ImageHtmlElement(base64Code));
+              ZeppelinResultGenerator.toBase64ImageHtmlElement(base64Code)
+      );
     } else if (type == JupyterOutputType.LATEX) {
-      result =
-          new TypeData(
-              type.getZeppelinType().toString(), ZeppelinResultGenerator.toLatex(outputData));
+      result = new TypeData(
+              type.getZeppelinType().toString(),
+              ZeppelinResultGenerator.toLatex(outputData)
+      );
     } else if (type == JupyterOutputType.APPLICATION_JAVASCRIPT) {
-      result =
-          new TypeData(
-              type.getZeppelinType().toString(), ZeppelinResultGenerator.toJavascript(outputData));
+      result = new TypeData(
+              type.getZeppelinType().toString(),
+              ZeppelinResultGenerator.toJavascript(outputData)
+      );
     } else {
       result = new TypeData(type.getZeppelinType().toString(), outputData);
     }
@@ -101,21 +107,19 @@ public abstract class Output {
   }
 
   public abstract ZeppelinOutputType getTypeOfZeppelin();
-
   public abstract TypeData toZeppelinResult();
 
   private static class ZeppelinResultGenerator {
     public static String toBase64ImageHtmlElement(String image) {
-      return "<div style='width:auto;height:auto'><img src=data:image/png;base64,"
-          + image
-          + " style='width=auto;height:auto'/></div>";
+      return "<div style='width:auto;height:auto'><img src=data:image/png;base64," + image
+              + " style='width=auto;height:auto'/></div>";
     }
-
     public static String toLatex(String latexCode) {
       String latexContents = latexCode;
-      return "<div>" + "<div>" + latexContents + "</div>" + "</div>";
+      return "<div>" +
+              "<div>" + latexContents + "</div>" +
+              "</div>";
     }
-
     public static String toJavascript(String javascriptCode) {
       return "<script type='application/javascript'>" + javascriptCode + "</script>";
     }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/RawCell.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/RawCell.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/RawCell.java
index 23577c3..c5054b8 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/RawCell.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/RawCell.java
@@ -16,5 +16,9 @@
  */
 package org.apache.zeppelin.jupyter.nbformat;
 
-/** */
-public class RawCell extends Cell {}
+/**
+ *
+ */
+public class RawCell extends Cell {
+
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/RawCellMetadata.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/RawCellMetadata.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/RawCellMetadata.java
index dc8bb30..1b667d7 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/RawCellMetadata.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/RawCellMetadata.java
@@ -18,7 +18,9 @@ package org.apache.zeppelin.jupyter.nbformat;
 
 import com.google.gson.annotations.SerializedName;
 
-/** */
+/**
+ *
+ */
 public class RawCellMetadata extends CellMetadata {
 
   @SerializedName("format")

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Stream.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Stream.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Stream.java
index ab4fd33..fa0e246 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Stream.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/nbformat/Stream.java
@@ -18,12 +18,16 @@ package org.apache.zeppelin.jupyter.nbformat;
 
 import com.google.common.base.Joiner;
 import com.google.gson.annotations.SerializedName;
-import java.util.ArrayList;
-import java.util.List;
 import org.apache.zeppelin.jupyter.types.ZeppelinOutputType;
 import org.apache.zeppelin.jupyter.zformat.TypeData;
 
-/** */
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ *
+ */
 public class Stream extends Output {
 
   @SerializedName("name")

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/types/JupyterOutputType.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/types/JupyterOutputType.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/types/JupyterOutputType.java
index 17c9072..383ba11 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/types/JupyterOutputType.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/types/JupyterOutputType.java
@@ -16,17 +16,19 @@
  */
 package org.apache.zeppelin.jupyter.types;
 
-/** Jupyter Output Types. */
+/**
+ * Jupyter Output Types.
+ */
 public enum JupyterOutputType {
   TEXT_PLAIN("text/plain"),
   IMAGE_PNG("image/png"),
   LATEX("text/latex"),
   SVG_XML("image/svg+xml"),
   TEXT_HTML("text/html"),
-  APPLICATION_JAVASCRIPT("application/javascript");
+  APPLICATION_JAVASCRIPT("application/javascript")
+  ;
 
   private final String type;
-
   private JupyterOutputType(final String type) {
     this.type = type;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/types/ZeppelinOutputType.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/types/ZeppelinOutputType.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/types/ZeppelinOutputType.java
index e84c330..cf1a5e0 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/types/ZeppelinOutputType.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/types/ZeppelinOutputType.java
@@ -16,14 +16,16 @@
  */
 package org.apache.zeppelin.jupyter.types;
 
-/** Zeppelin Output Types. */
+/**
+ * Zeppelin Output Types.
+ */
 public enum ZeppelinOutputType {
   TEXT("TEXT"),
   HTML("HTML"),
-  TABLE("TABLE");
+  TABLE("TABLE")
+  ;
 
   private final String type;
-
   private ZeppelinOutputType(final String type) {
     this.type = type;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/Note.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/Note.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/Note.java
index f5ced4f..78922b5 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/Note.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/Note.java
@@ -19,7 +19,9 @@ package org.apache.zeppelin.jupyter.zformat;
 import com.google.gson.annotations.SerializedName;
 import java.util.List;
 
-/** */
+/**
+ *
+ */
 public class Note {
 
   @SerializedName("name")

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/Paragraph.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/Paragraph.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/Paragraph.java
index 1b649b2..a93adae 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/Paragraph.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/Paragraph.java
@@ -22,7 +22,9 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
-/** */
+/**
+ *
+ */
 public class Paragraph {
   public static final String FINISHED = "FINISHED";
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/Result.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/Result.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/Result.java
index da00c6a..a00cdd3 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/Result.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/Result.java
@@ -19,7 +19,9 @@ package org.apache.zeppelin.jupyter.zformat;
 import com.google.gson.annotations.SerializedName;
 import java.util.List;
 
-/** */
+/**
+ *
+ */
 public class Result {
   public static final String SUCCESS = "SUCCESS";
   public static final String ERROR = "ERROR";

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/TypeData.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/TypeData.java b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/TypeData.java
index 2ebfca7..4aaa642 100644
--- a/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/TypeData.java
+++ b/zeppelin-jupyter/src/main/java/org/apache/zeppelin/jupyter/zformat/TypeData.java
@@ -18,7 +18,9 @@ package org.apache.zeppelin.jupyter.zformat;
 
 import com.google.gson.annotations.SerializedName;
 
-/** */
+/**
+ *
+ */
 public class TypeData {
   public static final String TABLE = "TABLE";
   public static final String HTML = "HTML";

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-jupyter/src/test/java/org/apache/zeppelin/jupyter/nbformat/JupyterUtilTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-jupyter/src/test/java/org/apache/zeppelin/jupyter/nbformat/JupyterUtilTest.java b/zeppelin-jupyter/src/test/java/org/apache/zeppelin/jupyter/nbformat/JupyterUtilTest.java
index cd88763..4688a72 100644
--- a/zeppelin-jupyter/src/test/java/org/apache/zeppelin/jupyter/nbformat/JupyterUtilTest.java
+++ b/zeppelin-jupyter/src/test/java/org/apache/zeppelin/jupyter/nbformat/JupyterUtilTest.java
@@ -18,18 +18,21 @@ package org.apache.zeppelin.jupyter.nbformat;
 
 import static org.junit.Assert.assertTrue;
 
-import com.google.gson.Gson;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.util.List;
 import java.util.Map;
+
+import com.google.gson.Gson;
 import org.apache.zeppelin.jupyter.JupyterUtil;
 import org.apache.zeppelin.jupyter.zformat.Note;
 import org.apache.zeppelin.jupyter.zformat.Paragraph;
 import org.apache.zeppelin.jupyter.zformat.TypeData;
 import org.junit.Test;
 
-/** */
+/**
+ *
+ */
 public class JupyterUtilTest {
 
   @Test
@@ -69,17 +72,13 @@ public class JupyterUtilTest {
 
     Paragraph markdownParagraph = n.getParagraphs().get(6);
 
-    assertTrue(
-        markdownParagraph
-            .getText()
-            .equals(
-                "%md\n"
-                    + "<div class=\"alert\" style=\"border: 1px solid #aaa; background: radial-gradient(ellipse at center, #ffffff 50%, #eee 100%);\">\n"
-                    + "<div class=\"row\">\n"
-                    + "    <div class=\"col-sm-1\"><img src=\"https://knowledgeanyhow.org/static/images/favicon_32x32.png\" style=\"margin-top: -6px\"/></div>\n"
-                    + "    <div class=\"col-sm-11\">This notebook was created using <a href=\"https://knowledgeanyhow.org\">IBM Knowledge Anyhow Workbench</a>.  To learn more, visit us at <a href=\"https://knowledgeanyhow.org\">https://knowledgeanyhow.org</a>.</div>\n"
-                    + "    </div>\n"
-                    + "</div>"));
+    assertTrue(markdownParagraph.getText().equals("%md\n" +
+            "<div class=\"alert\" style=\"border: 1px solid #aaa; background: radial-gradient(ellipse at center, #ffffff 50%, #eee 100%);\">\n" +
+            "<div class=\"row\">\n" +
+            "    <div class=\"col-sm-1\"><img src=\"https://knowledgeanyhow.org/static/images/favicon_32x32.png\" style=\"margin-top: -6px\"/></div>\n" +
+            "    <div class=\"col-sm-11\">This notebook was created using <a href=\"https://knowledgeanyhow.org\">IBM Knowledge Anyhow Workbench</a>.  To learn more, visit us at <a href=\"https://knowledgeanyhow.org\">https://knowledgeanyhow.org</a>.</div>\n" +
+            "    </div>\n" +
+            "</div>"));
     assertTrue(markdownParagraph.getStatus().equals("FINISHED"));
 
     Map<String, Object> markdownConfig = markdownParagraph.getConfig();
@@ -87,19 +86,14 @@ public class JupyterUtilTest {
     assertTrue(((boolean) markdownConfig.get("editorHide")) == true);
     assertTrue(markdownParagraph.getResults().getCode().equals("SUCCESS"));
     List<TypeData> results = markdownParagraph.getResults().getMsg();
-    assertTrue(
-        results
-            .get(0)
-            .getData()
-            .equals(
-                "<div class=\"markdown-body\">\n"
-                    + "<div class=\"alert\" style=\"border: 1px solid #aaa; background: radial-gradient(ellipse at center, #ffffff 50%, #eee 100%);\">\n"
-                    + "<div class=\"row\">\n"
-                    + "    <div class=\"col-sm-1\"><img src=\"https://knowledgeanyhow.org/static/images/favicon_32x32.png\" style=\"margin-top: -6px\"/></div>\n"
-                    + "    <div class=\"col-sm-11\">This notebook was created using <a href=\"https://knowledgeanyhow.org\">IBM Knowledge Anyhow Workbench</a>.  To learn more, visit us at <a href=\"https://knowledgeanyhow.org\">https://knowledgeanyhow.org</a>.</div>\n"
-                    + "    </div>\n"
-                    + "</div>\n"
-                    + "</div>"));
+    assertTrue(results.get(0).getData().equals("<div class=\"markdown-body\">\n" +
+            "<div class=\"alert\" style=\"border: 1px solid #aaa; background: radial-gradient(ellipse at center, #ffffff 50%, #eee 100%);\">\n" +
+            "<div class=\"row\">\n" +
+            "    <div class=\"col-sm-1\"><img src=\"https://knowledgeanyhow.org/static/images/favicon_32x32.png\" style=\"margin-top: -6px\"/></div>\n" +
+            "    <div class=\"col-sm-11\">This notebook was created using <a href=\"https://knowledgeanyhow.org\">IBM Knowledge Anyhow Workbench</a>.  To learn more, visit us at <a href=\"https://knowledgeanyhow.org\">https://knowledgeanyhow.org</a>.</div>\n" +
+            "    </div>\n" +
+            "</div>\n" +
+            "</div>"));
     assertTrue(results.get(0).getType().equals("HTML"));
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/launcher/spark/src/main/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncher.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/launcher/spark/src/main/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncher.java b/zeppelin-plugins/launcher/spark/src/main/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncher.java
index b8a1b8a..bcf319a 100644
--- a/zeppelin-plugins/launcher/spark/src/main/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncher.java
+++ b/zeppelin-plugins/launcher/spark/src/main/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncher.java
@@ -17,14 +17,10 @@
 
 package org.apache.zeppelin.interpreter.launcher;
 
-import java.io.File;
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
 import java.util.stream.StreamSupport;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
@@ -33,7 +29,14 @@ import org.apache.zeppelin.interpreter.remote.RemoteInterpreterUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Spark specific launcher. */
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * Spark specific launcher.
+ */
 public class SparkInterpreterLauncher extends StandardInterpreterLauncher {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(SparkInterpreterLauncher.class);
@@ -69,12 +72,8 @@ public class SparkInterpreterLauncher extends StandardInterpreterLauncher {
     }
     if (isYarnMode() && getDeployMode().equals("cluster")) {
       if (sparkProperties.containsKey("spark.files")) {
-        sparkProperties.put(
-            "spark.files",
-            sparkProperties.getProperty("spark.files")
-                + ","
-                + zConf.getConfDir()
-                + "/log4j_yarn_cluster.properties");
+        sparkProperties.put("spark.files", sparkProperties.getProperty("spark.files") + "," +
+            zConf.getConfDir() + "/log4j_yarn_cluster.properties");
       } else {
         sparkProperties.put("spark.files", zConf.getConfDir() + "/log4j_yarn_cluster.properties");
       }
@@ -83,8 +82,8 @@ public class SparkInterpreterLauncher extends StandardInterpreterLauncher {
       sparkConfBuilder.append(" --conf " + name + "=" + sparkProperties.getProperty(name));
     }
     String useProxyUserEnv = System.getenv("ZEPPELIN_IMPERSONATE_SPARK_PROXY_USER");
-    if (context.getOption().isUserImpersonate()
-        && (StringUtils.isBlank(useProxyUserEnv) || !useProxyUserEnv.equals("false"))) {
+    if (context.getOption().isUserImpersonate() && (StringUtils.isBlank(useProxyUserEnv) ||
+        !useProxyUserEnv.equals("false"))) {
       sparkConfBuilder.append(" --proxy-user " + context.getUserName());
     }
     Path localRepoPath =
@@ -104,6 +103,7 @@ public class SparkInterpreterLauncher extends StandardInterpreterLauncher {
       } catch (IOException e) {
         LOGGER.error("Cannot make a list of additional jars from localRepo: {}", localRepoPath, e);
       }
+
     }
 
     env.put("ZEPPELIN_SPARK_CONF", sparkConfBuilder.toString());
@@ -113,7 +113,7 @@ public class SparkInterpreterLauncher extends StandardInterpreterLauncher {
     // 2. zeppelin-env.sh
     // It is encouraged to set env in interpreter setting, but just for backward compatability,
     // we also fallback to zeppelin-env.sh if it is not specified in interpreter setting.
-    for (String envName : new String[] {"SPARK_HOME", "SPARK_CONF_DIR", "HADOOP_CONF_DIR"}) {
+    for (String envName : new String[]{"SPARK_HOME", "SPARK_CONF_DIR", "HADOOP_CONF_DIR"})  {
       String envValue = getEnv(envName);
       if (envValue != null) {
         env.put(envName, envValue);
@@ -127,19 +127,23 @@ public class SparkInterpreterLauncher extends StandardInterpreterLauncher {
     if (!StringUtils.isBlank(keytab) && !StringUtils.isBlank(principal)) {
       env.put("ZEPPELIN_SERVER_KERBEROS_KEYTAB", keytab);
       env.put("ZEPPELIN_SERVER_KERBEROS_PRINCIPAL", principal);
-      LOGGER.info(
-          "Run Spark under secure mode with keytab: " + keytab + ", principal: " + principal);
+      LOGGER.info("Run Spark under secure mode with keytab: " + keytab +
+          ", principal: " + principal);
     } else {
       LOGGER.info("Run Spark under non-secure mode as no keytab and principal is specified");
     }
     LOGGER.debug("buildEnvFromProperties: " + env);
     return env;
+
   }
 
+
   /**
    * get environmental variable in the following order
    *
-   * <p>1. interpreter setting 2. zeppelin-env.sh
+   * 1. interpreter setting
+   * 2. zeppelin-env.sh
+   *
    */
   private String getEnv(String envName) {
     String env = properties.getProperty(envName);
@@ -159,8 +163,8 @@ public class SparkInterpreterLauncher extends StandardInterpreterLauncher {
     }
   }
 
-  private void mergeSparkProperty(
-      Properties sparkProperties, String propertyName, String propertyValue) {
+  private void mergeSparkProperty(Properties sparkProperties, String propertyName,
+                                  String propertyValue) {
     if (sparkProperties.containsKey(propertyName)) {
       String oldPropertyValue = sparkProperties.getProperty(propertyName);
       sparkProperties.setProperty(propertyName, oldPropertyValue + "," + propertyValue);
@@ -174,31 +178,31 @@ public class SparkInterpreterLauncher extends StandardInterpreterLauncher {
     File sparkRBasePath = null;
     if (sparkHome == null) {
       if (!getSparkMaster(properties).startsWith("local")) {
-        throw new RuntimeException(
-            "SPARK_HOME is not specified in interpreter-setting"
-                + " for non-local mode, if you specify it in zeppelin-env.sh, please move that into "
-                + " interpreter setting");
+        throw new RuntimeException("SPARK_HOME is not specified in interpreter-setting" +
+            " for non-local mode, if you specify it in zeppelin-env.sh, please move that into " +
+            " interpreter setting");
       }
       String zeppelinHome = zConf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME);
-      sparkRBasePath =
-          new File(zeppelinHome, "interpreter" + File.separator + "spark" + File.separator + "R");
+      sparkRBasePath = new File(zeppelinHome,
+          "interpreter" + File.separator + "spark" + File.separator + "R");
     } else {
       sparkRBasePath = new File(sparkHome, "R" + File.separator + "lib");
     }
 
     File sparkRPath = new File(sparkRBasePath, "sparkr.zip");
     if (sparkRPath.exists() && sparkRPath.isFile()) {
-      mergeSparkProperty(
-          sparkProperties, "spark.yarn.dist.archives", sparkRPath.getAbsolutePath() + "#sparkr");
+      mergeSparkProperty(sparkProperties, "spark.yarn.dist.archives",
+          sparkRPath.getAbsolutePath() + "#sparkr");
     } else {
       LOGGER.warn("sparkr.zip is not found, SparkR may not work.");
     }
   }
 
   /**
-   * Order to look for spark master 1. master in interpreter setting 2. spark.master interpreter
-   * setting 3. use local[*]
-   *
+   * Order to look for spark master
+   * 1. master in interpreter setting
+   * 2. spark.master interpreter setting
+   * 3. use local[*]
    * @param properties
    * @return
    */
@@ -224,8 +228,8 @@ public class SparkInterpreterLauncher extends StandardInterpreterLauncher {
     } else {
       String deployMode = properties.getProperty("spark.submit.deployMode");
       if (deployMode == null) {
-        throw new RuntimeException(
-            "master is set as yarn, but spark.submit.deployMode " + "is not specified");
+        throw new RuntimeException("master is set as yarn, but spark.submit.deployMode " +
+            "is not specified");
       }
       if (!deployMode.equals("client") && !deployMode.equals("cluster")) {
         throw new RuntimeException("Invalid value for spark.submit.deployMode: " + deployMode);
@@ -247,4 +251,5 @@ public class SparkInterpreterLauncher extends StandardInterpreterLauncher {
       return "'" + value + "'";
     }
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/launcher/spark/src/test/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncherTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/launcher/spark/src/test/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncherTest.java b/zeppelin-plugins/launcher/spark/src/test/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncherTest.java
index 18e77ae..d7dcd0a 100644
--- a/zeppelin-plugins/launcher/spark/src/test/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncherTest.java
+++ b/zeppelin-plugins/launcher/spark/src/test/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncherTest.java
@@ -17,14 +17,9 @@
 
 package org.apache.zeppelin.interpreter.launcher;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.util.Properties;
 import org.apache.commons.io.FileUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.interpreter.InterpreterOption;
@@ -32,6 +27,12 @@ import org.apache.zeppelin.interpreter.remote.RemoteInterpreterManagedProcess;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 public class SparkInterpreterLauncherTest {
   @Before
   public void setUp() {
@@ -50,20 +51,9 @@ public class SparkInterpreterLauncherTest {
         ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT.getVarName(), "10000");
     InterpreterOption option = new InterpreterOption();
     option.setUserImpersonate(true);
-    InterpreterLaunchContext context =
-        new InterpreterLaunchContext(
-            properties,
-            option,
-            null,
-            "user1",
-            "intpGroupId",
-            "groupId",
-            "groupName",
-            "name",
-            0,
-            "host");
+    InterpreterLaunchContext context = new InterpreterLaunchContext(properties, option, null, "user1", "intpGroupId", "groupId", "groupName", "name", 0, "host");
     InterpreterClient client = launcher.launch(context);
-    assertTrue(client instanceof RemoteInterpreterManagedProcess);
+    assertTrue( client instanceof RemoteInterpreterManagedProcess);
     RemoteInterpreterManagedProcess interpreterProcess = (RemoteInterpreterManagedProcess) client;
     assertEquals("name", interpreterProcess.getInterpreterSettingName());
     assertEquals(".//interpreter/groupName", interpreterProcess.getInterpreterDir());
@@ -86,20 +76,9 @@ public class SparkInterpreterLauncherTest {
     properties.setProperty("spark.jars", "jar_1");
 
     InterpreterOption option = new InterpreterOption();
-    InterpreterLaunchContext context =
-        new InterpreterLaunchContext(
-            properties,
-            option,
-            null,
-            "user1",
-            "intpGroupId",
-            "groupId",
-            "spark",
-            "spark",
-            0,
-            "host");
+    InterpreterLaunchContext context = new InterpreterLaunchContext(properties, option, null, "user1", "intpGroupId", "groupId", "spark", "spark", 0, "host");
     InterpreterClient client = launcher.launch(context);
-    assertTrue(client instanceof RemoteInterpreterManagedProcess);
+    assertTrue( client instanceof RemoteInterpreterManagedProcess);
     RemoteInterpreterManagedProcess interpreterProcess = (RemoteInterpreterManagedProcess) client;
     assertEquals("spark", interpreterProcess.getInterpreterSettingName());
     assertTrue(interpreterProcess.getInterpreterDir().endsWith("/interpreter/spark"));
@@ -107,9 +86,7 @@ public class SparkInterpreterLauncherTest {
     assertEquals(zConf.getInterpreterRemoteRunnerPath(), interpreterProcess.getInterpreterRunner());
     assertTrue(interpreterProcess.getEnv().size() >= 2);
     assertEquals("/user/spark", interpreterProcess.getEnv().get("SPARK_HOME"));
-    assertEquals(
-        " --master local[*] --conf spark.files='file_1' --conf spark.jars='jar_1'",
-        interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));
+    assertEquals(" --master local[*] --conf spark.files='file_1' --conf spark.jars='jar_1'", interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));
   }
 
   @Test
@@ -124,20 +101,9 @@ public class SparkInterpreterLauncherTest {
     properties.setProperty("spark.jars", "jar_1");
 
     InterpreterOption option = new InterpreterOption();
-    InterpreterLaunchContext context =
-        new InterpreterLaunchContext(
-            properties,
-            option,
-            null,
-            "user1",
-            "intpGroupId",
-            "groupId",
-            "spark",
-            "spark",
-            0,
-            "host");
+    InterpreterLaunchContext context = new InterpreterLaunchContext(properties, option, null, "user1", "intpGroupId", "groupId", "spark", "spark", 0, "host");
     InterpreterClient client = launcher.launch(context);
-    assertTrue(client instanceof RemoteInterpreterManagedProcess);
+    assertTrue( client instanceof RemoteInterpreterManagedProcess);
     RemoteInterpreterManagedProcess interpreterProcess = (RemoteInterpreterManagedProcess) client;
     assertEquals("spark", interpreterProcess.getInterpreterSettingName());
     assertTrue(interpreterProcess.getInterpreterDir().endsWith("/interpreter/spark"));
@@ -145,9 +111,7 @@ public class SparkInterpreterLauncherTest {
     assertEquals(zConf.getInterpreterRemoteRunnerPath(), interpreterProcess.getInterpreterRunner());
     assertTrue(interpreterProcess.getEnv().size() >= 2);
     assertEquals("/user/spark", interpreterProcess.getEnv().get("SPARK_HOME"));
-    assertEquals(
-        " --master yarn-client --conf spark.files='file_1' --conf spark.jars='jar_1' --conf spark.yarn.isPython=true",
-        interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));
+    assertEquals(" --master yarn-client --conf spark.files='file_1' --conf spark.jars='jar_1' --conf spark.yarn.isPython=true", interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));
   }
 
   @Test
@@ -163,20 +127,9 @@ public class SparkInterpreterLauncherTest {
     properties.setProperty("spark.jars", "jar_1");
 
     InterpreterOption option = new InterpreterOption();
-    InterpreterLaunchContext context =
-        new InterpreterLaunchContext(
-            properties,
-            option,
-            null,
-            "user1",
-            "intpGroupId",
-            "groupId",
-            "spark",
-            "spark",
-            0,
-            "host");
+    InterpreterLaunchContext context = new InterpreterLaunchContext(properties, option, null, "user1", "intpGroupId", "groupId", "spark", "spark", 0, "host");
     InterpreterClient client = launcher.launch(context);
-    assertTrue(client instanceof RemoteInterpreterManagedProcess);
+    assertTrue( client instanceof RemoteInterpreterManagedProcess);
     RemoteInterpreterManagedProcess interpreterProcess = (RemoteInterpreterManagedProcess) client;
     assertEquals("spark", interpreterProcess.getInterpreterSettingName());
     assertTrue(interpreterProcess.getInterpreterDir().endsWith("/interpreter/spark"));
@@ -184,9 +137,7 @@ public class SparkInterpreterLauncherTest {
     assertEquals(zConf.getInterpreterRemoteRunnerPath(), interpreterProcess.getInterpreterRunner());
     assertTrue(interpreterProcess.getEnv().size() >= 2);
     assertEquals("/user/spark", interpreterProcess.getEnv().get("SPARK_HOME"));
-    assertEquals(
-        " --master yarn --conf spark.files='file_1' --conf spark.jars='jar_1' --conf spark.submit.deployMode='client' --conf spark.yarn.isPython=true",
-        interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));
+    assertEquals(" --master yarn --conf spark.files='file_1' --conf spark.jars='jar_1' --conf spark.submit.deployMode='client' --conf spark.yarn.isPython=true", interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));
   }
 
   @Test
@@ -201,20 +152,9 @@ public class SparkInterpreterLauncherTest {
     properties.setProperty("spark.jars", "jar_1");
 
     InterpreterOption option = new InterpreterOption();
-    InterpreterLaunchContext context =
-        new InterpreterLaunchContext(
-            properties,
-            option,
-            null,
-            "user1",
-            "intpGroupId",
-            "groupId",
-            "spark",
-            "spark",
-            0,
-            "host");
+    InterpreterLaunchContext context = new InterpreterLaunchContext(properties, option, null, "user1", "intpGroupId", "groupId", "spark", "spark", 0, "host");
     InterpreterClient client = launcher.launch(context);
-    assertTrue(client instanceof RemoteInterpreterManagedProcess);
+    assertTrue( client instanceof RemoteInterpreterManagedProcess);
     RemoteInterpreterManagedProcess interpreterProcess = (RemoteInterpreterManagedProcess) client;
     assertEquals("spark", interpreterProcess.getInterpreterSettingName());
     assertTrue(interpreterProcess.getInterpreterDir().endsWith("/interpreter/spark"));
@@ -223,9 +163,7 @@ public class SparkInterpreterLauncherTest {
     assertTrue(interpreterProcess.getEnv().size() >= 3);
     assertEquals("/user/spark", interpreterProcess.getEnv().get("SPARK_HOME"));
     assertEquals("true", interpreterProcess.getEnv().get("ZEPPELIN_SPARK_YARN_CLUSTER"));
-    assertEquals(
-        " --master yarn-cluster --conf spark.files='file_1',.//conf/log4j_yarn_cluster.properties --conf spark.jars='jar_1' --conf spark.yarn.isPython=true --conf spark.yarn.submit.waitAppCompletion=false",
-        interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));
+    assertEquals(" --master yarn-cluster --conf spark.files='file_1',.//conf/log4j_yarn_cluster.properties --conf spark.jars='jar_1' --conf spark.yarn.isPython=true --conf spark.yarn.submit.waitAppCompletion=false", interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));
   }
 
   @Test
@@ -242,26 +180,14 @@ public class SparkInterpreterLauncherTest {
 
     InterpreterOption option = new InterpreterOption();
     option.setUserImpersonate(true);
-    InterpreterLaunchContext context =
-        new InterpreterLaunchContext(
-            properties,
-            option,
-            null,
-            "user1",
-            "intpGroupId",
-            "groupId",
-            "spark",
-            "spark",
-            0,
-            "host");
-    Path localRepoPath =
-        Paths.get(zConf.getInterpreterLocalRepoPath(), context.getInterpreterSettingId());
+    InterpreterLaunchContext context = new InterpreterLaunchContext(properties, option, null, "user1", "intpGroupId", "groupId", "spark", "spark", 0, "host");
+    Path localRepoPath = Paths.get(zConf.getInterpreterLocalRepoPath(), context.getInterpreterSettingId());
     FileUtils.deleteDirectory(localRepoPath.toFile());
     Files.createDirectories(localRepoPath);
     Files.createFile(Paths.get(localRepoPath.toAbsolutePath().toString(), "test.jar"));
 
     InterpreterClient client = launcher.launch(context);
-    assertTrue(client instanceof RemoteInterpreterManagedProcess);
+    assertTrue( client instanceof RemoteInterpreterManagedProcess);
     RemoteInterpreterManagedProcess interpreterProcess = (RemoteInterpreterManagedProcess) client;
     assertEquals("spark", interpreterProcess.getInterpreterSettingName());
     assertTrue(interpreterProcess.getInterpreterDir().endsWith("/interpreter/spark"));
@@ -270,10 +196,7 @@ public class SparkInterpreterLauncherTest {
     assertTrue(interpreterProcess.getEnv().size() >= 3);
     assertEquals("/user/spark", interpreterProcess.getEnv().get("SPARK_HOME"));
     assertEquals("true", interpreterProcess.getEnv().get("ZEPPELIN_SPARK_YARN_CLUSTER"));
-    assertEquals(
-        " --master yarn --conf spark.files='file_1',.//conf/log4j_yarn_cluster.properties --conf spark.jars='jar_1' --conf spark.submit.deployMode='cluster' --conf spark.yarn.isPython=true --conf spark.yarn.submit.waitAppCompletion=false --proxy-user user1 --jars "
-            + Paths.get(localRepoPath.toAbsolutePath().toString(), "test.jar").toString(),
-        interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));
+    assertEquals(" --master yarn --conf spark.files='file_1',.//conf/log4j_yarn_cluster.properties --conf spark.jars='jar_1' --conf spark.submit.deployMode='cluster' --conf spark.yarn.isPython=true --conf spark.yarn.submit.waitAppCompletion=false --proxy-user user1 --jars " + Paths.get(localRepoPath.toAbsolutePath().toString(), "test.jar").toString(), interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));
     Files.deleteIfExists(Paths.get(localRepoPath.toAbsolutePath().toString(), "test.jar"));
     FileUtils.deleteDirectory(localRepoPath.toFile());
   }
@@ -292,25 +215,13 @@ public class SparkInterpreterLauncherTest {
 
     InterpreterOption option = new InterpreterOption();
     option.setUserImpersonate(true);
-    InterpreterLaunchContext context =
-        new InterpreterLaunchContext(
-            properties,
-            option,
-            null,
-            "user1",
-            "intpGroupId",
-            "groupId",
-            "spark",
-            "spark",
-            0,
-            "host");
-    Path localRepoPath =
-        Paths.get(zConf.getInterpreterLocalRepoPath(), context.getInterpreterSettingId());
+    InterpreterLaunchContext context = new InterpreterLaunchContext(properties, option, null, "user1", "intpGroupId", "groupId", "spark", "spark", 0, "host");
+    Path localRepoPath = Paths.get(zConf.getInterpreterLocalRepoPath(), context.getInterpreterSettingId());
     FileUtils.deleteDirectory(localRepoPath.toFile());
     Files.createDirectories(localRepoPath);
 
     InterpreterClient client = launcher.launch(context);
-    assertTrue(client instanceof RemoteInterpreterManagedProcess);
+    assertTrue( client instanceof RemoteInterpreterManagedProcess);
     RemoteInterpreterManagedProcess interpreterProcess = (RemoteInterpreterManagedProcess) client;
     assertEquals("spark", interpreterProcess.getInterpreterSettingName());
     assertTrue(interpreterProcess.getInterpreterDir().endsWith("/interpreter/spark"));
@@ -319,9 +230,7 @@ public class SparkInterpreterLauncherTest {
     assertTrue(interpreterProcess.getEnv().size() >= 3);
     assertEquals("/user/spark", interpreterProcess.getEnv().get("SPARK_HOME"));
     assertEquals("true", interpreterProcess.getEnv().get("ZEPPELIN_SPARK_YARN_CLUSTER"));
-    assertEquals(
-        " --master yarn --conf spark.files='file_1',.//conf/log4j_yarn_cluster.properties --conf spark.jars='jar_1' --conf spark.submit.deployMode='cluster' --conf spark.yarn.isPython=true --conf spark.yarn.submit.waitAppCompletion=false --proxy-user user1",
-        interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));
+    assertEquals(" --master yarn --conf spark.files='file_1',.//conf/log4j_yarn_cluster.properties --conf spark.jars='jar_1' --conf spark.submit.deployMode='cluster' --conf spark.yarn.isPython=true --conf spark.yarn.submit.waitAppCompletion=false --proxy-user user1", interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));
     FileUtils.deleteDirectory(localRepoPath.toFile());
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/launcher/standard/src/main/java/org/apache/zeppelin/interpreter/launcher/StandardInterpreterLauncher.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/launcher/standard/src/main/java/org/apache/zeppelin/interpreter/launcher/StandardInterpreterLauncher.java b/zeppelin-plugins/launcher/standard/src/main/java/org/apache/zeppelin/interpreter/launcher/StandardInterpreterLauncher.java
index cd3c399..9c7a0b2 100644
--- a/zeppelin-plugins/launcher/standard/src/main/java/org/apache/zeppelin/interpreter/launcher/StandardInterpreterLauncher.java
+++ b/zeppelin-plugins/launcher/standard/src/main/java/org/apache/zeppelin/interpreter/launcher/StandardInterpreterLauncher.java
@@ -15,11 +15,9 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.interpreter.launcher;
 
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.interpreter.InterpreterOption;
 import org.apache.zeppelin.interpreter.InterpreterRunner;
@@ -30,7 +28,13 @@ import org.apache.zeppelin.interpreter.remote.RemoteInterpreterUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Interpreter Launcher which use shell script to launch the interpreter process. */
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Interpreter Launcher which use shell script to launch the interpreter process.
+ */
 public class StandardInterpreterLauncher extends InterpreterLauncher {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(StandardInterpreterLauncher.class);
@@ -51,7 +55,10 @@ public class StandardInterpreterLauncher extends InterpreterLauncher {
 
     if (option.isExistingProcess()) {
       return new RemoteInterpreterRunningProcess(
-          context.getInterpreterSettingName(), connectTimeout, option.getHost(), option.getPort());
+          context.getInterpreterSettingName(),
+          connectTimeout,
+          option.getHost(),
+          option.getPort());
     } else {
       // try to recover it first
       if (zConf.isRecoveryEnabled()) {
@@ -59,38 +66,25 @@ public class StandardInterpreterLauncher extends InterpreterLauncher {
             recoveryStorage.getInterpreterClient(context.getInterpreterGroupId());
         if (recoveredClient != null) {
           if (recoveredClient.isRunning()) {
-            LOGGER.info(
-                "Recover interpreter process: "
-                    + recoveredClient.getHost()
-                    + ":"
-                    + recoveredClient.getPort());
+            LOGGER.info("Recover interpreter process: " + recoveredClient.getHost() + ":" +
+                recoveredClient.getPort());
             return recoveredClient;
           } else {
-            LOGGER.warn(
-                "Cannot recover interpreter process: "
-                    + recoveredClient.getHost()
-                    + ":"
-                    + recoveredClient.getPort()
-                    + ", as it is already terminated.");
+            LOGGER.warn("Cannot recover interpreter process: " + recoveredClient.getHost() + ":"
+                + recoveredClient.getPort() + ", as it is already terminated.");
           }
         }
       }
 
       // create new remote process
-      String localRepoPath =
-          zConf.getInterpreterLocalRepoPath() + "/" + context.getInterpreterSettingId();
+      String localRepoPath = zConf.getInterpreterLocalRepoPath() + "/"
+          + context.getInterpreterSettingId();
       return new RemoteInterpreterManagedProcess(
           runner != null ? runner.getPath() : zConf.getInterpreterRemoteRunnerPath(),
-          context.getZeppelinServerRPCPort(),
-          context.getZeppelinServerHost(),
-          zConf.getInterpreterPortRange(),
-          zConf.getInterpreterDir() + "/" + groupName,
-          localRepoPath,
-          buildEnvFromProperties(context),
-          connectTimeout,
-          name,
-          context.getInterpreterGroupId(),
-          option.isUserImpersonate());
+          context.getZeppelinServerRPCPort(), context.getZeppelinServerHost(), zConf.getInterpreterPortRange(),
+          zConf.getInterpreterDir() + "/" + groupName, localRepoPath,
+          buildEnvFromProperties(context), connectTimeout, name,
+          context.getInterpreterGroupId(), option.isUserImpersonate());
     }
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/launcher/standard/src/test/java/org/apache/zeppelin/interpreter/launcher/StandardInterpreterLauncherTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/launcher/standard/src/test/java/org/apache/zeppelin/interpreter/launcher/StandardInterpreterLauncherTest.java b/zeppelin-plugins/launcher/standard/src/test/java/org/apache/zeppelin/interpreter/launcher/StandardInterpreterLauncherTest.java
index 4f05f29..1861636 100644
--- a/zeppelin-plugins/launcher/standard/src/test/java/org/apache/zeppelin/interpreter/launcher/StandardInterpreterLauncherTest.java
+++ b/zeppelin-plugins/launcher/standard/src/test/java/org/apache/zeppelin/interpreter/launcher/StandardInterpreterLauncherTest.java
@@ -17,17 +17,18 @@
 
 package org.apache.zeppelin.interpreter.launcher;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.Properties;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.interpreter.InterpreterOption;
 import org.apache.zeppelin.interpreter.remote.RemoteInterpreterManagedProcess;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 public class StandardInterpreterLauncherTest {
   @Before
   public void setUp() {
@@ -45,26 +46,14 @@ public class StandardInterpreterLauncherTest {
     properties.setProperty("property_1", "value_1");
     InterpreterOption option = new InterpreterOption();
     option.setUserImpersonate(true);
-    InterpreterLaunchContext context =
-        new InterpreterLaunchContext(
-            properties,
-            option,
-            null,
-            "user1",
-            "intpGroupId",
-            "groupId",
-            "groupName",
-            "name",
-            0,
-            "host");
+    InterpreterLaunchContext context = new InterpreterLaunchContext(properties, option, null, "user1", "intpGroupId", "groupId", "groupName", "name", 0, "host");
     InterpreterClient client = launcher.launch(context);
-    assertTrue(client instanceof RemoteInterpreterManagedProcess);
+    assertTrue( client instanceof RemoteInterpreterManagedProcess);
     RemoteInterpreterManagedProcess interpreterProcess = (RemoteInterpreterManagedProcess) client;
     assertEquals("name", interpreterProcess.getInterpreterSettingName());
     assertEquals(".//interpreter/groupName", interpreterProcess.getInterpreterDir());
     assertEquals(".//local-repo/groupId", interpreterProcess.getLocalRepoDir());
-    assertEquals(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT.getIntValue(),
+    assertEquals(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT.getIntValue(),
         interpreterProcess.getConnectTimeout());
     assertEquals(zConf.getInterpreterRemoteRunnerPath(), interpreterProcess.getInterpreterRunner());
     assertEquals(1, interpreterProcess.getEnv().size());
@@ -81,20 +70,9 @@ public class StandardInterpreterLauncherTest {
         ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT.getVarName(), "10000");
     InterpreterOption option = new InterpreterOption();
     option.setUserImpersonate(true);
-    InterpreterLaunchContext context =
-        new InterpreterLaunchContext(
-            properties,
-            option,
-            null,
-            "user1",
-            "intpGroupId",
-            "groupId",
-            "groupName",
-            "name",
-            0,
-            "host");
+    InterpreterLaunchContext context = new InterpreterLaunchContext(properties, option, null, "user1", "intpGroupId", "groupId", "groupName", "name", 0, "host");
     InterpreterClient client = launcher.launch(context);
-    assertTrue(client instanceof RemoteInterpreterManagedProcess);
+    assertTrue( client instanceof RemoteInterpreterManagedProcess);
     RemoteInterpreterManagedProcess interpreterProcess = (RemoteInterpreterManagedProcess) client;
     assertEquals("name", interpreterProcess.getInterpreterSettingName());
     assertEquals(".//interpreter/groupName", interpreterProcess.getInterpreterDir());
@@ -104,4 +82,5 @@ public class StandardInterpreterLauncherTest {
     assertEquals(0, interpreterProcess.getEnv().size());
     assertEquals(true, interpreterProcess.isUserImpersonated());
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/azure/src/main/java/org/apache/zeppelin/notebook/repo/AzureNotebookRepo.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/azure/src/main/java/org/apache/zeppelin/notebook/repo/AzureNotebookRepo.java b/zeppelin-plugins/notebookrepo/azure/src/main/java/org/apache/zeppelin/notebook/repo/AzureNotebookRepo.java
index 63725cd..12dbd90 100644
--- a/zeppelin-plugins/notebookrepo/azure/src/main/java/org/apache/zeppelin/notebook/repo/AzureNotebookRepo.java
+++ b/zeppelin-plugins/notebookrepo/azure/src/main/java/org/apache/zeppelin/notebook/repo/AzureNotebookRepo.java
@@ -30,6 +30,7 @@ import java.io.InputStream;
 import java.io.OutputStreamWriter;
 import java.io.Writer;
 import java.net.URISyntaxException;
+import java.security.InvalidKeyException;
 import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
@@ -43,7 +44,9 @@ import org.apache.zeppelin.user.AuthenticationInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Azure storage backend for notebooks */
+/**
+ * Azure storage backend for notebooks
+ */
 public class AzureNotebookRepo implements NotebookRepo {
   private static final Logger LOG = LoggerFactory.getLogger(AzureNotebookRepo.class);
 
@@ -52,7 +55,9 @@ public class AzureNotebookRepo implements NotebookRepo {
   private String shareName;
   private CloudFileDirectory rootDir;
 
-  public AzureNotebookRepo() {}
+  public AzureNotebookRepo() {
+
+  }
 
   public void init(ZeppelinConfiguration conf) throws IOException {
     this.conf = conf;
@@ -60,18 +65,15 @@ public class AzureNotebookRepo implements NotebookRepo {
     shareName = conf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_AZURE_SHARE);
 
     try {
-      CloudStorageAccount account =
-          CloudStorageAccount.parse(
-              conf.getString(
-                  ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_AZURE_CONNECTION_STRING));
+      CloudStorageAccount account = CloudStorageAccount.parse(
+          conf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_AZURE_CONNECTION_STRING));
       CloudFileClient client = account.createCloudFileClient();
       CloudFileShare share = client.getShareReference(shareName);
       share.createIfNotExists();
 
-      CloudFileDirectory userDir =
-          StringUtils.isBlank(user)
-              ? share.getRootDirectoryReference()
-              : share.getRootDirectoryReference().getDirectoryReference(user);
+      CloudFileDirectory userDir = StringUtils.isBlank(user) ?
+          share.getRootDirectoryReference() :
+          share.getRootDirectoryReference().getDirectoryReference(user);
       userDir.createIfNotExists();
 
       rootDir = userDir.getDirectoryReference("notebook");
@@ -126,8 +128,8 @@ public class AzureNotebookRepo implements NotebookRepo {
       throw new IOException(msg, e);
     }
 
-    String json =
-        IOUtils.toString(ins, conf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_ENCODING));
+    String json = IOUtils.toString(ins,
+        conf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_ENCODING));
     ins.close();
     return Note.fromJson(json);
   }
@@ -197,7 +199,8 @@ public class AzureNotebookRepo implements NotebookRepo {
   }
 
   @Override
-  public void close() {}
+  public void close() {
+  }
 
   @Override
   public List<NotebookRepoSettingsInfo> getSettings(AuthenticationInfo subject) {
@@ -209,4 +212,5 @@ public class AzureNotebookRepo implements NotebookRepo {
   public void updateSettings(Map<String, String> settings, AuthenticationInfo subject) {
     LOG.warn("Method not implemented");
   }
+
 }


[03/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/FolderViewTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/FolderViewTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/FolderViewTest.java
index 5eecf80..e127be8 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/FolderViewTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/FolderViewTest.java
@@ -17,11 +17,6 @@
 
 package org.apache.zeppelin.notebook;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import java.util.*;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterFactory;
 import org.apache.zeppelin.interpreter.InterpreterSettingManager;
@@ -35,25 +30,40 @@ import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 
+import java.util.*;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
 @RunWith(MockitoJUnitRunner.class)
 public class FolderViewTest {
-  @Mock NotebookRepo repo;
+  @Mock
+  NotebookRepo repo;
 
-  @Mock ParagraphJobListener paragraphJobListener;
+  @Mock
+  ParagraphJobListener paragraphJobListener;
 
-  @Mock SearchService index;
+  @Mock
+  SearchService index;
 
-  @Mock Credentials credentials;
+  @Mock
+  Credentials credentials;
 
-  @Mock Interpreter interpreter;
+  @Mock
+  Interpreter interpreter;
 
-  @Mock Scheduler scheduler;
+  @Mock
+  Scheduler scheduler;
 
-  @Mock NoteEventListener noteEventListener;
+  @Mock
+  NoteEventListener noteEventListener;
 
-  @Mock InterpreterFactory interpreterFactory;
+  @Mock
+  InterpreterFactory interpreterFactory;
 
-  @Mock InterpreterSettingManager interpreterSettingManager;
+  @Mock
+  InterpreterSettingManager interpreterSettingManager;
 
   FolderView folderView;
 
@@ -61,11 +71,11 @@ public class FolderViewTest {
   Note note2;
   Note note3;
 
-  List<String> testNoteNames =
-      Arrays.asList(
+  List<String> testNoteNames = Arrays.asList(
           "note1", "/note2",
           "a/note1", "/a/note2",
-          "a/b/note1", "/a/b/note2");
+          "a/b/note1", "/a/b/note2"
+  );
 
   Folder rootFolder;
   Folder aFolder;
@@ -79,17 +89,7 @@ public class FolderViewTest {
   Note abNote2;
 
   private Note createNote() {
-    Note note =
-        new Note(
-            "test",
-            "test",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
+    Note note = new Note("test", "test", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
     note.setNoteNameListener(folderView);
     return note;
   }
@@ -279,7 +279,9 @@ public class FolderViewTest {
     assertEquals(sameName, aFolder.getId());
   }
 
-  /** Should rename a empty folder */
+  /**
+   * Should rename a empty folder
+   */
   @Test
   public void renameEmptyFolderTest() {
     // Create a note of which name is "x/y/z" and rename "x" -> "u"
@@ -294,7 +296,9 @@ public class FolderViewTest {
     assertNotNull(folderView.getFolder("u/y"));
   }
 
-  /** Should also rename child folders of the target folder */
+  /**
+   * Should also rename child folders of the target folder
+   */
   @Test
   public void renameFolderHasChildrenTest() {
     // "a" -> "x"

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java
index 01e18e0..d8e7f13 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java
@@ -17,9 +17,6 @@
 
 package org.apache.zeppelin.notebook;
 
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.*;
-
 import com.google.common.collect.Lists;
 import org.apache.zeppelin.display.AngularObject;
 import org.apache.zeppelin.display.ui.TextBox;
@@ -39,46 +36,47 @@ import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
+
 @RunWith(MockitoJUnitRunner.class)
 public class NoteTest {
-  @Mock NotebookRepo repo;
+  @Mock
+  NotebookRepo repo;
 
-  @Mock ParagraphJobListener paragraphJobListener;
+  @Mock
+  ParagraphJobListener paragraphJobListener;
 
-  @Mock SearchService index;
+  @Mock
+  SearchService index;
 
-  @Mock Credentials credentials;
+  @Mock
+  Credentials credentials;
 
-  @Mock Interpreter interpreter;
+  @Mock
+  Interpreter interpreter;
 
-  @Mock Scheduler scheduler;
+  @Mock
+  Scheduler scheduler;
 
-  @Mock NoteEventListener noteEventListener;
+  @Mock
+  NoteEventListener noteEventListener;
 
-  @Mock InterpreterFactory interpreterFactory;
+  @Mock
+  InterpreterFactory interpreterFactory;
 
-  @Mock InterpreterSettingManager interpreterSettingManager;
+  @Mock
+  InterpreterSettingManager interpreterSettingManager;
 
   private AuthenticationInfo anonymous = new AuthenticationInfo("anonymous");
 
   @Test
   public void runNormalTest() throws InterpreterNotFoundException {
-    when(interpreterFactory.getInterpreter(anyString(), anyString(), eq("spark"), anyString()))
-        .thenReturn(interpreter);
+    when(interpreterFactory.getInterpreter(anyString(), anyString(), eq("spark"), anyString())).thenReturn(interpreter);
     when(interpreter.getScheduler()).thenReturn(scheduler);
 
     String pText = "%spark sc.version";
-    Note note =
-        new Note(
-            "test",
-            "test",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
+    Note note = new Note("test", "test", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
 
     Paragraph p = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
     p.setText(pText);
@@ -87,25 +85,14 @@ public class NoteTest {
 
     ArgumentCaptor<Paragraph> pCaptor = ArgumentCaptor.forClass(Paragraph.class);
     verify(scheduler, only()).submit(pCaptor.capture());
-    verify(interpreterFactory, times(1))
-        .getInterpreter(anyString(), anyString(), eq("spark"), anyString());
+    verify(interpreterFactory, times(1)).getInterpreter(anyString(), anyString(), eq("spark"), anyString());
 
     assertEquals("Paragraph text", pText, pCaptor.getValue().getText());
   }
 
   @Test
   public void addParagraphWithEmptyReplNameTest() {
-    Note note =
-        new Note(
-            "test",
-            "",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
+    Note note = new Note("test", "", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
 
     Paragraph p = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
     assertNull(p.getText());
@@ -113,20 +100,9 @@ public class NoteTest {
 
   @Test
   public void addParagraphWithLastReplNameTest() throws InterpreterNotFoundException {
-    when(interpreterFactory.getInterpreter(anyString(), anyString(), eq("spark"), anyString()))
-        .thenReturn(interpreter);
-
-    Note note =
-        new Note(
-            "test",
-            "",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
+    when(interpreterFactory.getInterpreter(anyString(), anyString(), eq("spark"), anyString())).thenReturn(interpreter);
+
+    Note note = new Note("test", "", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
     Paragraph p1 = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
     p1.setText("%spark ");
     Paragraph p2 = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
@@ -136,91 +112,43 @@ public class NoteTest {
 
   @Test
   public void insertParagraphWithLastReplNameTest() throws InterpreterNotFoundException {
-    when(interpreterFactory.getInterpreter(anyString(), anyString(), eq("spark"), anyString()))
-        .thenReturn(interpreter);
-
-    Note note =
-        new Note(
-            "test",
-            "",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
+    when(interpreterFactory.getInterpreter(anyString(), anyString(), eq("spark"), anyString())).thenReturn(interpreter);
+
+    Note note = new Note("test", "", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
     Paragraph p1 = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
     p1.setText("%spark ");
-    Paragraph p2 =
-        note.insertNewParagraph(note.getParagraphs().size(), AuthenticationInfo.ANONYMOUS);
+    Paragraph p2 = note.insertNewParagraph(note.getParagraphs().size(), AuthenticationInfo.ANONYMOUS);
 
     assertEquals("%spark\n", p2.getText());
   }
 
   @Test
   public void insertParagraphWithInvalidReplNameTest() throws InterpreterNotFoundException {
-    when(interpreterFactory.getInterpreter(anyString(), anyString(), eq("invalid"), anyString()))
-        .thenReturn(null);
-
-    Note note =
-        new Note(
-            "test",
-            "",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
+    when(interpreterFactory.getInterpreter(anyString(), anyString(), eq("invalid"), anyString())).thenReturn(null);
+
+    Note note = new Note("test", "", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
     Paragraph p1 = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
     p1.setText("%invalid ");
-    Paragraph p2 =
-        note.insertNewParagraph(note.getParagraphs().size(), AuthenticationInfo.ANONYMOUS);
+    Paragraph p2 = note.insertNewParagraph(note.getParagraphs().size(), AuthenticationInfo.ANONYMOUS);
 
     assertNull(p2.getText());
   }
 
   @Test
   public void insertParagraphwithUser() {
-    Note note =
-        new Note(
-            "test",
-            "",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
-    Paragraph p =
-        note.insertNewParagraph(note.getParagraphs().size(), AuthenticationInfo.ANONYMOUS);
+    Note note = new Note("test", "", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
+    Paragraph p = note.insertNewParagraph(note.getParagraphs().size(), AuthenticationInfo.ANONYMOUS);
     assertEquals("anonymous", p.getUser());
   }
 
   @Test
   public void clearAllParagraphOutputTest() throws InterpreterNotFoundException {
-    when(interpreterFactory.getInterpreter(anyString(), anyString(), eq("md"), anyString()))
-        .thenReturn(interpreter);
+    when(interpreterFactory.getInterpreter(anyString(), anyString(), eq("md"), anyString())).thenReturn(interpreter);
     when(interpreter.getScheduler()).thenReturn(scheduler);
 
-    Note note =
-        new Note(
-            "test",
-            "",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
+    Note note = new Note("test", "", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
     Paragraph p1 = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
-    InterpreterResult result =
-        new InterpreterResult(
-            InterpreterResult.Code.SUCCESS, InterpreterResult.Type.TEXT, "result");
+    InterpreterResult result = new InterpreterResult(InterpreterResult.Code.SUCCESS, InterpreterResult.Type.TEXT, "result");
     p1.setResult(result);
 
     Paragraph p2 = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
@@ -234,17 +162,7 @@ public class NoteTest {
 
   @Test
   public void getFolderIdTest() {
-    Note note =
-        new Note(
-            "test",
-            "",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
+    Note note = new Note("test", "", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
     // Ordinary case test
     note.setName("this/is/a/folder/noteName");
     assertEquals("this/is/a/folder", note.getFolderId());
@@ -260,17 +178,7 @@ public class NoteTest {
 
   @Test
   public void getNameWithoutPathTest() {
-    Note note =
-        new Note(
-            "test",
-            "",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
+    Note note = new Note("test", "", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
     // Notes in the root folder
     note.setName("noteOnRootFolder");
     assertEquals("noteOnRootFolder", note.getNameWithoutPath());
@@ -285,17 +193,7 @@ public class NoteTest {
 
   @Test
   public void isTrashTest() {
-    Note note =
-        new Note(
-            "test",
-            "",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
+    Note note = new Note("test", "", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
     // Notes in the root folder
     note.setName("noteOnRootFolder");
     assertFalse(note.isTrash());
@@ -319,17 +217,7 @@ public class NoteTest {
 
   @Test
   public void personalizedModeReturnDifferentParagraphInstancePerUser() {
-    Note note =
-        new Note(
-            "test",
-            "",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
+    Note note = new Note("test", "", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
 
     String user1 = "user1";
     String user2 = "user2";
@@ -338,26 +226,13 @@ public class NoteTest {
     Paragraph baseParagraph = note.getParagraphs().get(0);
     Paragraph user1Paragraph = baseParagraph.getUserParagraph(user1);
     Paragraph user2Paragraph = baseParagraph.getUserParagraph(user2);
-    assertNotEquals(
-        System.identityHashCode(baseParagraph), System.identityHashCode(user1Paragraph));
-    assertNotEquals(
-        System.identityHashCode(baseParagraph), System.identityHashCode(user2Paragraph));
-    assertNotEquals(
-        System.identityHashCode(user1Paragraph), System.identityHashCode(user2Paragraph));
+    assertNotEquals(System.identityHashCode(baseParagraph), System.identityHashCode(user1Paragraph));
+    assertNotEquals(System.identityHashCode(baseParagraph), System.identityHashCode(user2Paragraph));
+    assertNotEquals(System.identityHashCode(user1Paragraph), System.identityHashCode(user2Paragraph));
   }
 
   public void testNoteJson() {
-    Note note =
-        new Note(
-            "test",
-            "",
-            repo,
-            interpreterFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            index,
-            credentials,
-            noteEventListener);
+    Note note = new Note("test", "", repo, interpreterFactory, interpreterSettingManager, paragraphJobListener, index, credentials, noteEventListener);
     note.setName("/test_note");
     note.getConfig().put("config_1", "value_1");
     note.getInfo().put("info_1", "value_1");
@@ -367,11 +242,7 @@ public class NoteTest {
     p.setResult(new InterpreterResult(InterpreterResult.Code.SUCCESS, "1.6.2"));
     p.settings.getForms().put("textbox_1", new TextBox("name", "default_name"));
     p.settings.getParams().put("textbox_1", "my_name");
-    note.getAngularObjects()
-        .put(
-            "ao_1",
-            Lists.newArrayList(
-                new AngularObject("name_1", "value_1", note.getId(), p.getId(), null)));
+    note.getAngularObjects().put("ao_1", Lists.newArrayList(new AngularObject("name_1", "value_1", note.getId(), p.getId(), null)));
 
     // test Paragraph Json
     Paragraph p2 = Paragraph.fromJson(p.toJson());

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NotebookTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NotebookTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NotebookTest.java
index 78c7b5d..ab39952 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NotebookTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NotebookTest.java
@@ -17,29 +17,7 @@
 
 package org.apache.zeppelin.notebook;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.Mockito.mock;
-
 import com.google.common.collect.Sets;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars;
 import org.apache.zeppelin.display.AngularObjectRegistry;
@@ -71,6 +49,31 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.sonatype.aether.RepositoryException;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+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.Set;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.mock;
+
+
 public class NotebookTest extends AbstractInterpreterTest implements ParagraphJobListener {
   private static final Logger logger = LoggerFactory.getLogger(NotebookTest.class);
 
@@ -95,17 +98,8 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     notebookAuthorization = NotebookAuthorization.init(conf);
     credentials = new Credentials(conf.credentialsPersist(), conf.getCredentialsPath(), null);
 
-    notebook =
-        new Notebook(
-            conf,
-            notebookRepo,
-            schedulerFactory,
-            interpreterFactory,
-            interpreterSettingManager,
-            this,
-            search,
-            notebookAuthorization,
-            credentials);
+    notebook = new Notebook(conf, notebookRepo, schedulerFactory, interpreterFactory, interpreterSettingManager, this, search,
+        notebookAuthorization, credentials);
   }
 
   @After
@@ -119,40 +113,25 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     Notebook notebook;
 
     notebookRepo = new DummyNotebookRepo();
-    notebook =
-        new Notebook(
-            conf,
-            notebookRepo,
-            schedulerFactory,
-            interpreterFactory,
-            interpreterSettingManager,
-            this,
-            null,
-            notebookAuthorization,
-            credentials);
+    notebook = new Notebook(conf, notebookRepo, schedulerFactory, interpreterFactory,
+        interpreterSettingManager, this, null,
+        notebookAuthorization, credentials);
     assertFalse("Revision is not supported in DummyNotebookRepo", notebook.isRevisionSupported());
 
     notebookRepo = new DummyNotebookRepoWithVersionControl();
-    notebook =
-        new Notebook(
-            conf,
-            notebookRepo,
-            schedulerFactory,
-            interpreterFactory,
-            interpreterSettingManager,
-            this,
-            null,
-            notebookAuthorization,
-            credentials);
-    assertTrue(
-        "Revision is supported in DummyNotebookRepoWithVersionControl",
+    notebook = new Notebook(conf, notebookRepo, schedulerFactory, interpreterFactory,
+        interpreterSettingManager, this, null,
+        notebookAuthorization, credentials);
+    assertTrue("Revision is supported in DummyNotebookRepoWithVersionControl",
         notebook.isRevisionSupported());
   }
 
   public static class DummyNotebookRepo implements NotebookRepo {
 
     @Override
-    public void init(ZeppelinConfiguration zConf) throws IOException {}
+    public void init(ZeppelinConfiguration zConf) throws IOException {
+
+    }
 
     @Override
     public List<NoteInfo> list(AuthenticationInfo subject) throws IOException {
@@ -165,13 +144,19 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     }
 
     @Override
-    public void save(Note note, AuthenticationInfo subject) throws IOException {}
+    public void save(Note note, AuthenticationInfo subject) throws IOException {
+
+    }
 
     @Override
-    public void remove(String noteId, AuthenticationInfo subject) throws IOException {}
+    public void remove(String noteId, AuthenticationInfo subject) throws IOException {
+
+    }
 
     @Override
-    public void close() {}
+    public void close() {
+
+    }
 
     @Override
     public List<NotebookRepoSettingsInfo> getSettings(AuthenticationInfo subject) {
@@ -179,11 +164,13 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     }
 
     @Override
-    public void updateSettings(Map<String, String> settings, AuthenticationInfo subject) {}
+    public void updateSettings(Map<String, String> settings, AuthenticationInfo subject) {
+
+    }
   }
 
-  public static class DummyNotebookRepoWithVersionControl
-      implements NotebookRepoWithVersionControl {
+  public static class DummyNotebookRepoWithVersionControl implements
+      NotebookRepoWithVersionControl {
 
     @Override
     public Revision checkpoint(String noteId, String checkpointMsg, AuthenticationInfo subject)
@@ -202,13 +189,15 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     }
 
     @Override
-    public Note setNoteRevision(String noteId, String revId, AuthenticationInfo subject)
-        throws IOException {
+    public Note setNoteRevision(String noteId, String revId, AuthenticationInfo subject) throws
+        IOException {
       return null;
     }
 
     @Override
-    public void init(ZeppelinConfiguration zConf) throws IOException {}
+    public void init(ZeppelinConfiguration zConf) throws IOException {
+
+    }
 
     @Override
     public List<NoteInfo> list(AuthenticationInfo subject) throws IOException {
@@ -221,13 +210,19 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     }
 
     @Override
-    public void save(Note note, AuthenticationInfo subject) throws IOException {}
+    public void save(Note note, AuthenticationInfo subject) throws IOException {
+
+    }
 
     @Override
-    public void remove(String noteId, AuthenticationInfo subject) throws IOException {}
+    public void remove(String noteId, AuthenticationInfo subject) throws IOException {
+
+    }
 
     @Override
-    public void close() {}
+    public void close() {
+
+    }
 
     @Override
     public List<NotebookRepoSettingsInfo> getSettings(AuthenticationInfo subject) {
@@ -235,7 +230,9 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     }
 
     @Override
-    public void updateSettings(Map<String, String> settings, AuthenticationInfo subject) {}
+    public void updateSettings(Map<String, String> settings, AuthenticationInfo subject) {
+
+    }
   }
 
   @Test
@@ -302,14 +299,14 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     // format has make some changes due to
     // Notebook.convertFromSingleResultToMultipleResultsFormat
     assertEquals(notes.get(1).getParagraphs().size(), copiedNote.getParagraphs().size());
-    assertEquals(
-        notes.get(1).getParagraphs().get(0).getText(), copiedNote.getParagraphs().get(0).getText());
-    assertEquals(
-        notes.get(1).getParagraphs().get(0).settings, copiedNote.getParagraphs().get(0).settings);
-    assertEquals(
-        notes.get(1).getParagraphs().get(0).getTitle(),
+    assertEquals(notes.get(1).getParagraphs().get(0).getText(),
+        copiedNote.getParagraphs().get(0).getText());
+    assertEquals(notes.get(1).getParagraphs().get(0).settings,
+        copiedNote.getParagraphs().get(0).settings);
+    assertEquals(notes.get(1).getParagraphs().get(0).getTitle(),
         copiedNote.getParagraphs().get(0).getTitle());
 
+
     // delete notebook from notebook list when reloadAllNotes() is called
     ((InMemoryNotebookRepo) notebookRepo).reset();
     notebook.reloadAllNotes(anonymous);
@@ -330,9 +327,7 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
       p1.setText("hello world");
       note.persist(anonymous);
     } catch (IOException fe) {
-      logger.warn(
-          "Failed to create note and paragraph. Possible problem with persisting note, safe to ignore",
-          fe);
+      logger.warn("Failed to create note and paragraph. Possible problem with persisting note, safe to ignore", fe);
     }
 
     try {
@@ -355,25 +350,17 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     p1.setText("hello world");
     note.persist(anonymous);
 
-    Notebook notebook2 =
-        new Notebook(
-            conf,
-            notebookRepo,
-            schedulerFactory,
-            new InterpreterFactory(interpreterSettingManager),
-            interpreterSettingManager,
-            null,
-            null,
-            null,
-            null);
+    Notebook notebook2 = new Notebook(
+        conf, notebookRepo, schedulerFactory,
+        new InterpreterFactory(interpreterSettingManager),
+        interpreterSettingManager, null, null, null, null);
 
     assertEquals(1, notebook2.getAllNotes().size());
     notebook.removeNote(note.getId(), anonymous);
   }
 
   @Test
-  public void testCreateNoteWithSubject()
-      throws IOException, SchedulerException, RepositoryException {
+  public void testCreateNoteWithSubject() throws IOException, SchedulerException, RepositoryException {
     AuthenticationInfo subject = new AuthenticationInfo("user1");
     Note note = notebook.createNote(subject);
 
@@ -484,13 +471,12 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
   }
 
   @Test
-  public void testScheduleAgainstRunningAndPendingParagraph()
-      throws InterruptedException, IOException {
+  public void testScheduleAgainstRunningAndPendingParagraph() throws InterruptedException, IOException {
     // create a note
     Note note = notebook.createNote(anonymous);
 
     // append running and pending paragraphs to the note
-    for (Status status : new Status[] {Status.RUNNING, Status.PENDING}) {
+    for (Status status : new Status[]{Status.RUNNING, Status.PENDING}) {
       Paragraph p = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
       Map config = new HashMap<>();
       p.setConfig(config);
@@ -530,15 +516,14 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     final Note note = notebook.createNote(anonymous);
 
     executeNewParagraphByCron(note, everySecondCron);
-    afterStatusChangedListener =
-        new StatusChangedListener() {
-          @Override
-          public void onStatusChanged(Job job, Status before, Status after) {
-            if (after == Status.FINISHED) {
-              jobsToExecuteCount.countDown();
-            }
-          }
-        };
+    afterStatusChangedListener = new StatusChangedListener() {
+      @Override
+      public void onStatusChanged(Job job, Status before, Status after) {
+        if (after == Status.FINISHED) {
+          jobsToExecuteCount.countDown();
+        }
+      }
+    };
 
     assertTrue(jobsToExecuteCount.await(timeout, TimeUnit.SECONDS));
 
@@ -567,17 +552,16 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
       final Note note = notebook.createNote(anonymous);
 
       executeNewParagraphByCron(note, everySecondCron);
-      afterStatusChangedListener =
-          new StatusChangedListener() {
-            @Override
-            public void onStatusChanged(Job job, Status before, Status after) {
-              if (after == Status.FINISHED) {
-                jobsToExecuteCount.countDown();
-              }
-            }
-          };
-
-      // This job should not run because "ZEPPELIN_NOTEBOOK_CRON_ENABLE" is set to false
+      afterStatusChangedListener = new StatusChangedListener() {
+        @Override
+        public void onStatusChanged(Job job, Status before, Status after) {
+          if (after == Status.FINISHED) {
+            jobsToExecuteCount.countDown();
+          }
+        }
+      };
+
+      //This job should not run because "ZEPPELIN_NOTEBOOK_CRON_ENABLE" is set to false
       assertFalse(jobsToExecuteCount.await(timeout, TimeUnit.SECONDS));
 
       terminateScheduledNote(note);
@@ -598,17 +582,16 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
       final Note note = notebook.createNote(anonymous);
 
       executeNewParagraphByCron(note, everySecondCron);
-      afterStatusChangedListener =
-          new StatusChangedListener() {
-            @Override
-            public void onStatusChanged(Job job, Status before, Status after) {
-              if (after == Status.FINISHED) {
-                jobsToExecuteCount.countDown();
-              }
-            }
-          };
-
-      // This job should not run because it's name does not matches "ZEPPELIN_NOTEBOOK_CRON_FOLDERS"
+      afterStatusChangedListener = new StatusChangedListener() {
+        @Override
+        public void onStatusChanged(Job job, Status before, Status after) {
+          if (after == Status.FINISHED) {
+            jobsToExecuteCount.countDown();
+          }
+        }
+      };
+
+      //This job should not run because it's name does not matches "ZEPPELIN_NOTEBOOK_CRON_FOLDERS"
       assertFalse(jobsToExecuteCount.await(timeout, TimeUnit.SECONDS));
 
       terminateScheduledNote(note);
@@ -619,17 +602,16 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
       final CountDownLatch jobsToExecuteCountNameSystem = new CountDownLatch(5);
 
       executeNewParagraphByCron(noteNameSystem, everySecondCron);
-      afterStatusChangedListener =
-          new StatusChangedListener() {
-            @Override
-            public void onStatusChanged(Job job, Status before, Status after) {
-              if (after == Status.FINISHED) {
-                jobsToExecuteCountNameSystem.countDown();
-              }
-            }
-          };
-
-      // This job should run because it's name contains "System/"
+      afterStatusChangedListener = new StatusChangedListener() {
+        @Override
+        public void onStatusChanged(Job job, Status before, Status after) {
+          if (after == Status.FINISHED) {
+            jobsToExecuteCountNameSystem.countDown();
+          }
+        }
+      };
+
+      //This job should run because it's name contains "System/"
       assertTrue(jobsToExecuteCountNameSystem.await(timeout, TimeUnit.SECONDS));
 
       terminateScheduledNote(noteNameSystem);
@@ -645,9 +627,9 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     notebook.removeNote(note.getId(), anonymous);
   }
 
+
   // @Test
-  public void testAutoRestartInterpreterAfterSchedule()
-      throws InterruptedException, IOException, InterpreterNotFoundException {
+  public void testAutoRestartInterpreterAfterSchedule() throws InterruptedException, IOException, InterpreterNotFoundException {
     // create a note and a paragraph
     Note note = notebook.createNote(anonymous);
 
@@ -668,13 +650,10 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     note.setConfig(config);
     notebook.refreshCron(note.getId());
 
-    RemoteInterpreter mock1 =
-        (RemoteInterpreter)
-            interpreterFactory.getInterpreter(anonymous.getUser(), note.getId(), "mock1", "test");
 
-    RemoteInterpreter mock2 =
-        (RemoteInterpreter)
-            interpreterFactory.getInterpreter(anonymous.getUser(), note.getId(), "mock2", "test");
+    RemoteInterpreter mock1 = (RemoteInterpreter) interpreterFactory.getInterpreter(anonymous.getUser(), note.getId(), "mock1", "test");
+
+    RemoteInterpreter mock2 = (RemoteInterpreter) interpreterFactory.getInterpreter(anonymous.getUser(), note.getId(), "mock2", "test");
 
     // wait until interpreters are started
     while (!mock1.isOpened() || !mock2.isOpened()) {
@@ -702,45 +681,40 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
       throws IOException, InterruptedException, InterpreterNotFoundException {
     // create a cron scheduled note.
     Note cronNote = notebook.createNote(anonymous);
-    cronNote.setConfig(
-        new HashMap() {
-          {
-            put("cron", "1/5 * * * * ?");
-            put("cronExecutingUser", anonymous.getUser());
-            put("releaseresource", true);
-          }
-        });
+    cronNote.setConfig(new HashMap() {
+      {
+        put("cron", "1/5 * * * * ?");
+        put("cronExecutingUser", anonymous.getUser());
+        put("releaseresource", true);
+      }
+    });
     RemoteInterpreter cronNoteInterpreter =
-        (RemoteInterpreter)
-            interpreterFactory.getInterpreter(
-                anonymous.getUser(), cronNote.getId(), "mock1", "test");
+        (RemoteInterpreter) interpreterFactory.getInterpreter(anonymous.getUser(),
+            cronNote.getId(), "mock1", "test");
 
     // create a paragraph of the cron scheduled note.
     Paragraph cronNoteParagraph = cronNote.addNewParagraph(AuthenticationInfo.ANONYMOUS);
-    cronNoteParagraph.setConfig(
-        new HashMap() {
-          {
-            put("enabled", true);
-          }
-        });
+    cronNoteParagraph.setConfig(new HashMap() {
+      {
+        put("enabled", true);
+      }
+    });
     cronNoteParagraph.setText("%mock1 sleep 1000");
 
     // create another note
     Note anotherNote = notebook.createNote(anonymous);
     interpreterSettingManager.getByName("mock2").getOption().setPerNote("scoped");
     RemoteInterpreter anotherNoteInterpreter =
-        (RemoteInterpreter)
-            interpreterFactory.getInterpreter(
-                anonymous.getUser(), anotherNote.getId(), "mock2", "test");
+        (RemoteInterpreter) interpreterFactory.getInterpreter(anonymous.getUser(),
+            anotherNote.getId(), "mock2", "test");
 
     // create a paragraph of another note
     Paragraph anotherNoteParagraph = anotherNote.addNewParagraph(AuthenticationInfo.ANONYMOUS);
-    anotherNoteParagraph.setConfig(
-        new HashMap() {
-          {
-            put("enabled", true);
-          }
-        });
+    anotherNoteParagraph.setConfig(new HashMap() {
+      {
+        put("enabled", true);
+      }
+    });
     anotherNoteParagraph.setText("%mock2 echo 1");
 
     // run the paragraph of another note
@@ -770,14 +744,13 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     assertTrue(anotherNoteInterpreter.isOpened());
 
     // remove cron scheduler
-    cronNote.setConfig(
-        new HashMap() {
-          {
-            put("cron", null);
-            put("cronExecutingUser", null);
-            put("releaseresource", null);
-          }
-        });
+    cronNote.setConfig(new HashMap() {
+      {
+        put("cron", null);
+        put("cronExecutingUser", null);
+        put("releaseresource", null);
+      }
+    });
     notebook.refreshCron(cronNote.getId());
 
     // remove notebooks
@@ -786,9 +759,8 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
   }
 
   @Test
-  public void testExportAndImportNote()
-      throws IOException, CloneNotSupportedException, InterruptedException, InterpreterException,
-          SchedulerException, RepositoryException {
+  public void testExportAndImportNote() throws IOException, CloneNotSupportedException,
+      InterruptedException, InterpreterException, SchedulerException, RepositoryException {
     Note note = notebook.createNote(anonymous);
 
     final Paragraph p = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
@@ -806,8 +778,7 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     // Test
     assertEquals(p.getId(), p2.getId());
     assertEquals(p.getText(), p2.getText());
-    assertEquals(
-        p.getReturn().message().get(0).getData(), p2.getReturn().message().get(0).getData());
+    assertEquals(p.getReturn().message().get(0).getData(), p2.getReturn().message().get(0).getData());
 
     // Verify import note with subject
     AuthenticationInfo subject = new AuthenticationInfo("user1");
@@ -823,9 +794,8 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
   }
 
   @Test
-  public void testCloneNote()
-      throws IOException, CloneNotSupportedException, InterruptedException, InterpreterException,
-          SchedulerException, RepositoryException {
+  public void testCloneNote() throws IOException, CloneNotSupportedException,
+      InterruptedException, InterpreterException, SchedulerException, RepositoryException {
     Note note = notebook.createNote(anonymous);
 
     final Paragraph p = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
@@ -840,8 +810,7 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     // Keep same ParagraphId
     assertEquals(cp.getId(), p.getId());
     assertEquals(cp.getText(), p.getText());
-    assertEquals(
-        cp.getReturn().message().get(0).getData(), p.getReturn().message().get(0).getData());
+    assertEquals(cp.getReturn().message().get(0).getData(), p.getReturn().message().get(0).getData());
 
     // Verify clone note with subject
     AuthenticationInfo subject = new AuthenticationInfo("user1");
@@ -857,8 +826,8 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
   }
 
   @Test
-  public void testCloneNoteWithNoName()
-      throws IOException, CloneNotSupportedException, InterruptedException {
+  public void testCloneNoteWithNoName() throws IOException, CloneNotSupportedException,
+      InterruptedException {
     Note note = notebook.createNote(anonymous);
 
     Note cloneNote = notebook.cloneNote(note.getId(), null, anonymous);
@@ -866,7 +835,7 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     notebook.removeNote(note.getId(), anonymous);
     notebook.removeNote(cloneNote.getId(), anonymous);
   }
-
+  
   @Test
   public void testResourceRemovealOnParagraphNoteRemove() throws IOException {
     Note note = notebook.createNote(anonymous);
@@ -892,16 +861,14 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
   }
 
   @Test
-  public void testAngularObjectRemovalOnNotebookRemove() throws InterruptedException, IOException {
+  public void testAngularObjectRemovalOnNotebookRemove() throws InterruptedException,
+      IOException {
     // create a note and a paragraph
     Note note = notebook.createNote(anonymous);
 
-    AngularObjectRegistry registry =
-        interpreterSettingManager
-            .getInterpreterSettings(note.getId())
-            .get(0)
-            .getOrCreateInterpreterGroup(anonymous.getUser(), "sharedProcess")
-            .getAngularObjectRegistry();
+    AngularObjectRegistry registry = interpreterSettingManager
+        .getInterpreterSettings(note.getId()).get(0).getOrCreateInterpreterGroup(anonymous.getUser(), "sharedProcess")
+        .getAngularObjectRegistry();
 
     Paragraph p1 = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
 
@@ -926,16 +893,14 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
   }
 
   @Test
-  public void testAngularObjectRemovalOnParagraphRemove() throws InterruptedException, IOException {
+  public void testAngularObjectRemovalOnParagraphRemove() throws InterruptedException,
+      IOException {
     // create a note and a paragraph
     Note note = notebook.createNote(anonymous);
 
-    AngularObjectRegistry registry =
-        interpreterSettingManager
-            .getInterpreterSettings(note.getId())
-            .get(0)
-            .getOrCreateInterpreterGroup(anonymous.getUser(), "sharedProcess")
-            .getAngularObjectRegistry();
+    AngularObjectRegistry registry = interpreterSettingManager
+        .getInterpreterSettings(note.getId()).get(0).getOrCreateInterpreterGroup(anonymous.getUser(), "sharedProcess")
+        .getAngularObjectRegistry();
 
     Paragraph p1 = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
 
@@ -961,17 +926,14 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
   }
 
   @Test
-  public void testAngularObjectRemovalOnInterpreterRestart()
-      throws InterruptedException, IOException, InterpreterException {
+  public void testAngularObjectRemovalOnInterpreterRestart() throws InterruptedException,
+      IOException, InterpreterException {
     // create a note and a paragraph
     Note note = notebook.createNote(anonymous);
 
-    AngularObjectRegistry registry =
-        interpreterSettingManager
-            .getInterpreterSettings(note.getId())
-            .get(0)
-            .getOrCreateInterpreterGroup(anonymous.getUser(), "sharedProcess")
-            .getAngularObjectRegistry();
+    AngularObjectRegistry registry = interpreterSettingManager
+        .getInterpreterSettings(note.getId()).get(0).getOrCreateInterpreterGroup(anonymous.getUser(), "sharedProcess")
+        .getAngularObjectRegistry();
 
     // add local scope object
     registry.add("o1", "object1", note.getId(), null);
@@ -979,14 +941,10 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     registry.add("o2", "object2", null, null);
 
     // restart interpreter
-    interpreterSettingManager.restart(
-        interpreterSettingManager.getInterpreterSettings(note.getId()).get(0).getId());
-    registry =
-        interpreterSettingManager
-            .getInterpreterSettings(note.getId())
-            .get(0)
-            .getOrCreateInterpreterGroup(anonymous.getUser(), "sharedProcess")
-            .getAngularObjectRegistry();
+    interpreterSettingManager.restart(interpreterSettingManager.getInterpreterSettings(note.getId()).get(0).getId());
+    registry = interpreterSettingManager.getInterpreterSettings(note.getId()).get(0)
+        .getOrCreateInterpreterGroup(anonymous.getUser(), "sharedProcess")
+        .getAngularObjectRegistry();
 
     // New InterpreterGroup will be created and its AngularObjectRegistry will be created
     assertNull(registry.get("o1", note.getId(), null));
@@ -1000,46 +958,50 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     Note note = notebook.createNote(anonymous);
     NotebookAuthorization notebookAuthorization = notebook.getNotebookAuthorization();
     // empty owners, readers or writers means note is public
-    assertEquals(
-        notebookAuthorization.isOwner(note.getId(), new HashSet<>(Arrays.asList("user2"))), true);
-    assertEquals(
-        notebookAuthorization.isReader(note.getId(), new HashSet<>(Arrays.asList("user2"))), true);
-    assertEquals(
-        notebookAuthorization.isRunner(note.getId(), new HashSet<>(Arrays.asList("user2"))), true);
-    assertEquals(
-        notebookAuthorization.isWriter(note.getId(), new HashSet<>(Arrays.asList("user2"))), true);
-
-    notebookAuthorization.setOwners(note.getId(), new HashSet<>(Arrays.asList("user1")));
-    notebookAuthorization.setReaders(note.getId(), new HashSet<>(Arrays.asList("user1", "user2")));
-    notebookAuthorization.setRunners(note.getId(), new HashSet<>(Arrays.asList("user3")));
-    notebookAuthorization.setWriters(note.getId(), new HashSet<>(Arrays.asList("user1")));
-
-    assertEquals(
-        notebookAuthorization.isOwner(note.getId(), new HashSet<>(Arrays.asList("user2"))), false);
-    assertEquals(
-        notebookAuthorization.isOwner(note.getId(), new HashSet<>(Arrays.asList("user1"))), true);
-
-    assertEquals(
-        notebookAuthorization.isReader(note.getId(), new HashSet<>(Arrays.asList("user4"))), false);
-    assertEquals(
-        notebookAuthorization.isReader(note.getId(), new HashSet<>(Arrays.asList("user2"))), true);
-
-    assertEquals(
-        notebookAuthorization.isRunner(note.getId(), new HashSet<>(Arrays.asList("user3"))), true);
-    assertEquals(
-        notebookAuthorization.isRunner(note.getId(), new HashSet<>(Arrays.asList("user2"))), false);
-
-    assertEquals(
-        notebookAuthorization.isWriter(note.getId(), new HashSet<>(Arrays.asList("user2"))), false);
-    assertEquals(
-        notebookAuthorization.isWriter(note.getId(), new HashSet<>(Arrays.asList("user1"))), true);
+    assertEquals(notebookAuthorization.isOwner(note.getId(),
+        new HashSet<>(Arrays.asList("user2"))), true);
+    assertEquals(notebookAuthorization.isReader(note.getId(),
+        new HashSet<>(Arrays.asList("user2"))), true);
+    assertEquals(notebookAuthorization.isRunner(note.getId(),
+        new HashSet<>(Arrays.asList("user2"))), true);
+    assertEquals(notebookAuthorization.isWriter(note.getId(),
+        new HashSet<>(Arrays.asList("user2"))), true);
+
+    notebookAuthorization.setOwners(note.getId(),
+        new HashSet<>(Arrays.asList("user1")));
+    notebookAuthorization.setReaders(note.getId(),
+        new HashSet<>(Arrays.asList("user1", "user2")));
+    notebookAuthorization.setRunners(note.getId(),
+        new HashSet<>(Arrays.asList("user3")));
+    notebookAuthorization.setWriters(note.getId(),
+        new HashSet<>(Arrays.asList("user1")));
+
+    assertEquals(notebookAuthorization.isOwner(note.getId(),
+        new HashSet<>(Arrays.asList("user2"))), false);
+    assertEquals(notebookAuthorization.isOwner(note.getId(),
+        new HashSet<>(Arrays.asList("user1"))), true);
+
+    assertEquals(notebookAuthorization.isReader(note.getId(),
+        new HashSet<>(Arrays.asList("user4"))), false);
+    assertEquals(notebookAuthorization.isReader(note.getId(),
+        new HashSet<>(Arrays.asList("user2"))), true);
+
+    assertEquals(notebookAuthorization.isRunner(note.getId(),
+        new HashSet<>(Arrays.asList("user3"))), true);
+    assertEquals(notebookAuthorization.isRunner(note.getId(),
+        new HashSet<>(Arrays.asList("user2"))), false);
+
+    assertEquals(notebookAuthorization.isWriter(note.getId(),
+        new HashSet<>(Arrays.asList("user2"))), false);
+    assertEquals(notebookAuthorization.isWriter(note.getId(),
+        new HashSet<>(Arrays.asList("user1"))), true);
 
     // Test clearing of permissions
     notebookAuthorization.setReaders(note.getId(), Sets.<String>newHashSet());
-    assertEquals(
-        notebookAuthorization.isReader(note.getId(), new HashSet<>(Arrays.asList("user2"))), true);
-    assertEquals(
-        notebookAuthorization.isReader(note.getId(), new HashSet<>(Arrays.asList("user4"))), true);
+    assertEquals(notebookAuthorization.isReader(note.getId(),
+        new HashSet<>(Arrays.asList("user2"))), true);
+    assertEquals(notebookAuthorization.isReader(note.getId(),
+        new HashSet<>(Arrays.asList("user4"))), true);
 
     notebook.removeNote(note.getId(), anonymous);
   }
@@ -1056,16 +1018,24 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     Note note = notebook.createNote(new AuthenticationInfo(user1));
 
     // check that user1 is owner, reader, runner and writer
-    assertEquals(notebookAuthorization.isOwner(note.getId(), Sets.newHashSet(user1)), true);
-    assertEquals(notebookAuthorization.isReader(note.getId(), Sets.newHashSet(user1)), true);
-    assertEquals(notebookAuthorization.isRunner(note.getId(), Sets.newHashSet(user2)), true);
-    assertEquals(notebookAuthorization.isWriter(note.getId(), Sets.newHashSet(user1)), true);
+    assertEquals(notebookAuthorization.isOwner(note.getId(),
+        Sets.newHashSet(user1)), true);
+    assertEquals(notebookAuthorization.isReader(note.getId(),
+        Sets.newHashSet(user1)), true);
+    assertEquals(notebookAuthorization.isRunner(note.getId(),
+        Sets.newHashSet(user2)), true);
+    assertEquals(notebookAuthorization.isWriter(note.getId(),
+        Sets.newHashSet(user1)), true);
 
     // since user1 and user2 both have admin role, user2 will be reader and writer as well
-    assertEquals(notebookAuthorization.isOwner(note.getId(), Sets.newHashSet(user2)), false);
-    assertEquals(notebookAuthorization.isReader(note.getId(), Sets.newHashSet(user2)), true);
-    assertEquals(notebookAuthorization.isRunner(note.getId(), Sets.newHashSet(user2)), true);
-    assertEquals(notebookAuthorization.isWriter(note.getId(), Sets.newHashSet(user2)), true);
+    assertEquals(notebookAuthorization.isOwner(note.getId(),
+        Sets.newHashSet(user2)), false);
+    assertEquals(notebookAuthorization.isReader(note.getId(),
+        Sets.newHashSet(user2)), true);
+    assertEquals(notebookAuthorization.isRunner(note.getId(),
+        Sets.newHashSet(user2)), true);
+    assertEquals(notebookAuthorization.isWriter(note.getId(),
+        Sets.newHashSet(user2)), true);
 
     // check that user1 has note listed in his workbench
     Set<String> user1AndRoles = notebookAuthorization.getRoles(user1);
@@ -1083,8 +1053,8 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
   }
 
   @Test
-  public void testAbortParagraphStatusOnInterpreterRestart()
-      throws InterruptedException, IOException, InterpreterException {
+  public void testAbortParagraphStatusOnInterpreterRestart() throws InterruptedException,
+      IOException, InterpreterException {
     Note note = notebook.createNote(anonymous);
 
     // create three paragraphs
@@ -1095,6 +1065,7 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     Paragraph p3 = note.addNewParagraph(anonymous);
     p3.setText("%mock1 sleep 1000");
 
+
     note.runAll(AuthenticationInfo.ANONYMOUS, false);
 
     // wait until first paragraph finishes and second paragraph starts
@@ -1105,8 +1076,7 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     assertEquals(Status.PENDING, p3.getStatus());
 
     // restart interpreter
-    interpreterSettingManager.restart(
-        interpreterSettingManager.getInterpreterSettingByName("mock1").getId());
+    interpreterSettingManager.restart(interpreterSettingManager.getInterpreterSettingByName("mock1").getId());
 
     // make sure three different status aborted well.
     assertEquals(Status.FINISHED, p1.getStatus());
@@ -1117,8 +1087,7 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
   }
 
   @Test
-  public void testPerSessionInterpreterCloseOnNoteRemoval()
-      throws IOException, InterpreterException {
+  public void testPerSessionInterpreterCloseOnNoteRemoval() throws IOException, InterpreterException {
     // create a notes
     Note note1 = notebook.createNote(anonymous);
     Paragraph p1 = note1.addNewParagraph(AuthenticationInfo.ANONYMOUS);
@@ -1126,8 +1095,7 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     p1.setAuthenticationInfo(anonymous);
 
     // restart interpreter with per user session enabled
-    for (InterpreterSetting setting :
-        interpreterSettingManager.getInterpreterSettings(note1.getId())) {
+    for (InterpreterSetting setting : interpreterSettingManager.getInterpreterSettings(note1.getId())) {
       setting.getOption().setPerNote(setting.getOption().SCOPED);
       notebook.getInterpreterSettingManager().restart(setting.getId());
     }
@@ -1171,12 +1139,11 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     while (p1.getStatus() != Status.FINISHED) Thread.yield();
     while (p2.getStatus() != Status.FINISHED) Thread.yield();
 
-    assertEquals(
-        p1.getReturn().message().get(0).getData(), p2.getReturn().message().get(0).getData());
+    assertEquals(p1.getReturn().message().get(0).getData(), p2.getReturn().message().get(0).getData());
+
 
     // restart interpreter with per note session enabled
-    for (InterpreterSetting setting :
-        notebook.getInterpreterSettingManager().getInterpreterSettings(note1.getId())) {
+    for (InterpreterSetting setting : notebook.getInterpreterSettingManager().getInterpreterSettings(note1.getId())) {
       setting.getOption().setPerNote(InterpreterOption.SCOPED);
       notebook.getInterpreterSettingManager().restart(setting.getId());
     }
@@ -1194,6 +1161,7 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     notebook.removeNote(note2.getId(), anonymous);
   }
 
+
   @Test
   public void testPerNoteSessionInterpreter() throws IOException, InterpreterException {
     // create two notes
@@ -1215,12 +1183,10 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     while (p1.getStatus() != Status.FINISHED) Thread.yield();
     while (p2.getStatus() != Status.FINISHED) Thread.yield();
 
-    assertEquals(
-        p1.getReturn().message().get(0).getData(), p2.getReturn().message().get(0).getData());
+    assertEquals(p1.getReturn().message().get(0).getData(), p2.getReturn().message().get(0).getData());
 
     // restart interpreter with scoped mode enabled
-    for (InterpreterSetting setting :
-        notebook.getInterpreterSettingManager().getInterpreterSettings(note1.getId())) {
+    for (InterpreterSetting setting : notebook.getInterpreterSettingManager().getInterpreterSettings(note1.getId())) {
       setting.getOption().setPerNote(InterpreterOption.SCOPED);
       notebook.getInterpreterSettingManager().restart(setting.getId());
     }
@@ -1232,12 +1198,10 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     while (p1.getStatus() != Status.FINISHED) Thread.yield();
     while (p2.getStatus() != Status.FINISHED) Thread.yield();
 
-    assertNotEquals(
-        p1.getReturn().message().get(0).getData(), p2.getReturn().message().get(0).getData());
+    assertNotEquals(p1.getReturn().message().get(0).getData(), p2.getReturn().message().get(0).getData());
 
     // restart interpreter with isolated mode enabled
-    for (InterpreterSetting setting :
-        notebook.getInterpreterSettingManager().getInterpreterSettings(note1.getId())) {
+    for (InterpreterSetting setting : notebook.getInterpreterSettingManager().getInterpreterSettings(note1.getId())) {
       setting.getOption().setPerNote(InterpreterOption.ISOLATED);
       setting.getInterpreterSettingManager().restart(setting.getId());
     }
@@ -1249,8 +1213,7 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     while (p1.getStatus() != Status.FINISHED) Thread.yield();
     while (p2.getStatus() != Status.FINISHED) Thread.yield();
 
-    assertNotEquals(
-        p1.getReturn().message().get(0).getData(), p2.getReturn().message().get(0).getData());
+    assertNotEquals(p1.getReturn().message().get(0).getData(), p2.getReturn().message().get(0).getData());
 
     notebook.removeNote(note1.getId(), anonymous);
     notebook.removeNote(note2.getId(), anonymous);
@@ -1263,31 +1226,31 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     final AtomicInteger onParagraphRemove = new AtomicInteger(0);
     final AtomicInteger onParagraphCreate = new AtomicInteger(0);
 
-    notebook.addNotebookEventListener(
-        new NotebookEventListener() {
-          @Override
-          public void onNoteRemove(Note note) {
-            onNoteRemove.incrementAndGet();
-          }
+    notebook.addNotebookEventListener(new NotebookEventListener() {
+      @Override
+      public void onNoteRemove(Note note) {
+        onNoteRemove.incrementAndGet();
+      }
 
-          @Override
-          public void onNoteCreate(Note note) {
-            onNoteCreate.incrementAndGet();
-          }
+      @Override
+      public void onNoteCreate(Note note) {
+        onNoteCreate.incrementAndGet();
+      }
 
-          @Override
-          public void onParagraphRemove(Paragraph p) {
-            onParagraphRemove.incrementAndGet();
-          }
+      @Override
+      public void onParagraphRemove(Paragraph p) {
+        onParagraphRemove.incrementAndGet();
+      }
 
-          @Override
-          public void onParagraphCreate(Paragraph p) {
-            onParagraphCreate.incrementAndGet();
-          }
+      @Override
+      public void onParagraphCreate(Paragraph p) {
+        onParagraphCreate.incrementAndGet();
+      }
 
-          @Override
-          public void onParagraphStatusChange(Paragraph p, Status status) {}
-        });
+      @Override
+      public void onParagraphStatusChange(Paragraph p, Status status) {
+      }
+    });
 
     Note note1 = notebook.createNote(anonymous);
     assertEquals(1, onNoteCreate.get());
@@ -1356,6 +1319,7 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     notebook.removeNote(note2.getId(), anonymous);
   }
 
+
   @Test
   public void testGetAllNotesWithDifferentPermissions() throws IOException {
     HashSet<String> user1 = Sets.newHashSet("user1");
@@ -1365,7 +1329,7 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     assertEquals(notes1.size(), 0);
     assertEquals(notes2.size(), 0);
 
-    // creates note and sets user1 owner
+    //creates note and sets user1 owner
     Note note = notebook.createNote(new AuthenticationInfo("user1"));
 
     // note is public since readers and writers empty
@@ -1375,7 +1339,7 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     assertEquals(notes2.size(), 1);
 
     notebook.getNotebookAuthorization().setReaders(note.getId(), Sets.newHashSet("user1"));
-    // note is public since writers empty
+    //note is public since writers empty
     notes1 = notebook.getAllNotes(user1);
     notes2 = notebook.getAllNotes(user2);
     assertEquals(notes1.size(), 1);
@@ -1454,28 +1418,28 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     assertEquals(notebookAuthorization.getRunners(notePrivate.getId()).size(), 1);
     assertEquals(notebookAuthorization.getWriters(notePrivate.getId()).size(), 1);
 
-    // set back public to true
+    //set back public to true
     System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_PUBLIC.getVarName(), "true");
     ZeppelinConfiguration.create();
   }
-
+  
   @Test
   public void testCloneImportCheck() throws IOException {
     Note sourceNote = notebook.createNote(new AuthenticationInfo("user"));
     sourceNote.setName("TestNote");
-
-    assertEquals("TestNote", sourceNote.getName());
+    
+    assertEquals("TestNote",sourceNote.getName());
 
     Paragraph sourceParagraph = sourceNote.addNewParagraph(AuthenticationInfo.ANONYMOUS);
     assertEquals("anonymous", sourceParagraph.getUser());
 
     Note destNote = notebook.createNote(new AuthenticationInfo("user"));
     destNote.setName("ClonedNote");
-    assertEquals("ClonedNote", destNote.getName());
+    assertEquals("ClonedNote",destNote.getName());
 
     List<Paragraph> paragraphs = sourceNote.getParagraphs();
     for (Paragraph p : paragraphs) {
-      destNote.addCloneParagraph(p, AuthenticationInfo.ANONYMOUS);
+    	  destNote.addCloneParagraph(p, AuthenticationInfo.ANONYMOUS);
       assertEquals("anonymous", p.getUser());
     }
   }
@@ -1494,17 +1458,26 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     }
   }
 
+
+
   @Override
-  public void onOutputAppend(Paragraph paragraph, int idx, String output) {}
+  public void onOutputAppend(Paragraph paragraph, int idx, String output) {
+
+  }
 
   @Override
-  public void onOutputUpdate(Paragraph paragraph, int idx, InterpreterResultMessage msg) {}
+  public void onOutputUpdate(Paragraph paragraph, int idx, InterpreterResultMessage msg) {
+
+  }
 
   @Override
-  public void onOutputUpdateAll(Paragraph paragraph, List<InterpreterResultMessage> msgs) {}
+  public void onOutputUpdateAll(Paragraph paragraph, List<InterpreterResultMessage> msgs) {
+
+  }
 
   @Override
-  public void onProgressUpdate(Paragraph paragraph, int progress) {}
+  public void onProgressUpdate(Paragraph paragraph, int progress) {
+  }
 
   @Override
   public void onStatusChange(Paragraph paragraph, Status before, Status after) {
@@ -1513,6 +1486,7 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     }
   }
 
+
   private interface StatusChangedListener {
     void onStatusChanged(Job job, Status before, Status after);
   }
@@ -1522,7 +1496,9 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     private Map<String, Note> notes = new HashMap<>();
 
     @Override
-    public void init(ZeppelinConfiguration zConf) throws IOException {}
+    public void init(ZeppelinConfiguration zConf) throws IOException {
+
+    }
 
     @Override
     public List<NoteInfo> list(AuthenticationInfo subject) throws IOException {
@@ -1549,7 +1525,9 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     }
 
     @Override
-    public void close() {}
+    public void close() {
+
+    }
 
     @Override
     public List<NotebookRepoSettingsInfo> getSettings(AuthenticationInfo subject) {
@@ -1557,7 +1535,9 @@ public class NotebookTest extends AbstractInterpreterTest implements ParagraphJo
     }
 
     @Override
-    public void updateSettings(Map<String, String> settings, AuthenticationInfo subject) {}
+    public void updateSettings(Map<String, String> settings, AuthenticationInfo subject) {
+
+    }
 
     public void reset() {
       this.notes.clear();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/ParagraphTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/ParagraphTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/ParagraphTest.java
index 962c39c..609f16c 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/ParagraphTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/ParagraphTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.zeppelin.notebook;
 
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
@@ -30,10 +31,10 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import com.google.common.collect.Lists;
+
 import java.util.Arrays;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
+
 import org.apache.commons.lang3.tuple.Triple;
 import org.apache.zeppelin.display.AngularObject;
 import org.apache.zeppelin.display.AngularObjectBuilder;
@@ -52,6 +53,10 @@ import org.apache.zeppelin.user.AuthenticationInfo;
 import org.apache.zeppelin.user.Credentials;
 import org.junit.Rule;
 import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+
 import org.junit.rules.ExpectedException;
 import org.mockito.Mockito;
 
@@ -123,7 +128,8 @@ public class ParagraphTest extends AbstractInterpreterTest {
     assertEquals(0, paragraph.getLocalProperties().size());
   }
 
-  @Rule public ExpectedException expectedEx = ExpectedException.none();
+  @Rule
+  public ExpectedException expectedEx = ExpectedException.none();
 
   @Test
   public void testInvalidProperties() {
@@ -195,7 +201,7 @@ public class ParagraphTest extends AbstractInterpreterTest {
 
   @Test
   public void should_extract_variable_from_angular_object_registry() throws Exception {
-    // Given
+    //Given
     final String noteId = "noteId";
 
     final AngularObjectRegistry registry = mock(AngularObjectRegistry.class);
@@ -205,15 +211,14 @@ public class ParagraphTest extends AbstractInterpreterTest {
     inputs.put("age", null);
     inputs.put("job", null);
 
-    final String scriptBody =
-        "My name is ${name} and I am ${age=20} years old. "
-            + "My occupation is ${ job = engineer | developer | artists}";
+    final String scriptBody = "My name is ${name} and I am ${age=20} years old. " +
+            "My occupation is ${ job = engineer | developer | artists}";
 
     final Paragraph paragraph = new Paragraph(note, null, null);
     final String paragraphId = paragraph.getId();
 
-    final AngularObject nameAO =
-        AngularObjectBuilder.build("name", "DuyHai DOAN", noteId, paragraphId);
+    final AngularObject nameAO = AngularObjectBuilder.build("name", "DuyHai DOAN", noteId,
+            paragraphId);
 
     final AngularObject ageAO = AngularObjectBuilder.build("age", 34, noteId, null);
 
@@ -221,14 +226,13 @@ public class ParagraphTest extends AbstractInterpreterTest {
     when(registry.get("name", noteId, paragraphId)).thenReturn(nameAO);
     when(registry.get("age", noteId, null)).thenReturn(ageAO);
 
-    final String expected =
-        "My name is DuyHai DOAN and I am 34 years old. "
-            + "My occupation is ${ job = engineer | developer | artists}";
-    // When
-    final String actual =
-        paragraph.extractVariablesFromAngularRegistry(scriptBody, inputs, registry);
+    final String expected = "My name is DuyHai DOAN and I am 34 years old. " +
+            "My occupation is ${ job = engineer | developer | artists}";
+    //When
+    final String actual = paragraph.extractVariablesFromAngularRegistry(scriptBody, inputs,
+            registry);
 
-    // Then
+    //Then
     verify(registry).get("name", noteId, paragraphId);
     verify(registry).get("age", noteId, null);
     assertEquals(actual, expected);
@@ -248,7 +252,7 @@ public class ParagraphTest extends AbstractInterpreterTest {
   public void returnUnchangedResultsWithDifferentUser() throws Throwable {
     Note mockNote = mock(Note.class);
     when(mockNote.getCredentials()).thenReturn(mock(Credentials.class));
-    Paragraph spyParagraph = spy(new Paragraph("para_1", mockNote, null, null));
+    Paragraph spyParagraph = spy(new Paragraph("para_1", mockNote,  null, null));
 
     Interpreter mockInterpreter = mock(Interpreter.class);
     spyParagraph.setInterpreter(mockInterpreter);
@@ -257,12 +261,10 @@ public class ParagraphTest extends AbstractInterpreterTest {
     ManagedInterpreterGroup mockInterpreterGroup = mock(ManagedInterpreterGroup.class);
     when(mockInterpreter.getInterpreterGroup()).thenReturn(mockInterpreterGroup);
     when(mockInterpreterGroup.getId()).thenReturn("mock_id_1");
-    when(mockInterpreterGroup.getAngularObjectRegistry())
-        .thenReturn(mock(AngularObjectRegistry.class));
+    when(mockInterpreterGroup.getAngularObjectRegistry()).thenReturn(mock(AngularObjectRegistry.class));
     when(mockInterpreterGroup.getResourcePool()).thenReturn(mock(ResourcePool.class));
 
-    List<InterpreterSetting> spyInterpreterSettingList =
-        spy(Lists.<InterpreterSetting>newArrayList());
+    List<InterpreterSetting> spyInterpreterSettingList = spy(Lists.<InterpreterSetting>newArrayList());
     InterpreterSetting mockInterpreterSetting = mock(InterpreterSetting.class);
     when(mockInterpreterGroup.getInterpreterSetting()).thenReturn(mockInterpreterSetting);
     InterpreterOption mockInterpreterOption = mock(InterpreterOption.class);
@@ -270,8 +272,7 @@ public class ParagraphTest extends AbstractInterpreterTest {
     when(mockInterpreterOption.permissionIsSet()).thenReturn(false);
     when(mockInterpreterSetting.getStatus()).thenReturn(Status.READY);
     when(mockInterpreterSetting.getId()).thenReturn("mock_id_1");
-    when(mockInterpreterSetting.getOrCreateInterpreterGroup(anyString(), anyString()))
-        .thenReturn(mockInterpreterGroup);
+    when(mockInterpreterSetting.getOrCreateInterpreterGroup(anyString(), anyString())).thenReturn(mockInterpreterGroup);
     when(mockInterpreterSetting.isUserAuthorized(any(List.class))).thenReturn(true);
     spyInterpreterSettingList.add(mockInterpreterSetting);
     when(mockNote.getId()).thenReturn("any_id");
@@ -280,13 +281,10 @@ public class ParagraphTest extends AbstractInterpreterTest {
 
     ParagraphJobListener mockJobListener = mock(ParagraphJobListener.class);
     doReturn(mockJobListener).when(spyParagraph).getListener();
-    doNothing()
-        .when(mockJobListener)
-        .onOutputUpdateAll(Mockito.<Paragraph>any(), Mockito.anyList());
+    doNothing().when(mockJobListener).onOutputUpdateAll(Mockito.<Paragraph>any(), Mockito.anyList());
 
     InterpreterResult mockInterpreterResult = mock(InterpreterResult.class);
-    when(mockInterpreter.interpret(anyString(), Mockito.<InterpreterContext>any()))
-        .thenReturn(mockInterpreterResult);
+    when(mockInterpreter.interpret(anyString(), Mockito.<InterpreterContext>any())).thenReturn(mockInterpreterResult);
     when(mockInterpreterResult.code()).thenReturn(Code.SUCCESS);
 
     // Actual test
@@ -317,25 +315,25 @@ public class ParagraphTest extends AbstractInterpreterTest {
   public void testCursorPosition() {
     Paragraph paragraph = spy(new Paragraph());
     // left = buffer, middle = cursor position into source code, right = cursor position after parse
-    List<Triple<String, Integer, Integer>> dataSet =
-        Arrays.asList(
-            Triple.of("%jdbc schema.", 13, 7),
-            Triple.of("   %jdbc schema.", 16, 7),
-            Triple.of(" \n%jdbc schema.", 15, 7),
-            Triple.of("%jdbc schema.table.  ", 19, 13),
-            Triple.of("%jdbc schema.\n\n", 13, 7),
-            Triple.of("  %jdbc schema.tab\n\n", 18, 10),
-            Triple.of("  \n%jdbc schema.\n \n", 16, 7),
-            Triple.of("  \n%jdbc schema.\n \n", 16, 7),
-            Triple.of("  \n%jdbc\n\n schema\n \n", 17, 6),
-            Triple.of("%another\n\n schema.", 18, 7),
-            Triple.of("\n\n schema.", 10, 7),
-            Triple.of("schema.", 7, 7),
-            Triple.of("schema. \n", 7, 7),
-            Triple.of("  \n   %jdbc", 11, 0),
-            Triple.of("\n   %jdbc", 9, 0),
-            Triple.of("%jdbc  \n  schema", 16, 6),
-            Triple.of("%jdbc  \n  \n   schema", 20, 6));
+    List<Triple<String, Integer, Integer>> dataSet = Arrays.asList(
+        Triple.of("%jdbc schema.", 13, 7),
+        Triple.of("   %jdbc schema.", 16, 7),
+        Triple.of(" \n%jdbc schema.", 15, 7),
+        Triple.of("%jdbc schema.table.  ", 19, 13),
+        Triple.of("%jdbc schema.\n\n", 13, 7),
+        Triple.of("  %jdbc schema.tab\n\n", 18, 10),
+        Triple.of("  \n%jdbc schema.\n \n", 16, 7),
+        Triple.of("  \n%jdbc schema.\n \n", 16, 7),
+        Triple.of("  \n%jdbc\n\n schema\n \n", 17, 6),
+        Triple.of("%another\n\n schema.", 18, 7),
+        Triple.of("\n\n schema.", 10, 7),
+        Triple.of("schema.", 7, 7),
+        Triple.of("schema. \n", 7, 7),
+        Triple.of("  \n   %jdbc", 11, 0),
+        Triple.of("\n   %jdbc", 9, 0),
+        Triple.of("%jdbc  \n  schema", 16, 6),
+        Triple.of("%jdbc  \n  \n   schema", 20, 6)
+    );
 
     for (Triple<String, Integer, Integer> data : dataSet) {
       paragraph.setText(data.getLeft());
@@ -343,4 +341,5 @@ public class ParagraphTest extends AbstractInterpreterTest {
       assertEquals(data.getRight(), actual);
     }
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/resource/DistributedResourcePoolTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/resource/DistributedResourcePoolTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/resource/DistributedResourcePoolTest.java
index 1b8c7a7..925515e 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/resource/DistributedResourcePoolTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/resource/DistributedResourcePoolTest.java
@@ -16,9 +16,6 @@
  */
 package org.apache.zeppelin.resource;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
 import com.google.gson.Gson;
 import org.apache.zeppelin.interpreter.AbstractInterpreterTest;
 import org.apache.zeppelin.interpreter.InterpreterContext;
@@ -30,26 +27,30 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-/** Unittest for DistributedResourcePool */
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * Unittest for DistributedResourcePool
+ */
 public class DistributedResourcePoolTest extends AbstractInterpreterTest {
 
   private RemoteInterpreter intp1;
   private RemoteInterpreter intp2;
   private InterpreterContext context;
 
+
   @Before
   public void setUp() throws Exception {
     super.setUp();
-    InterpreterSetting interpreterSetting =
-        interpreterSettingManager.getByName("mock_resource_pool");
-    intp1 =
-        (RemoteInterpreter)
-            interpreterSetting.getInterpreter("user1", "note1", "mock_resource_pool");
-    intp2 =
-        (RemoteInterpreter)
-            interpreterSetting.getInterpreter("user2", "note1", "mock_resource_pool");
+    InterpreterSetting interpreterSetting = interpreterSettingManager.getByName("mock_resource_pool");
+    intp1 = (RemoteInterpreter) interpreterSetting.getInterpreter("user1", "note1", "mock_resource_pool");
+    intp2 = (RemoteInterpreter) interpreterSetting.getInterpreter("user2", "note1", "mock_resource_pool");
 
-    context = InterpreterContext.builder().setNoteId("note").setParagraphId("id").build();
+    context = InterpreterContext.builder()
+        .setNoteId("note")
+        .setParagraphId("id")
+        .build();
 
     intp1.open();
     intp2.open();
@@ -85,55 +86,48 @@ public class DistributedResourcePoolTest extends AbstractInterpreterTest {
     final LocalResourcePool pool2 = new LocalResourcePool("pool2");
     final LocalResourcePool pool3 = new LocalResourcePool("pool3");
 
-    DistributedResourcePool pool1 =
-        new DistributedResourcePool(
-            "pool1",
-            new ResourcePoolConnector() {
-              @Override
-              public ResourceSet getAllResources() {
-                ResourceSet set = pool2.getAll();
-                set.addAll(pool3.getAll());
-
-                ResourceSet remoteSet = new ResourceSet();
-                Gson gson = new Gson();
-                for (Resource s : set) {
-                  RemoteResource remoteResource = RemoteResource.fromJson(s.toJson());
-                  remoteResource.setResourcePoolConnector(this);
-                  remoteSet.add(remoteResource);
-                }
-                return remoteSet;
-              }
-
-              @Override
-              public Object readResource(ResourceId id) {
-                if (id.getResourcePoolId().equals(pool2.id())) {
-                  return pool2.get(id.getName()).get();
-                }
-                if (id.getResourcePoolId().equals(pool3.id())) {
-                  return pool3.get(id.getName()).get();
-                }
-                return null;
-              }
-
-              @Override
-              public Object invokeMethod(
-                  ResourceId id, String methodName, Class[] paramTypes, Object[] params) {
-                return null;
-              }
-
-              @Override
-              public Resource invokeMethod(
-                  ResourceId id,
-                  String methodName,
-                  Class[] paramTypes,
-                  Object[] params,
-                  String returnResourceName) {
-                return null;
-              }
-            });
+    DistributedResourcePool pool1 = new DistributedResourcePool("pool1", new ResourcePoolConnector() {
+      @Override
+      public ResourceSet getAllResources() {
+        ResourceSet set = pool2.getAll();
+        set.addAll(pool3.getAll());
+
+        ResourceSet remoteSet = new ResourceSet();
+        Gson gson = new Gson();
+        for (Resource s : set) {
+          RemoteResource remoteResource = RemoteResource.fromJson(s.toJson());
+          remoteResource.setResourcePoolConnector(this);
+          remoteSet.add(remoteResource);
+        }
+        return remoteSet;
+      }
+
+      @Override
+      public Object readResource(ResourceId id) {
+        if (id.getResourcePoolId().equals(pool2.id())) {
+          return pool2.get(id.getName()).get();
+        }
+        if (id.getResourcePoolId().equals(pool3.id())) {
+          return pool3.get(id.getName()).get();
+        }
+        return null;
+      }
+
+      @Override
+      public Object invokeMethod(ResourceId id, String methodName, Class[] paramTypes, Object[] params) {
+        return null;
+      }
+
+      @Override
+      public Resource invokeMethod(ResourceId id, String methodName, Class[] paramTypes, Object[]
+          params, String returnResourceName) {
+        return null;
+      }
+    });
 
     assertEquals(0, pool1.getAll().size());
 
+
     // test get() can get from pool
     pool2.put("object1", "value2");
     assertEquals(1, pool1.getAll().size());
@@ -161,6 +155,7 @@ public class DistributedResourcePoolTest extends AbstractInterpreterTest {
     intp2.interpret("put note2:paragraph1:key1 value1", context);
     intp2.interpret("put note2:paragraph2:key2 value2", context);
 
+
     // then get all resources.
     assertEquals(4, interpreterSettingManager.getAllResources().size());
 
@@ -169,27 +164,23 @@ public class DistributedResourcePoolTest extends AbstractInterpreterTest {
 
     // then resources should be removed.
     assertEquals(2, interpreterSettingManager.getAllResources().size());
-    assertEquals(
-        "",
-        gson.fromJson(
-            intp1.interpret("get note1:paragraph1:key1", context).message().get(0).getData(),
-            String.class));
-    assertEquals(
-        "",
-        gson.fromJson(
-            intp1.interpret("get note1:paragraph2:key1", context).message().get(0).getData(),
-            String.class));
+    assertEquals("", gson.fromJson(
+        intp1.interpret("get note1:paragraph1:key1", context).message().get(0).getData(),
+        String.class));
+    assertEquals("", gson.fromJson(
+        intp1.interpret("get note1:paragraph2:key1", context).message().get(0).getData(),
+        String.class));
+
 
     // when remove all resources from note2:paragraph1
     interpreterSettingManager.removeResourcesBelongsToParagraph("note2", "paragraph1");
 
     // then 1
     assertEquals(1, interpreterSettingManager.getAllResources().size());
-    assertEquals(
-        "value2",
-        gson.fromJson(
-            intp1.interpret("get note2:paragraph2:key2", context).message().get(0).getData(),
-            String.class));
+    assertEquals("value2", gson.fromJson(
+        intp1.interpret("get note2:paragraph2:key2", context).message().get(0).getData(),
+        String.class));
+
   }
 
   @Test


[48/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/cassandra/src/test/java/org/apache/zeppelin/cassandra/CassandraInterpreterTest.java
----------------------------------------------------------------------
diff --git a/cassandra/src/test/java/org/apache/zeppelin/cassandra/CassandraInterpreterTest.java b/cassandra/src/test/java/org/apache/zeppelin/cassandra/CassandraInterpreterTest.java
index 7ee6351..df5e4ac 100644
--- a/cassandra/src/test/java/org/apache/zeppelin/cassandra/CassandraInterpreterTest.java
+++ b/cassandra/src/test/java/org/apache/zeppelin/cassandra/CassandraInterpreterTest.java
@@ -16,8 +16,13 @@
  */
 package org.apache.zeppelin.cassandra;
 
-import static com.datastax.driver.core.ProtocolOptions.DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS;
 import static com.google.common.collect.FluentIterable.from;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.Mockito.when;
+
+import static com.datastax.driver.core.ProtocolOptions.DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS;
+
 import static org.apache.zeppelin.cassandra.CassandraInterpreter.CASSANDRA_CLUSTER_NAME;
 import static org.apache.zeppelin.cassandra.CassandraInterpreter.CASSANDRA_COMPRESSION_PROTOCOL;
 import static org.apache.zeppelin.cassandra.CassandraInterpreter.CASSANDRA_CREDENTIALS_PASSWORD;
@@ -47,22 +52,7 @@ import static org.apache.zeppelin.cassandra.CassandraInterpreter.CASSANDRA_SOCKE
 import static org.apache.zeppelin.cassandra.CassandraInterpreter.CASSANDRA_SOCKET_READ_TIMEOUT_MILLIS;
 import static org.apache.zeppelin.cassandra.CassandraInterpreter.CASSANDRA_SOCKET_TCP_NO_DELAY;
 import static org.apache.zeppelin.cassandra.CassandraInterpreter.CASSANDRA_SPECULATIVE_EXECUTION_POLICY;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.when;
 
-import com.datastax.driver.core.Cluster;
-import com.datastax.driver.core.ProtocolVersion;
-import com.datastax.driver.core.Session;
-import info.archinnov.achilles.embedded.CassandraEmbeddedServerBuilder;
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.Properties;
-import org.apache.zeppelin.display.AngularObjectRegistry;
-import org.apache.zeppelin.interpreter.Interpreter;
-import org.apache.zeppelin.interpreter.InterpreterContext;
-import org.apache.zeppelin.interpreter.InterpreterResult;
-import org.apache.zeppelin.interpreter.InterpreterResult.Code;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -73,12 +63,29 @@ import org.mockito.Answers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Properties;
+
+import com.datastax.driver.core.Cluster;
+import com.datastax.driver.core.ProtocolVersion;
+import com.datastax.driver.core.Session;
+
+import info.archinnov.achilles.embedded.CassandraEmbeddedServerBuilder;
+
+import org.apache.zeppelin.display.AngularObjectRegistry;
+import org.apache.zeppelin.interpreter.Interpreter;
+import org.apache.zeppelin.interpreter.InterpreterContext;
+import org.apache.zeppelin.interpreter.InterpreterResult;
+import org.apache.zeppelin.interpreter.InterpreterResult.Code;
+
 @RunWith(MockitoJUnitRunner.class)
 public class CassandraInterpreterTest {
   private static final String ARTISTS_TABLE = "zeppelin.artists";
 
-  public static Session session =
-      CassandraEmbeddedServerBuilder.noEntityPackages()
+  public static Session session = CassandraEmbeddedServerBuilder
+          .noEntityPackages()
           .withKeyspaceName("zeppelin")
           .withScript("prepare_schema.cql")
           .withScript("prepare_data.cql")
@@ -106,9 +113,8 @@ public class CassandraInterpreterTest {
     properties.setProperty(CASSANDRA_RECONNECTION_POLICY, "DEFAULT");
     properties.setProperty(CASSANDRA_SPECULATIVE_EXECUTION_POLICY, "DEFAULT");
 
-    properties.setProperty(
-        CASSANDRA_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS,
-        DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS + "");
+    properties.setProperty(CASSANDRA_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS,
+            DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS + "");
 
     properties.setProperty(CASSANDRA_POOLING_NEW_CONNECTION_THRESHOLD_LOCAL, "100");
     properties.setProperty(CASSANDRA_POOLING_NEW_CONNECTION_THRESHOLD_REMOTE, "100");
@@ -131,11 +137,10 @@ public class CassandraInterpreterTest {
     properties.setProperty(CASSANDRA_SOCKET_READ_TIMEOUT_MILLIS, "12000");
     properties.setProperty(CASSANDRA_SOCKET_TCP_NO_DELAY, "true");
 
-    properties.setProperty(
-        CASSANDRA_HOSTS,
-        from(cluster.getMetadata().getAllHosts()).first().get().getAddress().getHostAddress());
-    properties.setProperty(
-        CASSANDRA_PORT, cluster.getConfiguration().getProtocolOptions().getPort() + "");
+    properties.setProperty(CASSANDRA_HOSTS, from(cluster.getMetadata().getAllHosts()).first()
+            .get().getAddress().getHostAddress());
+    properties.setProperty(CASSANDRA_PORT, cluster.getConfiguration().getProtocolOptions()
+            .getPort() + "");
     interpreter = new CassandraInterpreter(properties);
     interpreter.open();
   }
@@ -153,418 +158,392 @@ public class CassandraInterpreterTest {
   @Test
   public void should_create_cluster_and_session_upon_call_to_open() throws Exception {
     assertThat(interpreter.cluster).isNotNull();
-    assertThat(interpreter.cluster.getClusterName())
-        .isEqualTo(session.getCluster().getClusterName());
+    assertThat(interpreter.cluster.getClusterName()).isEqualTo(session.getCluster()
+            .getClusterName());
     assertThat(interpreter.session).isNotNull();
     assertThat(interpreter.helper).isNotNull();
   }
 
   @Test
   public void should_interpret_simple_select() throws Exception {
-    // Given
+    //Given
 
-    // When
-    final InterpreterResult actual =
-        interpreter.interpret("SELECT * FROM " + ARTISTS_TABLE + " LIMIT 10;", intrContext);
+    //When
+    final InterpreterResult actual = interpreter.interpret("SELECT * FROM " + ARTISTS_TABLE +
+            " LIMIT 10;", intrContext);
 
-    // Then
+    //Then
     assertThat(actual).isNotNull();
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
-    assertThat(actual.message().get(0).getData())
-        .isEqualTo(
-            "name\tborn\tcountry\tdied\tgender\t"
-                + "styles\ttype\n"
-                + "Bogdan Raczynski\t1977-01-01\tPoland\tnull\tMale\t[Dance, Electro]\tPerson\n"
-                + "Krishna Das\t1947-05-31\tUSA\tnull\tMale\t[Unknown]\tPerson\n"
-                + "Sheryl Crow\t1962-02-11\tUSA\tnull\tFemale\t"
-                + "[Classic, Rock, Country, Blues, Pop, Folk]\tPerson\n"
-                + "Doof\t1968-08-31\tUnited Kingdom\tnull\tnull\t[Unknown]\tPerson\n"
-                + "House of Large Sizes\t1986-01-01\tUSA\t2003\tnull\t[Unknown]\tGroup\n"
-                + "Fanfarlo\t2006-01-01\tUnited Kingdom\tnull\tnull\t"
-                + "[Rock, Indie, Pop, Classic]\tGroup\n"
-                + "Jeff Beck\t1944-06-24\tUnited Kingdom\tnull\tMale\t[Rock, Pop, Classic]\tPerson\n"
-                + "Los Paranoias\tnull\tUnknown\tnull\tnull\t[Unknown]\tnull\n"
-                + "…And You Will Know Us by the Trail of Dead\t1994-01-01\tUSA\tnull\tnull\t"
-                + "[Rock, Pop, Classic]\tGroup\n");
+    assertThat(actual.message().get(0).getData()).isEqualTo("name\tborn\tcountry\tdied\tgender\t" +
+            "styles\ttype\n" +
+            "Bogdan Raczynski\t1977-01-01\tPoland\tnull\tMale\t[Dance, Electro]\tPerson\n" +
+            "Krishna Das\t1947-05-31\tUSA\tnull\tMale\t[Unknown]\tPerson\n" +
+            "Sheryl Crow\t1962-02-11\tUSA\tnull\tFemale\t" +
+            "[Classic, Rock, Country, Blues, Pop, Folk]\tPerson\n" +
+            "Doof\t1968-08-31\tUnited Kingdom\tnull\tnull\t[Unknown]\tPerson\n" +
+            "House of Large Sizes\t1986-01-01\tUSA\t2003\tnull\t[Unknown]\tGroup\n" +
+            "Fanfarlo\t2006-01-01\tUnited Kingdom\tnull\tnull\t" +
+            "[Rock, Indie, Pop, Classic]\tGroup\n" +
+            "Jeff Beck\t1944-06-24\tUnited Kingdom\tnull\tMale\t[Rock, Pop, Classic]\tPerson\n" +
+            "Los Paranoias\tnull\tUnknown\tnull\tnull\t[Unknown]\tnull\n" +
+            "…And You Will Know Us by the Trail of Dead\t1994-01-01\tUSA\tnull\tnull\t" +
+            "[Rock, Pop, Classic]\tGroup\n");
   }
 
   @Test
   public void should_interpret_select_statement() throws Exception {
-    // Given
+    //Given
 
-    // When
-    final InterpreterResult actual =
-        interpreter.interpret("SELECT * FROM " + ARTISTS_TABLE + " LIMIT 2;", intrContext);
+    //When
+    final InterpreterResult actual = interpreter.interpret("SELECT * FROM " + ARTISTS_TABLE +
+            " LIMIT 2;", intrContext);
 
-    // Then
+    //Then
     assertThat(actual).isNotNull();
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
     assertThat(actual.message().get(0).getData())
-        .isEqualTo(
-            "name\tborn\tcountry\tdied\tgender\tstyles\ttype\n"
-                + "Bogdan Raczynski\t1977-01-01\tPoland\tnull\tMale\t[Dance, Electro]\tPerson\n"
-                + "Krishna Das\t1947-05-31\tUSA\tnull\tMale\t[Unknown]\tPerson\n");
+            .isEqualTo("name\tborn\tcountry\tdied\tgender\tstyles\ttype\n" +
+            "Bogdan Raczynski\t1977-01-01\tPoland\tnull\tMale\t[Dance, Electro]\tPerson\n" +
+            "Krishna Das\t1947-05-31\tUSA\tnull\tMale\t[Unknown]\tPerson\n");
   }
 
   @Test
   public void should_interpret_multiple_statements_with_single_line_logged_batch() {
-    // Given
-    String statements =
-        "CREATE TABLE IF NOT EXISTS zeppelin.albums(\n"
-            + "    title text PRIMARY KEY,\n"
-            + "    artist text,\n"
-            + "    year int\n"
-            + ");\n"
-            + "BEGIN BATCH"
-            + "   INSERT INTO zeppelin.albums(title,artist,year) "
-            + "VALUES('The Impossible Dream EP','Carter the Unstoppable Sex Machine',1992);"
-            + "   INSERT INTO zeppelin.albums(title,artist,year) "
-            + "VALUES('The Way You Are','Tears for Fears',1983);"
-            + "   INSERT INTO zeppelin.albums(title,artist,year) "
-            + "VALUES('Primitive','Soulfly',2003);"
-            + "APPLY BATCH;\n"
-            + "SELECT * FROM zeppelin.albums;";
-    // When
+    //Given
+    String statements = "CREATE TABLE IF NOT EXISTS zeppelin.albums(\n" +
+            "    title text PRIMARY KEY,\n" +
+            "    artist text,\n" +
+            "    year int\n" +
+            ");\n" +
+            "BEGIN BATCH" +
+            "   INSERT INTO zeppelin.albums(title,artist,year) " +
+            "VALUES('The Impossible Dream EP','Carter the Unstoppable Sex Machine',1992);" +
+            "   INSERT INTO zeppelin.albums(title,artist,year) " +
+            "VALUES('The Way You Are','Tears for Fears',1983);" +
+            "   INSERT INTO zeppelin.albums(title,artist,year) " +
+            "VALUES('Primitive','Soulfly',2003);" +
+            "APPLY BATCH;\n" +
+            "SELECT * FROM zeppelin.albums;";
+    //When
     final InterpreterResult actual = interpreter.interpret(statements, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
-    assertThat(actual.message().get(0).getData())
-        .isEqualTo(
-            "title\tartist\tyear\n"
-                + "The Impossible Dream EP\tCarter the Unstoppable Sex Machine\t1992\n"
-                + "The Way You Are\tTears for Fears\t1983\n"
-                + "Primitive\tSoulfly\t2003\n");
+    assertThat(actual.message().get(0).getData()).isEqualTo("title\tartist\tyear\n" +
+            "The Impossible Dream EP\tCarter the Unstoppable Sex Machine\t1992\n" +
+            "The Way You Are\tTears for Fears\t1983\n" +
+            "Primitive\tSoulfly\t2003\n");
   }
-
+    
   @Test
   public void should_throw_statement_not_having_semi_colon() throws Exception {
-    // Given
+    //Given
     String statement = "SELECT * zeppelin.albums";
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(statement, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.ERROR);
     assertThat(actual.message().get(0).getData())
-        .contains(
-            "Error parsing input:\n"
-                + "\t'SELECT * zeppelin.albums'\n"
-                + "Did you forget to add ; (semi-colon) at the end of each CQL statement ?");
+            .contains("Error parsing input:\n" +
+                    "\t'SELECT * zeppelin.albums'\n" +
+                    "Did you forget to add ; (semi-colon) at the end of each CQL statement ?");
   }
 
   @Test
   public void should_validate_statement() throws Exception {
-    // Given
+    //Given
     String statement = "SELECT * zeppelin.albums;";
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(statement, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.ERROR);
     assertThat(actual.message().get(0).getData())
-        .contains("line 1:9 missing K_FROM at 'zeppelin' (SELECT * [zeppelin]....)");
+            .contains("line 1:9 missing K_FROM at 'zeppelin' (SELECT * [zeppelin]....)");
   }
 
   @Test
   public void should_execute_statement_with_consistency_option() throws Exception {
-    // Given
-    String statement = "@consistency=THREE\n" + "SELECT * FROM zeppelin.artists LIMIT 1;";
+    //Given
+    String statement = "@consistency=THREE\n" +
+            "SELECT * FROM zeppelin.artists LIMIT 1;";
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(statement, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.ERROR);
     assertThat(actual.message().get(0).getData())
-        .contains(
-            "Not enough replicas available for query at consistency THREE (3 required "
-                + "but only 1 alive)");
+            .contains("Not enough replicas available for query at consistency THREE (3 required " +
+                    "but only 1 alive)");
   }
 
   @Test
   public void should_execute_statement_with_serial_consistency_option() throws Exception {
-    // Given
-    String statement = "@serialConsistency=SERIAL\n" + "SELECT * FROM zeppelin.artists LIMIT 1;";
+    //Given
+    String statement = "@serialConsistency=SERIAL\n" +
+            "SELECT * FROM zeppelin.artists LIMIT 1;";
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(statement, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
   }
 
   @Test
   public void should_execute_statement_with_timestamp_option() throws Exception {
-    // Given
+    //Given
     String statement1 = "INSERT INTO zeppelin.ts(key,val) VALUES('k','v1');";
-    String statement2 = "@timestamp=15\n" + "INSERT INTO zeppelin.ts(key,val) VALUES('k','v2');";
+    String statement2 = "@timestamp=15\n" +
+            "INSERT INTO zeppelin.ts(key,val) VALUES('k','v2');";
 
     // Insert v1 with current timestamp
     interpreter.interpret(statement1, intrContext);
 
     Thread.sleep(1);
 
-    // When
+    //When
     // Insert v2 with past timestamp
     interpreter.interpret(statement2, intrContext);
-    final String actual =
-        session.execute("SELECT * FROM zeppelin.ts LIMIT 1").one().getString("val");
+    final String actual = session.execute("SELECT * FROM zeppelin.ts LIMIT 1").one()
+            .getString("val");
 
-    // Then
+    //Then
     assertThat(actual).isEqualTo("v1");
   }
 
   @Test
   public void should_execute_statement_with_retry_policy() throws Exception {
-    // Given
-    String statement =
-        "@retryPolicy="
-            + interpreter.LOGGING_DOWNGRADING_RETRY
-            + "\n"
-            + "@consistency=THREE\n"
-            + "SELECT * FROM zeppelin.artists LIMIT 1;";
-
-    // When
+    //Given
+    String statement = "@retryPolicy=" + interpreter.LOGGING_DOWNGRADING_RETRY + "\n" +
+            "@consistency=THREE\n" +
+            "SELECT * FROM zeppelin.artists LIMIT 1;";
+
+    //When
     final InterpreterResult actual = interpreter.interpret(statement, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
   }
 
   @Test
   public void should_execute_statement_with_request_timeout() throws Exception {
-    // Given
-    String statement = "@requestTimeOut=10000000\n" + "SELECT * FROM zeppelin.artists;";
+    //Given
+    String statement = "@requestTimeOut=10000000\n" +
+            "SELECT * FROM zeppelin.artists;";
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(statement, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
   }
 
   @Test
   public void should_execute_prepared_and_bound_statements() throws Exception {
-    // Given
-    String queries =
-        "@prepare[ps]=INSERT INTO zeppelin.prepared(key,val) VALUES(?,?)\n"
-            + "@prepare[select]=SELECT * FROM zeppelin.prepared WHERE key=:key\n"
-            + "@bind[ps]='myKey','myValue'\n"
-            + "@bind[select]='myKey'";
-
-    // When
+    //Given
+    String queries = "@prepare[ps]=INSERT INTO zeppelin.prepared(key,val) VALUES(?,?)\n" +
+            "@prepare[select]=SELECT * FROM zeppelin.prepared WHERE key=:key\n" +
+            "@bind[ps]='myKey','myValue'\n" +
+            "@bind[select]='myKey'";
+
+    //When
     final InterpreterResult actual = interpreter.interpret(queries, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
-    assertThat(actual.message().get(0).getData()).isEqualTo("key\tval\n" + "myKey\tmyValue\n");
+    assertThat(actual.message().get(0).getData()).isEqualTo("key\tval\n" +
+            "myKey\tmyValue\n");
   }
 
   @Test
   public void should_execute_bound_statement() throws Exception {
-    // Given
-    String queries =
-        "@prepare[users_insert]=INSERT INTO zeppelin.users"
-            + "(login,firstname,lastname,addresses,location)"
-            + "VALUES(:login,:fn,:ln,:addresses,:loc)\n"
-            + "@bind[users_insert]='jdoe','John','DOE',"
-            + "{street_number: 3, street_name: 'Beverly Hills Bld', zip_code: 90209,"
-            + " country: 'USA', extra_info: ['Right on the hills','Next to the post box'],"
-            + " phone_numbers: {'home': 2016778524, 'office': 2015790847}},"
-            + "('USA', 90209, 'Beverly Hills')\n"
-            + "SELECT * FROM zeppelin.users WHERE login='jdoe';";
-    // When
+    //Given
+    String queries = "@prepare[users_insert]=INSERT INTO zeppelin.users" +
+            "(login,firstname,lastname,addresses,location)" +
+            "VALUES(:login,:fn,:ln,:addresses,:loc)\n" +
+            "@bind[users_insert]='jdoe','John','DOE'," +
+            "{street_number: 3, street_name: 'Beverly Hills Bld', zip_code: 90209," +
+            " country: 'USA', extra_info: ['Right on the hills','Next to the post box']," +
+            " phone_numbers: {'home': 2016778524, 'office': 2015790847}}," +
+            "('USA', 90209, 'Beverly Hills')\n" +
+            "SELECT * FROM zeppelin.users WHERE login='jdoe';";
+    //When
     final InterpreterResult actual = interpreter.interpret(queries, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
-    assertThat(actual.message().get(0).getData())
-        .isEqualTo(
-            "login\taddresses\tage\tdeceased\tfirstname\tlast_update\tlastname\tlocation\n"
-                + "jdoe\t"
-                + "{street_number:3,street_name:'Beverly Hills Bld',zip_code:90209,"
-                + "country:'USA',extra_info:['Right on the hills','Next to the post box'],"
-                + "phone_numbers:{'office':2015790847,'home':2016778524}}\tnull\t"
-                + "null\t"
-                + "John\t"
-                + "null\t"
-                + "DOE\t"
-                + "('USA',90209,'Beverly Hills')\n");
+    assertThat(actual.message().get(0).getData()).isEqualTo(
+            "login\taddresses\tage\tdeceased\tfirstname\tlast_update\tlastname\tlocation\n" +
+                    "jdoe\t" +
+                    "{street_number:3,street_name:'Beverly Hills Bld',zip_code:90209," +
+                    "country:'USA',extra_info:['Right on the hills','Next to the post box']," +
+                    "phone_numbers:{'office':2015790847,'home':2016778524}}\tnull\t" +
+                    "null\t" +
+                    "John\t" +
+                    "null\t" +
+                    "DOE\t" +
+                    "('USA',90209,'Beverly Hills')\n");
   }
 
   @Test
   public void should_exception_when_executing_unknown_bound_statement() throws Exception {
-    // Given
+    //Given
     String queries = "@bind[select_users]='jdoe'";
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(queries, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.ERROR);
     assertThat(actual.message().get(0).getData())
-        .isEqualTo(
-            "The statement 'select_users' can not be bound to values. "
-                + "Are you sure you did prepare it with @prepare[select_users] ?");
+            .isEqualTo("The statement 'select_users' can not be bound to values. " +
+                    "Are you sure you did prepare it with @prepare[select_users] ?");
   }
 
   @Test
   public void should_extract_variable_from_statement() throws Exception {
-    // Given
+    //Given
     AngularObjectRegistry angularObjectRegistry = new AngularObjectRegistry("cassandra", null);
     when(intrContext.getAngularObjectRegistry()).thenReturn(angularObjectRegistry);
     when(intrContext.getGui().input("login", "hsue")).thenReturn("hsue");
     when(intrContext.getGui().input("age", "27")).thenReturn("27");
 
-    String queries =
-        "@prepare[test_insert_with_variable]="
-            + "INSERT INTO zeppelin.users(login,firstname,lastname,age) VALUES(?,?,?,?)\n"
-            + "@bind[test_insert_with_variable]='{{login=hsue}}','Helen','SUE',{{age=27}}\n"
-            + "SELECT firstname,lastname,age FROM zeppelin.users WHERE login='hsue';";
-    // When
+    String queries = "@prepare[test_insert_with_variable]=" +
+            "INSERT INTO zeppelin.users(login,firstname,lastname,age) VALUES(?,?,?,?)\n" +
+            "@bind[test_insert_with_variable]='{{login=hsue}}','Helen','SUE',{{age=27}}\n" +
+            "SELECT firstname,lastname,age FROM zeppelin.users WHERE login='hsue';";
+    //When
     final InterpreterResult actual = interpreter.interpret(queries, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
-    assertThat(actual.message().get(0).getData())
-        .isEqualTo("firstname\tlastname\tage\n" + "Helen\tSUE\t27\n");
+    assertThat(actual.message().get(0).getData()).isEqualTo("firstname\tlastname\tage\n" +
+            "Helen\tSUE\t27\n");
   }
 
   @Test
   public void should_just_prepare_statement() throws Exception {
-    // Given
-    String queries =
-        "@prepare[just_prepare]=SELECT name,country,styles " + "FROM zeppelin.artists LIMIT 3";
-    final String expected = reformatHtml(readTestResource("/scalate/NoResult.html"));
+    //Given
+    String queries = "@prepare[just_prepare]=SELECT name,country,styles " +
+            "FROM zeppelin.artists LIMIT 3";
+    final String expected = reformatHtml(
+            readTestResource("/scalate/NoResult.html"));
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(queries, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
     assertThat(reformatHtml(actual.message().get(0).getData())).isEqualTo(expected);
   }
 
   @Test
   public void should_execute_bound_statement_with_no_bound_value() throws Exception {
-    // Given
-    String queries =
-        "@prepare[select_no_bound_value]=SELECT name,country,styles "
-            + "FROM zeppelin.artists LIMIT 3\n"
-            + "@bind[select_no_bound_value]";
+    //Given
+    String queries = "@prepare[select_no_bound_value]=SELECT name,country,styles " +
+            "FROM zeppelin.artists LIMIT 3\n" +
+            "@bind[select_no_bound_value]";
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(queries, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
-    assertThat(actual.message().get(0).getData())
-        .isEqualTo(
-            "name\tcountry\tstyles\n"
-                + "Bogdan Raczynski\tPoland\t[Dance, Electro]\n"
-                + "Krishna Das\tUSA\t[Unknown]\n"
-                + "Sheryl Crow\tUSA\t[Classic, Rock, Country, Blues, Pop, Folk]\n");
+    assertThat(actual.message().get(0).getData()).isEqualTo("name\tcountry\tstyles\n" +
+            "Bogdan Raczynski\tPoland\t[Dance, Electro]\n" +
+            "Krishna Das\tUSA\t[Unknown]\n" +
+            "Sheryl Crow\tUSA\t[Classic, Rock, Country, Blues, Pop, Folk]\n");
   }
 
   @Test
   public void should_parse_date_value() throws Exception {
-    // Given
-    String queries =
-        "@prepare[parse_date]=INSERT INTO zeppelin.users(login,last_update) "
-            + "VALUES(?,?)\n"
-            + "@bind[parse_date]='last_update','2015-07-30 12:00:01'\n"
-            + "SELECT last_update FROM zeppelin.users WHERE login='last_update';";
-    // When
+    //Given
+    String queries = "@prepare[parse_date]=INSERT INTO zeppelin.users(login,last_update) " +
+            "VALUES(?,?)\n" +
+            "@bind[parse_date]='last_update','2015-07-30 12:00:01'\n" +
+            "SELECT last_update FROM zeppelin.users WHERE login='last_update';";
+    //When
     final InterpreterResult actual = interpreter.interpret(queries, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
-    assertThat(actual.message().get(0).getData()).contains("last_update\n" + "Thu Jul 30 12:00:01");
+    assertThat(actual.message().get(0).getData()).contains("last_update\n" +
+            "Thu Jul 30 12:00:01");
   }
 
   @Test
   public void should_bind_null_value() throws Exception {
-    // Given
-    String queries =
-        "@prepare[bind_null]=INSERT INTO zeppelin.users(login,firstname,lastname) "
-            + "VALUES(?,?,?)\n"
-            + "@bind[bind_null]='bind_null',null,'NULL'\n"
-            + "SELECT firstname,lastname FROM zeppelin.users WHERE login='bind_null';";
-    // When
+    //Given
+    String queries = "@prepare[bind_null]=INSERT INTO zeppelin.users(login,firstname,lastname) " +
+            "VALUES(?,?,?)\n" +
+            "@bind[bind_null]='bind_null',null,'NULL'\n" +
+            "SELECT firstname,lastname FROM zeppelin.users WHERE login='bind_null';";
+    //When
     final InterpreterResult actual = interpreter.interpret(queries, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
-    assertThat(actual.message().get(0).getData())
-        .isEqualTo("firstname\tlastname\n" + "null\tNULL\n");
+    assertThat(actual.message().get(0).getData()).isEqualTo("firstname\tlastname\n" +
+            "null\tNULL\n");
   }
 
   @Test
   public void should_bind_boolean_value() throws Exception {
-    // Given
-    String queries =
-        "@prepare[bind_boolean]=INSERT INTO zeppelin.users(login,deceased) "
-            + "VALUES(?,?)\n"
-            + "@bind[bind_boolean]='bind_bool',false\n"
-            + "SELECT login,deceased FROM zeppelin.users WHERE login='bind_bool';";
-    // When
+    //Given
+    String queries = "@prepare[bind_boolean]=INSERT INTO zeppelin.users(login,deceased) " +
+            "VALUES(?,?)\n" +
+            "@bind[bind_boolean]='bind_bool',false\n" +
+            "SELECT login,deceased FROM zeppelin.users WHERE login='bind_bool';";
+    //When
     final InterpreterResult actual = interpreter.interpret(queries, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
-    assertThat(actual.message().get(0).getData())
-        .isEqualTo("login\tdeceased\n" + "bind_bool\tfalse\n");
+    assertThat(actual.message().get(0).getData()).isEqualTo("login\tdeceased\n" +
+            "bind_bool\tfalse\n");
   }
 
   @Test
   public void should_fail_when_executing_a_removed_prepared_statement() throws Exception {
-    // Given
-    String prepareFirst =
-        "@prepare[to_be_removed]=INSERT INTO zeppelin.users(login,deceased) " + "VALUES(?,?)";
+    //Given
+    String prepareFirst = "@prepare[to_be_removed]=INSERT INTO zeppelin.users(login,deceased) " +
+            "VALUES(?,?)";
     interpreter.interpret(prepareFirst, intrContext);
-    String removePrepared = "@remove_prepare[to_be_removed]\n" + "@bind[to_be_removed]='bind_bool'";
+    String removePrepared = "@remove_prepare[to_be_removed]\n" +
+            "@bind[to_be_removed]='bind_bool'";
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(removePrepared, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.ERROR);
-    assertThat(actual.message().get(0).getData())
-        .isEqualTo(
-            "The statement 'to_be_removed' can "
-                + "not be bound to values. Are you sure you did prepare it with "
-                + "@prepare[to_be_removed] ?");
+    assertThat(actual.message().get(0).getData()).isEqualTo("The statement 'to_be_removed' can " +
+            "not be bound to values. Are you sure you did prepare it with " +
+            "@prepare[to_be_removed] ?");
   }
 
   @Test
   public void should_display_statistics_for_non_select_statement() throws Exception {
-    // Given
+    //Given
     String query = "USE zeppelin;\nCREATE TABLE IF NOT EXISTS no_select(id int PRIMARY KEY);";
-    final String rawResult =
-        reformatHtml(readTestResource("/scalate/NoResultWithExecutionInfo.html"));
+    final String rawResult = reformatHtml(readTestResource(
+            "/scalate/NoResultWithExecutionInfo.html"));
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(query, intrContext);
     final Cluster cluster = session.getCluster();
     final int port = cluster.getConfiguration().getProtocolOptions().getPort();
-    final String address =
-        cluster
-            .getMetadata()
-            .getAllHosts()
-            .iterator()
-            .next()
-            .getAddress()
-            .getHostAddress()
-            .replaceAll("/", "")
-            .replaceAll("\\[", "")
-            .replaceAll("\\]", "");
-    // Then
-    final String expected =
-        rawResult
-            .replaceAll("TRIED_HOSTS", address + ":" + port)
+    final String address = cluster.getMetadata().getAllHosts().iterator().next()
+            .getAddress().getHostAddress()
+            .replaceAll("/", "").replaceAll("\\[", "").replaceAll("\\]", "");
+    //Then
+    final String expected = rawResult.replaceAll("TRIED_HOSTS", address + ":" + port)
             .replaceAll("QUERIED_HOSTS", address + ":" + port);
 
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
@@ -573,225 +552,228 @@ public class CassandraInterpreterTest {
 
   @Test
   public void should_error_and_display_stack_trace() throws Exception {
-    // Given
-    String query = "@consistency=THREE\n" + "SELECT * FROM zeppelin.users LIMIT 3;";
-    // When
+    //Given
+    String query = "@consistency=THREE\n" +
+            "SELECT * FROM zeppelin.users LIMIT 3;";
+    //When
     final InterpreterResult actual = interpreter.interpret(query, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.ERROR);
     assertThat(actual.message().get(0).getData()).contains("All host(s) tried for query failed");
   }
 
   @Test
   public void should_describe_cluster() throws Exception {
-    // Given
+    //Given
 
     String query = "DESCRIBE CLUSTER;";
-    final String expected = reformatHtml(readTestResource("/scalate/DescribeCluster.html"));
+    final String expected = reformatHtml(
+            readTestResource("/scalate/DescribeCluster.html"));
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(query, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
     assertThat(reformatHtml(actual.message().get(0).getData())).isEqualTo(expected);
   }
 
   @Test
   public void should_describe_keyspaces() throws Exception {
-    // Given
+    //Given
     String query = "DESCRIBE KEYSPACES;";
-    final String expected = reformatHtml(readTestResource("/scalate/DescribeKeyspaces.html"));
+    final String expected = reformatHtml(
+            readTestResource("/scalate/DescribeKeyspaces.html"));
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(query, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
     assertThat(reformatHtml(actual.message().get(0).getData())).isEqualTo(expected);
   }
 
   @Test
   public void should_describe_keyspace() throws Exception {
-    // Given
+    //Given
     String query = "DESCRIBE KEYSPACE live_data;";
-    final String expected =
-        reformatHtml(readTestResource("/scalate/DescribeKeyspace_live_data.html"));
+    final String expected = reformatHtml(
+            readTestResource("/scalate/DescribeKeyspace_live_data.html"));
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(query, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
     assertThat(reformatHtml(actual.message().get(0).getData())).isEqualTo(expected);
   }
 
   @Test
   @Ignore
-  // TODO(n.a.) activate test when using Java 8 and C* 3.x
+  //TODO(n.a.) activate test when using Java 8 and C* 3.x
   public void should_describe_function() throws Exception {
-    // Given
+    //Given
     Properties properties = new Properties();
     properties.setProperty(CASSANDRA_HOSTS, "127.0.0.1");
-    properties.setProperty(CASSANDRA_PORT, "9042");
+    properties.setProperty(CASSANDRA_PORT,  "9042");
     Interpreter interpreter = new CassandraInterpreter(properties);
     interpreter.open();
 
-    String createFunction =
-        "CREATE FUNCTION zeppelin.maxof(val1 int,val2 int) "
-            + "RETURNS NULL ON NULL INPUT "
-            + "RETURNS int "
-            + "LANGUAGE java "
-            + "AS $$"
-            + "    return Math.max(val1, val2);\n"
-            + "$$;";
+    String createFunction = "CREATE FUNCTION zeppelin.maxof(val1 int,val2 int) " +
+            "RETURNS NULL ON NULL INPUT " +
+            "RETURNS int " +
+            "LANGUAGE java " +
+            "AS $$" +
+            "    return Math.max(val1, val2);\n" +
+            "$$;";
     interpreter.interpret(createFunction, intrContext);
     String query = "DESCRIBE FUNCTION zeppelin.maxOf;";
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(query, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
     assertThat(actual.message()).isEqualTo("xxxxx");
   }
 
   @Test
   @Ignore
-  // TODO(n.a.) activate test when using Java 8 and C* 3.x
+  //TODO(n.a.) activate test when using Java 8 and C* 3.x
   public void should_describe_aggregate() throws Exception {
-    // Given
+    //Given
     Properties properties = new Properties();
     properties.setProperty(CASSANDRA_HOSTS, "127.0.0.1");
-    properties.setProperty(CASSANDRA_PORT, "9042");
+    properties.setProperty(CASSANDRA_PORT,  "9042");
     Interpreter interpreter = new CassandraInterpreter(properties);
     interpreter.open();
 
     final String query = "DESCRIBE AGGREGATES;";
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(query, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
   }
 
   @Test
   @Ignore
-  // TODO(n.a.) activate test when using Java 8 and C* 3.x
+  //TODO(n.a.) activate test when using Java 8 and C* 3.x
   public void should_describe_materialized_view() throws Exception {
-    // Given
+    //Given
     Properties properties = new Properties();
     properties.setProperty(CASSANDRA_HOSTS, "127.0.0.1");
-    properties.setProperty(CASSANDRA_PORT, "9042");
+    properties.setProperty(CASSANDRA_PORT,  "9042");
     Interpreter interpreter = new CassandraInterpreter(properties);
     interpreter.open();
 
     final String query = "DESCRIBE MATERIALIZED VIEWS;";
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(query, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
   }
 
   @Test
   public void should_describe_table() throws Exception {
-    // Given
+    //Given
     String query = "DESCRIBE TABLE live_data.complex_table;";
-    final String expected =
-        reformatHtml(readTestResource("/scalate/DescribeTable_live_data_complex_table.html"));
+    final String expected = reformatHtml(
+            readTestResource("/scalate/DescribeTable_live_data_complex_table.html"));
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(query, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
     assertThat(reformatHtml(actual.message().get(0).getData())).isEqualTo(expected);
   }
 
   @Test
   public void should_describe_udt() throws Exception {
-    // Given
+    //Given
     String query = "DESCRIBE TYPE live_data.address;";
-    final String expected =
-        reformatHtml(readTestResource("/scalate/DescribeType_live_data_address.html"));
+    final String expected = reformatHtml(
+            readTestResource("/scalate/DescribeType_live_data_address.html"));
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(query, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
     assertThat(reformatHtml(actual.message().get(0).getData())).isEqualTo(expected);
   }
 
   @Test
   public void should_describe_udt_withing_logged_in_keyspace() throws Exception {
-    // Given
-    String query = "USE live_data;\n" + "DESCRIBE TYPE address;";
-    final String expected =
-        reformatHtml(
-            readTestResource(
-                "/scalate/DescribeType_live_data_address_within_current_keyspace.html"));
-
-    // When
+    //Given
+    String query = "USE live_data;\n" +
+            "DESCRIBE TYPE address;";
+    final String expected = reformatHtml(readTestResource(
+            "/scalate/DescribeType_live_data_address_within_current_keyspace.html"));
+
+    //When
     final InterpreterResult actual = interpreter.interpret(query, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
     assertThat(reformatHtml(actual.message().get(0).getData())).isEqualTo(expected);
   }
 
   @Test
   public void should_error_describing_non_existing_table() throws Exception {
-    // Given
-    String query = "USE system;\n" + "DESCRIBE TABLE complex_table;";
+    //Given
+    String query = "USE system;\n" +
+            "DESCRIBE TABLE complex_table;";
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(query, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.ERROR);
     assertThat(actual.message().get(0).getData())
-        .contains("Cannot find table system.complex_table");
+            .contains("Cannot find table system.complex_table");
   }
 
   @Test
   public void should_error_describing_non_existing_udt() throws Exception {
-    // Given
-    String query = "USE system;\n" + "DESCRIBE TYPE address;";
+    //Given
+    String query = "USE system;\n" +
+            "DESCRIBE TYPE address;";
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(query, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.ERROR);
     assertThat(actual.message().get(0).getData()).contains("Cannot find type system.address");
   }
 
   @Test
   public void should_show_help() throws Exception {
-    // Given
+    //Given
     String query = "HELP;";
     final String expected = reformatHtml(readTestResource("/scalate/Help.html"));
 
-    // When
+    //When
     final InterpreterResult actual = interpreter.interpret(query, intrContext);
 
-    // Then
+    //Then
     assertThat(actual.code()).isEqualTo(Code.SUCCESS);
     assertThat(reformatHtml(actual.message().get(0).getData())).isEqualTo(expected);
   }
 
   private static String reformatHtml(String rawHtml) {
-    return rawHtml
-        .replaceAll("\\s*\n\\s*", "")
-        .replaceAll(">\\s+<", "><")
-        .replaceAll("(?s)data-target=\"#[a-f0-9-]+(?:_asCQL|_indices_asCQL)?\"", "")
-        .replaceAll("(?s)id=\"[a-f0-9-]+(?:_asCQL|_indices_asCQL)?\"", "")
-        .trim();
+    return  rawHtml
+            .replaceAll("\\s*\n\\s*", "")
+            .replaceAll(">\\s+<", "><")
+            .replaceAll("(?s)data-target=\"#[a-f0-9-]+(?:_asCQL|_indices_asCQL)?\"", "")
+            .replaceAll("(?s)id=\"[a-f0-9-]+(?:_asCQL|_indices_asCQL)?\"", "")
+            .trim();
   }
 
   private static String readTestResource(String testResource) {
@@ -804,7 +786,7 @@ public class CassandraInterpreterTest {
         builder.append(line).append("\n");
       }
     } catch (Exception ex) {
-      throw new RuntimeException(ex);
+      throw  new RuntimeException(ex);
     }
 
     return builder.toString();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/cassandra/src/test/java/org/apache/zeppelin/cassandra/InterpreterLogicTest.java
----------------------------------------------------------------------
diff --git a/cassandra/src/test/java/org/apache/zeppelin/cassandra/InterpreterLogicTest.java b/cassandra/src/test/java/org/apache/zeppelin/cassandra/InterpreterLogicTest.java
index 71db121..e096a0c 100644
--- a/cassandra/src/test/java/org/apache/zeppelin/cassandra/InterpreterLogicTest.java
+++ b/cassandra/src/test/java/org/apache/zeppelin/cassandra/InterpreterLogicTest.java
@@ -16,13 +16,6 @@
  */
 package org.apache.zeppelin.cassandra;
 
-import static com.datastax.driver.core.BatchStatement.Type.UNLOGGED;
-import static com.datastax.driver.core.ConsistencyLevel.ALL;
-import static com.datastax.driver.core.ConsistencyLevel.LOCAL_SERIAL;
-import static com.datastax.driver.core.ConsistencyLevel.ONE;
-import static com.datastax.driver.core.ConsistencyLevel.QUORUM;
-import static com.datastax.driver.core.ConsistencyLevel.SERIAL;
-import static java.util.Arrays.asList;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.eq;
 import static org.mockito.Mockito.mock;
@@ -31,16 +24,39 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyZeroInteractions;
 import static org.mockito.Mockito.when;
 
-import com.datastax.driver.core.BatchStatement;
-import com.datastax.driver.core.ConsistencyLevel;
-import com.datastax.driver.core.Session;
-import com.datastax.driver.core.SimpleStatement;
-import com.datastax.driver.core.Statement;
+import static java.util.Arrays.asList;
+
+import static com.datastax.driver.core.BatchStatement.Type.UNLOGGED;
+import static com.datastax.driver.core.ConsistencyLevel.ALL;
+import static com.datastax.driver.core.ConsistencyLevel.LOCAL_SERIAL;
+import static com.datastax.driver.core.ConsistencyLevel.ONE;
+import static com.datastax.driver.core.ConsistencyLevel.QUORUM;
+import static com.datastax.driver.core.ConsistencyLevel.SERIAL;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.mockito.Answers;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Captor;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
+
+import com.datastax.driver.core.BatchStatement;
+import com.datastax.driver.core.ConsistencyLevel;
+import com.datastax.driver.core.Session;
+import com.datastax.driver.core.SimpleStatement;
+import com.datastax.driver.core.Statement;
+
+import scala.Option;
+
 import org.apache.zeppelin.cassandra.TextBlockHierarchy.AnyBlock;
 import org.apache.zeppelin.cassandra.TextBlockHierarchy.Consistency;
 import org.apache.zeppelin.cassandra.TextBlockHierarchy.DowngradingRetryPolicy$;
@@ -56,90 +72,80 @@ import org.apache.zeppelin.display.GUI;
 import org.apache.zeppelin.display.ui.OptionInput.ParamOption;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.junit.runner.RunWith;
-import org.mockito.Answers;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Captor;
-import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
-import scala.Option;
 
 @RunWith(MockitoJUnitRunner.class)
 public class InterpreterLogicTest {
-  @Rule public ExpectedException expectedException = ExpectedException.none();
+  @Rule
+  public ExpectedException expectedException = ExpectedException.none();
 
   @Mock(answer = Answers.RETURNS_DEEP_STUBS)
   private InterpreterContext intrContext;
 
-  @Mock private Session session;
+  @Mock
+  private Session session;
 
   final InterpreterLogic helper = new InterpreterLogic(session);
 
-  @Captor ArgumentCaptor<ParamOption[]> optionsCaptor;
+  @Captor
+  ArgumentCaptor<ParamOption[]> optionsCaptor;
 
   @Test
   public void should_parse_input_string_block() throws Exception {
-    // Given
+    //Given
     String input = "SELECT * FROM users LIMIT 10;";
 
-    // When
+    //When
     final List<AnyBlock> anyBlocks = this.<AnyBlock>toJavaList(helper.parseInput(input));
 
-    // Then
+    //Then
     assertThat(anyBlocks).hasSize(1);
     assertThat(anyBlocks.get(0)).isInstanceOf(SimpleStm.class);
   }
 
   @Test
   public void should_exception_while_parsing_input() throws Exception {
-    // Given
+    //Given
     String input = "SELECT * FROM users LIMIT 10";
 
-    // When
+    //When
     expectedException.expect(InterpreterException.class);
-    expectedException.expectMessage(
-        "Error parsing input:\n"
-            + "\t'SELECT * FROM users LIMIT 10'\n"
-            + "Did you forget to add ; (semi-colon) at the end of each CQL statement ?");
+    expectedException.expectMessage("Error parsing input:\n" +
+            "\t'SELECT * FROM users LIMIT 10'\n" +
+            "Did you forget to add ; (semi-colon) at the end of each CQL statement ?");
 
     helper.parseInput(input);
   }
 
   @Test
   public void should_extract_variable_and_default_value() throws Exception {
-    // Given
+    //Given
     AngularObjectRegistry angularObjectRegistry = new AngularObjectRegistry("cassandra", null);
     when(intrContext.getAngularObjectRegistry()).thenReturn(angularObjectRegistry);
     when(intrContext.getGui().input("table", "zeppelin.demo")).thenReturn("zeppelin.demo");
     when(intrContext.getGui().input("id", "'John'")).thenReturn("'John'");
 
-    // When
-    final String actual =
-        helper.maybeExtractVariables(
+    //When
+    final String actual = helper.maybeExtractVariables(
             "SELECT * FROM {{table=zeppelin.demo}} WHERE id={{id='John'}}", intrContext);
 
-    // Then
+    //Then
     assertThat(actual).isEqualTo("SELECT * FROM zeppelin.demo WHERE id='John'");
   }
 
   @Test
   public void should_extract_variable_and_choices() throws Exception {
-    // Given
+    //Given
     AngularObjectRegistry angularObjectRegistry = new AngularObjectRegistry("cassandra", null);
     when(intrContext.getAngularObjectRegistry()).thenReturn(angularObjectRegistry);
     when(intrContext.getGui().select(eq("name"), eq("'Paul'"), optionsCaptor.capture()))
-        .thenReturn("'Jack'");
+            .thenReturn("'Jack'");
 
-    // When
-    final String actual =
-        helper.maybeExtractVariables(
+    //When
+    final String actual = helper.maybeExtractVariables(
             "SELECT * FROM zeppelin.artists WHERE name={{name='Paul'|'Jack'|'Smith'}}",
             intrContext);
 
-    // Then
+    //Then
     assertThat(actual).isEqualTo("SELECT * FROM zeppelin.artists WHERE name='Jack'");
     final List<ParamOption> paramOptions = asList(optionsCaptor.getValue());
     assertThat(paramOptions.get(0).getValue()).isEqualTo("'Paul'");
@@ -149,137 +155,131 @@ public class InterpreterLogicTest {
 
   @Test
   public void should_extract_no_variable() throws Exception {
-    // Given
+    //Given
     GUI gui = mock(GUI.class);
     when(intrContext.getGui()).thenReturn(gui);
 
-    // When
+    //When
     final String actual = helper.maybeExtractVariables("SELECT * FROM zeppelin.demo", intrContext);
 
-    // Then
+    //Then
     verifyZeroInteractions(gui);
     assertThat(actual).isEqualTo("SELECT * FROM zeppelin.demo");
   }
 
   @Test
   public void should_extract_variable_from_angular_object_registry() throws Exception {
-    // Given
+    //Given
     AngularObjectRegistry angularObjectRegistry = new AngularObjectRegistry("cassandra", null);
     angularObjectRegistry.add("id", "from_angular_registry", "noteId", "paragraphId");
     when(intrContext.getAngularObjectRegistry()).thenReturn(angularObjectRegistry);
     when(intrContext.getNoteId()).thenReturn("noteId");
     when(intrContext.getParagraphId()).thenReturn("paragraphId");
 
-    // When
-    final String actual =
-        helper.maybeExtractVariables(
+    //When
+    final String actual = helper.maybeExtractVariables(
             "SELECT * FROM zeppelin.demo WHERE id='{{id=John}}'", intrContext);
 
-    // Then
+    //Then
     assertThat(actual).isEqualTo("SELECT * FROM zeppelin.demo WHERE id='from_angular_registry'");
     verify(intrContext, never()).getGui();
   }
 
   @Test
   public void should_error_if_incorrect_variable_definition() throws Exception {
-    // Given
+    //Given
 
-    // When
+    //When
     expectedException.expect(ParsingException.class);
-    expectedException.expectMessage(
-        "Invalid bound variable definition for "
-            + "'{{table?zeppelin.demo}}' in 'SELECT * FROM {{table?zeppelin.demo}} "
-            + "WHERE id={{id='John'}}'. It should be of form 'variable=defaultValue'");
-
-    // Then
-    helper.maybeExtractVariables(
-        "SELECT * FROM {{table?zeppelin.demo}} WHERE id={{id='John'}}", intrContext);
+    expectedException.expectMessage("Invalid bound variable definition for " +
+            "'{{table?zeppelin.demo}}' in 'SELECT * FROM {{table?zeppelin.demo}} " +
+            "WHERE id={{id='John'}}'. It should be of form 'variable=defaultValue'");
+
+    //Then
+    helper.maybeExtractVariables("SELECT * FROM {{table?zeppelin.demo}} WHERE id={{id='John'}}",
+            intrContext);
   }
 
   @Test
   public void should_extract_consistency_option() throws Exception {
-    // Given
-    List<QueryParameters> options =
-        Arrays.<QueryParameters>asList(new Consistency(ALL), new Consistency(ONE));
+    //Given
+    List<QueryParameters> options = Arrays.<QueryParameters>asList(new Consistency(ALL),
+            new Consistency(ONE));
 
-    // When
+    //When
     final CassandraQueryOptions actual = helper.extractQueryOptions(toScalaList(options));
 
-    // Then
+    //Then
     assertThat(actual.consistency().get()).isEqualTo(ALL);
   }
 
   @Test
   public void should_extract_serial_consistency_option() throws Exception {
-    // Given
-    List<QueryParameters> options =
-        Arrays.<QueryParameters>asList(
-            new SerialConsistency(SERIAL), new SerialConsistency(LOCAL_SERIAL));
+    //Given
+    List<QueryParameters> options = Arrays.<QueryParameters>asList(new SerialConsistency(SERIAL),
+            new SerialConsistency(LOCAL_SERIAL));
 
-    // When
+    //When
     final CassandraQueryOptions actual = helper.extractQueryOptions(toScalaList(options));
 
-    // Then
+    //Then
     assertThat(actual.serialConsistency().get()).isEqualTo(SERIAL);
   }
 
   @Test
   public void should_extract_timestamp_option() throws Exception {
-    // Given
-    List<QueryParameters> options =
-        Arrays.<QueryParameters>asList(new Timestamp(123L), new Timestamp(456L));
+    //Given
+    List<QueryParameters> options = Arrays.<QueryParameters>asList(new Timestamp(123L),
+            new Timestamp(456L));
 
-    // When
+    //When
     final CassandraQueryOptions actual = helper.extractQueryOptions(toScalaList(options));
 
-    // Then
+    //Then
     assertThat(actual.timestamp().get()).isEqualTo(123L);
   }
 
   @Test
   public void should_extract_retry_policy_option() throws Exception {
-    // Given
-    List<QueryParameters> options =
-        Arrays.<QueryParameters>asList(
-            DowngradingRetryPolicy$.MODULE$, LoggingDefaultRetryPolicy$.MODULE$);
+    //Given
+    List<QueryParameters> options = Arrays.<QueryParameters>asList(DowngradingRetryPolicy$.MODULE$,
+            LoggingDefaultRetryPolicy$.MODULE$);
 
-    // When
+    //When
     final CassandraQueryOptions actual = helper.extractQueryOptions(toScalaList(options));
 
-    // Then
+    //Then
     assertThat(actual.retryPolicy().get()).isSameAs(DowngradingRetryPolicy$.MODULE$);
   }
 
   @Test
   public void should_extract_request_timeout_option() throws Exception {
-    // Given
+    //Given
     List<QueryParameters> options = Arrays.<QueryParameters>asList(new RequestTimeOut(100));
 
-    // When
+    //When
     final CassandraQueryOptions actual = helper.extractQueryOptions(toScalaList(options));
 
-    // Then
+    //Then
     assertThat(actual.requestTimeOut().get()).isEqualTo(100);
   }
 
   @Test
   public void should_generate_simple_statement() throws Exception {
-    // Given
+    //Given
     String input = "SELECT * FROM users LIMIT 10;";
-    CassandraQueryOptions options =
-        new CassandraQueryOptions(
-            Option.apply(QUORUM),
+    CassandraQueryOptions options = new CassandraQueryOptions(Option.apply(QUORUM),
             Option.<ConsistencyLevel>empty(),
             Option.empty(),
             Option.<RetryPolicy>empty(),
             Option.empty(),
             Option.empty());
 
-    // When
-    final SimpleStatement actual =
-        helper.generateSimpleStatement(new SimpleStm(input), options, intrContext);
+    //When
+    final SimpleStatement actual = helper.generateSimpleStatement(new SimpleStm(input), options,
+            intrContext);
 
-    // Then
+    //Then
     assertThat(actual).isNotNull();
     assertThat(actual.getQueryString()).isEqualTo("SELECT * FROM users LIMIT 10;");
     assertThat(actual.getConsistencyLevel()).isSameAs(QUORUM);
@@ -287,24 +287,22 @@ public class InterpreterLogicTest {
 
   @Test
   public void should_generate_batch_statement() throws Exception {
-    // Given
+    //Given
     Statement st1 = new SimpleStatement("SELECT * FROM users LIMIT 10;");
     Statement st2 = new SimpleStatement("INSERT INTO users(id) VALUES(10);");
     Statement st3 = new SimpleStatement("UPDATE users SET name = 'John DOE' WHERE id=10;");
-    CassandraQueryOptions options =
-        new CassandraQueryOptions(
-            Option.apply(QUORUM),
+    CassandraQueryOptions options = new CassandraQueryOptions(Option.apply(QUORUM),
             Option.<ConsistencyLevel>empty(),
             Option.empty(),
             Option.<RetryPolicy>empty(),
             Option.empty(),
             Option.empty());
 
-    // When
-    BatchStatement actual =
-        helper.generateBatchStatement(UNLOGGED, options, toScalaList(asList(st1, st2, st3)));
+    //When
+    BatchStatement actual = helper.generateBatchStatement(UNLOGGED, options,
+            toScalaList(asList(st1, st2, st3)));
 
-    // Then
+    //Then
     assertThat(actual).isNotNull();
     final List<Statement> statements = new ArrayList<>(actual.getStatements());
     assertThat(statements).hasSize(3);
@@ -316,26 +314,26 @@ public class InterpreterLogicTest {
 
   @Test
   public void should_parse_bound_values() throws Exception {
-    // Given
+    //Given
     String bs = "'jdoe',32,'John DOE',null, true, '2014-06-12 34:00:34'";
 
-    // When
+    //When
     final List<String> actual = this.<String>toJavaList(helper.parseBoundValues("ps", bs));
 
-    // Then
-    assertThat(actual)
-        .containsExactly("'jdoe'", "32", "'John DOE'", "null", "true", "2014-06-12 34:00:34");
+    //Then
+    assertThat(actual).containsExactly("'jdoe'", "32", "'John DOE'",
+            "null", "true", "2014-06-12 34:00:34");
   }
 
   @Test
   public void should_parse_simple_date() throws Exception {
-    // Given
+    //Given
     String dateString = "2015-07-30 12:00:01";
 
-    // When
+    //When
     final Date actual = helper.parseDate(dateString);
 
-    // Then
+    //Then
     Calendar calendar = Calendar.getInstance();
     calendar.setTime(actual);
 
@@ -349,13 +347,13 @@ public class InterpreterLogicTest {
 
   @Test
   public void should_parse_accurate_date() throws Exception {
-    // Given
+    //Given
     String dateString = "2015-07-30 12:00:01.123";
 
-    // When
+    //When
     final Date actual = helper.parseDate(dateString);
 
-    // Then
+    //Then
     Calendar calendar = Calendar.getInstance();
     calendar.setTime(actual);
 
@@ -368,11 +366,11 @@ public class InterpreterLogicTest {
     assertThat(calendar.get(Calendar.MILLISECOND)).isEqualTo(123);
   }
 
-  private <A> scala.collection.immutable.List<A> toScalaList(java.util.List<A> list) {
+  private <A> scala.collection.immutable.List<A> toScalaList(java.util.List<A> list)  {
     return scala.collection.JavaConversions.collectionAsScalaIterable(list).toList();
   }
 
-  private <A> java.util.List<A> toJavaList(scala.collection.immutable.List<A> list) {
+  private  <A> java.util.List<A> toJavaList(scala.collection.immutable.List<A> list){
     return scala.collection.JavaConversions.seqAsJavaList(list);
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/docs/development/contribution/how_to_contribute_code.md
----------------------------------------------------------------------
diff --git a/docs/development/contribution/how_to_contribute_code.md b/docs/development/contribution/how_to_contribute_code.md
index 05963f1..e71326e 100644
--- a/docs/development/contribution/how_to_contribute_code.md
+++ b/docs/development/contribution/how_to_contribute_code.md
@@ -37,10 +37,6 @@ Since Zeppelin uses Git for it's SCM system, you need git client installed in yo
 
 You are free to use whatever IDE you prefer, or your favorite command line editor.
 
-#### Code Style
-
-We decided to use `google-java-format`. You can install this formatter from [https://github.com/google/google-java-format](https://github.com/google/google-java-format). And the build script also contains `fmt-maven-plugin` to verify the formats of files. You can check `mvn validate` and fix wrong formats by running `mvn fmt:format` manually.
-
 #### Build Tools
 
 To build the code, install

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/elasticsearch/pom.xml
----------------------------------------------------------------------
diff --git a/elasticsearch/pom.xml b/elasticsearch/pom.xml
index f80cbc5..4e4021f 100644
--- a/elasticsearch/pom.xml
+++ b/elasticsearch/pom.xml
@@ -101,6 +101,13 @@
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java
----------------------------------------------------------------------
diff --git a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java
index 3c58b50..45b37c4 100644
--- a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java
+++ b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java
@@ -17,10 +17,23 @@
 
 package org.apache.zeppelin.elasticsearch;
 
-import com.github.wnameless.json.flattener.JsonFlattener;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.JsonObject;
+
+import org.apache.commons.lang3.StringUtils;
+import org.elasticsearch.common.xcontent.XContentBuilder;
+import org.elasticsearch.common.xcontent.XContentFactory;
+import org.elasticsearch.common.xcontent.XContentHelper;
+import org.elasticsearch.search.aggregations.Aggregation;
+import org.elasticsearch.search.aggregations.Aggregations;
+import org.elasticsearch.search.aggregations.InternalMultiBucketAggregation;
+import org.elasticsearch.search.aggregations.bucket.InternalSingleBucketAggregation;
+import org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation;
+import org.elasticsearch.search.aggregations.metrics.InternalMetricsAggregation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -35,7 +48,9 @@ import java.util.Set;
 import java.util.TreeSet;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import org.apache.commons.lang3.StringUtils;
+
+import com.github.wnameless.json.flattener.JsonFlattener;
+
 import org.apache.zeppelin.completer.CompletionType;
 import org.apache.zeppelin.elasticsearch.action.ActionResponse;
 import org.apache.zeppelin.elasticsearch.action.AggWrapper;
@@ -47,43 +62,33 @@ 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.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.common.xcontent.XContentFactory;
-import org.elasticsearch.common.xcontent.XContentHelper;
-import org.elasticsearch.search.aggregations.Aggregation;
-import org.elasticsearch.search.aggregations.Aggregations;
-import org.elasticsearch.search.aggregations.InternalMultiBucketAggregation;
-import org.elasticsearch.search.aggregations.bucket.InternalSingleBucketAggregation;
-import org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation;
-import org.elasticsearch.search.aggregations.metrics.InternalMetricsAggregation;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Elasticsearch Interpreter for Zeppelin. */
+/**
+ * Elasticsearch Interpreter for Zeppelin.
+ */
 public class ElasticsearchInterpreter extends Interpreter {
   private static Logger logger = LoggerFactory.getLogger(ElasticsearchInterpreter.class);
 
-  private static final String HELP =
-      "Elasticsearch interpreter:\n"
-          + "General format: <command> /<indices>/<types>/<id> <option> <JSON>\n"
-          + "  - indices: list of indices separated by commas (depends on the command)\n"
-          + "  - types: list of document types separated by commas (depends on the command)\n"
-          + "Commands:\n"
-          + "  - search /indices/types <query>\n"
-          + "    . indices and types can be omitted (at least, you have to provide '/')\n"
-          + "    . a query is either a JSON-formatted query, nor a lucene query\n"
-          + "  - size <value>\n"
-          + "    . defines the size of the result set (default value is in the config)\n"
-          + "    . if used, this command must be declared before a search command\n"
-          + "  - count /indices/types <query>\n"
-          + "    . same comments as for the search\n"
-          + "  - get /index/type/id\n"
-          + "  - delete /index/type/id\n"
-          + "  - index /index/type/id <json-formatted document>\n"
-          + "    . the id can be omitted, elasticsearch will generate one";
-
-  protected static final List<String> COMMANDS =
-      Arrays.asList("count", "delete", "get", "help", "index", "search");
+  private static final String HELP = "Elasticsearch interpreter:\n"
+      + "General format: <command> /<indices>/<types>/<id> <option> <JSON>\n"
+      + "  - indices: list of indices separated by commas (depends on the command)\n"
+      + "  - types: list of document types separated by commas (depends on the command)\n"
+      + "Commands:\n"
+      + "  - search /indices/types <query>\n"
+      + "    . indices and types can be omitted (at least, you have to provide '/')\n"
+      + "    . a query is either a JSON-formatted query, nor a lucene query\n"
+      + "  - size <value>\n"
+      + "    . defines the size of the result set (default value is in the config)\n"
+      + "    . if used, this command must be declared before a search command\n"
+      + "  - count /indices/types <query>\n"
+      + "    . same comments as for the search\n"
+      + "  - get /index/type/id\n"
+      + "  - delete /index/type/id\n"
+      + "  - index /index/type/id <json-formatted document>\n"
+      + "    . the id can be omitted, elasticsearch will generate one";
+
+  protected static final List<String> COMMANDS = Arrays.asList(
+      "count", "delete", "get", "help", "index", "search");
 
   private static final Pattern FIELD_NAME_PATTERN = Pattern.compile("\\[\\\\\"(.+)\\\\\"\\](.*)");
 
@@ -114,12 +119,8 @@ public class ElasticsearchInterpreter extends Interpreter {
       this.resultSize = Integer.parseInt(getProperty(ELASTICSEARCH_RESULT_SIZE));
     } catch (final NumberFormatException e) {
       this.resultSize = 10;
-      logger.error(
-          "Unable to parse "
-              + ELASTICSEARCH_RESULT_SIZE
-              + " : "
-              + getProperty(ELASTICSEARCH_RESULT_SIZE),
-          e);
+      logger.error("Unable to parse " + ELASTICSEARCH_RESULT_SIZE + " : " +
+          getProperty(ELASTICSEARCH_RESULT_SIZE), e);
     }
 
     try {
@@ -153,9 +154,8 @@ public class ElasticsearchInterpreter extends Interpreter {
     int currentResultSize = resultSize;
 
     if (elsClient == null) {
-      return new InterpreterResult(
-          InterpreterResult.Code.ERROR,
-          "Problem with the Elasticsearch client, please check your configuration (host, port,...)");
+      return new InterpreterResult(InterpreterResult.Code.ERROR,
+        "Problem with the Elasticsearch client, please check your configuration (host, port,...)");
     }
 
     String[] items = StringUtils.split(cmd.trim(), " ", 3);
@@ -171,7 +171,8 @@ public class ElasticsearchInterpreter extends Interpreter {
       final String[] lines = StringUtils.split(cmd.trim(), "\n", 2);
 
       if (lines.length < 2) {
-        return processHelp(InterpreterResult.Code.ERROR, "Size cmd must be followed by a search");
+        return processHelp(InterpreterResult.Code.ERROR,
+            "Size cmd must be followed by a search");
       }
 
       final String[] sizeLine = StringUtils.split(lines[0], " ", 2);
@@ -228,8 +229,8 @@ public class ElasticsearchInterpreter extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String s, int i, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String s, int i,
+      InterpreterContext interpreterContext) {
     final List suggestions = new ArrayList<>();
 
     for (final String cmd : COMMANDS) {
@@ -241,9 +242,9 @@ public class ElasticsearchInterpreter extends Interpreter {
   }
 
   private void addAngularObject(InterpreterContext interpreterContext, String prefix, Object obj) {
-    interpreterContext
-        .getAngularObjectRegistry()
-        .add(prefix + "_" + interpreterContext.getParagraphId().replace("-", "_"), obj, null, null);
+    interpreterContext.getAngularObjectRegistry().add(
+        prefix + "_" + interpreterContext.getParagraphId().replace("-", "_"),
+        obj, null, null);
   }
 
   private String[] getIndexTypeId(String[] urlItems) {
@@ -255,11 +256,13 @@ public class ElasticsearchInterpreter extends Interpreter {
     final String type = urlItems[1];
     final String id = StringUtils.join(Arrays.copyOfRange(urlItems, 2, urlItems.length), '/');
 
-    if (StringUtils.isEmpty(index) || StringUtils.isEmpty(type) || StringUtils.isEmpty(id)) {
+    if (StringUtils.isEmpty(index)
+        || StringUtils.isEmpty(type)
+        || StringUtils.isEmpty(id)) {
       return null;
     }
 
-    return new String[] {index, type, id};
+    return new String[] { index, type, id };
   }
 
   private InterpreterResult processHelp(InterpreterResult.Code code, String additionalMessage) {
@@ -284,8 +287,8 @@ public class ElasticsearchInterpreter extends Interpreter {
     final String[] indexTypeId = getIndexTypeId(urlItems);
 
     if (indexTypeId == null) {
-      return new InterpreterResult(
-          InterpreterResult.Code.ERROR, "Bad URL (it should be /index/type/id)");
+      return new InterpreterResult(InterpreterResult.Code.ERROR,
+          "Bad URL (it should be /index/type/id)");
     }
 
     final ActionResponse response = elsClient.get(indexTypeId[0], indexTypeId[1], indexTypeId[2]);
@@ -297,7 +300,9 @@ public class ElasticsearchInterpreter extends Interpreter {
       addAngularObject(interpreterContext, "get", json);
 
       return new InterpreterResult(
-          InterpreterResult.Code.SUCCESS, InterpreterResult.Type.TEXT, jsonStr);
+          InterpreterResult.Code.SUCCESS,
+          InterpreterResult.Type.TEXT,
+          jsonStr);
     }
 
     return new InterpreterResult(InterpreterResult.Code.ERROR, "Document not found");
@@ -311,11 +316,10 @@ public class ElasticsearchInterpreter extends Interpreter {
    * @param interpreterContext Instance of the context
    * @return Result of the count request, it contains the total hits
    */
-  private InterpreterResult processCount(
-      String[] urlItems, String data, InterpreterContext interpreterContext) {
+  private InterpreterResult processCount(String[] urlItems, String data,
+      InterpreterContext interpreterContext) {
     if (urlItems.length > 2) {
-      return new InterpreterResult(
-          InterpreterResult.Code.ERROR,
+      return new InterpreterResult(InterpreterResult.Code.ERROR,
           "Bad URL (it should be /index1,index2,.../type1,type2,...)");
     }
 
@@ -324,7 +328,9 @@ public class ElasticsearchInterpreter extends Interpreter {
     addAngularObject(interpreterContext, "count", response.getTotalHits());
 
     return new InterpreterResult(
-        InterpreterResult.Code.SUCCESS, InterpreterResult.Type.TEXT, "" + response.getTotalHits());
+        InterpreterResult.Code.SUCCESS,
+        InterpreterResult.Type.TEXT,
+        "" + response.getTotalHits());
   }
 
   /**
@@ -336,22 +342,18 @@ public class ElasticsearchInterpreter extends Interpreter {
    * @param interpreterContext Instance of the context
    * @return Result of the search request, it contains a tab-formatted string of the matching hits
    */
-  private InterpreterResult processSearch(
-      String[] urlItems, String data, int size, InterpreterContext interpreterContext) {
+  private InterpreterResult processSearch(String[] urlItems, String data, int size,
+      InterpreterContext interpreterContext) {
     if (urlItems.length > 2) {
-      return new InterpreterResult(
-          InterpreterResult.Code.ERROR,
+      return new InterpreterResult(InterpreterResult.Code.ERROR,
           "Bad URL (it should be /index1,index2,.../type1,type2,...)");
     }
 
     final ActionResponse response = searchData(urlItems, data, size);
 
-    addAngularObject(
-        interpreterContext,
-        "search",
-        (response.getAggregations() != null && response.getAggregations().size() > 0)
-            ? response.getAggregations()
-            : response.getHits());
+    addAngularObject(interpreterContext, "search",
+        (response.getAggregations() != null && response.getAggregations().size() > 0) ?
+            response.getAggregations() : response.getHits());
 
     return buildResponseMessage(response);
   }
@@ -365,15 +367,17 @@ public class ElasticsearchInterpreter extends Interpreter {
    */
   private InterpreterResult processIndex(String[] urlItems, String data) {
     if (urlItems.length < 2 || urlItems.length > 3) {
-      return new InterpreterResult(
-          InterpreterResult.Code.ERROR, "Bad URL (it should be /index/type or /index/type/id)");
+      return new InterpreterResult(InterpreterResult.Code.ERROR,
+          "Bad URL (it should be /index/type or /index/type/id)");
     }
 
-    final ActionResponse response =
-        elsClient.index(urlItems[0], urlItems[1], urlItems.length == 2 ? null : urlItems[2], data);
+    final ActionResponse response = elsClient.index(
+        urlItems[0], urlItems[1], urlItems.length == 2 ? null : urlItems[2], data);
 
     return new InterpreterResult(
-        InterpreterResult.Code.SUCCESS, InterpreterResult.Type.TEXT, response.getHit().getId());
+        InterpreterResult.Code.SUCCESS,
+        InterpreterResult.Type.TEXT,
+        response.getHit().getId());
   }
 
   /**
@@ -386,8 +390,8 @@ public class ElasticsearchInterpreter extends Interpreter {
     final String[] indexTypeId = getIndexTypeId(urlItems);
 
     if (indexTypeId == null) {
-      return new InterpreterResult(
-          InterpreterResult.Code.ERROR, "Bad URL (it should be /index/type/id)");
+      return new InterpreterResult(InterpreterResult.Code.ERROR,
+          "Bad URL (it should be /index/type/id)");
     }
 
     final ActionResponse response =
@@ -395,7 +399,9 @@ public class ElasticsearchInterpreter extends Interpreter {
 
     if (response.isSucceeded()) {
       return new InterpreterResult(
-          InterpreterResult.Code.SUCCESS, InterpreterResult.Type.TEXT, response.getHit().getId());
+          InterpreterResult.Code.SUCCESS,
+          InterpreterResult.Type.TEXT,
+          response.getHit().getId());
     }
 
     return new InterpreterResult(InterpreterResult.Code.ERROR, "Document not found");
@@ -445,7 +451,7 @@ public class ElasticsearchInterpreter extends Interpreter {
 
       final StringBuffer buffer = new StringBuffer();
       final String[] keys = headerKeys.toArray(new String[0]);
-      for (final String key : keys) {
+      for (final String key: keys) {
         buffer.append("\t" + key);
       }
       buffer.deleteCharAt(0);
@@ -453,7 +459,7 @@ public class ElasticsearchInterpreter extends Interpreter {
       for (final Map<String, Object> bucket : buckets) {
         buffer.append("\n");
 
-        for (final String key : keys) {
+        for (final String key: keys) {
           buffer.append(bucket.get(key)).append("\t");
         }
         buffer.deleteCharAt(buffer.length() - 1);
@@ -473,7 +479,7 @@ public class ElasticsearchInterpreter extends Interpreter {
     final Set<String> headerKeys = new HashSet<>();
     final List<Map<String, Object>> buckets = new LinkedList<>();
 
-    for (final AggWrapper aggregation : aggregations) {
+    for (final AggWrapper aggregation: aggregations) {
       final Map<String, Object> bucketMap = JsonFlattener.flattenAsMap(aggregation.getResult());
       headerKeys.addAll(bucketMap.keySet());
       buckets.add(bucketMap);
@@ -481,7 +487,7 @@ public class ElasticsearchInterpreter extends Interpreter {
 
     final StringBuffer buffer = new StringBuffer();
     final String[] keys = headerKeys.toArray(new String[0]);
-    for (final String key : keys) {
+    for (final String key: keys) {
       buffer.append("\t" + key);
     }
     buffer.deleteCharAt(0);
@@ -489,7 +495,7 @@ public class ElasticsearchInterpreter extends Interpreter {
     for (final Map<String, Object> bucket : buckets) {
       buffer.append("\n");
 
-      for (final String key : keys) {
+      for (final String key: keys) {
         buffer.append(bucket.get(key)).append("\t");
       }
       buffer.deleteCharAt(buffer.length() - 1);
@@ -505,7 +511,7 @@ public class ElasticsearchInterpreter extends Interpreter {
       return "";
     }
 
-    // First : get all the keys in order to build an ordered list of the values for each hit
+    //First : get all the keys in order to build an ordered list of the values for each hit
     //
     final List<Map<String, Object>> flattenHits = new LinkedList<>();
     final Set<String> keys = new TreeSet<>();
@@ -520,8 +526,8 @@ public class ElasticsearchInterpreter extends Interpreter {
         final String fieldName = iter.next();
         final Matcher fieldNameMatcher = FIELD_NAME_PATTERN.matcher(fieldName);
         if (fieldNameMatcher.matches()) {
-          flattenMap.put(
-              fieldNameMatcher.group(1) + fieldNameMatcher.group(2), flattenJsonMap.get(fieldName));
+          flattenMap.put(fieldNameMatcher.group(1) + fieldNameMatcher.group(2),
+              flattenJsonMap.get(fieldName));
         } else {
           flattenMap.put(fieldName, flattenJsonMap.get(fieldName));
         }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/ActionException.java
----------------------------------------------------------------------
diff --git a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/ActionException.java b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/ActionException.java
index 458fce3..6846d0a 100644
--- a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/ActionException.java
+++ b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/ActionException.java
@@ -17,7 +17,9 @@
 
 package org.apache.zeppelin.elasticsearch.action;
 
-/** Runtime exception thrown when there is a problem during an action (search, get, ...). */
+/**
+ * Runtime exception thrown when there is a problem during an action (search, get, ...).
+ */
 public class ActionException extends RuntimeException {
 
   public ActionException(String message) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/ActionResponse.java
----------------------------------------------------------------------
diff --git a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/ActionResponse.java b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/ActionResponse.java
index 0acb4c4..4141bce 100644
--- a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/ActionResponse.java
+++ b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/ActionResponse.java
@@ -20,7 +20,9 @@ package org.apache.zeppelin.elasticsearch.action;
 import java.util.LinkedList;
 import java.util.List;
 
-/** Contains the result of an action (hits, aggregations, ...). */
+/**
+ * Contains the result of an action (hits, aggregations, ...).
+ */
 public class ActionResponse {
 
   private boolean succeeded;
@@ -28,6 +30,7 @@ public class ActionResponse {
   private final List<HitWrapper> hits = new LinkedList<>();
   private final List<AggWrapper> aggregations = new LinkedList<>();
 
+
   public ActionResponse succeeded(boolean succeeded) {
     this.succeeded = succeeded;
     return this;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/AggWrapper.java
----------------------------------------------------------------------
diff --git a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/AggWrapper.java b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/AggWrapper.java
index 1c0bd92..a3ed951 100644
--- a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/AggWrapper.java
+++ b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/AggWrapper.java
@@ -17,13 +17,14 @@
 
 package org.apache.zeppelin.elasticsearch.action;
 
-/** Contains the result of an aggregation. */
+/**
+ * Contains the result of an aggregation.
+ */
 public class AggWrapper {
-  /** Type of an aggregation (to know if there are buckets or not). */
-  public enum AggregationType {
-    SIMPLE,
-    MULTI_BUCKETS
-  };
+  /**
+   * Type of an aggregation (to know if there are buckets or not).
+   */
+  public enum AggregationType { SIMPLE, MULTI_BUCKETS };
 
   private final AggregationType type;
   private final String result;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/HitWrapper.java
----------------------------------------------------------------------
diff --git a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/HitWrapper.java b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/HitWrapper.java
index 2175485..3be4514 100644
--- a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/HitWrapper.java
+++ b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/HitWrapper.java
@@ -21,7 +21,9 @@ import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
 
-/** Contains the data of a hit. */
+/**
+ * Contains the data of a hit.
+ */
 public class HitWrapper {
 
   private final JsonParser parser = new JsonParser();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/client/ElasticsearchClient.java
----------------------------------------------------------------------
diff --git a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/client/ElasticsearchClient.java b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/client/ElasticsearchClient.java
index 36423ab..48e1980 100644
--- a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/client/ElasticsearchClient.java
+++ b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/client/ElasticsearchClient.java
@@ -19,7 +19,9 @@ package org.apache.zeppelin.elasticsearch.client;
 
 import org.apache.zeppelin.elasticsearch.action.ActionResponse;
 
-/** Interface that must be implemented by any kind of Elasticsearch client (transport, ...). */
+/**
+ * Interface that must be implemented by any kind of Elasticsearch client (transport, ...).
+ */
 public interface ElasticsearchClient {
 
   ActionResponse get(String index, String type, String id);


[29/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
index 1188651..11e6bdb 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
@@ -19,22 +19,6 @@ package org.apache.zeppelin.interpreter.remote;
 
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
 import org.apache.thrift.TException;
 import org.apache.thrift.protocol.TBinaryProtocol;
 import org.apache.thrift.protocol.TProtocol;
@@ -89,8 +73,29 @@ import org.apache.zeppelin.user.AuthenticationInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Entry point for Interpreter process. Accepting thrift connections from ZeppelinServer. */
-public class RemoteInterpreterServer extends Thread implements RemoteInterpreterService.Iface {
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ * Entry point for Interpreter process.
+ * Accepting thrift connections from ZeppelinServer.
+ */
+public class RemoteInterpreterServer extends Thread
+    implements RemoteInterpreterService.Iface {
 
   private static Logger logger = LoggerFactory.getLogger(RemoteInterpreterServer.class);
 
@@ -123,21 +128,19 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
 
   private boolean isTest;
 
-  public RemoteInterpreterServer(
-      String intpEventServerHost,
-      int intpEventServerPort,
-      String interpreterGroupId,
-      String portRange)
+  public RemoteInterpreterServer(String intpEventServerHost,
+                                 int intpEventServerPort,
+                                 String interpreterGroupId,
+                                 String portRange)
       throws IOException, TTransportException {
     this(intpEventServerHost, intpEventServerPort, portRange, interpreterGroupId, false);
   }
 
-  public RemoteInterpreterServer(
-      String intpEventServerHost,
-      int intpEventServerPort,
-      String portRange,
-      String interpreterGroupId,
-      boolean isTest)
+  public RemoteInterpreterServer(String intpEventServerHost,
+                                 int intpEventServerPort,
+                                 String portRange,
+                                 String interpreterGroupId,
+                                 boolean isTest)
       throws TTransportException, IOException {
     if (null != intpEventServerHost) {
       this.intpEventServerHost = intpEventServerHost;
@@ -166,8 +169,8 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
       this.host = RemoteInterpreterUtils.findAvailableHostAddress();
       logger.info("Launching ThriftServer at " + this.host + ":" + this.port);
     }
-    server =
-        new TThreadPoolServer(new TThreadPoolServer.Args(serverTransport).processor(processor));
+    server = new TThreadPoolServer(
+        new TThreadPoolServer.Args(serverTransport).processor(processor));
     logger.info("Starting remote interpreter server on port {}", port);
     remoteWorksResponsePool = Collections.synchronizedMap(new HashMap<String, Object>());
   }
@@ -175,36 +178,34 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
   @Override
   public void run() {
     if (null != intpEventServerHost && !isTest) {
-      new Thread(
-              new Runnable() {
-                boolean interrupted = false;
-
-                @Override
-                public void run() {
-                  while (!interrupted && !server.isServing()) {
-                    try {
-                      Thread.sleep(1000);
-                    } catch (InterruptedException e) {
-                      interrupted = true;
-                    }
-                  }
-
-                  if (!interrupted) {
-                    RegisterInfo registerInfo = new RegisterInfo(host, port, interpreterGroupId);
-                    try {
-                      intpEventServiceClient.registerInterpreterProcess(registerInfo);
-                    } catch (TException e) {
-                      logger.error("Error while registering interpreter: {}", registerInfo, e);
-                      try {
-                        shutdown();
-                      } catch (TException e1) {
-                        logger.warn("Exception occurs while shutting down", e1);
-                      }
-                    }
-                  }
-                }
-              })
-          .start();
+      new Thread(new Runnable() {
+        boolean interrupted = false;
+
+        @Override
+        public void run() {
+          while (!interrupted && !server.isServing()) {
+            try {
+              Thread.sleep(1000);
+            } catch (InterruptedException e) {
+              interrupted = true;
+            }
+          }
+
+          if (!interrupted) {
+            RegisterInfo registerInfo = new RegisterInfo(host, port, interpreterGroupId);
+            try {
+              intpEventServiceClient.registerInterpreterProcess(registerInfo);
+            } catch (TException e) {
+              logger.error("Error while registering interpreter: {}", registerInfo, e);
+              try {
+                shutdown();
+              } catch (TException e1) {
+                logger.warn("Exception occurs while shutting down", e1);
+              }
+            }
+          }
+        }
+      }).start();
     }
     server.serve();
   }
@@ -231,8 +232,8 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
     // this case, need to force kill the process
 
     long startTime = System.currentTimeMillis();
-    while (System.currentTimeMillis() - startTime < DEFAULT_SHUTDOWN_TIMEOUT
-        && server.isServing()) {
+    while (System.currentTimeMillis() - startTime < DEFAULT_SHUTDOWN_TIMEOUT &&
+        server.isServing()) {
       try {
         Thread.sleep(300);
       } catch (InterruptedException e) {
@@ -257,6 +258,7 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
     }
   }
 
+
   public static void main(String[] args)
       throws TTransportException, InterruptedException, IOException {
     String zeppelinServerHost = null;
@@ -279,13 +281,8 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
   }
 
   @Override
-  public void createInterpreter(
-      String interpreterGroupId,
-      String sessionId,
-      String className,
-      Map<String, String> properties,
-      String userName)
-      throws TException {
+  public void createInterpreter(String interpreterGroupId, String sessionId, String
+      className, Map<String, String> properties, String userName) throws TException {
     if (interpreterGroup == null) {
       interpreterGroup = new InterpreterGroup(interpreterGroupId);
       angularObjectRegistry = new AngularObjectRegistry(interpreterGroup.getId(), intpEventClient);
@@ -298,8 +295,8 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
 
       String localRepoPath = properties.get("zeppelin.interpreter.localRepo");
       if (properties.containsKey("zeppelin.interpreter.output.limit")) {
-        InterpreterOutput.limit =
-            Integer.parseInt(properties.get("zeppelin.interpreter.output.limit"));
+        InterpreterOutput.limit = Integer.parseInt(
+            properties.get("zeppelin.interpreter.output.limit"));
       }
 
       depLoader = new DependencyResolver(localRepoPath);
@@ -313,21 +310,17 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
       setSystemProperty(p);
 
       Constructor<Interpreter> constructor =
-          replClass.getConstructor(new Class[] {Properties.class});
+          replClass.getConstructor(new Class[]{Properties.class});
       Interpreter repl = constructor.newInstance(p);
-      repl.setClassloaderUrls(new URL[] {});
+      repl.setClassloaderUrls(new URL[]{});
       logger.info("Instantiate interpreter {}", className);
       repl.setInterpreterGroup(interpreterGroup);
       repl.setUserName(userName);
 
       interpreterGroup.addInterpreterToSession(new LazyOpenInterpreter(repl), sessionId);
-    } catch (ClassNotFoundException
-        | NoSuchMethodException
-        | SecurityException
-        | InstantiationException
-        | IllegalAccessException
-        | IllegalArgumentException
-        | InvocationTargetException e) {
+    } catch (ClassNotFoundException | NoSuchMethodException | SecurityException
+        | InstantiationException | IllegalAccessException
+        | IllegalArgumentException | InvocationTargetException e) {
       logger.error(e.toString(), e);
       throw new TException(e);
     }
@@ -375,8 +368,8 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
         }
       }
     }
-    throw new TException(
-        new InterpreterException("Interpreter instance " + className + " not found"));
+    throw new TException(new InterpreterException("Interpreter instance "
+        + className + " not found"));
   }
 
   @Override
@@ -431,9 +424,10 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
     }
   }
 
+
   @Override
-  public RemoteInterpreterResult interpret(
-      String sessionId, String className, String st, RemoteInterpreterContext interpreterContext)
+  public RemoteInterpreterResult interpret(String sessionId, String className, String st,
+                                           RemoteInterpreterContext interpreterContext)
       throws TException {
     if (logger.isDebugEnabled()) {
       logger.debug("st:\n{}", st);
@@ -444,14 +438,13 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
 
     Scheduler scheduler = intp.getScheduler();
     InterpretJobListener jobListener = new InterpretJobListener();
-    InterpretJob job =
-        new InterpretJob(
-            interpreterContext.getParagraphId(),
-            "RemoteInterpretJob_" + System.currentTimeMillis(),
-            jobListener,
-            intp,
-            st,
-            context);
+    InterpretJob job = new InterpretJob(
+        interpreterContext.getParagraphId(),
+        "RemoteInterpretJob_" + System.currentTimeMillis(),
+        jobListener,
+        intp,
+        st,
+        context);
     scheduler.submit(job);
 
     while (!job.isTerminated()) {
@@ -466,18 +459,22 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
 
     progressMap.remove(interpreterContext.getParagraphId());
 
-    InterpreterResult result = (InterpreterResult) job.getReturn();
+    InterpreterResult  result = (InterpreterResult) job.getReturn();
     // in case of job abort in PENDING status, result can be null
     if (result == null) {
       result = new InterpreterResult(Code.KEEP_PREVIOUS_RESULT);
     }
-    return convert(result, context.getConfig(), context.getGui(), context.getNoteGui());
+    return convert(result,
+        context.getConfig(),
+        context.getGui(),
+        context.getNoteGui());
   }
-
+  
   class InterpretJobListener implements JobListener {
 
     @Override
-    public void onProgressUpdate(Job job, int progress) {}
+    public void onProgressUpdate(Job job, int progress) {
+    }
 
     @Override
     public void onStatusChange(Job job, Status before, Status after) {
@@ -489,6 +486,7 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
 
   public static class InterpretJob extends Job<InterpreterResult> {
 
+
     private Interpreter interpreter;
     private String script;
     private InterpreterContext context;
@@ -527,40 +525,39 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
     }
 
     private void processInterpreterHooks(final String noteId) {
-      InterpreterHookListener hookListener =
-          new InterpreterHookListener() {
-            @Override
-            public void onPreExecute(String script) {
-              String cmdDev = interpreter.getHook(noteId, HookType.PRE_EXEC_DEV.getName());
-              String cmdUser = interpreter.getHook(noteId, HookType.PRE_EXEC.getName());
-
-              // User defined hook should be executed before dev hook
-              List<String> cmds = Arrays.asList(cmdDev, cmdUser);
-              for (String cmd : cmds) {
-                if (cmd != null) {
-                  script = cmd + '\n' + script;
-                }
-              }
-
-              InterpretJob.this.script = script;
+      InterpreterHookListener hookListener = new InterpreterHookListener() {
+        @Override
+        public void onPreExecute(String script) {
+          String cmdDev = interpreter.getHook(noteId, HookType.PRE_EXEC_DEV.getName());
+          String cmdUser = interpreter.getHook(noteId, HookType.PRE_EXEC.getName());
+
+          // User defined hook should be executed before dev hook
+          List<String> cmds = Arrays.asList(cmdDev, cmdUser);
+          for (String cmd : cmds) {
+            if (cmd != null) {
+              script = cmd + '\n' + script;
             }
+          }
 
-            @Override
-            public void onPostExecute(String script) {
-              String cmdDev = interpreter.getHook(noteId, HookType.POST_EXEC_DEV.getName());
-              String cmdUser = interpreter.getHook(noteId, HookType.POST_EXEC.getName());
-
-              // User defined hook should be executed after dev hook
-              List<String> cmds = Arrays.asList(cmdUser, cmdDev);
-              for (String cmd : cmds) {
-                if (cmd != null) {
-                  script += '\n' + cmd;
-                }
-              }
+          InterpretJob.this.script = script;
+        }
+
+        @Override
+        public void onPostExecute(String script) {
+          String cmdDev = interpreter.getHook(noteId, HookType.POST_EXEC_DEV.getName());
+          String cmdUser = interpreter.getHook(noteId, HookType.POST_EXEC.getName());
 
-              InterpretJob.this.script = script;
+          // User defined hook should be executed after dev hook
+          List<String> cmds = Arrays.asList(cmdUser, cmdDev);
+          for (String cmd : cmds) {
+            if (cmd != null) {
+              script += '\n' + cmd;
             }
-          };
+          }
+
+          InterpretJob.this.script = script;
+        }
+      };
       hookListener.onPreExecute(script);
       hookListener.onPostExecute(script);
     }
@@ -613,13 +610,11 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
         if (resultMessages.size() > 0) {
           int lastMessageIndex = resultMessages.size() - 1;
           if (resultMessages.get(lastMessageIndex).getType() == InterpreterResult.Type.TABLE) {
-            context
-                .getResourcePool()
-                .put(
-                    context.getNoteId(),
-                    context.getParagraphId(),
-                    WellKnownResourceName.ZeppelinTableResult.toString(),
-                    resultMessages.get(lastMessageIndex));
+            context.getResourcePool().put(
+                context.getNoteId(),
+                context.getParagraphId(),
+                WellKnownResourceName.ZeppelinTableResult.toString(),
+                resultMessages.get(lastMessageIndex));
           }
         }
         return new InterpreterResult(result.code(), resultMessages);
@@ -640,10 +635,11 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
     }
   }
 
+
   @Override
-  public void cancel(
-      String sessionId, String className, RemoteInterpreterContext interpreterContext)
-      throws TException {
+  public void cancel(String sessionId,
+                     String className,
+                     RemoteInterpreterContext interpreterContext) throws TException {
     logger.info("cancel {} {}", className, interpreterContext.getParagraphId());
     Interpreter intp = getInterpreter(sessionId, className);
     String jobId = interpreterContext.getParagraphId();
@@ -661,8 +657,8 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
   }
 
   @Override
-  public int getProgress(
-      String sessionId, String className, RemoteInterpreterContext interpreterContext)
+  public int getProgress(String sessionId, String className,
+                         RemoteInterpreterContext interpreterContext)
       throws TException {
     Integer manuallyProvidedProgress = progressMap.get(interpreterContext.getParagraphId());
     if (manuallyProvidedProgress != null) {
@@ -670,8 +666,8 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
     } else {
       Interpreter intp = getInterpreter(sessionId, className);
       if (intp == null) {
-        throw new TException(
-            "No interpreter {} existed for session {}".format(className, sessionId));
+        throw new TException("No interpreter {} existed for session {}".format(
+            className, sessionId));
       }
       try {
         return intp.getProgress(convert(interpreterContext, null));
@@ -681,6 +677,7 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
     }
   }
 
+
   @Override
   public String getFormType(String sessionId, String className) throws TException {
     Interpreter intp = getInterpreter(sessionId, className);
@@ -692,12 +689,11 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String sessionId,
-      String className,
-      String buf,
-      int cursor,
-      RemoteInterpreterContext remoteInterpreterContext)
+  public List<InterpreterCompletion> completion(String sessionId,
+                                                String className,
+                                                String buf,
+                                                int cursor,
+                                                RemoteInterpreterContext remoteInterpreterContext)
       throws TException {
     Interpreter intp = getInterpreter(sessionId, className);
     try {
@@ -722,8 +718,8 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
         .setLocalProperties(ric.getLocalProperties())
         .setAuthenticationInfo(AuthenticationInfo.fromJson(ric.getAuthenticationInfo()))
         .setGUI(GUI.fromJson(ric.getGui()))
-        .setConfig(
-            gson.fromJson(ric.getConfig(), new TypeToken<Map<String, Object>>() {}.getType()))
+        .setConfig(gson.fromJson(ric.getConfig(),
+                   new TypeToken<Map<String, Object>>() {}.getType()))
         .setNoteGUI(GUI.fromJson(ric.getNoteGui()))
         .setAngularObjectRegistry(interpreterGroup.getAngularObjectRegistry())
         .setResourcePool(interpreterGroup.getResourcePool())
@@ -733,56 +729,64 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
         .build();
   }
 
-  protected InterpreterOutput createInterpreterOutput(
-      final String noteId, final String paragraphId) {
-    return new InterpreterOutput(
-        new InterpreterOutputListener() {
-          @Override
-          public void onUpdateAll(InterpreterOutput out) {
-            try {
-              intpEventClient.onInterpreterOutputUpdateAll(
-                  noteId, paragraphId, out.toInterpreterResultMessage());
-            } catch (IOException e) {
-              logger.error(e.getMessage(), e);
-            }
-          }
 
-          @Override
-          public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
-            String output = new String(line);
-            logger.debug("Output Append: {}", output);
-            intpEventClient.onInterpreterOutputAppend(noteId, paragraphId, index, output);
-          }
+  protected InterpreterOutput createInterpreterOutput(final String noteId, final String
+      paragraphId) {
+    return new InterpreterOutput(new InterpreterOutputListener() {
+      @Override
+      public void onUpdateAll(InterpreterOutput out) {
+        try {
+          intpEventClient.onInterpreterOutputUpdateAll(
+              noteId, paragraphId, out.toInterpreterResultMessage());
+        } catch (IOException e) {
+          logger.error(e.getMessage(), e);
+        }
+      }
 
-          @Override
-          public void onUpdate(int index, InterpreterResultMessageOutput out) {
-            String output;
-            try {
-              output = new String(out.toByteArray());
-              logger.debug("Output Update for index {}: {}", index, output);
-              intpEventClient.onInterpreterOutputUpdate(
-                  noteId, paragraphId, index, out.getType(), output);
-            } catch (IOException e) {
-              logger.error(e.getMessage(), e);
-            }
-          }
-        });
+      @Override
+      public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
+        String output = new String(line);
+        logger.debug("Output Append: {}", output);
+        intpEventClient.onInterpreterOutputAppend(
+            noteId, paragraphId, index, output);
+      }
+
+      @Override
+      public void onUpdate(int index, InterpreterResultMessageOutput out) {
+        String output;
+        try {
+          output = new String(out.toByteArray());
+          logger.debug("Output Update for index {}: {}", index, output);
+          intpEventClient.onInterpreterOutputUpdate(
+              noteId, paragraphId, index, out.getType(), output);
+        } catch (IOException e) {
+          logger.error(e.getMessage(), e);
+        }
+      }
+    });
   }
 
-  private RemoteInterpreterResult convert(
-      InterpreterResult result, Map<String, Object> config, GUI gui, GUI noteGui) {
+  private RemoteInterpreterResult convert(InterpreterResult result,
+                                          Map<String, Object> config, GUI gui, GUI noteGui) {
 
     List<RemoteInterpreterResultMessage> msg = new LinkedList<>();
     for (InterpreterResultMessage m : result.message()) {
-      msg.add(new RemoteInterpreterResultMessage(m.getType().name(), m.getData()));
+      msg.add(new RemoteInterpreterResultMessage(
+          m.getType().name(),
+          m.getData()));
     }
 
     return new RemoteInterpreterResult(
-        result.code().name(), msg, gson.toJson(config), gui.toJson(), noteGui.toJson());
+        result.code().name(),
+        msg,
+        gson.toJson(config),
+        gui.toJson(),
+        noteGui.toJson());
   }
 
   @Override
-  public String getStatus(String sessionId, String jobId) throws TException {
+  public String getStatus(String sessionId, String jobId)
+      throws TException {
     if (interpreterGroup == null) {
       return Status.UNKNOWN.name();
     }
@@ -793,7 +797,7 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
         logger.info("getStatus:" + Status.UNKNOWN.name());
         return Status.UNKNOWN.name();
       }
-      // TODO(zjffdu) ineffient for loop interpreter and its jobs
+      //TODO(zjffdu) ineffient for loop interpreter and its jobs
       for (Interpreter intp : interpreters) {
         for (Job job : intp.getScheduler().getJobsRunning()) {
           if (jobId.equals(job.getId())) {
@@ -818,7 +822,7 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
    * called when object is updated in client (web) side.
    *
    * @param name
-   * @param noteId noteId where the update issues
+   * @param noteId      noteId where the update issues
    * @param paragraphId paragraphId where the update issues
    * @param object
    * @throws TException
@@ -841,7 +845,7 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
 
     Object oldObject = ao.get();
     Object value = null;
-    if (oldObject != null) { // first try with previous object's type
+    if (oldObject != null) {  // first try with previous object's type
       try {
         value = gson.fromJson(object, oldObject.getClass());
         ao.set(value, false);
@@ -855,7 +859,9 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
     // Generic java object type for json.
     if (value == null) {
       try {
-        value = gson.fromJson(object, new TypeToken<Map<String, Object>>() {}.getType());
+        value = gson.fromJson(object,
+            new TypeToken<Map<String, Object>>() {
+            }.getType());
       } catch (Exception e) {
         // it's not a generic json object, too. okay, proceed to threat as a string type
         logger.debug(e.getMessage(), e);
@@ -871,7 +877,8 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
   }
 
   /**
-   * When zeppelinserver initiate angular object add. Dont't need to emit event to zeppelin server
+   * When zeppelinserver initiate angular object add.
+   * Dont't need to emit event to zeppelin server
    */
   @Override
   public void angularObjectAdd(String name, String noteId, String paragraphId, String object)
@@ -887,7 +894,9 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
     // Generic java object type for json.
     Object value = null;
     try {
-      value = gson.fromJson(object, new TypeToken<Map<String, Object>>() {}.getType());
+      value = gson.fromJson(object,
+          new TypeToken<Map<String, Object>>() {
+          }.getType());
     } catch (Exception e) {
       // it's okay. proceed to treat object as a string
       logger.debug(e.getMessage(), e);
@@ -902,8 +911,8 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
   }
 
   @Override
-  public void angularObjectRemove(String name, String noteId, String paragraphId)
-      throws TException {
+  public void angularObjectRemove(String name, String noteId, String paragraphId) throws
+      TException {
     AngularObjectRegistry registry = interpreterGroup.getAngularObjectRegistry();
     registry.remove(name, noteId, paragraphId, false);
   }
@@ -962,13 +971,19 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
     } else {
       try {
         Object o = resource.get();
-        Method method = o.getClass().getMethod(message.methodName, message.getParamTypes());
+        Method method = o.getClass().getMethod(
+            message.methodName,
+            message.getParamTypes());
         Object ret = method.invoke(o, message.params);
         if (message.shouldPutResultIntoResourcePool()) {
           // if return resource name is specified,
           // then put result into resource pool
           // and return empty byte buffer
-          resourcePool.put(noteId, paragraphId, message.returnResourceName, ret);
+          resourcePool.put(
+              noteId,
+              paragraphId,
+              message.returnResourceName,
+              ret);
           return ByteBuffer.allocate(0);
         } else {
           // if return resource name is not specified,
@@ -1015,38 +1030,41 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
   @Override
   public void angularRegistryPush(String registryAsString) throws TException {
     try {
-      Map<String, Map<String, AngularObject>> deserializedRegistry =
-          gson.fromJson(
-              registryAsString,
-              new TypeToken<Map<String, Map<String, AngularObject>>>() {}.getType());
+      Map<String, Map<String, AngularObject>> deserializedRegistry = gson
+          .fromJson(registryAsString,
+              new TypeToken<Map<String, Map<String, AngularObject>>>() {
+              }.getType());
       interpreterGroup.getAngularObjectRegistry().setRegistry(deserializedRegistry);
     } catch (Exception e) {
       logger.info("Exception in RemoteInterpreterServer while angularRegistryPush, nolock", e);
     }
   }
 
-  protected InterpreterOutput createAppOutput(
-      final String noteId, final String paragraphId, final String appId) {
-    return new InterpreterOutput(
-        new InterpreterOutputListener() {
-          @Override
-          public void onUpdateAll(InterpreterOutput out) {}
+  protected InterpreterOutput createAppOutput(final String noteId,
+                                              final String paragraphId,
+                                              final String appId) {
+    return new InterpreterOutput(new InterpreterOutputListener() {
+      @Override
+      public void onUpdateAll(InterpreterOutput out) {
 
-          @Override
-          public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
-            intpEventClient.onAppOutputAppend(noteId, paragraphId, index, appId, new String(line));
-          }
+      }
+
+      @Override
+      public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
+        intpEventClient.onAppOutputAppend(noteId, paragraphId, index, appId, new String(line));
+      }
+
+      @Override
+      public void onUpdate(int index, InterpreterResultMessageOutput out) {
+        try {
+          intpEventClient.onAppOutputUpdate(noteId, paragraphId, index, appId,
+              out.getType(), new String(out.toByteArray()));
+        } catch (IOException e) {
+          logger.error(e.getMessage(), e);
+        }
+      }
+    });
 
-          @Override
-          public void onUpdate(int index, InterpreterResultMessageOutput out) {
-            try {
-              intpEventClient.onAppOutputUpdate(
-                  noteId, paragraphId, index, appId, out.getType(), new String(out.toByteArray()));
-            } catch (IOException e) {
-              logger.error(e.getMessage(), e);
-            }
-          }
-        });
   }
 
   private ApplicationContext getApplicationContext(
@@ -1069,8 +1087,8 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
       return new RemoteApplicationResult(true, "");
     }
     HeliumPackage pkgInfo = HeliumPackage.fromJson(packageInfo);
-    ApplicationContext context =
-        getApplicationContext(pkgInfo, noteId, paragraphId, applicationInstanceId);
+    ApplicationContext context = getApplicationContext(
+        pkgInfo, noteId, paragraphId, applicationInstanceId);
     try {
       Application app = null;
       logger.info(
@@ -1083,7 +1101,8 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
           paragraphId);
       app = appLoader.load(pkgInfo, context);
       runningApplications.put(
-          applicationInstanceId, new RunningApplication(pkgInfo, app, noteId, paragraphId));
+          applicationInstanceId,
+          new RunningApplication(pkgInfo, app, noteId, paragraphId));
       return new RemoteApplicationResult(true, "");
     } catch (Exception e) {
       logger.error(e.getMessage(), e);
@@ -1092,7 +1111,8 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
   }
 
   @Override
-  public RemoteApplicationResult unloadApplication(String applicationInstanceId) throws TException {
+  public RemoteApplicationResult unloadApplication(String applicationInstanceId)
+      throws TException {
     RunningApplication runningApplication = runningApplications.remove(applicationInstanceId);
     if (runningApplication != null) {
       try {
@@ -1107,7 +1127,8 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
   }
 
   @Override
-  public RemoteApplicationResult runApplication(String applicationInstanceId) throws TException {
+  public RemoteApplicationResult runApplication(String applicationInstanceId)
+      throws TException {
     logger.info("run application {}", applicationInstanceId);
 
     RunningApplication runningApp = runningApplications.get(applicationInstanceId);
@@ -1119,9 +1140,10 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
       try {
         context.out.clear();
         context.out.setType(InterpreterResult.Type.ANGULAR);
-        ResourceSet resource =
-            appLoader.findRequiredResourceSet(
-                runningApp.pkg.getResources(), context.getNoteId(), context.getParagraphId());
+        ResourceSet resource = appLoader.findRequiredResourceSet(
+            runningApp.pkg.getResources(),
+            context.getNoteId(),
+            context.getParagraphId());
         for (Resource res : resource) {
           System.err.println("Resource " + res.get());
         }
@@ -1148,11 +1170,16 @@ public class RemoteInterpreterServer extends Thread implements RemoteInterpreter
     public final String noteId;
     public final String paragraphId;
 
-    RunningApplication(HeliumPackage pkg, Application app, String noteId, String paragraphId) {
+    RunningApplication(HeliumPackage pkg,
+                              Application app,
+                              String noteId,
+                              String paragraphId) {
       this.app = app;
       this.pkg = pkg;
       this.noteId = noteId;
       this.paragraphId = paragraphId;
     }
-  };
+  }
+
+  ;
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterUtils.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterUtils.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterUtils.java
index 94f9447..cf82247 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterUtils.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterUtils.java
@@ -17,6 +17,12 @@
 
 package org.apache.zeppelin.interpreter.remote;
 
+import org.apache.commons.lang.StringUtils;
+import org.apache.thrift.transport.TServerSocket;
+import org.apache.thrift.transport.TTransportException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.IOException;
 import java.net.ConnectException;
 import java.net.Inet4Address;
@@ -29,19 +35,17 @@ import java.net.Socket;
 import java.net.SocketException;
 import java.net.UnknownHostException;
 import java.util.Collections;
-import org.apache.commons.lang.StringUtils;
-import org.apache.thrift.transport.TServerSocket;
-import org.apache.thrift.transport.TTransportException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** */
+/**
+ *
+ */
 public class RemoteInterpreterUtils {
   static Logger LOGGER = LoggerFactory.getLogger(RemoteInterpreterUtils.class);
 
+
   public static int findRandomAvailablePortOnAllLocalInterfaces() throws IOException {
     int port;
-    try (ServerSocket socket = new ServerSocket(0); ) {
+    try (ServerSocket socket = new ServerSocket(0);) {
       port = socket.getLocalPort();
       socket.close();
     }
@@ -55,7 +59,8 @@ public class RemoteInterpreterUtils {
    * @return
    * @throws IOException
    */
-  public static TServerSocket createTServerSocket(String portRange) throws IOException {
+  public static TServerSocket createTServerSocket(String portRange)
+      throws IOException {
 
     TServerSocket tSocket = null;
     // ':' is the default value which means no constraints on the portRange
@@ -91,8 +96,8 @@ public class RemoteInterpreterUtils {
   public static String findAvailableHostAddress() throws UnknownHostException, SocketException {
     InetAddress address = InetAddress.getLocalHost();
     if (address.isLoopbackAddress()) {
-      for (NetworkInterface networkInterface :
-          Collections.list(NetworkInterface.getNetworkInterfaces())) {
+      for (NetworkInterface networkInterface : Collections
+          .list(NetworkInterface.getNetworkInterfaces())) {
         if (!networkInterface.isLoopback()) {
           for (InterfaceAddress interfaceAddress : networkInterface.getInterfaceAddresses()) {
             InetAddress a = interfaceAddress.getAddress();
@@ -116,27 +121,15 @@ public class RemoteInterpreterUtils {
     } catch (ConnectException cne) {
       // end point is not accessible
       if (LOGGER.isDebugEnabled()) {
-        LOGGER.debug(
-            "Remote endpoint '"
-                + host
-                + ":"
-                + port
-                + "' is not accessible "
-                + "(might be initializing): "
-                + cne.getMessage());
+        LOGGER.debug("Remote endpoint '" + host + ":" + port + "' is not accessible " +
+            "(might be initializing): " + cne.getMessage());
       }
       return false;
     } catch (IOException ioe) {
       // end point is not accessible
       if (LOGGER.isDebugEnabled()) {
-        LOGGER.debug(
-            "Remote endpoint '"
-                + host
-                + ":"
-                + port
-                + "' is not accessible "
-                + "(might be initializing): "
-                + ioe.getMessage());
+        LOGGER.debug("Remote endpoint '" + host + ":" + port + "' is not accessible " +
+            "(might be initializing): " + ioe.getMessage());
       }
       return false;
     }
@@ -158,4 +151,5 @@ public class RemoteInterpreterUtils {
 
     return key.matches("^[A-Z_0-9]*");
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AngularObjectId.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AngularObjectId.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AngularObjectId.java
index 0c295ef..b659d94 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AngularObjectId.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AngularObjectId.java
@@ -1,65 +1,65 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2018-8-9")
-public class AngularObjectId
-    implements org.apache.thrift.TBase<AngularObjectId, AngularObjectId._Fields>,
-        java.io.Serializable,
-        Cloneable,
-        Comparable<AngularObjectId> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
-      new org.apache.thrift.protocol.TStruct("AngularObjectId");
-
-  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "noteId", org.apache.thrift.protocol.TType.STRING, (short) 1);
-  private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "paragraphId", org.apache.thrift.protocol.TType.STRING, (short) 2);
-  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "name", org.apache.thrift.protocol.TType.STRING, (short) 3);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
-      new HashMap<Class<? extends IScheme>, SchemeFactory>();
+public class AngularObjectId implements org.apache.thrift.TBase<AngularObjectId, AngularObjectId._Fields>, java.io.Serializable, Cloneable, Comparable<AngularObjectId> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AngularObjectId");
+
+  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("noteId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("paragraphId", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
     schemes.put(StandardScheme.class, new AngularObjectIdStandardSchemeFactory());
     schemes.put(TupleScheme.class, new AngularObjectIdTupleSchemeFactory());
@@ -69,14 +69,11 @@ public class AngularObjectId
   public String paragraphId; // required
   public String name; // required
 
-  /**
-   * The set of fields this struct contains, along with convenience methods for finding and
-   * manipulating them.
-   */
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    NOTE_ID((short) 1, "noteId"),
-    PARAGRAPH_ID((short) 2, "paragraphId"),
-    NAME((short) 3, "name");
+    NOTE_ID((short)1, "noteId"),
+    PARAGRAPH_ID((short)2, "paragraphId"),
+    NAME((short)3, "name");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -86,9 +83,11 @@ public class AngularObjectId
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
     public static _Fields findByThriftId(int fieldId) {
-      switch (fieldId) {
+      switch(fieldId) {
         case 1: // NOTE_ID
           return NOTE_ID;
         case 2: // PARAGRAPH_ID
@@ -100,15 +99,19 @@ public class AngularObjectId
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null)
-        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
 
-    /** Find the _Fields constant that matches name, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
@@ -132,46 +135,35 @@ public class AngularObjectId
 
   // isset id assignments
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
-        new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(
-        _Fields.NOTE_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "noteId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.PARAGRAPH_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "paragraphId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.NAME,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "name",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.NOTE_ID, new org.apache.thrift.meta_data.FieldMetaData("noteId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PARAGRAPH_ID, new org.apache.thrift.meta_data.FieldMetaData("paragraphId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
-        AngularObjectId.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AngularObjectId.class, metaDataMap);
   }
 
-  public AngularObjectId() {}
+  public AngularObjectId() {
+  }
 
-  public AngularObjectId(String noteId, String paragraphId, String name) {
+  public AngularObjectId(
+    String noteId,
+    String paragraphId,
+    String name)
+  {
     this();
     this.noteId = noteId;
     this.paragraphId = paragraphId;
     this.name = name;
   }
 
-  /** Performs a deep copy on <i>other</i>. */
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
   public AngularObjectId(AngularObjectId other) {
     if (other.isSetNoteId()) {
       this.noteId = other.noteId;
@@ -269,95 +261,103 @@ public class AngularObjectId
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-      case NOTE_ID:
-        if (value == null) {
-          unsetNoteId();
-        } else {
-          setNoteId((String) value);
-        }
-        break;
+    case NOTE_ID:
+      if (value == null) {
+        unsetNoteId();
+      } else {
+        setNoteId((String)value);
+      }
+      break;
 
-      case PARAGRAPH_ID:
-        if (value == null) {
-          unsetParagraphId();
-        } else {
-          setParagraphId((String) value);
-        }
-        break;
+    case PARAGRAPH_ID:
+      if (value == null) {
+        unsetParagraphId();
+      } else {
+        setParagraphId((String)value);
+      }
+      break;
+
+    case NAME:
+      if (value == null) {
+        unsetName();
+      } else {
+        setName((String)value);
+      }
+      break;
 
-      case NAME:
-        if (value == null) {
-          unsetName();
-        } else {
-          setName((String) value);
-        }
-        break;
     }
   }
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-      case NOTE_ID:
-        return getNoteId();
+    case NOTE_ID:
+      return getNoteId();
+
+    case PARAGRAPH_ID:
+      return getParagraphId();
 
-      case PARAGRAPH_ID:
-        return getParagraphId();
+    case NAME:
+      return getName();
 
-      case NAME:
-        return getName();
     }
     throw new IllegalStateException();
   }
 
-  /**
-   * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
-   * otherwise
-   */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
     }
 
     switch (field) {
-      case NOTE_ID:
-        return isSetNoteId();
-      case PARAGRAPH_ID:
-        return isSetParagraphId();
-      case NAME:
-        return isSetName();
+    case NOTE_ID:
+      return isSetNoteId();
+    case PARAGRAPH_ID:
+      return isSetParagraphId();
+    case NAME:
+      return isSetName();
     }
     throw new IllegalStateException();
   }
 
   @Override
   public boolean equals(Object that) {
-    if (that == null) return false;
-    if (that instanceof AngularObjectId) return this.equals((AngularObjectId) that);
+    if (that == null)
+      return false;
+    if (that instanceof AngularObjectId)
+      return this.equals((AngularObjectId)that);
     return false;
   }
 
   public boolean equals(AngularObjectId that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
 
     boolean this_present_noteId = true && this.isSetNoteId();
     boolean that_present_noteId = true && that.isSetNoteId();
     if (this_present_noteId || that_present_noteId) {
-      if (!(this_present_noteId && that_present_noteId)) return false;
-      if (!this.noteId.equals(that.noteId)) return false;
+      if (!(this_present_noteId && that_present_noteId))
+        return false;
+      if (!this.noteId.equals(that.noteId))
+        return false;
     }
 
     boolean this_present_paragraphId = true && this.isSetParagraphId();
     boolean that_present_paragraphId = true && that.isSetParagraphId();
     if (this_present_paragraphId || that_present_paragraphId) {
-      if (!(this_present_paragraphId && that_present_paragraphId)) return false;
-      if (!this.paragraphId.equals(that.paragraphId)) return false;
+      if (!(this_present_paragraphId && that_present_paragraphId))
+        return false;
+      if (!this.paragraphId.equals(that.paragraphId))
+        return false;
     }
 
     boolean this_present_name = true && this.isSetName();
     boolean that_present_name = true && that.isSetName();
     if (this_present_name || that_present_name) {
-      if (!(this_present_name && that_present_name)) return false;
-      if (!this.name.equals(that.name)) return false;
+      if (!(this_present_name && that_present_name))
+        return false;
+      if (!this.name.equals(that.name))
+        return false;
     }
 
     return true;
@@ -369,15 +369,18 @@ public class AngularObjectId
 
     boolean present_noteId = true && (isSetNoteId());
     list.add(present_noteId);
-    if (present_noteId) list.add(noteId);
+    if (present_noteId)
+      list.add(noteId);
 
     boolean present_paragraphId = true && (isSetParagraphId());
     list.add(present_paragraphId);
-    if (present_paragraphId) list.add(paragraphId);
+    if (present_paragraphId)
+      list.add(paragraphId);
 
     boolean present_name = true && (isSetName());
     list.add(present_name);
-    if (present_name) list.add(name);
+    if (present_name)
+      list.add(name);
 
     return list.hashCode();
   }
@@ -431,8 +434,7 @@ public class AngularObjectId
     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
-  public void write(org.apache.thrift.protocol.TProtocol oprot)
-      throws org.apache.thrift.TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
@@ -475,20 +477,15 @@ public class AngularObjectId
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
     try {
-      write(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(out)));
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in)
-      throws java.io.IOException, ClassNotFoundException {
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
-      read(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(in)));
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
@@ -502,13 +499,13 @@ public class AngularObjectId
 
   private static class AngularObjectIdStandardScheme extends StandardScheme<AngularObjectId> {
 
-    public void read(org.apache.thrift.protocol.TProtocol iprot, AngularObjectId struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol iprot, AngularObjectId struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
       iprot.readStructBegin();
-      while (true) {
+      while (true)
+      {
         schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
           break;
         }
         switch (schemeField.id) {
@@ -516,7 +513,7 @@ public class AngularObjectId
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.noteId = iprot.readString();
               struct.setNoteIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -524,7 +521,7 @@ public class AngularObjectId
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.paragraphId = iprot.readString();
               struct.setParagraphIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -532,7 +529,7 @@ public class AngularObjectId
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.name = iprot.readString();
               struct.setNameIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -547,8 +544,7 @@ public class AngularObjectId
       struct.validate();
     }
 
-    public void write(org.apache.thrift.protocol.TProtocol oprot, AngularObjectId struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol oprot, AngularObjectId struct) throws org.apache.thrift.TException {
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
@@ -570,6 +566,7 @@ public class AngularObjectId
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
+
   }
 
   private static class AngularObjectIdTupleSchemeFactory implements SchemeFactory {
@@ -581,8 +578,7 @@ public class AngularObjectId
   private static class AngularObjectIdTupleScheme extends TupleScheme<AngularObjectId> {
 
     @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, AngularObjectId struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol prot, AngularObjectId struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
       if (struct.isSetNoteId()) {
@@ -607,8 +603,7 @@ public class AngularObjectId
     }
 
     @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, AngularObjectId struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol prot, AngularObjectId struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(3);
       if (incoming.get(0)) {
@@ -625,4 +620,6 @@ public class AngularObjectId
       }
     }
   }
+
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppOutputAppendEvent.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppOutputAppendEvent.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppOutputAppendEvent.java
index f806b29..c0ec91f 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppOutputAppendEvent.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppOutputAppendEvent.java
@@ -1,72 +1,67 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2018-8-9")
-public class AppOutputAppendEvent
-    implements org.apache.thrift.TBase<AppOutputAppendEvent, AppOutputAppendEvent._Fields>,
-        java.io.Serializable,
-        Cloneable,
-        Comparable<AppOutputAppendEvent> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
-      new org.apache.thrift.protocol.TStruct("AppOutputAppendEvent");
-
-  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "noteId", org.apache.thrift.protocol.TType.STRING, (short) 1);
-  private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "paragraphId", org.apache.thrift.protocol.TType.STRING, (short) 2);
-  private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "appId", org.apache.thrift.protocol.TType.STRING, (short) 3);
-  private static final org.apache.thrift.protocol.TField INDEX_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "index", org.apache.thrift.protocol.TType.I32, (short) 4);
-  private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "data", org.apache.thrift.protocol.TType.STRING, (short) 5);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
-      new HashMap<Class<? extends IScheme>, SchemeFactory>();
+public class AppOutputAppendEvent implements org.apache.thrift.TBase<AppOutputAppendEvent, AppOutputAppendEvent._Fields>, java.io.Serializable, Cloneable, Comparable<AppOutputAppendEvent> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AppOutputAppendEvent");
 
+  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("noteId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("paragraphId", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("appId", org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("index", org.apache.thrift.protocol.TType.I32, (short)4);
+  private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)5);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
     schemes.put(StandardScheme.class, new AppOutputAppendEventStandardSchemeFactory());
     schemes.put(TupleScheme.class, new AppOutputAppendEventTupleSchemeFactory());
@@ -78,16 +73,13 @@ public class AppOutputAppendEvent
   public int index; // required
   public String data; // required
 
-  /**
-   * The set of fields this struct contains, along with convenience methods for finding and
-   * manipulating them.
-   */
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    NOTE_ID((short) 1, "noteId"),
-    PARAGRAPH_ID((short) 2, "paragraphId"),
-    APP_ID((short) 3, "appId"),
-    INDEX((short) 4, "index"),
-    DATA((short) 5, "data");
+    NOTE_ID((short)1, "noteId"),
+    PARAGRAPH_ID((short)2, "paragraphId"),
+    APP_ID((short)3, "appId"),
+    INDEX((short)4, "index"),
+    DATA((short)5, "data");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -97,9 +89,11 @@ public class AppOutputAppendEvent
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
     public static _Fields findByThriftId(int fieldId) {
-      switch (fieldId) {
+      switch(fieldId) {
         case 1: // NOTE_ID
           return NOTE_ID;
         case 2: // PARAGRAPH_ID
@@ -115,15 +109,19 @@ public class AppOutputAppendEvent
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null)
-        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
 
-    /** Find the _Fields constant that matches name, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
@@ -149,54 +147,32 @@ public class AppOutputAppendEvent
   private static final int __INDEX_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
-        new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(
-        _Fields.NOTE_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "noteId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.PARAGRAPH_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "paragraphId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.APP_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "appId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.INDEX,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "index",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.I32)));
-    tmpMap.put(
-        _Fields.DATA,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "data",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.NOTE_ID, new org.apache.thrift.meta_data.FieldMetaData("noteId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PARAGRAPH_ID, new org.apache.thrift.meta_data.FieldMetaData("paragraphId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.APP_ID, new org.apache.thrift.meta_data.FieldMetaData("appId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.INDEX, new org.apache.thrift.meta_data.FieldMetaData("index", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
-        AppOutputAppendEvent.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AppOutputAppendEvent.class, metaDataMap);
   }
 
-  public AppOutputAppendEvent() {}
+  public AppOutputAppendEvent() {
+  }
 
   public AppOutputAppendEvent(
-      String noteId, String paragraphId, String appId, int index, String data) {
+    String noteId,
+    String paragraphId,
+    String appId,
+    int index,
+    String data)
+  {
     this();
     this.noteId = noteId;
     this.paragraphId = paragraphId;
@@ -206,7 +182,9 @@ public class AppOutputAppendEvent
     this.data = data;
   }
 
-  /** Performs a deep copy on <i>other</i>. */
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
   public AppOutputAppendEvent(AppOutputAppendEvent other) {
     __isset_bitfield = other.__isset_bitfield;
     if (other.isSetNoteId()) {
@@ -359,135 +337,147 @@ public class AppOutputAppendEvent
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-      case NOTE_ID:
-        if (value == null) {
-          unsetNoteId();
-        } else {
-          setNoteId((String) value);
-        }
-        break;
+    case NOTE_ID:
+      if (value == null) {
+        unsetNoteId();
+      } else {
+        setNoteId((String)value);
+      }
+      break;
 
-      case PARAGRAPH_ID:
-        if (value == null) {
-          unsetParagraphId();
-        } else {
-          setParagraphId((String) value);
-        }
-        break;
+    case PARAGRAPH_ID:
+      if (value == null) {
+        unsetParagraphId();
+      } else {
+        setParagraphId((String)value);
+      }
+      break;
 
-      case APP_ID:
-        if (value == null) {
-          unsetAppId();
-        } else {
-          setAppId((String) value);
-        }
-        break;
+    case APP_ID:
+      if (value == null) {
+        unsetAppId();
+      } else {
+        setAppId((String)value);
+      }
+      break;
 
-      case INDEX:
-        if (value == null) {
-          unsetIndex();
-        } else {
-          setIndex((Integer) value);
-        }
-        break;
+    case INDEX:
+      if (value == null) {
+        unsetIndex();
+      } else {
+        setIndex((Integer)value);
+      }
+      break;
+
+    case DATA:
+      if (value == null) {
+        unsetData();
+      } else {
+        setData((String)value);
+      }
+      break;
 
-      case DATA:
-        if (value == null) {
-          unsetData();
-        } else {
-          setData((String) value);
-        }
-        break;
     }
   }
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-      case NOTE_ID:
-        return getNoteId();
+    case NOTE_ID:
+      return getNoteId();
 
-      case PARAGRAPH_ID:
-        return getParagraphId();
+    case PARAGRAPH_ID:
+      return getParagraphId();
 
-      case APP_ID:
-        return getAppId();
+    case APP_ID:
+      return getAppId();
 
-      case INDEX:
-        return Integer.valueOf(getIndex());
+    case INDEX:
+      return Integer.valueOf(getIndex());
+
+    case DATA:
+      return getData();
 
-      case DATA:
-        return getData();
     }
     throw new IllegalStateException();
   }
 
-  /**
-   * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
-   * otherwise
-   */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
     }
 
     switch (field) {
-      case NOTE_ID:
-        return isSetNoteId();
-      case PARAGRAPH_ID:
-        return isSetParagraphId();
-      case APP_ID:
-        return isSetAppId();
-      case INDEX:
-        return isSetIndex();
-      case DATA:
-        return isSetData();
+    case NOTE_ID:
+      return isSetNoteId();
+    case PARAGRAPH_ID:
+      return isSetParagraphId();
+    case APP_ID:
+      return isSetAppId();
+    case INDEX:
+      return isSetIndex();
+    case DATA:
+      return isSetData();
     }
     throw new IllegalStateException();
   }
 
   @Override
   public boolean equals(Object that) {
-    if (that == null) return false;
-    if (that instanceof AppOutputAppendEvent) return this.equals((AppOutputAppendEvent) that);
+    if (that == null)
+      return false;
+    if (that instanceof AppOutputAppendEvent)
+      return this.equals((AppOutputAppendEvent)that);
     return false;
   }
 
   public boolean equals(AppOutputAppendEvent that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
 
     boolean this_present_noteId = true && this.isSetNoteId();
     boolean that_present_noteId = true && that.isSetNoteId();
     if (this_present_noteId || that_present_noteId) {
-      if (!(this_present_noteId && that_present_noteId)) return false;
-      if (!this.noteId.equals(that.noteId)) return false;
+      if (!(this_present_noteId && that_present_noteId))
+        return false;
+      if (!this.noteId.equals(that.noteId))
+        return false;
     }
 
     boolean this_present_paragraphId = true && this.isSetParagraphId();
     boolean that_present_paragraphId = true && that.isSetParagraphId();
     if (this_present_paragraphId || that_present_paragraphId) {
-      if (!(this_present_paragraphId && that_present_paragraphId)) return false;
-      if (!this.paragraphId.equals(that.paragraphId)) return false;
+      if (!(this_present_paragraphId && that_present_paragraphId))
+        return false;
+      if (!this.paragraphId.equals(that.paragraphId))
+        return false;
     }
 
     boolean this_present_appId = true && this.isSetAppId();
     boolean that_present_appId = true && that.isSetAppId();
     if (this_present_appId || that_present_appId) {
-      if (!(this_present_appId && that_present_appId)) return false;
-      if (!this.appId.equals(that.appId)) return false;
+      if (!(this_present_appId && that_present_appId))
+        return false;
+      if (!this.appId.equals(that.appId))
+        return false;
     }
 
     boolean this_present_index = true;
     boolean that_present_index = true;
     if (this_present_index || that_present_index) {
-      if (!(this_present_index && that_present_index)) return false;
-      if (this.index != that.index) return false;
+      if (!(this_present_index && that_present_index))
+        return false;
+      if (this.index != that.index)
+        return false;
     }
 
     boolean this_present_data = true && this.isSetData();
     boolean that_present_data = true && that.isSetData();
     if (this_present_data || that_present_data) {
-      if (!(this_present_data && that_present_data)) return false;
-      if (!this.data.equals(that.data)) return false;
+      if (!(this_present_data && that_present_data))
+        return false;
+      if (!this.data.equals(that.data))
+        return false;
     }
 
     return true;
@@ -499,23 +489,28 @@ public class AppOutputAppendEvent
 
     boolean present_noteId = true && (isSetNoteId());
     list.add(present_noteId);
-    if (present_noteId) list.add(noteId);
+    if (present_noteId)
+      list.add(noteId);
 
     boolean present_paragraphId = true && (isSetParagraphId());
     list.add(present_paragraphId);
-    if (present_paragraphId) list.add(paragraphId);
+    if (present_paragraphId)
+      list.add(paragraphId);
 
     boolean present_appId = true && (isSetAppId());
     list.add(present_appId);
-    if (present_appId) list.add(appId);
+    if (present_appId)
+      list.add(appId);
 
     boolean present_index = true;
     list.add(present_index);
-    if (present_index) list.add(index);
+    if (present_index)
+      list.add(index);
 
     boolean present_data = true && (isSetData());
     list.add(present_data);
-    if (present_data) list.add(data);
+    if (present_data)
+      list.add(data);
 
     return list.hashCode();
   }
@@ -589,8 +584,7 @@ public class AppOutputAppendEvent
     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
-  public void write(org.apache.thrift.protocol.TProtocol oprot)
-      throws org.apache.thrift.TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
@@ -645,23 +639,17 @@ public class AppOutputAppendEvent
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
     try {
-      write(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(out)));
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in)
-      throws java.io.IOException, ClassNotFoundException {
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
-      // it doesn't seem like you should have to do this, but java serialization is wacky, and
-      // doesn't call the default constructor.
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
       __isset_bitfield = 0;
-      read(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(in)));
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
@@ -673,16 +661,15 @@ public class AppOutputAppendEvent
     }
   }
 
-  private static class AppOutputAppendEventStandardScheme
-      extends StandardScheme<AppOutputAppendEvent> {
+  private static class AppOutputAppendEventStandardScheme extends StandardScheme<AppOutputAppendEvent> {
 
-    public void read(org.apache.thrift.protocol.TProtocol iprot, AppOutputAppendEvent struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol iprot, AppOutputAppendEvent struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
       iprot.readStructBegin();
-      while (true) {
+      while (true)
+      {
         schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
           break;
         }
         switch (schemeField.id) {
@@ -690,7 +677,7 @@ public class AppOutputAppendEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.noteId = iprot.readString();
               struct.setNoteIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -698,7 +685,7 @@ public class AppOutputAppendEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.paragraphId = iprot.readString();
               struct.setParagraphIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -706,7 +693,7 @@ public class AppOutputAppendEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.appId = iprot.readString();
               struct.setAppIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -714,7 +701,7 @@ public class AppOutputAppendEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
               struct.index = iprot.readI32();
               struct.setIndexIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -722,7 +709,7 @@ public class AppOutputAppendEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.data = iprot.readString();
               struct.setDataIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -737,8 +724,7 @@ public class AppOutputAppendEvent
       struct.validate();
     }
 
-    public void write(org.apache.thrift.protocol.TProtocol oprot, AppOutputAppendEvent struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol oprot, AppOutputAppendEvent struct) throws org.apache.thrift.TException {
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
@@ -768,6 +754,7 @@ public class AppOutputAppendEvent
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
+
   }
 
   private static class AppOutputAppendEventTupleSchemeFactory implements SchemeFactory {
@@ -779,8 +766,7 @@ public class AppOutputAppendEvent
   private static class AppOutputAppendEventTupleScheme extends TupleScheme<AppOutputAppendEvent> {
 
     @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, AppOutputAppendEvent struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol prot, AppOutputAppendEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
       if (struct.isSetNoteId()) {
@@ -817,8 +803,7 @@ public class AppOutputAppendEvent
     }
 
     @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, AppOutputAppendEvent struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol prot, AppOutputAppendEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(5);
       if (incoming.get(0)) {
@@ -843,4 +828,6 @@ public class AppOutputAppendEvent
       }
     }
   }
+
 }
+


[26/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RegisterInfo.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RegisterInfo.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RegisterInfo.java
index 3b4acf2..324b7c2 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RegisterInfo.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RegisterInfo.java
@@ -1,66 +1,65 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2018-8-9")
-public class RegisterInfo
-    implements org.apache.thrift.TBase<RegisterInfo, RegisterInfo._Fields>,
-        java.io.Serializable,
-        Cloneable,
-        Comparable<RegisterInfo> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
-      new org.apache.thrift.protocol.TStruct("RegisterInfo");
-
-  private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "host", org.apache.thrift.protocol.TType.STRING, (short) 1);
-  private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "port", org.apache.thrift.protocol.TType.I32, (short) 2);
-  private static final org.apache.thrift.protocol.TField INTERPRETER_GROUP_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "interpreterGroupId", org.apache.thrift.protocol.TType.STRING, (short) 3);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
-      new HashMap<Class<? extends IScheme>, SchemeFactory>();
+public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, RegisterInfo._Fields>, java.io.Serializable, Cloneable, Comparable<RegisterInfo> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RegisterInfo");
+
+  private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)2);
+  private static final org.apache.thrift.protocol.TField INTERPRETER_GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("interpreterGroupId", org.apache.thrift.protocol.TType.STRING, (short)3);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
     schemes.put(StandardScheme.class, new RegisterInfoStandardSchemeFactory());
     schemes.put(TupleScheme.class, new RegisterInfoTupleSchemeFactory());
@@ -70,14 +69,11 @@ public class RegisterInfo
   public int port; // required
   public String interpreterGroupId; // required
 
-  /**
-   * The set of fields this struct contains, along with convenience methods for finding and
-   * manipulating them.
-   */
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    HOST((short) 1, "host"),
-    PORT((short) 2, "port"),
-    INTERPRETER_GROUP_ID((short) 3, "interpreterGroupId");
+    HOST((short)1, "host"),
+    PORT((short)2, "port"),
+    INTERPRETER_GROUP_ID((short)3, "interpreterGroupId");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -87,9 +83,11 @@ public class RegisterInfo
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
     public static _Fields findByThriftId(int fieldId) {
-      switch (fieldId) {
+      switch(fieldId) {
         case 1: // HOST
           return HOST;
         case 2: // PORT
@@ -101,15 +99,19 @@ public class RegisterInfo
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null)
-        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
 
-    /** Find the _Fields constant that matches name, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
@@ -135,38 +137,26 @@ public class RegisterInfo
   private static final int __PORT_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
-        new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(
-        _Fields.HOST,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "host",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.PORT,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "port",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.I32)));
-    tmpMap.put(
-        _Fields.INTERPRETER_GROUP_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "interpreterGroupId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.INTERPRETER_GROUP_ID, new org.apache.thrift.meta_data.FieldMetaData("interpreterGroupId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RegisterInfo.class, metaDataMap);
   }
 
-  public RegisterInfo() {}
+  public RegisterInfo() {
+  }
 
-  public RegisterInfo(String host, int port, String interpreterGroupId) {
+  public RegisterInfo(
+    String host,
+    int port,
+    String interpreterGroupId)
+  {
     this();
     this.host = host;
     this.port = port;
@@ -174,7 +164,9 @@ public class RegisterInfo
     this.interpreterGroupId = interpreterGroupId;
   }
 
-  /** Performs a deep copy on <i>other</i>. */
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
   public RegisterInfo(RegisterInfo other) {
     __isset_bitfield = other.__isset_bitfield;
     if (other.isSetHost()) {
@@ -258,9 +250,7 @@ public class RegisterInfo
     this.interpreterGroupId = null;
   }
 
-  /**
-   * Returns true if field interpreterGroupId is set (has been assigned a value) and false otherwise
-   */
+  /** Returns true if field interpreterGroupId is set (has been assigned a value) and false otherwise */
   public boolean isSetInterpreterGroupId() {
     return this.interpreterGroupId != null;
   }
@@ -273,95 +263,103 @@ public class RegisterInfo
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-      case HOST:
-        if (value == null) {
-          unsetHost();
-        } else {
-          setHost((String) value);
-        }
-        break;
+    case HOST:
+      if (value == null) {
+        unsetHost();
+      } else {
+        setHost((String)value);
+      }
+      break;
 
-      case PORT:
-        if (value == null) {
-          unsetPort();
-        } else {
-          setPort((Integer) value);
-        }
-        break;
+    case PORT:
+      if (value == null) {
+        unsetPort();
+      } else {
+        setPort((Integer)value);
+      }
+      break;
+
+    case INTERPRETER_GROUP_ID:
+      if (value == null) {
+        unsetInterpreterGroupId();
+      } else {
+        setInterpreterGroupId((String)value);
+      }
+      break;
 
-      case INTERPRETER_GROUP_ID:
-        if (value == null) {
-          unsetInterpreterGroupId();
-        } else {
-          setInterpreterGroupId((String) value);
-        }
-        break;
     }
   }
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-      case HOST:
-        return getHost();
+    case HOST:
+      return getHost();
+
+    case PORT:
+      return Integer.valueOf(getPort());
 
-      case PORT:
-        return Integer.valueOf(getPort());
+    case INTERPRETER_GROUP_ID:
+      return getInterpreterGroupId();
 
-      case INTERPRETER_GROUP_ID:
-        return getInterpreterGroupId();
     }
     throw new IllegalStateException();
   }
 
-  /**
-   * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
-   * otherwise
-   */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
     }
 
     switch (field) {
-      case HOST:
-        return isSetHost();
-      case PORT:
-        return isSetPort();
-      case INTERPRETER_GROUP_ID:
-        return isSetInterpreterGroupId();
+    case HOST:
+      return isSetHost();
+    case PORT:
+      return isSetPort();
+    case INTERPRETER_GROUP_ID:
+      return isSetInterpreterGroupId();
     }
     throw new IllegalStateException();
   }
 
   @Override
   public boolean equals(Object that) {
-    if (that == null) return false;
-    if (that instanceof RegisterInfo) return this.equals((RegisterInfo) that);
+    if (that == null)
+      return false;
+    if (that instanceof RegisterInfo)
+      return this.equals((RegisterInfo)that);
     return false;
   }
 
   public boolean equals(RegisterInfo that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
 
     boolean this_present_host = true && this.isSetHost();
     boolean that_present_host = true && that.isSetHost();
     if (this_present_host || that_present_host) {
-      if (!(this_present_host && that_present_host)) return false;
-      if (!this.host.equals(that.host)) return false;
+      if (!(this_present_host && that_present_host))
+        return false;
+      if (!this.host.equals(that.host))
+        return false;
     }
 
     boolean this_present_port = true;
     boolean that_present_port = true;
     if (this_present_port || that_present_port) {
-      if (!(this_present_port && that_present_port)) return false;
-      if (this.port != that.port) return false;
+      if (!(this_present_port && that_present_port))
+        return false;
+      if (this.port != that.port)
+        return false;
     }
 
     boolean this_present_interpreterGroupId = true && this.isSetInterpreterGroupId();
     boolean that_present_interpreterGroupId = true && that.isSetInterpreterGroupId();
     if (this_present_interpreterGroupId || that_present_interpreterGroupId) {
-      if (!(this_present_interpreterGroupId && that_present_interpreterGroupId)) return false;
-      if (!this.interpreterGroupId.equals(that.interpreterGroupId)) return false;
+      if (!(this_present_interpreterGroupId && that_present_interpreterGroupId))
+        return false;
+      if (!this.interpreterGroupId.equals(that.interpreterGroupId))
+        return false;
     }
 
     return true;
@@ -373,15 +371,18 @@ public class RegisterInfo
 
     boolean present_host = true && (isSetHost());
     list.add(present_host);
-    if (present_host) list.add(host);
+    if (present_host)
+      list.add(host);
 
     boolean present_port = true;
     list.add(present_port);
-    if (present_port) list.add(port);
+    if (present_port)
+      list.add(port);
 
     boolean present_interpreterGroupId = true && (isSetInterpreterGroupId());
     list.add(present_interpreterGroupId);
-    if (present_interpreterGroupId) list.add(interpreterGroupId);
+    if (present_interpreterGroupId)
+      list.add(interpreterGroupId);
 
     return list.hashCode();
   }
@@ -414,15 +415,12 @@ public class RegisterInfo
         return lastComparison;
       }
     }
-    lastComparison =
-        Boolean.valueOf(isSetInterpreterGroupId()).compareTo(other.isSetInterpreterGroupId());
+    lastComparison = Boolean.valueOf(isSetInterpreterGroupId()).compareTo(other.isSetInterpreterGroupId());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetInterpreterGroupId()) {
-      lastComparison =
-          org.apache.thrift.TBaseHelper.compareTo(
-              this.interpreterGroupId, other.interpreterGroupId);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.interpreterGroupId, other.interpreterGroupId);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -438,8 +436,7 @@ public class RegisterInfo
     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
-  public void write(org.apache.thrift.protocol.TProtocol oprot)
-      throws org.apache.thrift.TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
@@ -478,23 +475,17 @@ public class RegisterInfo
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
     try {
-      write(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(out)));
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in)
-      throws java.io.IOException, ClassNotFoundException {
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
-      // it doesn't seem like you should have to do this, but java serialization is wacky, and
-      // doesn't call the default constructor.
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
       __isset_bitfield = 0;
-      read(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(in)));
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
@@ -508,13 +499,13 @@ public class RegisterInfo
 
   private static class RegisterInfoStandardScheme extends StandardScheme<RegisterInfo> {
 
-    public void read(org.apache.thrift.protocol.TProtocol iprot, RegisterInfo struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol iprot, RegisterInfo struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
       iprot.readStructBegin();
-      while (true) {
+      while (true)
+      {
         schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
           break;
         }
         switch (schemeField.id) {
@@ -522,7 +513,7 @@ public class RegisterInfo
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.host = iprot.readString();
               struct.setHostIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -530,7 +521,7 @@ public class RegisterInfo
             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
               struct.port = iprot.readI32();
               struct.setPortIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -538,7 +529,7 @@ public class RegisterInfo
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.interpreterGroupId = iprot.readString();
               struct.setInterpreterGroupIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -553,8 +544,7 @@ public class RegisterInfo
       struct.validate();
     }
 
-    public void write(org.apache.thrift.protocol.TProtocol oprot, RegisterInfo struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol oprot, RegisterInfo struct) throws org.apache.thrift.TException {
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
@@ -574,6 +564,7 @@ public class RegisterInfo
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
+
   }
 
   private static class RegisterInfoTupleSchemeFactory implements SchemeFactory {
@@ -585,8 +576,7 @@ public class RegisterInfo
   private static class RegisterInfoTupleScheme extends TupleScheme<RegisterInfo> {
 
     @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, RegisterInfo struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol prot, RegisterInfo struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
       if (struct.isSetHost()) {
@@ -611,8 +601,7 @@ public class RegisterInfo
     }
 
     @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, RegisterInfo struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol prot, RegisterInfo struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(3);
       if (incoming.get(0)) {
@@ -629,4 +618,6 @@ public class RegisterInfo
       }
     }
   }
+
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteApplicationResult.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteApplicationResult.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteApplicationResult.java
index 423bb12..4d2bdb4 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteApplicationResult.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteApplicationResult.java
@@ -1,63 +1,64 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2018-8-9")
-public class RemoteApplicationResult
-    implements org.apache.thrift.TBase<RemoteApplicationResult, RemoteApplicationResult._Fields>,
-        java.io.Serializable,
-        Cloneable,
-        Comparable<RemoteApplicationResult> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
-      new org.apache.thrift.protocol.TStruct("RemoteApplicationResult");
-
-  private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "success", org.apache.thrift.protocol.TType.BOOL, (short) 1);
-  private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "msg", org.apache.thrift.protocol.TType.STRING, (short) 2);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
-      new HashMap<Class<? extends IScheme>, SchemeFactory>();
+public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteApplicationResult, RemoteApplicationResult._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteApplicationResult> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteApplicationResult");
 
+  private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)1);
+  private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
     schemes.put(StandardScheme.class, new RemoteApplicationResultStandardSchemeFactory());
     schemes.put(TupleScheme.class, new RemoteApplicationResultTupleSchemeFactory());
@@ -66,13 +67,10 @@ public class RemoteApplicationResult
   public boolean success; // required
   public String msg; // required
 
-  /**
-   * The set of fields this struct contains, along with convenience methods for finding and
-   * manipulating them.
-   */
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    SUCCESS((short) 1, "success"),
-    MSG((short) 2, "msg");
+    SUCCESS((short)1, "success"),
+    MSG((short)2, "msg");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -82,9 +80,11 @@ public class RemoteApplicationResult
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
     public static _Fields findByThriftId(int fieldId) {
-      switch (fieldId) {
+      switch(fieldId) {
         case 1: // SUCCESS
           return SUCCESS;
         case 2: // MSG
@@ -94,15 +94,19 @@ public class RemoteApplicationResult
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null)
-        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
 
-    /** Find the _Fields constant that matches name, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
@@ -128,39 +132,32 @@ public class RemoteApplicationResult
   private static final int __SUCCESS_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
-        new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(
-        _Fields.SUCCESS,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "success",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.BOOL)));
-    tmpMap.put(
-        _Fields.MSG,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "msg",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
-        RemoteApplicationResult.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RemoteApplicationResult.class, metaDataMap);
   }
 
-  public RemoteApplicationResult() {}
+  public RemoteApplicationResult() {
+  }
 
-  public RemoteApplicationResult(boolean success, String msg) {
+  public RemoteApplicationResult(
+    boolean success,
+    String msg)
+  {
     this();
     this.success = success;
     setSuccessIsSet(true);
     this.msg = msg;
   }
 
-  /** Performs a deep copy on <i>other</i>. */
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
   public RemoteApplicationResult(RemoteApplicationResult other) {
     __isset_bitfield = other.__isset_bitfield;
     this.success = other.success;
@@ -229,75 +226,81 @@ public class RemoteApplicationResult
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-      case SUCCESS:
-        if (value == null) {
-          unsetSuccess();
-        } else {
-          setSuccess((Boolean) value);
-        }
-        break;
+    case SUCCESS:
+      if (value == null) {
+        unsetSuccess();
+      } else {
+        setSuccess((Boolean)value);
+      }
+      break;
+
+    case MSG:
+      if (value == null) {
+        unsetMsg();
+      } else {
+        setMsg((String)value);
+      }
+      break;
 
-      case MSG:
-        if (value == null) {
-          unsetMsg();
-        } else {
-          setMsg((String) value);
-        }
-        break;
     }
   }
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-      case SUCCESS:
-        return Boolean.valueOf(isSuccess());
+    case SUCCESS:
+      return Boolean.valueOf(isSuccess());
+
+    case MSG:
+      return getMsg();
 
-      case MSG:
-        return getMsg();
     }
     throw new IllegalStateException();
   }
 
-  /**
-   * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
-   * otherwise
-   */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
     }
 
     switch (field) {
-      case SUCCESS:
-        return isSetSuccess();
-      case MSG:
-        return isSetMsg();
+    case SUCCESS:
+      return isSetSuccess();
+    case MSG:
+      return isSetMsg();
     }
     throw new IllegalStateException();
   }
 
   @Override
   public boolean equals(Object that) {
-    if (that == null) return false;
-    if (that instanceof RemoteApplicationResult) return this.equals((RemoteApplicationResult) that);
+    if (that == null)
+      return false;
+    if (that instanceof RemoteApplicationResult)
+      return this.equals((RemoteApplicationResult)that);
     return false;
   }
 
   public boolean equals(RemoteApplicationResult that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
 
     boolean this_present_success = true;
     boolean that_present_success = true;
     if (this_present_success || that_present_success) {
-      if (!(this_present_success && that_present_success)) return false;
-      if (this.success != that.success) return false;
+      if (!(this_present_success && that_present_success))
+        return false;
+      if (this.success != that.success)
+        return false;
     }
 
     boolean this_present_msg = true && this.isSetMsg();
     boolean that_present_msg = true && that.isSetMsg();
     if (this_present_msg || that_present_msg) {
-      if (!(this_present_msg && that_present_msg)) return false;
-      if (!this.msg.equals(that.msg)) return false;
+      if (!(this_present_msg && that_present_msg))
+        return false;
+      if (!this.msg.equals(that.msg))
+        return false;
     }
 
     return true;
@@ -309,11 +312,13 @@ public class RemoteApplicationResult
 
     boolean present_success = true;
     list.add(present_success);
-    if (present_success) list.add(success);
+    if (present_success)
+      list.add(success);
 
     boolean present_msg = true && (isSetMsg());
     list.add(present_msg);
-    if (present_msg) list.add(msg);
+    if (present_msg)
+      list.add(msg);
 
     return list.hashCode();
   }
@@ -357,8 +362,7 @@ public class RemoteApplicationResult
     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
-  public void write(org.apache.thrift.protocol.TProtocol oprot)
-      throws org.apache.thrift.TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
@@ -389,23 +393,17 @@ public class RemoteApplicationResult
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
     try {
-      write(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(out)));
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in)
-      throws java.io.IOException, ClassNotFoundException {
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
-      // it doesn't seem like you should have to do this, but java serialization is wacky, and
-      // doesn't call the default constructor.
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
       __isset_bitfield = 0;
-      read(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(in)));
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
@@ -417,16 +415,15 @@ public class RemoteApplicationResult
     }
   }
 
-  private static class RemoteApplicationResultStandardScheme
-      extends StandardScheme<RemoteApplicationResult> {
+  private static class RemoteApplicationResultStandardScheme extends StandardScheme<RemoteApplicationResult> {
 
-    public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteApplicationResult struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteApplicationResult struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
       iprot.readStructBegin();
-      while (true) {
+      while (true)
+      {
         schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
           break;
         }
         switch (schemeField.id) {
@@ -434,7 +431,7 @@ public class RemoteApplicationResult
             if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
               struct.success = iprot.readBool();
               struct.setSuccessIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -442,7 +439,7 @@ public class RemoteApplicationResult
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.msg = iprot.readString();
               struct.setMsgIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -457,8 +454,7 @@ public class RemoteApplicationResult
       struct.validate();
     }
 
-    public void write(org.apache.thrift.protocol.TProtocol oprot, RemoteApplicationResult struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol oprot, RemoteApplicationResult struct) throws org.apache.thrift.TException {
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
@@ -473,6 +469,7 @@ public class RemoteApplicationResult
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
+
   }
 
   private static class RemoteApplicationResultTupleSchemeFactory implements SchemeFactory {
@@ -481,12 +478,10 @@ public class RemoteApplicationResult
     }
   }
 
-  private static class RemoteApplicationResultTupleScheme
-      extends TupleScheme<RemoteApplicationResult> {
+  private static class RemoteApplicationResultTupleScheme extends TupleScheme<RemoteApplicationResult> {
 
     @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, RemoteApplicationResult struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol prot, RemoteApplicationResult struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
       if (struct.isSetSuccess()) {
@@ -505,8 +500,7 @@ public class RemoteApplicationResult
     }
 
     @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, RemoteApplicationResult struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol prot, RemoteApplicationResult struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(2);
       if (incoming.get(0)) {
@@ -519,4 +513,6 @@ public class RemoteApplicationResult
       }
     }
   }
+
 }
+


[45/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 228215f..93d2344 100644
--- a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
+++ b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
@@ -5,12 +5,12 @@
  * "License"); you may not use this file except in compliance with the License. You may obtain a
  * copy of the License at
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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.
+ * 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.jdbc;
 
@@ -19,6 +19,22 @@ 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 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.lang.exception.ExceptionUtils;
+import org.apache.commons.lang.mutable.MutableBoolean;
+import org.apache.commons.pool2.ObjectPool;
+import org.apache.commons.pool2.impl.GenericObjectPool;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.security.UserGroupInformation;
+import org.apache.hadoop.security.alias.CredentialProvider;
+import org.apache.hadoop.security.alias.CredentialProviderFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.IOException;
 import java.security.PrivilegedExceptionAction;
 import java.sql.Connection;
@@ -38,19 +54,7 @@ import java.util.Set;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
-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.lang.exception.ExceptionUtils;
-import org.apache.commons.lang.mutable.MutableBoolean;
-import org.apache.commons.pool2.ObjectPool;
-import org.apache.commons.pool2.impl.GenericObjectPool;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.security.UserGroupInformation;
-import org.apache.hadoop.security.alias.CredentialProvider;
-import org.apache.hadoop.security.alias.CredentialProviderFactory;
+
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.InterpreterResult;
@@ -63,24 +67,28 @@ import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
 import org.apache.zeppelin.user.UserCredentials;
 import org.apache.zeppelin.user.UsernamePassword;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
- * JDBC interpreter for Zeppelin. This interpreter can also be used for accessing HAWQ, GreenplumDB,
- * MariaDB, MySQL, Postgres and Redshift.
+ * JDBC interpreter for Zeppelin. This interpreter can also be used for accessing HAWQ,
+ * GreenplumDB, MariaDB, MySQL, Postgres and Redshift.
  *
  * <ul>
- *   <li>{@code default.url} - JDBC URL to connect to.
- *   <li>{@code default.user} - JDBC user name..
- *   <li>{@code default.password} - JDBC password..
- *   <li>{@code default.driver.name} - JDBC driver name.
- *   <li>{@code common.max.result} - Max number of SQL result to display.
+ * <li>{@code default.url} - JDBC URL to connect to.</li>
+ * <li>{@code default.user} - JDBC user name..</li>
+ * <li>{@code default.password} - JDBC password..</li>
+ * <li>{@code default.driver.name} - JDBC driver name.</li>
+ * <li>{@code common.max.result} - Max number of SQL result to display.</li>
  * </ul>
  *
- * <p>How to use: <br>
- * {@code %jdbc.sql} <br>
- * {@code SELECT store_id, count(*) FROM retail_demo.order_lineitems_pxf GROUP BY store_id; }
+ * <p>
+ * How to use: <br/>
+ * {@code %jdbc.sql} <br/>
+ * {@code
+ * SELECT store_id, count(*)
+ * FROM retail_demo.order_lineitems_pxf
+ * GROUP BY store_id;
+ * }
+ * </p>
  */
 public class JDBCInterpreter extends KerberosInterpreter {
   private Logger logger = LoggerFactory.getLogger(JDBCInterpreter.class);
@@ -126,7 +134,7 @@ public class JDBCInterpreter extends KerberosInterpreter {
 
   private static final String CONCURRENT_EXECUTION_KEY = "zeppelin.jdbc.concurrent.use";
   private static final String CONCURRENT_EXECUTION_COUNT =
-      "zeppelin.jdbc.concurrent.max_connection";
+          "zeppelin.jdbc.concurrent.max_connection";
   private static final String DBCP_STRING = "jdbc:apache:commons:dbcp:";
 
   private final HashMap<String, Properties> basePropretiesMap;
@@ -188,13 +196,8 @@ public class JDBCInterpreter extends KerberosInterpreter {
       if (!COMMON_KEY.equals(key)) {
         Properties properties = basePropretiesMap.get(key);
         if (!properties.containsKey(DRIVER_KEY) || !properties.containsKey(URL_KEY)) {
-          logger.error(
-              "{} will be ignored. {}.{} and {}.{} is mandatory.",
-              key,
-              DRIVER_KEY,
-              key,
-              key,
-              URL_KEY);
+          logger.error("{} will be ignored. {}.{} and {}.{} is mandatory.",
+              key, DRIVER_KEY, key, key, URL_KEY);
           removeKeySet.add(key);
         }
       }
@@ -219,24 +222,20 @@ public class JDBCInterpreter extends KerberosInterpreter {
   }
 
   private void setMaxLineResults() {
-    if (basePropretiesMap.containsKey(COMMON_KEY)
-        && basePropretiesMap.get(COMMON_KEY).containsKey(MAX_LINE_KEY)) {
+    if (basePropretiesMap.containsKey(COMMON_KEY) &&
+        basePropretiesMap.get(COMMON_KEY).containsKey(MAX_LINE_KEY)) {
       maxLineResults = Integer.valueOf(basePropretiesMap.get(COMMON_KEY).getProperty(MAX_LINE_KEY));
     }
   }
 
-  private SqlCompleter createOrUpdateSqlCompleter(
-      SqlCompleter sqlCompleter,
-      final Connection connection,
-      String propertyKey,
-      final String buf,
-      final int cursor) {
+  private SqlCompleter createOrUpdateSqlCompleter(SqlCompleter sqlCompleter,
+      final Connection connection, String propertyKey, final String buf, final int cursor) {
     String schemaFiltersKey = String.format("%s.%s", propertyKey, COMPLETER_SCHEMA_FILTERS_KEY);
     String sqlCompleterTtlKey = String.format("%s.%s", propertyKey, COMPLETER_TTL_KEY);
     final String schemaFiltersString = getProperty(schemaFiltersKey);
-    int ttlInSeconds =
-        Integer.valueOf(
-            StringUtils.defaultIfEmpty(getProperty(sqlCompleterTtlKey), DEFAULT_COMPLETER_TTL));
+    int ttlInSeconds = Integer.valueOf(
+        StringUtils.defaultIfEmpty(getProperty(sqlCompleterTtlKey), DEFAULT_COMPLETER_TTL)
+    );
     final SqlCompleter completer;
     if (sqlCompleter == null) {
       completer = new SqlCompleter(ttlInSeconds);
@@ -244,13 +243,12 @@ public class JDBCInterpreter extends KerberosInterpreter {
       completer = sqlCompleter;
     }
     ExecutorService executorService = Executors.newFixedThreadPool(1);
-    executorService.execute(
-        new Runnable() {
-          @Override
-          public void run() {
-            completer.createOrUpdateFromConnection(connection, schemaFiltersString, buf, cursor);
-          }
-        });
+    executorService.execute(new Runnable() {
+      @Override
+      public void run() {
+        completer.createOrUpdateFromConnection(connection, schemaFiltersString, buf, cursor);
+      }
+    });
 
     executorService.shutdown();
 
@@ -324,13 +322,13 @@ public class JDBCInterpreter extends KerberosInterpreter {
   }
 
   private boolean existAccountInBaseProperty(String propertyKey) {
-    return basePropretiesMap.get(propertyKey).containsKey(USER_KEY)
-        && !isEmpty((String) basePropretiesMap.get(propertyKey).get(USER_KEY))
-        && basePropretiesMap.get(propertyKey).containsKey(PASSWORD_KEY);
+    return basePropretiesMap.get(propertyKey).containsKey(USER_KEY) &&
+        !isEmpty((String) basePropretiesMap.get(propertyKey).get(USER_KEY)) &&
+        basePropretiesMap.get(propertyKey).containsKey(PASSWORD_KEY);
   }
 
-  private UsernamePassword getUsernamePassword(
-      InterpreterContext interpreterContext, String replName) {
+  private UsernamePassword getUsernamePassword(InterpreterContext interpreterContext,
+                                               String replName) {
     UserCredentials uc = interpreterContext.getAuthenticationInfo().getUserCredentials();
     if (uc != null) {
       return uc.getUsernamePassword(replName);
@@ -362,8 +360,8 @@ public class JDBCInterpreter extends KerberosInterpreter {
     String user = interpreterContext.getAuthenticationInfo().getUser();
 
     JDBCUserConfigurations jdbcUserConfigurations = getJDBCConfiguration(user);
-    if (basePropretiesMap.get(propertyKey).containsKey(USER_KEY)
-        && !basePropretiesMap.get(propertyKey).getProperty(USER_KEY).isEmpty()) {
+    if (basePropretiesMap.get(propertyKey).containsKey(USER_KEY) &&
+        !basePropretiesMap.get(propertyKey).getProperty(USER_KEY).isEmpty()) {
       String password = getPassword(basePropretiesMap.get(propertyKey));
       if (!isEmpty(password)) {
         basePropretiesMap.get(propertyKey).setProperty(PASSWORD_KEY, password);
@@ -375,8 +373,8 @@ public class JDBCInterpreter extends KerberosInterpreter {
     }
     jdbcUserConfigurations.cleanUserProperty(propertyKey);
 
-    UsernamePassword usernamePassword =
-        getUsernamePassword(interpreterContext, getEntityName(interpreterContext.getReplName()));
+    UsernamePassword usernamePassword = getUsernamePassword(interpreterContext,
+            getEntityName(interpreterContext.getReplName()));
     if (usernamePassword != null) {
       jdbcUserConfigurations.setUserProperty(propertyKey, usernamePassword);
     } else {
@@ -384,13 +382,13 @@ public class JDBCInterpreter extends KerberosInterpreter {
     }
   }
 
-  private void createConnectionPool(
-      String url, String user, String propertyKey, Properties properties)
-      throws SQLException, ClassNotFoundException {
-    ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(url, properties);
+  private void createConnectionPool(String url, String user, String propertyKey,
+      Properties properties) throws SQLException, ClassNotFoundException {
+    ConnectionFactory connectionFactory =
+            new DriverManagerConnectionFactory(url, properties);
 
-    PoolableConnectionFactory poolableConnectionFactory =
-        new PoolableConnectionFactory(connectionFactory, null);
+    PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(
+            connectionFactory, null);
     final String maxConnectionLifetime =
         StringUtils.defaultIfEmpty(getProperty("zeppelin.jdbc.maxConnLifetime"), "-1");
     poolableConnectionFactory.setMaxConnLifetimeMillis(Long.parseLong(maxConnectionLifetime));
@@ -404,9 +402,8 @@ public class JDBCInterpreter extends KerberosInterpreter {
     getJDBCConfiguration(user).saveDBDriverPool(propertyKey, driver);
   }
 
-  private Connection getConnectionFromPool(
-      String url, String user, String propertyKey, Properties properties)
-      throws SQLException, ClassNotFoundException {
+  private Connection getConnectionFromPool(String url, String user, String propertyKey,
+      Properties properties) throws SQLException, ClassNotFoundException {
     String jdbcDriver = getJDBCDriverName(user, propertyKey);
 
     if (!getJDBCConfiguration(user).isConnectionInDBDriverPool(propertyKey)) {
@@ -417,7 +414,7 @@ public class JDBCInterpreter extends KerberosInterpreter {
 
   public Connection getConnection(String propertyKey, InterpreterContext interpreterContext)
       throws ClassNotFoundException, SQLException, InterpreterException, IOException {
-    final String user = interpreterContext.getAuthenticationInfo().getUser();
+    final String user =  interpreterContext.getAuthenticationInfo().getUser();
     Connection connection;
     if (propertyKey == null || basePropretiesMap.get(propertyKey) == null) {
       return null;
@@ -440,9 +437,8 @@ public class JDBCInterpreter extends KerberosInterpreter {
       JDBCSecurityImpl.createSecureConfiguration(getProperties(), authType);
       switch (authType) {
         case KERBEROS:
-          if (user == null
-              || "false"
-                  .equalsIgnoreCase(getProperty("zeppelin.jdbc.auth.kerberos.proxy.enable"))) {
+          if (user == null || "false".equalsIgnoreCase(
+              getProperty("zeppelin.jdbc.auth.kerberos.proxy.enable"))) {
             connection = getConnectionFromPool(connectionUrl, user, propertyKey, properties);
           } else {
             if (basePropretiesMap.get(propertyKey).containsKey("proxy.user.property")) {
@@ -450,9 +446,8 @@ public class JDBCInterpreter extends KerberosInterpreter {
             } else {
               UserGroupInformation ugi = null;
               try {
-                ugi =
-                    UserGroupInformation.createProxyUser(
-                        user, UserGroupInformation.getCurrentUser());
+                ugi = UserGroupInformation.createProxyUser(
+                    user, UserGroupInformation.getCurrentUser());
               } catch (Exception e) {
                 logger.error("Error in getCurrentUser", e);
                 throw new InterpreterException("Error in getCurrentUser", e);
@@ -460,14 +455,12 @@ public class JDBCInterpreter extends KerberosInterpreter {
 
               final String poolKey = propertyKey;
               try {
-                connection =
-                    ugi.doAs(
-                        new PrivilegedExceptionAction<Connection>() {
-                          @Override
-                          public Connection run() throws Exception {
-                            return getConnectionFromPool(connectionUrl, user, poolKey, properties);
-                          }
-                        });
+                connection = ugi.doAs(new PrivilegedExceptionAction<Connection>() {
+                  @Override
+                  public Connection run() throws Exception {
+                    return getConnectionFromPool(connectionUrl, user, poolKey, properties);
+                  }
+                });
               } catch (Exception e) {
                 logger.error("Error in doAs", e);
                 throw new InterpreterException("Error in doAs", e);
@@ -487,29 +480,21 @@ public class JDBCInterpreter extends KerberosInterpreter {
   private String appendProxyUserToURL(String url, String user, String propertyKey) {
     StringBuilder connectionUrl = new StringBuilder(url);
 
-    if (user != null
-        && !user.equals("anonymous")
-        && basePropretiesMap.get(propertyKey).containsKey("proxy.user.property")) {
+    if (user != null && !user.equals("anonymous") &&
+        basePropretiesMap.get(propertyKey).containsKey("proxy.user.property")) {
 
       Integer lastIndexOfUrl = connectionUrl.indexOf("?");
       if (lastIndexOfUrl == -1) {
         lastIndexOfUrl = connectionUrl.length();
       }
       logger.info("Using proxy user as :" + user);
-      logger.info(
-          "Using proxy property for user as :"
-              + basePropretiesMap.get(propertyKey).getProperty("proxy.user.property"));
-      connectionUrl.insert(
-          lastIndexOfUrl,
-          ";"
-              + basePropretiesMap.get(propertyKey).getProperty("proxy.user.property")
-              + "="
-              + user
-              + ";");
+      logger.info("Using proxy property for user as :" +
+          basePropretiesMap.get(propertyKey).getProperty("proxy.user.property"));
+      connectionUrl.insert(lastIndexOfUrl, ";" +
+          basePropretiesMap.get(propertyKey).getProperty("proxy.user.property") + "=" + user + ";");
     } else if (user != null && !user.equals("anonymous") && url.contains("hive")) {
-      logger.warn(
-          "User impersonation for hive has changed please refer: http://zeppelin.apache"
-              + ".org/docs/latest/interpreter/jdbc.html#apache-hive");
+      logger.warn("User impersonation for hive has changed please refer: http://zeppelin.apache" +
+          ".org/docs/latest/interpreter/jdbc.html#apache-hive");
     }
 
     return connectionUrl.toString();
@@ -522,8 +507,7 @@ public class JDBCInterpreter extends KerberosInterpreter {
         && isNotEmpty(properties.getProperty(JDBC_JCEKS_CREDENTIAL_KEY))) {
       try {
         Configuration configuration = new Configuration();
-        configuration.set(
-            CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH,
+        configuration.set(CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH,
             properties.getProperty(JDBC_JCEKS_FILE));
         CredentialProvider provider = CredentialProviderFactory.getProviders(configuration).get(0);
         CredentialProvider.CredentialEntry credEntry =
@@ -531,18 +515,13 @@ public class JDBCInterpreter extends KerberosInterpreter {
         if (credEntry != null) {
           return new String(credEntry.getCredential());
         } else {
-          throw new InterpreterException(
-              "Failed to retrieve password from JCEKS from key: "
-                  + properties.getProperty(JDBC_JCEKS_CREDENTIAL_KEY));
+          throw new InterpreterException("Failed to retrieve password from JCEKS from key: "
+              + properties.getProperty(JDBC_JCEKS_CREDENTIAL_KEY));
         }
       } catch (Exception e) {
-        logger.error(
-            "Failed to retrieve password from JCEKS \n"
-                + "For file: "
-                + properties.getProperty(JDBC_JCEKS_FILE)
-                + "\nFor key: "
-                + properties.getProperty(JDBC_JCEKS_CREDENTIAL_KEY),
-            e);
+        logger.error("Failed to retrieve password from JCEKS \n" +
+            "For file: " + properties.getProperty(JDBC_JCEKS_FILE) +
+            "\nFor key: " + properties.getProperty(JDBC_JCEKS_CREDENTIAL_KEY), e);
         throw e;
       }
     }
@@ -638,10 +617,7 @@ public class JDBCInterpreter extends KerberosInterpreter {
         }
       }
 
-      if (!quoteString
-          && !doubleQuoteString
-          && !multiLineComment
-          && !singleLineComment
+      if (!quoteString && !doubleQuoteString && !multiLineComment && !singleLineComment
           && sql.length() > item + 1) {
         if (character == '-' && sql.charAt(item + 1) == '-') {
           singleLineComment = true;
@@ -650,10 +626,7 @@ public class JDBCInterpreter extends KerberosInterpreter {
         }
       }
 
-      if (character == ';'
-          && !quoteString
-          && !doubleQuoteString
-          && !multiLineComment
+      if (character == ';' && !quoteString && !doubleQuoteString && !multiLineComment
           && !singleLineComment) {
         queries.add(StringUtils.trim(query.toString()));
         query = new StringBuilder();
@@ -683,8 +656,8 @@ public class JDBCInterpreter extends KerberosInterpreter {
     return interpreterResult;
   }
 
-  private InterpreterResult executeSql(
-      String propertyKey, String sql, InterpreterContext interpreterContext) {
+  private InterpreterResult executeSql(String propertyKey, String sql,
+      InterpreterContext interpreterContext) {
     Connection connection = null;
     Statement statement;
     ResultSet resultSet = null;
@@ -739,7 +712,7 @@ public class JDBCInterpreter extends KerberosInterpreter {
 
           String statementPrecode =
               getProperty(String.format(STATEMENT_PRECODE_KEY_TEMPLATE, propertyKey));
-
+          
           if (StringUtils.isNotBlank(statementPrecode)) {
             statement.execute(statementPrecode);
           }
@@ -750,42 +723,37 @@ public class JDBCInterpreter extends KerberosInterpreter {
             resultSet = statement.getResultSet();
 
             // Regards that the command is DDL.
-            if (isDDLCommand(
-                statement.getUpdateCount(), resultSet.getMetaData().getColumnCount())) {
-              interpreterResult.add(InterpreterResult.Type.TEXT, "Query executed successfully.");
+            if (isDDLCommand(statement.getUpdateCount(),
+                resultSet.getMetaData().getColumnCount())) {
+              interpreterResult.add(InterpreterResult.Type.TEXT,
+                  "Query executed successfully.");
             } else {
               MutableBoolean isComplete = new MutableBoolean(true);
-              String results =
-                  getResults(
-                      resultSet, !containsIgnoreCase(sqlToExecute, EXPLAIN_PREDICATE), isComplete);
+              String results = getResults(resultSet,
+                  !containsIgnoreCase(sqlToExecute, EXPLAIN_PREDICATE), isComplete);
               interpreterResult.add(results);
               if (!isComplete.booleanValue()) {
-                interpreterResult.add(
-                    ResultMessages.getExceedsLimitRowsMessage(
-                        getMaxResult(), String.format("%s.%s", COMMON_KEY, MAX_LINE_KEY)));
+                interpreterResult.add(ResultMessages.getExceedsLimitRowsMessage(getMaxResult(),
+                    String.format("%s.%s", COMMON_KEY, MAX_LINE_KEY)));
               }
             }
           } else {
             // Response contains either an update count or there are no results.
             int updateCount = statement.getUpdateCount();
-            interpreterResult.add(
-                InterpreterResult.Type.TEXT,
-                "Query executed successfully. Affected rows : " + updateCount);
+            interpreterResult.add(InterpreterResult.Type.TEXT,
+                "Query executed successfully. Affected rows : " +
+                    updateCount);
           }
         } finally {
           if (resultSet != null) {
             try {
               resultSet.close();
-            } catch (SQLException e) {
-              /*ignored*/
-            }
+            } catch (SQLException e) { /*ignored*/ }
           }
           if (statement != null) {
             try {
               statement.close();
-            } catch (SQLException e) {
-              /*ignored*/
-            }
+            } catch (SQLException e) { /*ignored*/ }
           }
         }
       }
@@ -795,23 +763,23 @@ public class JDBCInterpreter extends KerberosInterpreter {
       interpreterResult.add(errorMsg);
       return new InterpreterResult(Code.ERROR, interpreterResult.message());
     } finally {
-      // In case user ran an insert/update/upsert statement
+      //In case user ran an insert/update/upsert statement
       if (connection != null) {
         try {
           if (!connection.getAutoCommit()) {
             connection.commit();
           }
           connection.close();
-        } catch (SQLException e) {
-          /*ignored*/
-        }
+        } catch (SQLException e) { /*ignored*/ }
       }
       getJDBCConfiguration(user).removeStatement(paragraphId);
     }
     return interpreterResult;
   }
 
-  /** For %table response replace Tab and Newline characters from the content. */
+  /**
+   * For %table response replace Tab and Newline characters from the content.
+   */
   private String replaceReservedChars(String str) {
     if (str == null) {
       return EMPTY_COLUMN_VALUE;
@@ -821,10 +789,8 @@ public class JDBCInterpreter extends KerberosInterpreter {
 
   @Override
   public InterpreterResult interpret(String originalCmd, InterpreterContext contextInterpreter) {
-    String cmd =
-        Boolean.parseBoolean(getProperty("zeppelin.jdbc.interpolation"))
-            ? interpolate(originalCmd, contextInterpreter.getResourcePool())
-            : originalCmd;
+    String cmd = Boolean.parseBoolean(getProperty("zeppelin.jdbc.interpolation")) ?
+            interpolate(originalCmd, contextInterpreter.getResourcePool()) : originalCmd;
     logger.debug("Run SQL command '{}'", cmd);
     String propertyKey = getPropertyKey(contextInterpreter);
     cmd = cmd.trim();
@@ -837,7 +803,7 @@ public class JDBCInterpreter extends KerberosInterpreter {
     logger.info("Cancel current query statement.");
     String paragraphId = context.getParagraphId();
     JDBCUserConfigurations jdbcUserConfigurations =
-        getJDBCConfiguration(context.getAuthenticationInfo().getUser());
+            getJDBCConfiguration(context.getAuthenticationInfo().getUser());
     try {
       jdbcUserConfigurations.cancelStatement(paragraphId);
     } catch (SQLException e) {
@@ -873,15 +839,15 @@ public class JDBCInterpreter extends KerberosInterpreter {
   @Override
   public Scheduler getScheduler() {
     String schedulerName = JDBCInterpreter.class.getName() + this.hashCode();
-    return isConcurrentExecution()
-        ? SchedulerFactory.singleton()
-            .createOrGetParallelScheduler(schedulerName, getMaxConcurrentConnection())
-        : SchedulerFactory.singleton().createOrGetFIFOScheduler(schedulerName);
+    return isConcurrentExecution() ?
+            SchedulerFactory.singleton().createOrGetParallelScheduler(schedulerName,
+                getMaxConcurrentConnection())
+            : SchedulerFactory.singleton().createOrGetFIFOScheduler(schedulerName);
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) throws InterpreterException {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) throws InterpreterException {
     List<InterpreterCompletion> candidates = new ArrayList<>();
     String propertyKey = getPropertyKey(interpreterContext);
     String sqlCompleterKey =

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCUserConfigurations.java
----------------------------------------------------------------------
diff --git a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCUserConfigurations.java b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCUserConfigurations.java
index e584c06..4eac9fc 100644
--- a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCUserConfigurations.java
+++ b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCUserConfigurations.java
@@ -5,24 +5,28 @@
  * "License"); you may not use this file except in compliance with the License. You may obtain a
  * copy of the License at
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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.
+ * 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.jdbc;
 
+import org.apache.commons.dbcp2.PoolingDriver;
+
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
-import org.apache.commons.dbcp2.PoolingDriver;
+
 import org.apache.zeppelin.user.UsernamePassword;
 
-/** UserConfigurations for JDBC impersonation. */
+/**
+ * UserConfigurations for JDBC impersonation.
+ */
 public class JDBCUserConfigurations {
   private final Map<String, Statement> paragraphIdStatementMap;
   private final Map<String, PoolingDriver> poolingDriverMap;
@@ -83,7 +87,6 @@ public class JDBCUserConfigurations {
     poolingDriverMap.put(key, driver);
     isSuccessful.put(key, false);
   }
-
   public PoolingDriver removeDBDriverPool(String key) throws SQLException {
     isSuccessful.remove(key);
     return poolingDriverMap.remove(key);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/jdbc/src/main/java/org/apache/zeppelin/jdbc/SqlCompleter.java
----------------------------------------------------------------------
diff --git a/jdbc/src/main/java/org/apache/zeppelin/jdbc/SqlCompleter.java b/jdbc/src/main/java/org/apache/zeppelin/jdbc/SqlCompleter.java
index 0f7f01e..9f52ecb 100644
--- a/jdbc/src/main/java/org/apache/zeppelin/jdbc/SqlCompleter.java
+++ b/jdbc/src/main/java/org/apache/zeppelin/jdbc/SqlCompleter.java
@@ -4,6 +4,11 @@ package org.apache.zeppelin.jdbc;
  * This source file is based on code taken from SQLLine 1.0.2 See SQLLine notice in LICENSE
  */
 
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.math.NumberUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
@@ -21,47 +26,54 @@ import java.util.Set;
 import java.util.StringTokenizer;
 import java.util.TreeSet;
 import java.util.regex.Pattern;
+
 import jline.console.completer.ArgumentCompleter.ArgumentList;
 import jline.console.completer.ArgumentCompleter.WhitespaceArgumentDelimiter;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.lang.math.NumberUtils;
+
 import org.apache.zeppelin.completer.CachedCompleter;
 import org.apache.zeppelin.completer.CompletionType;
 import org.apache.zeppelin.completer.StringsCompleter;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** SQL auto complete functionality for the JdbcInterpreter. */
+/**
+ * SQL auto complete functionality for the JdbcInterpreter.
+ */
 public class SqlCompleter {
   private static Logger logger = LoggerFactory.getLogger(SqlCompleter.class);
 
-  /** Delimiter that can split SQL statement in keyword list. */
-  private WhitespaceArgumentDelimiter sqlDelimiter =
-      new WhitespaceArgumentDelimiter() {
+  /**
+   * Delimiter that can split SQL statement in keyword list.
+   */
+  private WhitespaceArgumentDelimiter sqlDelimiter = new WhitespaceArgumentDelimiter() {
 
-        private Pattern pattern = Pattern.compile(",");
+    private Pattern pattern = Pattern.compile(",");
 
-        @Override
-        public boolean isDelimiterChar(CharSequence buffer, int pos) {
-          return pattern.matcher("" + buffer.charAt(pos)).matches()
+    @Override
+    public boolean isDelimiterChar(CharSequence buffer, int pos) {
+      return pattern.matcher("" + buffer.charAt(pos)).matches()
               || super.isDelimiterChar(buffer, pos);
-        }
-      };
+    }
+  };
 
-  /** Schema completer. */
+  /**
+   * Schema completer.
+   */
   private CachedCompleter schemasCompleter;
 
-  /** Contain different completer with table list for every schema name. */
+  /**
+   * Contain different completer with table list for every schema name.
+   */
   private Map<String, CachedCompleter> tablesCompleters = new HashMap<>();
 
   /**
-   * Contains different completer with column list for every table name Table names store as
-   * schema_name.table_name.
+   * Contains different completer with column list for every table name
+   * Table names store as schema_name.table_name.
    */
   private Map<String, CachedCompleter> columnsCompleters = new HashMap<>();
 
-  /** Completer for sql keywords. */
+  /**
+   * Completer for sql keywords.
+   */
   private CachedCompleter keywordCompleter;
 
   private int ttlInSeconds;
@@ -87,11 +99,7 @@ public class SqlCompleter {
       argumentPosition = argumentList.getArgumentPosition();
     }
 
-    int complete =
-        completeName(
-            cursorArgument,
-            argumentPosition,
-            candidates,
+    int complete = completeName(cursorArgument, argumentPosition, candidates,
             findAliasesInSQL(argumentList.getArguments()));
 
     logger.debug("complete:" + complete + ", size:" + candidates.size());
@@ -102,9 +110,10 @@ public class SqlCompleter {
    * Return list of schema names within the database.
    *
    * @param meta metadata from connection to database
-   * @param schemaFilters a schema name patterns; must match the schema name as it is stored in the
-   *     database; "" retrieves those without a schema; <code>null</code> means that the schema name
-   *     should not be used to narrow the search; supports '%'; for example "prod_v_%"
+   * @param schemaFilters a schema name patterns; must match the schema name
+   *        as it is stored in the database; "" retrieves those without a schema;
+   *        <code>null</code> means that the schema name should not be used to narrow
+   *        the search; supports '%'; for example "prod_v_%"
    * @return set of all schema names in the database
    */
   private static Set<String> getSchemaNames(DatabaseMetaData meta, List<String> schemaFilters) {
@@ -137,9 +146,10 @@ public class SqlCompleter {
    * Return list of catalog names within the database.
    *
    * @param meta metadata from connection to database
-   * @param schemaFilters a catalog name patterns; must match the catalog name as it is stored in
-   *     the database; "" retrieves those without a catalog; <code>null</code> means that the schema
-   *     name should not be used to narrow the search; supports '%'; for example "prod_v_%"
+   * @param schemaFilters a catalog name patterns; must match the catalog name
+   *        as it is stored in the database; "" retrieves those without a catalog;
+   *        <code>null</code> means that the schema name should not be used to narrow
+   *        the search; supports '%'; for example "prod_v_%"
    * @return set of all catalog names in the database
    */
   private static Set<String> getCatalogNames(DatabaseMetaData meta, List<String> schemaFilters) {
@@ -165,14 +175,8 @@ public class SqlCompleter {
   }
 
   private static void fillTableNames(String schema, DatabaseMetaData meta, Set<String> tables) {
-    try (ResultSet tbls =
-        meta.getTables(
-            schema,
-            schema,
-            "%",
-            new String[] {
-              "TABLE", "VIEW", "ALIAS", "SYNONYM", "GLOBAL TEMPORARY", "LOCAL TEMPORARY"
-            })) {
+    try (ResultSet tbls = meta.getTables(schema, schema, "%",
+        new String[]{"TABLE", "VIEW", "ALIAS", "SYNONYM", "GLOBAL TEMPORARY", "LOCAL TEMPORARY"})) {
       while (tbls.next()) {
         String table = tbls.getString("TABLE_NAME");
         tables.add(table);
@@ -188,11 +192,11 @@ public class SqlCompleter {
    * @param schema name of a scheme
    * @param table name of a table
    * @param meta meta metadata from connection to database
-   * @param columns function fills this set, for every table name adds set of columns within the
-   *     table; table name is in format schema_name.table_name
+   * @param columns function fills this set, for every table name adds set
+   *        of columns within the table; table name is in format schema_name.table_name
    */
-  private static void fillColumnNames(
-      String schema, String table, DatabaseMetaData meta, Set<String> columns) {
+  private static void fillColumnNames(String schema, String table, DatabaseMetaData meta,
+      Set<String> columns) {
     try (ResultSet cols = meta.getColumns(schema, schema, table, "%")) {
       while (cols.next()) {
         String column = cols.getString("COLUMN_NAME");
@@ -203,34 +207,31 @@ public class SqlCompleter {
     }
   }
 
-  public static Set<String> getSqlKeywordsCompletions(DatabaseMetaData meta)
-      throws IOException, SQLException {
+  public static Set<String> getSqlKeywordsCompletions(DatabaseMetaData meta) throws IOException,
+          SQLException {
     // Add the default SQL completions
     String keywords =
-        new BufferedReader(
-                new InputStreamReader(SqlCompleter.class.getResourceAsStream("/ansi.sql.keywords")))
-            .readLine();
+            new BufferedReader(new InputStreamReader(
+                    SqlCompleter.class.getResourceAsStream("/ansi.sql.keywords"))).readLine();
 
     Set<String> completions = new TreeSet<>();
 
     if (null != meta) {
       // Add the driver specific SQL completions
       String driverSpecificKeywords =
-          "/" + meta.getDriverName().replace(" ", "-").toLowerCase() + "-sql.keywords";
+              "/" + meta.getDriverName().replace(" ", "-").toLowerCase() + "-sql.keywords";
       logger.info("JDBC DriverName:" + driverSpecificKeywords);
       try {
         if (SqlCompleter.class.getResource(driverSpecificKeywords) != null) {
           String driverKeywords =
-              new BufferedReader(
-                      new InputStreamReader(
+                  new BufferedReader(new InputStreamReader(
                           SqlCompleter.class.getResourceAsStream(driverSpecificKeywords)))
-                  .readLine();
+                          .readLine();
           keywords += "," + driverKeywords.toUpperCase();
         }
       } catch (Exception e) {
-        logger.debug(
-            "fail to get driver specific SQL completions for " + driverSpecificKeywords + " : " + e,
-            e);
+        logger.debug("fail to get driver specific SQL completions for " +
+                driverSpecificKeywords + " : " + e, e);
       }
 
       // Add the keywords from the current JDBC connection
@@ -276,11 +277,11 @@ public class SqlCompleter {
    * Initializes all local completers from database connection.
    *
    * @param connection database connection
-   * @param schemaFiltersString a comma separated schema name patterns, supports '%' symbol; for
-   *     example "prod_v_%,prod_t_%"
+   * @param schemaFiltersString a comma separated schema name patterns, supports '%'  symbol;
+   *        for example "prod_v_%,prod_t_%"
    */
-  public void createOrUpdateFromConnection(
-      Connection connection, String schemaFiltersString, String buffer, int cursor) {
+  public void createOrUpdateFromConnection(Connection connection, String schemaFiltersString,
+      String buffer, int cursor) {
     try (Connection c = connection) {
       if (schemaFiltersString == null) {
         schemaFiltersString = StringUtils.EMPTY;
@@ -296,16 +297,14 @@ public class SqlCompleter {
 
       if (c != null) {
         DatabaseMetaData databaseMetaData = c.getMetaData();
-        if (keywordCompleter == null
-            || keywordCompleter.getCompleter() == null
+        if (keywordCompleter == null || keywordCompleter.getCompleter() == null
             || keywordCompleter.isExpired()) {
           keywords = getSqlKeywordsCompletions(databaseMetaData);
           initKeywords(keywords);
         }
-        if (cursorArgument.needLoadSchemas()
-            && (schemasCompleter == null
-                || schemasCompleter.getCompleter() == null
-                || schemasCompleter.isExpired())) {
+        if (cursorArgument.needLoadSchemas() &&
+            (schemasCompleter == null || schemasCompleter.getCompleter() == null
+            || schemasCompleter.isExpired())) {
           schemas = getSchemaNames(databaseMetaData, schemaFilters);
           catalogs = getCatalogNames(databaseMetaData, schemaFilters);
 
@@ -317,8 +316,8 @@ public class SqlCompleter {
         }
 
         CachedCompleter tablesCompleter = tablesCompleters.get(cursorArgument.getSchema());
-        if (cursorArgument.needLoadTables()
-            && (tablesCompleter == null || tablesCompleter.isExpired())) {
+        if (cursorArgument.needLoadTables() &&
+            (tablesCompleter == null || tablesCompleter.isExpired())) {
           fillTableNames(cursorArgument.getSchema(), databaseMetaData, tables);
           initTables(cursorArgument.getSchema(), tables);
         }
@@ -327,21 +326,15 @@ public class SqlCompleter {
             String.format("%s.%s", cursorArgument.getSchema(), cursorArgument.getTable());
         CachedCompleter columnsCompleter = columnsCompleters.get(schemaTable);
 
-        if (cursorArgument.needLoadColumns()
-            && (columnsCompleter == null || columnsCompleter.isExpired())) {
-          fillColumnNames(
-              cursorArgument.getSchema(), cursorArgument.getTable(), databaseMetaData, columns);
+        if (cursorArgument.needLoadColumns() &&
+            (columnsCompleter == null || columnsCompleter.isExpired())) {
+          fillColumnNames(cursorArgument.getSchema(), cursorArgument.getTable(), databaseMetaData,
+              columns);
           initColumns(schemaTable, columns);
         }
 
-        logger.info(
-            "Completer initialized with "
-                + schemas.size()
-                + " schemas, "
-                + columns.size()
-                + " tables and "
-                + keywords.size()
-                + " keywords");
+        logger.info("Completer initialized with " + schemas.size() + " schemas, " +
+            columns.size() + " tables and " + keywords.size() + " keywords");
       }
 
     } catch (SQLException | IOException e) {
@@ -357,22 +350,22 @@ public class SqlCompleter {
 
   public void initSchemas(Set<String> schemas) {
     if (schemas != null && !schemas.isEmpty()) {
-      schemasCompleter =
-          new CachedCompleter(new StringsCompleter(new TreeSet<>(schemas)), ttlInSeconds);
+      schemasCompleter = new CachedCompleter(
+          new StringsCompleter(new TreeSet<>(schemas)), ttlInSeconds);
     }
   }
 
   public void initTables(String schema, Set<String> tables) {
     if (tables != null && !tables.isEmpty()) {
-      tablesCompleters.put(
-          schema, new CachedCompleter(new StringsCompleter(new TreeSet<>(tables)), ttlInSeconds));
+      tablesCompleters.put(schema, new CachedCompleter(
+          new StringsCompleter(new TreeSet<>(tables)), ttlInSeconds));
     }
   }
 
   public void initColumns(String schemaTable, Set<String> columns) {
     if (columns != null && !columns.isEmpty()) {
-      columnsCompleters.put(
-          schemaTable, new CachedCompleter(new StringsCompleter(columns), ttlInSeconds));
+      columnsCompleters.put(schemaTable,
+          new CachedCompleter(new StringsCompleter(columns), ttlInSeconds));
     }
   }
 
@@ -385,8 +378,8 @@ public class SqlCompleter {
   public Map<String, String> findAliasesInSQL(String[] sqlArguments) {
     Map<String, String> res = new HashMap<>();
     for (int i = 0; i < sqlArguments.length - 1; i++) {
-      if (columnsCompleters.keySet().contains(sqlArguments[i])
-          && sqlArguments[i + 1].matches("[a-zA-Z]+")) {
+      if (columnsCompleters.keySet().contains(sqlArguments[i]) &&
+              sqlArguments[i + 1].matches("[a-zA-Z]+")) {
         res.put(sqlArguments[i + 1], sqlArguments[i]);
       }
     }
@@ -416,8 +409,8 @@ public class SqlCompleter {
    *
    * @return -1 in case of no candidates found, 0 otherwise
    */
-  private int completeTable(
-      String schema, String buffer, int cursor, List<CharSequence> candidates) {
+  private int completeTable(String schema, String buffer, int cursor,
+                            List<CharSequence> candidates) {
     // Wrong schema
     if (schema == null || !tablesCompleters.containsKey(schema)) {
       return -1;
@@ -431,31 +424,26 @@ public class SqlCompleter {
    *
    * @return -1 in case of no candidates found, 0 otherwise
    */
-  private int completeColumn(
-      String schema, String table, String buffer, int cursor, List<CharSequence> candidates) {
+  private int completeColumn(String schema, String table, String buffer, int cursor,
+                             List<CharSequence> candidates) {
     // Wrong schema or wrong table
     if (schema == null || table == null || !columnsCompleters.containsKey(schema + "." + table)) {
       return -1;
     } else {
-      return columnsCompleters
-          .get(schema + "." + table)
-          .getCompleter()
+      return columnsCompleters.get(schema + "." + table).getCompleter()
           .complete(buffer, cursor, candidates);
     }
   }
 
   /**
-   * Complete buffer with a single name. Function will decide what it is: a schema, a table of a
-   * column or a keyword
+   * Complete buffer with a single name. Function will decide what it is:
+   * a schema, a table of a column or a keyword
    *
    * @param aliases for every alias contains table name in format schema_name.table_name
    * @return -1 in case of no candidates found, 0 otherwise
    */
-  public int completeName(
-      String buffer,
-      int cursor,
-      List<InterpreterCompletion> candidates,
-      Map<String, String> aliases) {
+  public int completeName(String buffer, int cursor, List<InterpreterCompletion> candidates,
+                          Map<String, String> aliases) {
     CursorArgument cursorArgument = parseCursorArgument(buffer, cursor);
 
     // find schema and table name if they are
@@ -463,42 +451,40 @@ public class SqlCompleter {
     String table;
     String column;
 
-    if (cursorArgument.getSchema() == null) { // process all
+    if (cursorArgument.getSchema() == null) {             // process all
       List<CharSequence> keywordsCandidates = new ArrayList();
       List<CharSequence> schemaCandidates = new ArrayList<>();
       int keywordsRes = completeKeyword(buffer, cursor, keywordsCandidates);
       int schemaRes = completeSchema(buffer, cursor, schemaCandidates);
       addCompletions(candidates, keywordsCandidates, CompletionType.keyword.name());
       addCompletions(candidates, schemaCandidates, CompletionType.schema.name());
-      return NumberUtils.max(new int[] {keywordsRes, schemaRes});
+      return NumberUtils.max(new int[]{keywordsRes, schemaRes});
     } else {
       schema = cursorArgument.getSchema();
-      if (aliases.containsKey(schema)) { // process alias case
+      if (aliases.containsKey(schema)) {  // process alias case
         String alias = aliases.get(schema);
         int pointPos = alias.indexOf('.');
         schema = alias.substring(0, pointPos);
         table = alias.substring(pointPos + 1);
         column = cursorArgument.getColumn();
         List<CharSequence> columnCandidates = new ArrayList();
-        int columnRes =
-            completeColumn(
-                schema, table, column, cursorArgument.getCursorPosition(), columnCandidates);
+        int columnRes = completeColumn(schema, table, column, cursorArgument.getCursorPosition(),
+            columnCandidates);
         addCompletions(candidates, columnCandidates, CompletionType.column.name());
         // process schema.table case
       } else if (cursorArgument.getTable() != null && cursorArgument.getColumn() == null) {
         List<CharSequence> tableCandidates = new ArrayList();
         table = cursorArgument.getTable();
-        int tableRes =
-            completeTable(schema, table, cursorArgument.getCursorPosition(), tableCandidates);
+        int tableRes = completeTable(schema, table, cursorArgument.getCursorPosition(),
+            tableCandidates);
         addCompletions(candidates, tableCandidates, CompletionType.table.name());
         return tableRes;
       } else {
         List<CharSequence> columnCandidates = new ArrayList();
         table = cursorArgument.getTable();
         column = cursorArgument.getColumn();
-        int columnRes =
-            completeColumn(
-                schema, table, column, cursorArgument.getCursorPosition(), columnCandidates);
+        int columnRes = completeColumn(schema, table, column, cursorArgument.getCursorPosition(),
+            columnCandidates);
         addCompletions(candidates, columnCandidates, CompletionType.column.name());
       }
     }
@@ -511,13 +497,11 @@ public class SqlCompleter {
     return this.sqlDelimiter;
   }
 
-  private void addCompletions(
-      List<InterpreterCompletion> interpreterCompletions,
-      List<CharSequence> candidates,
-      String meta) {
+  private void addCompletions(List<InterpreterCompletion> interpreterCompletions,
+      List<CharSequence> candidates, String meta) {
     for (CharSequence candidate : candidates) {
-      interpreterCompletions.add(
-          new InterpreterCompletion(candidate.toString(), candidate.toString(), meta));
+      interpreterCompletions.add(new InterpreterCompletion(candidate.toString(),
+          candidate.toString(), meta));
     }
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/jdbc/src/main/java/org/apache/zeppelin/jdbc/security/JDBCSecurityImpl.java
----------------------------------------------------------------------
diff --git a/jdbc/src/main/java/org/apache/zeppelin/jdbc/security/JDBCSecurityImpl.java b/jdbc/src/main/java/org/apache/zeppelin/jdbc/security/JDBCSecurityImpl.java
index 22f4703..b093ab2 100644
--- a/jdbc/src/main/java/org/apache/zeppelin/jdbc/security/JDBCSecurityImpl.java
+++ b/jdbc/src/main/java/org/apache/zeppelin/jdbc/security/JDBCSecurityImpl.java
@@ -19,29 +19,31 @@ package org.apache.zeppelin.jdbc.security;
 import static org.apache.hadoop.security.UserGroupInformation.AuthenticationMethod.KERBEROS;
 import static org.apache.hadoop.security.UserGroupInformation.AuthenticationMethod.SIMPLE;
 
-import java.io.IOException;
-import java.util.Properties;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.UserGroupInformation.AuthenticationMethod;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Created for org.apache.zeppelin.jdbc.security on 09/07/16. */
+import java.io.IOException;
+import java.util.Properties;
+
+/**
+ * Created for org.apache.zeppelin.jdbc.security on 09/07/16.
+ */
 public class JDBCSecurityImpl {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(JDBCSecurityImpl.class);
 
-  /**
-   * *
-   *
+  /***
    * @param properties
    */
-  public static void createSecureConfiguration(
-      Properties properties, AuthenticationMethod authType) {
+  public static void createSecureConfiguration(Properties properties,
+      AuthenticationMethod authType) {
     switch (authType) {
       case KERBEROS:
-        Configuration conf = new org.apache.hadoop.conf.Configuration();
+        Configuration conf = new
+            org.apache.hadoop.conf.Configuration();
         conf.set("hadoop.security.authentication", KERBEROS.toString());
         UserGroupInformation.setConfiguration(conf);
         try {
@@ -55,13 +57,12 @@ public class JDBCSecurityImpl {
                 properties.getProperty("zeppelin.jdbc.principal"),
                 properties.getProperty("zeppelin.jdbc.keytab.location"));
           } else {
-            LOGGER.info(
-                "The user has already logged in using Keytab and principal, "
-                    + "no action required");
+            LOGGER.info("The user has already logged in using Keytab and principal, " +
+                "no action required");
           }
         } catch (IOException e) {
-          LOGGER.error(
-              "Failed to get either keytab location or principal name in the " + "interpreter", e);
+          LOGGER.error("Failed to get either keytab location or principal name in the " +
+              "interpreter", e);
         }
     }
   }
@@ -69,14 +70,11 @@ public class JDBCSecurityImpl {
   public static AuthenticationMethod getAuthtype(Properties properties) {
     AuthenticationMethod authType;
     try {
-      authType =
-          AuthenticationMethod.valueOf(
-              properties.getProperty("zeppelin.jdbc.auth.type").trim().toUpperCase());
+      authType = AuthenticationMethod.valueOf(properties.getProperty("zeppelin.jdbc.auth.type")
+          .trim().toUpperCase());
     } catch (Exception e) {
-      LOGGER.error(
-          String.format(
-              "Invalid auth.type detected with value %s, defaulting " + "auth.type to SIMPLE",
-              properties.getProperty("zeppelin.jdbc.auth.type")));
+      LOGGER.error(String.format("Invalid auth.type detected with value %s, defaulting " +
+          "auth.type to SIMPLE", properties.getProperty("zeppelin.jdbc.auth.type")));
       authType = SIMPLE;
     }
     return authType;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/jdbc/src/test/java/org/apache/zeppelin/jdbc/JDBCInterpreterInterpolationTest.java
----------------------------------------------------------------------
diff --git a/jdbc/src/test/java/org/apache/zeppelin/jdbc/JDBCInterpreterInterpolationTest.java b/jdbc/src/test/java/org/apache/zeppelin/jdbc/JDBCInterpreterInterpolationTest.java
index d602f95..d55f9fe 100644
--- a/jdbc/src/test/java/org/apache/zeppelin/jdbc/JDBCInterpreterInterpolationTest.java
+++ b/jdbc/src/test/java/org/apache/zeppelin/jdbc/JDBCInterpreterInterpolationTest.java
@@ -5,26 +5,16 @@
  * "License"); you may not use this file except in compliance with the License. You may obtain a
  * copy of the License at
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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.
+ * 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.jdbc;
 
-import static java.lang.String.format;
-import static org.junit.Assert.assertEquals;
-
 import com.mockrunner.jdbc.BasicJDBCTestCaseAdapter;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.Statement;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.resource.LocalResourcePool;
@@ -33,7 +23,20 @@ import org.apache.zeppelin.user.AuthenticationInfo;
 import org.junit.Before;
 import org.junit.Test;
 
-/** JDBC interpreter Z-variable interpolation unit tests. */
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.Statement;
+import java.util.Properties;
+
+import static java.lang.String.format;
+import static org.junit.Assert.assertEquals;
+
+/**
+ * JDBC interpreter Z-variable interpolation unit tests.
+ */
 public class JDBCInterpreterInterpolationTest extends BasicJDBCTestCaseAdapter {
 
   private static String jdbcConnection;
@@ -55,24 +58,22 @@ public class JDBCInterpreterInterpolationTest extends BasicJDBCTestCaseAdapter {
     Connection connection = DriverManager.getConnection(getJdbcConnection());
     Statement statement = connection.createStatement();
     statement.execute(
-        "DROP TABLE IF EXISTS test_table; "
-            + "CREATE TABLE test_table(id varchar(255), name varchar(255));");
+          "DROP TABLE IF EXISTS test_table; " +
+          "CREATE TABLE test_table(id varchar(255), name varchar(255));");
 
     Statement insertStatement = connection.createStatement();
-    insertStatement.execute(
-        "insert into test_table(id, name) values "
-            + "('pro', 'processor'),"
-            + "('mem', 'memory'),"
-            + "('key', 'keyboard'),"
-            + "('mou', 'mouse');");
+    insertStatement.execute("insert into test_table(id, name) values " +
+                "('pro', 'processor')," +
+                "('mem', 'memory')," +
+                "('key', 'keyboard')," +
+                "('mou', 'mouse');");
     resourcePool = new LocalResourcePool("JdbcInterpolationTest");
 
-    interpreterContext =
-        InterpreterContext.builder()
-            .setParagraphId("paragraph_1")
-            .setAuthenticationInfo(new AuthenticationInfo("testUser"))
-            .setResourcePool(resourcePool)
-            .build();
+    interpreterContext = InterpreterContext.builder()
+        .setParagraphId("paragraph_1")
+        .setAuthenticationInfo(new AuthenticationInfo("testUser"))
+        .setResourcePool(resourcePool)
+        .build();
   }
 
   @Test
@@ -109,7 +110,8 @@ public class JDBCInterpreterInterpolationTest extends BasicJDBCTestCaseAdapter {
     assertEquals(InterpreterResult.Code.SUCCESS, interpreterResult.code());
     assertEquals(InterpreterResult.Type.TABLE, interpreterResult.message().get(0).getType());
     assertEquals(1, interpreterResult.message().size());
-    assertEquals("ID\tNAME\nmem\tmemory\n", interpreterResult.message().get(0).getData());
+    assertEquals("ID\tNAME\nmem\tmemory\n",
+            interpreterResult.message().get(0).getData());
   }
 
   @Test
@@ -147,7 +149,8 @@ public class JDBCInterpreterInterpolationTest extends BasicJDBCTestCaseAdapter {
     assertEquals(InterpreterResult.Code.SUCCESS, interpreterResult.code());
     assertEquals(InterpreterResult.Type.TABLE, interpreterResult.message().get(0).getType());
     assertEquals(1, interpreterResult.message().size());
-    assertEquals("ID\tNAME\nkey\tkeyboard\n", interpreterResult.message().get(0).getData());
+    assertEquals("ID\tNAME\nkey\tkeyboard\n",
+            interpreterResult.message().get(0).getData());
   }
 
   @Test
@@ -174,7 +177,8 @@ public class JDBCInterpreterInterpolationTest extends BasicJDBCTestCaseAdapter {
     assertEquals(InterpreterResult.Code.SUCCESS, interpreterResult.code());
     assertEquals(InterpreterResult.Type.TABLE, interpreterResult.message().get(0).getType());
     assertEquals(1, interpreterResult.message().size());
-    assertEquals(
-        "ID\tNAME\nkey\tkeyboard\nmou\tmouse\n", interpreterResult.message().get(0).getData());
+    assertEquals("ID\tNAME\nkey\tkeyboard\nmou\tmouse\n", 
+                 interpreterResult.message().get(0).getData());
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/jdbc/src/test/java/org/apache/zeppelin/jdbc/JDBCInterpreterTest.java
----------------------------------------------------------------------
diff --git a/jdbc/src/test/java/org/apache/zeppelin/jdbc/JDBCInterpreterTest.java b/jdbc/src/test/java/org/apache/zeppelin/jdbc/JDBCInterpreterTest.java
index f66e2dd..62f6550 100644
--- a/jdbc/src/test/java/org/apache/zeppelin/jdbc/JDBCInterpreterTest.java
+++ b/jdbc/src/test/java/org/apache/zeppelin/jdbc/JDBCInterpreterTest.java
@@ -5,31 +5,36 @@
  * "License"); you may not use this file except in compliance with the License. You may obtain a
  * copy of the License at
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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.
+ * 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.jdbc;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
 import static java.lang.String.format;
+
 import static org.apache.zeppelin.jdbc.JDBCInterpreter.COMMON_MAX_LINE;
 import static org.apache.zeppelin.jdbc.JDBCInterpreter.DEFAULT_DRIVER;
 import static org.apache.zeppelin.jdbc.JDBCInterpreter.DEFAULT_PASSWORD;
-import static org.apache.zeppelin.jdbc.JDBCInterpreter.DEFAULT_PRECODE;
 import static org.apache.zeppelin.jdbc.JDBCInterpreter.DEFAULT_STATEMENT_PRECODE;
-import static org.apache.zeppelin.jdbc.JDBCInterpreter.DEFAULT_URL;
 import static org.apache.zeppelin.jdbc.JDBCInterpreter.DEFAULT_USER;
+import static org.apache.zeppelin.jdbc.JDBCInterpreter.DEFAULT_URL;
+import static org.apache.zeppelin.jdbc.JDBCInterpreter.DEFAULT_PRECODE;
 import static org.apache.zeppelin.jdbc.JDBCInterpreter.PRECODE_KEY_TEMPLATE;
+
+import org.junit.Before;
+import org.junit.Test;
 import static org.apache.zeppelin.jdbc.JDBCInterpreter.STATEMENT_PRECODE_KEY_TEMPLATE;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
 
-import com.mockrunner.jdbc.BasicJDBCTestCaseAdapter;
+
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
@@ -42,6 +47,9 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
+
+import com.mockrunner.jdbc.BasicJDBCTestCaseAdapter;
+
 import org.apache.zeppelin.completer.CompletionType;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -53,10 +61,10 @@ import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.user.AuthenticationInfo;
 import org.apache.zeppelin.user.UserCredentials;
 import org.apache.zeppelin.user.UsernamePassword;
-import org.junit.Before;
-import org.junit.Test;
 
-/** JDBC interpreter unit tests. */
+/**
+ * JDBC interpreter unit tests.
+ */
 public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
   static String jdbcConnection;
   InterpreterContext interpreterContext;
@@ -87,36 +95,40 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
     Connection connection = DriverManager.getConnection(getJdbcConnection());
     Statement statement = connection.createStatement();
     statement.execute(
-        "DROP TABLE IF EXISTS test_table; "
-            + "CREATE TABLE test_table(id varchar(255), name varchar(255));");
+        "DROP TABLE IF EXISTS test_table; " +
+        "CREATE TABLE test_table(id varchar(255), name varchar(255));");
 
-    PreparedStatement insertStatement =
-        connection.prepareStatement(
+    PreparedStatement insertStatement = connection.prepareStatement(
             "insert into test_table(id, name) values ('a', 'a_name'),('b', 'b_name'),('c', ?);");
     insertStatement.setString(1, null);
     insertStatement.execute();
-    interpreterContext =
-        InterpreterContext.builder()
-            .setAuthenticationInfo(new AuthenticationInfo("testUser"))
-            .build();
+    interpreterContext = InterpreterContext.builder()
+        .setAuthenticationInfo(new AuthenticationInfo("testUser"))
+        .build();
   }
 
+
   @Test
   public void testForParsePropertyKey() {
     JDBCInterpreter t = new JDBCInterpreter(new Properties());
     Map<String, String> localProperties = new HashMap<>();
-    InterpreterContext interpreterContext =
-        InterpreterContext.builder().setLocalProperties(localProperties).build();
+    InterpreterContext interpreterContext = InterpreterContext.builder()
+        .setLocalProperties(localProperties)
+        .build();
     assertEquals(JDBCInterpreter.DEFAULT_KEY, t.getPropertyKey(interpreterContext));
 
     localProperties = new HashMap<>();
     localProperties.put("db", "mysql");
-    interpreterContext = InterpreterContext.builder().setLocalProperties(localProperties).build();
+    interpreterContext = InterpreterContext.builder()
+        .setLocalProperties(localProperties)
+        .build();
     assertEquals("mysql", t.getPropertyKey(interpreterContext));
 
     localProperties = new HashMap<>();
     localProperties.put("hive", "hive");
-    interpreterContext = InterpreterContext.builder().setLocalProperties(localProperties).build();
+    interpreterContext = InterpreterContext.builder()
+        .setLocalProperties(localProperties)
+        .build();
     assertEquals("hive", t.getPropertyKey(interpreterContext));
   }
 
@@ -135,11 +147,10 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
     String sqlQuery = "select * from test_table";
     Map<String, String> localProperties = new HashMap<>();
     localProperties.put("db", "fake");
-    InterpreterContext context =
-        InterpreterContext.builder()
-            .setAuthenticationInfo(new AuthenticationInfo("testUser"))
-            .setLocalProperties(localProperties)
-            .build();
+    InterpreterContext context = InterpreterContext.builder()
+        .setAuthenticationInfo(new AuthenticationInfo("testUser"))
+        .setLocalProperties(localProperties)
+        .build();
     InterpreterResult interpreterResult = t.interpret(sqlQuery, context);
 
     // if prefix not found return ERROR and Prefix not found.
@@ -181,17 +192,17 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
 
   @Test
   public void testSplitSqlQuery() throws SQLException, IOException {
-    String sqlQuery =
-        "insert into test_table(id, name) values ('a', ';\"');"
-            + "select * from test_table;"
-            + "select * from test_table WHERE ID = \";'\";"
-            + "select * from test_table WHERE ID = ';';"
-            + "select '\n', ';';"
-            + "select replace('A\\;B', '\\', 'text');"
-            + "select '\\', ';';"
-            + "select '''', ';';"
-            + "select /*+ scan */ * from test_table;"
-            + "--singleLineComment\nselect * from test_table";
+    String sqlQuery = "insert into test_table(id, name) values ('a', ';\"');" +
+        "select * from test_table;" +
+        "select * from test_table WHERE ID = \";'\";" +
+        "select * from test_table WHERE ID = ';';" +
+        "select '\n', ';';" +
+        "select replace('A\\;B', '\\', 'text');" +
+        "select '\\', ';';" +
+        "select '''', ';';" +
+        "select /*+ scan */ * from test_table;" +
+        "--singleLineComment\nselect * from test_table";
+
 
     Properties properties = new Properties();
     JDBCInterpreter t = new JDBCInterpreter(properties);
@@ -212,11 +223,10 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
 
   @Test
   public void testQueryWithEscapedCharacters() throws SQLException, IOException {
-    String sqlQuery =
-        "select '\\n', ';';"
-            + "select replace('A\\;B', '\\', 'text');"
-            + "select '\\', ';';"
-            + "select '''', ';'";
+    String sqlQuery = "select '\\n', ';';" +
+        "select replace('A\\;B', '\\', 'text');" +
+        "select '\\', ';';" +
+        "select '''', ';'";
 
     Properties properties = new Properties();
     properties.setProperty("common.max_count", "1000");
@@ -255,14 +265,15 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
     JDBCInterpreter t = new JDBCInterpreter(properties);
     t.open();
 
-    String sqlQuery = "select * from test_table;" + "select * from test_table WHERE ID = ';';";
+    String sqlQuery = "select * from test_table;" +
+        "select * from test_table WHERE ID = ';';";
     InterpreterResult interpreterResult = t.interpret(sqlQuery, interpreterContext);
     assertEquals(InterpreterResult.Code.SUCCESS, interpreterResult.code());
     assertEquals(2, interpreterResult.message().size());
 
     assertEquals(InterpreterResult.Type.TABLE, interpreterResult.message().get(0).getType());
-    assertEquals(
-        "ID\tNAME\na\ta_name\nb\tb_name\nc\tnull\n", interpreterResult.message().get(0).getData());
+    assertEquals("ID\tNAME\na\ta_name\nb\tb_name\nc\tnull\n",
+            interpreterResult.message().get(0).getData());
 
     assertEquals(InterpreterResult.Type.TABLE, interpreterResult.message().get(1).getType());
     assertEquals("ID\tNAME\n", interpreterResult.message().get(1).getData());
@@ -280,14 +291,15 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
     JDBCInterpreter t = new JDBCInterpreter(properties);
     t.open();
 
-    String sqlQuery = "select * from test_table;" + "select * from test_table WHERE ID = ';';";
+    String sqlQuery = "select * from test_table;" +
+        "select * from test_table WHERE ID = ';';";
     InterpreterResult interpreterResult = t.interpret(sqlQuery, interpreterContext);
     assertEquals(InterpreterResult.Code.SUCCESS, interpreterResult.code());
     assertEquals(1, interpreterResult.message().size());
 
     assertEquals(InterpreterResult.Type.TABLE, interpreterResult.message().get(0).getType());
-    assertEquals(
-        "ID\tNAME\na\ta_name\nb\tb_name\nc\tnull\n", interpreterResult.message().get(0).getData());
+    assertEquals("ID\tNAME\na\ta_name\nb\tb_name\nc\tnull\n",
+            interpreterResult.message().get(0).getData());
   }
 
   @Test
@@ -311,6 +323,7 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
     assertEquals("ID\tNAME\nc\tnull\n", interpreterResult.message().get(0).getData());
   }
 
+
   @Test
   public void testSelectQueryMaxResult() throws SQLException, IOException {
     Properties properties = new Properties();
@@ -371,11 +384,11 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
 
     jdbcInterpreter.interpret("", interpreterContext);
 
-    List<InterpreterCompletion> completionList =
-        jdbcInterpreter.completion("sel", 3, interpreterContext);
+    List<InterpreterCompletion> completionList = jdbcInterpreter.completion("sel", 3,
+            interpreterContext);
 
-    InterpreterCompletion correctCompletionKeyword =
-        new InterpreterCompletion("select", "select", CompletionType.keyword.name());
+    InterpreterCompletion correctCompletionKeyword = new InterpreterCompletion("select", "select",
+            CompletionType.keyword.name());
 
     assertEquals(1, completionList.size());
     assertEquals(true, completionList.contains(correctCompletionKeyword));
@@ -396,8 +409,8 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
     return properties;
   }
 
-  private AuthenticationInfo getUserAuth(
-      String user, String entityName, String dbUser, String dbPassword) {
+  private AuthenticationInfo getUserAuth(String user, String entityName, String dbUser,
+      String dbPassword) {
     UserCredentials userCredentials = new UserCredentials();
     if (entityName != null && dbUser != null && dbPassword != null) {
       UsernamePassword up = new UsernamePassword(dbUser, dbPassword);
@@ -427,11 +440,10 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
 
     // user1 runs jdbc1
     jdbc1.open();
-    InterpreterContext ctx1 =
-        InterpreterContext.builder()
-            .setAuthenticationInfo(user1Credential)
-            .setReplName("jdbc1")
-            .build();
+    InterpreterContext ctx1 = InterpreterContext.builder()
+        .setAuthenticationInfo(user1Credential)
+        .setReplName("jdbc1")
+        .build();
     jdbc1.interpret("", ctx1);
 
     JDBCUserConfigurations user1JDBC1Conf = jdbc1.getJDBCConfiguration("user1");
@@ -441,11 +453,10 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
 
     // user1 runs jdbc2
     jdbc2.open();
-    InterpreterContext ctx2 =
-        InterpreterContext.builder()
-            .setAuthenticationInfo(user1Credential)
-            .setReplName("jdbc2")
-            .build();
+    InterpreterContext ctx2 = InterpreterContext.builder()
+        .setAuthenticationInfo(user1Credential)
+        .setReplName("jdbc2")
+        .build();
     jdbc2.interpret("", ctx2);
 
     JDBCUserConfigurations user1JDBC2Conf = jdbc2.getJDBCConfiguration("user1");
@@ -455,11 +466,10 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
 
     // user2 runs jdbc1
     jdbc1.open();
-    InterpreterContext ctx3 =
-        InterpreterContext.builder()
-            .setAuthenticationInfo(user2Credential)
-            .setReplName("jdbc1")
-            .build();
+    InterpreterContext ctx3 = InterpreterContext.builder()
+        .setAuthenticationInfo(user2Credential)
+        .setReplName("jdbc1")
+        .build();
     jdbc1.interpret("", ctx3);
 
     JDBCUserConfigurations user2JDBC1Conf = jdbc1.getJDBCConfiguration("user2");
@@ -469,11 +479,10 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
 
     // user2 runs jdbc2
     jdbc2.open();
-    InterpreterContext ctx4 =
-        InterpreterContext.builder()
-            .setAuthenticationInfo(user2Credential)
-            .setReplName("jdbc2")
-            .build();
+    InterpreterContext ctx4 = InterpreterContext.builder()
+        .setAuthenticationInfo(user2Credential)
+        .setReplName("jdbc2")
+        .build();
     jdbc2.interpret("", ctx4);
 
     JDBCUserConfigurations user2JDBC2Conf = jdbc2.getJDBCConfiguration("user2");
@@ -489,9 +498,8 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
     properties.setProperty("default.url", getJdbcConnection());
     properties.setProperty("default.user", "");
     properties.setProperty("default.password", "");
-    properties.setProperty(
-        DEFAULT_PRECODE,
-        "create table test_precode (id int); insert into test_precode values (1);");
+    properties.setProperty(DEFAULT_PRECODE,
+            "create table test_precode (id int); insert into test_precode values (1);");
     JDBCInterpreter jdbcInterpreter = new JDBCInterpreter(properties);
     jdbcInterpreter.open();
     jdbcInterpreter.executePrecode(interpreterContext);
@@ -533,19 +541,17 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
     properties.setProperty("anotherPrefix.url", getJdbcConnection());
     properties.setProperty("anotherPrefix.user", "");
     properties.setProperty("anotherPrefix.password", "");
-    properties.setProperty(
-        String.format(PRECODE_KEY_TEMPLATE, "anotherPrefix"),
-        "create table test_precode_2 (id int); insert into test_precode_2 values (2);");
+    properties.setProperty(String.format(PRECODE_KEY_TEMPLATE, "anotherPrefix"),
+            "create table test_precode_2 (id int); insert into test_precode_2 values (2);");
     JDBCInterpreter jdbcInterpreter = new JDBCInterpreter(properties);
     jdbcInterpreter.open();
 
     Map<String, String> localProperties = new HashMap<>();
     localProperties.put("db", "anotherPrefix");
-    InterpreterContext context =
-        InterpreterContext.builder()
-            .setAuthenticationInfo(new AuthenticationInfo("testUser"))
-            .setLocalProperties(localProperties)
-            .build();
+    InterpreterContext context = InterpreterContext.builder()
+        .setAuthenticationInfo(new AuthenticationInfo("testUser"))
+        .setLocalProperties(localProperties)
+        .build();
     jdbcInterpreter.executePrecode(context);
 
     String sqlQuery = "select * from test_precode_2";
@@ -603,19 +609,17 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
     properties.setProperty("anotherPrefix.url", getJdbcConnection());
     properties.setProperty("anotherPrefix.user", "");
     properties.setProperty("anotherPrefix.password", "");
-    properties.setProperty(
-        String.format(STATEMENT_PRECODE_KEY_TEMPLATE, "anotherPrefix"),
-        "set @v='statementAnotherPrefix'");
+    properties.setProperty(String.format(STATEMENT_PRECODE_KEY_TEMPLATE, "anotherPrefix"),
+            "set @v='statementAnotherPrefix'");
     JDBCInterpreter jdbcInterpreter = new JDBCInterpreter(properties);
     jdbcInterpreter.open();
 
     Map<String, String> localProperties = new HashMap<>();
     localProperties.put("db", "anotherPrefix");
-    InterpreterContext context =
-        InterpreterContext.builder()
-            .setAuthenticationInfo(new AuthenticationInfo("testUser"))
-            .setLocalProperties(localProperties)
-            .build();
+    InterpreterContext context = InterpreterContext.builder()
+        .setAuthenticationInfo(new AuthenticationInfo("testUser"))
+        .setLocalProperties(localProperties)
+        .build();
 
     String sqlQuery = "select @v";
 
@@ -639,17 +643,16 @@ public class JDBCInterpreterTest extends BasicJDBCTestCaseAdapter {
     JDBCInterpreter t = new JDBCInterpreter(properties);
     t.open();
 
-    String sqlQuery =
-        "/* ; */\n"
-            + "-- /* comment\n"
-            + "--select * from test_table\n"
-            + "select * from test_table; /* some comment ; */\n"
-            + "/*\n"
-            + "select * from test_table;\n"
-            + "*/\n"
-            + "-- a ; b\n"
-            + "select * from test_table WHERE ID = ';--';\n"
-            + "select * from test_table WHERE ID = '/*' -- test";
+    String sqlQuery = "/* ; */\n" +
+        "-- /* comment\n" +
+        "--select * from test_table\n" +
+        "select * from test_table; /* some comment ; */\n" +
+        "/*\n" +
+        "select * from test_table;\n" +
+        "*/\n" +
+        "-- a ; b\n" +
+        "select * from test_table WHERE ID = ';--';\n" +
+        "select * from test_table WHERE ID = '/*' -- test";
 
     InterpreterResult interpreterResult = t.interpret(sqlQuery, interpreterContext);
     assertEquals(InterpreterResult.Code.SUCCESS, interpreterResult.code());


[06/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/socket/Message.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/socket/Message.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/socket/Message.java
index 0e8c4ed..06499f3 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/socket/Message.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/socket/Message.java
@@ -18,33 +18,38 @@
 package org.apache.zeppelin.notebook.socket;
 
 import com.google.gson.Gson;
-import java.util.HashMap;
-import java.util.Map;
 import org.apache.zeppelin.common.JsonSerializable;
 import org.slf4j.Logger;
 
-/** Zeppelin websocket massage template class. */
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Zeppelin websocket massage template class.
+ */
 public class Message implements JsonSerializable {
-  /** Representation of event type. */
+  /**
+   * Representation of event type.
+   */
   public static enum OP {
-    GET_HOME_NOTE, // [c-s] load note for home screen
+    GET_HOME_NOTE,    // [c-s] load note for home screen
 
-    GET_NOTE, // [c-s] client load note
-    // @param id note id
+    GET_NOTE,         // [c-s] client load note
+                      // @param id note id
 
-    NOTE, // [s-c] note info
-    // @param note serialized Note object
+    NOTE,             // [s-c] note info
+                      // @param note serialized Note object
 
-    PARAGRAPH, // [s-c] paragraph info
-    // @param paragraph serialized paragraph object
+    PARAGRAPH,        // [s-c] paragraph info
+                      // @param paragraph serialized paragraph object
 
-    PROGRESS, // [s-c] progress update
-    // @param id paragraph id
-    // @param progress percentage progress
+    PROGRESS,         // [s-c] progress update
+                      // @param id paragraph id
+                      // @param progress percentage progress
 
-    NEW_NOTE, // [c-s] create new notebook
-    DEL_NOTE, // [c-s] delete notebook
-    // @param id note id
+    NEW_NOTE,         // [c-s] create new notebook
+    DEL_NOTE,         // [c-s] delete notebook
+                      // @param id note id
     REMOVE_FOLDER,
     MOVE_NOTE_TO_TRASH,
     MOVE_FOLDER_TO_TRASH,
@@ -52,143 +57,143 @@ public class Message implements JsonSerializable {
     RESTORE_NOTE,
     RESTORE_ALL,
     EMPTY_TRASH,
-    CLONE_NOTE, // [c-s] clone new notebook
-    // @param id id of note to clone
-    // @param name name for the cloned note
-    IMPORT_NOTE, // [c-s] import notebook
-    // @param object notebook
+    CLONE_NOTE,       // [c-s] clone new notebook
+                      // @param id id of note to clone
+                      // @param name name for the cloned note
+    IMPORT_NOTE,      // [c-s] import notebook
+                      // @param object notebook
     NOTE_UPDATE,
 
     NOTE_RENAME,
 
     UPDATE_PERSONALIZED_MODE, // [c-s] update personalized mode (boolean)
-    // @param note id and boolean personalized mode value
+                              // @param note id and boolean personalized mode value
 
     FOLDER_RENAME,
 
-    RUN_PARAGRAPH, // [c-s] run paragraph
-    // @param id paragraph id
-    // @param paragraph paragraph content.ie. script
-    // @param config paragraph config
-    // @param params paragraph params
+    RUN_PARAGRAPH,    // [c-s] run paragraph
+                      // @param id paragraph id
+                      // @param paragraph paragraph content.ie. script
+                      // @param config paragraph config
+                      // @param params paragraph params
 
     COMMIT_PARAGRAPH, // [c-s] commit paragraph
-    // @param id paragraph id
-    // @param title paragraph title
-    // @param paragraph paragraph content.ie. script
-    // @param config paragraph config
-    // @param params paragraph params
+                      // @param id paragraph id
+                      // @param title paragraph title
+                      // @param paragraph paragraph content.ie. script
+                      // @param config paragraph config
+                      // @param params paragraph params
 
     CANCEL_PARAGRAPH, // [c-s] cancel paragraph run
-    // @param id paragraph id
+                      // @param id paragraph id
 
-    MOVE_PARAGRAPH, // [c-s] move paragraph order
-    // @param id paragraph id
-    // @param index index the paragraph want to go
+    MOVE_PARAGRAPH,   // [c-s] move paragraph order
+                      // @param id paragraph id
+                      // @param index index the paragraph want to go
 
     INSERT_PARAGRAPH, // [c-s] create new paragraph below current paragraph
-    // @param target index
+                      // @param target index
 
-    COPY_PARAGRAPH, // [c-s] create new para below current para as a copy of current para
-    // @param target index
-    // @param title paragraph title
-    // @param paragraph paragraph content.ie. script
-    // @param config paragraph config
-    // @param params paragraph params
+    COPY_PARAGRAPH,   // [c-s] create new para below current para as a copy of current para
+                      // @param target index
+                      // @param title paragraph title
+                      // @param paragraph paragraph content.ie. script
+                      // @param config paragraph config
+                      // @param params paragraph params
 
-    EDITOR_SETTING, // [c-s] ask paragraph editor setting
-    // @param magic magic keyword written in paragraph
-    // ex) spark.spark or spark
+    EDITOR_SETTING,   // [c-s] ask paragraph editor setting
+                      // @param magic magic keyword written in paragraph
+                      // ex) spark.spark or spark
 
-    COMPLETION, // [c-s] ask completion candidates
-    // @param id
-    // @param buf current code
-    // @param cursor cursor position in code
+    COMPLETION,       // [c-s] ask completion candidates
+                      // @param id
+                      // @param buf current code
+                      // @param cursor cursor position in code
 
-    COMPLETION_LIST, // [s-c] send back completion candidates list
-    // @param id
-    // @param completions list of string
+    COMPLETION_LIST,  // [s-c] send back completion candidates list
+                      // @param id
+                      // @param completions list of string
 
-    LIST_NOTES, // [c-s] ask list of note
-    RELOAD_NOTES_FROM_REPO, // [c-s] reload notes from repo
+    LIST_NOTES,                   // [c-s] ask list of note
+    RELOAD_NOTES_FROM_REPO,       // [c-s] reload notes from repo
 
-    NOTES_INFO, // [s-c] list of note infos
-    // @param notes serialized List<NoteInfo> object
+    NOTES_INFO,                   // [s-c] list of note infos
+                                  // @param notes serialized List<NoteInfo> object
 
     PARAGRAPH_REMOVE,
-    PARAGRAPH_CLEAR_OUTPUT, // [c-s] clear output of paragraph
-    PARAGRAPH_CLEAR_ALL_OUTPUT, // [c-s] clear output of all paragraphs
-    PARAGRAPH_APPEND_OUTPUT, // [s-c] append output
-    PARAGRAPH_UPDATE_OUTPUT, // [s-c] update (replace) output
+    PARAGRAPH_CLEAR_OUTPUT,       // [c-s] clear output of paragraph
+    PARAGRAPH_CLEAR_ALL_OUTPUT,   // [c-s] clear output of all paragraphs
+    PARAGRAPH_APPEND_OUTPUT,      // [s-c] append output
+    PARAGRAPH_UPDATE_OUTPUT,      // [s-c] update (replace) output
     PING,
     AUTH_INFO,
 
-    ANGULAR_OBJECT_UPDATE, // [s-c] add/update angular object
-    ANGULAR_OBJECT_REMOVE, // [s-c] add angular object del
+    ANGULAR_OBJECT_UPDATE,        // [s-c] add/update angular object
+    ANGULAR_OBJECT_REMOVE,        // [s-c] add angular object del
+    
+    ANGULAR_OBJECT_UPDATED,       // [c-s] angular object value updated,
 
-    ANGULAR_OBJECT_UPDATED, // [c-s] angular object value updated,
-
-    ANGULAR_OBJECT_CLIENT_BIND, // [c-s] angular object updated from AngularJS z object
+    ANGULAR_OBJECT_CLIENT_BIND,   // [c-s] angular object updated from AngularJS z object
 
     ANGULAR_OBJECT_CLIENT_UNBIND, // [c-s] angular object unbind from AngularJS z object
 
-    LIST_CONFIGURATIONS, // [c-s] ask all key/value pairs of configurations
-    CONFIGURATIONS_INFO, // [s-c] all key/value pairs of configurations
-    // @param settings serialized Map<String, String> object
-
-    CHECKPOINT_NOTE, // [c-s] checkpoint note to storage repository
-    // @param noteId
-    // @param checkpointName
-
-    LIST_REVISION_HISTORY, // [c-s] list revision history of the notebook
-    // @param noteId
-    NOTE_REVISION, // [c-s] get certain revision of note
-    // @param noteId
-    // @param revisionId
-    SET_NOTE_REVISION, // [c-s] set current notebook head to this revision
-    // @param noteId
-    // @param revisionId
-    NOTE_REVISION_FOR_COMPARE, // [c-s] get certain revision of note for compare
-    // @param noteId
-    // @param revisionId
-    // @param position
-    APP_APPEND_OUTPUT, // [s-c] append output
-    APP_UPDATE_OUTPUT, // [s-c] update (replace) output
-    APP_LOAD, // [s-c] on app load
-    APP_STATUS_CHANGE, // [s-c] on app status change
-
-    LIST_NOTE_JOBS, // [c-s] get note job management information
-    LIST_UPDATE_NOTE_JOBS, // [c-s] get job management information for until unixtime
+    LIST_CONFIGURATIONS,          // [c-s] ask all key/value pairs of configurations
+    CONFIGURATIONS_INFO,          // [s-c] all key/value pairs of configurations
+                                  // @param settings serialized Map<String, String> object
+
+    CHECKPOINT_NOTE,              // [c-s] checkpoint note to storage repository
+                                  // @param noteId
+                                  // @param checkpointName
+
+    LIST_REVISION_HISTORY,        // [c-s] list revision history of the notebook
+                                  // @param noteId
+    NOTE_REVISION,                // [c-s] get certain revision of note
+                                  // @param noteId
+                                  // @param revisionId
+    SET_NOTE_REVISION,            // [c-s] set current notebook head to this revision
+                                  // @param noteId
+                                  // @param revisionId
+    NOTE_REVISION_FOR_COMPARE,    // [c-s] get certain revision of note for compare
+                                  // @param noteId
+                                  // @param revisionId
+                                  // @param position
+    APP_APPEND_OUTPUT,            // [s-c] append output
+    APP_UPDATE_OUTPUT,            // [s-c] update (replace) output
+    APP_LOAD,                     // [s-c] on app load
+    APP_STATUS_CHANGE,            // [s-c] on app status change
+
+    LIST_NOTE_JOBS,               // [c-s] get note job management information
+    LIST_UPDATE_NOTE_JOBS,        // [c-s] get job management information for until unixtime
     UNSUBSCRIBE_UPDATE_NOTE_JOBS, // [c-s] unsubscribe job information for job management
     // @param unixTime
-    GET_INTERPRETER_BINDINGS, // [c-s] get interpreter bindings
-    INTERPRETER_BINDINGS, // [s-c] interpreter bindings
-
-    GET_INTERPRETER_SETTINGS, // [c-s] get interpreter settings
-    INTERPRETER_SETTINGS, // [s-c] interpreter settings
-    ERROR_INFO, // [s-c] error information to be sent
-    SESSION_LOGOUT, // [s-c] error information to be sent
-    WATCHER, // [s-c] Change websocket to watcher mode.
-    PARAGRAPH_ADDED, // [s-c] paragraph is added
-    PARAGRAPH_REMOVED, // [s-c] paragraph deleted
-    PARAGRAPH_MOVED, // [s-c] paragraph moved
-    NOTE_UPDATED, // [s-c] paragraph updated(name, config)
-    RUN_ALL_PARAGRAPHS, // [c-s] run all paragraphs
-    PARAGRAPH_EXECUTED_BY_SPELL, // [c-s] paragraph was executed by spell
-    RUN_PARAGRAPH_USING_SPELL, // [s-c] run paragraph using spell
-    PARAS_INFO, // [s-c] paragraph runtime infos
-    SAVE_NOTE_FORMS, // save note forms
-    REMOVE_NOTE_FORMS, // remove note forms
-    INTERPRETER_INSTALL_STARTED, // [s-c] start to download an interpreter
-    INTERPRETER_INSTALL_RESULT, // [s-c] Status of an interpreter installation
-    COLLABORATIVE_MODE_STATUS, // [s-c] collaborative mode status
-    PATCH_PARAGRAPH, // [c-s][s-c] patch editor text
-    NOTICE // [s-c] Notice
+    GET_INTERPRETER_BINDINGS,    // [c-s] get interpreter bindings
+    INTERPRETER_BINDINGS,         // [s-c] interpreter bindings
+
+    GET_INTERPRETER_SETTINGS,     // [c-s] get interpreter settings
+    INTERPRETER_SETTINGS,         // [s-c] interpreter settings
+    ERROR_INFO,                   // [s-c] error information to be sent
+    SESSION_LOGOUT,               // [s-c] error information to be sent
+    WATCHER,                      // [s-c] Change websocket to watcher mode.
+    PARAGRAPH_ADDED,              // [s-c] paragraph is added
+    PARAGRAPH_REMOVED,            // [s-c] paragraph deleted
+    PARAGRAPH_MOVED,              // [s-c] paragraph moved
+    NOTE_UPDATED,                 // [s-c] paragraph updated(name, config)
+    RUN_ALL_PARAGRAPHS,           // [c-s] run all paragraphs
+    PARAGRAPH_EXECUTED_BY_SPELL,  // [c-s] paragraph was executed by spell
+    RUN_PARAGRAPH_USING_SPELL,    // [s-c] run paragraph using spell
+    PARAS_INFO,                   // [s-c] paragraph runtime infos
+    SAVE_NOTE_FORMS,              // save note forms
+    REMOVE_NOTE_FORMS,            // remove note forms
+    INTERPRETER_INSTALL_STARTED,  // [s-c] start to download an interpreter
+    INTERPRETER_INSTALL_RESULT,   // [s-c] Status of an interpreter installation
+    COLLABORATIVE_MODE_STATUS,    // [s-c] collaborative mode status
+    PATCH_PARAGRAPH,              // [c-s][s-c] patch editor text
+    NOTICE                        // [s-c] Notice
   }
 
   private static final Gson gson = new Gson();
   public static final Message EMPTY = new Message(null);
-
+  
   public OP op;
   public Map<String, Object> data = new HashMap<>();
   public String ticket = "anonymous";
@@ -216,7 +221,7 @@ public class Message implements JsonSerializable {
     try {
       return getType(key);
     } catch (ClassCastException e) {
-      LOG.error("Failed to get " + key + " from message (Invalid type). ", e);
+      LOG.error("Failed to get " + key + " from message (Invalid type). " , e);
       return null;
     }
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/socket/WatcherMessage.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/socket/WatcherMessage.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/socket/WatcherMessage.java
index 9445c38..c982ca7 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/socket/WatcherMessage.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/socket/WatcherMessage.java
@@ -19,25 +19,27 @@ package org.apache.zeppelin.notebook.socket;
 import com.google.gson.Gson;
 import org.apache.zeppelin.common.JsonSerializable;
 
-/** Zeppelin websocket massage template class for watcher socket. */
+/**
+ * Zeppelin websocket massage template class for watcher socket.
+ */
 public class WatcherMessage implements JsonSerializable {
 
   public String message;
   public String noteId;
   public String subject;
-
+  
   private static final Gson gson = new Gson();
-
+  
   public static Builder builder(String noteId) {
     return new Builder(noteId);
   }
-
+  
   private WatcherMessage(Builder builder) {
     this.noteId = builder.noteId;
     this.message = builder.message;
     this.subject = builder.subject;
   }
-
+  
   public String toJson() {
     return gson.toJson(this);
   }
@@ -46,21 +48,23 @@ public class WatcherMessage implements JsonSerializable {
     return gson.fromJson(json, WatcherMessage.class);
   }
 
-  /** Simple builder. */
+  /**
+   * Simple builder.
+   */
   public static class Builder {
     private final String noteId;
     private String subject;
     private String message;
-
+    
     public Builder(String noteId) {
       this.noteId = noteId;
     }
-
+    
     public Builder subject(String subject) {
       this.subject = subject;
       return this;
     }
-
+    
     public Builder message(String message) {
       this.message = message;
       return this;
@@ -70,4 +74,5 @@ public class WatcherMessage implements JsonSerializable {
       return new WatcherMessage(this);
     }
   }
+  
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/utility/IdHashes.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/utility/IdHashes.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/utility/IdHashes.java
index add4a3a..7b0d804 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/utility/IdHashes.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/utility/IdHashes.java
@@ -22,13 +22,13 @@ import java.security.SecureRandom;
 import java.util.ArrayList;
 import java.util.List;
 
-/** Generate Tiny ID. */
+/**
+ * Generate Tiny ID.
+ */
 public class IdHashes {
-  private static final char[] DICTIONARY =
-      new char[] {
-        '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J',
-        'K', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
-      };
+  private static final char[] DICTIONARY = new char[] {'1', '2', '3', '4', '5', '6', '7', '8', '9',
+    'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
+    'W', 'X', 'Y', 'Z'};
 
   /**
    * encodes the given string into the base of the dictionary provided in the constructor.

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/plugin/PluginManager.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/plugin/PluginManager.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/plugin/PluginManager.java
index 4bf8ade..5f7dc1d 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/plugin/PluginManager.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/plugin/PluginManager.java
@@ -18,6 +18,13 @@
 package org.apache.zeppelin.plugin;
 
 import com.google.common.annotations.VisibleForTesting;
+import org.apache.zeppelin.conf.ZeppelinConfiguration;
+import org.apache.zeppelin.interpreter.launcher.InterpreterLauncher;
+import org.apache.zeppelin.interpreter.recovery.RecoveryStorage;
+import org.apache.zeppelin.notebook.repo.NotebookRepo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.File;
 import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
@@ -27,14 +34,11 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import org.apache.zeppelin.conf.ZeppelinConfiguration;
-import org.apache.zeppelin.interpreter.launcher.InterpreterLauncher;
-import org.apache.zeppelin.interpreter.recovery.RecoveryStorage;
-import org.apache.zeppelin.notebook.repo.NotebookRepo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.util.concurrent.ConcurrentHashMap;
 
-/** Class for loading Plugins */
+/**
+ * Class for loading Plugins
+ */
 public class PluginManager {
   private static final Logger LOGGER = LoggerFactory.getLogger(PluginManager.class);
 
@@ -59,30 +63,24 @@ public class PluginManager {
     String isTest = System.getenv("IS_ZEPPELIN_TEST");
     if (isTest != null && isTest.equals("true")) {
       try {
-        NotebookRepo notebookRepo =
-            (NotebookRepo) (Class.forName(notebookRepoClassName).newInstance());
+        NotebookRepo notebookRepo = (NotebookRepo)
+            (Class.forName(notebookRepoClassName).newInstance());
         return notebookRepo;
       } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
-        LOGGER.warn(
-            "Fail to instantiate notebookrepo from classpath directly:" + notebookRepoClassName, e);
+        LOGGER.warn("Fail to instantiate notebookrepo from classpath directly:" + notebookRepoClassName, e);
       }
     }
 
-    String simpleClassName =
-        notebookRepoClassName.substring(notebookRepoClassName.lastIndexOf(".") + 1);
-    URLClassLoader pluginClassLoader =
-        getPluginClassLoader(pluginsDir, "NotebookRepo", simpleClassName);
+    String simpleClassName = notebookRepoClassName.substring(notebookRepoClassName.lastIndexOf(".") + 1);
+    URLClassLoader pluginClassLoader = getPluginClassLoader(pluginsDir, "NotebookRepo", simpleClassName);
     if (pluginClassLoader == null) {
       return null;
     }
     NotebookRepo notebookRepo = null;
     try {
-      notebookRepo =
-          (NotebookRepo)
-              (Class.forName(notebookRepoClassName, true, pluginClassLoader)).newInstance();
+      notebookRepo = (NotebookRepo) (Class.forName(notebookRepoClassName, true, pluginClassLoader)).newInstance();
     } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
-      LOGGER.warn(
-          "Fail to instantiate notebookrepo from plugin classpath:" + notebookRepoClassName, e);
+      LOGGER.warn("Fail to instantiate notebookrepo from plugin classpath:" + notebookRepoClassName, e);
     }
 
     if (notebookRepo == null) {
@@ -91,8 +89,9 @@ public class PluginManager {
     return notebookRepo;
   }
 
-  public synchronized InterpreterLauncher loadInterpreterLauncher(
-      String launcherPlugin, RecoveryStorage recoveryStorage) throws IOException {
+  public synchronized InterpreterLauncher loadInterpreterLauncher(String launcherPlugin,
+                                                     RecoveryStorage recoveryStorage)
+      throws IOException {
 
     if (cachedLaunchers.containsKey(launcherPlugin)) {
       return cachedLaunchers.get(launcherPlugin);
@@ -102,16 +101,11 @@ public class PluginManager {
     String pluginClass = "org.apache.zeppelin.interpreter.launcher." + launcherPlugin;
     InterpreterLauncher launcher = null;
     try {
-      launcher =
-          (InterpreterLauncher)
-              (Class.forName(pluginClass, true, pluginClassLoader))
-                  .getConstructor(ZeppelinConfiguration.class, RecoveryStorage.class)
-                  .newInstance(zConf, recoveryStorage);
-    } catch (InstantiationException
-        | IllegalAccessException
-        | ClassNotFoundException
-        | NoSuchMethodException
-        | InvocationTargetException e) {
+      launcher = (InterpreterLauncher) (Class.forName(pluginClass, true, pluginClassLoader))
+          .getConstructor(ZeppelinConfiguration.class, RecoveryStorage.class)
+          .newInstance(zConf, recoveryStorage);
+    } catch (InstantiationException | IllegalAccessException | ClassNotFoundException
+        | NoSuchMethodException | InvocationTargetException e) {
       LOGGER.warn("Fail to instantiate Launcher from plugin classpath:" + launcherPlugin, e);
     }
 
@@ -122,29 +116,25 @@ public class PluginManager {
     return launcher;
   }
 
-  private URLClassLoader getPluginClassLoader(
-      String pluginsDir, String pluginType, String pluginName) throws IOException {
+  private URLClassLoader getPluginClassLoader(String pluginsDir,
+                                              String pluginType,
+                                              String pluginName) throws IOException {
 
     File pluginFolder = new File(pluginsDir + "/" + pluginType + "/" + pluginName);
     if (!pluginFolder.exists() || pluginFolder.isFile()) {
-      LOGGER.warn(
-          "PluginFolder "
-              + pluginFolder.getAbsolutePath()
-              + " doesn't exist or is not a directory");
+      LOGGER.warn("PluginFolder " + pluginFolder.getAbsolutePath() +
+          " doesn't exist or is not a directory");
       return null;
     }
     List<URL> urls = new ArrayList<>();
     for (File file : pluginFolder.listFiles()) {
-      LOGGER.debug("Add file " + file.getAbsolutePath() + " to classpath of plugin: " + pluginName);
+      LOGGER.debug("Add file " + file.getAbsolutePath() + " to classpath of plugin: "
+          + pluginName);
       urls.add(file.toURI().toURL());
     }
     if (urls.isEmpty()) {
-      LOGGER.warn(
-          "Can not load plugin "
-              + pluginName
-              + ", because the plugin folder "
-              + pluginFolder
-              + " is empty.");
+      LOGGER.warn("Can not load plugin " + pluginName +
+          ", because the plugin folder " + pluginFolder + " is empty.");
       return null;
     }
     return new URLClassLoader(urls.toArray(new URL[0]));

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/scheduler/RemoteScheduler.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/scheduler/RemoteScheduler.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/scheduler/RemoteScheduler.java
index 5a47299..d6d1df7 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/scheduler/RemoteScheduler.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/scheduler/RemoteScheduler.java
@@ -17,11 +17,6 @@
 
 package org.apache.zeppelin.scheduler;
 
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.concurrent.ExecutorService;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.InterpreterResult.Code;
 import org.apache.zeppelin.interpreter.remote.RemoteInterpreter;
@@ -29,7 +24,16 @@ import org.apache.zeppelin.scheduler.Job.Status;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** RemoteScheduler runs in ZeppelinServer and proxies Scheduler running on RemoteInterpreter */
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+
+/**
+ * RemoteScheduler runs in ZeppelinServer and proxies Scheduler running on RemoteInterpreter
+ *
+ */
 public class RemoteScheduler implements Scheduler {
   Logger logger = LoggerFactory.getLogger(RemoteScheduler.class);
 
@@ -43,13 +47,9 @@ public class RemoteScheduler implements Scheduler {
   private final String sessionId;
   private RemoteInterpreter remoteInterpreter;
 
-  public RemoteScheduler(
-      String name,
-      ExecutorService executor,
-      String sessionId,
-      RemoteInterpreter remoteInterpreter,
-      SchedulerListener listener,
-      int maxConcurrency) {
+  public RemoteScheduler(String name, ExecutorService executor, String sessionId,
+                         RemoteInterpreter remoteInterpreter, SchedulerListener listener,
+                         int maxConcurrency) {
     this.name = name;
     this.executor = executor;
     this.listener = listener;
@@ -88,10 +88,8 @@ public class RemoteScheduler implements Scheduler {
           try {
             queue.wait(500);
           } catch (InterruptedException e) {
-            logger.error(
-                "Exception in RemoteScheduler while jobRunner.isJobSubmittedInRemote "
-                    + "queue.wait",
-                e);
+            logger.error("Exception in RemoteScheduler while jobRunner.isJobSubmittedInRemote " +
+                "queue.wait", e);
           }
         }
       }
@@ -160,7 +158,10 @@ public class RemoteScheduler implements Scheduler {
     }
   }
 
-  /** Role of the class is get status info from remote process from PENDING to RUNNING status. */
+  /**
+   * Role of the class is get status info from remote process from PENDING to
+   * RUNNING status.
+   */
   private class JobStatusPoller extends Thread {
     private long initialPeriodMsec;
     private long initialPeriodCheckIntervalMsec;
@@ -170,11 +171,8 @@ public class RemoteScheduler implements Scheduler {
     private Job job;
     volatile Status lastStatus;
 
-    public JobStatusPoller(
-        long initialPeriodMsec,
-        long initialPeriodCheckIntervalMsec,
-        long checkIntervalMsec,
-        Job job,
+    public JobStatusPoller(long initialPeriodMsec,
+        long initialPeriodCheckIntervalMsec, long checkIntervalMsec, Job job,
         JobListener listener) {
       setName("JobStatusPoller-" + job.getId());
       this.initialPeriodMsec = initialPeriodMsec;
@@ -230,13 +228,14 @@ public class RemoteScheduler implements Scheduler {
       }
     }
 
+
     private Status getLastStatus() {
       if (terminate == true) {
         if (job.getErrorMessage() != null) {
           return Status.ERROR;
-        } else if (lastStatus != Status.FINISHED
-            && lastStatus != Status.ERROR
-            && lastStatus != Status.ABORT) {
+        } else if (lastStatus != Status.FINISHED &&
+            lastStatus != Status.ERROR &&
+            lastStatus != Status.ABORT) {
           return Status.FINISHED;
         } else {
           return (lastStatus == null) ? Status.FINISHED : lastStatus;
@@ -262,7 +261,7 @@ public class RemoteScheduler implements Scheduler {
     }
   }
 
-  // TODO(zjffdu) need to refactor the schdule module which is too complicated
+  //TODO(zjffdu) need to refactor the schdule module which is too complicated
   private class JobRunner implements Runnable, JobListener {
     private final Logger logger = LoggerFactory.getLogger(JobRunner.class);
     private Scheduler scheduler;
@@ -296,7 +295,8 @@ public class RemoteScheduler implements Scheduler {
         return;
       }
 
-      JobStatusPoller jobStatusPoller = new JobStatusPoller(1500, 100, 500, job, this);
+      JobStatusPoller jobStatusPoller = new JobStatusPoller(1500, 100, 500,
+          job, this);
       jobStatusPoller.start();
 
       if (listener != null) {
@@ -321,8 +321,7 @@ public class RemoteScheduler implements Scheduler {
       } else if (job.getException() != null) {
         logger.debug("Job ABORT, " + job.getId() + ", " + job.getErrorMessage());
         job.setStatus(Status.ERROR);
-      } else if (jobResult != null
-          && jobResult instanceof InterpreterResult
+      } else if (jobResult != null && jobResult instanceof InterpreterResult
           && ((InterpreterResult) jobResult).code() == Code.ERROR) {
         logger.debug("Job Error, " + job.getId() + ", " + job.getErrorMessage());
         job.setStatus(Status.ERROR);
@@ -345,13 +344,15 @@ public class RemoteScheduler implements Scheduler {
     }
 
     @Override
-    public void onProgressUpdate(Job job, int progress) {}
+    public void onProgressUpdate(Job job, int progress) {
+    }
 
     @Override
     public void onStatusChange(Job job, Status before, Status after) {
       // Update remoteStatus
       if (jobExecuted == false) {
-        if (after == Status.FINISHED || after == Status.ABORT || after == Status.ERROR) {
+        if (after == Status.FINISHED || after == Status.ABORT
+            || after == Status.ERROR) {
           // it can be status of last run.
           // so not updating the remoteStatus
           return;
@@ -377,5 +378,7 @@ public class RemoteScheduler implements Scheduler {
     synchronized (queue) {
       queue.notify();
     }
+
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/search/SearchService.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/search/SearchService.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/search/SearchService.java
index dfa9212..0b86ac6 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/search/SearchService.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/search/SearchService.java
@@ -20,14 +20,16 @@ import java.io.IOException;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
+
 import org.apache.zeppelin.notebook.Note;
 import org.apache.zeppelin.notebook.Paragraph;
 
 /**
  * Search (both, indexing and query) the notes.
- *
- * <p>Intended to have multiple implementation, i.e: - local Lucene (in-memory, on-disk) - remote
- * Elasticsearch
+ * 
+ * Intended to have multiple implementation, i.e:
+ *  - local Lucene (in-memory, on-disk)
+ *  - remote Elasticsearch
  */
 public interface SearchService {
 
@@ -40,7 +42,9 @@ public interface SearchService {
   public List<Map<String, String>> query(String queryStr);
 
   /**
-   * Updates all documents in index for the given note: - name - all paragraphs
+   * Updates all documents in index for the given note:
+   *  - name
+   *  - all paragraphs
    *
    * @param note a Note to update index for
    * @throws IOException
@@ -61,7 +65,9 @@ public interface SearchService {
    */
   public void addIndexDoc(Note note);
 
-  /** Deletes all docs on given Note from index */
+  /**
+   * Deletes all docs on given Note from index
+   */
   public void deleteIndexDocs(Note note);
 
   /**
@@ -73,6 +79,9 @@ public interface SearchService {
    */
   public void deleteIndexDoc(Note note, Paragraph p);
 
-  /** Frees the recourses used by index */
+  /**
+   * Frees the recourses used by index
+   */
   public void close();
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/ConfigStorage.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/ConfigStorage.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/ConfigStorage.java
index d697473..b3175e5 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/ConfigStorage.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/ConfigStorage.java
@@ -15,22 +15,31 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.storage;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
-import java.io.IOException;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
+import org.apache.zeppelin.helium.HeliumConf;
 import org.apache.zeppelin.interpreter.InterpreterInfoSaving;
 import org.apache.zeppelin.interpreter.InterpreterSetting;
 import org.apache.zeppelin.notebook.NotebookAuthorizationInfoSaving;
+import org.apache.zeppelin.user.Credentials;
+import org.apache.zeppelin.user.CredentialsInfoSaving;
 import org.apache.zeppelin.util.ReflectionUtils;
 
+import java.io.IOException;
+
 /**
  * Interface for storing zeppelin configuration.
  *
- * <p>1. interpreter-setting.json 2. helium.json 3. notebook-authorization.json 4. credentials.json
+ * 1. interpreter-setting.json
+ * 2. helium.json
+ * 3. notebook-authorization.json
+ * 4. credentials.json
+ *
  */
 public abstract class ConfigStorage {
 
@@ -49,10 +58,11 @@ public abstract class ConfigStorage {
   private static ConfigStorage createConfigStorage(ZeppelinConfiguration zConf) throws IOException {
     String configStorageClass =
         zConf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_CONFIG_STORAGE_CLASS);
-    return ReflectionUtils.createClazzInstance(
-        configStorageClass, new Class[] {ZeppelinConfiguration.class}, new Object[] {zConf});
+    return ReflectionUtils.createClazzInstance(configStorageClass,
+        new Class[] {ZeppelinConfiguration.class}, new Object[] {zConf});
   }
 
+
   public ConfigStorage(ZeppelinConfiguration zConf) {
     this.zConf = zConf;
   }
@@ -71,7 +81,7 @@ public abstract class ConfigStorage {
   public abstract void saveCredentials(String credentials) throws IOException;
 
   protected InterpreterInfoSaving buildInterpreterInfoSaving(String json) {
-    // TODO(zjffdu) This kind of post processing is ugly.
+    //TODO(zjffdu) This kind of post processing is ugly.
     JsonParser jsonParser = new JsonParser();
     JsonObject jsonObject = jsonParser.parse(json).getAsJsonObject();
     InterpreterInfoSaving infoSaving = InterpreterInfoSaving.fromJson(json);
@@ -82,8 +92,7 @@ public abstract class ConfigStorage {
       // previously created setting should turn this feature on here.
       interpreterSetting.getOption();
       interpreterSetting.convertPermissionsFromUsersToOwners(
-          jsonObject
-              .getAsJsonObject("interpreterSettings")
+          jsonObject.getAsJsonObject("interpreterSettings")
               .getAsJsonObject(interpreterSetting.getId()));
     }
     return infoSaving;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/FileSystemConfigStorage.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/FileSystemConfigStorage.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/FileSystemConfigStorage.java
index fa62753..20c19b6 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/FileSystemConfigStorage.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/FileSystemConfigStorage.java
@@ -15,20 +15,28 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.storage;
 
-import java.io.IOException;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
 import org.apache.hadoop.fs.Path;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
+import org.apache.zeppelin.helium.HeliumConf;
 import org.apache.zeppelin.interpreter.InterpreterInfoSaving;
+import org.apache.zeppelin.interpreter.InterpreterSetting;
 import org.apache.zeppelin.notebook.FileSystemStorage;
 import org.apache.zeppelin.notebook.NotebookAuthorizationInfoSaving;
+import org.apache.zeppelin.user.CredentialsInfoSaving;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+
 /**
- * It could be used either local file system or hadoop distributed file system, because FileSystem
- * support both local file system and hdfs.
+ * It could be used either local file system or hadoop distributed file system,
+ * because FileSystem support both local file system and hdfs.
+ *
  */
 public class FileSystemConfigStorage extends ConfigStorage {
 
@@ -42,8 +50,8 @@ public class FileSystemConfigStorage extends ConfigStorage {
   public FileSystemConfigStorage(ZeppelinConfiguration zConf) throws IOException {
     super(zConf);
     this.fs = new FileSystemStorage(zConf, zConf.getConfigFSDir());
-    LOGGER.info(
-        "Creating FileSystem: " + this.fs.getFs().getClass().getName() + " for Zeppelin Config");
+    LOGGER.info("Creating FileSystem: " + this.fs.getFs().getClass().getName() +
+        " for Zeppelin Config");
     Path configPath = this.fs.makeQualified(new Path(zConf.getConfigFSDir()));
     this.fs.tryMkDir(configPath);
     LOGGER.info("Using folder {} to store Zeppelin Config", configPath);
@@ -100,4 +108,5 @@ public class FileSystemConfigStorage extends ConfigStorage {
     LOGGER.info("Save Credentials to file: " + credentialPath);
     fs.writeFile(credentials, credentialPath, false);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/LocalConfigStorage.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/LocalConfigStorage.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/LocalConfigStorage.java
index fb967c9..b91ded4 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/LocalConfigStorage.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/LocalConfigStorage.java
@@ -17,23 +17,26 @@
 
 package org.apache.zeppelin.storage;
 
+import org.apache.commons.io.IOUtils;
+import org.apache.zeppelin.conf.ZeppelinConfiguration;
+import org.apache.zeppelin.interpreter.InterpreterInfoSaving;
+import org.apache.zeppelin.notebook.NotebookAuthorizationInfoSaving;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
-import java.nio.file.FileSystem;
-import java.nio.file.FileSystems;
 import java.nio.file.Files;
 import java.nio.file.Path;
+import java.nio.file.FileSystems;
+import java.nio.file.FileSystem;
 import java.nio.file.StandardCopyOption;
-import org.apache.commons.io.IOUtils;
-import org.apache.zeppelin.conf.ZeppelinConfiguration;
-import org.apache.zeppelin.interpreter.InterpreterInfoSaving;
-import org.apache.zeppelin.notebook.NotebookAuthorizationInfoSaving;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Storing config in local file system */
+/**
+ * Storing config in local file system
+ */
 public class LocalConfigStorage extends ConfigStorage {
 
   private static Logger LOGGER = LoggerFactory.getLogger(LocalConfigStorage.class);
@@ -128,4 +131,5 @@ public class LocalConfigStorage extends ConfigStorage {
       throw iox;
     }
   }
-}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/ticket/TicketContainer.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/ticket/TicketContainer.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/ticket/TicketContainer.java
index fc0844a..8c4b170 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/ticket/TicketContainer.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/ticket/TicketContainer.java
@@ -25,10 +25,12 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Very simple ticket container No cleanup is done, since the same user accross different devices
- * share the same ticket The Map size is at most the number of different user names having access to
- * a Zeppelin instance
+ * Very simple ticket container
+ * No cleanup is done, since the same user accross different devices share the same ticket
+ * The Map size is at most the number of different user names having access to a Zeppelin instance
  */
+
+
 public class TicketContainer {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(TicketContainer.class);
@@ -50,21 +52,20 @@ public class TicketContainer {
 
   /**
    * For test use
-   *
    * @param principal
    * @param ticket
    * @return true if ticket assigned to principal.
    */
   public boolean isValid(String principal, String ticket) {
-    if ("anonymous".equals(principal) && "anonymous".equals(ticket)) return true;
+    if ("anonymous".equals(principal) && "anonymous".equals(ticket))
+      return true;
     Entry entry = sessions.get(principal);
     return entry != null && entry.ticket.equals(ticket);
   }
 
   /**
-   * get or create ticket for Websocket authentication assigned to authenticated shiro user For
-   * unathenticated user (anonymous), always return ticket value "anonymous"
-   *
+   * get or create ticket for Websocket authentication assigned to authenticated shiro user
+   * For unathenticated user (anonymous), always return ticket value "anonymous"
    * @param principal
    * @return
    */
@@ -72,8 +73,10 @@ public class TicketContainer {
     Entry entry = sessions.get(principal);
     String ticket;
     if (entry == null) {
-      if (principal.equals("anonymous")) ticket = "anonymous";
-      else ticket = UUID.randomUUID().toString();
+      if (principal.equals("anonymous"))
+        ticket = "anonymous";
+      else
+        ticket = UUID.randomUUID().toString();
     } else {
       ticket = entry.ticket;
     }
@@ -84,7 +87,6 @@ public class TicketContainer {
 
   /**
    * Remove ticket from session cache.
-   *
    * @param principal
    */
   public synchronized void removeTicket(String principal) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Credentials.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Credentials.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Credentials.java
index 21b265f..61f7fff 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Credentials.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Credentials.java
@@ -1,27 +1,28 @@
 /*
- * 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.
- */
+* 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.user;
 
-import static java.nio.file.attribute.PosixFilePermission.OWNER_READ;
-import static java.nio.file.attribute.PosixFilePermission.OWNER_WRITE;
 
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
@@ -35,10 +36,13 @@ import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Class defining credentials for data source authorization */
+import static java.nio.file.attribute.PosixFilePermission.OWNER_READ;
+import static java.nio.file.attribute.PosixFilePermission.OWNER_WRITE;
+
+/**
+ * Class defining credentials for data source authorization
+ */
 public class Credentials {
   private static final Logger LOG = LoggerFactory.getLogger(Credentials.class);
 
@@ -48,7 +52,7 @@ public class Credentials {
   File credentialsFile;
 
   private Encryptor encryptor;
-
+  
   /**
    * Wrapper fro user credentials. It can load credentials from a file if credentialsPath is
    * supplied, and will encrypt the file if an encryptKey is supplied.

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/CredentialsInfoSaving.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/CredentialsInfoSaving.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/CredentialsInfoSaving.java
index c8e71ac..48bb24d 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/CredentialsInfoSaving.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/CredentialsInfoSaving.java
@@ -18,10 +18,13 @@
 package org.apache.zeppelin.user;
 
 import com.google.gson.Gson;
-import java.util.Map;
 import org.apache.zeppelin.common.JsonSerializable;
 
-/** Helper class to save credentials */
+import java.util.Map;
+
+/**
+ * Helper class to save credentials
+ */
 public class CredentialsInfoSaving implements JsonSerializable {
   private static final Gson gson = new Gson();
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Encryptor.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Encryptor.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Encryptor.java
index 39c55b6..ee24090 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Encryptor.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Encryptor.java
@@ -17,7 +17,6 @@
 
 package org.apache.zeppelin.user;
 
-import java.io.IOException;
 import org.bouncycastle.crypto.BufferedBlockCipher;
 import org.bouncycastle.crypto.InvalidCipherTextException;
 import org.bouncycastle.crypto.engines.AESEngine;
@@ -26,7 +25,11 @@ import org.bouncycastle.crypto.paddings.ZeroBytePadding;
 import org.bouncycastle.crypto.params.KeyParameter;
 import org.bouncycastle.util.encoders.Base64;
 
-/** Encrypt/decrypt arrays of bytes! */
+import java.io.IOException;
+
+/**
+ * Encrypt/decrypt arrays of bytes!
+ */
 public class Encryptor {
   private final BufferedBlockCipher encryptCipher;
   private final BufferedBlockCipher decryptCipher;
@@ -39,6 +42,7 @@ public class Encryptor {
     decryptCipher.init(false, new KeyParameter(encryptKey.getBytes()));
   }
 
+
   public String encrypt(String inputString) throws IOException {
     byte[] input = inputString.getBytes();
     byte[] result = new byte[encryptCipher.getOutputSize(input.length)];

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/util/ReflectionUtils.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/util/ReflectionUtils.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/util/ReflectionUtils.java
index 8da79ca..ca09992 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/util/ReflectionUtils.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/util/ReflectionUtils.java
@@ -20,7 +20,11 @@ import java.io.IOException;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 
-/** Utility class for creating instances via java reflection. */
+
+/**
+ * Utility class for creating instances via java reflection.
+ *
+ */
 public class ReflectionUtils {
 
   public static Class<?> getClazz(String className) throws IOException {
@@ -39,47 +43,39 @@ public class ReflectionUtils {
     try {
       instance = clazz.newInstance();
     } catch (InstantiationException e) {
-      throw new IOException("Unable to instantiate class with 0 arguments: " + clazz.getName(), e);
+      throw new IOException(
+          "Unable to instantiate class with 0 arguments: " + clazz.getName(), e);
     } catch (IllegalAccessException e) {
-      throw new IOException("Unable to instantiate class with 0 arguments: " + clazz.getName(), e);
+      throw new IOException(
+          "Unable to instantiate class with 0 arguments: " + clazz.getName(), e);
     }
     return instance;
   }
 
-  private static <T> T getNewInstance(
-      Class<T> clazz, Class<?>[] parameterTypes, Object[] parameters) throws IOException {
+  private static <T> T getNewInstance(Class<T> clazz,
+                                      Class<?>[] parameterTypes,
+                                      Object[] parameters)
+      throws IOException {
     T instance;
     try {
       Constructor<T> constructor = clazz.getConstructor(parameterTypes);
       instance = constructor.newInstance(parameters);
     } catch (InstantiationException e) {
       throw new IOException(
-          "Unable to instantiate class with "
-              + parameters.length
-              + " arguments: "
-              + clazz.getName(),
-          e);
+          "Unable to instantiate class with " + parameters.length + " arguments: " +
+              clazz.getName(), e);
     } catch (IllegalAccessException e) {
       throw new IOException(
-          "Unable to instantiate class with "
-              + parameters.length
-              + " arguments: "
-              + clazz.getName(),
-          e);
+          "Unable to instantiate class with " + parameters.length + " arguments: " +
+              clazz.getName(), e);
     } catch (NoSuchMethodException e) {
       throw new IOException(
-          "Unable to instantiate class with "
-              + parameters.length
-              + " arguments: "
-              + clazz.getName(),
-          e);
+          "Unable to instantiate class with " + parameters.length + " arguments: " +
+              clazz.getName(), e);
     } catch (InvocationTargetException e) {
       throw new IOException(
-          "Unable to instantiate class with "
-              + parameters.length
-              + " arguments: "
-              + clazz.getName(),
-          e);
+          "Unable to instantiate class with " + parameters.length + " arguments: " +
+              clazz.getName(), e);
     }
     return instance;
   }
@@ -91,10 +87,13 @@ public class ReflectionUtils {
     return instance;
   }
 
-  public static <T> T createClazzInstance(
-      String className, Class<?>[] parameterTypes, Object[] parameters) throws IOException {
+  public static <T> T createClazzInstance(String className,
+                                          Class<?>[] parameterTypes,
+                                          Object[] parameters) throws IOException {
     Class<?> clazz = getClazz(className);
     T instance = (T) getNewInstance(clazz, parameterTypes, parameters);
     return instance;
   }
+
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/util/WatcherSecurityKey.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/util/WatcherSecurityKey.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/util/WatcherSecurityKey.java
index 533719e..f0c3ad2 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/util/WatcherSecurityKey.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/util/WatcherSecurityKey.java
@@ -19,8 +19,8 @@ package org.apache.zeppelin.util;
 import java.util.UUID;
 
 /**
- * Simple implementation of a auto-generated key for websocket watcher. This is a LAZY
- * implementation, we might want to update this later on :)
+ * Simple implementation of a auto-generated key for websocket watcher.
+ * This is a LAZY implementation, we might want to update this later on :)
  */
 public class WatcherSecurityKey {
   public static final String HTTP_HEADER = "X-Watcher-Key";
@@ -31,4 +31,5 @@ public class WatcherSecurityKey {
   public static String getKey() {
     return KEY;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/conf/ZeppelinConfigurationTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/conf/ZeppelinConfigurationTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/conf/ZeppelinConfigurationTest.java
index b1aef0b..1771fd3 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/conf/ZeppelinConfigurationTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/conf/ZeppelinConfigurationTest.java
@@ -16,17 +16,19 @@
  */
 package org.apache.zeppelin.conf;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.net.MalformedURLException;
-import java.util.List;
 import junit.framework.Assert;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars;
 import org.junit.Before;
 import org.junit.Test;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.net.MalformedURLException;
+import java.util.List;
+
+
 public class ZeppelinConfigurationTest {
   @Before
   public void clearSystemVariables() {
@@ -36,8 +38,7 @@ public class ZeppelinConfigurationTest {
   @Test
   public void getAllowedOrigins2Test() throws MalformedURLException, ConfigurationException {
 
-    ZeppelinConfiguration conf =
-        new ZeppelinConfiguration(this.getClass().getResource("/test-zeppelin-site2.xml"));
+    ZeppelinConfiguration conf = new ZeppelinConfiguration(this.getClass().getResource("/test-zeppelin-site2.xml"));
     List<String> origins = conf.getAllowedOrigins();
     Assert.assertEquals(2, origins.size());
     Assert.assertEquals("http://onehost:8080", origins.get(0));
@@ -47,8 +48,7 @@ public class ZeppelinConfigurationTest {
   @Test
   public void getAllowedOrigins1Test() throws MalformedURLException, ConfigurationException {
 
-    ZeppelinConfiguration conf =
-        new ZeppelinConfiguration(this.getClass().getResource("/test-zeppelin-site1.xml"));
+    ZeppelinConfiguration conf = new ZeppelinConfiguration(this.getClass().getResource("/test-zeppelin-site1.xml"));
     List<String> origins = conf.getAllowedOrigins();
     Assert.assertEquals(1, origins.size());
     Assert.assertEquals("http://onehost:8080", origins.get(0));
@@ -57,8 +57,7 @@ public class ZeppelinConfigurationTest {
   @Test
   public void getAllowedOriginsNoneTest() throws MalformedURLException, ConfigurationException {
 
-    ZeppelinConfiguration conf =
-        new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"));
+    ZeppelinConfiguration conf = new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"));
     List<String> origins = conf.getAllowedOrigins();
     Assert.assertEquals(1, origins.size());
   }
@@ -66,8 +65,7 @@ public class ZeppelinConfigurationTest {
   @Test
   public void isWindowsPathTestTrue() throws ConfigurationException {
 
-    ZeppelinConfiguration conf =
-        new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"));
+    ZeppelinConfiguration conf = new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"));
     Boolean isIt = conf.isWindowsPath("c:\\test\\file.txt");
     Assert.assertTrue(isIt);
   }
@@ -75,8 +73,7 @@ public class ZeppelinConfigurationTest {
   @Test
   public void isWindowsPathTestFalse() throws ConfigurationException {
 
-    ZeppelinConfiguration conf =
-        new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"));
+    ZeppelinConfiguration conf = new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"));
     Boolean isIt = conf.isWindowsPath("~/test/file.xml");
     Assert.assertFalse(isIt);
   }
@@ -84,8 +81,7 @@ public class ZeppelinConfigurationTest {
   @Test
   public void getNotebookDirTest() throws ConfigurationException {
 
-    ZeppelinConfiguration conf =
-        new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"));
+    ZeppelinConfiguration conf = new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"));
     String notebookLocation = conf.getNotebookDir();
     Assert.assertEquals("notebook", notebookLocation);
   }
@@ -93,8 +89,7 @@ public class ZeppelinConfigurationTest {
   @Test
   public void isNotebookPublicTest() throws ConfigurationException {
 
-    ZeppelinConfiguration conf =
-        new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"));
+    ZeppelinConfiguration conf = new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"));
     boolean isIt = conf.isNotebookPublic();
     assertTrue(isIt);
   }
@@ -102,8 +97,7 @@ public class ZeppelinConfigurationTest {
   @Test
   public void getPathTest() throws ConfigurationException {
     System.setProperty(ConfVars.ZEPPELIN_HOME.getVarName(), "/usr/lib/zeppelin");
-    ZeppelinConfiguration conf =
-        new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"));
+    ZeppelinConfiguration conf = new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"));
     Assert.assertEquals("/usr/lib/zeppelin", conf.getZeppelinHome());
     Assert.assertEquals("/usr/lib/zeppelin/conf", conf.getConfDir());
   }
@@ -112,13 +106,10 @@ public class ZeppelinConfigurationTest {
   public void getConfigFSPath() throws ConfigurationException {
     System.setProperty(ConfVars.ZEPPELIN_HOME.getVarName(), "/usr/lib/zeppelin");
     System.setProperty(ConfVars.ZEPPELIN_CONFIG_FS_DIR.getVarName(), "conf");
-    ZeppelinConfiguration conf =
-        new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"));
+    ZeppelinConfiguration conf = new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"));
     assertEquals("/usr/lib/zeppelin/conf", conf.getConfigFSDir());
 
-    System.setProperty(
-        ConfVars.ZEPPELIN_CONFIG_STORAGE_CLASS.getVarName(),
-        "org.apache.zeppelin.storage.FileSystemConfigStorage");
+    System.setProperty(ConfVars.ZEPPELIN_CONFIG_STORAGE_CLASS.getVarName(), "org.apache.zeppelin.storage.FileSystemConfigStorage");
     assertEquals("conf", conf.getConfigFSDir());
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/display/AngularObjectBuilder.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/display/AngularObjectBuilder.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/display/AngularObjectBuilder.java
index 8a9365c..c201858 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/display/AngularObjectBuilder.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/display/AngularObjectBuilder.java
@@ -19,8 +19,8 @@ package org.apache.zeppelin.display;
 
 public class AngularObjectBuilder {
 
-  public static <T> AngularObject<T> build(
-      String varName, T value, String noteId, String paragraphId) {
-    return new AngularObject<>(varName, value, noteId, paragraphId, null);
-  }
-}
+    public static <T> AngularObject<T> build(String varName, T value, String noteId,
+                                             String paragraphId) {
+        return new AngularObject<>(varName, value, noteId, paragraphId, null);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumApplicationFactoryTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumApplicationFactoryTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumApplicationFactoryTest.java
index 322a300..bc6f0ec 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumApplicationFactoryTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumApplicationFactoryTest.java
@@ -16,12 +16,6 @@
  */
 package org.apache.zeppelin.helium;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-import static org.mockito.Mockito.mock;
-
-import java.io.IOException;
-import java.util.List;
 import org.apache.zeppelin.interpreter.AbstractInterpreterTest;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -44,6 +38,14 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.mock;
+
+
 public class HeliumApplicationFactoryTest extends AbstractInterpreterTest
     implements ParagraphJobListener {
 
@@ -67,17 +69,16 @@ public class HeliumApplicationFactoryTest extends AbstractInterpreterTest
     SearchService search = mock(SearchService.class);
     notebookRepo = mock(NotebookRepo.class);
     NotebookAuthorization notebookAuthorization = NotebookAuthorization.init(conf);
-    notebook =
-        new Notebook(
-            conf,
-            notebookRepo,
-            schedulerFactory,
-            interpreterFactory,
-            interpreterSettingManager,
-            this,
-            search,
-            notebookAuthorization,
-            new Credentials(false, null, null));
+    notebook = new Notebook(
+        conf,
+        notebookRepo,
+        schedulerFactory,
+        interpreterFactory,
+        interpreterSettingManager,
+        this,
+        search,
+        notebookAuthorization,
+        new Credentials(false, null, null));
 
     heliumAppFactory.setNotebook(notebook);
 
@@ -91,20 +92,18 @@ public class HeliumApplicationFactoryTest extends AbstractInterpreterTest
     super.tearDown();
   }
 
+
   @Test
   public void testLoadRunUnloadApplication()
       throws IOException, ApplicationException, InterruptedException {
     // given
-    HeliumPackage pkg1 =
-        new HeliumPackage(
-            HeliumType.APPLICATION,
-            "name1",
-            "desc1",
-            "",
-            HeliumTestApplication.class.getName(),
-            new String[][] {},
-            "",
-            "");
+    HeliumPackage pkg1 = new HeliumPackage(HeliumType.APPLICATION,
+        "name1",
+        "desc1",
+        "",
+        HeliumTestApplication.class.getName(),
+        new String[][]{},
+        "", "");
 
     Note note1 = notebook.createNote(anonymous);
 
@@ -114,7 +113,7 @@ public class HeliumApplicationFactoryTest extends AbstractInterpreterTest
     p1.setText("%mock1 job");
     p1.setAuthenticationInfo(anonymous);
     note1.run(p1.getId());
-    while (p1.isTerminated() == false || p1.getReturn() == null) Thread.yield();
+    while(p1.isTerminated()==false || p1.getReturn()==null) Thread.yield();
 
     assertEquals("repl1: job", p1.getReturn().message().get(0).getData());
 
@@ -143,16 +142,13 @@ public class HeliumApplicationFactoryTest extends AbstractInterpreterTest
   @Test
   public void testUnloadOnParagraphRemove() throws IOException {
     // given
-    HeliumPackage pkg1 =
-        new HeliumPackage(
-            HeliumType.APPLICATION,
-            "name1",
-            "desc1",
-            "",
-            HeliumTestApplication.class.getName(),
-            new String[][] {},
-            "",
-            "");
+    HeliumPackage pkg1 = new HeliumPackage(HeliumType.APPLICATION,
+        "name1",
+        "desc1",
+        "",
+        HeliumTestApplication.class.getName(),
+        new String[][]{},
+        "", "");
 
     Note note1 = notebook.createNote(anonymous);
 
@@ -162,7 +158,7 @@ public class HeliumApplicationFactoryTest extends AbstractInterpreterTest
     p1.setText("%mock1 job");
     p1.setAuthenticationInfo(anonymous);
     note1.run(p1.getId());
-    while (p1.isTerminated() == false || p1.getReturn() == null) Thread.yield();
+    while(p1.isTerminated()==false || p1.getReturn()==null) Thread.yield();
 
     assertEquals(0, p1.getAllApplicationStates().size());
     String appId = heliumAppFactory.loadAndRun(pkg1, p1);
@@ -181,19 +177,17 @@ public class HeliumApplicationFactoryTest extends AbstractInterpreterTest
     notebook.removeNote(note1.getId(), anonymous);
   }
 
+
   @Test
   public void testUnloadOnInterpreterUnbind() throws IOException {
     // given
-    HeliumPackage pkg1 =
-        new HeliumPackage(
-            HeliumType.APPLICATION,
-            "name1",
-            "desc1",
-            "",
-            HeliumTestApplication.class.getName(),
-            new String[][] {},
-            "",
-            "");
+    HeliumPackage pkg1 = new HeliumPackage(HeliumType.APPLICATION,
+        "name1",
+        "desc1",
+        "",
+        HeliumTestApplication.class.getName(),
+        new String[][]{},
+        "", "");
 
     Note note1 = notebook.createNote(anonymous);
 
@@ -203,7 +197,7 @@ public class HeliumApplicationFactoryTest extends AbstractInterpreterTest
     p1.setText("%mock1 job");
     p1.setAuthenticationInfo(anonymous);
     note1.run(p1.getId());
-    while (p1.isTerminated() == false || p1.getReturn() == null) Thread.yield();
+    while(p1.isTerminated()==false || p1.getReturn()==null) Thread.yield();
 
     assertEquals(0, p1.getAllApplicationStates().size());
     String appId = heliumAppFactory.loadAndRun(pkg1, p1);
@@ -241,19 +235,17 @@ public class HeliumApplicationFactoryTest extends AbstractInterpreterTest
     notebook.removeNote(note1.getId(), anonymous);
   }
 
+
   @Test
   public void testUnloadOnInterpreterRestart() throws IOException, InterpreterException {
     // given
-    HeliumPackage pkg1 =
-        new HeliumPackage(
-            HeliumType.APPLICATION,
-            "name1",
-            "desc1",
-            "",
-            HeliumTestApplication.class.getName(),
-            new String[][] {},
-            "",
-            "");
+    HeliumPackage pkg1 = new HeliumPackage(HeliumType.APPLICATION,
+        "name1",
+        "desc1",
+        "",
+        HeliumTestApplication.class.getName(),
+        new String[][]{},
+        "", "");
 
     Note note1 = notebook.createNote(anonymous);
     String mock1IntpSettingId = null;
@@ -270,7 +262,7 @@ public class HeliumApplicationFactoryTest extends AbstractInterpreterTest
     p1.setText("%mock1 job");
     p1.setAuthenticationInfo(anonymous);
     note1.run(p1.getId());
-    while (p1.isTerminated() == false || p1.getReturn() == null) Thread.yield();
+    while(p1.isTerminated()==false || p1.getReturn()==null) Thread.yield();
     assertEquals(0, p1.getAllApplicationStates().size());
     String appId = heliumAppFactory.loadAndRun(pkg1, p1);
     ApplicationState app = p1.getApplicationState(appId);
@@ -293,18 +285,29 @@ public class HeliumApplicationFactoryTest extends AbstractInterpreterTest
     notebook.removeNote(note1.getId(), anonymous);
   }
 
-  @Override
-  public void onOutputAppend(Paragraph paragraph, int idx, String output) {}
 
-  @Override
-  public void onOutputUpdate(Paragraph paragraph, int idx, InterpreterResultMessage msg) {}
+    @Override
+    public void onOutputAppend(Paragraph paragraph, int idx, String output) {
+
+    }
+
+    @Override
+    public void onOutputUpdate(Paragraph paragraph, int idx, InterpreterResultMessage msg) {
+
+    }
+
+    @Override
+    public void onOutputUpdateAll(Paragraph paragraph, List<InterpreterResultMessage> msgs) {
 
-  @Override
-  public void onOutputUpdateAll(Paragraph paragraph, List<InterpreterResultMessage> msgs) {}
+    }
 
-  @Override
-  public void onProgressUpdate(Paragraph paragraph, int progress) {}
+    @Override
+    public void onProgressUpdate(Paragraph paragraph, int progress) {
 
-  @Override
-  public void onStatusChange(Paragraph paragraph, Job.Status before, Job.Status after) {}
+    }
+
+    @Override
+    public void onStatusChange(Paragraph paragraph, Job.Status before, Job.Status after) {
+
+    }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumBundleFactoryTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumBundleFactoryTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumBundleFactoryTest.java
index feecb1b..1dafee1 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumBundleFactoryTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumBundleFactoryTest.java
@@ -16,40 +16,40 @@
  */
 package org.apache.zeppelin.helium;
 
-import static org.junit.Assert.*;
-
 import com.github.eirslett.maven.plugins.frontend.lib.InstallationException;
 import com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException;
 import com.google.common.io.Resources;
+import org.apache.commons.io.FileUtils;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
 import java.io.File;
 import java.io.IOException;
 import java.net.URL;
 import java.util.LinkedList;
 import java.util.List;
-import org.apache.commons.io.FileUtils;
+
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+
+import static org.junit.Assert.*;
 
 public class HeliumBundleFactoryTest {
   private File tmpDir;
   private ZeppelinConfiguration conf;
   private HeliumBundleFactory hbf;
-  private static File nodeInstallationDir =
-      new File(System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_nodeCache");
+  private static File nodeInstallationDir = new File(
+      System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_nodeCache");
 
   @BeforeClass
-  public static void beforeAll() throws IOException {
+  static public void beforeAll() throws IOException {
     FileUtils.deleteDirectory(nodeInstallationDir);
   }
 
   @Before
   public void setUp() throws InstallationException, TaskRunnerException, IOException {
-    tmpDir =
-        new File(
-            System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis());
+    tmpDir = new File(System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis());
     tmpDir.mkdirs();
 
     // get module dir
@@ -59,14 +59,12 @@ public class HeliumBundleFactoryTest {
 
     conf = new ZeppelinConfiguration();
 
-    hbf =
-        new HeliumBundleFactory(
-            conf,
-            nodeInstallationDir,
-            tmpDir,
-            new File(moduleDir, "tabledata"),
-            new File(moduleDir, "visualization"),
-            new File(moduleDir, "spell"));
+    hbf = new HeliumBundleFactory(conf,
+        nodeInstallationDir,
+        tmpDir,
+        new File(moduleDir, "tabledata"),
+        new File(moduleDir, "visualization"),
+        new File(moduleDir, "spell"));
     hbf.installNodeAndNpm();
     hbf.copyFrameworkModulesToInstallPath(true);
   }
@@ -85,34 +83,33 @@ public class HeliumBundleFactoryTest {
 
   @Test
   public void downloadPackage() throws TaskRunnerException {
-    HeliumPackage pkg =
-        new HeliumPackage(
-            HeliumType.VISUALIZATION,
-            "lodash",
-            "lodash",
-            "lodash@3.9.3",
-            "",
-            null,
-            "license",
-            "icon");
+    HeliumPackage pkg = new HeliumPackage(
+        HeliumType.VISUALIZATION,
+        "lodash",
+        "lodash",
+        "lodash@3.9.3",
+        "",
+        null,
+        "license",
+        "icon"
+    );
     hbf.install(pkg);
-    assertTrue(
-        new File(tmpDir, HeliumBundleFactory.HELIUM_LOCAL_REPO + "/node_modules/lodash")
-            .isDirectory());
+    assertTrue(new File(tmpDir,
+        HeliumBundleFactory.HELIUM_LOCAL_REPO + "/node_modules/lodash").isDirectory());
   }
 
   @Test
   public void bundlePackage() throws IOException, TaskRunnerException {
-    HeliumPackage pkg =
-        new HeliumPackage(
-            HeliumType.VISUALIZATION,
-            "zeppelin-bubblechart",
-            "zeppelin-bubblechart",
-            "zeppelin-bubblechart@0.0.3",
-            "",
-            null,
-            "license",
-            "icon");
+    HeliumPackage pkg = new HeliumPackage(
+        HeliumType.VISUALIZATION,
+        "zeppelin-bubblechart",
+        "zeppelin-bubblechart",
+        "zeppelin-bubblechart@0.0.3",
+        "",
+        null,
+        "license",
+        "icon"
+    );
     File bundle = hbf.buildPackage(pkg, true, true);
     assertTrue(bundle.isFile());
     long lastModified = bundle.lastModified();
@@ -128,16 +125,16 @@ public class HeliumBundleFactoryTest {
     String resDir = new File(res.getFile()).getParent();
     String localPkg = resDir + "/../../../src/test/resources/helium/vis1";
 
-    HeliumPackage pkg =
-        new HeliumPackage(
-            HeliumType.VISUALIZATION,
-            "vis1",
-            "vis1",
-            localPkg,
-            "",
-            null,
-            "license",
-            "fa fa-coffee");
+    HeliumPackage pkg = new HeliumPackage(
+        HeliumType.VISUALIZATION,
+        "vis1",
+        "vis1",
+        localPkg,
+        "",
+        null,
+        "license",
+        "fa fa-coffee"
+    );
     File bundle = hbf.buildPackage(pkg, true, true);
     assertTrue(bundle.isFile());
   }
@@ -148,16 +145,16 @@ public class HeliumBundleFactoryTest {
     String resDir = new File(res.getFile()).getParent();
     String localPkg = resDir + "/../../../src/test/resources/helium/vis2";
 
-    HeliumPackage pkg =
-        new HeliumPackage(
-            HeliumType.VISUALIZATION,
-            "vis2",
-            "vis2",
-            localPkg,
-            "",
-            null,
-            "license",
-            "fa fa-coffee");
+    HeliumPackage pkg = new HeliumPackage(
+        HeliumType.VISUALIZATION,
+        "vis2",
+        "vis2",
+        localPkg,
+        "",
+        null,
+        "license",
+        "fa fa-coffee"
+    );
     File bundle = null;
     try {
       bundle = hbf.buildPackage(pkg, true, true);
@@ -174,27 +171,27 @@ public class HeliumBundleFactoryTest {
     URL res = Resources.getResource("helium/webpack.config.js");
     String resDir = new File(res.getFile()).getParent();
 
-    HeliumPackage pkgV1 =
-        new HeliumPackage(
-            HeliumType.VISUALIZATION,
-            "zeppelin-bubblechart",
-            "zeppelin-bubblechart",
-            "zeppelin-bubblechart@0.0.3",
-            "",
-            null,
-            "license",
-            "icon");
-
-    HeliumPackage pkgV2 =
-        new HeliumPackage(
-            HeliumType.VISUALIZATION,
-            "zeppelin-bubblechart",
-            "zeppelin-bubblechart",
-            "zeppelin-bubblechart@0.0.1",
-            "",
-            null,
-            "license",
-            "icon");
+    HeliumPackage pkgV1 = new HeliumPackage(
+        HeliumType.VISUALIZATION,
+        "zeppelin-bubblechart",
+        "zeppelin-bubblechart",
+        "zeppelin-bubblechart@0.0.3",
+        "",
+        null,
+        "license",
+        "icon"
+    );
+
+    HeliumPackage pkgV2 = new HeliumPackage(
+        HeliumType.VISUALIZATION,
+        "zeppelin-bubblechart",
+        "zeppelin-bubblechart",
+        "zeppelin-bubblechart@0.0.1",
+        "",
+        null,
+        "license",
+        "icon"
+    );
     List<HeliumPackage> pkgsV1 = new LinkedList<>();
     pkgsV1.add(pkgV1);
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumLocalRegistryTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumLocalRegistryTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumLocalRegistryTest.java
index a9f2476..0f490d1 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumLocalRegistryTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumLocalRegistryTest.java
@@ -16,24 +16,23 @@
  */
 package org.apache.zeppelin.helium;
 
-import static org.junit.Assert.assertEquals;
-
 import com.google.gson.Gson;
-import java.io.File;
-import java.io.IOException;
 import org.apache.commons.io.FileUtils;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.File;
+import java.io.IOException;
+
+import static org.junit.Assert.assertEquals;
+
 public class HeliumLocalRegistryTest {
   private File tmpDir;
 
   @Before
   public void setUp() throws Exception {
-    tmpDir =
-        new File(
-            System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis());
+    tmpDir = new File(System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis());
     tmpDir.mkdirs();
   }
 
@@ -51,16 +50,14 @@ public class HeliumLocalRegistryTest {
 
     // when
     Gson gson = new Gson();
-    HeliumPackage pkg1 =
-        new HeliumPackage(
-            HeliumType.APPLICATION,
-            "app1",
-            "desc1",
-            "artifact1",
-            "classname1",
-            new String[][] {},
-            "license",
-            "");
+    HeliumPackage pkg1 = new HeliumPackage(HeliumType.APPLICATION,
+        "app1",
+        "desc1",
+        "artifact1",
+        "classname1",
+        new String[][]{},
+        "license",
+        "");
     FileUtils.writeStringToFile(new File(r1Path, "pkg1.json"), gson.toJson(pkg1));
 
     // then

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumOnlineRegistryTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumOnlineRegistryTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumOnlineRegistryTest.java
index ea69f4b..dea0c20 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumOnlineRegistryTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumOnlineRegistryTest.java
@@ -18,14 +18,14 @@
 package org.apache.zeppelin.helium;
 
 import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.IOException;
 import org.apache.commons.io.FileUtils;
-import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import java.io.File;
+import java.io.IOException;
+import org.apache.zeppelin.conf.ZeppelinConfiguration;
+
 
 public class HeliumOnlineRegistryTest {
   // ip 192.168.65.17 belongs to private network
@@ -37,9 +37,11 @@ public class HeliumOnlineRegistryTest {
 
   @Before
   public void setUp() throws Exception {
-    tmpDir =
-        new File(
-            System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis());
+    tmpDir = new File(
+            System.getProperty("java.io.tmpdir")
+                    + "/ZeppelinLTest_"
+                    + System.currentTimeMillis()
+    );
   }
 
   @After
@@ -50,22 +52,33 @@ public class HeliumOnlineRegistryTest {
   @Test
   public void zeppelinNotebookS3TimeoutPropertyTest() throws IOException {
     System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_S3_TIMEOUT.getVarName(), TIMEOUT);
+            ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_S3_TIMEOUT.getVarName(),
+            TIMEOUT
+    );
     System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_S3_ENDPOINT.getVarName(), IP);
-    HeliumOnlineRegistry heliumOnlineRegistry =
-        new HeliumOnlineRegistry("https://" + IP, "https://" + IP, tmpDir);
+            ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_S3_ENDPOINT.getVarName(),
+            IP
+    );
+    HeliumOnlineRegistry heliumOnlineRegistry = new HeliumOnlineRegistry(
+            "https://" + IP,
+            "https://" + IP,
+            tmpDir
+    );
 
     long start = System.currentTimeMillis();
     heliumOnlineRegistry.getAll();
     long processTime = System.currentTimeMillis() - start;
 
-    long basicTimeout =
-        Long.valueOf(ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_S3_TIMEOUT.getStringValue());
+    long basicTimeout = Long.valueOf(
+            ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_S3_TIMEOUT.getStringValue()
+    );
     assertTrue(
-        String.format(
-            "Wrong timeout during connection: expected %s, actual is about %d",
-            TIMEOUT, processTime),
-        basicTimeout > processTime);
+            String.format(
+                    "Wrong timeout during connection: expected %s, actual is about %d",
+                    TIMEOUT,
+                    processTime
+            ),
+            basicTimeout > processTime
+    );
   }
 }


[21/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RunParagraphsEvent.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RunParagraphsEvent.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RunParagraphsEvent.java
index 62ead29..1387635 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RunParagraphsEvent.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RunParagraphsEvent.java
@@ -1,68 +1,66 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2018-8-9")
-public class RunParagraphsEvent
-    implements org.apache.thrift.TBase<RunParagraphsEvent, RunParagraphsEvent._Fields>,
-        java.io.Serializable,
-        Cloneable,
-        Comparable<RunParagraphsEvent> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
-      new org.apache.thrift.protocol.TStruct("RunParagraphsEvent");
-
-  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "noteId", org.apache.thrift.protocol.TType.STRING, (short) 1);
-  private static final org.apache.thrift.protocol.TField PARAGRAPH_IDS_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "paragraphIds", org.apache.thrift.protocol.TType.LIST, (short) 2);
-  private static final org.apache.thrift.protocol.TField PARAGRAPH_INDICES_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "paragraphIndices", org.apache.thrift.protocol.TType.LIST, (short) 3);
-  private static final org.apache.thrift.protocol.TField CUR_PARAGRAPH_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "curParagraphId", org.apache.thrift.protocol.TType.STRING, (short) 4);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
-      new HashMap<Class<? extends IScheme>, SchemeFactory>();
+public class RunParagraphsEvent implements org.apache.thrift.TBase<RunParagraphsEvent, RunParagraphsEvent._Fields>, java.io.Serializable, Cloneable, Comparable<RunParagraphsEvent> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RunParagraphsEvent");
+
+  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("noteId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField PARAGRAPH_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("paragraphIds", org.apache.thrift.protocol.TType.LIST, (short)2);
+  private static final org.apache.thrift.protocol.TField PARAGRAPH_INDICES_FIELD_DESC = new org.apache.thrift.protocol.TField("paragraphIndices", org.apache.thrift.protocol.TType.LIST, (short)3);
+  private static final org.apache.thrift.protocol.TField CUR_PARAGRAPH_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("curParagraphId", org.apache.thrift.protocol.TType.STRING, (short)4);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
     schemes.put(StandardScheme.class, new RunParagraphsEventStandardSchemeFactory());
     schemes.put(TupleScheme.class, new RunParagraphsEventTupleSchemeFactory());
@@ -73,15 +71,12 @@ public class RunParagraphsEvent
   public List<Integer> paragraphIndices; // required
   public String curParagraphId; // required
 
-  /**
-   * The set of fields this struct contains, along with convenience methods for finding and
-   * manipulating them.
-   */
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    NOTE_ID((short) 1, "noteId"),
-    PARAGRAPH_IDS((short) 2, "paragraphIds"),
-    PARAGRAPH_INDICES((short) 3, "paragraphIndices"),
-    CUR_PARAGRAPH_ID((short) 4, "curParagraphId");
+    NOTE_ID((short)1, "noteId"),
+    PARAGRAPH_IDS((short)2, "paragraphIds"),
+    PARAGRAPH_INDICES((short)3, "paragraphIndices"),
+    CUR_PARAGRAPH_ID((short)4, "curParagraphId");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -91,9 +86,11 @@ public class RunParagraphsEvent
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
     public static _Fields findByThriftId(int fieldId) {
-      switch (fieldId) {
+      switch(fieldId) {
         case 1: // NOTE_ID
           return NOTE_ID;
         case 2: // PARAGRAPH_IDS
@@ -107,15 +104,19 @@ public class RunParagraphsEvent
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null)
-        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
 
-    /** Find the _Fields constant that matches name, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
@@ -139,54 +140,31 @@ public class RunParagraphsEvent
 
   // isset id assignments
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
-        new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(
-        _Fields.NOTE_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "noteId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.PARAGRAPH_IDS,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "paragraphIds",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.ListMetaData(
-                org.apache.thrift.protocol.TType.LIST,
-                new org.apache.thrift.meta_data.FieldValueMetaData(
-                    org.apache.thrift.protocol.TType.STRING))));
-    tmpMap.put(
-        _Fields.PARAGRAPH_INDICES,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "paragraphIndices",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.ListMetaData(
-                org.apache.thrift.protocol.TType.LIST,
-                new org.apache.thrift.meta_data.FieldValueMetaData(
-                    org.apache.thrift.protocol.TType.I32))));
-    tmpMap.put(
-        _Fields.CUR_PARAGRAPH_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "curParagraphId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.NOTE_ID, new org.apache.thrift.meta_data.FieldMetaData("noteId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PARAGRAPH_IDS, new org.apache.thrift.meta_data.FieldMetaData("paragraphIds", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+    tmpMap.put(_Fields.PARAGRAPH_INDICES, new org.apache.thrift.meta_data.FieldMetaData("paragraphIndices", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))));
+    tmpMap.put(_Fields.CUR_PARAGRAPH_ID, new org.apache.thrift.meta_data.FieldMetaData("curParagraphId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
-        RunParagraphsEvent.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RunParagraphsEvent.class, metaDataMap);
   }
 
-  public RunParagraphsEvent() {}
+  public RunParagraphsEvent() {
+  }
 
   public RunParagraphsEvent(
-      String noteId,
-      List<String> paragraphIds,
-      List<Integer> paragraphIndices,
-      String curParagraphId) {
+    String noteId,
+    List<String> paragraphIds,
+    List<Integer> paragraphIndices,
+    String curParagraphId)
+  {
     this();
     this.noteId = noteId;
     this.paragraphIds = paragraphIds;
@@ -194,7 +172,9 @@ public class RunParagraphsEvent
     this.curParagraphId = curParagraphId;
   }
 
-  /** Performs a deep copy on <i>other</i>. */
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
   public RunParagraphsEvent(RunParagraphsEvent other) {
     if (other.isSetNoteId()) {
       this.noteId = other.noteId;
@@ -315,9 +295,7 @@ public class RunParagraphsEvent
     this.paragraphIndices = null;
   }
 
-  /**
-   * Returns true if field paragraphIndices is set (has been assigned a value) and false otherwise
-   */
+  /** Returns true if field paragraphIndices is set (has been assigned a value) and false otherwise */
   public boolean isSetParagraphIndices() {
     return this.paragraphIndices != null;
   }
@@ -354,115 +332,125 @@ public class RunParagraphsEvent
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-      case NOTE_ID:
-        if (value == null) {
-          unsetNoteId();
-        } else {
-          setNoteId((String) value);
-        }
-        break;
+    case NOTE_ID:
+      if (value == null) {
+        unsetNoteId();
+      } else {
+        setNoteId((String)value);
+      }
+      break;
 
-      case PARAGRAPH_IDS:
-        if (value == null) {
-          unsetParagraphIds();
-        } else {
-          setParagraphIds((List<String>) value);
-        }
-        break;
+    case PARAGRAPH_IDS:
+      if (value == null) {
+        unsetParagraphIds();
+      } else {
+        setParagraphIds((List<String>)value);
+      }
+      break;
 
-      case PARAGRAPH_INDICES:
-        if (value == null) {
-          unsetParagraphIndices();
-        } else {
-          setParagraphIndices((List<Integer>) value);
-        }
-        break;
+    case PARAGRAPH_INDICES:
+      if (value == null) {
+        unsetParagraphIndices();
+      } else {
+        setParagraphIndices((List<Integer>)value);
+      }
+      break;
+
+    case CUR_PARAGRAPH_ID:
+      if (value == null) {
+        unsetCurParagraphId();
+      } else {
+        setCurParagraphId((String)value);
+      }
+      break;
 
-      case CUR_PARAGRAPH_ID:
-        if (value == null) {
-          unsetCurParagraphId();
-        } else {
-          setCurParagraphId((String) value);
-        }
-        break;
     }
   }
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-      case NOTE_ID:
-        return getNoteId();
+    case NOTE_ID:
+      return getNoteId();
+
+    case PARAGRAPH_IDS:
+      return getParagraphIds();
 
-      case PARAGRAPH_IDS:
-        return getParagraphIds();
+    case PARAGRAPH_INDICES:
+      return getParagraphIndices();
 
-      case PARAGRAPH_INDICES:
-        return getParagraphIndices();
+    case CUR_PARAGRAPH_ID:
+      return getCurParagraphId();
 
-      case CUR_PARAGRAPH_ID:
-        return getCurParagraphId();
     }
     throw new IllegalStateException();
   }
 
-  /**
-   * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
-   * otherwise
-   */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
     }
 
     switch (field) {
-      case NOTE_ID:
-        return isSetNoteId();
-      case PARAGRAPH_IDS:
-        return isSetParagraphIds();
-      case PARAGRAPH_INDICES:
-        return isSetParagraphIndices();
-      case CUR_PARAGRAPH_ID:
-        return isSetCurParagraphId();
+    case NOTE_ID:
+      return isSetNoteId();
+    case PARAGRAPH_IDS:
+      return isSetParagraphIds();
+    case PARAGRAPH_INDICES:
+      return isSetParagraphIndices();
+    case CUR_PARAGRAPH_ID:
+      return isSetCurParagraphId();
     }
     throw new IllegalStateException();
   }
 
   @Override
   public boolean equals(Object that) {
-    if (that == null) return false;
-    if (that instanceof RunParagraphsEvent) return this.equals((RunParagraphsEvent) that);
+    if (that == null)
+      return false;
+    if (that instanceof RunParagraphsEvent)
+      return this.equals((RunParagraphsEvent)that);
     return false;
   }
 
   public boolean equals(RunParagraphsEvent that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
 
     boolean this_present_noteId = true && this.isSetNoteId();
     boolean that_present_noteId = true && that.isSetNoteId();
     if (this_present_noteId || that_present_noteId) {
-      if (!(this_present_noteId && that_present_noteId)) return false;
-      if (!this.noteId.equals(that.noteId)) return false;
+      if (!(this_present_noteId && that_present_noteId))
+        return false;
+      if (!this.noteId.equals(that.noteId))
+        return false;
     }
 
     boolean this_present_paragraphIds = true && this.isSetParagraphIds();
     boolean that_present_paragraphIds = true && that.isSetParagraphIds();
     if (this_present_paragraphIds || that_present_paragraphIds) {
-      if (!(this_present_paragraphIds && that_present_paragraphIds)) return false;
-      if (!this.paragraphIds.equals(that.paragraphIds)) return false;
+      if (!(this_present_paragraphIds && that_present_paragraphIds))
+        return false;
+      if (!this.paragraphIds.equals(that.paragraphIds))
+        return false;
     }
 
     boolean this_present_paragraphIndices = true && this.isSetParagraphIndices();
     boolean that_present_paragraphIndices = true && that.isSetParagraphIndices();
     if (this_present_paragraphIndices || that_present_paragraphIndices) {
-      if (!(this_present_paragraphIndices && that_present_paragraphIndices)) return false;
-      if (!this.paragraphIndices.equals(that.paragraphIndices)) return false;
+      if (!(this_present_paragraphIndices && that_present_paragraphIndices))
+        return false;
+      if (!this.paragraphIndices.equals(that.paragraphIndices))
+        return false;
     }
 
     boolean this_present_curParagraphId = true && this.isSetCurParagraphId();
     boolean that_present_curParagraphId = true && that.isSetCurParagraphId();
     if (this_present_curParagraphId || that_present_curParagraphId) {
-      if (!(this_present_curParagraphId && that_present_curParagraphId)) return false;
-      if (!this.curParagraphId.equals(that.curParagraphId)) return false;
+      if (!(this_present_curParagraphId && that_present_curParagraphId))
+        return false;
+      if (!this.curParagraphId.equals(that.curParagraphId))
+        return false;
     }
 
     return true;
@@ -474,19 +462,23 @@ public class RunParagraphsEvent
 
     boolean present_noteId = true && (isSetNoteId());
     list.add(present_noteId);
-    if (present_noteId) list.add(noteId);
+    if (present_noteId)
+      list.add(noteId);
 
     boolean present_paragraphIds = true && (isSetParagraphIds());
     list.add(present_paragraphIds);
-    if (present_paragraphIds) list.add(paragraphIds);
+    if (present_paragraphIds)
+      list.add(paragraphIds);
 
     boolean present_paragraphIndices = true && (isSetParagraphIndices());
     list.add(present_paragraphIndices);
-    if (present_paragraphIndices) list.add(paragraphIndices);
+    if (present_paragraphIndices)
+      list.add(paragraphIndices);
 
     boolean present_curParagraphId = true && (isSetCurParagraphId());
     list.add(present_curParagraphId);
-    if (present_curParagraphId) list.add(curParagraphId);
+    if (present_curParagraphId)
+      list.add(curParagraphId);
 
     return list.hashCode();
   }
@@ -514,20 +506,17 @@ public class RunParagraphsEvent
       return lastComparison;
     }
     if (isSetParagraphIds()) {
-      lastComparison =
-          org.apache.thrift.TBaseHelper.compareTo(this.paragraphIds, other.paragraphIds);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paragraphIds, other.paragraphIds);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison =
-        Boolean.valueOf(isSetParagraphIndices()).compareTo(other.isSetParagraphIndices());
+    lastComparison = Boolean.valueOf(isSetParagraphIndices()).compareTo(other.isSetParagraphIndices());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetParagraphIndices()) {
-      lastComparison =
-          org.apache.thrift.TBaseHelper.compareTo(this.paragraphIndices, other.paragraphIndices);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paragraphIndices, other.paragraphIndices);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -537,8 +526,7 @@ public class RunParagraphsEvent
       return lastComparison;
     }
     if (isSetCurParagraphId()) {
-      lastComparison =
-          org.apache.thrift.TBaseHelper.compareTo(this.curParagraphId, other.curParagraphId);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.curParagraphId, other.curParagraphId);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -554,8 +542,7 @@ public class RunParagraphsEvent
     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
-  public void write(org.apache.thrift.protocol.TProtocol oprot)
-      throws org.apache.thrift.TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
@@ -606,20 +593,15 @@ public class RunParagraphsEvent
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
     try {
-      write(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(out)));
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in)
-      throws java.io.IOException, ClassNotFoundException {
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
-      read(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(in)));
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
@@ -633,13 +615,13 @@ public class RunParagraphsEvent
 
   private static class RunParagraphsEventStandardScheme extends StandardScheme<RunParagraphsEvent> {
 
-    public void read(org.apache.thrift.protocol.TProtocol iprot, RunParagraphsEvent struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol iprot, RunParagraphsEvent struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
       iprot.readStructBegin();
-      while (true) {
+      while (true)
+      {
         schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
           break;
         }
         switch (schemeField.id) {
@@ -647,7 +629,7 @@ public class RunParagraphsEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.noteId = iprot.readString();
               struct.setNoteIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -657,14 +639,15 @@ public class RunParagraphsEvent
                 org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
                 struct.paragraphIds = new ArrayList<String>(_list8.size);
                 String _elem9;
-                for (int _i10 = 0; _i10 < _list8.size; ++_i10) {
+                for (int _i10 = 0; _i10 < _list8.size; ++_i10)
+                {
                   _elem9 = iprot.readString();
                   struct.paragraphIds.add(_elem9);
                 }
                 iprot.readListEnd();
               }
               struct.setParagraphIdsIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -674,14 +657,15 @@ public class RunParagraphsEvent
                 org.apache.thrift.protocol.TList _list11 = iprot.readListBegin();
                 struct.paragraphIndices = new ArrayList<Integer>(_list11.size);
                 int _elem12;
-                for (int _i13 = 0; _i13 < _list11.size; ++_i13) {
+                for (int _i13 = 0; _i13 < _list11.size; ++_i13)
+                {
                   _elem12 = iprot.readI32();
                   struct.paragraphIndices.add(_elem12);
                 }
                 iprot.readListEnd();
               }
               struct.setParagraphIndicesIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -689,7 +673,7 @@ public class RunParagraphsEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.curParagraphId = iprot.readString();
               struct.setCurParagraphIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -704,8 +688,7 @@ public class RunParagraphsEvent
       struct.validate();
     }
 
-    public void write(org.apache.thrift.protocol.TProtocol oprot, RunParagraphsEvent struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol oprot, RunParagraphsEvent struct) throws org.apache.thrift.TException {
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
@@ -717,10 +700,9 @@ public class RunParagraphsEvent
       if (struct.paragraphIds != null) {
         oprot.writeFieldBegin(PARAGRAPH_IDS_FIELD_DESC);
         {
-          oprot.writeListBegin(
-              new org.apache.thrift.protocol.TList(
-                  org.apache.thrift.protocol.TType.STRING, struct.paragraphIds.size()));
-          for (String _iter14 : struct.paragraphIds) {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.paragraphIds.size()));
+          for (String _iter14 : struct.paragraphIds)
+          {
             oprot.writeString(_iter14);
           }
           oprot.writeListEnd();
@@ -730,10 +712,9 @@ public class RunParagraphsEvent
       if (struct.paragraphIndices != null) {
         oprot.writeFieldBegin(PARAGRAPH_INDICES_FIELD_DESC);
         {
-          oprot.writeListBegin(
-              new org.apache.thrift.protocol.TList(
-                  org.apache.thrift.protocol.TType.I32, struct.paragraphIndices.size()));
-          for (int _iter15 : struct.paragraphIndices) {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.paragraphIndices.size()));
+          for (int _iter15 : struct.paragraphIndices)
+          {
             oprot.writeI32(_iter15);
           }
           oprot.writeListEnd();
@@ -748,6 +729,7 @@ public class RunParagraphsEvent
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
+
   }
 
   private static class RunParagraphsEventTupleSchemeFactory implements SchemeFactory {
@@ -759,8 +741,7 @@ public class RunParagraphsEvent
   private static class RunParagraphsEventTupleScheme extends TupleScheme<RunParagraphsEvent> {
 
     @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, RunParagraphsEvent struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol prot, RunParagraphsEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
       if (struct.isSetNoteId()) {
@@ -782,7 +763,8 @@ public class RunParagraphsEvent
       if (struct.isSetParagraphIds()) {
         {
           oprot.writeI32(struct.paragraphIds.size());
-          for (String _iter16 : struct.paragraphIds) {
+          for (String _iter16 : struct.paragraphIds)
+          {
             oprot.writeString(_iter16);
           }
         }
@@ -790,7 +772,8 @@ public class RunParagraphsEvent
       if (struct.isSetParagraphIndices()) {
         {
           oprot.writeI32(struct.paragraphIndices.size());
-          for (int _iter17 : struct.paragraphIndices) {
+          for (int _iter17 : struct.paragraphIndices)
+          {
             oprot.writeI32(_iter17);
           }
         }
@@ -801,8 +784,7 @@ public class RunParagraphsEvent
     }
 
     @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, RunParagraphsEvent struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol prot, RunParagraphsEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(4);
       if (incoming.get(0)) {
@@ -811,12 +793,11 @@ public class RunParagraphsEvent
       }
       if (incoming.get(1)) {
         {
-          org.apache.thrift.protocol.TList _list18 =
-              new org.apache.thrift.protocol.TList(
-                  org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          org.apache.thrift.protocol.TList _list18 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
           struct.paragraphIds = new ArrayList<String>(_list18.size);
           String _elem19;
-          for (int _i20 = 0; _i20 < _list18.size; ++_i20) {
+          for (int _i20 = 0; _i20 < _list18.size; ++_i20)
+          {
             _elem19 = iprot.readString();
             struct.paragraphIds.add(_elem19);
           }
@@ -825,12 +806,11 @@ public class RunParagraphsEvent
       }
       if (incoming.get(2)) {
         {
-          org.apache.thrift.protocol.TList _list21 =
-              new org.apache.thrift.protocol.TList(
-                  org.apache.thrift.protocol.TType.I32, iprot.readI32());
+          org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
           struct.paragraphIndices = new ArrayList<Integer>(_list21.size);
           int _elem22;
-          for (int _i23 = 0; _i23 < _list21.size; ++_i23) {
+          for (int _i23 = 0; _i23 < _list21.size; ++_i23)
+          {
             _elem22 = iprot.readI32();
             struct.paragraphIndices.add(_elem22);
           }
@@ -843,4 +823,6 @@ public class RunParagraphsEvent
       }
     }
   }
+
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/util/InterpreterOutputStream.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/util/InterpreterOutputStream.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/util/InterpreterOutputStream.java
index 063d559..258a65d 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/util/InterpreterOutputStream.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/util/InterpreterOutputStream.java
@@ -17,14 +17,15 @@
 
 package org.apache.zeppelin.interpreter.util;
 
-import java.io.IOException;
 import org.apache.zeppelin.interpreter.InterpreterOutput;
 import org.slf4j.Logger;
 
+import java.io.IOException;
+
 /**
  * Output Stream integrated with InterpreterOutput.
  *
- * <p>Can be used to channel output from interpreters.
+ * Can be used to channel output from interpreters.
  */
 public class InterpreterOutputStream extends LogOutputStream {
   private Logger logger;
@@ -48,8 +49,8 @@ public class InterpreterOutputStream extends LogOutputStream {
     if (ignoreLeadingNewLinesFromScalaReporter && b == '\n') {
       StackTraceElement[] stacks = Thread.currentThread().getStackTrace();
       for (StackTraceElement stack : stacks) {
-        if (stack.getClassName().equals("scala.tools.nsc.interpreter.ReplReporter")
-            && stack.getMethodName().equals("error")) {
+        if (stack.getClassName().equals("scala.tools.nsc.interpreter.ReplReporter") &&
+            stack.getMethodName().equals("error")) {
           // ignore. Please see ZEPPELIN-2067
           return;
         }
@@ -64,12 +65,12 @@ public class InterpreterOutputStream extends LogOutputStream {
   }
 
   @Override
-  public void write(byte[] b) throws IOException {
+  public void write(byte [] b) throws IOException {
     write(b, 0, b.length);
   }
 
   @Override
-  public void write(byte[] b, int off, int len) throws IOException {
+  public void write(byte [] b, int off, int len) throws IOException {
     for (int i = off; i < len; i++) {
       write(b[i]);
     }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/util/LogOutputStream.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/util/LogOutputStream.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/util/LogOutputStream.java
index 57405e0..e77f441 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/util/LogOutputStream.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/util/LogOutputStream.java
@@ -22,9 +22,9 @@ import java.io.IOException;
 import java.io.OutputStream;
 
 /**
- * Minor modification of LogOutputStream of apache commons exec. LogOutputStream of apache commons
- * exec has one issue that method flush doesn't throw IOException, so that SparkOutputStream can not
- * extend it correctly.
+ * Minor modification of LogOutputStream of apache commons exec.
+ * LogOutputStream of apache commons exec has one issue that method flush doesn't throw IOException,
+ * so that SparkOutputStream can not extend it correctly.
  */
 public abstract class LogOutputStream extends OutputStream {
   private static final int INTIAL_SIZE = 132;
@@ -61,6 +61,7 @@ public abstract class LogOutputStream extends OutputStream {
     if (this.buffer.size() > 0) {
       this.processBuffer();
     }
+
   }
 
   @Override
@@ -98,6 +99,7 @@ public abstract class LogOutputStream extends OutputStream {
         --remaining;
       }
     }
+
   }
 
   protected void processBuffer() {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ByteBufferInputStream.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ByteBufferInputStream.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ByteBufferInputStream.java
index 2f75967..efccb6a 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ByteBufferInputStream.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ByteBufferInputStream.java
@@ -21,7 +21,10 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.nio.ByteBuffer;
 
-/** InputStream from bytebuffer */
+
+/**
+ * InputStream from bytebuffer
+ */
 public class ByteBufferInputStream extends InputStream {
 
   ByteBuffer buf;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/DistributedResourcePool.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/DistributedResourcePool.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/DistributedResourcePool.java
index 8a3d7e2..ba31f01 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/DistributedResourcePool.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/DistributedResourcePool.java
@@ -16,7 +16,9 @@
  */
 package org.apache.zeppelin.resource;
 
-/** distributed resource pool */
+/**
+ * distributed resource pool
+ */
 public class DistributedResourcePool extends LocalResourcePool {
 
   private final ResourcePoolConnector connector;
@@ -38,7 +40,6 @@ public class DistributedResourcePool extends LocalResourcePool {
 
   /**
    * get resource by name.
-   *
    * @param name
    * @param remote false only return from local resource
    * @return null if resource not found.
@@ -64,7 +65,6 @@ public class DistributedResourcePool extends LocalResourcePool {
 
   /**
    * get resource by name.
-   *
    * @param name
    * @param remote false only return from local resource
    * @return null if resource not found.
@@ -77,12 +77,10 @@ public class DistributedResourcePool extends LocalResourcePool {
     }
 
     if (remote) {
-      ResourceSet resources =
-          connector
-              .getAllResources()
-              .filterByNoteId(noteId)
-              .filterByParagraphId(paragraphId)
-              .filterByName(name);
+      ResourceSet resources = connector.getAllResources()
+          .filterByNoteId(noteId)
+          .filterByParagraphId(paragraphId)
+          .filterByName(name);
 
       if (resources.isEmpty()) {
         return null;
@@ -101,7 +99,6 @@ public class DistributedResourcePool extends LocalResourcePool {
 
   /**
    * Get all resource from the pool
-   *
    * @param remote false only return local resource
    * @return
    */

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/LocalResourcePool.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/LocalResourcePool.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/LocalResourcePool.java
index 30d5689..7ae2273 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/LocalResourcePool.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/LocalResourcePool.java
@@ -20,13 +20,17 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
-/** ResourcePool */
+/**
+ * ResourcePool
+ */
 public class LocalResourcePool implements ResourcePool {
   private final String resourcePoolId;
-  private final Map<ResourceId, Resource> resources =
-      Collections.synchronizedMap(new HashMap<ResourceId, Resource>());
+  private final Map<ResourceId, Resource> resources = Collections.synchronizedMap(
+      new HashMap<ResourceId, Resource>());
 
-  /** @param id unique id */
+  /**
+   * @param id unique id
+   */
   public LocalResourcePool(String id) {
     resourcePoolId = id;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/RemoteResource.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/RemoteResource.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/RemoteResource.java
index e05e98c..874c1cb 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/RemoteResource.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/RemoteResource.java
@@ -19,7 +19,9 @@ package org.apache.zeppelin.resource;
 import com.google.gson.Gson;
 import org.apache.zeppelin.common.JsonSerializable;
 
-/** Resource that can retrieve data from remote */
+/**
+ * Resource that can retrieve data from remote
+ */
 public class RemoteResource extends Resource implements JsonSerializable {
   private static final Gson gson = new Gson();
 
@@ -58,21 +60,24 @@ public class RemoteResource extends Resource implements JsonSerializable {
 
   /**
    * Call a method of the object that this remote resource holds
-   *
    * @param methodName name of method to call
    * @param paramTypes method parameter types
    * @param params method parameter values
    * @return return value of the method. Null if return value is not serializable
    */
   @Override
-  public Object invokeMethod(String methodName, Class[] paramTypes, Object[] params) {
+  public Object invokeMethod(
+      String methodName, Class [] paramTypes, Object [] params) {
     ResourceId resourceId = getResourceId();
-    return resourcePoolConnector.invokeMethod(resourceId, methodName, paramTypes, params);
+    return resourcePoolConnector.invokeMethod(
+        resourceId,
+        methodName,
+        paramTypes,
+        params);
   }
 
   /**
    * Call a method of the object that this remote resource holds and save return value as a resource
-   *
    * @param methodName name of method to call
    * @param paramTypes method parameter types
    * @param params method parameter values
@@ -81,11 +86,14 @@ public class RemoteResource extends Resource implements JsonSerializable {
    */
   @Override
   public Resource invokeMethod(
-      String methodName, Class[] paramTypes, Object[] params, String returnResourceName) {
+      String methodName, Class [] paramTypes, Object [] params, String returnResourceName) {
     ResourceId resourceId = getResourceId();
-    Resource resource =
-        resourcePoolConnector.invokeMethod(
-            resourceId, methodName, paramTypes, params, returnResourceName);
+    Resource resource = resourcePoolConnector.invokeMethod(
+        resourceId,
+        methodName,
+        paramTypes,
+        params,
+        returnResourceName);
     return resource;
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/Resource.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/Resource.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/Resource.java
index c83a510..ec95ffb 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/Resource.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/Resource.java
@@ -17,6 +17,10 @@
 package org.apache.zeppelin.resource;
 
 import com.google.gson.Gson;
+import org.apache.zeppelin.common.JsonSerializable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -25,11 +29,10 @@ import java.io.ObjectOutputStream;
 import java.io.Serializable;
 import java.lang.reflect.Method;
 import java.nio.ByteBuffer;
-import org.apache.zeppelin.common.JsonSerializable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Information and reference to the resource */
+/**
+ * Information and reference to the resource
+ */
 public class Resource implements JsonSerializable {
   private static final Gson gson = new Gson();
 
@@ -39,11 +42,12 @@ public class Resource implements JsonSerializable {
   private final ResourceId resourceId;
   private final String className;
 
+
   /**
    * Create local resource
    *
    * @param resourceId
-   * @param r must not be null
+   * @param r          must not be null
    */
   Resource(LocalResourcePool pool, ResourceId resourceId, Object r) {
     this.r = r;
@@ -74,7 +78,9 @@ public class Resource implements JsonSerializable {
     return className;
   }
 
-  /** @return null when this is remote resource and not serializable. */
+  /**
+   * @return null when this is remote resource and not serializable.
+   */
   public Object get() {
     if (isLocal() || isSerializable()) {
       return r;
@@ -105,18 +111,22 @@ public class Resource implements JsonSerializable {
     return true;
   }
 
+
   /**
    * Call a method of the object that this resource holds
    *
    * @param methodName name of method to call
    * @param paramTypes method parameter types
-   * @param params method parameter values
+   * @param params     method parameter values
    * @return return value of the method
    */
-  public Object invokeMethod(String methodName, Class[] paramTypes, Object[] params) {
+  public Object invokeMethod(
+      String methodName, Class[] paramTypes, Object[] params) {
     if (r != null) {
       try {
-        Method method = r.getClass().getMethod(methodName, paramTypes);
+        Method method = r.getClass().getMethod(
+            methodName,
+            paramTypes);
         method.setAccessible(true);
         Object ret = method.invoke(r, params);
         return ret;
@@ -132,9 +142,9 @@ public class Resource implements JsonSerializable {
   /**
    * Call a method of the object that this resource holds and save return value as a resource
    *
-   * @param methodName name of method to call
-   * @param paramTypes method parameter types
-   * @param params method parameter values
+   * @param methodName         name of method to call
+   * @param paramTypes         method parameter types
+   * @param params             method parameter values
    * @param returnResourceName name of resource that return value will be saved
    * @return Resource that holds return value
    */
@@ -142,10 +152,20 @@ public class Resource implements JsonSerializable {
       String methodName, Class[] paramTypes, Object[] params, String returnResourceName) {
     if (r != null) {
       try {
-        Method method = r.getClass().getMethod(methodName, paramTypes);
+        Method method = r.getClass().getMethod(
+            methodName,
+            paramTypes);
         Object ret = method.invoke(r, params);
-        pool.put(resourceId.getNoteId(), resourceId.getParagraphId(), returnResourceName, ret);
-        return pool.get(resourceId.getNoteId(), resourceId.getParagraphId(), returnResourceName);
+        pool.put(
+            resourceId.getNoteId(),
+            resourceId.getParagraphId(),
+            returnResourceName,
+            ret
+        );
+        return pool.get(
+            resourceId.getNoteId(),
+            resourceId.getParagraphId(),
+            returnResourceName);
       } catch (Exception e) {
         logException(e);
         return null;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourceId.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourceId.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourceId.java
index 6afee96..bef9e3f 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourceId.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourceId.java
@@ -19,7 +19,9 @@ package org.apache.zeppelin.resource;
 import com.google.gson.Gson;
 import org.apache.zeppelin.common.JsonSerializable;
 
-/** Identifying resource */
+/**
+ * Identifying resource
+ */
 public class ResourceId implements JsonSerializable {
   private static final Gson gson = new Gson();
 
@@ -67,10 +69,8 @@ public class ResourceId implements JsonSerializable {
   public boolean equals(Object o) {
     if (o instanceof ResourceId) {
       ResourceId r = (ResourceId) o;
-      return equals(r.name, name)
-          && equals(r.resourcePoolId, resourcePoolId)
-          && equals(r.noteId, noteId)
-          && equals(r.paragraphId, paragraphId);
+      return equals(r.name, name) && equals(r.resourcePoolId, resourcePoolId) &&
+          equals(r.noteId, noteId) && equals(r.paragraphId, paragraphId);
     } else {
       return false;
     }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourcePool.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourcePool.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourcePool.java
index 6eb4cfe..12b4d7a 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourcePool.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourcePool.java
@@ -16,18 +16,18 @@
  */
 package org.apache.zeppelin.resource;
 
-/** Interface for ResourcePool */
+/**
+ * Interface for ResourcePool
+ */
 public interface ResourcePool {
   /**
    * Get unique id of the resource pool
-   *
    * @return
    */
   String id();
 
   /**
    * Get resource from name
-   *
    * @param name Resource name
    * @return null if resource not found
    */
@@ -35,7 +35,6 @@ public interface ResourcePool {
 
   /**
    * Get resource from name
-   *
    * @param noteId
    * @param paragraphId
    * @param name Resource name
@@ -45,22 +44,21 @@ public interface ResourcePool {
 
   /**
    * Get all resources
-   *
    * @return
    */
   ResourceSet getAll();
 
   /**
    * Put an object into resource pool
-   *
    * @param name
    * @param object
    */
   void put(String name, Object object);
 
   /**
-   * Put an object into resource pool Given noteId and paragraphId is identifying resource along
-   * with name. Object will be automatically removed on related note or paragraph removal.
+   * Put an object into resource pool
+   * Given noteId and paragraphId is identifying resource along with name.
+   * Object will be automatically removed on related note or paragraph removal.
    *
    * @param noteId
    * @param paragraphId
@@ -71,7 +69,6 @@ public interface ResourcePool {
 
   /**
    * Remove object
-   *
    * @param name Resource name to remove
    * @return removed Resource. null if resource not found
    */
@@ -79,7 +76,6 @@ public interface ResourcePool {
 
   /**
    * Remove object
-   *
    * @param noteId
    * @param paragraphId
    * @param name Resource name to remove

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourcePoolConnector.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourcePoolConnector.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourcePoolConnector.java
index 0def33f..169229b 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourcePoolConnector.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourcePoolConnector.java
@@ -16,30 +16,35 @@
  */
 package org.apache.zeppelin.resource;
 
-/** Connect resource pools running in remote process */
+/**
+ * Connect resource pools running in remote process
+ */
 public interface ResourcePoolConnector {
   /**
    * Get list of resources from all other resource pools in remote processes
-   *
    * @return
    */
   ResourceSet getAllResources();
 
   /**
    * Read remote object
-   *
    * @return
    */
   Object readResource(ResourceId id);
 
   /**
    * Invoke method of Resource and get return
-   *
    * @return
    */
-  Object invokeMethod(ResourceId id, String methodName, Class[] paramTypes, Object[] params);
+  Object invokeMethod(
+      ResourceId id,
+      String methodName,
+      Class[] paramTypes,
+      Object[] params);
 
-  /** Invoke method, put result into resource pool and return */
+  /**
+   * Invoke method, put result into resource pool and return
+   */
   Resource invokeMethod(
       ResourceId id,
       String methodName,

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourceSet.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourceSet.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourceSet.java
index 5690cbb..01d3c70 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourceSet.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourceSet.java
@@ -17,12 +17,15 @@
 package org.apache.zeppelin.resource;
 
 import com.google.gson.Gson;
+import org.apache.zeppelin.common.JsonSerializable;
+
 import java.util.Collection;
 import java.util.LinkedList;
 import java.util.regex.Pattern;
-import org.apache.zeppelin.common.JsonSerializable;
 
-/** List of resources */
+/**
+ * List of resources
+ */
 public class ResourceSet extends LinkedList<Resource> implements JsonSerializable {
 
   private static final Gson gson = new Gson();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/WellKnownResourceName.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/WellKnownResourceName.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/WellKnownResourceName.java
index 49adec6..4613c62 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/WellKnownResourceName.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/WellKnownResourceName.java
@@ -16,13 +16,14 @@
  */
 package org.apache.zeppelin.resource;
 
-/** Well known resource names in ResourcePool */
+/**
+ * Well known resource names in ResourcePool
+ */
 public enum WellKnownResourceName {
-  ZeppelinReplResult("zeppelin.repl.result"), // last object of repl
-  ZeppelinTableResult("zeppelin.paragraph.result.table"); // paragraph run result
+  ZeppelinReplResult("zeppelin.repl.result"),                 // last object of repl
+  ZeppelinTableResult("zeppelin.paragraph.result.table");     // paragraph run result
 
   String name;
-
   WellKnownResourceName(String name) {
     this.name = name;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/ExecutorFactory.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/ExecutorFactory.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/ExecutorFactory.java
index a867e9a..c09af6d 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/ExecutorFactory.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/ExecutorFactory.java
@@ -21,14 +21,18 @@ import java.util.Map;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
-/** */
+/**
+ *
+ */
 public class ExecutorFactory {
   private static ExecutorFactory _executor;
   private static Long _executorLock = new Long(0);
 
   Map<String, ExecutorService> executor = new HashMap<>();
 
-  public ExecutorFactory() {}
+  public ExecutorFactory() {
+
+  }
 
   public static ExecutorFactory singleton() {
     if (_executor == null) {
@@ -68,9 +72,10 @@ public class ExecutorFactory {
     }
   }
 
+
   public void shutdownAll() {
     synchronized (executor) {
-      for (String name : executor.keySet()) {
+      for (String name : executor.keySet()){
         shutdown(name);
       }
     }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/FIFOScheduler.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/FIFOScheduler.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/FIFOScheduler.java
index ac326d1..fd467b6 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/FIFOScheduler.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/FIFOScheduler.java
@@ -22,12 +22,15 @@ import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.concurrent.ExecutorService;
+
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.scheduler.Job.Status;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** FIFOScheduler runs submitted job sequentially */
+/**
+ * FIFOScheduler runs submitted job sequentially
+ */
 public class FIFOScheduler implements Scheduler {
   List<Job> queue = new LinkedList<>();
   private ExecutorService executor;
@@ -72,6 +75,8 @@ public class FIFOScheduler implements Scheduler {
     return ret;
   }
 
+
+
   @Override
   public void submit(Job job) {
     job.setStatus(Status.PENDING);
@@ -81,6 +86,7 @@ public class FIFOScheduler implements Scheduler {
     }
   }
 
+
   @Override
   public Job removeFromWaitingQueue(String jobId) {
     synchronized (queue) {
@@ -115,57 +121,54 @@ public class FIFOScheduler implements Scheduler {
         }
 
         final Scheduler scheduler = this;
-        this.executor.execute(
-            new Runnable() {
-              @Override
-              public void run() {
-                if (runningJob.isAborted()) {
-                  runningJob.setStatus(Status.ABORT);
-                  runningJob.aborted = false;
-                  synchronized (queue) {
-                    queue.notify();
-                  }
-                  return;
-                }
-
-                runningJob.setStatus(Status.RUNNING);
-                if (listener != null) {
-                  listener.jobStarted(scheduler, runningJob);
-                }
-                runningJob.run();
-                Object jobResult = runningJob.getReturn();
-                if (runningJob.isAborted()) {
-                  runningJob.setStatus(Status.ABORT);
-                  LOGGER.debug(
-                      "Job Aborted, " + runningJob.getId() + ", " + runningJob.getErrorMessage());
-                } else if (runningJob.getException() != null) {
-                  LOGGER.debug("Job Error, " + runningJob.getId() + ", " + runningJob.getReturn());
-                  runningJob.setStatus(Status.ERROR);
-                } else if (jobResult != null
-                    && jobResult instanceof InterpreterResult
-                    && ((InterpreterResult) jobResult).code() == InterpreterResult.Code.ERROR) {
-                  LOGGER.debug("Job Error, " + runningJob.getId() + ", " + runningJob.getReturn());
-                  runningJob.setStatus(Status.ERROR);
-                } else {
-                  LOGGER.debug(
-                      "Job Finished, "
-                          + runningJob.getId()
-                          + ", Result: "
-                          + runningJob.getReturn());
-                  runningJob.setStatus(Status.FINISHED);
-                }
-
-                if (listener != null) {
-                  listener.jobFinished(scheduler, runningJob);
-                }
-                // reset aborted flag to allow retry
-                runningJob.aborted = false;
-                runningJob = null;
-                synchronized (queue) {
-                  queue.notify();
-                }
+        this.executor.execute(new Runnable() {
+          @Override
+          public void run() {
+            if (runningJob.isAborted()) {
+              runningJob.setStatus(Status.ABORT);
+              runningJob.aborted = false;
+              synchronized (queue) {
+                queue.notify();
               }
-            });
+              return;
+            }
+
+            runningJob.setStatus(Status.RUNNING);
+            if (listener != null) {
+              listener.jobStarted(scheduler, runningJob);
+            }
+            runningJob.run();
+            Object jobResult = runningJob.getReturn();
+            if (runningJob.isAborted()) {
+              runningJob.setStatus(Status.ABORT);
+              LOGGER.debug("Job Aborted, " + runningJob.getId() + ", " +
+                  runningJob.getErrorMessage());
+            } else if (runningJob.getException() != null) {
+              LOGGER.debug("Job Error, " + runningJob.getId() + ", " +
+                  runningJob.getReturn());
+              runningJob.setStatus(Status.ERROR);
+            } else if (jobResult != null && jobResult instanceof InterpreterResult
+                && ((InterpreterResult) jobResult).code() == InterpreterResult.Code.ERROR) {
+              LOGGER.debug("Job Error, " + runningJob.getId() + ", " +
+                  runningJob.getReturn());
+              runningJob.setStatus(Status.ERROR);
+            } else {
+              LOGGER.debug("Job Finished, " + runningJob.getId() + ", Result: " +
+                  runningJob.getReturn());
+              runningJob.setStatus(Status.FINISHED);
+            }
+
+            if (listener != null) {
+              listener.jobFinished(scheduler, runningJob);
+            }
+            // reset aborted flag to allow retry
+            runningJob.aborted = false;
+            runningJob = null;
+            synchronized (queue) {
+              queue.notify();
+            }
+          }
+        });
       }
     }
   }
@@ -177,4 +180,5 @@ public class FIFOScheduler implements Scheduler {
       queue.notify();
     }
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 074776b..61c54ae 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
@@ -17,20 +17,25 @@
 
 package org.apache.zeppelin.scheduler;
 
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Map;
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Map;
+
+
 /**
- * Skeletal implementation of the Job concept. - designed for inheritance - should be run on a
- * separate thread - maintains internal state: it's status - supports listeners who are updated on
- * status change
+ * Skeletal implementation of the Job concept.
+ * - designed for inheritance
+ * - should be run on a separate thread
+ * - maintains internal state: it's status
+ * - supports listeners who are updated on status change
  *
- * <p>Job class is serialized/deserialized and used server<->client communication and saving/loading
- * jobs from disk. Changing/adding/deleting non transitive field name need consideration of that.
+ * Job class is serialized/deserialized and used server<->client communication
+ * and saving/loading jobs from disk.
+ * Changing/adding/deleting non transitive field name need consideration of that.
  */
 public abstract class Job<T> {
   private static Logger LOGGER = LoggerFactory.getLogger(Job.class);
@@ -39,18 +44,16 @@ public abstract class Job<T> {
   /**
    * Job status.
    *
-   * <p>UNKNOWN - Job is not found in remote READY - Job is not running, ready to run. PENDING - Job
-   * is submitted to scheduler. but not running yet RUNNING - Job is running. FINISHED - Job
-   * finished run. with success ERROR - Job finished run. with error ABORT - Job finished by abort
+   * UNKNOWN - Job is not found in remote
+   * READY - Job is not running, ready to run.
+   * PENDING - Job is submitted to scheduler. but not running yet
+   * RUNNING - Job is running.
+   * FINISHED - Job finished run. with success
+   * ERROR - Job finished run. with error
+   * ABORT - Job finished by abort
    */
   public enum Status {
-    UNKNOWN,
-    READY,
-    PENDING,
-    RUNNING,
-    FINISHED,
-    ERROR,
-    ABORT;
+    UNKNOWN, READY, PENDING, RUNNING, FINISHED, ERROR, ABORT;
 
     public boolean isReady() {
       return this == READY;
@@ -120,7 +123,9 @@ public abstract class Job<T> {
     return status;
   }
 
-  /** just set status without notifying to listeners for spell. */
+  /**
+   * just set status without notifying to listeners for spell.
+   */
   public void setStatusWithoutNotification(Status status) {
     this.status = status;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/JobListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/JobListener.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/JobListener.java
index dda4520..dba2004 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/JobListener.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/JobListener.java
@@ -17,7 +17,9 @@
 
 package org.apache.zeppelin.scheduler;
 
-/** Listener for job execution. */
+/**
+ * Listener for job execution.
+ */
 public interface JobListener<T extends Job> {
   void onProgressUpdate(T job, int progress);
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 b0faecf..3d6ce12 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
@@ -25,7 +25,8 @@ import org.slf4j.LoggerFactory;
  *
  * @see Job#progress()
  * @see JobListener#onProgressUpdate(org.apache.zeppelin.scheduler.Job, int)
- *     <p>TODO(moon) : add description.
+ *
+ * TODO(moon) : add description.
  */
 public class JobProgressPoller extends Thread {
   public static final long DEFAULT_INTERVAL_MSEC = 500;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/JobWithProgressPoller.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/JobWithProgressPoller.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/JobWithProgressPoller.java
index 8e6332e..d15e5e7 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/JobWithProgressPoller.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/JobWithProgressPoller.java
@@ -17,13 +17,15 @@
 
 package org.apache.zeppelin.scheduler;
 
+
 public abstract class JobWithProgressPoller<T> extends Job<T> {
 
   private transient JobProgressPoller progressPoller;
   private long progressUpdateIntervalMs;
 
-  public JobWithProgressPoller(
-      String jobId, String jobName, JobListener listener, long progressUpdateIntervalMs) {
+
+  public JobWithProgressPoller(String jobId, String jobName, JobListener listener,
+                               long progressUpdateIntervalMs) {
     super(jobId, jobName, listener);
     this.progressUpdateIntervalMs = progressUpdateIntervalMs;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/ParallelScheduler.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/ParallelScheduler.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/ParallelScheduler.java
index 9e0d986..6f67cd7 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/ParallelScheduler.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/ParallelScheduler.java
@@ -22,11 +22,14 @@ import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.concurrent.ExecutorService;
+
 import org.apache.zeppelin.scheduler.Job.Status;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Parallel scheduler runs submitted job concurrently. */
+/**
+ * Parallel scheduler runs submitted job concurrently.
+ */
 public class ParallelScheduler implements Scheduler {
   List<Job> queue = new LinkedList<>();
   List<Job> running = new LinkedList<>();
@@ -38,8 +41,8 @@ public class ParallelScheduler implements Scheduler {
 
   static Logger LOGGER = LoggerFactory.getLogger(ParallelScheduler.class);
 
-  public ParallelScheduler(
-      String name, ExecutorService executor, SchedulerListener listener, int maxConcurrency) {
+  public ParallelScheduler(String name, ExecutorService executor, SchedulerListener listener,
+      int maxConcurrency) {
     this.name = name;
     this.executor = executor;
     this.listener = listener;
@@ -88,6 +91,8 @@ public class ParallelScheduler implements Scheduler {
     return ret;
   }
 
+
+
   @Override
   public void submit(Job job) {
     job.setStatus(Status.PENDING);
@@ -178,6 +183,7 @@ public class ParallelScheduler implements Scheduler {
     }
   }
 
+
   @Override
   public void stop() {
     terminate = true;
@@ -185,4 +191,5 @@ public class ParallelScheduler implements Scheduler {
       queue.notify();
     }
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/Scheduler.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/Scheduler.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/Scheduler.java
index c0d9399..3055727 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/Scheduler.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/Scheduler.java
@@ -19,7 +19,9 @@ package org.apache.zeppelin.scheduler;
 
 import java.util.Collection;
 
-/** Interface for scheduler */
+/**
+ * Interface for scheduler
+ */
 public interface Scheduler extends Runnable {
   String getName();
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/SchedulerFactory.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/SchedulerFactory.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/SchedulerFactory.java
index 51be949..b629ef7 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/SchedulerFactory.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/SchedulerFactory.java
@@ -20,10 +20,14 @@ package org.apache.zeppelin.scheduler;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.concurrent.ExecutorService;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Factory class for creating schedulers */
+/**
+ * Factory class for creating schedulers
+ *
+ */
 public class SchedulerFactory implements SchedulerListener {
   private static final Logger logger = LoggerFactory.getLogger(SchedulerFactory.class);
   protected ExecutorService executor;
@@ -103,10 +107,12 @@ public class SchedulerFactory implements SchedulerListener {
   @Override
   public void jobStarted(Scheduler scheduler, Job job) {
     logger.info("Job " + job.getId() + " started by scheduler " + scheduler.getName());
+
   }
 
   @Override
   public void jobFinished(Scheduler scheduler, Job job) {
     logger.info("Job " + job.getId() + " finished by scheduler " + scheduler.getName());
+
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/SchedulerListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/SchedulerListener.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/SchedulerListener.java
index ef7b272..9a6b3ed 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/SchedulerListener.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/SchedulerListener.java
@@ -17,7 +17,9 @@
 
 package org.apache.zeppelin.scheduler;
 
-/** TODO(moon) : add description. */
+/**
+ * TODO(moon) : add description.
+ */
 public interface SchedulerListener {
   void jobStarted(Scheduler scheduler, Job job);
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/ColumnDef.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/ColumnDef.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/ColumnDef.java
index dbb1355..a2fac20 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/ColumnDef.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/ColumnDef.java
@@ -18,9 +18,13 @@ package org.apache.zeppelin.tabledata;
 
 import java.io.Serializable;
 
-/** Column definition */
+/**
+ * Column definition
+ */
 public class ColumnDef implements Serializable {
-  /** Type */
+  /**
+   * Type
+   */
   public enum TYPE {
     STRING,
     LONG,

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/GraphEntity.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/GraphEntity.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/GraphEntity.java
index 0eafa34..320b144 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/GraphEntity.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/GraphEntity.java
@@ -19,17 +19,25 @@ package org.apache.zeppelin.tabledata;
 
 import java.util.Map;
 
-/** The base network entity */
+/**
+ * The base network entity
+ *
+ */
 public abstract class GraphEntity {
 
   private long id;
 
-  /** The data of the entity */
+  /**
+   * The data of the entity
+   * 
+   */
   private Map<String, Object> data;
 
-  /** The primary type of the entity */
+  /**
+   * The primary type of the entity
+   */
   private String label;
-
+  
   public GraphEntity() {}
 
   public GraphEntity(long id, Map<String, Object> data, String label) {
@@ -62,4 +70,5 @@ public abstract class GraphEntity {
   public void setLabel(String label) {
     this.label = label;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/InterpreterResultTableData.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/InterpreterResultTableData.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/InterpreterResultTableData.java
index 8fcedd2..e11ad45 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/InterpreterResultTableData.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/InterpreterResultTableData.java
@@ -16,16 +16,19 @@
  */
 package org.apache.zeppelin.tabledata;
 
+import org.apache.zeppelin.interpreter.InterpreterResultMessage;
+
 import java.io.Serializable;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
-import org.apache.zeppelin.interpreter.InterpreterResultMessage;
 
-/** Table data with interpreter result type 'TABLE' */
+/**
+ * Table data with interpreter result type 'TABLE'
+ */
 public class InterpreterResultTableData implements TableData, Serializable {
   private final InterpreterResultMessage msg;
-  ColumnDef[] columnDef;
+  ColumnDef [] columnDef;
   List<Row> rows = new LinkedList<>();
 
   public InterpreterResultTableData(InterpreterResultMessage msg) {
@@ -42,12 +45,13 @@ public class InterpreterResultTableData implements TableData, Serializable {
       }
 
       for (int r = 1; r < lines.length; r++) {
-        Object[] row = lines[r].split("\t");
+        Object [] row = lines[r].split("\t");
         rows.add(new Row(row));
       }
     }
   }
 
+
   @Override
   public ColumnDef[] columns() {
     return columnDef;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/Node.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/Node.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/Node.java
index 1f5a716..2efabc4 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/Node.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/Node.java
@@ -20,14 +20,20 @@ package org.apache.zeppelin.tabledata;
 import java.util.Map;
 import java.util.Set;
 
-/** The Zeppelin Node Entity */
+/**
+ * The Zeppelin Node Entity
+ *
+ */
 public class Node extends GraphEntity {
 
-  /** The labels (types) attached to a node */
+  /**
+   * The labels (types) attached to a node
+   */
   private Set<String> labels;
 
   public Node() {}
 
+  
   public Node(long id, Map<String, Object> data, Set<String> labels) {
     super(id, data, labels.iterator().next());
   }
@@ -39,4 +45,5 @@ public class Node extends GraphEntity {
   public void setLabels(Set<String> labels) {
     this.labels = labels;
   }
+ 
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/ProxyRowIterator.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/ProxyRowIterator.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/ProxyRowIterator.java
index f8e60ab..8a59098 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/ProxyRowIterator.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/ProxyRowIterator.java
@@ -16,10 +16,13 @@
  */
 package org.apache.zeppelin.tabledata;
 
-import java.util.Iterator;
 import org.apache.zeppelin.resource.Resource;
 
-/** Proxy row iterator */
+import java.util.Iterator;
+
+/**
+ * Proxy row iterator
+ */
 public class ProxyRowIterator implements Iterator<Row> {
 
   private final Resource rows;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/Relationship.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/Relationship.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/Relationship.java
index 950ab8b..aa8ddb7 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/Relationship.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/Relationship.java
@@ -19,18 +19,26 @@ package org.apache.zeppelin.tabledata;
 
 import java.util.Map;
 
-/** The Zeppelin Relationship entity */
+/**
+ * The Zeppelin Relationship entity
+ *
+ */
 public class Relationship extends GraphEntity {
 
-  /** Source node ID */
+  /**
+   * Source node ID
+   */
   private long source;
 
-  /** End node ID */
+  /**
+   * End node ID
+   */
   private long target;
 
   public Relationship() {}
 
-  public Relationship(long id, Map<String, Object> data, long source, long target, String label) {
+  public Relationship(long id, Map<String, Object> data, long source,
+      long target, String label) {
     super(id, data, label);
     this.setSource(source);
     this.setTarget(target);
@@ -51,4 +59,5 @@ public class Relationship extends GraphEntity {
   public void setTarget(long endNodeId) {
     this.target = endNodeId;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/Row.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/Row.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/Row.java
index 70207c1..9dcf2db 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/Row.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/Row.java
@@ -18,15 +18,17 @@ package org.apache.zeppelin.tabledata;
 
 import java.io.Serializable;
 
-/** Row representation of table data */
+/**
+ * Row representation of table data
+ */
 public class Row implements Serializable {
   private final Object[] data;
 
-  public Row(Object[] data) {
+  public Row(Object [] data) {
     this.data = data;
   }
 
-  public Object[] get() {
+  public Object [] get() {
     return data;
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/TableData.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/TableData.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/TableData.java
index b2fd9b0..ed254c5 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/TableData.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/TableData.java
@@ -18,18 +18,18 @@ package org.apache.zeppelin.tabledata;
 
 import java.util.Iterator;
 
-/** Abstract representation of table data */
+/**
+ * Abstract representation of table data
+ */
 public interface TableData {
   /**
    * Get column definitions
-   *
    * @return
    */
-  ColumnDef[] columns();
+  ColumnDef [] columns();
 
   /**
    * Get row iterator
-   *
    * @param
    * @return
    */

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/TableDataException.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/TableDataException.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/TableDataException.java
index 7258650..d465f1a 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/TableDataException.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/TableDataException.java
@@ -18,7 +18,9 @@ package org.apache.zeppelin.tabledata;
 
 import java.io.IOException;
 
-/** TableDataException */
+/**
+ * TableDataException
+ */
 public class TableDataException extends IOException {
   public TableDataException(String s) {
     super(s);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/TableDataProxy.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/TableDataProxy.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/TableDataProxy.java
index c1b3748..1926528 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/TableDataProxy.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/TableDataProxy.java
@@ -16,10 +16,13 @@
  */
 package org.apache.zeppelin.tabledata;
 
-import java.util.Iterator;
 import org.apache.zeppelin.resource.Resource;
 
-/** Proxy TableData for ResourcePool */
+import java.util.Iterator;
+
+/**
+ * Proxy TableData for ResourcePool
+ */
 public class TableDataProxy implements TableData {
   private final Resource resource;
 
@@ -29,7 +32,8 @@ public class TableDataProxy implements TableData {
 
   @Override
   public ColumnDef[] columns() {
-    return (ColumnDef[]) resource.invokeMethod("columns", null, null);
+    return (ColumnDef[]) resource.invokeMethod(
+        "columns", null, null);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/user/AuthenticationInfo.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/user/AuthenticationInfo.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/user/AuthenticationInfo.java
index 027f4c8..455fd8b 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/user/AuthenticationInfo.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/user/AuthenticationInfo.java
@@ -15,17 +15,23 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.user;
 
-import com.google.gson.Gson;
+
 import java.util.ArrayList;
 import java.util.List;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.common.JsonSerializable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** * */
+import com.google.gson.Gson;
+
+/***
+ *
+ */
 public class AuthenticationInfo implements JsonSerializable {
   private static final Logger LOG = LoggerFactory.getLogger(AuthenticationInfo.class);
   private static final Gson gson = new Gson();
@@ -34,8 +40,8 @@ public class AuthenticationInfo implements JsonSerializable {
   List<String> roles;
   String ticket;
   UserCredentials userCredentials;
-  public static final AuthenticationInfo ANONYMOUS =
-      new AuthenticationInfo("anonymous", null, "anonymous");
+  public static final AuthenticationInfo ANONYMOUS = new AuthenticationInfo("anonymous", null,
+      "anonymous");
 
   public AuthenticationInfo() {}
 
@@ -43,8 +49,7 @@ public class AuthenticationInfo implements JsonSerializable {
     this.user = user;
   }
 
-  /**
-   * *
+  /***
    *
    * @param user
    * @param ticket
@@ -105,17 +110,15 @@ public class AuthenticationInfo implements JsonSerializable {
 
   public static boolean isAnonymous(AuthenticationInfo subject) {
     if (subject == null) {
-      LOG.warn(
-          "Subject is null, assuming anonymous. "
-              + "Not recommended to use subject as null except in tests");
+      LOG.warn("Subject is null, assuming anonymous. "
+          + "Not recommended to use subject as null except in tests");
       return true;
     }
     return subject.isAnonymous();
   }
 
   public boolean isAnonymous() {
-    return ANONYMOUS.equals(this)
-        || "anonymous".equalsIgnoreCase(this.getUser())
+    return ANONYMOUS.equals(this) || "anonymous".equalsIgnoreCase(this.getUser())
         || StringUtils.isEmpty(this.getUser());
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/user/UserCredentials.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/user/UserCredentials.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/user/UserCredentials.java
index 7379793..f952866 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/user/UserCredentials.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/user/UserCredentials.java
@@ -20,7 +20,9 @@ package org.apache.zeppelin.user;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-/** User Credentials POJO */
+/**
+ * User Credentials POJO
+ */
 public class UserCredentials {
   private Map<String, UsernamePassword> userCredentials = new ConcurrentHashMap<>();
 
@@ -42,6 +44,8 @@ public class UserCredentials {
 
   @Override
   public String toString() {
-    return "UserCredentials{" + "userCredentials=" + userCredentials + '}';
+    return "UserCredentials{" +
+        "userCredentials=" + userCredentials +
+        '}';
   }
 }


[37/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/main/java/org/apache/zeppelin/spark/OldSparkInterpreter.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/OldSparkInterpreter.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/OldSparkInterpreter.java
index 25ad407..6f157a0 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/OldSparkInterpreter.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/OldSparkInterpreter.java
@@ -17,20 +17,6 @@
 
 package org.apache.zeppelin.spark;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.spark.JobProgressUtil;
@@ -78,24 +64,41 @@ import scala.tools.nsc.settings.MutableSettings;
 import scala.tools.nsc.settings.MutableSettings.BooleanSetting;
 import scala.tools.nsc.settings.MutableSettings.PathSetting;
 
-/** Spark interpreter for Zeppelin. */
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Spark interpreter for Zeppelin.
+ *
+ */
 public class OldSparkInterpreter extends AbstractSparkInterpreter {
   public static Logger logger = LoggerFactory.getLogger(OldSparkInterpreter.class);
 
   private SparkZeppelinContext z;
   private SparkILoop interpreter;
   /**
-   * intp - org.apache.spark.repl.SparkIMain (scala 2.10) intp - scala.tools.nsc.interpreter.IMain;
-   * (scala 2.11)
+   * intp - org.apache.spark.repl.SparkIMain (scala 2.10)
+   * intp - scala.tools.nsc.interpreter.IMain; (scala 2.11)
    */
   private Object intp;
-
   private SparkConf conf;
   private static SparkContext sc;
   private static SQLContext sqlc;
   private static InterpreterHookRegistry hooks;
   private static SparkEnv env;
-  private static Object sparkSession; // spark 2.x
+  private static Object sparkSession;    // spark 2.x
   private static SparkListener sparkListener;
   private static AbstractFile classOutputDir;
   private static Integer sharedInterpreterLock = new Integer(0);
@@ -105,13 +108,15 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
   private SparkDependencyResolver dep;
   private static String sparkUrl;
 
-  /** completer - org.apache.spark.repl.SparkJLineCompletion (scala 2.10) */
+  /**
+   * completer - org.apache.spark.repl.SparkJLineCompletion (scala 2.10)
+   */
   private Object completer = null;
 
   private Map<String, Object> binder;
   private SparkVersion sparkVersion;
-  private static File outputDir; // class outputdir for scala 2.11
-  private Object classServer; // classserver for scala 2.11
+  private static File outputDir;          // class outputdir for scala 2.11
+  private Object classServer;      // classserver for scala 2.11
   private JavaSparkContext jsc;
   private boolean enableSupportedVersionCheck;
 
@@ -159,7 +164,6 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
 
   /**
    * See org.apache.spark.sql.SparkSession.hiveClassesArePresent
-   *
    * @return
    */
   private boolean hiveClassesArePresent() {
@@ -195,7 +199,9 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
     }
   }
 
-  /** Get SQLContext for spark 2.x */
+  /**
+   * Get SQLContext for spark 2.x
+   */
   private SQLContext getSQLContext_2() {
     if (sqlc == null) {
       sqlc = (SQLContext) Utils.invokeMethod(sparkSession, "sqlContext");
@@ -209,14 +215,12 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
         String name = "org.apache.spark.sql.hive.HiveContext";
         Constructor<?> hc;
         try {
-          hc = getClass().getClassLoader().loadClass(name).getConstructor(SparkContext.class);
+          hc = getClass().getClassLoader().loadClass(name)
+              .getConstructor(SparkContext.class);
           sqlc = (SQLContext) hc.newInstance(getSparkContext());
-        } catch (NoSuchMethodException
-            | SecurityException
-            | ClassNotFoundException
-            | InstantiationException
-            | IllegalAccessException
-            | IllegalArgumentException
+        } catch (NoSuchMethodException | SecurityException
+            | ClassNotFoundException | InstantiationException
+            | IllegalAccessException | IllegalArgumentException
             | InvocationTargetException e) {
           logger.warn("Can't create HiveContext. Fallback to SQLContext", e);
           // when hive dependency is not loaded, it'll fail.
@@ -230,16 +234,15 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
     return sqlc;
   }
 
+
   public SparkDependencyResolver getDependencyResolver() {
     if (dep == null) {
-      dep =
-          new SparkDependencyResolver(
-              (Global) Utils.invokeMethod(intp, "global"),
-              (ClassLoader)
-                  Utils.invokeMethod(Utils.invokeMethod(intp, "classLoader"), "getParent"),
-              sc,
-              getProperty("zeppelin.dep.localrepo"),
-              getProperty("zeppelin.dep.additionalRemoteRepository"));
+      dep = new SparkDependencyResolver(
+          (Global) Utils.invokeMethod(intp, "global"),
+          (ClassLoader) Utils.invokeMethod(Utils.invokeMethod(intp, "classLoader"), "getParent"),
+          sc,
+          getProperty("zeppelin.dep.localrepo"),
+          getProperty("zeppelin.dep.additionalRemoteRepository"));
     }
     return dep;
   }
@@ -252,7 +255,10 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
     return master.startsWith("yarn");
   }
 
-  /** Spark 2.x Create SparkSession */
+  /**
+   * Spark 2.x
+   * Create SparkSession
+   */
   public Object createSparkSession() {
     // use local mode for embedded spark mode when spark.master is not found
     conf.setIfMissing("spark.master", "local");
@@ -286,7 +292,7 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
 
     Class SparkSession = Utils.findClass("org.apache.spark.sql.SparkSession");
     Object builder = Utils.invokeStaticMethod(SparkSession, "builder");
-    Utils.invokeMethod(builder, "config", new Class[] {SparkConf.class}, new Object[] {conf});
+    Utils.invokeMethod(builder, "config", new Class[]{ SparkConf.class }, new Object[]{ conf });
 
     if (useHiveContext()) {
       if (hiveClassesArePresent()) {
@@ -294,11 +300,9 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
         sparkSession = Utils.invokeMethod(builder, "getOrCreate");
         logger.info("Created Spark session with Hive support");
       } else {
-        Utils.invokeMethod(
-            builder,
-            "config",
-            new Class[] {String.class, String.class},
-            new Object[] {"spark.sql.catalogImplementation", "in-memory"});
+        Utils.invokeMethod(builder, "config",
+            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 use in-memory catalogImplementation");
       }
@@ -320,7 +324,6 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
 
   /**
    * Create SparkContext for spark 2.x
-   *
    * @return
    */
   private SparkContext createSparkContext_2() {
@@ -340,10 +343,8 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
     if (Utils.isScala2_10()) {
       jars = (String[]) Utils.invokeStaticMethod(SparkILoop.class, "getAddedJars");
     } else {
-      jars =
-          (String[])
-              Utils.invokeStaticMethod(
-                  Utils.findClass("org.apache.spark.repl.Main"), "getAddedJars");
+      jars = (String[]) Utils.invokeStaticMethod(
+          Utils.findClass("org.apache.spark.repl.Main"), "getAddedJars");
     }
 
     String classServerUri = null;
@@ -353,11 +354,8 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
       Method classServer = intp.getClass().getMethod("classServer");
       Object httpServer = classServer.invoke(intp);
       classServerUri = (String) Utils.invokeMethod(httpServer, "uri");
-    } catch (NoSuchMethodException
-        | SecurityException
-        | IllegalAccessException
-        | IllegalArgumentException
-        | InvocationTargetException e) {
+    } catch (NoSuchMethodException | SecurityException | IllegalAccessException
+        | IllegalArgumentException | InvocationTargetException e) {
       // continue
     }
 
@@ -365,16 +363,12 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
       try { // for spark 1.3x
         Method classServer = intp.getClass().getMethod("classServerUri");
         classServerUri = (String) classServer.invoke(intp);
-      } catch (NoSuchMethodException
-          | SecurityException
-          | IllegalAccessException
-          | IllegalArgumentException
-          | InvocationTargetException e) {
+      } catch (NoSuchMethodException | SecurityException | IllegalAccessException
+          | IllegalArgumentException | InvocationTargetException e) {
         // continue instead of: throw new InterpreterException(e);
         // Newer Spark versions (like the patched CDH5.7.0 one) don't contain this method
-        logger.warn(
-            String.format(
-                "Spark method classServerUri not available due to: [%s]", e.getMessage()));
+        logger.warn(String.format("Spark method classServerUri not available due to: [%s]",
+            e.getMessage()));
       }
     }
 
@@ -383,11 +377,8 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
         Method getClassOutputDirectory = intp.getClass().getMethod("getClassOutputDirectory");
         File classOutputDirectory = (File) getClassOutputDirectory.invoke(intp);
         replClassOutputDirectory = classOutputDirectory.getAbsolutePath();
-      } catch (NoSuchMethodException
-          | SecurityException
-          | IllegalAccessException
-          | IllegalArgumentException
-          | InvocationTargetException e) {
+      } catch (NoSuchMethodException | SecurityException | IllegalAccessException
+          | IllegalArgumentException | InvocationTargetException e) {
         // continue
       }
     }
@@ -450,16 +441,15 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
 
   @Override
   public void open() throws InterpreterException {
-    this.enableSupportedVersionCheck =
-        java.lang.Boolean.parseBoolean(
-            getProperty("zeppelin.spark.enableSupportedVersionCheck", "true"));
+    this.enableSupportedVersionCheck = java.lang.Boolean.parseBoolean(
+        getProperty("zeppelin.spark.enableSupportedVersionCheck", "true"));
 
     // set properties and do login before creating any spark stuff for secured cluster
     if (isYarnMode()) {
       System.setProperty("SPARK_YARN_MODE", "true");
     }
-    if (getProperties().containsKey("spark.yarn.keytab")
-        && getProperties().containsKey("spark.yarn.principal")) {
+    if (getProperties().containsKey("spark.yarn.keytab") &&
+        getProperties().containsKey("spark.yarn.principal")) {
       try {
         String keytab = getProperties().getProperty("spark.yarn.keytab");
         String principal = getProperties().getProperty("spark.yarn.principal");
@@ -499,9 +489,8 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
       argList.add(arg);
     }
 
-    DepInterpreter depInterpreter =
-        getParentSparkInterpreter()
-            .getInterpreterInTheSameSessionByClassName(DepInterpreter.class, false);
+    DepInterpreter depInterpreter = getParentSparkInterpreter().
+        getInterpreterInTheSameSessionByClassName(DepInterpreter.class, false);
     String depInterpreterClasspath = "";
     if (depInterpreter != null) {
       SparkDependencyContext depc = depInterpreter.getDependencyContext();
@@ -518,15 +507,15 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
       }
     }
 
+
     if (Utils.isScala2_10()) {
       scala.collection.immutable.List<String> list =
           JavaConversions.asScalaBuffer(argList).toList();
 
-      Object sparkCommandLine =
-          Utils.instantiateClass(
-              "org.apache.spark.repl.SparkCommandLine",
-              new Class[] {scala.collection.immutable.List.class},
-              new Object[] {list});
+      Object sparkCommandLine = Utils.instantiateClass(
+          "org.apache.spark.repl.SparkCommandLine",
+          new Class[]{ scala.collection.immutable.List.class },
+          new Object[]{ list });
 
       settings = (Settings) Utils.invokeMethod(sparkCommandLine, "settings");
     } else {
@@ -618,7 +607,8 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
     settings.scala$tools$nsc$settings$ScalaSettings$_setter_$classpath_$eq(pathSettings);
 
     // set classloader for scala compiler
-    settings.explicitParentLoader_$eq(new Some<>(Thread.currentThread().getContextClassLoader()));
+    settings.explicitParentLoader_$eq(new Some<>(Thread.currentThread()
+        .getContextClassLoader()));
     BooleanSetting b = (BooleanSetting) settings.usejavacp();
     b.v_$eq(true);
     settings.scala$tools$nsc$settings$StandardScalaSettings$_setter_$usejavacp_$eq(b);
@@ -652,8 +642,8 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
       if (printREPLOutput()) {
         this.interpreter = new SparkILoop((java.io.BufferedReader) null, new PrintWriter(out));
       } else {
-        this.interpreter =
-            new SparkILoop((java.io.BufferedReader) null, new PrintWriter(Console.out(), false));
+        this.interpreter = new SparkILoop((java.io.BufferedReader) null,
+            new PrintWriter(Console.out(), false));
       }
 
       interpreter.settings_$eq(settings);
@@ -682,24 +672,22 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
       }
 
       if (Utils.findClass("org.apache.spark.repl.SparkJLineCompletion", true) != null) {
-        completer =
-            Utils.instantiateClass(
-                "org.apache.spark.repl.SparkJLineCompletion",
-                new Class[] {Utils.findClass("org.apache.spark.repl.SparkIMain")},
-                new Object[] {intp});
-      } else if (Utils.findClass("scala.tools.nsc.interpreter.PresentationCompilerCompleter", true)
-          != null) {
-        completer =
-            Utils.instantiateClass(
-                "scala.tools.nsc.interpreter.PresentationCompilerCompleter",
-                new Class[] {IMain.class},
-                new Object[] {intp});
-      } else if (Utils.findClass("scala.tools.nsc.interpreter.JLineCompletion", true) != null) {
-        completer =
-            Utils.instantiateClass(
-                "scala.tools.nsc.interpreter.JLineCompletion",
-                new Class[] {IMain.class},
-                new Object[] {intp});
+        completer = Utils.instantiateClass(
+            "org.apache.spark.repl.SparkJLineCompletion",
+            new Class[]{Utils.findClass("org.apache.spark.repl.SparkIMain")},
+            new Object[]{intp});
+      } else if (Utils.findClass(
+          "scala.tools.nsc.interpreter.PresentationCompilerCompleter", true) != null) {
+        completer = Utils.instantiateClass(
+            "scala.tools.nsc.interpreter.PresentationCompilerCompleter",
+            new Class[]{ IMain.class },
+            new Object[]{ intp });
+      } else if (Utils.findClass(
+          "scala.tools.nsc.interpreter.JLineCompletion", true) != null) {
+        completer = Utils.instantiateClass(
+            "scala.tools.nsc.interpreter.JLineCompletion",
+            new Class[]{ IMain.class },
+            new Object[]{ intp });
       }
 
       if (Utils.isSpark2()) {
@@ -723,9 +711,8 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
       sparkShims.setupSparkListener(sc.master(), sparkUrl, InterpreterContext.get());
       numReferenceOfSparkContext.incrementAndGet();
 
-      z =
-          new SparkZeppelinContext(
-              sc, sparkShims, hooks, Integer.parseInt(getProperty("zeppelin.spark.maxResult")));
+      z = new SparkZeppelinContext(sc, sparkShims, hooks,
+          Integer.parseInt(getProperty("zeppelin.spark.maxResult")));
 
       interpret("@transient val _binder = new java.util.HashMap[String, Object]()");
       Map<String, Object> binder;
@@ -742,23 +729,18 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
         binder.put("spark", sparkSession);
       }
 
-      interpret(
-          "@transient val z = "
-              + "_binder.get(\"z\").asInstanceOf[org.apache.zeppelin.spark.SparkZeppelinContext]");
-      interpret(
-          "@transient val sc = "
-              + "_binder.get(\"sc\").asInstanceOf[org.apache.spark.SparkContext]");
-      interpret(
-          "@transient val sqlc = "
-              + "_binder.get(\"sqlc\").asInstanceOf[org.apache.spark.sql.SQLContext]");
-      interpret(
-          "@transient val sqlContext = "
-              + "_binder.get(\"sqlc\").asInstanceOf[org.apache.spark.sql.SQLContext]");
+      interpret("@transient val z = "
+          + "_binder.get(\"z\").asInstanceOf[org.apache.zeppelin.spark.SparkZeppelinContext]");
+      interpret("@transient val sc = "
+          + "_binder.get(\"sc\").asInstanceOf[org.apache.spark.SparkContext]");
+      interpret("@transient val sqlc = "
+          + "_binder.get(\"sqlc\").asInstanceOf[org.apache.spark.sql.SQLContext]");
+      interpret("@transient val sqlContext = "
+          + "_binder.get(\"sqlc\").asInstanceOf[org.apache.spark.sql.SQLContext]");
 
       if (Utils.isSpark2()) {
-        interpret(
-            "@transient val spark = "
-                + "_binder.get(\"spark\").asInstanceOf[org.apache.spark.sql.SparkSession]");
+        interpret("@transient val spark = "
+            + "_binder.get(\"spark\").asInstanceOf[org.apache.spark.sql.SparkSession]");
       }
 
       interpret("import org.apache.spark.SparkContext._");
@@ -789,16 +771,11 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
 
     if (Utils.isScala2_10()) {
       try {
-        Method loadFiles =
-            this.interpreter
-                .getClass()
-                .getMethod("org$apache$spark$repl$SparkILoop$$loadFiles", Settings.class);
+        Method loadFiles = this.interpreter.getClass().getMethod(
+            "org$apache$spark$repl$SparkILoop$$loadFiles", Settings.class);
         loadFiles.invoke(this.interpreter, settings);
-      } catch (NoSuchMethodException
-          | SecurityException
-          | IllegalAccessException
-          | IllegalArgumentException
-          | InvocationTargetException e) {
+      } catch (NoSuchMethodException | SecurityException | IllegalAccessException
+          | IllegalArgumentException | InvocationTargetException e) {
         throw new InterpreterException(e);
       }
     }
@@ -840,6 +817,7 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
         }
       }
     }
+
   }
 
   public String getSparkUIUrl() {
@@ -868,8 +846,11 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
 
   private Results.Result interpret(String line) {
     out.ignoreLeadingNewLinesFromScalaReporter();
-    return (Results.Result)
-        Utils.invokeMethod(intp, "interpret", new Class[] {String.class}, new Object[] {line});
+    return (Results.Result) Utils.invokeMethod(
+        intp,
+        "interpret",
+        new Class[] {String.class},
+        new Object[] {line});
   }
 
   private List<File> currentClassPath() {
@@ -902,8 +883,8 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+                                                InterpreterContext interpreterContext) {
     if (completer == null) {
       logger.warn("Can't find completer");
       return new LinkedList<>();
@@ -951,7 +932,8 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
     String completionScriptText = "";
     try {
       completionScriptText = text.substring(0, cursor);
-    } catch (Exception e) {
+    }
+    catch (Exception e) {
       logger.error(e.toString());
       return null;
     }
@@ -965,15 +947,18 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
       if (indexOfReverseSeqPostion < completionStartPosition && indexOfReverseSeqPostion > 0) {
         completionStartPosition = indexOfReverseSeqPostion;
       }
+
     }
 
     if (completionStartPosition == completionEndPosition) {
       completionStartPosition = 0;
-    } else {
+    }
+    else
+    {
       completionStartPosition = completionEndPosition - completionStartPosition;
     }
-    resultCompletionText =
-        completionScriptText.substring(completionStartPosition, completionEndPosition);
+    resultCompletionText = completionScriptText.substring(
+        completionStartPosition , completionEndPosition);
 
     return resultCompletionText;
   }
@@ -983,8 +968,8 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
    * Somehow intp.valueOfTerm returns scala.None always with -Yrepl-class-based option
    */
   public Object getValue(String name) {
-    Object ret =
-        Utils.invokeMethod(intp, "valueOfTerm", new Class[] {String.class}, new Object[] {name});
+    Object ret = Utils.invokeMethod(
+        intp, "valueOfTerm", new Class[]{String.class}, new Object[]{name});
 
     if (ret instanceof None || ret instanceof scala.None$) {
       return null;
@@ -1000,20 +985,23 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
     if (r == null || r.lineRep() == null) {
       return null;
     }
-    Object obj = r.lineRep().call("$result", JavaConversions.asScalaBuffer(new LinkedList<>()));
+    Object obj = r.lineRep().call("$result",
+        JavaConversions.asScalaBuffer(new LinkedList<>()));
     return obj;
   }
 
   public boolean isUnsupportedSparkVersion() {
-    return enableSupportedVersionCheck && sparkVersion.isUnsupportedVersion();
+    return enableSupportedVersionCheck  && sparkVersion.isUnsupportedVersion();
   }
 
-  /** Interpret a single line. */
+  /**
+   * Interpret a single line.
+   */
   @Override
   public InterpreterResult interpret(String line, InterpreterContext context) {
     if (isUnsupportedSparkVersion()) {
-      return new InterpreterResult(
-          Code.ERROR, "Spark " + sparkVersion.toString() + " is not supported");
+      return new InterpreterResult(Code.ERROR, "Spark " + sparkVersion.toString()
+          + " is not supported");
     }
     z.setInterpreterContext(context);
     if (line == null || line.trim().length() == 0) {
@@ -1055,9 +1043,9 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
         String nextLine = linesToRun[l + 1].trim();
         boolean continuation = false;
         if (nextLine.isEmpty()
-            || nextLine.startsWith("//") // skip empty line or comment
+            || nextLine.startsWith("//")         // skip empty line or comment
             || nextLine.startsWith("}")
-            || nextLine.startsWith("object")) { // include "} object" for Scala companion object
+            || nextLine.startsWith("object")) {  // include "} object" for Scala companion object
           continuation = true;
         } else if (!inComment && nextLine.startsWith("/*")) {
           inComment = true;
@@ -1067,8 +1055,8 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
           continuation = true;
         } else if (nextLine.length() > 1
             && nextLine.charAt(0) == '.'
-            && nextLine.charAt(1) != '.' // ".."
-            && nextLine.charAt(1) != '/') { // "./"
+            && nextLine.charAt(1) != '.'     // ".."
+            && nextLine.charAt(1) != '/') {  // "./"
           continuation = true;
         } else if (inComment) {
           continuation = true;
@@ -1140,14 +1128,12 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
 
     if (lastObj != null) {
       ResourcePool resourcePool = context.getResourcePool();
-      resourcePool.put(
-          context.getNoteId(),
-          context.getParagraphId(),
-          WellKnownResourceName.ZeppelinReplResult.toString(),
-          lastObj);
+      resourcePool.put(context.getNoteId(), context.getParagraphId(),
+          WellKnownResourceName.ZeppelinReplResult.toString(), lastObj);
     }
   };
 
+
   @Override
   public void cancel(InterpreterContext context) {
     sc.cancelJobGroup(Utils.buildJobGroupId(context));
@@ -1176,7 +1162,7 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
     if (numReferenceOfSparkContext.decrementAndGet() == 0) {
       if (sparkSession != null) {
         Utils.invokeMethod(sparkSession, "stop");
-      } else if (sc != null) {
+      } else if (sc != null){
         sc.stop();
       }
       sparkSession = null;
@@ -1198,8 +1184,8 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
 
   @Override
   public Scheduler getScheduler() {
-    return SchedulerFactory.singleton()
-        .createOrGetFIFOScheduler(OldSparkInterpreter.class.getName() + this.hashCode());
+    return SchedulerFactory.singleton().createOrGetFIFOScheduler(
+        OldSparkInterpreter.class.getName() + this.hashCode());
   }
 
   public SparkZeppelinContext getZeppelinContext() {
@@ -1214,23 +1200,19 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
     File file = null;
 
     // try Utils.createTempDir()
-    file =
-        (File)
-            Utils.invokeStaticMethod(
-                Utils.findClass("org.apache.spark.util.Utils"),
-                "createTempDir",
-                new Class[] {String.class, String.class},
-                new Object[] {dir, "spark"});
+    file = (File) Utils.invokeStaticMethod(
+        Utils.findClass("org.apache.spark.util.Utils"),
+        "createTempDir",
+        new Class[]{String.class, String.class},
+        new Object[]{dir, "spark"});
 
     // fallback to old method
     if (file == null) {
-      file =
-          (File)
-              Utils.invokeStaticMethod(
-                  Utils.findClass("org.apache.spark.util.Utils"),
-                  "createTempDir",
-                  new Class[] {String.class},
-                  new Object[] {dir});
+      file = (File) Utils.invokeStaticMethod(
+          Utils.findClass("org.apache.spark.util.Utils"),
+          "createTempDir",
+          new Class[]{String.class},
+          new Object[]{dir});
     }
 
     return file;
@@ -1240,40 +1222,28 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
     SparkConf conf = new SparkConf();
     try {
       // try to create HttpServer
-      Constructor<?> constructor =
-          getClass()
-              .getClassLoader()
-              .loadClass("org.apache.spark.HttpServer")
-              .getConstructor(
-                  new Class[] {
-                    SparkConf.class, File.class, SecurityManager.class, int.class, String.class
-                  });
+      Constructor<?> constructor = getClass().getClassLoader()
+          .loadClass("org.apache.spark.HttpServer")
+          .getConstructor(new Class[]{
+            SparkConf.class, File.class, SecurityManager.class, int.class, String.class});
 
       Object securityManager = createSecurityManager(conf);
-      return constructor.newInstance(
-          new Object[] {conf, outputDir, securityManager, 0, "HTTP Server"});
-
-    } catch (ClassNotFoundException
-        | NoSuchMethodException
-        | IllegalAccessException
-        | InstantiationException
-        | InvocationTargetException e) {
+      return constructor.newInstance(new Object[]{
+        conf, outputDir, securityManager, 0, "HTTP Server"});
+
+    } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException |
+        InstantiationException | InvocationTargetException e) {
       // fallback to old constructor
       Constructor<?> constructor = null;
       try {
-        constructor =
-            getClass()
-                .getClassLoader()
-                .loadClass("org.apache.spark.HttpServer")
-                .getConstructor(
-                    new Class[] {File.class, SecurityManager.class, int.class, String.class});
-        return constructor.newInstance(
-            new Object[] {outputDir, createSecurityManager(conf), 0, "HTTP Server"});
-      } catch (ClassNotFoundException
-          | NoSuchMethodException
-          | IllegalAccessException
-          | InstantiationException
-          | InvocationTargetException e1) {
+        constructor = getClass().getClassLoader()
+            .loadClass("org.apache.spark.HttpServer")
+            .getConstructor(new Class[]{
+              File.class, SecurityManager.class, int.class, String.class});
+        return constructor.newInstance(new Object[] {
+          outputDir, createSecurityManager(conf), 0, "HTTP Server"});
+      } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException |
+          InstantiationException | InvocationTargetException e1) {
         logger.error(e1.getMessage(), e1);
         return null;
       }
@@ -1292,23 +1262,19 @@ public class OldSparkInterpreter extends AbstractSparkInterpreter {
    * @throws InvocationTargetException
    * @throws InstantiationException
    */
-  private Object createSecurityManager(SparkConf conf)
-      throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException,
-          InvocationTargetException, InstantiationException {
+  private Object createSecurityManager(SparkConf conf) throws ClassNotFoundException,
+      NoSuchMethodException, IllegalAccessException, InvocationTargetException,
+      InstantiationException {
     Object securityManager = null;
     try {
-      Constructor<?> smConstructor =
-          getClass()
-              .getClassLoader()
-              .loadClass("org.apache.spark.SecurityManager")
-              .getConstructor(new Class[] {SparkConf.class, scala.Option.class});
+      Constructor<?> smConstructor = getClass().getClassLoader()
+          .loadClass("org.apache.spark.SecurityManager")
+          .getConstructor(new Class[]{ SparkConf.class, scala.Option.class });
       securityManager = smConstructor.newInstance(conf, null);
     } catch (NoSuchMethodException e) {
-      Constructor<?> smConstructor =
-          getClass()
-              .getClassLoader()
-              .loadClass("org.apache.spark.SecurityManager")
-              .getConstructor(new Class[] {SparkConf.class});
+      Constructor<?> smConstructor = getClass().getClassLoader()
+          .loadClass("org.apache.spark.SecurityManager")
+          .getConstructor(new Class[]{ SparkConf.class });
       securityManager = smConstructor.newInstance(conf);
     }
     return securityManager;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/main/java/org/apache/zeppelin/spark/PySparkInterpreter.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/PySparkInterpreter.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/PySparkInterpreter.java
index 2481ade..32e805b 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/PySparkInterpreter.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/PySparkInterpreter.java
@@ -17,14 +17,6 @@
 
 package org.apache.zeppelin.spark;
 
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Properties;
 import org.apache.commons.lang.StringUtils;
 import org.apache.spark.SparkConf;
 import org.apache.spark.api.java.JavaSparkContext;
@@ -39,10 +31,19 @@ import org.apache.zeppelin.spark.dep.SparkDependencyContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Properties;
+
 /**
- * Interpreter for PySpark, it is the first implementation of interpreter for PySpark, so with less
- * features compared to IPySparkInterpreter, but requires less prerequisites than
- * IPySparkInterpreter, only python is required.
+ *  Interpreter for PySpark, it is the first implementation of interpreter for PySpark, so with less
+ *  features compared to IPySparkInterpreter, but requires less prerequisites than
+ *  IPySparkInterpreter, only python is required.
  */
 public class PySparkInterpreter extends PythonInterpreter {
 
@@ -63,7 +64,7 @@ public class PySparkInterpreter extends PythonInterpreter {
     DepInterpreter depInterpreter =
         getInterpreterInTheSameSessionByClassName(DepInterpreter.class, false);
     // load libraries from Dependency Interpreter
-    URL[] urls = new URL[0];
+    URL [] urls = new URL[0];
     List<URL> urlList = new LinkedList<>();
 
     if (depInterpreter != null) {
@@ -107,8 +108,7 @@ public class PySparkInterpreter extends PythonInterpreter {
       // must create spark interpreter after ClassLoader is set, otherwise the additional jars
       // can not be loaded by spark repl.
       this.sparkInterpreter = getInterpreterInTheSameSessionByClassName(SparkInterpreter.class);
-      setProperty(
-          "zeppelin.py4j.useAuth",
+      setProperty("zeppelin.py4j.useAuth",
           sparkInterpreter.getSparkVersion().isSecretSocketSupported() + "");
       // create Python Process and JVM gateway
       super.open();
@@ -154,11 +154,9 @@ public class PySparkInterpreter extends PythonInterpreter {
   protected void preCallPython(InterpreterContext context) {
     String jobGroup = Utils.buildJobGroupId(context);
     String jobDesc = Utils.buildJobDesc(context);
-    callPython(
-        new PythonInterpretRequest(
-            String.format("if 'sc' in locals():\n\tsc.setJobGroup('%s', '%s')", jobGroup, jobDesc),
-            false,
-            false));
+    callPython(new PythonInterpretRequest(
+        String.format("if 'sc' in locals():\n\tsc.setJobGroup('%s', '%s')", jobGroup, jobDesc),
+        false, false));
 
     String pool = "None";
     if (context.getLocalProperties().containsKey("pool")) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/main/java/org/apache/zeppelin/spark/PythonUtils.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/PythonUtils.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/PythonUtils.java
index df8e9a6..8182690 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/PythonUtils.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/PythonUtils.java
@@ -15,23 +15,27 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.spark;
 
+import org.apache.commons.lang3.StringUtils;
+
 import java.io.File;
 import java.io.FilenameFilter;
 import java.util.ArrayList;
 import java.util.List;
-import org.apache.commons.lang3.StringUtils;
 
-/** Util class for PySpark */
+/**
+ * Util class for PySpark
+ */
 public class PythonUtils {
 
   /**
    * Get the PYTHONPATH for PySpark, either from SPARK_HOME, if it is set, or from ZEPPELIN_HOME
    * when it is embedded mode.
    *
-   * <p>This method will called in zeppelin server process and spark driver process when it is local
-   * or yarn-client mode.
+   * This method will called in zeppelin server process and spark driver process when it is
+   * local or yarn-client mode.
    */
   public static String sparkPythonPath() {
     List<String> pythonPath = new ArrayList<String>();
@@ -47,15 +51,12 @@ public class PythonUtils {
         throw new RuntimeException("No pyspark.zip found under " + sparkHome + "/python/lib");
       }
       pythonPath.add(pyspark.getAbsolutePath());
-      File[] py4j =
-          new File(sparkHome + "/python/lib")
-              .listFiles(
-                  new FilenameFilter() {
-                    @Override
-                    public boolean accept(File dir, String name) {
-                      return name.startsWith("py4j");
-                    }
-                  });
+      File[] py4j = new File(sparkHome + "/python/lib").listFiles(new FilenameFilter() {
+        @Override
+        public boolean accept(File dir, String name) {
+          return name.startsWith("py4j");
+        }
+      });
       if (py4j.length == 0) {
         throw new RuntimeException("No py4j files found under " + sparkHome + "/python/lib");
       } else if (py4j.length > 1) {
@@ -70,21 +71,19 @@ public class PythonUtils {
         throw new RuntimeException("No pyspark.zip found: " + pyspark.getAbsolutePath());
       }
       pythonPath.add(pyspark.getAbsolutePath());
-      File[] py4j =
-          new File(zeppelinHome, "interpreter/spark/pyspark")
-              .listFiles(
-                  new FilenameFilter() {
-                    @Override
-                    public boolean accept(File dir, String name) {
-                      return name.startsWith("py4j");
-                    }
-                  });
+      File[] py4j = new File(zeppelinHome, "interpreter/spark/pyspark").listFiles(
+          new FilenameFilter() {
+            @Override
+            public boolean accept(File dir, String name) {
+              return name.startsWith("py4j");
+            }
+          });
       if (py4j.length == 0) {
-        throw new RuntimeException(
-            "No py4j files found under " + zeppelinHome + "/interpreter/spark/pyspark");
+        throw new RuntimeException("No py4j files found under " + zeppelinHome +
+            "/interpreter/spark/pyspark");
       } else if (py4j.length > 1) {
-        throw new RuntimeException(
-            "Multiple py4j files found under " + sparkHome + "/interpreter/spark/pyspark");
+        throw new RuntimeException("Multiple py4j files found under " + sparkHome +
+            "/interpreter/spark/pyspark");
       } else {
         pythonPath.add(py4j[0].getAbsolutePath());
       }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
index 22b482d..dabe9ed 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
@@ -17,11 +17,10 @@
 
 package org.apache.zeppelin.spark;
 
-import java.util.List;
-import java.util.Properties;
 import org.apache.spark.SparkContext;
 import org.apache.spark.api.java.JavaSparkContext;
 import org.apache.spark.sql.SQLContext;
+import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.InterpreterResult;
@@ -29,9 +28,12 @@ import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.List;
+import java.util.Properties;
+
 /**
- * It is the Wrapper of OldSparkInterpreter & NewSparkInterpreter. Property zeppelin.spark.useNew
- * control which one to use.
+ * It is the Wrapper of OldSparkInterpreter & NewSparkInterpreter.
+ * Property zeppelin.spark.useNew control which one to use.
  */
 public class SparkInterpreter extends AbstractSparkInterpreter {
 
@@ -40,6 +42,7 @@ public class SparkInterpreter extends AbstractSparkInterpreter {
   // either OldSparkInterpreter or NewSparkInterpreter
   private AbstractSparkInterpreter delegation;
 
+
   public SparkInterpreter(Properties properties) {
     super(properties);
     if (Boolean.parseBoolean(properties.getProperty("zeppelin.spark.useNew", "false"))) {
@@ -76,8 +79,10 @@ public class SparkInterpreter extends AbstractSparkInterpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) throws InterpreterException {
+  public List<InterpreterCompletion> completion(String buf,
+                                                int cursor,
+                                                InterpreterContext interpreterContext)
+      throws InterpreterException {
     return delegation.completion(buf, cursor, interpreterContext);
   }
 
@@ -95,6 +100,7 @@ public class SparkInterpreter extends AbstractSparkInterpreter {
     return delegation;
   }
 
+
   @Override
   public SparkContext getSparkContext() {
     return delegation.getSparkContext();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkRInterpreter.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkRInterpreter.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkRInterpreter.java
index 337089d..8f55a87 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkRInterpreter.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkRInterpreter.java
@@ -17,14 +17,8 @@
 
 package org.apache.zeppelin.spark;
 
-import static org.apache.zeppelin.spark.ZeppelinRDisplay.render;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.atomic.AtomicBoolean;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.spark.SparkContext;
 import org.apache.spark.SparkRBackend;
 import org.apache.spark.api.java.JavaSparkContext;
@@ -38,7 +32,18 @@ import org.apache.zeppelin.scheduler.SchedulerFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** R and SparkR interpreter with visualization support. */
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static org.apache.zeppelin.spark.ZeppelinRDisplay.render;
+
+/**
+ * R and SparkR interpreter with visualization support.
+ */
 public class SparkRInterpreter extends Interpreter {
   private static final Logger logger = LoggerFactory.getLogger(SparkRInterpreter.class);
 
@@ -63,7 +68,7 @@ public class SparkRInterpreter extends Interpreter {
     if (System.getenv("SPARK_HOME") != null) {
       // local or yarn-client mode when SPARK_HOME is specified
       sparkRLibPath = System.getenv("SPARK_HOME") + "/R/lib";
-    } else if (System.getenv("ZEPPELIN_HOME") != null) {
+    } else if (System.getenv("ZEPPELIN_HOME") != null){
       // embedded mode when SPARK_HOME is not specified
       sparkRLibPath = System.getenv("ZEPPELIN_HOME") + "/interpreter/spark/R/lib";
       // workaround to make sparkr work without SPARK_HOME
@@ -98,8 +103,7 @@ public class SparkRInterpreter extends Interpreter {
     ZeppelinRContext.setSqlContext(sparkInterpreter.getSQLContext());
     ZeppelinRContext.setZeppelinContext(sparkInterpreter.getZeppelinContext());
 
-    zeppelinR =
-        new ZeppelinR(rCmdPath, sparkRLibPath, SparkRBackend.port(), sparkVersion, timeout, this);
+    zeppelinR = new ZeppelinR(rCmdPath, sparkRLibPath, SparkRBackend.port(), sparkVersion, timeout, this);
     try {
       zeppelinR.open();
     } catch (IOException e) {
@@ -109,11 +113,9 @@ public class SparkRInterpreter extends Interpreter {
     if (useKnitr()) {
       zeppelinR.eval("library('knitr')");
     }
-    renderOptions =
-        getProperty(
-            "zeppelin.R.render.options",
-            "out.format = 'html', comment = NA, echo = FALSE, results = 'asis', message = F, "
-                + "warning = F, fig.retina = 2");
+    renderOptions = getProperty("zeppelin.R.render.options",
+        "out.format = 'html', comment = NA, echo = FALSE, results = 'asis', message = F, " +
+            "warning = F, fig.retina = 2");
   }
 
   @Override
@@ -132,27 +134,26 @@ public class SparkRInterpreter extends Interpreter {
     String setJobGroup = "";
     // assign setJobGroup to dummy__, otherwise it would print NULL for this statement
     if (isSpark2) {
-      setJobGroup = "dummy__ <- setJobGroup(\"" + jobGroup + "\", \" +" + jobDesc + "\", TRUE)";
+      setJobGroup = "dummy__ <- setJobGroup(\"" + jobGroup +
+          "\", \" +" + jobDesc + "\", TRUE)";
     } else {
-      setJobGroup = "dummy__ <- setJobGroup(sc, \"" + jobGroup + "\", \"" + jobDesc + "\", TRUE)";
+      setJobGroup = "dummy__ <- setJobGroup(sc, \"" + jobGroup +
+          "\", \"" + jobDesc + "\", TRUE)";
     }
     lines = setJobGroup + "\n" + lines;
     if (sparkInterpreter.getSparkVersion().newerThanEquals(SparkVersion.SPARK_2_3_0)) {
       // setLocalProperty is only available from spark 2.3.0
       String setPoolStmt = "setLocalProperty('spark.scheduler.pool', NULL)";
       if (interpreterContext.getLocalProperties().containsKey("pool")) {
-        setPoolStmt =
-            "setLocalProperty('spark.scheduler.pool', '"
-                + interpreterContext.getLocalProperties().get("pool")
-                + "')";
+        setPoolStmt = "setLocalProperty('spark.scheduler.pool', '" +
+            interpreterContext.getLocalProperties().get("pool") + "')";
       }
       lines = setPoolStmt + "\n" + lines;
     }
     try {
       // render output with knitr
       if (rbackendDead.get()) {
-        return new InterpreterResult(
-            InterpreterResult.Code.ERROR,
+        return new InterpreterResult(InterpreterResult.Code.ERROR,
             "sparkR backend is dead, please try to increase spark.r.backendConnectionTimeout");
       }
       if (useKnitr()) {
@@ -163,7 +164,11 @@ public class SparkRInterpreter extends Interpreter {
 
         RDisplay rDisplay = render(html, imageWidth);
 
-        return new InterpreterResult(rDisplay.code(), rDisplay.type(), rDisplay.content());
+        return new InterpreterResult(
+            rDisplay.code(),
+            rDisplay.type(),
+            rDisplay.content()
+        );
       } else {
         // alternatively, stream the output (without knitr)
         zeppelinR.setInterpreterOutput(interpreterContext.out);
@@ -204,13 +209,13 @@ public class SparkRInterpreter extends Interpreter {
 
   @Override
   public Scheduler getScheduler() {
-    return SchedulerFactory.singleton()
-        .createOrGetFIFOScheduler(SparkRInterpreter.class.getName() + this.hashCode());
+    return SchedulerFactory.singleton().createOrGetFIFOScheduler(
+            SparkRInterpreter.class.getName() + this.hashCode());
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+                                                InterpreterContext interpreterContext) {
     return new ArrayList<>();
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkSqlInterpreter.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkSqlInterpreter.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkSqlInterpreter.java
index 811e5b7..04eb844 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkSqlInterpreter.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkSqlInterpreter.java
@@ -17,9 +17,6 @@
 
 package org.apache.zeppelin.spark;
 
-import java.lang.reflect.Method;
-import java.util.List;
-import java.util.Properties;
 import org.apache.spark.SparkContext;
 import org.apache.spark.sql.SQLContext;
 import org.apache.zeppelin.interpreter.Interpreter;
@@ -33,7 +30,13 @@ import org.apache.zeppelin.scheduler.SchedulerFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Spark SQL interpreter for Zeppelin. */
+import java.lang.reflect.Method;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * Spark SQL interpreter for Zeppelin.
+ */
 public class SparkSqlInterpreter extends Interpreter {
   private Logger logger = LoggerFactory.getLogger(SparkSqlInterpreter.class);
 
@@ -59,9 +62,8 @@ public class SparkSqlInterpreter extends Interpreter {
   public InterpreterResult interpret(String st, InterpreterContext context)
       throws InterpreterException {
     if (sparkInterpreter.isUnsupportedSparkVersion()) {
-      return new InterpreterResult(
-          Code.ERROR,
-          "Spark " + sparkInterpreter.getSparkVersion().toString() + " is not supported");
+      return new InterpreterResult(Code.ERROR, "Spark "
+          + sparkInterpreter.getSparkVersion().toString() + " is not supported");
     }
 
     sparkInterpreter.getZeppelinContext().setInterpreterContext(context);
@@ -71,13 +73,11 @@ public class SparkSqlInterpreter extends Interpreter {
     sc.setJobGroup(Utils.buildJobGroupId(context), Utils.buildJobDesc(context), false);
 
     try {
-      String effectiveSQL =
-          Boolean.parseBoolean(getProperty("zeppelin.spark.sql.interpolation"))
-              ? interpolate(st, context.getResourcePool())
-              : st;
+      String effectiveSQL = Boolean.parseBoolean(getProperty("zeppelin.spark.sql.interpolation")) ?
+          interpolate(st, context.getResourcePool()) : st;
       Method method = sqlc.getClass().getMethod("sql", String.class);
-      String msg =
-          sparkInterpreter.getZeppelinContext().showData(method.invoke(sqlc, effectiveSQL));
+      String msg = sparkInterpreter.getZeppelinContext().showData(
+          method.invoke(sqlc, effectiveSQL));
       sc.clearJobGroup();
       return new InterpreterResult(Code.SUCCESS, msg);
     } catch (Exception e) {
@@ -85,8 +85,8 @@ public class SparkSqlInterpreter extends Interpreter {
         throw new InterpreterException(e);
       }
       logger.error("Invocation target exception", e);
-      String msg =
-          e.getMessage() + "\nset zeppelin.spark.sql.stacktrace = true to see full stacktrace";
+      String msg = e.getMessage()
+              + "\nset zeppelin.spark.sql.stacktrace = true to see full stacktrace";
       return new InterpreterResult(Code.ERROR, msg);
     }
   }
@@ -102,6 +102,7 @@ public class SparkSqlInterpreter extends Interpreter {
     return FormType.SIMPLE;
   }
 
+
   @Override
   public int getProgress(InterpreterContext context) throws InterpreterException {
     return sparkInterpreter.getProgress(context);
@@ -111,9 +112,8 @@ public class SparkSqlInterpreter extends Interpreter {
   public Scheduler getScheduler() {
     if (concurrentSQL()) {
       int maxConcurrency = Integer.parseInt(getProperty("zeppelin.spark.concurrentSQL", "10"));
-      return SchedulerFactory.singleton()
-          .createOrGetParallelScheduler(
-              SparkSqlInterpreter.class.getName() + this.hashCode(), maxConcurrency);
+      return SchedulerFactory.singleton().createOrGetParallelScheduler(
+          SparkSqlInterpreter.class.getName() + this.hashCode(), maxConcurrency);
     } else {
       // getSparkInterpreter() calls open() inside.
       // That means if SparkInterpreter is not opened, it'll wait until SparkInterpreter open.
@@ -131,8 +131,8 @@ public class SparkSqlInterpreter extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return null;
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkVersion.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkVersion.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkVersion.java
index 0805b5a..b75deb8 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkVersion.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkVersion.java
@@ -19,7 +19,9 @@ package org.apache.zeppelin.spark;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Provide reading comparing capability of spark version returned from SparkContext.version() */
+/**
+ * Provide reading comparing capability of spark version returned from SparkContext.version()
+ */
 public class SparkVersion {
   private static final Logger logger = LoggerFactory.getLogger(SparkVersion.class);
 
@@ -30,7 +32,7 @@ public class SparkVersion {
   public static final SparkVersion SPARK_2_3_1 = SparkVersion.fromVersionString("2.3.1");
   public static final SparkVersion SPARK_2_4_0 = SparkVersion.fromVersionString("2.4.0");
 
-  public static final SparkVersion MIN_SUPPORTED_VERSION = SPARK_1_6_0;
+  public static final SparkVersion MIN_SUPPORTED_VERSION =  SPARK_1_6_0;
   public static final SparkVersion UNSUPPORTED_FUTURE_VERSION = SPARK_2_4_0;
 
   private int version;
@@ -54,8 +56,8 @@ public class SparkVersion {
       // version is always 5 digits. (e.g. 2.0.0 -> 20000, 1.6.2 -> 10602)
       version = Integer.parseInt(String.format("%d%02d%02d", major, minor, patch));
     } catch (Exception e) {
-      logger.error(
-          "Can not recognize Spark version " + versionString + ". Assume it's a future release", e);
+      logger.error("Can not recognize Spark version " + versionString +
+          ". Assume it's a future release", e);
 
       // assume it is future release
       version = 99999;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/main/java/org/apache/zeppelin/spark/Utils.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/Utils.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/Utils.java
index 9e7f3db..cd6c607 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/Utils.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/Utils.java
@@ -17,23 +17,26 @@
 
 package org.apache.zeppelin.spark;
 
+import org.apache.zeppelin.interpreter.InterpreterContext;
+import org.apache.zeppelin.user.AuthenticationInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 import java.util.Properties;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import org.apache.zeppelin.interpreter.InterpreterContext;
-import org.apache.zeppelin.user.AuthenticationInfo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Utility and helper functions for the Spark Interpreter */
+/**
+ * Utility and helper functions for the Spark Interpreter
+ */
 class Utils {
   public static Logger logger = LoggerFactory.getLogger(Utils.class);
   private static final String SCALA_COMPILER_VERSION = evaluateScalaCompilerVersion();
 
   static Object invokeMethod(Object o, String name) {
-    return invokeMethod(o, name, new Class[] {}, new Object[] {});
+    return invokeMethod(o, name, new Class[]{}, new Object[]{});
   }
 
   static Object invokeMethod(Object o, String name, Class<?>[] argTypes, Object[] params) {
@@ -55,7 +58,7 @@ class Utils {
   }
 
   static Object invokeStaticMethod(Class<?> c, String name) {
-    return invokeStaticMethod(c, name, new Class[] {}, new Object[] {});
+    return invokeStaticMethod(c, name, new Class[]{}, new Object[]{});
   }
 
   static Class<?> findClass(String name) {
@@ -75,14 +78,11 @@ class Utils {
 
   static Object instantiateClass(String name, Class<?>[] argTypes, Object[] params) {
     try {
-      Constructor<?> constructor =
-          Utils.class.getClassLoader().loadClass(name).getConstructor(argTypes);
+      Constructor<?> constructor = Utils.class.getClassLoader()
+              .loadClass(name).getConstructor(argTypes);
       return constructor.newInstance(params);
-    } catch (NoSuchMethodException
-        | ClassNotFoundException
-        | IllegalAccessException
-        | InstantiationException
-        | InvocationTargetException e) {
+    } catch (NoSuchMethodException | ClassNotFoundException | IllegalAccessException |
+      InstantiationException | InvocationTargetException e) {
       logger.error(e.getMessage(), e);
     }
     return null;
@@ -103,7 +103,7 @@ class Utils {
   static boolean isScala2_11() {
     return !isScala2_10();
   }
-
+  
   static boolean isCompilerAboveScala2_11_7() {
     if (isScala2_10() || SCALA_COMPILER_VERSION == null) {
       return false;
@@ -125,8 +125,8 @@ class Utils {
       Properties p = new Properties();
       Class<?> completionClass = findClass("scala.tools.nsc.interpreter.JLineCompletion");
       if (completionClass != null) {
-        try (java.io.InputStream in =
-            completionClass.getClass().getResourceAsStream("/compiler.properties")) {
+        try (java.io.InputStream in = completionClass.getClass()
+          .getResourceAsStream("/compiler.properties")) {
           p.load(in);
           version = p.getProperty("version.number");
         } catch (java.io.IOException e) {
@@ -147,7 +147,7 @@ class Utils {
       return false;
     }
   }
-
+  
   public static String buildJobGroupId(InterpreterContext context) {
     return "zeppelin-" + context.getNoteId() + "-" + context.getParagraphId();
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/main/java/org/apache/zeppelin/spark/ZeppelinR.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/ZeppelinR.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/ZeppelinR.java
index b743641..71f3568 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/ZeppelinR.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/ZeppelinR.java
@@ -16,21 +16,26 @@
  */
 package org.apache.zeppelin.spark;
 
-import java.io.*;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
 import org.apache.commons.exec.*;
 import org.apache.commons.exec.environment.EnvironmentUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.spark.SparkRBackend;
 import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.InterpreterOutput;
+import org.apache.zeppelin.interpreter.InterpreterOutputListener;
+import org.apache.zeppelin.interpreter.InterpreterResultMessageOutput;
 import org.apache.zeppelin.interpreter.util.InterpreterOutputStream;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** R repl interaction */
+import java.io.*;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * R repl interaction
+ */
 public class ZeppelinR implements ExecuteResultHandler {
   private static Logger logger = LoggerFactory.getLogger(ZeppelinR.class);
 
@@ -43,28 +48,32 @@ public class ZeppelinR implements ExecuteResultHandler {
   private PipedOutputStream input;
   private final String scriptPath;
   private final String libPath;
-  static Map<Integer, ZeppelinR> zeppelinR =
-      Collections.synchronizedMap(new HashMap<Integer, ZeppelinR>());
+  static Map<Integer, ZeppelinR> zeppelinR = Collections.synchronizedMap(
+      new HashMap<Integer, ZeppelinR>());
 
   private InterpreterOutput initialOutput;
   private final int port;
   private boolean rScriptRunning;
 
-  /** To be notified R repl initialization */
+  /**
+   * To be notified R repl initialization
+   */
   boolean rScriptInitialized = false;
-
   Integer rScriptInitializeNotifier = new Integer(0);
 
-  /** Request to R repl */
+  /**
+   * Request to R repl
+   */
   Request rRequestObject = null;
-
   Integer rRequestNotifier = new Integer(0);
 
   /**
    * Request object
    *
-   * <p>type : "eval", "set", "get" stmt : statement to evaluate when type is "eval" key when type
-   * is "set" or "get" value : value object when type is "put"
+   * type : "eval", "set", "get"
+   * stmt : statement to evaluate when type is "eval"
+   *        key when type is "set" or "get"
+   * value : value object when type is "put"
    */
   public static class Request {
     String type;
@@ -90,25 +99,20 @@ public class ZeppelinR implements ExecuteResultHandler {
     }
   }
 
-  /** Response from R repl */
+  /**
+   * Response from R repl
+   */
   Object rResponseValue = null;
-
   boolean rResponseError = false;
   Integer rResponseNotifier = new Integer(0);
 
   /**
    * Create ZeppelinR instance
-   *
    * @param rCmdPath R repl commandline path
    * @param libPath sparkr library path
    */
-  public ZeppelinR(
-      String rCmdPath,
-      String libPath,
-      int sparkRBackendPort,
-      SparkVersion sparkVersion,
-      int timeout,
-      SparkRInterpreter sparkRInterpreter) {
+  public ZeppelinR(String rCmdPath, String libPath, int sparkRBackendPort,
+      SparkVersion sparkVersion, int timeout, SparkRInterpreter sparkRInterpreter) {
     this.rCmdPath = rCmdPath;
     this.libPath = libPath;
     this.sparkVersion = sparkVersion;
@@ -125,7 +129,6 @@ public class ZeppelinR implements ExecuteResultHandler {
 
   /**
    * Start R repl
-   *
    * @throws IOException
    */
   public void open() throws IOException, InterpreterException {
@@ -161,6 +164,7 @@ public class ZeppelinR implements ExecuteResultHandler {
     executor.setStreamHandler(streamHandler);
     Map env = EnvironmentUtils.getProcEnvironment();
 
+
     initialOutput = new InterpreterOutput(null);
     outputStream.setInterpreterOutput(initialOutput);
     executor.execute(cmd, env, this);
@@ -172,7 +176,6 @@ public class ZeppelinR implements ExecuteResultHandler {
 
   /**
    * Evaluate expression
-   *
    * @param expr
    * @return
    */
@@ -185,7 +188,6 @@ public class ZeppelinR implements ExecuteResultHandler {
 
   /**
    * assign value to key
-   *
    * @param key
    * @param value
    */
@@ -198,7 +200,6 @@ public class ZeppelinR implements ExecuteResultHandler {
 
   /**
    * get value of key
-   *
    * @param key
    * @return
    */
@@ -211,7 +212,6 @@ public class ZeppelinR implements ExecuteResultHandler {
 
   /**
    * get value of key, as a string
-   *
    * @param key
    * @return
    */
@@ -224,7 +224,6 @@ public class ZeppelinR implements ExecuteResultHandler {
 
   /**
    * Send request to r repl and return response
-   *
    * @return responseValue
    */
   private Object request() throws RuntimeException, InterpreterException {
@@ -264,16 +263,17 @@ public class ZeppelinR implements ExecuteResultHandler {
   }
 
   /**
-   * Wait until src/main/resources/R/zeppelin_sparkr.R is initialized and call onScriptInitialized()
+   * Wait until src/main/resources/R/zeppelin_sparkr.R is initialized
+   * and call onScriptInitialized()
    *
    * @throws InterpreterException
    */
   private void waitForRScriptInitialized() throws InterpreterException {
     synchronized (rScriptInitializeNotifier) {
       long startTime = System.nanoTime();
-      while (rScriptInitialized == false
-          && rScriptRunning
-          && System.nanoTime() - startTime < 10L * 1000 * 1000000) {
+      while (rScriptInitialized == false &&
+          rScriptRunning &&
+          System.nanoTime() - startTime < 10L * 1000 * 1000000) {
         try {
           rScriptInitializeNotifier.wait(1000);
         } catch (InterruptedException e) {
@@ -297,7 +297,6 @@ public class ZeppelinR implements ExecuteResultHandler {
 
   /**
    * invoked by src/main/resources/R/zeppelin_sparkr.R
-   *
    * @return
    */
   public Request getRequest() {
@@ -318,7 +317,6 @@ public class ZeppelinR implements ExecuteResultHandler {
 
   /**
    * invoked by src/main/resources/R/zeppelin_sparkr.R
-   *
    * @param value
    * @param error
    */
@@ -330,7 +328,9 @@ public class ZeppelinR implements ExecuteResultHandler {
     }
   }
 
-  /** invoked by src/main/resources/R/zeppelin_sparkr.R */
+  /**
+   * invoked by src/main/resources/R/zeppelin_sparkr.R
+   */
   public void onScriptInitialized() {
     synchronized (rScriptInitializeNotifier) {
       rScriptInitialized = true;
@@ -338,7 +338,9 @@ public class ZeppelinR implements ExecuteResultHandler {
     }
   }
 
-  /** Create R script in tmp dir */
+  /**
+   * Create R script in tmp dir
+   */
   private void createRScript() throws InterpreterException {
     ClassLoader classLoader = getClass().getClassLoader();
     File out = new File(scriptPath);
@@ -349,7 +351,9 @@ public class ZeppelinR implements ExecuteResultHandler {
 
     try {
       FileOutputStream outStream = new FileOutputStream(out);
-      IOUtils.copy(classLoader.getResourceAsStream("R/zeppelin_sparkr.R"), outStream);
+      IOUtils.copy(
+          classLoader.getResourceAsStream("R/zeppelin_sparkr.R"),
+          outStream);
       outStream.close();
     } catch (IOException e) {
       throw new InterpreterException(e);
@@ -358,7 +362,9 @@ public class ZeppelinR implements ExecuteResultHandler {
     logger.info("File {} created", scriptPath);
   }
 
-  /** Terminate this R repl */
+  /**
+   * Terminate this R repl
+   */
   public void close() {
     executor.getWatchdog().destroyProcess();
     new File(scriptPath).delete();
@@ -366,8 +372,8 @@ public class ZeppelinR implements ExecuteResultHandler {
   }
 
   /**
-   * Get instance This method will be invoded from zeppelin_sparkr.R
-   *
+   * Get instance
+   * This method will be invoded from zeppelin_sparkr.R
    * @param hashcode
    * @return
    */
@@ -377,7 +383,6 @@ public class ZeppelinR implements ExecuteResultHandler {
 
   /**
    * Pass InterpreterOutput to capture the repl output
-   *
    * @param out
    */
   public void setInterpreterOutput(InterpreterOutput out) {
@@ -396,6 +401,7 @@ public class ZeppelinR implements ExecuteResultHandler {
     rScriptRunning = false;
   }
 
+
   public static class SparkRInterpreterOutputStream extends InterpreterOutputStream {
 
     private SparkRInterpreter sparkRInterpreter;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/main/java/org/apache/zeppelin/spark/ZeppelinRContext.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/ZeppelinRContext.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/ZeppelinRContext.java
index a6c56fa..80ea03b 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/ZeppelinRContext.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/ZeppelinRContext.java
@@ -21,7 +21,9 @@ import org.apache.spark.SparkContext;
 import org.apache.spark.api.java.JavaSparkContext;
 import org.apache.spark.sql.SQLContext;
 
-/** Contains the Spark and Zeppelin Contexts made available to SparkR. */
+/**
+ * Contains the Spark and Zeppelin Contexts made available to SparkR.
+ */
 public class ZeppelinRContext {
   private static SparkContext sparkContext;
   private static SQLContext sqlContext;
@@ -61,11 +63,7 @@ public class ZeppelinRContext {
     return sparkSession;
   }
 
-  public static void setJavaSparkContext(JavaSparkContext jsc) {
-    javaSparkContext = jsc;
-  }
+  public static void setJavaSparkContext(JavaSparkContext jsc) { javaSparkContext = jsc; }
 
-  public static JavaSparkContext getJavaSparkContext() {
-    return javaSparkContext;
-  }
+  public static JavaSparkContext getJavaSparkContext() { return javaSparkContext; }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/main/java/org/apache/zeppelin/spark/dep/SparkDependencyContext.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/dep/SparkDependencyContext.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/dep/SparkDependencyContext.java
index b5ace31..0235fc6 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/dep/SparkDependencyContext.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/dep/SparkDependencyContext.java
@@ -21,16 +21,18 @@ import java.io.File;
 import java.net.MalformedURLException;
 import java.util.LinkedList;
 import java.util.List;
+
 import org.apache.zeppelin.dep.Booter;
 import org.apache.zeppelin.dep.Dependency;
 import org.apache.zeppelin.dep.Repository;
+
 import org.sonatype.aether.RepositorySystem;
 import org.sonatype.aether.RepositorySystemSession;
 import org.sonatype.aether.artifact.Artifact;
 import org.sonatype.aether.collection.CollectRequest;
 import org.sonatype.aether.graph.DependencyFilter;
-import org.sonatype.aether.repository.Authentication;
 import org.sonatype.aether.repository.RemoteRepository;
+import org.sonatype.aether.repository.Authentication;
 import org.sonatype.aether.resolution.ArtifactResolutionException;
 import org.sonatype.aether.resolution.ArtifactResult;
 import org.sonatype.aether.resolution.DependencyRequest;
@@ -40,7 +42,10 @@ import org.sonatype.aether.util.artifact.JavaScopes;
 import org.sonatype.aether.util.filter.DependencyFilterUtils;
 import org.sonatype.aether.util.filter.PatternExclusionsDependencyFilter;
 
-/** */
+
+/**
+ *
+ */
 public class SparkDependencyContext {
   List<Dependency> dependencies = new LinkedList<>();
   List<Repository> repositories = new LinkedList<>();
@@ -54,7 +59,7 @@ public class SparkDependencyContext {
   private List<RemoteRepository> additionalRepos = new LinkedList<>();
 
   public SparkDependencyContext(String localRepoPath, String additionalRemoteRepository) {
-    session = Booter.newRepositorySystemSession(system, localRepoPath);
+    session =  Booter.newRepositorySystemSession(system, localRepoPath);
     addRepoFromProperty(additionalRemoteRepository);
   }
 
@@ -103,14 +108,13 @@ public class SparkDependencyContext {
 
   /**
    * fetch all artifacts
-   *
    * @return
    * @throws MalformedURLException
    * @throws ArtifactResolutionException
    * @throws DependencyResolutionException
    */
-  public List<File> fetch()
-      throws MalformedURLException, DependencyResolutionException, ArtifactResolutionException {
+  public List<File> fetch() throws MalformedURLException,
+      DependencyResolutionException, ArtifactResolutionException {
 
     for (Dependency dep : dependencies) {
       if (!dep.isLocalFsArtifact()) {
@@ -134,17 +138,17 @@ public class SparkDependencyContext {
 
   private List<ArtifactResult> fetchArtifactWithDep(Dependency dep)
       throws DependencyResolutionException, ArtifactResolutionException {
-    Artifact artifact =
-        new DefaultArtifact(
-            SparkDependencyResolver.inferScalaVersion(dep.getGroupArtifactVersion()));
+    Artifact artifact = new DefaultArtifact(
+        SparkDependencyResolver.inferScalaVersion(dep.getGroupArtifactVersion()));
 
-    DependencyFilter classpathFlter = DependencyFilterUtils.classpathFilter(JavaScopes.COMPILE);
-    PatternExclusionsDependencyFilter exclusionFilter =
-        new PatternExclusionsDependencyFilter(
-            SparkDependencyResolver.inferScalaVersion(dep.getExclusions()));
+    DependencyFilter classpathFlter = DependencyFilterUtils
+        .classpathFilter(JavaScopes.COMPILE);
+    PatternExclusionsDependencyFilter exclusionFilter = new PatternExclusionsDependencyFilter(
+        SparkDependencyResolver.inferScalaVersion(dep.getExclusions()));
 
     CollectRequest collectRequest = new CollectRequest();
-    collectRequest.setRoot(new org.sonatype.aether.graph.Dependency(artifact, JavaScopes.COMPILE));
+    collectRequest.setRoot(new org.sonatype.aether.graph.Dependency(artifact,
+        JavaScopes.COMPILE));
 
     collectRequest.addRepository(mavenCentral);
     collectRequest.addRepository(mavenLocal);
@@ -161,9 +165,8 @@ public class SparkDependencyContext {
       collectRequest.addRepository(rr);
     }
 
-    DependencyRequest dependencyRequest =
-        new DependencyRequest(
-            collectRequest, DependencyFilterUtils.andFilter(exclusionFilter, classpathFlter));
+    DependencyRequest dependencyRequest = new DependencyRequest(collectRequest,
+        DependencyFilterUtils.andFilter(exclusionFilter, classpathFlter));
 
     return system.resolveDependencies(session, dependencyRequest).getArtifactResults();
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/main/java/org/apache/zeppelin/spark/dep/SparkDependencyResolver.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/dep/SparkDependencyResolver.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/dep/SparkDependencyResolver.java
index df10111..46224a8 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/dep/SparkDependencyResolver.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/dep/SparkDependencyResolver.java
@@ -26,6 +26,7 @@ import java.util.Collection;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.spark.SparkContext;
 import org.apache.zeppelin.dep.AbstractDependencyResolver;
@@ -42,6 +43,7 @@ import org.sonatype.aether.util.artifact.DefaultArtifact;
 import org.sonatype.aether.util.artifact.JavaScopes;
 import org.sonatype.aether.util.filter.DependencyFilterUtils;
 import org.sonatype.aether.util.filter.PatternExclusionsDependencyFilter;
+
 import scala.Some;
 import scala.collection.IndexedSeq;
 import scala.reflect.io.AbstractFile;
@@ -50,30 +52,29 @@ import scala.tools.nsc.backend.JavaPlatform;
 import scala.tools.nsc.util.ClassPath;
 import scala.tools.nsc.util.MergedClassPath;
 
-/** Deps resolver. Add new dependencies from mvn repo (at runtime) to Spark interpreter group. */
+/**
+ * Deps resolver.
+ * Add new dependencies from mvn repo (at runtime) to Spark interpreter group.
+ */
 public class SparkDependencyResolver extends AbstractDependencyResolver {
   Logger logger = LoggerFactory.getLogger(SparkDependencyResolver.class);
   private Global global;
   private ClassLoader runtimeClassLoader;
   private SparkContext sc;
 
-  private final String[] exclusions =
-      new String[] {
-        "org.scala-lang:scala-library",
-        "org.scala-lang:scala-compiler",
-        "org.scala-lang:scala-reflect",
-        "org.scala-lang:scalap",
-        "org.apache.zeppelin:zeppelin-zengine",
-        "org.apache.zeppelin:zeppelin-spark",
-        "org.apache.zeppelin:zeppelin-server"
-      };
-
-  public SparkDependencyResolver(
-      Global global,
-      ClassLoader runtimeClassLoader,
-      SparkContext sc,
-      String localRepoPath,
-      String additionalRemoteRepository) {
+  private final String[] exclusions = new String[] {"org.scala-lang:scala-library",
+                                                    "org.scala-lang:scala-compiler",
+                                                    "org.scala-lang:scala-reflect",
+                                                    "org.scala-lang:scalap",
+                                                    "org.apache.zeppelin:zeppelin-zengine",
+                                                    "org.apache.zeppelin:zeppelin-spark",
+                                                    "org.apache.zeppelin:zeppelin-server"};
+
+  public SparkDependencyResolver(Global global,
+                                 ClassLoader runtimeClassLoader,
+                                 SparkContext sc,
+                                 String localRepoPath,
+                                 String additionalRemoteRepository) {
     super(localRepoPath);
     this.global = global;
     this.runtimeClassLoader = runtimeClassLoader;
@@ -98,8 +99,8 @@ public class SparkDependencyResolver extends AbstractDependencyResolver {
     }
   }
 
-  private void updateCompilerClassPath(URL[] urls)
-      throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+  private void updateCompilerClassPath(URL[] urls) throws IllegalAccessException,
+      IllegalArgumentException, InvocationTargetException {
 
     JavaPlatform platform = (JavaPlatform) global.platform();
     MergedClassPath<AbstractFile> newClassPath = mergeUrlsIntoClassPath(platform, urls);
@@ -119,15 +120,15 @@ public class SparkDependencyResolver extends AbstractDependencyResolver {
     }
 
     // Reload all jars specified into our compiler
-    global.invalidateClassPathEntries(
-        scala.collection.JavaConversions.asScalaBuffer(classPaths).toList());
+    global.invalidateClassPathEntries(scala.collection.JavaConversions.asScalaBuffer(classPaths)
+        .toList());
   }
 
   // Until spark 1.1.x
   // check https://github.com/apache/spark/commit/191d7cf2a655d032f160b9fa181730364681d0e7
-  private void updateRuntimeClassPath_1_x(URL[] urls)
-      throws SecurityException, IllegalAccessException, IllegalArgumentException,
-          InvocationTargetException, NoSuchMethodException {
+  private void updateRuntimeClassPath_1_x(URL[] urls) throws SecurityException,
+      IllegalAccessException, IllegalArgumentException,
+      InvocationTargetException, NoSuchMethodException {
     Method addURL;
     addURL = runtimeClassLoader.getClass().getDeclaredMethod("addURL", new Class[] {URL.class});
     addURL.setAccessible(true);
@@ -136,9 +137,9 @@ public class SparkDependencyResolver extends AbstractDependencyResolver {
     }
   }
 
-  private void updateRuntimeClassPath_2_x(URL[] urls)
-      throws SecurityException, IllegalAccessException, IllegalArgumentException,
-          InvocationTargetException, NoSuchMethodException {
+  private void updateRuntimeClassPath_2_x(URL[] urls) throws SecurityException,
+      IllegalAccessException, IllegalArgumentException,
+      InvocationTargetException, NoSuchMethodException {
     Method addURL;
     addURL = runtimeClassLoader.getClass().getDeclaredMethod("addNewUrl", new Class[] {URL.class});
     addURL.setAccessible(true);
@@ -177,17 +178,17 @@ public class SparkDependencyResolver extends AbstractDependencyResolver {
       }
     }
 
-    return new MergedClassPath(
-        scala.collection.JavaConversions.asScalaBuffer(cp).toIndexedSeq(),
+    return new MergedClassPath(scala.collection.JavaConversions.asScalaBuffer(cp).toIndexedSeq(),
         platform.classPath().context());
   }
 
-  public List<String> load(String artifact, boolean addSparkContext) throws Exception {
+  public List<String> load(String artifact,
+      boolean addSparkContext) throws Exception {
     return load(artifact, new LinkedList<String>(), addSparkContext);
   }
 
-  public List<String> load(String artifact, Collection<String> excludes, boolean addSparkContext)
-      throws Exception {
+  public List<String> load(String artifact, Collection<String> excludes,
+      boolean addSparkContext) throws Exception {
     if (StringUtils.isBlank(artifact)) {
       // Should throw here
       throw new RuntimeException("Invalid artifact to load");
@@ -221,8 +222,8 @@ public class SparkDependencyResolver extends AbstractDependencyResolver {
     }
   }
 
-  private List<String> loadFromMvn(
-      String artifact, Collection<String> excludes, boolean addSparkContext) throws Exception {
+  private List<String> loadFromMvn(String artifact, Collection<String> excludes,
+      boolean addSparkContext) throws Exception {
     List<String> loadedLibs = new LinkedList<>();
     Collection<String> allExclusions = new LinkedList<>();
     allExclusions.addAll(excludes);
@@ -246,21 +247,14 @@ public class SparkDependencyResolver extends AbstractDependencyResolver {
     List<URL> newClassPathList = new LinkedList<>();
     List<File> files = new LinkedList<>();
     for (ArtifactResult artifactResult : listOfArtifact) {
-      logger.info(
-          "Load "
-              + artifactResult.getArtifact().getGroupId()
-              + ":"
-              + artifactResult.getArtifact().getArtifactId()
-              + ":"
-              + artifactResult.getArtifact().getVersion());
+      logger.info("Load " + artifactResult.getArtifact().getGroupId() + ":"
+          + artifactResult.getArtifact().getArtifactId() + ":"
+          + artifactResult.getArtifact().getVersion());
       newClassPathList.add(artifactResult.getArtifact().getFile().toURI().toURL());
       files.add(artifactResult.getArtifact().getFile());
-      loadedLibs.add(
-          artifactResult.getArtifact().getGroupId()
-              + ":"
-              + artifactResult.getArtifact().getArtifactId()
-              + ":"
-              + artifactResult.getArtifact().getVersion());
+      loadedLibs.add(artifactResult.getArtifact().getGroupId() + ":"
+          + artifactResult.getArtifact().getArtifactId() + ":"
+          + artifactResult.getArtifact().getVersion());
     }
 
     global.new Run();
@@ -287,8 +281,8 @@ public class SparkDependencyResolver extends AbstractDependencyResolver {
    * @throws Exception
    */
   @Override
-  public List<ArtifactResult> getArtifactsWithDep(String dependency, Collection<String> excludes)
-      throws Exception {
+  public List<ArtifactResult> getArtifactsWithDep(String dependency,
+      Collection<String> excludes) throws Exception {
     Artifact artifact = new DefaultArtifact(inferScalaVersion(dependency));
     DependencyFilter classpathFilter = DependencyFilterUtils.classpathFilter(JavaScopes.COMPILE);
     PatternExclusionsDependencyFilter exclusionFilter =
@@ -302,9 +296,8 @@ public class SparkDependencyResolver extends AbstractDependencyResolver {
         collectRequest.addRepository(repo);
       }
     }
-    DependencyRequest dependencyRequest =
-        new DependencyRequest(
-            collectRequest, DependencyFilterUtils.andFilter(exclusionFilter, classpathFilter));
+    DependencyRequest dependencyRequest = new DependencyRequest(collectRequest,
+        DependencyFilterUtils.andFilter(exclusionFilter, classpathFilter));
     return system.resolveDependencies(session, dependencyRequest).getArtifactResults();
   }
 
@@ -347,7 +340,7 @@ public class SparkDependencyResolver extends AbstractDependencyResolver {
         }
       }
 
-      String[] version = scala.util.Properties.versionNumberString().split("[.]");
+      String [] version = scala.util.Properties.versionNumberString().split("[.]");
       String scalaVersion = version[0] + "." + version[1];
 
       return groupId + ":" + artifactId + "_" + scalaVersion + versionSep + restOfthem;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/test/java/org/apache/zeppelin/spark/DepInterpreterTest.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/DepInterpreterTest.java b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/DepInterpreterTest.java
index 3137ce7..104a675 100644
--- a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/DepInterpreterTest.java
+++ b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/DepInterpreterTest.java
@@ -17,11 +17,6 @@
 
 package org.apache.zeppelin.spark;
 
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -34,9 +29,16 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+
 public class DepInterpreterTest {
 
-  @Rule public TemporaryFolder tmpDir = new TemporaryFolder();
+  @Rule
+  public TemporaryFolder tmpDir = new TemporaryFolder();
 
   private DepInterpreter dep;
   private InterpreterContext context;
@@ -44,9 +46,7 @@ public class DepInterpreterTest {
   private Properties getTestProperties() throws IOException {
     Properties p = new Properties();
     p.setProperty("zeppelin.dep.localrepo", tmpDir.newFolder().getAbsolutePath());
-    p.setProperty(
-        "zeppelin.dep.additionalRemoteRepository",
-        "spark-packages,http://dl.bintray.com/spark-packages/maven,false;");
+    p.setProperty("zeppelin.dep.additionalRemoteRepository", "spark-packages,http://dl.bintray.com/spark-packages/maven,false;");
     return p;
   }
 
@@ -63,8 +63,8 @@ public class DepInterpreterTest {
     intpGroup.get("note").add(dep);
     dep.setInterpreterGroup(intpGroup);
 
-    context = InterpreterContext.builder().build();
-    ;
+    context = InterpreterContext.builder()
+        .build();;
   }
 
   @After
@@ -75,8 +75,7 @@ public class DepInterpreterTest {
   @Test
   public void testDefault() throws InterpreterException {
     dep.getDependencyContext().reset();
-    InterpreterResult ret =
-        dep.interpret("z.load(\"org.apache.commons:commons-csv:1.1\")", context);
+    InterpreterResult ret = dep.interpret("z.load(\"org.apache.commons:commons-csv:1.1\")", context);
     assertEquals(Code.SUCCESS, ret.code());
 
     assertEquals(1, dep.getDependencyContext().getFiles().size());


[41/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/neo4j/src/test/java/org/apache/zeppelin/graph/neo4j/Neo4jCypherInterpreterTest.java
----------------------------------------------------------------------
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 e398568..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
@@ -16,12 +16,7 @@
  */
 package org.apache.zeppelin.graph.neo4j;
 
-import static org.junit.Assert.assertEquals;
-
 import com.google.gson.Gson;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.zeppelin.graph.neo4j.Neo4jConnectionManager.Neo4jAuthType;
 import org.apache.zeppelin.interpreter.InterpreterContext;
@@ -39,6 +34,12 @@ import org.junit.runners.MethodSorters;
 import org.neo4j.harness.ServerControls;
 import org.neo4j.harness.TestServerBuilders;
 
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 public class Neo4jCypherInterpreterTest {
 
@@ -54,27 +55,25 @@ 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) "
-          + "CREATE (n)-[:%s]->(m)";
+          "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
   public static void setUpNeo4jServer() throws Exception {
-    server =
-        TestServerBuilders.newInProcessBuilder()
-            .withConfig("dbms.security.auth_enabled", "false")
-            .withFixture(String.format(CYPHER_FOREACH, LABEL_PERSON, "x % 10"))
-            .withFixture(String.format(CHPHER_UNWIND, REL_KNOWS))
-            .newServer();
+    server = TestServerBuilders.newInProcessBuilder()
+                .withConfig("dbms.security.auth_enabled", "false")
+                .withFixture(String.format(CYPHER_FOREACH, LABEL_PERSON, "x % 10"))
+                .withFixture(String.format(CHPHER_UNWIND, REL_KNOWS))
+                .newServer();
   }
 
   @AfterClass
   public static void tearDownNeo4jServer() throws Exception {
     server.close();
   }
-
+  
   @Before
   public void setUpZeppelin() {
     Properties p = new Properties();
@@ -82,8 +81,9 @@ public class Neo4jCypherInterpreterTest {
     p.setProperty(Neo4jConnectionManager.NEO4J_AUTH_TYPE, Neo4jAuthType.NONE.toString());
     p.setProperty(Neo4jConnectionManager.NEO4J_MAX_CONCURRENCY, "50");
     interpreter = new Neo4jCypherInterpreter(p);
-    context = InterpreterContext.builder().setInterpreterOut(new InterpreterOutput(null)).build();
-    ;
+    context = InterpreterContext.builder()
+        .setInterpreterOut(new InterpreterOutput(null))
+        .build();;
   }
 
   @After
@@ -94,18 +94,17 @@ public class Neo4jCypherInterpreterTest {
   @Test
   public void testTableWithArray() {
     interpreter.open();
-    InterpreterResult result =
-        interpreter.interpret("return 'a' as colA, 'b' as colB, [1, 2, 3] as colC", context);
+    InterpreterResult result = interpreter.interpret(
+            "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));
-
-    result =
-        interpreter.interpret(
+    
+    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";
+            "colA\tcolB\tcolC\n\"a\"\t\"b\"\t[{\"key\":\"value\"},{\"key\":1}]\n";
     assertEquals(tableResultWithMap, result.toString().replace("%table ", StringUtils.EMPTY));
   }
 
@@ -120,12 +119,9 @@ public class Neo4jCypherInterpreterTest {
   @Test
   public void testRenderTable() {
     interpreter.open();
-    InterpreterResult result =
-        interpreter.interpret(
-            "MATCH (n:Person) "
-                + "WHERE n.name IN ['name1', 'name2', 'name3'] "
-                + "RETURN n.name AS name, n.age AS age",
-            context);
+    InterpreterResult result = interpreter.interpret("MATCH (n:Person) "
+            + "WHERE n.name IN ['name1', 'name2', 'name3'] "
+            + "RETURN n.name AS name, n.age AS age", context);
     assertEquals(Code.SUCCESS, result.code());
     final String tableResult = "name\tage\n\"name1\"\t1\n\"name2\"\t2\n\"name3\"\t3\n";
     assertEquals(tableResult, result.toString().replace("%table ", StringUtils.EMPTY));
@@ -135,15 +131,12 @@ public class Neo4jCypherInterpreterTest {
   public void testRenderMap() {
     interpreter.open();
     final String jsonQuery =
-        "RETURN {key: \"value\", listKey: [{inner: \"Map1\"}, {inner: \"Map2\"}]} as object";
+            "RETURN {key: \"value\", listKey: [{inner: \"Map1\"}, {inner: \"Map2\"}]} as object";
     final String objectKey = "object.key";
     final String objectListKey = "object.listKey";
     InterpreterResult result = interpreter.interpret(jsonQuery, context);
     assertEquals(Code.SUCCESS, result.code());
-    String[] rows =
-        result
-            .toString()
-            .replace("%table ", StringUtils.EMPTY)
+    String[] rows = result.toString().replace("%table ", StringUtils.EMPTY)
             .split(Neo4jCypherInterpreter.NEW_LINE);
     assertEquals(rows.length, 2);
     List<String> header = Arrays.asList(rows[0].split(Neo4jCypherInterpreter.TAB));
@@ -152,19 +145,15 @@ public class Neo4jCypherInterpreterTest {
     List<String> row = Arrays.asList(rows[1].split(Neo4jCypherInterpreter.TAB));
     assertEquals(row.size(), header.size());
     assertEquals(row.get(header.indexOf(objectKey)), "value");
-    assertEquals(
-        row.get(header.indexOf(objectListKey)), "[{\"inner\":\"Map1\"},{\"inner\":\"Map2\"}]");
+    assertEquals(row.get(header.indexOf(objectListKey)),
+            "[{\"inner\":\"Map1\"},{\"inner\":\"Map2\"}]");
 
-    final String query =
-        "WITH [{key: \"value\", listKey: [{inner: \"Map1\"}, {inner: \"Map2\"}]},"
+    final String query = "WITH [{key: \"value\", listKey: [{inner: \"Map1\"}, {inner: \"Map2\"}]},"
             + "{key: \"value2\", listKey: [{inner: \"Map12\"}, {inner: \"Map22\"}]}] "
             + "AS array UNWIND array AS object RETURN object";
     result = interpreter.interpret(query, context);
     assertEquals(Code.SUCCESS, result.code());
-    rows =
-        result
-            .toString()
-            .replace("%table ", StringUtils.EMPTY)
+    rows = result.toString().replace("%table ", StringUtils.EMPTY)
             .split(Neo4jCypherInterpreter.NEW_LINE);
     assertEquals(rows.length, 3);
     header = Arrays.asList(rows[0].split(Neo4jCypherInterpreter.TAB));
@@ -173,24 +162,20 @@ public class Neo4jCypherInterpreterTest {
     row = Arrays.asList(rows[1].split(Neo4jCypherInterpreter.TAB));
     assertEquals(row.size(), header.size());
     assertEquals(row.get(header.indexOf(objectKey)), "value");
-    assertEquals(
-        row.get(header.indexOf(objectListKey)), "[{\"inner\":\"Map1\"},{\"inner\":\"Map2\"}]");
+    assertEquals(row.get(header.indexOf(objectListKey)),
+            "[{\"inner\":\"Map1\"},{\"inner\":\"Map2\"}]");
     row = Arrays.asList(rows[2].split(Neo4jCypherInterpreter.TAB));
     assertEquals(row.size(), header.size());
     assertEquals(row.get(header.indexOf(objectKey)), "value2");
-    assertEquals(
-        row.get(header.indexOf(objectListKey)), "[{\"inner\":\"Map12\"},{\"inner\":\"Map22\"}]");
+    assertEquals(row.get(header.indexOf(objectListKey)),
+            "[{\"inner\":\"Map12\"},{\"inner\":\"Map22\"}]");
 
-    final String jsonListWithNullQuery =
-        "WITH [{key: \"value\", listKey: null},"
+    final String jsonListWithNullQuery = "WITH [{key: \"value\", listKey: null},"
             + "{key: \"value2\", listKey: [{inner: \"Map1\"}, {inner: \"Map2\"}]}] "
             + "AS array UNWIND array AS object RETURN object";
     result = interpreter.interpret(jsonListWithNullQuery, context);
     assertEquals(Code.SUCCESS, result.code());
-    rows =
-        result
-            .toString()
-            .replace("%table ", StringUtils.EMPTY)
+    rows = result.toString().replace("%table ", StringUtils.EMPTY)
             .split(Neo4jCypherInterpreter.NEW_LINE);
     assertEquals(rows.length, 3);
     header = Arrays.asList(rows[0].split(Neo4jCypherInterpreter.TAB, -1));
@@ -204,19 +189,15 @@ public class Neo4jCypherInterpreterTest {
     row = Arrays.asList(rows[2].split(Neo4jCypherInterpreter.TAB, -1));
     assertEquals(row.size(), header.size());
     assertEquals(row.get(header.indexOf(objectKey)), "value2");
-    assertEquals(
-        row.get(header.indexOf(objectListKey)), "[{\"inner\":\"Map1\"},{\"inner\":\"Map2\"}]");
-
-    final String jsonListWithoutListKeyQuery =
-        "WITH [{key: \"value\"},"
+    assertEquals(row.get(header.indexOf(objectListKey)),
+            "[{\"inner\":\"Map1\"},{\"inner\":\"Map2\"}]");
+    
+    final String jsonListWithoutListKeyQuery = "WITH [{key: \"value\"},"
             + "{key: \"value2\", listKey: [{inner: \"Map1\"}, {inner: \"Map2\"}]}] "
             + "AS array UNWIND array AS object RETURN object";
     result = interpreter.interpret(jsonListWithoutListKeyQuery, context);
     assertEquals(Code.SUCCESS, result.code());
-    rows =
-        result
-            .toString()
-            .replace("%table ", StringUtils.EMPTY)
+    rows = result.toString().replace("%table ", StringUtils.EMPTY)
             .split(Neo4jCypherInterpreter.NEW_LINE);
     assertEquals(rows.length, 3);
     header = Arrays.asList(rows[0].split(Neo4jCypherInterpreter.TAB, -1));
@@ -229,18 +210,17 @@ public class Neo4jCypherInterpreterTest {
     row = Arrays.asList(rows[2].split(Neo4jCypherInterpreter.TAB, -1));
     assertEquals(row.size(), header.size());
     assertEquals(row.get(header.indexOf(objectKey)), "value2");
-    assertEquals(
-        row.get(header.indexOf(objectListKey)), "[{\"inner\":\"Map1\"},{\"inner\":\"Map2\"}]");
+    assertEquals(row.get(header.indexOf(objectListKey)),
+            "[{\"inner\":\"Map1\"},{\"inner\":\"Map2\"}]");
   }
 
   @Test
   public void testRenderNetwork() {
     interpreter.open();
-    InterpreterResult result =
-        interpreter.interpret("MATCH (n)-[r:KNOWS]-(m) RETURN n, r, m LIMIT 1", context);
-    GraphResult.Graph graph =
-        gson.fromJson(
-            result.toString().replace("%network ", StringUtils.EMPTY), GraphResult.Graph.class);
+    InterpreterResult result = interpreter.interpret(
+            "MATCH (n)-[r:KNOWS]-(m) RETURN n, r, m LIMIT 1", context);
+    GraphResult.Graph graph = gson.fromJson(result.toString().replace("%network ",
+            StringUtils.EMPTY), GraphResult.Graph.class);
     assertEquals(2, graph.getNodes().size());
     assertEquals(true, graph.getNodes().iterator().next().getLabel().equals(LABEL_PERSON));
     assertEquals(1, graph.getEdges().size());
@@ -264,9 +244,8 @@ public class Neo4jCypherInterpreterTest {
     assertEquals(Code.SUCCESS, result.code());
     assertEquals(errorMsgEmpty, result.toString());
 
-    result =
-        interpreter.interpret(
-            "MATCH (n:Person{name: }) RETURN n.name AS name, n.age AS age", context);
+    result = interpreter.interpret("MATCH (n:Person{name: }) RETURN n.name AS name, n.age AS age",
+            context);
     assertEquals(Code.ERROR, result.code());
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/pig/pom.xml
----------------------------------------------------------------------
diff --git a/pig/pom.xml b/pig/pom.xml
index 4553b5c..571d198 100644
--- a/pig/pom.xml
+++ b/pig/pom.xml
@@ -190,6 +190,13 @@
                     <forkMode>always</forkMode>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <configuration>
+                    <skip>false</skip>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 97d15de..9503aa7 100644
--- a/pig/src/main/java/org/apache/zeppelin/pig/BasePigInterpreter.java
+++ b/pig/src/main/java/org/apache/zeppelin/pig/BasePigInterpreter.java
@@ -17,24 +17,28 @@
 
 package org.apache.zeppelin.pig;
 
-import java.lang.reflect.Field;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
 import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.pig.PigServer;
 import org.apache.pig.backend.BackendException;
 import org.apache.pig.backend.hadoop.executionengine.HExecutionEngine;
 import org.apache.pig.backend.hadoop.executionengine.Launcher;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.lang.reflect.Field;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** */
+/**
+ *
+ */
 public abstract class BasePigInterpreter extends Interpreter {
   private static final Logger LOGGER = LoggerFactory.getLogger(BasePigInterpreter.class);
 
@@ -56,7 +60,7 @@ public abstract class BasePigInterpreter extends Interpreter {
       for (String jobId : jobIds) {
         LOGGER.info("Kill jobId:" + jobId);
         HExecutionEngine engine =
-            (HExecutionEngine) getPigServer().getPigContext().getExecutionEngine();
+                (HExecutionEngine) getPigServer().getPigContext().getExecutionEngine();
         try {
           Field launcherField = HExecutionEngine.class.getDeclaredField("launcher");
           launcherField.setAccessible(true);
@@ -68,8 +72,8 @@ public abstract class BasePigInterpreter extends Interpreter {
         }
       }
     } else {
-      LOGGER.warn(
-          "No PigScriptListener found, can not cancel paragraph:" + context.getParagraphId());
+      LOGGER.warn("No PigScriptListener found, can not cancel paragraph:"
+              + context.getParagraphId());
     }
   }
 
@@ -89,15 +93,14 @@ public abstract class BasePigInterpreter extends Interpreter {
 
   @Override
   public Scheduler getScheduler() {
-    return SchedulerFactory.singleton()
-        .createOrGetFIFOScheduler(PigInterpreter.class.getName() + this.hashCode());
+    return SchedulerFactory.singleton().createOrGetFIFOScheduler(
+            PigInterpreter.class.getName() + this.hashCode());
   }
 
   public abstract PigServer getPigServer();
 
   /**
    * Use paragraph title if it exists, else use the last line of pig script.
-   *
    * @param cmd
    * @param context
    * @return

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/pig/src/main/java/org/apache/zeppelin/pig/PigInterpreter.java
----------------------------------------------------------------------
diff --git a/pig/src/main/java/org/apache/zeppelin/pig/PigInterpreter.java b/pig/src/main/java/org/apache/zeppelin/pig/PigInterpreter.java
index 5f79e97..4fc0676 100644
--- a/pig/src/main/java/org/apache/zeppelin/pig/PigInterpreter.java
+++ b/pig/src/main/java/org/apache/zeppelin/pig/PigInterpreter.java
@@ -17,11 +17,6 @@
 
 package org.apache.zeppelin.pig;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.Map;
-import java.util.Properties;
 import org.apache.commons.io.output.ByteArrayOutputStream;
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.pig.PigServer;
@@ -29,13 +24,22 @@ import org.apache.pig.impl.logicalLayer.FrontendException;
 import org.apache.pig.tools.pigscript.parser.ParseException;
 import org.apache.pig.tools.pigstats.PigStats;
 import org.apache.pig.tools.pigstats.ScriptState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.Map;
+import java.util.Properties;
+
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.InterpreterResult.Code;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Pig interpreter for Zeppelin. */
+/**
+ * Pig interpreter for Zeppelin.
+ */
 public class PigInterpreter extends BasePigInterpreter {
   private static final Logger LOGGER = LoggerFactory.getLogger(PigInterpreter.class);
 
@@ -60,10 +64,8 @@ public class PigInterpreter extends BasePigInterpreter {
       pigServer = new PigServer(execType);
       for (Map.Entry entry : getProperties().entrySet()) {
         if (!entry.getKey().toString().startsWith("zeppelin.")) {
-          pigServer
-              .getPigContext()
-              .getProperties()
-              .setProperty(entry.getKey().toString(), entry.getValue().toString());
+          pigServer.getPigContext().getProperties().setProperty(entry.getKey().toString(),
+              entry.getValue().toString());
         }
       }
     } catch (IOException e) {
@@ -77,6 +79,7 @@ public class PigInterpreter extends BasePigInterpreter {
     pigServer = null;
   }
 
+
   @Override
   public InterpreterResult interpret(String cmd, InterpreterContext contextInterpreter) {
     // remember the origial stdout, because we will redirect stdout to capture
@@ -143,7 +146,10 @@ public class PigInterpreter extends BasePigInterpreter {
     return new InterpreterResult(Code.SUCCESS, outputBuilder.toString());
   }
 
+
   public PigServer getPigServer() {
     return pigServer;
   }
+
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 0c6eef6..97c2f6e 100644
--- a/pig/src/main/java/org/apache/zeppelin/pig/PigQueryInterpreter.java
+++ b/pig/src/main/java/org/apache/zeppelin/pig/PigQueryInterpreter.java
@@ -17,12 +17,6 @@
 
 package org.apache.zeppelin.pig;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.pig.PigServer;
@@ -32,15 +26,25 @@ import org.apache.pig.impl.logicalLayer.schema.Schema;
 import org.apache.pig.tools.pigscript.parser.ParseException;
 import org.apache.pig.tools.pigstats.PigStats;
 import org.apache.pig.tools.pigstats.ScriptState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.InterpreterResult.Code;
 import org.apache.zeppelin.interpreter.ResultMessages;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** */
+/**
+ *
+ */
 public class PigQueryInterpreter extends BasePigInterpreter {
   private static final Logger LOGGER = LoggerFactory.getLogger(PigQueryInterpreter.class);
   private static final String MAX_RESULTS = "zeppelin.pig.maxResult";
@@ -58,7 +62,9 @@ public class PigQueryInterpreter extends BasePigInterpreter {
   }
 
   @Override
-  public void close() {}
+  public void close() {
+
+  }
 
   @Override
   public InterpreterResult interpret(String st, InterpreterContext context) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/pig/src/main/java/org/apache/zeppelin/pig/PigScriptListener.java
----------------------------------------------------------------------
diff --git a/pig/src/main/java/org/apache/zeppelin/pig/PigScriptListener.java b/pig/src/main/java/org/apache/zeppelin/pig/PigScriptListener.java
index 0e6068a..8ff1bf8 100644
--- a/pig/src/main/java/org/apache/zeppelin/pig/PigScriptListener.java
+++ b/pig/src/main/java/org/apache/zeppelin/pig/PigScriptListener.java
@@ -17,8 +17,6 @@
 
 package org.apache.zeppelin.pig;
 
-import java.util.HashSet;
-import java.util.Set;
 import org.apache.pig.impl.plan.OperatorPlan;
 import org.apache.pig.tools.pigstats.JobStats;
 import org.apache.pig.tools.pigstats.OutputStats;
@@ -26,7 +24,12 @@ import org.apache.pig.tools.pigstats.PigProgressNotificationListener;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** */
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ *
+ */
 public class PigScriptListener implements PigProgressNotificationListener {
   private static final Logger LOGGER = LoggerFactory.getLogger(PigScriptListener.class);
 
@@ -34,13 +37,19 @@ public class PigScriptListener implements PigProgressNotificationListener {
   private int progress;
 
   @Override
-  public void initialPlanNotification(String scriptId, OperatorPlan<?> plan) {}
+  public void initialPlanNotification(String scriptId, OperatorPlan<?> plan) {
+
+  }
 
   @Override
-  public void launchStartedNotification(String scriptId, int numJobsToLaunch) {}
+  public void launchStartedNotification(String scriptId, int numJobsToLaunch) {
+
+  }
 
   @Override
-  public void jobsSubmittedNotification(String scriptId, int numJobsSubmitted) {}
+  public void jobsSubmittedNotification(String scriptId, int numJobsSubmitted) {
+
+  }
 
   @Override
   public void jobStartedNotification(String scriptId, String assignedJobId) {
@@ -48,13 +57,19 @@ public class PigScriptListener implements PigProgressNotificationListener {
   }
 
   @Override
-  public void jobFinishedNotification(String scriptId, JobStats jobStats) {}
+  public void jobFinishedNotification(String scriptId, JobStats jobStats) {
+
+  }
 
   @Override
-  public void jobFailedNotification(String scriptId, JobStats jobStats) {}
+  public void jobFailedNotification(String scriptId, JobStats jobStats) {
+
+  }
 
   @Override
-  public void outputCompletedNotification(String scriptId, OutputStats outputStats) {}
+  public void outputCompletedNotification(String scriptId, OutputStats outputStats) {
+
+  }
 
   @Override
   public void progressUpdatedNotification(String scriptId, int progress) {
@@ -63,7 +78,9 @@ public class PigScriptListener implements PigProgressNotificationListener {
   }
 
   @Override
-  public void launchCompletedNotification(String scriptId, int numJobsSucceeded) {}
+  public void launchCompletedNotification(String scriptId, int numJobsSucceeded) {
+
+  }
 
   public Set<String> getJobIds() {
     return jobIds;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/pig/src/main/java/org/apache/zeppelin/pig/PigUtils.java
----------------------------------------------------------------------
diff --git a/pig/src/main/java/org/apache/zeppelin/pig/PigUtils.java b/pig/src/main/java/org/apache/zeppelin/pig/PigUtils.java
index 28fd763..1c48250 100644
--- a/pig/src/main/java/org/apache/zeppelin/pig/PigUtils.java
+++ b/pig/src/main/java/org/apache/zeppelin/pig/PigUtils.java
@@ -17,16 +17,19 @@
 
 package org.apache.zeppelin.pig;
 
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.List;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** */
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ *
+ */
 public class PigUtils {
   private static final Logger LOGGER = LoggerFactory.getLogger(PigUtils.class);
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/pig/src/test/java/org/apache/zeppelin/pig/PigInterpreterSparkTest.java
----------------------------------------------------------------------
diff --git a/pig/src/test/java/org/apache/zeppelin/pig/PigInterpreterSparkTest.java b/pig/src/test/java/org/apache/zeppelin/pig/PigInterpreterSparkTest.java
index 1fd5c82..ea1a3f8 100644
--- a/pig/src/test/java/org/apache/zeppelin/pig/PigInterpreterSparkTest.java
+++ b/pig/src/test/java/org/apache/zeppelin/pig/PigInterpreterSparkTest.java
@@ -1,31 +1,37 @@
 /**
- * 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
- *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
- *
- * <p>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
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.pig;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
+import org.apache.commons.io.IOUtils;
+import org.junit.After;
+import org.junit.Test;
+
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.util.Properties;
-import org.apache.commons.io.IOUtils;
+
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
-import org.junit.After;
-import org.junit.Test;
 
 public class PigInterpreterSparkTest {
   private PigInterpreter pigInterpreter;
@@ -38,8 +44,8 @@ public class PigInterpreterSparkTest {
     pigInterpreter = new PigInterpreter(properties);
     pigInterpreter.open();
     context = InterpreterContext.builder().setParagraphId("paragraphId").build();
-  }
 
+  }
   @After
   public void tearDown() {
     pigInterpreter.close();
@@ -49,44 +55,41 @@ public class PigInterpreterSparkTest {
   public void testBasics() throws IOException {
     setUpSpark(false);
 
-    String content = "1\tandy\n" + "2\tpeter\n";
+    String content = "1\tandy\n"
+        + "2\tpeter\n";
     File tmpFile = File.createTempFile("zeppelin", "test");
     FileWriter writer = new FileWriter(tmpFile);
     IOUtils.write(content, writer);
     writer.close();
 
     // simple pig script using dump
-    String pigscript = "a = load '" + tmpFile.getAbsolutePath() + "';" + "dump a;";
+    String pigscript = "a = load '" + tmpFile.getAbsolutePath() + "';"
+        + "dump a;";
     InterpreterResult result = pigInterpreter.interpret(pigscript, context);
     assertEquals(InterpreterResult.Type.TEXT, result.message().get(0).getType());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertTrue(result.message().get(0).getData().contains("(1,andy)\n(2,peter)"));
 
     // describe
-    pigscript =
-        "a = load '"
-            + tmpFile.getAbsolutePath()
-            + "' as (id: int, name: bytearray);"
-            + "describe a;";
+    pigscript = "a = load '" + tmpFile.getAbsolutePath() + "' as (id: int, name: bytearray);"
+        + "describe a;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(InterpreterResult.Type.TEXT, result.message().get(0).getType());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertTrue(result.message().get(0).getData().contains("a: {id: int,name: bytearray}"));
 
     // syntax error (compilation error)
-    pigscript = "a = loa '" + tmpFile.getAbsolutePath() + "';" + "describe a;";
+    pigscript = "a = loa '" + tmpFile.getAbsolutePath() + "';"
+        + "describe a;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(InterpreterResult.Type.TEXT, result.message().get(0).getType());
     assertEquals(InterpreterResult.Code.ERROR, result.code());
-    assertTrue(
-        result
-            .message()
-            .get(0)
-            .getData()
-            .contains("Syntax error, unexpected symbol at or near 'a'"));
+    assertTrue(result.message().get(0).getData().contains(
+            "Syntax error, unexpected symbol at or near 'a'"));
 
     // syntax error
-    pigscript = "a = load '" + tmpFile.getAbsolutePath() + "';" + "foreach a generate $0;";
+    pigscript = "a = load '" + tmpFile.getAbsolutePath() + "';"
+        + "foreach a generate $0;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(InterpreterResult.Type.TEXT, result.message().get(0).getType());
     assertEquals(InterpreterResult.Code.ERROR, result.code());
@@ -97,14 +100,16 @@ public class PigInterpreterSparkTest {
   public void testIncludeJobStats() throws IOException {
     setUpSpark(true);
 
-    String content = "1\tandy\n" + "2\tpeter\n";
+    String content = "1\tandy\n"
+        + "2\tpeter\n";
     File tmpFile = File.createTempFile("zeppelin", "test");
     FileWriter writer = new FileWriter(tmpFile);
     IOUtils.write(content, writer);
     writer.close();
 
     // simple pig script using dump
-    String pigscript = "a = load '" + tmpFile.getAbsolutePath() + "';" + "dump a;";
+    String pigscript = "a = load '" + tmpFile.getAbsolutePath() + "';"
+        + "dump a;";
     InterpreterResult result = pigInterpreter.interpret(pigscript, context);
     assertEquals(InterpreterResult.Type.TEXT, result.message().get(0).getType());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
@@ -112,11 +117,8 @@ public class PigInterpreterSparkTest {
     assertTrue(result.message().get(0).getData().contains("(1,andy)\n(2,peter)"));
 
     // describe
-    pigscript =
-        "a = load '"
-            + tmpFile.getAbsolutePath()
-            + "' as (id: int, name: bytearray);"
-            + "describe a;";
+    pigscript = "a = load '" + tmpFile.getAbsolutePath() + "' as (id: int, name: bytearray);"
+        + "describe a;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(InterpreterResult.Type.TEXT, result.message().get(0).getType());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
@@ -124,23 +126,24 @@ public class PigInterpreterSparkTest {
     assertTrue(result.message().get(0).getData().contains("a: {id: int,name: bytearray}"));
 
     // syntax error (compilation error)
-    pigscript = "a = loa '" + tmpFile.getAbsolutePath() + "';" + "describe a;";
+    pigscript = "a = loa '" + tmpFile.getAbsolutePath() + "';"
+        + "describe a;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(InterpreterResult.Type.TEXT, result.message().get(0).getType());
     assertEquals(InterpreterResult.Code.ERROR, result.code());
     // no job is launched, so no jobStats
-    assertTrue(
-        result
-            .message()
-            .get(0)
-            .getData()
-            .contains("Syntax error, unexpected symbol at or near 'a'"));
+    assertTrue(result.message().get(0).getData().contains(
+            "Syntax error, unexpected symbol at or near 'a'"));
 
     // execution error
-    pigscript = "a = load 'invalid_path';" + "dump a;";
+    pigscript = "a = load 'invalid_path';"
+        + "dump a;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(InterpreterResult.Type.TEXT, result.message().get(0).getType());
     assertEquals(InterpreterResult.Code.ERROR, result.code());
     assertTrue(result.message().get(0).getData().contains("Failed to read data from"));
   }
+
 }
+
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/pig/src/test/java/org/apache/zeppelin/pig/PigInterpreterTest.java
----------------------------------------------------------------------
diff --git a/pig/src/test/java/org/apache/zeppelin/pig/PigInterpreterTest.java b/pig/src/test/java/org/apache/zeppelin/pig/PigInterpreterTest.java
index f1f6ad8..5a21bb3 100644
--- a/pig/src/test/java/org/apache/zeppelin/pig/PigInterpreterTest.java
+++ b/pig/src/test/java/org/apache/zeppelin/pig/PigInterpreterTest.java
@@ -1,33 +1,39 @@
 /**
- * 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
- *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
- *
- * <p>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
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.pig;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
+import org.apache.commons.io.IOUtils;
+import org.junit.After;
+import org.junit.Test;
+
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.util.Properties;
-import org.apache.commons.io.IOUtils;
+
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.InterpreterResult.Code;
 import org.apache.zeppelin.interpreter.InterpreterResult.Type;
-import org.junit.After;
-import org.junit.Test;
 
 public class PigInterpreterTest {
 
@@ -52,24 +58,23 @@ public class PigInterpreterTest {
   public void testBasics() throws IOException {
     setUpLocal(false);
 
-    String content = "1\tandy\n" + "2\tpeter\n";
+    String content = "1\tandy\n"
+            + "2\tpeter\n";
     File tmpFile = File.createTempFile("zeppelin", "test");
     FileWriter writer = new FileWriter(tmpFile);
     IOUtils.write(content, writer);
     writer.close();
 
     // simple pig script using dump
-    String pigscript = "a = load '" + tmpFile.getAbsolutePath() + "';" + "dump a;";
+    String pigscript = "a = load '" + tmpFile.getAbsolutePath() + "';"
+            + "dump a;";
     InterpreterResult result = pigInterpreter.interpret(pigscript, context);
     assertEquals(Type.TEXT, result.message().get(0).getType());
     assertEquals(Code.SUCCESS, result.code());
     assertTrue(result.message().get(0).getData().contains("(1,andy)\n(2,peter)"));
 
     // describe
-    pigscript =
-        "a = load '"
-            + tmpFile.getAbsolutePath()
-            + "' as (id: int, name: bytearray);"
+    pigscript = "a = load '" + tmpFile.getAbsolutePath() + "' as (id: int, name: bytearray);"
             + "describe a;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(Type.TEXT, result.message().get(0).getType());
@@ -77,37 +82,38 @@ public class PigInterpreterTest {
     assertTrue(result.message().get(0).getData().contains("a: {id: int,name: bytearray}"));
 
     // syntax error (compilation error)
-    pigscript = "a = loa '" + tmpFile.getAbsolutePath() + "';" + "describe a;";
+    pigscript = "a = loa '" + tmpFile.getAbsolutePath() + "';"
+            + "describe a;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(Type.TEXT, result.message().get(0).getType());
     assertEquals(Code.ERROR, result.code());
-    assertTrue(
-        result
-            .message()
-            .get(0)
-            .getData()
-            .contains("Syntax error, unexpected symbol at or near 'a'"));
+    assertTrue(result.message().get(0).getData().contains(
+            "Syntax error, unexpected symbol at or near 'a'"));
 
     // execution error
-    pigscript = "a = load 'invalid_path';" + "dump a;";
+    pigscript = "a = load 'invalid_path';"
+            + "dump a;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(Type.TEXT, result.message().get(0).getType());
     assertEquals(Code.ERROR, result.code());
     assertTrue(result.message().get(0).getData().contains("Input path does not exist"));
   }
 
+
   @Test
   public void testIncludeJobStats() throws IOException {
     setUpLocal(true);
 
-    String content = "1\tandy\n" + "2\tpeter\n";
+    String content = "1\tandy\n"
+            + "2\tpeter\n";
     File tmpFile = File.createTempFile("zeppelin", "test");
     FileWriter writer = new FileWriter(tmpFile);
     IOUtils.write(content, writer);
     writer.close();
 
     // simple pig script using dump
-    String pigscript = "a = load '" + tmpFile.getAbsolutePath() + "';" + "dump a;";
+    String pigscript = "a = load '" + tmpFile.getAbsolutePath() + "';"
+            + "dump a;";
     InterpreterResult result = pigInterpreter.interpret(pigscript, context);
     assertEquals(Type.TEXT, result.message().get(0).getType());
     assertEquals(Code.SUCCESS, result.code());
@@ -115,10 +121,7 @@ public class PigInterpreterTest {
     assertTrue(result.message().get(0).getData().contains("(1,andy)\n(2,peter)"));
 
     // describe
-    pigscript =
-        "a = load '"
-            + tmpFile.getAbsolutePath()
-            + "' as (id: int, name: bytearray);"
+    pigscript = "a = load '" + tmpFile.getAbsolutePath() + "' as (id: int, name: bytearray);"
             + "describe a;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(Type.TEXT, result.message().get(0).getType());
@@ -128,25 +131,24 @@ public class PigInterpreterTest {
     assertTrue(result.message().get(0).getData().contains("a: {id: int,name: bytearray}"));
 
     // syntax error (compilation error)
-    pigscript = "a = loa '" + tmpFile.getAbsolutePath() + "';" + "describe a;";
+    pigscript = "a = loa '" + tmpFile.getAbsolutePath() + "';"
+            + "describe a;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(Type.TEXT, result.message().get(0).getType());
     assertEquals(Code.ERROR, result.code());
     // no job is launched, so no jobStats
     assertTrue(!result.message().get(0).getData().contains("Counters:"));
-    assertTrue(
-        result
-            .message()
-            .get(0)
-            .getData()
-            .contains("Syntax error, unexpected symbol at or near 'a'"));
+    assertTrue(result.message().get(0).getData().contains(
+            "Syntax error, unexpected symbol at or near 'a'"));
 
     // execution error
-    pigscript = "a = load 'invalid_path';" + "dump a;";
+    pigscript = "a = load 'invalid_path';"
+            + "dump a;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(Type.TEXT, result.message().get(0).getType());
     assertEquals(Code.ERROR, result.code());
     assertTrue(result.message().get(0).getData().contains("Counters:"));
     assertTrue(result.message().get(0).getData().contains("Input path does not exist"));
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/pig/src/test/java/org/apache/zeppelin/pig/PigInterpreterTezTest.java
----------------------------------------------------------------------
diff --git a/pig/src/test/java/org/apache/zeppelin/pig/PigInterpreterTezTest.java b/pig/src/test/java/org/apache/zeppelin/pig/PigInterpreterTezTest.java
index 14d9686..ec09a88 100644
--- a/pig/src/test/java/org/apache/zeppelin/pig/PigInterpreterTezTest.java
+++ b/pig/src/test/java/org/apache/zeppelin/pig/PigInterpreterTezTest.java
@@ -1,33 +1,39 @@
 /**
- * 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
- *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
- *
- * <p>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
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.pig;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
+import org.apache.commons.io.IOUtils;
+import org.junit.After;
+import org.junit.Test;
+
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.util.Properties;
-import org.apache.commons.io.IOUtils;
+
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.InterpreterResult.Code;
 import org.apache.zeppelin.interpreter.InterpreterResult.Type;
-import org.junit.After;
-import org.junit.Test;
 
 public class PigInterpreterTezTest {
 
@@ -42,8 +48,8 @@ public class PigInterpreterTezTest {
     pigInterpreter = new PigInterpreter(properties);
     pigInterpreter.open();
     context = InterpreterContext.builder().setParagraphId("paragraphId").build();
-  }
 
+  }
   @After
   public void tearDown() {
     pigInterpreter.close();
@@ -53,52 +59,45 @@ public class PigInterpreterTezTest {
   public void testBasics() throws IOException {
     setUpTez(false);
 
-    assertEquals(
-        "test",
-        pigInterpreter
-            .getPigServer()
-            .getPigContext()
-            .getProperties()
+    assertEquals("test",
+        pigInterpreter.getPigServer().getPigContext().getProperties()
             .getProperty("tez.queue.name"));
-
-    String content = "1\tandy\n" + "2\tpeter\n";
+    
+    String content = "1\tandy\n"
+        + "2\tpeter\n";
     File tmpFile = File.createTempFile("zeppelin", "test");
     FileWriter writer = new FileWriter(tmpFile);
     IOUtils.write(content, writer);
     writer.close();
 
     // simple pig script using dump
-    String pigscript = "a = load '" + tmpFile.getAbsolutePath() + "';" + "dump a;";
+    String pigscript = "a = load '" + tmpFile.getAbsolutePath() + "';"
+        + "dump a;";
     InterpreterResult result = pigInterpreter.interpret(pigscript, context);
     assertEquals(Type.TEXT, result.message().get(0).getType());
     assertEquals(Code.SUCCESS, result.code());
     assertTrue(result.message().get(0).getData().contains("(1,andy)\n(2,peter)"));
 
     // describe
-    pigscript =
-        "a = load '"
-            + tmpFile.getAbsolutePath()
-            + "' as (id: int, name: bytearray);"
-            + "describe a;";
+    pigscript = "a = load '" + tmpFile.getAbsolutePath() + "' as (id: int, name: bytearray);"
+        + "describe a;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(Type.TEXT, result.message().get(0).getType());
     assertEquals(Code.SUCCESS, result.code());
     assertTrue(result.message().get(0).getData().contains("a: {id: int,name: bytearray}"));
 
     // syntax error (compilation error)
-    pigscript = "a = loa '" + tmpFile.getAbsolutePath() + "';" + "describe a;";
+    pigscript = "a = loa '" + tmpFile.getAbsolutePath() + "';"
+        + "describe a;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(Type.TEXT, result.message().get(0).getType());
     assertEquals(Code.ERROR, result.code());
-    assertTrue(
-        result
-            .message()
-            .get(0)
-            .getData()
-            .contains("Syntax error, unexpected symbol at or near 'a'"));
+    assertTrue(result.message().get(0).getData().contains(
+            "Syntax error, unexpected symbol at or near 'a'"));
 
     // syntax error
-    pigscript = "a = load '" + tmpFile.getAbsolutePath() + "';" + "foreach a generate $0;";
+    pigscript = "a = load '" + tmpFile.getAbsolutePath() + "';"
+        + "foreach a generate $0;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(Type.TEXT, result.message().get(0).getType());
     assertEquals(Code.ERROR, result.code());
@@ -109,14 +108,16 @@ public class PigInterpreterTezTest {
   public void testIncludeJobStats() throws IOException {
     setUpTez(true);
 
-    String content = "1\tandy\n" + "2\tpeter\n";
+    String content = "1\tandy\n"
+        + "2\tpeter\n";
     File tmpFile = File.createTempFile("zeppelin", "test");
     FileWriter writer = new FileWriter(tmpFile);
     IOUtils.write(content, writer);
     writer.close();
 
     // simple pig script using dump
-    String pigscript = "a = load '" + tmpFile.getAbsolutePath() + "';" + "dump a;";
+    String pigscript = "a = load '" + tmpFile.getAbsolutePath() + "';"
+        + "dump a;";
     InterpreterResult result = pigInterpreter.interpret(pigscript, context);
     assertEquals(Type.TEXT, result.message().get(0).getType());
     assertEquals(Code.SUCCESS, result.code());
@@ -124,11 +125,8 @@ public class PigInterpreterTezTest {
     assertTrue(result.message().get(0).getData().contains("(1,andy)\n(2,peter)"));
 
     // describe
-    pigscript =
-        "a = load '"
-            + tmpFile.getAbsolutePath()
-            + "' as (id: int, name: bytearray);"
-            + "describe a;";
+    pigscript = "a = load '" + tmpFile.getAbsolutePath() + "' as (id: int, name: bytearray);"
+        + "describe a;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(Type.TEXT, result.message().get(0).getType());
     assertEquals(Code.SUCCESS, result.code());
@@ -137,21 +135,19 @@ public class PigInterpreterTezTest {
     assertTrue(result.message().get(0).getData().contains("a: {id: int,name: bytearray}"));
 
     // syntax error (compilation error)
-    pigscript = "a = loa '" + tmpFile.getAbsolutePath() + "';" + "describe a;";
+    pigscript = "a = loa '" + tmpFile.getAbsolutePath() + "';"
+        + "describe a;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(Type.TEXT, result.message().get(0).getType());
     assertEquals(Code.ERROR, result.code());
     // no job is launched, so no jobStats
     assertTrue(!result.message().get(0).getData().contains("Vertex Stats"));
-    assertTrue(
-        result
-            .message()
-            .get(0)
-            .getData()
-            .contains("Syntax error, unexpected symbol at or near 'a'"));
+    assertTrue(result.message().get(0).getData().contains(
+            "Syntax error, unexpected symbol at or near 'a'"));
 
     // execution error
-    pigscript = "a = load 'invalid_path';" + "dump a;";
+    pigscript = "a = load 'invalid_path';"
+        + "dump a;";
     result = pigInterpreter.interpret(pigscript, context);
     assertEquals(Type.TEXT, result.message().get(0).getType());
     assertEquals(Code.ERROR, result.code());

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 a850174..01f0a20 100644
--- a/pig/src/test/java/org/apache/zeppelin/pig/PigQueryInterpreterTest.java
+++ b/pig/src/test/java/org/apache/zeppelin/pig/PigQueryInterpreterTest.java
@@ -1,40 +1,48 @@
 /**
- * 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
- *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
- *
- * <p>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
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.pig;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
+import org.apache.commons.io.IOUtils;
+import org.apache.zeppelin.interpreter.LazyOpenInterpreter;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Properties;
-import org.apache.commons.io.IOUtils;
+
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.InterpreterGroup;
 import org.apache.zeppelin.interpreter.InterpreterResult;
-import org.apache.zeppelin.interpreter.LazyOpenInterpreter;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
 
-/** */
+/**
+ *
+ */
 public class PigQueryInterpreterTest {
 
   private Interpreter pigInterpreter;
@@ -70,28 +78,23 @@ public class PigQueryInterpreterTest {
 
   @Test
   public void testBasics() throws IOException, InterpreterException {
-    String content = "andy\tmale\t10\n" + "peter\tmale\t20\n" + "amy\tfemale\t14\n";
+    String content = "andy\tmale\t10\n"
+            + "peter\tmale\t20\n"
+            + "amy\tfemale\t14\n";
     File tmpFile = File.createTempFile("zeppelin", "test");
     FileWriter writer = new FileWriter(tmpFile);
     IOUtils.write(content, writer);
     writer.close();
 
     // run script in PigInterpreter
-    String pigscript =
-        "a = load '"
-            + tmpFile.getAbsolutePath()
-            + "' as (name, gender, age);\n"
+    String pigscript = "a = load '" + tmpFile.getAbsolutePath() + "' as (name, gender, age);\n"
             + "a2 = load 'invalid_path' as (name, gender, age);\n"
             + "dump a;";
     InterpreterResult result = pigInterpreter.interpret(pigscript, context);
     assertEquals(InterpreterResult.Type.TEXT, result.message().get(0).getType());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
-    assertTrue(
-        result
-            .message()
-            .get(0)
-            .getData()
-            .contains("(andy,male,10)\n(peter,male,20)\n(amy,female,14)"));
+    assertTrue(result.message().get(0).getData().contains(
+            "(andy,male,10)\n(peter,male,20)\n(amy,female,14)"));
 
     // run single line query in PigQueryInterpreter
     String query = "foreach a generate name, age;";
@@ -115,18 +118,13 @@ public class PigQueryInterpreterTest {
     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;";
+    query = "b = group a by invalid_column;\nforeach b generate group as gender, " +
+            "COUNT($1) as count;";
     result = pigQueryInterpreter.interpret(query, context);
     assertEquals(InterpreterResult.Type.TEXT, result.message().get(0).getType());
     assertEquals(InterpreterResult.Code.ERROR, result.code());
-    assertTrue(
-        result
-            .message()
-            .get(0)
-            .getData()
-            .contains("Projected field [invalid_column] does not exist in schema"));
+    assertTrue(result.message().get(0).getData().contains(
+            "Projected field [invalid_column] does not exist in schema"));
 
     // execution error in PigQueryInterpreter
     query = "foreach a2 generate name, age;";

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a9d3cc0..60af8bc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -147,7 +147,6 @@
     <plugin.download.version>1.3.0</plugin.download.version>
     <plugin.deploy.version>2.8.2</plugin.deploy.version>
     <plugin.shade.version>3.1.1</plugin.shade.version>
-    <plugin.fmt.version>2.5.1</plugin.fmt.version>
 
     <PermGen>64m</PermGen>
     <MaxPermGen>512m</MaxPermGen>
@@ -398,6 +397,46 @@
       </plugin>
 
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <version>2.17</version>
+        <configuration>
+          <skip>true</skip>
+          <failOnViolation>false</failOnViolation>
+          <includeTestSourceDirectory>true</includeTestSourceDirectory>
+          <sourceDirectories>${basedir}/src/main/java,${basedir}/src/main/scala</sourceDirectories>
+          <testSourceDirectory>${basedir}/src/test/java</testSourceDirectory>
+          <configLocation>_tools/checkstyle.xml</configLocation>
+          <outputFile>${basedir}/target/checkstyle-output.xml</outputFile>
+          <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
+          <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
+        </configuration>
+        <executions>
+          <execution>
+            <id>checkstyle-fail-build</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+            <configuration>
+              <failOnViolation>true</failOnViolation>
+              <excludes>org/apache/zeppelin/interpreter/thrift/*,org/apache/zeppelin/scio/avro/*,org/apache/zeppelin/python/proto/*</excludes>
+            </configuration>
+          </execution>
+          <execution>
+            <id>checkstyle-gen-html-report</id>
+            <phase>install</phase>
+            <goals>
+              <goal>checkstyle-aggregate</goal>
+            </goals>
+            <configuration>
+              <excludes>org/apache/zeppelin/interpreter/thrift/*,org/apache/zeppelin/scio/avro/*,org/apache/zeppelin/python/proto/*</excludes>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
         <artifactId>maven-resources-plugin</artifactId>
         <version>${plugin.resource.version}</version>
         <executions>
@@ -530,29 +569,14 @@
       </configuration>
     </plugin>
     -->
-      <plugin>
-        <groupId>com.coveo</groupId>
-        <artifactId>fmt-maven-plugin</artifactId>
-      </plugin>
     </plugins>
 
     <pluginManagement>
       <plugins>
         <plugin>
-          <groupId>com.coveo</groupId>
-          <artifactId>fmt-maven-plugin</artifactId>
-          <version>${plugin.fmt.version}</version>
-          <configuration>
-            <displayLimit>10000</displayLimit>
-          </configuration>
-          <executions>
-            <execution>
-              <phase>validate</phase>
-              <goals>
-                <goal>check</goal>
-              </goals>
-            </execution>
-          </executions>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-checkstyle-plugin</artifactId>
+          <version>${plugin.checkstyle.version}</version>
         </plugin>
 
         <plugin>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/python/pom.xml
----------------------------------------------------------------------
diff --git a/python/pom.xml b/python/pom.xml
index b60e423..d11c165 100644
--- a/python/pom.xml
+++ b/python/pom.xml
@@ -175,6 +175,14 @@
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
       </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/python/src/main/java/org/apache/zeppelin/python/IPythonClient.java
----------------------------------------------------------------------
diff --git a/python/src/main/java/org/apache/zeppelin/python/IPythonClient.java b/python/src/main/java/org/apache/zeppelin/python/IPythonClient.java
index 200fcf6..b9c897b 100644
--- a/python/src/main/java/org/apache/zeppelin/python/IPythonClient.java
+++ b/python/src/main/java/org/apache/zeppelin/python/IPythonClient.java
@@ -1,30 +1,25 @@
 /*
- * 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.
- */
+* 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.python;
 
 import io.grpc.ManagedChannel;
 import io.grpc.ManagedChannelBuilder;
 import io.grpc.stub.StreamObserver;
-import java.io.IOException;
-import java.security.SecureRandom;
-import java.util.Iterator;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.zeppelin.interpreter.util.InterpreterOutputStream;
 import org.apache.zeppelin.python.proto.CancelRequest;
@@ -42,7 +37,15 @@ import org.apache.zeppelin.python.proto.StopRequest;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Grpc client for IPython kernel */
+import java.io.IOException;
+import java.security.SecureRandom;
+import java.util.Iterator;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+/**
+ * Grpc client for IPython kernel
+ */
 public class IPythonClient {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(IPythonClient.class.getName());
@@ -53,12 +56,16 @@ public class IPythonClient {
 
   private SecureRandom random = new SecureRandom();
 
-  /** Construct client for accessing RouteGuide server at {@code host:port}. */
+  /**
+   * Construct client for accessing RouteGuide server at {@code host:port}.
+   */
   public IPythonClient(String host, int port) {
     this(ManagedChannelBuilder.forAddress(host, port).usePlaintext(true));
   }
 
-  /** Construct client for accessing RouteGuide server using the existing channel. */
+  /**
+   * Construct client for accessing RouteGuide server using the existing channel.
+   */
   public IPythonClient(ManagedChannelBuilder<?> channelBuilder) {
     channel = channelBuilder.build();
     blockingStub = IPythonGrpc.newBlockingStub(channel);
@@ -71,91 +78,86 @@ public class IPythonClient {
 
   // execute the code and make the output as streaming by writing it to InterpreterOutputStream
   // one by one.
-  public ExecuteResponse stream_execute(
-      ExecuteRequest request, final InterpreterOutputStream interpreterOutput) {
-    final ExecuteResponse.Builder finalResponseBuilder =
-        ExecuteResponse.newBuilder().setStatus(ExecuteStatus.SUCCESS);
+  public ExecuteResponse stream_execute(ExecuteRequest request,
+                                        final InterpreterOutputStream interpreterOutput) {
+    final ExecuteResponse.Builder finalResponseBuilder = ExecuteResponse.newBuilder()
+        .setStatus(ExecuteStatus.SUCCESS);
     final AtomicBoolean completedFlag = new AtomicBoolean(false);
     LOGGER.debug("stream_execute code:\n" + request.getCode());
-    asyncStub.execute(
-        request,
-        new StreamObserver<ExecuteResponse>() {
-          int index = 0;
-          boolean isPreviousOutputImage = false;
-
-          @Override
-          public void onNext(ExecuteResponse executeResponse) {
-            if (executeResponse.getType() == OutputType.TEXT) {
-              try {
-                LOGGER.debug("Interpreter Streaming Output: " + executeResponse.getOutput());
-                if (isPreviousOutputImage) {
-                  // add '\n' when switch from image to text
-                  interpreterOutput.write("\n%text ".getBytes());
-                }
-                isPreviousOutputImage = false;
-                interpreterOutput.write(executeResponse.getOutput().getBytes());
-                interpreterOutput.getInterpreterOutput().flush();
-              } catch (IOException e) {
-                LOGGER.error("Unexpected IOException", e);
-              }
-            }
-            if (executeResponse.getType() == OutputType.IMAGE) {
-              try {
-                LOGGER.debug("Interpreter Streaming Output: IMAGE_DATA");
-                if (index != 0) {
-                  // add '\n' if this is the not the first element. otherwise it would mix the image
-                  // with the text
-                  interpreterOutput.write("\n".getBytes());
-                }
-                interpreterOutput.write(("%img " + executeResponse.getOutput()).getBytes());
-                interpreterOutput.getInterpreterOutput().flush();
-                isPreviousOutputImage = true;
-              } catch (IOException e) {
-                LOGGER.error("Unexpected IOException", e);
-              }
+    asyncStub.execute(request, new StreamObserver<ExecuteResponse>() {
+      int index = 0;
+      boolean isPreviousOutputImage = false;
+
+      @Override
+      public void onNext(ExecuteResponse executeResponse) {
+        if (executeResponse.getType() == OutputType.TEXT) {
+          try {
+            LOGGER.debug("Interpreter Streaming Output: " + executeResponse.getOutput());
+            if (isPreviousOutputImage) {
+              // add '\n' when switch from image to text
+              interpreterOutput.write("\n%text ".getBytes());
             }
-            if (executeResponse.getStatus() == ExecuteStatus.ERROR) {
-              // set the finalResponse to ERROR if any ERROR happens, otherwise the finalResponse
-              // would
-              // be SUCCESS.
-              finalResponseBuilder.setStatus(ExecuteStatus.ERROR);
+            isPreviousOutputImage = false;
+            interpreterOutput.write(executeResponse.getOutput().getBytes());
+            interpreterOutput.getInterpreterOutput().flush();
+          } catch (IOException e) {
+            LOGGER.error("Unexpected IOException", e);
+          }
+        }
+        if (executeResponse.getType() == OutputType.IMAGE) {
+          try {
+            LOGGER.debug("Interpreter Streaming Output: IMAGE_DATA");
+            if (index != 0) {
+              // add '\n' if this is the not the first element. otherwise it would mix the image
+              // with the text
+              interpreterOutput.write("\n".getBytes());
             }
-            index++;
+            interpreterOutput.write(("%img " + executeResponse.getOutput()).getBytes());
+            interpreterOutput.getInterpreterOutput().flush();
+            isPreviousOutputImage = true;
+          } catch (IOException e) {
+            LOGGER.error("Unexpected IOException", e);
           }
+        }
+        if (executeResponse.getStatus() == ExecuteStatus.ERROR) {
+          // set the finalResponse to ERROR if any ERROR happens, otherwise the finalResponse would
+          // be SUCCESS.
+          finalResponseBuilder.setStatus(ExecuteStatus.ERROR);
+        }
+        index++;
+      }
 
-          @Override
-          public void onError(Throwable throwable) {
-            try {
-              interpreterOutput
-                  .getInterpreterOutput()
-                  .write(ExceptionUtils.getStackTrace(throwable));
-              interpreterOutput.getInterpreterOutput().flush();
-            } catch (IOException e) {
-              LOGGER.error("Unexpected IOException", e);
-            }
-            LOGGER.error("Fail to call IPython grpc", throwable);
-            finalResponseBuilder.setStatus(ExecuteStatus.ERROR);
+      @Override
+      public void onError(Throwable throwable) {
+        try {
+          interpreterOutput.getInterpreterOutput().write(ExceptionUtils.getStackTrace(throwable));
+          interpreterOutput.getInterpreterOutput().flush();
+        } catch (IOException e) {
+          LOGGER.error("Unexpected IOException", e);
+        }
+        LOGGER.error("Fail to call IPython grpc", throwable);
+        finalResponseBuilder.setStatus(ExecuteStatus.ERROR);
 
-            completedFlag.set(true);
-            synchronized (completedFlag) {
-              completedFlag.notify();
-            }
-          }
+        completedFlag.set(true);
+        synchronized (completedFlag) {
+          completedFlag.notify();
+        }
+      }
 
-          @Override
-          public void onCompleted() {
-            synchronized (completedFlag) {
-              try {
-                LOGGER.debug("stream_execute is completed");
-                interpreterOutput.getInterpreterOutput().flush();
-              } catch (IOException e) {
-                LOGGER.error("Unexpected IOException", e);
-              }
-              completedFlag.set(true);
-              completedFlag.notify();
-            }
+      @Override
+      public void onCompleted() {
+        synchronized (completedFlag) {
+          try {
+            LOGGER.debug("stream_execute is completed");
+            interpreterOutput.getInterpreterOutput().flush();
+          } catch (IOException e) {
+            LOGGER.error("Unexpected IOException", e);
           }
-        });
+          completedFlag.set(true);
+          completedFlag.notify();
+        }
+      }
+    });
 
     synchronized (completedFlag) {
       if (!completedFlag.get()) {
@@ -202,12 +204,14 @@ public class IPythonClient {
     asyncStub.stop(request, null);
   }
 
+
   public static void main(String[] args) {
     IPythonClient client = new IPythonClient("localhost", 50053);
     client.status(StatusRequest.newBuilder().build());
 
-    ExecuteResponse response =
-        client.block_execute(ExecuteRequest.newBuilder().setCode("abcd=2").build());
+    ExecuteResponse response = client.block_execute(ExecuteRequest.newBuilder().
+        setCode("abcd=2").build());
     System.out.println(response.getOutput());
+
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java
----------------------------------------------------------------------
diff --git a/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java b/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java
index aebed5c..3c646ae 100644
--- a/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java
+++ b/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java
@@ -18,16 +18,6 @@
 package org.apache.zeppelin.python;
 
 import io.grpc.ManagedChannelBuilder;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.nio.file.Files;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
 import org.apache.commons.exec.CommandLine;
 import org.apache.commons.exec.DefaultExecutor;
 import org.apache.commons.exec.ExecuteException;
@@ -62,7 +52,20 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import py4j.GatewayServer;
 
-/** IPython Interpreter for Zeppelin */
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.nio.file.Files;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * IPython Interpreter for Zeppelin
+ */
 public class IPythonInterpreter extends Interpreter implements ExecuteResultHandler {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(IPythonInterpreter.class);
@@ -87,8 +90,8 @@ public class IPythonInterpreter extends Interpreter implements ExecuteResultHand
   }
 
   /**
-   * Sub class can customize the interpreter by adding more python packages under PYTHONPATH. e.g.
-   * PySparkInterpreter
+   * Sub class can customize the interpreter by adding more python packages under PYTHONPATH.
+   * e.g. PySparkInterpreter
    *
    * @param additionalPythonPath
    */
@@ -98,8 +101,8 @@ public class IPythonInterpreter extends Interpreter implements ExecuteResultHand
   }
 
   /**
-   * Sub class can customize the interpreter by running additional python init code. e.g.
-   * PySparkInterpreter
+   * Sub class can customize the interpreter by running additional python init code.
+   * e.g. PySparkInterpreter
    *
    * @param additionalPythonInitFile
    */
@@ -128,22 +131,18 @@ public class IPythonInterpreter extends Interpreter implements ExecuteResultHand
       LOGGER.info("Python Exec: " + pythonExecutable);
       String checkPrerequisiteResult = checkIPythonPrerequisite(pythonExecutable);
       if (!StringUtils.isEmpty(checkPrerequisiteResult)) {
-        throw new InterpreterException(
-            "IPython prerequisite is not meet: " + checkPrerequisiteResult);
+        throw new InterpreterException("IPython prerequisite is not meet: " +
+            checkPrerequisiteResult);
       }
-      ipythonLaunchTimeout =
-          Long.parseLong(getProperty("zeppelin.ipython.launch.timeout", "30000"));
+      ipythonLaunchTimeout = Long.parseLong(
+          getProperty("zeppelin.ipython.launch.timeout", "30000"));
       this.zeppelinContext = buildZeppelinContext();
       int ipythonPort = RemoteInterpreterUtils.findRandomAvailablePortOnAllLocalInterfaces();
       int jvmGatewayPort = RemoteInterpreterUtils.findRandomAvailablePortOnAllLocalInterfaces();
-      int message_size =
-          Integer.parseInt(
-              getProperty("zeppelin.ipython.grpc.message_size", 32 * 1024 * 1024 + ""));
-      ipythonClient =
-          new IPythonClient(
-              ManagedChannelBuilder.forAddress("127.0.0.1", ipythonPort)
-                  .usePlaintext(true)
-                  .maxInboundMessageSize(message_size));
+      int message_size = Integer.parseInt(getProperty("zeppelin.ipython.grpc.message_size",
+          32 * 1024 * 1024 + ""));
+      ipythonClient = new IPythonClient(ManagedChannelBuilder.forAddress("127.0.0.1", ipythonPort)
+          .usePlaintext(true).maxInboundMessageSize(message_size));
       this.usePy4JAuth = Boolean.parseBoolean(getProperty("zeppelin.py4j.useAuth", "true"));
       this.secret = PythonUtils.createSecret(256);
       launchIPythonKernel(ipythonPort);
@@ -154,8 +153,8 @@ public class IPythonInterpreter extends Interpreter implements ExecuteResultHand
   }
 
   /**
-   * non-empty return value mean the errors when checking ipython prerequisite. empty value mean
-   * IPython prerequisite is meet.
+   * non-empty return value mean the errors when checking ipython prerequisite.
+   * empty value mean IPython prerequisite is meet.
    *
    * @param pythonExec
    * @return
@@ -171,7 +170,8 @@ public class IPythonInterpreter extends Interpreter implements ExecuteResultHand
       Process proc = processBuilder.start();
       int ret = proc.waitFor();
       if (ret != 0) {
-        return "Fail to run pip freeze.\n" + IOUtils.toString(new FileInputStream(stderrFile));
+        return "Fail to run pip freeze.\n" +
+            IOUtils.toString(new FileInputStream(stderrFile));
       }
       String freezeOutput = IOUtils.toString(new FileInputStream(stdoutFile));
       if (!freezeOutput.contains("jupyter-client=")) {
@@ -206,34 +206,26 @@ public class IPythonInterpreter extends Interpreter implements ExecuteResultHand
     InputStream input =
         getClass().getClassLoader().getResourceAsStream("grpc/python/zeppelin_python.py");
     List<String> lines = IOUtils.readLines(input);
-    ExecuteResponse response =
-        ipythonClient.block_execute(
-            ExecuteRequest.newBuilder()
-                .setCode(
-                    StringUtils.join(lines, System.lineSeparator())
-                        .replace("${JVM_GATEWAY_PORT}", jvmGatewayPort + "")
-                        .replace("${JVM_GATEWAY_ADDRESS}", serverAddress))
-                .build());
+    ExecuteResponse response = ipythonClient.block_execute(ExecuteRequest.newBuilder()
+        .setCode(StringUtils.join(lines, System.lineSeparator())
+            .replace("${JVM_GATEWAY_PORT}", jvmGatewayPort + "")
+            .replace("${JVM_GATEWAY_ADDRESS}", serverAddress)).build());
     if (response.getStatus() == ExecuteStatus.ERROR) {
       throw new IOException("Fail to setup JVMGateway\n" + response.getOutput());
     }
 
-    input = getClass().getClassLoader().getResourceAsStream("python/zeppelin_context.py");
+    input =
+        getClass().getClassLoader().getResourceAsStream("python/zeppelin_context.py");
     lines = IOUtils.readLines(input);
-    response =
-        ipythonClient.block_execute(
-            ExecuteRequest.newBuilder()
-                .setCode(StringUtils.join(lines, System.lineSeparator()))
-                .build());
+    response = ipythonClient.block_execute(ExecuteRequest.newBuilder()
+        .setCode(StringUtils.join(lines, System.lineSeparator())).build());
     if (response.getStatus() == ExecuteStatus.ERROR) {
       throw new IOException("Fail to import ZeppelinContext\n" + response.getOutput());
     }
 
-    response =
-        ipythonClient.block_execute(
-            ExecuteRequest.newBuilder()
-                .setCode("z = __zeppelin__ = PyZeppelinContext(intp.getZeppelinContext(), gateway)")
-                .build());
+    response = ipythonClient.block_execute(ExecuteRequest.newBuilder()
+        .setCode("z = __zeppelin__ = PyZeppelinContext(intp.getZeppelinContext(), gateway)")
+        .build());
     if (response.getStatus() == ExecuteStatus.ERROR) {
       throw new IOException("Fail to setup ZeppelinContext\n" + response.getOutput());
     }
@@ -241,31 +233,27 @@ public class IPythonInterpreter extends Interpreter implements ExecuteResultHand
     if (additionalPythonInitFile != null) {
       input = getClass().getClassLoader().getResourceAsStream(additionalPythonInitFile);
       lines = IOUtils.readLines(input);
-      response =
-          ipythonClient.block_execute(
-              ExecuteRequest.newBuilder()
-                  .setCode(
-                      StringUtils.join(lines, System.lineSeparator())
-                          .replace("${JVM_GATEWAY_PORT}", jvmGatewayPort + "")
-                          .replace("${JVM_GATEWAY_ADDRESS}", serverAddress))
-                  .build());
+      response = ipythonClient.block_execute(ExecuteRequest.newBuilder()
+          .setCode(StringUtils.join(lines, System.lineSeparator())
+              .replace("${JVM_GATEWAY_PORT}", jvmGatewayPort + "")
+              .replace("${JVM_GATEWAY_ADDRESS}", serverAddress)).build());
       if (response.getStatus() == ExecuteStatus.ERROR) {
-        throw new IOException(
-            "Fail to run additional Python init file: "
-                + additionalPythonInitFile
-                + "\n"
-                + response.getOutput());
+        throw new IOException("Fail to run additional Python init file: "
+            + additionalPythonInitFile + "\n" + response.getOutput());
       }
     }
   }
 
-  private void launchIPythonKernel(int ipythonPort) throws IOException {
+
+  private void launchIPythonKernel(int ipythonPort)
+      throws IOException {
     LOGGER.info("Launching IPython Kernel at port: " + ipythonPort);
     // copy the python scripts to a temp directory, then launch ipython kernel in that folder
     File pythonWorkDir = Files.createTempDirectory("zeppelin_ipython").toFile();
     String[] ipythonScripts = {"ipython_server.py", "ipython_pb2.py", "ipython_pb2_grpc.py"};
     for (String ipythonScript : ipythonScripts) {
-      URL url = getClass().getClassLoader().getResource("grpc/python" + "/" + ipythonScript);
+      URL url = getClass().getClassLoader().getResource("grpc/python"
+          + "/" + ipythonScript);
       FileUtils.copyURLToFile(url, new File(pythonWorkDir, ipythonScript));
     }
 
@@ -279,10 +267,10 @@ public class IPythonInterpreter extends Interpreter implements ExecuteResultHand
     executor.setWatchdog(watchDog);
 
     if (useBuiltinPy4j) {
-      // TODO(zjffdu) don't do hard code on py4j here
+      //TODO(zjffdu) don't do hard code on py4j here
       File py4jDestFile = new File(pythonWorkDir, "py4j-src-0.10.7.zip");
-      FileUtils.copyURLToFile(
-          getClass().getClassLoader().getResource("python/py4j-src-0.10.7.zip"), py4jDestFile);
+      FileUtils.copyURLToFile(getClass().getClassLoader().getResource(
+          "python/py4j-src-0.10.7.zip"), py4jDestFile);
       if (additionalPythonPath != null) {
         // put the py4j at the end, because additionalPythonPath may already contain py4j.
         // e.g. PySparkInterpreter
@@ -318,8 +306,8 @@ public class IPythonInterpreter extends Interpreter implements ExecuteResultHand
       }
 
       if ((System.currentTimeMillis() - startTime) > ipythonLaunchTimeout) {
-        throw new IOException(
-            "Fail to launch IPython Kernel in " + ipythonLaunchTimeout / 1000 + " seconds");
+        throw new IOException("Fail to launch IPython Kernel in " + ipythonLaunchTimeout / 1000
+            + " seconds");
       }
     }
   }
@@ -357,15 +345,15 @@ public class IPythonInterpreter extends Interpreter implements ExecuteResultHand
     zeppelinContext.setInterpreterContext(context);
     interpreterOutput.setInterpreterOutput(context.out);
     ExecuteResponse response =
-        ipythonClient.stream_execute(
-            ExecuteRequest.newBuilder().setCode(st).build(), interpreterOutput);
+        ipythonClient.stream_execute(ExecuteRequest.newBuilder().setCode(st).build(),
+            interpreterOutput);
     try {
       interpreterOutput.getInterpreterOutput().flush();
     } catch (IOException e) {
       throw new RuntimeException("Fail to write output", e);
     }
-    InterpreterResult result =
-        new InterpreterResult(InterpreterResult.Code.valueOf(response.getStatus().name()));
+    InterpreterResult result = new InterpreterResult(
+        InterpreterResult.Code.valueOf(response.getStatus().name()));
     return result;
   }
 
@@ -385,17 +373,14 @@ public class IPythonInterpreter extends Interpreter implements ExecuteResultHand
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+                                                InterpreterContext interpreterContext) {
     LOGGER.debug("Call completion for: " + buf);
     List<InterpreterCompletion> completions = new ArrayList<>();
     CompletionResponse response =
         ipythonClient.complete(
-            CompletionRequest.getDefaultInstance()
-                .newBuilder()
-                .setCode(buf)
-                .setCursor(cursor)
-                .build());
+            CompletionRequest.getDefaultInstance().newBuilder().setCode(buf)
+                .setCursor(cursor).build());
     for (int i = 0; i < response.getMatchesCount(); i++) {
       String match = response.getMatches(i);
       int lastIndexOfDot = match.lastIndexOf(".");


[12/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookRestApiTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookRestApiTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookRestApiTest.java
index a8d6ea2..9d96ee5 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookRestApiTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookRestApiTest.java
@@ -24,18 +24,10 @@ import static org.junit.Assert.assertThat;
 
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
-import java.io.IOException;
-import java.util.Map;
-import java.util.Set;
+
 import org.apache.commons.httpclient.methods.GetMethod;
 import org.apache.commons.httpclient.methods.PostMethod;
 import org.apache.commons.httpclient.methods.PutMethod;
-import org.apache.zeppelin.interpreter.InterpreterResult;
-import org.apache.zeppelin.notebook.Note;
-import org.apache.zeppelin.notebook.Paragraph;
-import org.apache.zeppelin.scheduler.Job;
-import org.apache.zeppelin.server.ZeppelinServer;
-import org.apache.zeppelin.user.AuthenticationInfo;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -43,7 +35,20 @@ import org.junit.FixMethodOrder;
 import org.junit.Test;
 import org.junit.runners.MethodSorters;
 
-/** Zeppelin notebook rest api tests. */
+import java.io.IOException;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.zeppelin.interpreter.InterpreterResult;
+import org.apache.zeppelin.notebook.Note;
+import org.apache.zeppelin.notebook.Paragraph;
+import org.apache.zeppelin.scheduler.Job;
+import org.apache.zeppelin.server.ZeppelinServer;
+import org.apache.zeppelin.user.AuthenticationInfo;
+
+/**
+ * Zeppelin notebook rest api tests.
+ */
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 public class NotebookRestApiTest extends AbstractTestRestApi {
   Gson gson = new Gson();
@@ -73,16 +78,15 @@ public class NotebookRestApiTest extends AbstractTestRestApi {
 
     GetMethod get = httpGet("/notebook/job/" + note1.getId() + "/" + paragraphId);
     assertThat(get, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(get.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     Map<String, Set<String>> paragraphStatus = (Map<String, Set<String>>) resp.get("body");
 
     // Check id and status have proper value
     assertEquals(paragraphStatus.get("id"), paragraphId);
     assertEquals(paragraphStatus.get("status"), "READY");
 
-    // cleanup
+    //cleanup
     ZeppelinServer.notebook.removeNote(note1.getId(), anonymous);
   }
 
@@ -96,9 +100,8 @@ public class NotebookRestApiTest extends AbstractTestRestApi {
     // run blank paragraph
     PostMethod post = httpPost("/notebook/job/" + note1.getId() + "/" + p.getId(), "");
     assertThat(post, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     assertEquals(resp.get("status"), "OK");
     post.releaseConnection();
     assertEquals(p.getStatus(), Job.Status.FINISHED);
@@ -107,14 +110,13 @@ public class NotebookRestApiTest extends AbstractTestRestApi {
     p.setText("test");
     post = httpPost("/notebook/job/" + note1.getId() + "/" + p.getId(), "");
     assertThat(post, isAllowed());
-    resp =
-        gson.fromJson(
-            post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    resp = gson.fromJson(post.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     assertEquals(resp.get("status"), "OK");
     post.releaseConnection();
     assertNotEquals(p.getStatus(), Job.Status.READY);
 
-    // cleanup
+    //cleanup
     ZeppelinServer.notebook.removeNote(note1.getId(), anonymous);
   }
 
@@ -139,9 +141,8 @@ public class NotebookRestApiTest extends AbstractTestRestApi {
 
     PostMethod post = httpPost("/notebook/job/" + note1.getId(), "");
     assertThat(post, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     assertEquals(resp.get("status"), "OK");
     post.releaseConnection();
 
@@ -166,15 +167,13 @@ public class NotebookRestApiTest extends AbstractTestRestApi {
     //
     Paragraph p1 = note1.addNewParagraph(AuthenticationInfo.ANONYMOUS);
     Paragraph p2 = note1.addNewParagraph(AuthenticationInfo.ANONYMOUS);
-    p1.setText(
-        "%python import time\ntime.sleep(1)\nfrom __future__ import print_function\nprint(user2)");
+    p1.setText("%python import time\ntime.sleep(1)\nfrom __future__ import print_function\nprint(user2)");
     p2.setText("%python user2='abc'\nprint(user2)");
 
     PostMethod post = httpPost("/notebook/job/" + note1.getId(), "");
     assertThat(post, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     assertEquals(resp.get("status"), "OK");
     post.releaseConnection();
 
@@ -189,23 +188,21 @@ public class NotebookRestApiTest extends AbstractTestRestApi {
     PostMethod post = httpPost("/notebook/" + note1.getId(), "");
     LOG.info("testCloneNote response\n" + post.getResponseBodyAsString());
     assertThat(post, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     String clonedNoteId = (String) resp.get("body");
     post.releaseConnection();
 
     GetMethod get = httpGet("/notebook/" + clonedNoteId);
     assertThat(get, isAllowed());
-    Map<String, Object> resp2 =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp2 = gson.fromJson(get.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     Map<String, Object> resp2Body = (Map<String, Object>) resp2.get("body");
 
     assertEquals(resp2Body.get("name"), "Note " + clonedNoteId);
     get.releaseConnection();
 
-    // cleanup
+    //cleanup
     ZeppelinServer.notebook.removeNote(note1.getId(), anonymous);
     ZeppelinServer.notebook.removeNote(clonedNoteId, anonymous);
   }
@@ -224,7 +221,7 @@ public class NotebookRestApiTest extends AbstractTestRestApi {
 
     assertEquals(note.getName(), newName);
 
-    // cleanup
+    //cleanup
     ZeppelinServer.notebook.removeNote(noteId, anonymous);
   }
 
@@ -237,13 +234,12 @@ public class NotebookRestApiTest extends AbstractTestRestApi {
     String paragraphId = p.getId();
     String jsonRequest = "{\"colWidth\": 6.0}";
 
-    PutMethod put =
-        httpPut("/notebook/" + noteId + "/paragraph/" + paragraphId + "/config", jsonRequest);
+    PutMethod put = httpPut("/notebook/" + noteId + "/paragraph/" + paragraphId + "/config",
+            jsonRequest);
     assertThat("test testUpdateParagraphConfig:", put, isAllowed());
 
-    Map<String, Object> resp =
-        gson.fromJson(
-            put.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(put.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     Map<String, Object> respBody = (Map<String, Object>) resp.get("body");
     Map<String, Object> config = (Map<String, Object>) respBody.get("config");
     put.releaseConnection();
@@ -252,7 +248,7 @@ public class NotebookRestApiTest extends AbstractTestRestApi {
     note = ZeppelinServer.notebook.getNote(noteId);
     assertEquals(note.getParagraph(paragraphId).getConfig().get("colWidth"), 6.0);
 
-    // cleanup
+    //cleanup
     ZeppelinServer.notebook.removeNote(noteId, anonymous);
   }
 
@@ -261,9 +257,8 @@ public class NotebookRestApiTest extends AbstractTestRestApi {
     // Create note and set result explicitly
     Note note = ZeppelinServer.notebook.createNote(anonymous);
     Paragraph p1 = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
-    InterpreterResult result =
-        new InterpreterResult(
-            InterpreterResult.Code.SUCCESS, InterpreterResult.Type.TEXT, "result");
+    InterpreterResult result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+            InterpreterResult.Type.TEXT, "result");
     p1.setResult(result);
 
     Paragraph p2 = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
@@ -278,22 +273,20 @@ public class NotebookRestApiTest extends AbstractTestRestApi {
     // check if paragraph results are cleared
     GetMethod get = httpGet("/notebook/" + note.getId() + "/paragraph/" + p1.getId());
     assertThat(get, isAllowed());
-    Map<String, Object> resp1 =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp1 = gson.fromJson(get.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     Map<String, Object> resp1Body = (Map<String, Object>) resp1.get("body");
     assertNull(resp1Body.get("result"));
 
     get = httpGet("/notebook/" + note.getId() + "/paragraph/" + p2.getId());
     assertThat(get, isAllowed());
-    Map<String, Object> resp2 =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp2 = gson.fromJson(get.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     Map<String, Object> resp2Body = (Map<String, Object>) resp2.get("body");
     assertNull(resp2Body.get("result"));
     get.releaseConnection();
 
-    // cleanup
+    //cleanup
     ZeppelinServer.notebook.removeNote(note.getId(), anonymous);
   }
 
@@ -334,9 +327,8 @@ public class NotebookRestApiTest extends AbstractTestRestApi {
 
     PostMethod post2 = httpPost("/notebook/job/" + note1.getId(), "");
     assertThat(post2, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            post2.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(post2.getResponseBodyAsString(),
+        new TypeToken<Map<String, Object>>() {}.getType());
     assertEquals(resp.get("status"), "OK");
     post2.releaseConnection();
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookSecurityRestApiTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookSecurityRestApiTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookSecurityRestApiTest.java
index c40a4b4..209a272 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookSecurityRestApiTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookSecurityRestApiTest.java
@@ -24,29 +24,32 @@ import static org.junit.Assert.assertThat;
 
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Map;
+
 import org.apache.commons.httpclient.HttpMethodBase;
 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.zeppelin.notebook.Note;
-import org.apache.zeppelin.server.ZeppelinServer;
 import org.hamcrest.Matcher;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Map;
+
+import org.apache.zeppelin.notebook.Note;
+import org.apache.zeppelin.server.ZeppelinServer;
+
 public class NotebookSecurityRestApiTest extends AbstractTestRestApi {
   Gson gson = new Gson();
 
   @BeforeClass
   public static void init() throws Exception {
     AbstractTestRestApi.startUpWithAuthenticationEnable(
-        NotebookSecurityRestApiTest.class.getSimpleName());
+            NotebookSecurityRestApiTest.class.getSimpleName());
   }
 
   @AfterClass
@@ -56,7 +59,7 @@ public class NotebookSecurityRestApiTest extends AbstractTestRestApi {
 
   @Before
   public void setUp() {}
-
+  
   @Test
   public void testThatUserCanCreateAndRemoveNote() throws IOException {
     String noteId = createNoteForUser("test", "admin", "password1");
@@ -65,50 +68,48 @@ public class NotebookSecurityRestApiTest extends AbstractTestRestApi {
     assertThat(id, is(noteId));
     deleteNoteForUser(noteId, "admin", "password1");
   }
-
+  
   @Test
   public void testThatOtherUserCanAccessNoteIfPermissionNotSet() throws IOException {
     String noteId = createNoteForUser("test", "admin", "password1");
-
+    
     userTryGetNote(noteId, "user1", "password2", isAllowed());
-
+    
     deleteNoteForUser(noteId, "admin", "password1");
   }
-
+  
   @Test
   public void testThatOtherUserCannotAccessNoteIfPermissionSet() throws IOException {
     String noteId = createNoteForUser("test", "admin", "password1");
-
-    // set permission
-    String payload =
-        "{ \"owners\": [\"admin\"], \"readers\": [\"user2\"], "
-            + "\"runners\": [\"user2\"], \"writers\": [\"user2\"] }";
-    PutMethod put = httpPut("/notebook/" + noteId + "/permissions", payload, "admin", "password1");
+    
+    //set permission
+    String payload = "{ \"owners\": [\"admin\"], \"readers\": [\"user2\"], " +
+            "\"runners\": [\"user2\"], \"writers\": [\"user2\"] }";
+    PutMethod put = httpPut("/notebook/" + noteId + "/permissions", payload , "admin", "password1");
     assertThat("test set note permission method:", put, isAllowed());
     put.releaseConnection();
-
+    
     userTryGetNote(noteId, "user1", "password2", isForbidden());
-
+    
     userTryGetNote(noteId, "user2", "password3", isAllowed());
-
+    
     deleteNoteForUser(noteId, "admin", "password1");
   }
-
+  
   @Test
   public void testThatWriterCannotRemoveNote() throws IOException {
     String noteId = createNoteForUser("test", "admin", "password1");
-
-    // set permission
-    String payload =
-        "{ \"owners\": [\"admin\", \"user1\"], \"readers\": [\"user2\"], "
-            + "\"runners\": [\"user2\"], \"writers\": [\"user2\"] }";
-    PutMethod put = httpPut("/notebook/" + noteId + "/permissions", payload, "admin", "password1");
+    
+    //set permission
+    String payload = "{ \"owners\": [\"admin\", \"user1\"], \"readers\": [\"user2\"], " +
+            "\"runners\": [\"user2\"], \"writers\": [\"user2\"] }";
+    PutMethod put = httpPut("/notebook/" + noteId + "/permissions", payload , "admin", "password1");
     assertThat("test set note permission method:", put, isAllowed());
     put.releaseConnection();
-
+    
     userTryRemoveNote(noteId, "user2", "password3", isForbidden());
     userTryRemoveNote(noteId, "user1", "password2", isAllowed());
-
+    
     Note deletedNote = ZeppelinServer.notebook.getNote(noteId);
     assertNull("Deleted note should be null", deletedNote);
   }
@@ -116,14 +117,14 @@ public class NotebookSecurityRestApiTest extends AbstractTestRestApi {
   @Test
   public void testThatUserCanSearchNote() throws IOException {
     String noteId1 = createNoteForUser("test1", "admin", "password1");
-    createParagraphForUser(
-        noteId1, "admin", "password1", "title1", "ThisIsToTestSearchMethodWithPermissions 1");
+    createParagraphForUser(noteId1, "admin", "password1", "title1",
+            "ThisIsToTestSearchMethodWithPermissions 1");
 
     String noteId2 = createNoteForUser("test2", "user1", "password2");
-    createParagraphForUser(
-        noteId1, "admin", "password1", "title2", "ThisIsToTestSearchMethodWithPermissions 2");
+    createParagraphForUser(noteId1, "admin", "password1", "title2",
+            "ThisIsToTestSearchMethodWithPermissions 2");
 
-    // set permission for each note
+    //set permission for each note
     setPermissionForNote(noteId1, "admin", "password1");
     setPermissionForNote(noteId1, "user1", "password2");
 
@@ -133,17 +134,15 @@ public class NotebookSecurityRestApiTest extends AbstractTestRestApi {
     deleteNoteForUser(noteId2, "user1", "password2");
   }
 
-  private void userTryRemoveNote(
-      String noteId, String user, String pwd, Matcher<? super HttpMethodBase> m)
-      throws IOException {
+  private void userTryRemoveNote(String noteId, String user, String pwd,
+          Matcher<? super HttpMethodBase> m) throws IOException {
     DeleteMethod delete = httpDelete(("/notebook/" + noteId), user, pwd);
     assertThat(delete, m);
     delete.releaseConnection();
   }
-
-  private void userTryGetNote(
-      String noteId, String user, String pwd, Matcher<? super HttpMethodBase> m)
-      throws IOException {
+  
+  private void userTryGetNote(String noteId, String user, String pwd,
+          Matcher<? super HttpMethodBase> m) throws IOException {
     GetMethod get = httpGet("/notebook/" + noteId, user, pwd);
     assertThat(get, m);
     get.releaseConnection();
@@ -152,22 +151,20 @@ public class NotebookSecurityRestApiTest extends AbstractTestRestApi {
   private String getNoteIdForUser(String noteId, String user, String pwd) throws IOException {
     GetMethod get = httpGet("/notebook/" + noteId, user, pwd);
     assertThat("test note create method:", get, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(get.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     get.releaseConnection();
     return (String) ((Map<String, Object>) resp.get("body")).get("id");
   }
-
+  
   private String createNoteForUser(String noteName, String user, String pwd) throws IOException {
     String jsonRequest = "{\"name\":\"" + noteName + "\"}";
     PostMethod post = httpPost("/notebook/", jsonRequest, user, pwd);
     assertThat("test note create method:", post, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     post.releaseConnection();
-    String newNoteId = (String) resp.get("body");
+    String newNoteId =  (String) resp.get("body");
     Note newNote = ZeppelinServer.notebook.getNote(newNoteId);
     assertNotNull("Can not find new note by id", newNote);
     return newNoteId;
@@ -184,34 +181,24 @@ public class NotebookSecurityRestApiTest extends AbstractTestRestApi {
     }
   }
 
-  private void createParagraphForUser(
-      String noteId, String user, String pwd, String title, String text) throws IOException {
+  private void createParagraphForUser(String noteId, String user, String pwd,
+          String title, String text) throws IOException {
     String payload = "{\"title\": \"" + title + "\",\"text\": \"" + text + "\"}";
     PostMethod post = httpPost(("/notebook/" + noteId + "/paragraph"), payload, user, pwd);
     post.releaseConnection();
   }
 
   private void setPermissionForNote(String noteId, String user, String pwd) throws IOException {
-    String payload =
-        "{\"owners\":[\""
-            + user
-            + "\"],\"readers\":[\""
-            + user
-            + "\"],\"runners\":[\""
-            + user
-            + "\"],\"writers\":[\""
-            + user
-            + "\"]}";
+    String payload = "{\"owners\":[\"" + user + "\"],\"readers\":[\"" + user +
+            "\"],\"runners\":[\"" + user + "\"],\"writers\":[\"" + user + "\"]}";
     PutMethod put = httpPut(("/notebook/" + noteId + "/permissions"), payload, user, pwd);
     put.releaseConnection();
   }
 
   private void searchNoteBasedOnPermission(String searchText, String user, String pwd)
-      throws IOException {
+          throws IOException{
     GetMethod searchNote = httpGet(("/notebook/search?q=" + searchText), user, pwd);
-    Map<String, Object> respSearchResult =
-        gson.fromJson(
-            searchNote.getResponseBodyAsString(),
+    Map<String, Object> respSearchResult = gson.fromJson(searchNote.getResponseBodyAsString(),
             new TypeToken<Map<String, Object>>() {}.getType());
     ArrayList searchBody = (ArrayList) respSearchResult.get("body");
     assertEquals("At-least one search results is there", true, searchBody.size() >= 1);
@@ -221,9 +208,7 @@ public class NotebookSecurityRestApiTest extends AbstractTestRestApi {
       String userId = searchResult.get("id").split("/", 2)[0];
 
       GetMethod getPermission = httpGet(("/notebook/" + userId + "/permissions"), user, pwd);
-      Map<String, Object> resp =
-          gson.fromJson(
-              getPermission.getResponseBodyAsString(),
+      Map<String, Object> resp = gson.fromJson(getPermission.getResponseBodyAsString(),
               new TypeToken<Map<String, Object>>() {}.getType());
       Map<String, ArrayList> permissions = (Map<String, ArrayList>) resp.get("body");
       ArrayList owners = permissions.get("owners");
@@ -232,13 +217,8 @@ public class NotebookSecurityRestApiTest extends AbstractTestRestApi {
       ArrayList runners = permissions.get("runners");
 
       if (owners.size() != 0 && readers.size() != 0 && writers.size() != 0 && runners.size() != 0) {
-        assertEquals(
-            "User has permissions  ",
-            true,
-            (owners.contains(user)
-                || readers.contains(user)
-                || writers.contains(user)
-                || runners.contains(user)));
+        assertEquals("User has permissions  ", true, (owners.contains(user) ||
+                readers.contains(user) || writers.contains(user) || runners.contains(user)));
       }
       getPermission.releaseConnection();
     }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/rest/SecurityRestApiTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/SecurityRestApiTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/SecurityRestApiTest.java
index 519c25a..c4584b2 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/SecurityRestApiTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/SecurityRestApiTest.java
@@ -18,9 +18,7 @@ package org.apache.zeppelin.rest;
 
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
+
 import org.apache.commons.httpclient.methods.GetMethod;
 import org.hamcrest.CoreMatchers;
 import org.junit.AfterClass;
@@ -29,10 +27,15 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ErrorCollector;
 
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
 public class SecurityRestApiTest extends AbstractTestRestApi {
   Gson gson = new Gson();
 
-  @Rule public ErrorCollector collector = new ErrorCollector();
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
 
   @BeforeClass
   public static void init() throws Exception {
@@ -48,13 +51,13 @@ public class SecurityRestApiTest extends AbstractTestRestApi {
   public void testTicket() throws IOException {
     GetMethod get = httpGet("/security/ticket", "admin", "password1");
     get.addRequestHeader("Origin", "http://localhost");
-    Map<String, Object> resp =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(get.getResponseBodyAsString(),
+        new TypeToken<Map<String, Object>>(){}.getType());
     Map<String, String> body = (Map<String, String>) resp.get("body");
-    collector.checkThat(
-        "Paramater principal", body.get("principal"), CoreMatchers.equalTo("admin"));
-    collector.checkThat("Paramater ticket", body.get("ticket"), CoreMatchers.not("anonymous"));
+    collector.checkThat("Paramater principal", body.get("principal"),
+        CoreMatchers.equalTo("admin"));
+    collector.checkThat("Paramater ticket", body.get("ticket"),
+        CoreMatchers.not("anonymous"));
     get.releaseConnection();
   }
 
@@ -62,22 +65,22 @@ public class SecurityRestApiTest extends AbstractTestRestApi {
   public void testGetUserList() throws IOException {
     GetMethod get = httpGet("/security/userlist/admi", "admin", "password1");
     get.addRequestHeader("Origin", "http://localhost");
-    Map<String, Object> resp =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(get.getResponseBodyAsString(),
+        new TypeToken<Map<String, Object>>(){}.getType());
     List<String> userList = (List) ((Map) resp.get("body")).get("users");
-    collector.checkThat("Search result size", userList.size(), CoreMatchers.equalTo(1));
-    collector.checkThat(
-        "Search result contains admin", userList.contains("admin"), CoreMatchers.equalTo(true));
+    collector.checkThat("Search result size", userList.size(),
+        CoreMatchers.equalTo(1));
+    collector.checkThat("Search result contains admin", userList.contains("admin"),
+        CoreMatchers.equalTo(true));
     get.releaseConnection();
 
     GetMethod notUser = httpGet("/security/userlist/randomString", "admin", "password1");
     notUser.addRequestHeader("Origin", "http://localhost");
-    Map<String, Object> notUserResp =
-        gson.fromJson(
-            notUser.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> notUserResp = gson.fromJson(notUser.getResponseBodyAsString(),
+        new TypeToken<Map<String, Object>>(){}.getType());
     List<String> emptyUserList = (List) ((Map) notUserResp.get("body")).get("users");
-    collector.checkThat("Search result size", emptyUserList.size(), CoreMatchers.equalTo(0));
+    collector.checkThat("Search result size", emptyUserList.size(),
+        CoreMatchers.equalTo(0));
 
     notUser.releaseConnection();
   }
@@ -85,11 +88,12 @@ public class SecurityRestApiTest extends AbstractTestRestApi {
   @Test
   public void testRolesEscaped() throws IOException {
     GetMethod get = httpGet("/security/ticket", "admin", "password1");
-    Map<String, Object> resp =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(get.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>(){}.getType());
     String roles = (String) ((Map) resp.get("body")).get("roles");
-    collector.checkThat("Paramater roles", roles, CoreMatchers.equalTo("[\"admin\"]"));
+    collector.checkThat("Paramater roles", roles,
+            CoreMatchers.equalTo("[\"admin\"]"));
     get.releaseConnection();
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 59f9859..65280f8 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
@@ -26,21 +26,12 @@ import static org.junit.Assert.assertTrue;
 import com.google.common.collect.Sets;
 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 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;
@@ -48,7 +39,21 @@ import org.junit.FixMethodOrder;
 import org.junit.Test;
 import org.junit.runners.MethodSorters;
 
-/** BASIC Zeppelin rest api tests. */
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+
+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.
+ */
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 public class ZeppelinRestApiTest extends AbstractTestRestApi {
   Gson gson = new Gson();
@@ -69,7 +74,9 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     anonymous = new AuthenticationInfo("anonymous");
   }
 
-  /** ROOT API TEST. */
+  /**
+   * ROOT API TEST.
+   **/
   @Test
   public void getApiRoot() throws IOException {
     // when
@@ -99,9 +106,8 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     LOG.info("testGetNoteInfo \n" + get.getResponseBodyAsString());
     assertThat("test note get method:", get, isAllowed());
 
-    Map<String, Object> resp =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(get.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
 
     assertNotNull(resp);
     assertEquals("OK", resp.get("status"));
@@ -130,25 +136,21 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
   public void testNoteCreateWithParagraphs() throws IOException {
     // Call Create Note REST API
     String noteName = "test";
-    String jsonRequest =
-        "{\"name\":\""
-            + noteName
-            + "\", \"paragraphs\": ["
-            + "{\"title\": \"title1\", \"text\": \"text1\"},"
-            + "{\"title\": \"title2\", \"text\": \"text2\"},"
-            + "{\"title\": \"titleConfig\", \"text\": \"text3\", "
-            + "\"config\": {\"colWidth\": 9.0, \"title\": true, "
-            + "\"results\": [{\"graph\": {\"mode\": \"pieChart\"}}] "
-            + "}}]} ";
+    String jsonRequest = "{\"name\":\"" + noteName + "\", \"paragraphs\": [" +
+        "{\"title\": \"title1\", \"text\": \"text1\"}," +
+        "{\"title\": \"title2\", \"text\": \"text2\"}," +
+        "{\"title\": \"titleConfig\", \"text\": \"text3\", " +
+        "\"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<String, Object> resp =
-        gson.fromJson(
-            post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
 
-    String newNoteId = (String) resp.get("body");
+    String newNoteId =  (String) resp.get("body");
     LOG.info("newNoteId:=" + newNoteId);
     Note newNote = ZeppelinServer.notebook.getNote(newNoteId);
     assertNotNull("Can not find new note by id", newNote);
@@ -187,11 +189,10 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     LOG.info("testNoteCreate \n" + post.getResponseBodyAsString());
     assertThat("test note create method:", post, isAllowed());
 
-    Map<String, Object> resp =
-        gson.fromJson(
-            post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
 
-    String newNoteId = (String) resp.get("body");
+    String newNoteId =  (String) resp.get("body");
     LOG.info("newNoteId:=" + newNoteId);
     Note newNote = ZeppelinServer.notebook.getNote(newNoteId);
     assertNotNull("Can not find new note by id", newNote);
@@ -210,7 +211,7 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
   @Test
   public void testDeleteNote() throws IOException {
     LOG.info("testDeleteNote");
-    // Create note and get ID
+    //Create note and get ID
     Note note = ZeppelinServer.notebook.createNote(anonymous);
     String noteId = note.getId();
     testDeleteNote(noteId);
@@ -241,8 +242,8 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     assertThat("test note export method:", get, isAllowed());
 
     Map<String, Object> resp =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+        gson.fromJson(get.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
 
     String exportJSON = (String) resp.get("body");
     assertNotNull("Can not find new notejson", exportJSON);
@@ -273,16 +274,15 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     PostMethod importPost = httpPost("/notebook/import/", oldJson);
     assertThat(importPost, isAllowed());
     resp =
-        gson.fromJson(
-            importPost.getResponseBodyAsString(),
+        gson.fromJson(importPost.getResponseBodyAsString(),
             new TypeToken<Map<String, Object>>() {}.getType());
     String importId = (String) resp.get("body");
 
     assertNotNull("Did not get back a note id in body", importId);
     Note newNote = ZeppelinServer.notebook.getNote(importId);
     assertEquals("Compare note names", noteName, newNote.getName());
-    assertEquals(
-        "Compare paragraphs count", note.getParagraphs().size(), newNote.getParagraphs().size());
+    assertEquals("Compare paragraphs count", note.getParagraphs().size(), newNote.getParagraphs()
+        .size());
     // cleanup
     ZeppelinServer.notebook.removeNote(note.getId(), anonymous);
     ZeppelinServer.notebook.removeNote(newNote.getId(), anonymous);
@@ -294,8 +294,8 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     assertThat(get, isAllowed());
     get.addRequestHeader("Origin", "http://localhost");
     Map<String, Object> resp =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+        gson.fromJson(get.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     assertEquals(200, get.getStatusCode());
     String body = resp.get("body").toString();
     // System.out.println("Body is " + body);
@@ -344,18 +344,17 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     LOG.info("testNoteClone \n" + post.getResponseBodyAsString());
     assertThat("test note clone method:", post, isAllowed());
 
-    Map<String, Object> resp =
-        gson.fromJson(
-            post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
 
-    String newNoteId = (String) resp.get("body");
+    String newNoteId =  (String) resp.get("body");
     LOG.info("newNoteId:=" + newNoteId);
     Note newNote = ZeppelinServer.notebook.getNote(newNoteId);
     assertNotNull("Can not find new note by id", newNote);
     assertEquals("Compare note names", noteName, newNote.getName());
-    assertEquals(
-        "Compare paragraphs count", note.getParagraphs().size(), newNote.getParagraphs().size());
-    // cleanup
+    assertEquals("Compare paragraphs count", note.getParagraphs().size(),
+            newNote.getParagraphs().size());
+    //cleanup
     ZeppelinServer.notebook.removeNote(note.getId(), anonymous);
     ZeppelinServer.notebook.removeNote(newNote.getId(), anonymous);
     post.releaseConnection();
@@ -366,14 +365,13 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     LOG.info("testListNotes");
     GetMethod get = httpGet("/notebook/ ");
     assertThat("List notes method", get, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(get.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     List<Map<String, String>> body = (List<Map<String, String>>) resp.get("body");
-    // TODO(khalid): anonymous or specific user notes?
+    //TODO(khalid): anonymous or specific user notes?
     HashSet<String> anonymous = Sets.newHashSet("anonymous");
-    assertEquals(
-        "List notes are equal", ZeppelinServer.notebook.getAllNotes(anonymous).size(), body.size());
+    assertEquals("List notes are equal", ZeppelinServer.notebook.getAllNotes(anonymous)
+            .size(), body.size());
     get.releaseConnection();
   }
 
@@ -428,7 +426,7 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     deleteParagraph.releaseConnection();
     Thread.sleep(1000);
 
-    // cleanup
+    //cleanup
     ZeppelinServer.notebook.removeNote(note.getId(), anonymous);
   }
 
@@ -458,8 +456,8 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     get.releaseConnection();
 
     LOG.info("test get note job: \n" + responseBody);
-    Map<String, Object> resp =
-        gson.fromJson(responseBody, new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(responseBody,
+            new TypeToken<Map<String, Object>>() {}.getType());
 
     List<Map<String, Object>> paragraphs = (List<Map<String, Object>>) resp.get("body");
     assertEquals(1, paragraphs.size());
@@ -500,10 +498,8 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     note.runAll();
 
     // Call Run paragraph REST API
-    PostMethod postParagraph =
-        httpPost(
-            "/notebook/job/" + noteId + "/" + paragraph.getId(),
-            "{\"params\": {\"param\": \"hello\", \"param2\": \"world\"}}");
+    PostMethod postParagraph = httpPost("/notebook/job/" + noteId + "/" + paragraph.getId(),
+        "{\"params\": {\"param\": \"hello\", \"param2\": \"world\"}}");
     assertThat("test paragraph run:", postParagraph, isAllowed());
     postParagraph.releaseConnection();
     Thread.sleep(1000);
@@ -514,12 +510,12 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     assertEquals("hello", params.get("param"));
     assertEquals("world", params.get("param2"));
 
-    // cleanup
+    //cleanup
     ZeppelinServer.notebook.removeNote(note.getId(), anonymous);
   }
 
   @Test
-  public void testJobs() throws InterruptedException, IOException {
+  public void testJobs() throws InterruptedException, IOException{
     // create a note and a paragraph
     Note note = ZeppelinServer.notebook.createNote(anonymous);
 
@@ -560,7 +556,7 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
   }
 
   @Test
-  public void testCronDisable() throws InterruptedException, IOException {
+  public void testCronDisable() throws InterruptedException, IOException{
     // create a note and a paragraph
     System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_CRON_ENABLE.getVarName(), "false");
     Note note = ZeppelinServer.notebook.createNote(anonymous);
@@ -613,9 +609,7 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
 
     GetMethod getNoteJobs = httpGet("/notebook/job/" + note.getId());
     assertThat("test note jobs run:", getNoteJobs, isAllowed());
-    Map<String, Object> resp =
-        gson.fromJson(
-            getNoteJobs.getResponseBodyAsString(),
+    Map<String, Object> resp = gson.fromJson(getNoteJobs.getResponseBodyAsString(),
             new TypeToken<Map<String, Object>>() {}.getType());
     List<Map<String, String>> body = (List<Map<String, String>>) resp.get("body");
     assertFalse(body.get(0).containsKey("started"));
@@ -635,9 +629,8 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     assertThat("Test insert method:", post, isAllowed());
     post.releaseConnection();
 
-    Map<String, Object> resp =
-        gson.fromJson(
-            post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
 
     String newParagraphId = (String) resp.get("body");
     LOG.info("newParagraphId:=" + newParagraphId);
@@ -663,11 +656,10 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     assertEquals("title2", paragraphAtIdx0.getTitle());
     assertEquals("text2", paragraphAtIdx0.getText());
 
-    // append paragraph providing graph
-    String jsonRequest3 =
-        "{\"title\": \"title3\", \"text\": \"text3\", "
-            + "\"config\": {\"colWidth\": 9.0, \"title\": true, "
-            + "\"results\": [{\"graph\": {\"mode\": \"pieChart\"}}]}}";
+    //append paragraph providing graph
+    String jsonRequest3 = "{\"title\": \"title3\", \"text\": \"text3\", " +
+                          "\"config\": {\"colWidth\": 9.0, \"title\": true, " +
+                          "\"results\": [{\"graph\": {\"mode\": \"pieChart\"}}]}}";
     PostMethod post3 = httpPost("/notebook/" + note.getId() + "/paragraph", jsonRequest3);
     LOG.info("testInsertParagraph response4\n" + post3.getResponseBodyAsString());
     assertThat("Test insert method:", post3, isAllowed());
@@ -691,37 +683,36 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
 
     String jsonRequest = "{\"title\": \"title1\", \"text\": \"text1\"}";
     PostMethod post = httpPost("/notebook/" + note.getId() + "/paragraph", jsonRequest);
-    Map<String, Object> resp =
-        gson.fromJson(
-            post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
     post.releaseConnection();
 
     String newParagraphId = (String) resp.get("body");
-    Paragraph newParagraph =
-        ZeppelinServer.notebook.getNote(note.getId()).getParagraph(newParagraphId);
+    Paragraph newParagraph = ZeppelinServer.notebook.getNote(note.getId())
+            .getParagraph(newParagraphId);
 
     assertEquals("title1", newParagraph.getTitle());
     assertEquals("text1", newParagraph.getText());
 
     String updateRequest = "{\"text\": \"updated text\"}";
-    PutMethod put =
-        httpPut("/notebook/" + note.getId() + "/paragraph/" + newParagraphId, updateRequest);
+    PutMethod put = httpPut("/notebook/" + note.getId() + "/paragraph/" + newParagraphId,
+            updateRequest);
     assertThat("Test update method:", put, isAllowed());
     put.releaseConnection();
 
-    Paragraph updatedParagraph =
-        ZeppelinServer.notebook.getNote(note.getId()).getParagraph(newParagraphId);
+    Paragraph updatedParagraph = ZeppelinServer.notebook.getNote(note.getId())
+            .getParagraph(newParagraphId);
 
     assertEquals("title1", updatedParagraph.getTitle());
     assertEquals("updated text", updatedParagraph.getText());
 
     String updateBothRequest = "{\"title\": \"updated title\", \"text\" : \"updated text 2\" }";
-    PutMethod updatePut =
-        httpPut("/notebook/" + note.getId() + "/paragraph/" + newParagraphId, updateBothRequest);
+    PutMethod updatePut = httpPut("/notebook/" + note.getId() + "/paragraph/" + newParagraphId,
+            updateBothRequest);
     updatePut.releaseConnection();
 
-    Paragraph updatedBothParagraph =
-        ZeppelinServer.notebook.getNote(note.getId()).getParagraph(newParagraphId);
+    Paragraph updatedBothParagraph = ZeppelinServer.notebook.getNote(note.getId())
+            .getParagraph(newParagraphId);
 
     assertEquals("updated title", updatedBothParagraph.getTitle());
     assertEquals("updated text 2", updatedBothParagraph.getText());
@@ -743,9 +734,8 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     assertThat("Test get method: ", get, isAllowed());
     get.releaseConnection();
 
-    Map<String, Object> resp =
-        gson.fromJson(
-            get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> resp = gson.fromJson(get.getResponseBodyAsString(),
+            new TypeToken<Map<String, Object>>() {}.getType());
 
     assertNotNull(resp);
     assertEquals("OK", resp.get("status"));
@@ -773,8 +763,8 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
 
     note.persist(anonymous);
 
-    PostMethod post =
-        httpPost("/notebook/" + note.getId() + "/paragraph/" + p2.getId() + "/move/" + 0, "");
+    PostMethod post = httpPost("/notebook/" + note.getId() + "/paragraph/" + p2.getId() +
+            "/move/" + 0, "");
     assertThat("Test post method: ", post, isAllowed());
     post.releaseConnection();
 
@@ -785,8 +775,8 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     assertEquals(p2.getTitle(), paragraphAtIdx0.getTitle());
     assertEquals(p2.getText(), paragraphAtIdx0.getText());
 
-    PostMethod post2 =
-        httpPost("/notebook/" + note.getId() + "/paragraph/" + p2.getId() + "/move/" + 10, "");
+    PostMethod post2 = httpPost("/notebook/" + note.getId() + "/paragraph/" + p2.getId() +
+            "/move/" + 10, "");
     assertThat("Test post method: ", post2, isBadRequest());
     post.releaseConnection();
 
@@ -817,18 +807,16 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
   @Test
   public void testTitleSearch() throws IOException {
     Note note = ZeppelinServer.notebook.createNote(anonymous);
-    String jsonRequest =
-        "{\"title\": \"testTitleSearchOfParagraph\", "
-            + "\"text\": \"ThisIsToTestSearchMethodWithTitle \"}";
+    String jsonRequest = "{\"title\": \"testTitleSearchOfParagraph\", " +
+            "\"text\": \"ThisIsToTestSearchMethodWithTitle \"}";
     PostMethod postNoteText = httpPost("/notebook/" + note.getId() + "/paragraph", jsonRequest);
     postNoteText.releaseConnection();
 
     GetMethod searchNote = httpGet("/notebook/search?q='testTitleSearchOfParagraph'");
     searchNote.addRequestHeader("Origin", "http://localhost");
-    Map<String, Object> respSearchResult =
-        gson.fromJson(
-            searchNote.getResponseBodyAsString(),
-            new TypeToken<Map<String, Object>>() {}.getType());
+    Map<String, Object> respSearchResult = gson.fromJson(searchNote.getResponseBodyAsString(),
+        new TypeToken<Map<String, Object>>() {
+        }.getType());
     ArrayList searchBody = (ArrayList) respSearchResult.get("body");
 
     int numberOfTitleHits = 0;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinServerTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinServerTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinServerTest.java
index 47e0897..76a0758 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinServerTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinServerTest.java
@@ -17,4 +17,7 @@
 
 package org.apache.zeppelin.rest;
 
-public class ZeppelinServerTest extends AbstractTestRestApi {}
+public class ZeppelinServerTest extends AbstractTestRestApi {
+
+
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinSparkClusterTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinSparkClusterTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinSparkClusterTest.java
index 530bc0d..ec370d4 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinSparkClusterTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinSparkClusterTest.java
@@ -19,6 +19,15 @@ package org.apache.zeppelin.rest;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
+import org.apache.commons.io.FileUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
@@ -27,7 +36,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import org.apache.commons.io.FileUtils;
+
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.display.AngularObject;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -41,26 +50,21 @@ import org.apache.zeppelin.notebook.Paragraph;
 import org.apache.zeppelin.scheduler.Job.Status;
 import org.apache.zeppelin.server.ZeppelinServer;
 import org.apache.zeppelin.user.AuthenticationInfo;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Test against spark cluster. */
+/**
+ * Test against spark cluster.
+ */
 @RunWith(value = Parameterized.class)
 public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(ZeppelinSparkClusterTest.class);
 
-  // This is for only run setupSparkInterpreter one time for each spark version, otherwise
-  // each test method will run setupSparkInterpreter which will cost a long time and may cause
-  // travis
-  // ci timeout.
-  // TODO(zjffdu) remove this after we upgrade it to junit 4.13 (ZEPPELIN-3341)
+  //This is for only run setupSparkInterpreter one time for each spark version, otherwise
+  //each test method will run setupSparkInterpreter which will cost a long time and may cause travis
+  //ci timeout.
+  //TODO(zjffdu) remove this after we upgrade it to junit 4.13 (ZEPPELIN-3341)
   private static Set<String> verifiedSparkVersions = new HashSet<>();
+  
 
   private String sparkVersion;
   private AuthenticationInfo anonymous = new AuthenticationInfo("anonymous");
@@ -78,43 +82,47 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
 
   @Parameterized.Parameters
   public static List<Object[]> data() {
-    return Arrays.asList(new Object[][] {{"2.2.1"}, {"2.1.2"}, {"2.0.2"}, {"1.6.3"}});
+    return Arrays.asList(new Object[][]{
+        {"2.2.1"},
+        {"2.1.2"},
+        {"2.0.2"},
+        {"1.6.3"}
+    });
   }
 
   public void setupSparkInterpreter(String sparkHome) throws InterpreterException {
-    InterpreterSetting sparkIntpSetting =
-        ZeppelinServer.notebook.getInterpreterSettingManager().getInterpreterSettingByName("spark");
+    InterpreterSetting sparkIntpSetting = ZeppelinServer.notebook.getInterpreterSettingManager()
+        .getInterpreterSettingByName("spark");
 
     Map<String, InterpreterProperty> sparkProperties =
         (Map<String, InterpreterProperty>) sparkIntpSetting.getProperties();
     LOG.info("SPARK HOME detected " + sparkHome);
     if (System.getenv("SPARK_MASTER") != null) {
-      sparkProperties.put(
-          "master", new InterpreterProperty("master", System.getenv("SPARK_MASTER")));
+      sparkProperties.put("master",
+          new InterpreterProperty("master", System.getenv("SPARK_MASTER")));
     } else {
       sparkProperties.put("master", new InterpreterProperty("master", "local[2]"));
     }
     sparkProperties.put("SPARK_HOME", new InterpreterProperty("SPARK_HOME", sparkHome));
     sparkProperties.put("spark.master", new InterpreterProperty("spark.master", "local[2]"));
-    sparkProperties.put("spark.cores.max", new InterpreterProperty("spark.cores.max", "2"));
-    sparkProperties.put(
-        "zeppelin.spark.useHiveContext",
+    sparkProperties.put("spark.cores.max",
+        new InterpreterProperty("spark.cores.max", "2"));
+    sparkProperties.put("zeppelin.spark.useHiveContext",
         new InterpreterProperty("zeppelin.spark.useHiveContext", "false"));
-    sparkProperties.put(
-        "zeppelin.pyspark.useIPython",
-        new InterpreterProperty("zeppelin.pyspark.useIPython", "false"));
-    sparkProperties.put(
-        "zeppelin.spark.useNew", new InterpreterProperty("zeppelin.spark.useNew", "true"));
-    sparkProperties.put(
-        "zeppelin.spark.test", new InterpreterProperty("zeppelin.spark.test", "true"));
+    sparkProperties.put("zeppelin.pyspark.useIPython",
+            new InterpreterProperty("zeppelin.pyspark.useIPython", "false"));
+    sparkProperties.put("zeppelin.spark.useNew",
+            new InterpreterProperty("zeppelin.spark.useNew", "true"));
+    sparkProperties.put("zeppelin.spark.test",
+            new InterpreterProperty("zeppelin.spark.test", "true"));
 
     ZeppelinServer.notebook.getInterpreterSettingManager().restart(sparkIntpSetting.getId());
   }
 
   @BeforeClass
   public static void setUp() throws Exception {
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_HELIUM_REGISTRY.getVarName(), "helium");
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HELIUM_REGISTRY.getVarName(),
+            "helium");
     AbstractTestRestApi.startUp(ZeppelinSparkClusterTest.class.getSimpleName());
   }
 
@@ -140,11 +148,15 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
     // create new note
     Note note = ZeppelinServer.notebook.createNote(anonymous);
     Paragraph p = note.addNewParagraph(anonymous);
-    p.setText("%spark import java.util.Date\n" + "import java.net.URL\n" + "println(\"hello\")\n");
+    p.setText("%spark import java.util.Date\n" +
+        "import java.net.URL\n" +
+        "println(\"hello\")\n"
+    );
     note.run(p.getId(), true);
     assertEquals(Status.FINISHED, p.getStatus());
-    assertEquals(
-        "hello\n" + "import java.util.Date\n" + "import java.net.URL\n",
+    assertEquals("hello\n" +
+        "import java.util.Date\n" +
+        "import java.net.URL\n",
         p.getReturn().message().get(0).getData());
 
     p.setText("%spark invalid_code");
@@ -174,19 +186,17 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
     Note note = ZeppelinServer.notebook.createNote(anonymous);
     // test basic dataframe api
     Paragraph p = note.addNewParagraph(anonymous);
-    p.setText("%spark val df=sqlContext.createDataFrame(Seq((\"hello\",20)))\n" + "df.collect()");
+    p.setText("%spark val df=sqlContext.createDataFrame(Seq((\"hello\",20)))\n" +
+        "df.collect()");
     note.run(p.getId(), true);
     assertEquals(Status.FINISHED, p.getStatus());
-    assertTrue(
-        p.getReturn()
-            .message()
-            .get(0)
-            .getData()
-            .contains("Array[org.apache.spark.sql.Row] = Array([hello,20])"));
+    assertTrue(p.getReturn().message().get(0).getData().contains(
+        "Array[org.apache.spark.sql.Row] = Array([hello,20])"));
 
     // test display DataFrame
     p = note.addNewParagraph(anonymous);
-    p.setText("%spark val df=sqlContext.createDataFrame(Seq((\"hello\",20)))\n" + "z.show(df)");
+    p.setText("%spark val df=sqlContext.createDataFrame(Seq((\"hello\",20)))\n" +
+        "z.show(df)");
     note.run(p.getId(), true);
     assertEquals(Status.FINISHED, p.getStatus());
     assertEquals(InterpreterResult.Type.TABLE, p.getReturn().message().get(0).getType());
@@ -195,7 +205,8 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
     // test display DataSet
     if (isSpark2()) {
       p = note.addNewParagraph(anonymous);
-      p.setText("%spark val ds=spark.createDataset(Seq((\"hello\",20)))\n" + "z.show(ds)");
+      p.setText("%spark val ds=spark.createDataset(Seq((\"hello\",20)))\n" +
+          "z.show(ds)");
       note.run(p.getId(), true);
       assertEquals(Status.FINISHED, p.getStatus());
       assertEquals(InterpreterResult.Type.TABLE, p.getReturn().message().get(0).getType());
@@ -212,12 +223,10 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
       sqlContextName = "spark";
     }
     Paragraph p = note.addNewParagraph(anonymous);
-    p.setText(
-        "%spark.r localDF <- data.frame(name=c(\"a\", \"b\", \"c\"), age=c(19, 23, 18))\n"
-            + "df <- createDataFrame("
-            + sqlContextName
-            + ", localDF)\n"
-            + "count(df)");
+    p.setText("%spark.r localDF <- data.frame(name=c(\"a\", \"b\", \"c\"), age=c(19, 23, 18))\n" +
+        "df <- createDataFrame(" + sqlContextName + ", localDF)\n" +
+        "count(df)"
+    );
     note.run(p.getId(), true);
     assertEquals(Status.FINISHED, p.getStatus());
     assertEquals("[1] 3", p.getReturn().message().get(0).getData().trim());
@@ -237,20 +246,18 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
     if (!isSpark2()) {
       // run sqlContext test
       p = note.addNewParagraph(anonymous);
-      p.setText(
-          "%pyspark from pyspark.sql import Row\n"
-              + "df=sqlContext.createDataFrame([Row(id=1, age=20)])\n"
-              + "df.collect()");
+      p.setText("%pyspark from pyspark.sql import Row\n" +
+          "df=sqlContext.createDataFrame([Row(id=1, age=20)])\n" +
+          "df.collect()");
       note.run(p.getId(), true);
       assertEquals(Status.FINISHED, p.getStatus());
       assertEquals("[Row(age=20, id=1)]\n", p.getReturn().message().get(0).getData());
 
       // test display Dataframe
       p = note.addNewParagraph(anonymous);
-      p.setText(
-          "%pyspark from pyspark.sql import Row\n"
-              + "df=sqlContext.createDataFrame([Row(id=1, age=20)])\n"
-              + "z.show(df)");
+      p.setText("%pyspark from pyspark.sql import Row\n" +
+          "df=sqlContext.createDataFrame([Row(id=1, age=20)])\n" +
+          "z.show(df)");
       note.run(p.getId(), true);
       waitForFinish(p);
       assertEquals(Status.FINISHED, p.getStatus());
@@ -260,36 +267,34 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
 
       // test udf
       p = note.addNewParagraph(anonymous);
-      p.setText(
-          "%pyspark sqlContext.udf.register(\"f1\", lambda x: len(x))\n"
-              + "sqlContext.sql(\"select f1(\\\"abc\\\") as len\").collect()");
+      p.setText("%pyspark sqlContext.udf.register(\"f1\", lambda x: len(x))\n" +
+          "sqlContext.sql(\"select f1(\\\"abc\\\") as len\").collect()");
       note.run(p.getId(), true);
       assertEquals(Status.FINISHED, p.getStatus());
-      assertTrue(
-          "[Row(len=u'3')]\n".equals(p.getReturn().message().get(0).getData())
-              || "[Row(len='3')]\n".equals(p.getReturn().message().get(0).getData()));
+      assertTrue("[Row(len=u'3')]\n".equals(p.getReturn().message().get(0).getData()) ||
+          "[Row(len='3')]\n".equals(p.getReturn().message().get(0).getData()));
 
       // test exception
       p = note.addNewParagraph(anonymous);
       /*
-      %pyspark
-      a=1
+       %pyspark
+       a=1
 
-      print(a2)
-      */
+       print(a2)
+       */
       p.setText("%pyspark a=1\n\nprint(a2)");
       note.run(p.getId(), true);
       assertEquals(Status.ERROR, p.getStatus());
-      assertTrue(
-          p.getReturn().message().get(0).getData().contains("Fail to execute line 3: print(a2)"));
-      assertTrue(p.getReturn().message().get(0).getData().contains("name 'a2' is not defined"));
+      assertTrue(p.getReturn().message().get(0).getData()
+          .contains("Fail to execute line 3: print(a2)"));
+      assertTrue(p.getReturn().message().get(0).getData()
+          .contains("name 'a2' is not defined"));
     } else {
       // run SparkSession test
       p = note.addNewParagraph(anonymous);
-      p.setText(
-          "%pyspark from pyspark.sql import Row\n"
-              + "df=sqlContext.createDataFrame([Row(id=1, age=20)])\n"
-              + "df.collect()");
+      p.setText("%pyspark from pyspark.sql import Row\n" +
+          "df=sqlContext.createDataFrame([Row(id=1, age=20)])\n" +
+          "df.collect()");
       note.run(p.getId(), true);
       assertEquals(Status.FINISHED, p.getStatus());
       assertEquals("[Row(age=20, id=1)]\n", p.getReturn().message().get(0).getData());
@@ -297,14 +302,12 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
       // test udf
       p = note.addNewParagraph(anonymous);
       // use SQLContext to register UDF but use this UDF through SparkSession
-      p.setText(
-          "%pyspark sqlContext.udf.register(\"f1\", lambda x: len(x))\n"
-              + "spark.sql(\"select f1(\\\"abc\\\") as len\").collect()");
+      p.setText("%pyspark sqlContext.udf.register(\"f1\", lambda x: len(x))\n" +
+          "spark.sql(\"select f1(\\\"abc\\\") as len\").collect()");
       note.run(p.getId(), true);
       assertEquals(Status.FINISHED, p.getStatus());
-      assertTrue(
-          "[Row(len=u'3')]\n".equals(p.getReturn().message().get(0).getData())
-              || "[Row(len='3')]\n".equals(p.getReturn().message().get(0).getData()));
+      assertTrue("[Row(len=u'3')]\n".equals(p.getReturn().message().get(0).getData()) ||
+          "[Row(len='3')]\n".equals(p.getReturn().message().get(0).getData()));
     }
   }
 
@@ -414,16 +417,11 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
 
     // register global hook & note1 hook
     Paragraph p1 = note.addNewParagraph(anonymous);
-    p1.setText(
-        "%python from __future__ import print_function\n"
-            + "z.registerHook('pre_exec', 'print(1)')\n"
-            + "z.registerHook('post_exec', 'print(2)')\n"
-            + "z.registerNoteHook('pre_exec', 'print(3)', '"
-            + note.getId()
-            + "')\n"
-            + "z.registerNoteHook('post_exec', 'print(4)', '"
-            + note.getId()
-            + "')\n");
+    p1.setText("%python from __future__ import print_function\n" +
+        "z.registerHook('pre_exec', 'print(1)')\n" +
+        "z.registerHook('post_exec', 'print(2)')\n" +
+        "z.registerNoteHook('pre_exec', 'print(3)', '" + note.getId() + "')\n" +
+        "z.registerNoteHook('post_exec', 'print(4)', '" + note.getId() + "')\n");
 
     Paragraph p2 = note.addNewParagraph(anonymous);
     p2.setText("%python print(5)");
@@ -466,15 +464,10 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
     if (isSpark2()) {
       sqlContextName = "spark";
     }
-    p1.setText(
-        "%pyspark\n"
-            + "from pyspark.sql import SQLContext\n"
-            + "print("
-            + sqlContextName
-            + ".read.format('com.databricks.spark.csv')"
-            + ".load('file://"
-            + tmpFile.getAbsolutePath()
-            + "').count())");
+    p1.setText("%pyspark\n" +
+        "from pyspark.sql import SQLContext\n" +
+        "print(" + sqlContextName + ".read.format('com.databricks.spark.csv')" +
+        ".load('file://" + tmpFile.getAbsolutePath() + "').count())");
     note.run(p1.getId(), true);
 
     assertEquals(Status.FINISHED, p1.getStatus());
@@ -506,14 +499,13 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
   public void testSparkZeppelinContextDynamicForms() throws IOException {
     Note note = ZeppelinServer.notebook.createNote(anonymous);
     Paragraph p = note.addNewParagraph(anonymous);
-    String code =
-        "%spark.spark println(z.textbox(\"my_input\", \"default_name\"))\n"
-            + "println(z.password(\"my_pwd\"))\n"
-            + "println(z.select(\"my_select\", \"1\","
-            + "Seq((\"1\", \"select_1\"), (\"2\", \"select_2\"))))\n"
-            + "val items=z.checkbox(\"my_checkbox\", Seq(\"2\"), "
-            + "Seq((\"1\", \"check_1\"), (\"2\", \"check_2\")))\n"
-            + "println(items(0))";
+    String code = "%spark.spark println(z.textbox(\"my_input\", \"default_name\"))\n" +
+        "println(z.password(\"my_pwd\"))\n" +
+        "println(z.select(\"my_select\", \"1\"," +
+        "Seq((\"1\", \"select_1\"), (\"2\", \"select_2\"))))\n" +
+        "val items=z.checkbox(\"my_checkbox\", Seq(\"2\"), " +
+        "Seq((\"1\", \"check_1\"), (\"2\", \"check_2\")))\n" +
+        "println(items(0))";
     p.setText(code);
     note.run(p.getId());
     waitForFinish(p);
@@ -539,14 +531,13 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
   public void testPySparkZeppelinContextDynamicForms() throws IOException {
     Note note = ZeppelinServer.notebook.createNote(anonymous);
     Paragraph p = note.addNewParagraph(anonymous);
-    String code =
-        "%spark.pyspark print(z.input('my_input', 'default_name'))\n"
-            + "print(z.password('my_pwd'))\n"
-            + "print(z.select('my_select', "
-            + "[('1', 'select_1'), ('2', 'select_2')], defaultValue='1'))\n"
-            + "items=z.checkbox('my_checkbox', "
-            + "[('1', 'check_1'), ('2', 'check_2')], defaultChecked=['2'])\n"
-            + "print(items[0])";
+    String code = "%spark.pyspark print(z.input('my_input', 'default_name'))\n" +
+        "print(z.password('my_pwd'))\n" +
+        "print(z.select('my_select', " +
+        "[('1', 'select_1'), ('2', 'select_2')], defaultValue='1'))\n" +
+        "items=z.checkbox('my_checkbox', " +
+        "[('1', 'check_1'), ('2', 'check_2')], defaultChecked=['2'])\n" +
+        "print(items[0])";
     p.setText(code);
     note.run(p.getId(), true);
 
@@ -575,11 +566,8 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
     p1.setText("%spark z.angularBind(\"name\", \"world\")");
     note.run(p1.getId(), true);
     assertEquals(Status.FINISHED, p1.getStatus());
-    List<AngularObject> angularObjects =
-        p1.getBindedInterpreter()
-            .getInterpreterGroup()
-            .getAngularObjectRegistry()
-            .getAll(note.getId(), null);
+    List<AngularObject> angularObjects = p1.getBindedInterpreter().getInterpreterGroup()
+            .getAngularObjectRegistry().getAll(note.getId(), null);
     assertEquals(1, angularObjects.size());
     assertEquals("name", angularObjects.get(0).getName());
     assertEquals("world", angularObjects.get(0).get());
@@ -589,10 +577,7 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
     p2.setText("%spark z.angularUnbind(\"name\")");
     note.run(p2.getId(), true);
     assertEquals(Status.FINISHED, p2.getStatus());
-    angularObjects =
-        p1.getBindedInterpreter()
-            .getInterpreterGroup()
-            .getAngularObjectRegistry()
+    angularObjects = p1.getBindedInterpreter().getInterpreterGroup().getAngularObjectRegistry()
             .getAll(note.getId(), null);
     assertEquals(0, angularObjects.size());
 
@@ -601,11 +586,8 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
     p3.setText("%spark z.angularBindGlobal(\"name2\", \"world2\")");
     note.run(p3.getId(), true);
     assertEquals(Status.FINISHED, p3.getStatus());
-    List<AngularObject> globalAngularObjects =
-        p3.getBindedInterpreter()
-            .getInterpreterGroup()
-            .getAngularObjectRegistry()
-            .getAll(null, null);
+    List<AngularObject> globalAngularObjects = p3.getBindedInterpreter().getInterpreterGroup()
+            .getAngularObjectRegistry().getAll(null, null);
     assertEquals(1, globalAngularObjects.size());
     assertEquals("name2", globalAngularObjects.get(0).getName());
     assertEquals("world2", globalAngularObjects.get(0).get());
@@ -615,11 +597,8 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
     p4.setText("%spark z.angularUnbindGlobal(\"name2\")");
     note.run(p4.getId(), true);
     assertEquals(Status.FINISHED, p4.getStatus());
-    globalAngularObjects =
-        p4.getBindedInterpreter()
-            .getInterpreterGroup()
-            .getAngularObjectRegistry()
-            .getAll(note.getId(), null);
+    globalAngularObjects = p4.getBindedInterpreter().getInterpreterGroup()
+            .getAngularObjectRegistry().getAll(note.getId(), null);
     assertEquals(0, globalAngularObjects.size());
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/security/DirAccessTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/security/DirAccessTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/security/DirAccessTest.java
index 471b3e9..dc281bc 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/security/DirAccessTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/security/DirAccessTest.java
@@ -19,16 +19,17 @@ package org.apache.zeppelin.security;
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.HttpStatus;
 import org.apache.commons.httpclient.methods.GetMethod;
+import org.junit.Test;
+
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.rest.AbstractTestRestApi;
-import org.junit.Test;
 
 public class DirAccessTest extends AbstractTestRestApi {
   @Test
   public void testDirAccessForbidden() throws Exception {
     synchronized (this) {
-      System.setProperty(
-          ZeppelinConfiguration.ConfVars.ZEPPELIN_SERVER_DEFAULT_DIR_ALLOWED.getVarName(), "false");
+      System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_SERVER_DEFAULT_DIR_ALLOWED
+              .getVarName(), "false");
       AbstractTestRestApi.startUp(DirAccessTest.class.getSimpleName());
       HttpClient httpClient = new HttpClient();
       GetMethod getMethod = new GetMethod(getUrlToTest() + "/app/");
@@ -41,8 +42,8 @@ public class DirAccessTest extends AbstractTestRestApi {
   @Test
   public void testDirAccessOk() throws Exception {
     synchronized (this) {
-      System.setProperty(
-          ZeppelinConfiguration.ConfVars.ZEPPELIN_SERVER_DEFAULT_DIR_ALLOWED.getVarName(), "true");
+      System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_SERVER_DEFAULT_DIR_ALLOWED
+              .getVarName(), "true");
       AbstractTestRestApi.startUp(DirAccessTest.class.getSimpleName());
       HttpClient httpClient = new HttpClient();
       GetMethod getMethod = new GetMethod(getUrlToTest() + "/app/");
@@ -60,3 +61,4 @@ public class DirAccessTest extends AbstractTestRestApi {
     return url;
   }
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 e005d4c..0c535b9 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/security/SecurityUtilsTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/security/SecurityUtilsTest.java
@@ -44,7 +44,8 @@ import sun.security.acl.PrincipalImpl;
 @RunWith(PowerMockRunner.class)
 @PrepareForTest(org.apache.shiro.SecurityUtils.class)
 public class SecurityUtilsTest {
-  @Mock org.apache.shiro.subject.Subject subject;
+  @Mock
+  org.apache.shiro.subject.Subject subject;
 
   @Test
   public void isInvalid() throws URISyntaxException, UnknownHostException {
@@ -53,11 +54,9 @@ public class SecurityUtilsTest {
 
   @Test
   public void isInvalidFromConfig()
-      throws URISyntaxException, UnknownHostException, ConfigurationException {
-    assertFalse(
-        SecurityUtils.isValidOrigin(
-            "http://otherinvalidhost.com",
-            new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"))));
+          throws URISyntaxException, UnknownHostException, ConfigurationException {
+    assertFalse(SecurityUtils.isValidOrigin("http://otherinvalidhost.com",
+          new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"))));
   }
 
   @Test
@@ -68,64 +67,54 @@ public class SecurityUtilsTest {
   @Test
   public void isLocalMachine() throws URISyntaxException, UnknownHostException {
     String origin = "http://" + InetAddress.getLocalHost().getHostName();
-    assertTrue(
-        "Origin " + origin + " is not allowed. Please check your hostname.",
-        SecurityUtils.isValidOrigin(origin, ZeppelinConfiguration.create()));
+    assertTrue("Origin " + origin + " is not allowed. Please check your hostname.",
+               SecurityUtils.isValidOrigin(origin, ZeppelinConfiguration.create()));
   }
 
   @Test
   public void isValidFromConfig()
-      throws URISyntaxException, UnknownHostException, ConfigurationException {
-    assertTrue(
-        SecurityUtils.isValidOrigin(
-            "http://otherhost.com",
-            new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"))));
+          throws URISyntaxException, UnknownHostException, ConfigurationException {
+    assertTrue(SecurityUtils.isValidOrigin("http://otherhost.com",
+           new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"))));
   }
 
   @Test
   public void isValidFromStar()
-      throws URISyntaxException, UnknownHostException, ConfigurationException {
-    assertTrue(
-        SecurityUtils.isValidOrigin(
-            "http://anyhost.com",
-            new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site-star.xml"))));
+          throws URISyntaxException, UnknownHostException, ConfigurationException {
+    assertTrue(SecurityUtils.isValidOrigin("http://anyhost.com",
+           new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site-star.xml"))));
   }
 
   @Test
-  public void nullOrigin() throws URISyntaxException, UnknownHostException, ConfigurationException {
-    assertFalse(
-        SecurityUtils.isValidOrigin(
-            null, new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"))));
+  public void nullOrigin()
+          throws URISyntaxException, UnknownHostException, ConfigurationException {
+    assertFalse(SecurityUtils.isValidOrigin(null,
+          new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"))));
   }
 
   @Test
   public void nullOriginWithStar()
-      throws URISyntaxException, UnknownHostException, ConfigurationException {
-    assertTrue(
-        SecurityUtils.isValidOrigin(
-            null,
-            new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site-star.xml"))));
+          throws URISyntaxException, UnknownHostException, ConfigurationException {
+    assertTrue(SecurityUtils.isValidOrigin(null,
+        new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site-star.xml"))));
   }
 
   @Test
   public void emptyOrigin()
-      throws URISyntaxException, UnknownHostException, ConfigurationException {
-    assertFalse(
-        SecurityUtils.isValidOrigin(
-            "", new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"))));
+          throws URISyntaxException, UnknownHostException, ConfigurationException {
+    assertFalse(SecurityUtils.isValidOrigin("",
+          new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"))));
   }
 
   @Test
   public void notAURIOrigin()
-      throws URISyntaxException, UnknownHostException, ConfigurationException {
-    assertFalse(
-        SecurityUtils.isValidOrigin(
-            "test123",
-            new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"))));
+          throws URISyntaxException, UnknownHostException, ConfigurationException {
+    assertFalse(SecurityUtils.isValidOrigin("test123",
+          new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml"))));
   }
 
   @Test
-  public void canGetPrincipalName() {
+  public void canGetPrincipalName()  {
     String expectedName = "java.security.Principal.getName()";
     setupPrincipalName(expectedName);
     assertEquals(expectedName, SecurityUtils.getPrincipal());
@@ -134,11 +123,11 @@ public class SecurityUtilsTest {
   @Test
   public void testUsernameForceLowerCase() throws IOException, InterruptedException {
     String expectedName = "java.security.Principal.getName()";
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_USERNAME_FORCE_LOWERCASE.getVarName(),
-        String.valueOf(true));
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_USERNAME_FORCE_LOWERCASE
+        .getVarName(), String.valueOf(true));
     setupPrincipalName(expectedName);
     assertEquals(expectedName.toLowerCase(), SecurityUtils.getPrincipal());
+
   }
 
   private void setupPrincipalName(String expectedName) {
@@ -170,4 +159,6 @@ public class SecurityUtilsTest {
     modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
     field.set(null, newValue);
   }
+
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/server/CorsFilterTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/server/CorsFilterTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/server/CorsFilterTest.java
index da9decd..ff713ea 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/server/CorsFilterTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/server/CorsFilterTest.java
@@ -21,17 +21,21 @@ import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
+import org.junit.Assert;
+import org.junit.Test;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
 import java.io.IOException;
+
 import javax.servlet.FilterChain;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import org.junit.Assert;
-import org.junit.Test;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
 
-/** Basic CORS REST API tests. */
+/**
+ * Basic CORS REST API tests.
+ */
 public class CorsFilterTest {
   public static String[] headers = new String[8];
   public static Integer count = 0;
@@ -48,17 +52,14 @@ public class CorsFilterTest {
     when(mockRequest.getServerName()).thenReturn("localhost");
     count = 0;
 
-    doAnswer(
-            new Answer() {
-              @Override
-              public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
-                headers[count] = invocationOnMock.getArguments()[1].toString();
-                count++;
-                return null;
-              }
-            })
-        .when(mockResponse)
-        .setHeader(anyString(), anyString());
+    doAnswer(new Answer() {
+        @Override
+        public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
+            headers[count] = invocationOnMock.getArguments()[1].toString();
+            count++;
+            return null;
+        }
+    }).when(mockResponse).setHeader(anyString(), anyString());
 
     filter.doFilter(mockRequest, mockResponse, mockedFilterChain);
     Assert.assertTrue(headers[0].equals("http://localhost:8080"));
@@ -75,17 +76,14 @@ public class CorsFilterTest {
     when(mockRequest.getMethod()).thenReturn("Empty");
     when(mockRequest.getServerName()).thenReturn("evillocalhost");
 
-    doAnswer(
-            new Answer() {
-              @Override
-              public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
-                headers[count] = invocationOnMock.getArguments()[1].toString();
-                count++;
-                return null;
-              }
-            })
-        .when(mockResponse)
-        .setHeader(anyString(), anyString());
+    doAnswer(new Answer() {
+        @Override
+        public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
+            headers[count] = invocationOnMock.getArguments()[1].toString();
+            count++;
+            return null;
+        }
+    }).when(mockResponse).setHeader(anyString(), anyString());
 
     filter.doFilter(mockRequest, mockResponse, mockedFilterChain);
     Assert.assertTrue(headers[0].equals(""));

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/test/java/org/apache/zeppelin/service/ConfigurationServiceTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/service/ConfigurationServiceTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/service/ConfigurationServiceTest.java
index f94c573..ee4f4fc 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/service/ConfigurationServiceTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/service/ConfigurationServiceTest.java
@@ -15,17 +15,9 @@
  * limitations under the License.
  */
 
-package org.apache.zeppelin.service;
 
-import static junit.framework.TestCase.assertTrue;
-import static org.junit.Assert.assertFalse;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.verify;
+package org.apache.zeppelin.service;
 
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Map;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.rest.AbstractTestRestApi;
 import org.apache.zeppelin.server.ZeppelinServer;
@@ -34,6 +26,16 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Map;
+
+import static junit.framework.TestCase.assertTrue;
+import static org.junit.Assert.assertFalse;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.verify;
+
 public class ConfigurationServiceTest extends AbstractTestRestApi {
 
   private static ConfigurationService configurationService;
@@ -45,8 +47,8 @@ public class ConfigurationServiceTest extends AbstractTestRestApi {
 
   @BeforeClass
   public static void setUp() throws Exception {
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_HELIUM_REGISTRY.getVarName(), "helium");
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HELIUM_REGISTRY.getVarName(),
+        "helium");
     AbstractTestRestApi.startUp(ConfigurationServiceTest.class.getSimpleName());
     configurationService = ZeppelinServer.notebookWsServer.getConfigurationService();
   }


[35/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
index c793fa4..030ddeb 100644
--- a/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
@@ -17,12 +17,14 @@
 
 package org.apache.zeppelin;
 
+
 import com.google.common.base.Function;
-import java.io.File;
-import java.util.concurrent.TimeUnit;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.io.FileUtils;
 import org.openqa.selenium.*;
+import org.openqa.selenium.logging.LogEntries;
+import org.openqa.selenium.logging.LogEntry;
+import org.openqa.selenium.logging.LogType;
 import org.openqa.selenium.support.ui.ExpectedConditions;
 import org.openqa.selenium.support.ui.FluentWait;
 import org.openqa.selenium.support.ui.Wait;
@@ -30,36 +32,33 @@ import org.openqa.selenium.support.ui.WebDriverWait;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public abstract class AbstractZeppelinIT {
+import java.io.File;
+import java.util.Date;
+import java.util.concurrent.TimeUnit;
+
+abstract public class AbstractZeppelinIT {
   protected static WebDriver driver;
 
-  protected static final Logger LOG = LoggerFactory.getLogger(AbstractZeppelinIT.class);
+  protected final static Logger LOG = LoggerFactory.getLogger(AbstractZeppelinIT.class);
   protected static final long MIN_IMPLICIT_WAIT = 5;
   protected static final long MAX_IMPLICIT_WAIT = 30;
   protected static final long MAX_BROWSER_TIMEOUT_SEC = 30;
   protected static final long MAX_PARAGRAPH_TIMEOUT_SEC = 120;
 
   protected void setTextOfParagraph(int paragraphNo, String text) {
-    String editorId =
-        driver
-            .findElement(
-                By.xpath(getParagraphXPath(paragraphNo) + "//div[contains(@class, 'editor')]"))
-            .getAttribute("id");
+    String editorId = driver.findElement(By.xpath(getParagraphXPath(paragraphNo) + "//div[contains(@class, 'editor')]")).getAttribute("id");
     if (driver instanceof JavascriptExecutor) {
-      ((JavascriptExecutor) driver)
-          .executeScript("ace.edit('" + editorId + "'). setValue('" + text + "')");
+      ((JavascriptExecutor) driver).executeScript("ace.edit('" + editorId + "'). setValue('" + text + "')");
     } else {
       throw new IllegalStateException("This driver does not support JavaScript!");
     }
   }
 
   protected void runParagraph(int paragraphNo) {
-    driver
-        .findElement(
-            By.xpath(getParagraphXPath(paragraphNo) + "//span[@class='icon-control-play']"))
-        .click();
+    driver.findElement(By.xpath(getParagraphXPath(paragraphNo) + "//span[@class='icon-control-play']")).click();
   }
 
+
   protected String getParagraphXPath(int paragraphNo) {
     return "(//div[@ng-controller=\"ParagraphCtrl\"])[" + paragraphNo + "]";
   }
@@ -69,19 +68,15 @@ public abstract class AbstractZeppelinIT {
   }
 
   protected boolean waitForParagraph(final int paragraphNo, final String state) {
-    By locator =
-        By.xpath(
-            getParagraphXPath(paragraphNo)
-                + "//div[contains(@class, 'control')]//span[2][contains(.,'"
-                + state
-                + "')]");
+    By locator = By.xpath(getParagraphXPath(paragraphNo)
+        + "//div[contains(@class, 'control')]//span[2][contains(.,'" + state + "')]");
     WebElement element = pollingWait(locator, MAX_PARAGRAPH_TIMEOUT_SEC);
     return element.isDisplayed();
   }
 
   protected String getParagraphStatus(final int paragraphNo) {
-    By locator =
-        By.xpath(getParagraphXPath(paragraphNo) + "//div[contains(@class, 'control')]/span[2]");
+    By locator = By.xpath(getParagraphXPath(paragraphNo)
+        + "//div[contains(@class, 'control')]/span[2]");
 
     return driver.findElement(locator).getText();
   }
@@ -96,24 +91,21 @@ public abstract class AbstractZeppelinIT {
   }
 
   protected WebElement pollingWait(final By locator, final long timeWait) {
-    Wait<WebDriver> wait =
-        new FluentWait<>(driver)
-            .withTimeout(timeWait, TimeUnit.SECONDS)
-            .pollingEvery(1, TimeUnit.SECONDS)
-            .ignoring(NoSuchElementException.class);
-
-    return wait.until(
-        new Function<WebDriver, WebElement>() {
-          public WebElement apply(WebDriver driver) {
-            return driver.findElement(locator);
-          }
-        });
+    Wait<WebDriver> wait = new FluentWait<>(driver)
+        .withTimeout(timeWait, TimeUnit.SECONDS)
+        .pollingEvery(1, TimeUnit.SECONDS)
+        .ignoring(NoSuchElementException.class);
+
+    return wait.until(new Function<WebDriver, WebElement>() {
+      public WebElement apply(WebDriver driver) {
+        return driver.findElement(locator);
+      }
+    });
   }
 
   protected void createNewNote() {
-    clickAndWait(
-        By.xpath(
-            "//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" + " note')]"));
+    clickAndWait(By.xpath("//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" +
+        " note')]"));
 
     WebDriverWait block = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
     block.until(ExpectedConditions.visibilityOfElementLocated(By.id("noteCreateModal")));
@@ -123,18 +115,11 @@ public abstract class AbstractZeppelinIT {
 
   protected void deleteTestNotebook(final WebDriver driver) {
     WebDriverWait block = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
-    driver
-        .findElement(By.xpath(".//*[@id='main']//button[@ng-click='moveNoteToTrash(note.id)']"))
+    driver.findElement(By.xpath(".//*[@id='main']//button[@ng-click='moveNoteToTrash(note.id)']"))
         .sendKeys(Keys.ENTER);
-    block.until(
-        ExpectedConditions.visibilityOfElementLocated(
-            By.xpath(".//*[@id='main']//button[@ng-click='moveNoteToTrash(note.id)']")));
-    driver
-        .findElement(
-            By.xpath(
-                "//div[@class='modal-dialog'][contains(.,'This note will be moved to trash')]"
-                    + "//div[@class='modal-footer']//button[contains(.,'OK')]"))
-        .click();
+    block.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(".//*[@id='main']//button[@ng-click='moveNoteToTrash(note.id)']")));
+    driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'This note will be moved to trash')]" +
+        "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
     ZeppelinITUtils.sleep(100, false);
   }
 
@@ -146,9 +131,8 @@ public abstract class AbstractZeppelinIT {
   protected void handleException(String message, Exception e) throws Exception {
     LOG.error(message, e);
     File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
-    LOG.error(
-        "ScreenShot::\ndata:image/png;base64,"
-            + new String(Base64.encodeBase64(FileUtils.readFileToByteArray(scrFile))));
+    LOG.error("ScreenShot::\ndata:image/png;base64," + new String(Base64.encodeBase64(FileUtils.readFileToByteArray(scrFile))));
     throw e;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-integration/src/test/java/org/apache/zeppelin/CommandExecutor.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/CommandExecutor.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/CommandExecutor.java
index 3f5275e..6a55f3e 100644
--- a/zeppelin-integration/src/test/java/org/apache/zeppelin/CommandExecutor.java
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/CommandExecutor.java
@@ -17,17 +17,18 @@
 
 package org.apache.zeppelin;
 
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class CommandExecutor {
 
-  public static final Logger LOG = LoggerFactory.getLogger(CommandExecutor.class);
+  public final static Logger LOG = LoggerFactory.getLogger(CommandExecutor.class);
 
   public enum IGNORE_ERRORS {
     TRUE,
@@ -38,11 +39,7 @@ public class CommandExecutor {
 
   private static IGNORE_ERRORS DEFAULT_BEHAVIOUR_ON_ERRORS = IGNORE_ERRORS.TRUE;
 
-  public static Object executeCommandLocalHost(
-      String[] command,
-      boolean printToConsole,
-      ProcessData.Types_Of_Data type,
-      IGNORE_ERRORS ignore_errors) {
+  public static Object executeCommandLocalHost(String[] command, boolean printToConsole, ProcessData.Types_Of_Data type, IGNORE_ERRORS ignore_errors) {
     List<String> subCommandsAsList = new ArrayList<>(Arrays.asList(command));
     String mergedCommand = StringUtils.join(subCommandsAsList, " ");
 
@@ -60,20 +57,18 @@ public class CommandExecutor {
     Object output_of_process = data_of_process.getData(type);
     int exit_code = data_of_process.getExitCodeValue();
 
-    if (!printToConsole) LOG.trace(output_of_process.toString());
-    else LOG.debug(output_of_process.toString());
+    if (!printToConsole)
+      LOG.trace(output_of_process.toString());
+    else
+      LOG.debug(output_of_process.toString());
     if (ignore_errors == IGNORE_ERRORS.FALSE && exit_code != NORMAL_EXIT) {
-      LOG.error(
-          String.format(
-              "*********************Command '%s' failed with exitcode %s *********************",
-              mergedCommand, exit_code));
+      LOG.error(String.format("*********************Command '%s' failed with exitcode %s *********************", mergedCommand, exit_code));
     }
     return output_of_process;
   }
 
-  public static Object executeCommandLocalHost(
-      String command, boolean printToConsole, ProcessData.Types_Of_Data type) {
-    return executeCommandLocalHost(
-        new String[] {"bash", "-c", command}, printToConsole, type, DEFAULT_BEHAVIOUR_ON_ERRORS);
+  public static Object executeCommandLocalHost(String command, boolean printToConsole, ProcessData.Types_Of_Data type) {
+    return executeCommandLocalHost(new String[]{"bash", "-c", command}, printToConsole, type, DEFAULT_BEHAVIOUR_ON_ERRORS);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-integration/src/test/java/org/apache/zeppelin/ProcessData.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/ProcessData.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/ProcessData.java
index 325298e..2a05b1f 100644
--- a/zeppelin-integration/src/test/java/org/apache/zeppelin/ProcessData.java
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/ProcessData.java
@@ -17,6 +17,7 @@
 
 package org.apache.zeppelin;
 
+
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
@@ -36,14 +37,13 @@ public class ProcessData {
     PROCESS_DATA_OBJECT
   }
 
-  public static final Logger LOG = LoggerFactory.getLogger(ProcessData.class);
+  public final static Logger LOG = LoggerFactory.getLogger(ProcessData.class);
 
   private Process checked_process;
   private boolean printToConsole = false;
   private boolean removeRedundantOutput = true;
 
-  public ProcessData(
-      Process connected_process, boolean printToConsole, int silenceTimeout, TimeUnit timeUnit) {
+  public ProcessData(Process connected_process, boolean printToConsole, int silenceTimeout, TimeUnit timeUnit) {
     this.checked_process = connected_process;
     this.printToConsole = printToConsole;
     this.silenceTimeout = TimeUnit.MILLISECONDS.convert(silenceTimeout, timeUnit);
@@ -65,6 +65,7 @@ public class ProcessData {
     this.printToConsole = true;
   }
 
+
   boolean returnCodeRetrieved = false;
 
   private String outPutStream = null;
@@ -83,33 +84,27 @@ public class ProcessData {
   }
 
   public Object getData(Types_Of_Data type) {
-    // TODO get rid of Pseudo-terminal will not be allocated because stdin is not a terminal.
+    //TODO get rid of Pseudo-terminal will not be allocated because stdin is not a terminal.
     switch (type) {
-      case OUTPUT:
-        {
-          return this.getOutPutStream();
-        }
-      case ERROR:
-        {
-          return this.getErrorStream();
-        }
-      case EXIT_CODE:
-        {
-          return this.getExitCodeValue();
-        }
-      case STREAMS_MERGED:
-        {
-          return this.getOutPutStream() + "\n" + this.getErrorStream();
-        }
-      case PROCESS_DATA_OBJECT:
-        {
-          this.getErrorStream();
-          return this;
-        }
-      default:
-        {
-          throw new IllegalArgumentException("Data Type " + type + " not supported yet!");
-        }
+      case OUTPUT: {
+        return this.getOutPutStream();
+      }
+      case ERROR: {
+        return this.getErrorStream();
+      }
+      case EXIT_CODE: {
+        return this.getExitCodeValue();
+      }
+      case STREAMS_MERGED: {
+        return this.getOutPutStream() + "\n" + this.getErrorStream();
+      }
+      case PROCESS_DATA_OBJECT: {
+        this.getErrorStream();
+        return this;
+      }
+      default: {
+        throw new IllegalArgumentException("Data Type " + type + " not supported yet!");
+      }
     }
   }
 
@@ -122,8 +117,7 @@ public class ProcessData {
         this.checked_process.destroy();
       }
     } catch (Exception inter) {
-      throw new RuntimeException(
-          "Couldn't finish waiting for process " + this.checked_process + " termination", inter);
+      throw new RuntimeException("Couldn't finish waiting for process " + this.checked_process + " termination", inter);
     }
     return this.returnCode;
   }
@@ -133,17 +127,12 @@ public class ProcessData {
       try {
         buildOutputAndErrorStreamData();
       } catch (Exception e) {
-        throw new RuntimeException(
-            "Couldn't retrieve Output Stream data from process: " + this.checked_process.toString(),
-            e);
+        throw new RuntimeException("Couldn't retrieve Output Stream data from process: " + this.checked_process.toString(), e);
+
       }
     }
-    this.outPutStream =
-        this.outPutStream.replace(
-            "Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
-    this.errorStream =
-        this.errorStream.replace(
-            "Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
+    this.outPutStream = this.outPutStream.replace("Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
+    this.errorStream = this.errorStream.replace("Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
     return this.outPutStream;
   }
 
@@ -152,17 +141,12 @@ public class ProcessData {
       try {
         buildOutputAndErrorStreamData();
       } catch (Exception e) {
-        throw new RuntimeException(
-            "Couldn't retrieve Error Stream data from process: " + this.checked_process.toString(),
-            e);
+        throw new RuntimeException("Couldn't retrieve Error Stream data from process: " + this.checked_process.toString(), e);
+
       }
     }
-    this.outPutStream =
-        this.outPutStream.replace(
-            "Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
-    this.errorStream =
-        this.errorStream.replace(
-            "Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
+    this.outPutStream = this.outPutStream.replace("Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
+    this.errorStream = this.errorStream.replace("Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
     return this.errorStream;
   }
 
@@ -183,58 +167,35 @@ public class ProcessData {
       InputStream inErrors = this.checked_process.getErrorStream();
       BufferedReader inReader = new BufferedReader(new InputStreamReader(in));
       BufferedReader inReaderErrors = new BufferedReader(new InputStreamReader(inErrors));
-      LOG.trace(
-          "Started retrieving data from streams of attached process: " + this.checked_process);
+      LOG.trace("Started retrieving data from streams of attached process: " + this.checked_process);
 
-      long lastStreamDataTime =
-          System
-              .currentTimeMillis(); // Store start time to be able to finish method if command hangs
-      long unconditionalExitTime =
-          System.currentTimeMillis()
-              + TimeUnit.MILLISECONDS.convert(
-                  unconditionalExitDelayMinutes,
-                  TimeUnit
-                      .MINUTES); // Stop after 'unconditionalExitDelayMinutes' even if process is
-      // alive and sending output
+      long lastStreamDataTime = System.currentTimeMillis();   //Store start time to be able to finish method if command hangs
+      long unconditionalExitTime = System.currentTimeMillis() + TimeUnit.MILLISECONDS.convert(unconditionalExitDelayMinutes, TimeUnit.MINUTES); // Stop after 'unconditionalExitDelayMinutes' even if process is alive and sending output
       final int BUFFER_LEN = 300;
-      char charBuffer[] =
-          new char[BUFFER_LEN]; // Use char buffer to read output, size can be tuned.
-      boolean outputProduced = true; // Flag to check if previous iteration produced any output
-      while (isRunning(this.checked_process)
-          || outputProduced) { // Continue if process is alive or some output was produced on
-        // previous iteration and there may be still some data to read.
+      char charBuffer[] = new char[BUFFER_LEN];     //Use char buffer to read output, size can be tuned.
+      boolean outputProduced = true;                //Flag to check if previous iteration produced any output
+      while (isRunning(this.checked_process) || outputProduced) {   //Continue if process is alive or some output was produced on previous iteration and there may be still some data to read.
         outputProduced = false;
-        ZeppelinITUtils.sleep(
-            100,
-            false); // Some local commands can exit fast, but immediate stream reading will give no
-        // output and after iteration, 'while' condition will be false so we will not
-        // read out any output while it is still there, just need to wait for some time
-        // for it to appear in streams.
+        ZeppelinITUtils.sleep(100, false);                                  //Some local commands can exit fast, but immediate stream reading will give no output and after iteration, 'while' condition will be false so we will not read out any output while it is still there, just need to wait for some time for it to appear in streams.
 
         StringBuilder tempSB = new StringBuilder();
         while (inReader.ready()) {
-          tempSB.setLength(0); // clean temporary StringBuilder
-          int readCount =
-              inReader.read(charBuffer, 0, BUFFER_LEN); // read up to 'BUFFER_LEN' chars to buffer
-          if (readCount < 1) { // if nothing read or error occurred
+          tempSB.setLength(0);                                // clean temporary StringBuilder
+          int readCount = inReader.read(charBuffer, 0, BUFFER_LEN); //read up to 'BUFFER_LEN' chars to buffer
+          if (readCount < 1) {                                     // if nothing read or error occurred
             break;
           }
           tempSB.append(charBuffer, 0, readCount);
 
           sbInStream.append(tempSB);
           if (tempSB.length() > 0) {
-            outputProduced =
-                true; // set flag to know that we read something and there may be moire data, even
-            // if process already exited
+            outputProduced = true;                                //set flag to know that we read something and there may be moire data, even if process already exited
           }
 
-          lastStreamDataTime =
-              System
-                  .currentTimeMillis(); // remember last time data was read from streams to be sure
-          // we are not looping infinitely
+          lastStreamDataTime = System.currentTimeMillis();        //remember last time data was read from streams to be sure we are not looping infinitely
         }
 
-        tempSB = new StringBuilder(); // Same, but for error stream
+        tempSB = new StringBuilder();                               //Same, but for error stream
         while (inReaderErrors.ready()) {
           tempSB.setLength(0);
           int readCount = inReaderErrors.read(charBuffer, 0, BUFFER_LEN);
@@ -246,11 +207,8 @@ public class ProcessData {
           if (tempSB.length() > 0) {
             outputProduced = true;
             String temp = new String(tempSB);
-            temp =
-                temp.replaceAll(
-                    "Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
-            // TODO : error stream output need to be improved, because it outputs downloading
-            // information.
+            temp = temp.replaceAll("Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
+            //TODO : error stream output need to be improved, because it outputs downloading information.
             if (printToConsole) {
               if (!temp.trim().equals("")) {
                 if (temp.toLowerCase().contains("error") || temp.toLowerCase().contains("failed")) {
@@ -264,29 +222,22 @@ public class ProcessData {
           lastStreamDataTime = System.currentTimeMillis();
         }
 
-        if ((System.currentTimeMillis() - lastStreamDataTime > silenceTimeout)
-            || // Exit if silenceTimeout ms has passed from last stream read. Means process is alive
-            // but not sending any data.
-            (System.currentTimeMillis()
-                > unconditionalExitTime)) { // Exit unconditionally - guards against alive process
-          // continuously sending data.
-          LOG.info(
-              "Conditions: "
-                  + (System.currentTimeMillis() - lastStreamDataTime > silenceTimeout)
-                  + " "
-                  + (System.currentTimeMillis() > unconditionalExitTime));
+
+        if ((System.currentTimeMillis() - lastStreamDataTime > silenceTimeout) ||     //Exit if silenceTimeout ms has passed from last stream read. Means process is alive but not sending any data.
+            (System.currentTimeMillis() > unconditionalExitTime)) {                    //Exit unconditionally - guards against alive process continuously sending data.
+          LOG.info("Conditions: " + (System.currentTimeMillis() - lastStreamDataTime > silenceTimeout) + " " +
+              (System.currentTimeMillis() > unconditionalExitTime));
           this.checked_process.destroy();
           try {
             if ((System.currentTimeMillis() > unconditionalExitTime)) {
               LOG.error(
                   "!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Unconditional exit occured@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@!\nsome process hag up for more than "
-                      + unconditionalExitDelayMinutes
-                      + " minutes.");
+                      + unconditionalExitDelayMinutes + " minutes.");
             }
             LOG.error("!##################################!");
             StringWriter sw = new StringWriter();
             Exception e = new Exception("Exited from buildOutputAndErrorStreamData by timeout");
-            e.printStackTrace(new PrintWriter(sw)); // Get stack trace
+            e.printStackTrace(new PrintWriter(sw)); //Get stack trace
             LOG.error(String.valueOf(e), e);
           } catch (Exception ignore) {
             LOG.info("Exception in ProcessData while buildOutputAndErrorStreamData ", ignore);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-integration/src/test/java/org/apache/zeppelin/WebDriverManager.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/WebDriverManager.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/WebDriverManager.java
index 969cb06..768113f 100644
--- a/zeppelin-integration/src/test/java/org/apache/zeppelin/WebDriverManager.java
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/WebDriverManager.java
@@ -43,9 +43,10 @@ import org.rauschig.jarchivelib.ArchiverFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 public class WebDriverManager {
 
-  public static final Logger LOG = LoggerFactory.getLogger(WebDriverManager.class);
+  public final static Logger LOG = LoggerFactory.getLogger(WebDriverManager.class);
 
   private static String downLoadsDir = "";
 
@@ -81,8 +82,7 @@ public class WebDriverManager {
         profile.setPreference("app.update.enabled", false);
         profile.setPreference("dom.max_script_run_time", 0);
         profile.setPreference("dom.max_chrome_script_run_time", 0);
-        profile.setPreference(
-            "browser.helperApps.neverAsk.saveToDisk",
+        profile.setPreference("browser.helperApps.neverAsk.saveToDisk",
             "application/x-ustar,application/octet-stream,application/zip,text/csv,text/plain");
         profile.setPreference("network.proxy.type", 0);
 
@@ -123,24 +123,20 @@ public class WebDriverManager {
 
     long start = System.currentTimeMillis();
     boolean loaded = false;
-    driver
-        .manage()
-        .timeouts()
-        .implicitlyWait(AbstractZeppelinIT.MAX_IMPLICIT_WAIT, TimeUnit.SECONDS);
+    driver.manage().timeouts().implicitlyWait(AbstractZeppelinIT.MAX_IMPLICIT_WAIT,
+        TimeUnit.SECONDS);
     driver.get(url);
 
     while (System.currentTimeMillis() - start < 60 * 1000) {
       // wait for page load
       try {
-        (new WebDriverWait(driver, 30))
-            .until(
-                new ExpectedCondition<Boolean>() {
-                  @Override
-                  public Boolean apply(WebDriver d) {
-                    return d.findElement(By.xpath("//i[@uib-tooltip='WebSocket Connected']"))
-                        .isDisplayed();
-                  }
-                });
+        (new WebDriverWait(driver, 30)).until(new ExpectedCondition<Boolean>() {
+          @Override
+          public Boolean apply(WebDriver d) {
+            return d.findElement(By.xpath("//i[@uib-tooltip='WebSocket Connected']"))
+                .isDisplayed();
+          }
+        });
         loaded = true;
         break;
       } catch (TimeoutException e) {
@@ -159,11 +155,8 @@ public class WebDriverManager {
 
   public static void downloadGeekoDriver(int firefoxVersion, String tempPath) {
     String geekoDriverUrlString =
-        "https://github.com/mozilla/geckodriver/releases/download/v"
-            + GECKODRIVER_VERSION
-            + "/geckodriver-v"
-            + GECKODRIVER_VERSION
-            + "-";
+        "https://github.com/mozilla/geckodriver/releases/download/v" + GECKODRIVER_VERSION
+            + "/geckodriver-v" + GECKODRIVER_VERSION + "-";
 
     LOG.info("Geeko version: " + firefoxVersion + ", will be downloaded to " + tempPath);
     try {
@@ -210,12 +203,10 @@ public class WebDriverManager {
       if (System.getProperty("os.name").startsWith("Mac OS")) {
         firefoxVersionCmd = "/Applications/Firefox.app/Contents/MacOS/" + firefoxVersionCmd;
       }
-      String versionString =
-          (String)
-              CommandExecutor.executeCommandLocalHost(
-                  firefoxVersionCmd, false, ProcessData.Types_Of_Data.OUTPUT);
-      return Integer.valueOf(
-          versionString.replaceAll("Mozilla Firefox", "").trim().substring(0, 2));
+      String versionString = (String) CommandExecutor
+          .executeCommandLocalHost(firefoxVersionCmd, false, ProcessData.Types_Of_Data.OUTPUT);
+      return Integer
+          .valueOf(versionString.replaceAll("Mozilla Firefox", "").trim().substring(0, 2));
     } catch (Exception e) {
       LOG.error("Exception in WebDriverManager while getWebDriver ", e);
       return -1;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-integration/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java
index 5af44f1..402a18d 100644
--- a/zeppelin-integration/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java
@@ -17,14 +17,15 @@
 
 package org.apache.zeppelin;
 
-import java.util.concurrent.TimeUnit;
-import org.openqa.selenium.WebDriver;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.openqa.selenium.WebDriver;
+import java.util.concurrent.TimeUnit;
 
 public class ZeppelinITUtils {
 
-  public static final Logger LOG = LoggerFactory.getLogger(ZeppelinITUtils.class);
+  public final static Logger LOG = LoggerFactory.getLogger(ZeppelinITUtils.class);
 
   public static void sleep(long millis, boolean logOutput) {
     if (logOutput) {
@@ -42,9 +43,9 @@ public class ZeppelinITUtils {
   }
 
   public static void restartZeppelin() {
-    CommandExecutor.executeCommandLocalHost(
-        "../bin/zeppelin-daemon.sh restart", false, ProcessData.Types_Of_Data.OUTPUT);
-    // wait for server to start.
+    CommandExecutor.executeCommandLocalHost("../bin/zeppelin-daemon.sh restart",
+        false, ProcessData.Types_Of_Data.OUTPUT);
+    //wait for server to start.
     sleep(5000, false);
   }
 
@@ -53,9 +54,7 @@ public class ZeppelinITUtils {
   }
 
   public static void turnOnImplicitWaits(WebDriver driver) {
-    driver
-        .manage()
-        .timeouts()
-        .implicitlyWait(AbstractZeppelinIT.MAX_IMPLICIT_WAIT, TimeUnit.SECONDS);
+    driver.manage().timeouts().implicitlyWait(AbstractZeppelinIT.MAX_IMPLICIT_WAIT,
+        TimeUnit.SECONDS);
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
index 0d748d3..ea6ad69 100644
--- a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
@@ -42,42 +42,44 @@ import org.openqa.selenium.WebElement;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Created for org.apache.zeppelin.integration on 13/06/16. */
+
+/**
+ * Created for org.apache.zeppelin.integration on 13/06/16.
+ */
 public class AuthenticationIT extends AbstractZeppelinIT {
   private static final Logger LOG = LoggerFactory.getLogger(AuthenticationIT.class);
 
-  @Rule public ErrorCollector collector = new ErrorCollector();
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
   static String shiroPath;
-  static String authShiro =
-      "[users]\n"
-          + "admin = password1, admin\n"
-          + "finance1 = finance1, finance\n"
-          + "finance2 = finance2, finance\n"
-          + "hr1 = hr1, hr\n"
-          + "hr2 = hr2, hr\n"
-          + "[main]\n"
-          + "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n"
-          + "securityManager.sessionManager = $sessionManager\n"
-          + "securityManager.sessionManager.globalSessionTimeout = 86400000\n"
-          + "shiro.loginUrl = /api/login\n"
-          + "anyofrolesuser = org.apache.zeppelin.utils.AnyOfRolesUserAuthorizationFilter\n"
-          + "[roles]\n"
-          + "admin = *\n"
-          + "hr = *\n"
-          + "finance = *\n"
-          + "[urls]\n"
-          + "/api/version = anon\n"
-          + "/api/interpreter/** = authc, anyofrolesuser[admin, finance]\n"
-          + "/** = authc";
+  static String authShiro = "[users]\n" +
+      "admin = password1, admin\n" +
+      "finance1 = finance1, finance\n" +
+      "finance2 = finance2, finance\n" +
+      "hr1 = hr1, hr\n" +
+      "hr2 = hr2, hr\n" +
+      "[main]\n" +
+      "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n" +
+      "securityManager.sessionManager = $sessionManager\n" +
+      "securityManager.sessionManager.globalSessionTimeout = 86400000\n" +
+      "shiro.loginUrl = /api/login\n" +
+      "anyofrolesuser = org.apache.zeppelin.utils.AnyOfRolesUserAuthorizationFilter\n" +
+      "[roles]\n" +
+      "admin = *\n" +
+      "hr = *\n" +
+      "finance = *\n" +
+      "[urls]\n" +
+      "/api/version = anon\n" +
+      "/api/interpreter/** = authc, anyofrolesuser[admin, finance]\n" +
+      "/** = authc";
 
   static String originalShiro = "";
 
+
   @BeforeClass
   public static void startUp() {
     try {
-      System.setProperty(
-          ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(),
-          new File("../").getAbsolutePath());
+      System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(), new File("../").getAbsolutePath());
       ZeppelinConfiguration conf = ZeppelinConfiguration.create();
       shiroPath = conf.getRelativeDir(String.format("%s/shiro.ini", conf.getConfDir()));
       File file = new File(shiroPath);
@@ -92,6 +94,7 @@ public class AuthenticationIT extends AbstractZeppelinIT {
     driver = WebDriverManager.getWebDriver();
   }
 
+
   @AfterClass
   public static void tearDown() {
     try {
@@ -111,33 +114,26 @@ public class AuthenticationIT extends AbstractZeppelinIT {
   }
 
   public void authenticationUser(String userName, String password) {
-    pollingWait(
-            By.xpath("//div[contains(@class, 'navbar-collapse')]//li//button[contains(.,'Login')]"),
-            MAX_BROWSER_TIMEOUT_SEC)
-        .click();
+    pollingWait(By.xpath(
+        "//div[contains(@class, 'navbar-collapse')]//li//button[contains(.,'Login')]"),
+        MAX_BROWSER_TIMEOUT_SEC).click();
     ZeppelinITUtils.sleep(1000, false);
     pollingWait(By.xpath("//*[@id='userName']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys(userName);
     pollingWait(By.xpath("//*[@id='password']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys(password);
-    pollingWait(
-            By.xpath("//*[@id='loginModalContent']//button[contains(.,'Login')]"),
-            MAX_BROWSER_TIMEOUT_SEC)
-        .click();
+    pollingWait(By.xpath("//*[@id='loginModalContent']//button[contains(.,'Login')]"),
+        MAX_BROWSER_TIMEOUT_SEC).click();
     ZeppelinITUtils.sleep(1000, false);
   }
 
   private void testShowNotebookListOnNavbar() throws Exception {
     try {
-      pollingWait(
-              By.xpath("//li[@class='dropdown notebook-list-dropdown']"), MAX_BROWSER_TIMEOUT_SEC)
-          .click();
-      assertTrue(
-          driver.findElements(By.xpath("//a[@class=\"notebook-list-item ng-scope\"]")).size() > 0);
-      pollingWait(
-              By.xpath("//li[@class='dropdown notebook-list-dropdown']"), MAX_BROWSER_TIMEOUT_SEC)
-          .click();
-      pollingWait(
-              By.xpath("//li[@class='dropdown notebook-list-dropdown']"), MAX_BROWSER_TIMEOUT_SEC)
-          .click();
+      pollingWait(By.xpath("//li[@class='dropdown notebook-list-dropdown']"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
+      assertTrue(driver.findElements(By.xpath("//a[@class=\"notebook-list-item ng-scope\"]")).size() > 0);
+      pollingWait(By.xpath("//li[@class='dropdown notebook-list-dropdown']"),
+              MAX_BROWSER_TIMEOUT_SEC).click();
+      pollingWait(By.xpath("//li[@class='dropdown notebook-list-dropdown']"),
+              MAX_BROWSER_TIMEOUT_SEC).click();
     } catch (Exception e) {
       handleException("Exception in ParagraphActionsIT while testShowNotebookListOnNavbar ", e);
     }
@@ -145,28 +141,15 @@ public class AuthenticationIT extends AbstractZeppelinIT {
 
   public void logoutUser(String userName) throws URISyntaxException {
     ZeppelinITUtils.sleep(500, false);
-    driver
-        .findElement(
-            By.xpath(
-                "//div[contains(@class, 'navbar-collapse')]//li[contains(.,'" + userName + "')]"))
-        .click();
+    driver.findElement(By.xpath("//div[contains(@class, 'navbar-collapse')]//li[contains(.,'" +
+        userName + "')]")).click();
     ZeppelinITUtils.sleep(500, false);
-    driver
-        .findElement(
-            By.xpath(
-                "//div[contains(@class, 'navbar-collapse')]//li[contains(.,'"
-                    + userName
-                    + "')]//a[@ng-click='navbar.logout()']"))
-        .click();
+    driver.findElement(By.xpath("//div[contains(@class, 'navbar-collapse')]//li[contains(.,'" +
+        userName + "')]//a[@ng-click='navbar.logout()']")).click();
     ZeppelinITUtils.sleep(2000, false);
-    if (driver
-        .findElement(
-            By.xpath("//*[@id='loginModal']//div[contains(@class, 'modal-header')]/button"))
+    if (driver.findElement(By.xpath("//*[@id='loginModal']//div[contains(@class, 'modal-header')]/button"))
         .isDisplayed()) {
-      driver
-          .findElement(
-              By.xpath("//*[@id='loginModal']//div[contains(@class, 'modal-header')]/button"))
-          .click();
+      driver.findElement(By.xpath("//*[@id='loginModal']//div[contains(@class, 'modal-header')]/button")).click();
     }
     driver.get(new URI(driver.getCurrentUrl()).resolve("/#/").toString());
     ZeppelinITUtils.sleep(500, false);
@@ -178,11 +161,9 @@ public class AuthenticationIT extends AbstractZeppelinIT {
       AuthenticationIT authenticationIT = new AuthenticationIT();
       authenticationIT.authenticationUser("admin", "password1");
 
-      collector.checkThat(
-          "Check is user logged in",
-          true,
-          CoreMatchers.equalTo(
-              driver.findElement(By.partialLinkText("Create new note")).isDisplayed()));
+      collector.checkThat("Check is user logged in", true,
+          CoreMatchers.equalTo(driver.findElement(By.partialLinkText("Create new note"))
+              .isDisplayed()));
 
       authenticationIT.logoutUser("admin");
     } catch (Exception e) {
@@ -196,55 +177,43 @@ public class AuthenticationIT extends AbstractZeppelinIT {
       AuthenticationIT authenticationIT = new AuthenticationIT();
       authenticationIT.authenticationUser("admin", "password1");
 
-      pollingWait(
-              By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .click();
+      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
       clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
 
-      collector.checkThat(
-          "Check is user has permission to view this page",
-          true,
-          CoreMatchers.equalTo(
-              pollingWait(By.xpath("//div[@id='main']/div/div[2]"), MIN_IMPLICIT_WAIT)
-                  .isDisplayed()));
+      collector.checkThat("Check is user has permission to view this page", true,
+          CoreMatchers.equalTo(pollingWait(By.xpath(
+              "//div[@id='main']/div/div[2]"),
+              MIN_IMPLICIT_WAIT).isDisplayed())
+      );
 
       authenticationIT.logoutUser("admin");
 
       authenticationIT.authenticationUser("finance1", "finance1");
 
-      pollingWait(
-              By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .click();
+      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
       clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
 
-      collector.checkThat(
-          "Check is user has permission to view this page",
-          true,
-          CoreMatchers.equalTo(
-              pollingWait(By.xpath("//div[@id='main']/div/div[2]"), MIN_IMPLICIT_WAIT)
-                  .isDisplayed()));
-
+      collector.checkThat("Check is user has permission to view this page", true,
+          CoreMatchers.equalTo(pollingWait(By.xpath(
+              "//div[@id='main']/div/div[2]"),
+              MIN_IMPLICIT_WAIT).isDisplayed())
+      );
+      
       authenticationIT.logoutUser("finance1");
 
       authenticationIT.authenticationUser("hr1", "hr1");
 
-      pollingWait(
-              By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .click();
+      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
       clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
 
       try {
-        collector.checkThat(
-            "Check is user has permission to view this page",
-            true,
-            CoreMatchers.equalTo(
-                pollingWait(
-                        By.xpath("//li[contains(@class, 'ng-toast__message')]//span/span"),
-                        MIN_IMPLICIT_WAIT)
-                    .isDisplayed()));
+        collector.checkThat("Check is user has permission to view this page",
+            true, CoreMatchers.equalTo(
+                pollingWait(By.xpath("//li[contains(@class, 'ng-toast__message')]//span/span"),
+                    MIN_IMPLICIT_WAIT).isDisplayed()));
       } catch (TimeoutException e) {
         throw new Exception("Expected ngToast not found", e);
       }
@@ -264,94 +233,70 @@ public class AuthenticationIT extends AbstractZeppelinIT {
 
       String noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
 
-      pollingWait(By.xpath("//span[@uib-tooltip='Note permissions']"), MAX_BROWSER_TIMEOUT_SEC)
-          .click();
-      pollingWait(
-              By.xpath(".//*[@id='selectOwners']/following::span//input"), MAX_BROWSER_TIMEOUT_SEC)
-          .sendKeys("finance ");
-      pollingWait(
-              By.xpath(".//*[@id='selectReaders']/following::span//input"), MAX_BROWSER_TIMEOUT_SEC)
-          .sendKeys("finance ");
-      pollingWait(
-              By.xpath(".//*[@id='selectRunners']/following::span//input"), MAX_BROWSER_TIMEOUT_SEC)
-          .sendKeys("finance ");
-      pollingWait(
-              By.xpath(".//*[@id='selectWriters']/following::span//input"), MAX_BROWSER_TIMEOUT_SEC)
-          .sendKeys("finance ");
+      pollingWait(By.xpath("//span[@uib-tooltip='Note permissions']"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
+      pollingWait(By.xpath(".//*[@id='selectOwners']/following::span//input"),
+          MAX_BROWSER_TIMEOUT_SEC).sendKeys("finance ");
+      pollingWait(By.xpath(".//*[@id='selectReaders']/following::span//input"),
+          MAX_BROWSER_TIMEOUT_SEC).sendKeys("finance ");
+      pollingWait(By.xpath(".//*[@id='selectRunners']/following::span//input"),
+              MAX_BROWSER_TIMEOUT_SEC).sendKeys("finance ");
+      pollingWait(By.xpath(".//*[@id='selectWriters']/following::span//input"),
+          MAX_BROWSER_TIMEOUT_SEC).sendKeys("finance ");
       pollingWait(By.xpath("//button[@ng-click='savePermissions()']"), MAX_BROWSER_TIMEOUT_SEC)
           .sendKeys(Keys.ENTER);
 
-      pollingWait(
-              By.xpath(
-                  "//div[@class='modal-dialog'][contains(.,'Permissions Saved ')]"
-                      + "//div[@class='modal-footer']//button[contains(.,'OK')]"),
-              MAX_BROWSER_TIMEOUT_SEC)
-          .click();
+      pollingWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Permissions Saved ')]" +
+              "//div[@class='modal-footer']//button[contains(.,'OK')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
       authenticationIT.logoutUser("finance1");
 
       authenticationIT.authenticationUser("hr1", "hr1");
       try {
-        WebElement element =
-            pollingWait(
-                By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
-                MAX_BROWSER_TIMEOUT_SEC);
-        collector.checkThat(
-            "Check is user has permission to view this note link",
-            false,
+        WebElement element = pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC);
+        collector.checkThat("Check is user has permission to view this note link", false,
             CoreMatchers.equalTo(element.isDisplayed()));
       } catch (Exception e) {
-        // This should have failed, nothing to worry.
+        //This should have failed, nothing to worry.
       }
 
       driver.get(new URI(driver.getCurrentUrl()).resolve("/#/notebook/" + noteId).toString());
 
-      List<WebElement> privilegesModal =
-          driver.findElements(
-              By.xpath(
-                  "//div[@class='modal-content']//div[@class='bootstrap-dialog-header']"
-                      + "//div[contains(.,'Insufficient privileges')]"));
-      collector.checkThat(
-          "Check is user has permission to view this note",
-          1,
+      List<WebElement> privilegesModal = driver.findElements(
+          By.xpath("//div[@class='modal-content']//div[@class='bootstrap-dialog-header']" +
+              "//div[contains(.,'Insufficient privileges')]"));
+      collector.checkThat("Check is user has permission to view this note", 1,
           CoreMatchers.equalTo(privilegesModal.size()));
-      driver
-          .findElement(
-              By.xpath(
-                  "//div[@class='modal-content'][contains(.,'Insufficient privileges')]"
-                      + "//div[@class='modal-footer']//button[2]"))
-          .click();
+      driver.findElement(
+          By.xpath("//div[@class='modal-content'][contains(.,'Insufficient privileges')]" +
+              "//div[@class='modal-footer']//button[2]")).click();
       authenticationIT.logoutUser("hr1");
 
       authenticationIT.authenticationUser("finance2", "finance2");
       try {
-        WebElement element =
-            pollingWait(
-                By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
-                MAX_BROWSER_TIMEOUT_SEC);
-        collector.checkThat(
-            "Check is user has permission to view this note link",
-            true,
+        WebElement element = pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC);
+        collector.checkThat("Check is user has permission to view this note link", true,
             CoreMatchers.equalTo(element.isDisplayed()));
       } catch (Exception e) {
-        // This should have failed, nothing to worry.
+        //This should have failed, nothing to worry.
       }
 
       driver.get(new URI(driver.getCurrentUrl()).resolve("/#/notebook/" + noteId).toString());
 
-      privilegesModal =
-          driver.findElements(
-              By.xpath(
-                  "//div[@class='modal-content']//div[@class='bootstrap-dialog-header']"
-                      + "//div[contains(.,'Insufficient privileges')]"));
-      collector.checkThat(
-          "Check is user has permission to view this note",
-          0,
+      privilegesModal = driver.findElements(
+          By.xpath("//div[@class='modal-content']//div[@class='bootstrap-dialog-header']" +
+              "//div[contains(.,'Insufficient privileges')]"));
+      collector.checkThat("Check is user has permission to view this note", 0,
           CoreMatchers.equalTo(privilegesModal.size()));
       deleteTestNotebook(driver);
       authenticationIT.logoutUser("finance2");
 
+
     } catch (Exception e) {
       handleException("Exception in AuthenticationIT while testGroupPermission ", e);
     }
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterIT.java
index 1561560..d2e31a0 100644
--- a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterIT.java
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterIT.java
@@ -34,7 +34,8 @@ import org.slf4j.LoggerFactory;
 public class InterpreterIT extends AbstractZeppelinIT {
   private static final Logger LOG = LoggerFactory.getLogger(InterpreterIT.class);
 
-  @Rule public ErrorCollector collector = new ErrorCollector();
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
 
   @Before
   public void startUp() {
@@ -50,8 +51,7 @@ public class InterpreterIT extends AbstractZeppelinIT {
   public void testShowDescriptionOnInterpreterCreate() throws Exception {
     try {
       // navigate to interpreter page
-      WebElement settingButton =
-          driver.findElement(By.xpath("//button[@class='nav-btn dropdown-toggle ng-scope']"));
+      WebElement settingButton = driver.findElement(By.xpath("//button[@class='nav-btn dropdown-toggle ng-scope']"));
       settingButton.click();
       WebElement interpreterLink = driver.findElement(By.xpath("//a[@href='#/interpreter']"));
       interpreterLink.click();
@@ -59,22 +59,15 @@ public class InterpreterIT extends AbstractZeppelinIT {
       WebElement createButton = driver.findElement(By.xpath("//button[contains(., 'Create')]"));
       createButton.click();
 
-      Select select =
-          new Select(
-              driver.findElement(By.xpath("//select[@ng-change='newInterpreterGroupChange()']")));
+      Select select = new Select(driver.findElement(By.xpath("//select[@ng-change='newInterpreterGroupChange()']")));
       select.selectByVisibleText("spark");
 
-      collector.checkThat(
-          "description of interpreter property is displayed",
-          driver
-              .findElement(
-                  By.xpath("//tr/td[contains(text(), 'spark.app.name')]/following-sibling::td[3]"))
-              .getText(),
+      collector.checkThat("description of interpreter property is displayed",
+          driver.findElement(By.xpath("//tr/td[contains(text(), 'spark.app.name')]/following-sibling::td[3]")).getText(),
           CoreMatchers.equalTo("The name of spark application."));
 
     } catch (Exception e) {
-      handleException(
-          "Exception in InterpreterIT while testShowDescriptionOnInterpreterCreate ", e);
+      handleException("Exception in InterpreterIT while testShowDescriptionOnInterpreterCreate ", e);
     }
   }
 }


[46/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/flink/src/test/java/org/apache/zeppelin/flink/FlinkSQLInterpreterTest.java
----------------------------------------------------------------------
diff --git a/flink/src/test/java/org/apache/zeppelin/flink/FlinkSQLInterpreterTest.java b/flink/src/test/java/org/apache/zeppelin/flink/FlinkSQLInterpreterTest.java
index 592ad36..6993540 100644
--- a/flink/src/test/java/org/apache/zeppelin/flink/FlinkSQLInterpreterTest.java
+++ b/flink/src/test/java/org/apache/zeppelin/flink/FlinkSQLInterpreterTest.java
@@ -17,10 +17,6 @@
 
 package org.apache.zeppelin.flink;
 
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.util.Properties;
 import org.apache.zeppelin.display.AngularObjectRegistry;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -32,6 +28,11 @@ import org.apache.zeppelin.interpreter.InterpreterResultMessageOutput;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+
 public class FlinkSQLInterpreterTest {
 
   private FlinkInterpreter interpreter;
@@ -61,48 +62,49 @@ public class FlinkSQLInterpreterTest {
 
   @Test
   public void testSQLInterpreter() throws InterpreterException {
-    InterpreterResult result =
-        interpreter.interpret(
-            "val ds = benv.fromElements((1, \"jeff\"), (2, \"andy\"))", getInterpreterContext());
+    InterpreterResult result = interpreter.interpret(
+        "val ds = benv.fromElements((1, \"jeff\"), (2, \"andy\"))", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
-    result =
-        interpreter.interpret("btenv.registerDataSet(\"table_1\", ds)", getInterpreterContext());
+    result = interpreter.interpret("btenv.registerDataSet(\"table_1\", ds)",
+        getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
     result = sqlInterpreter.interpret("select * from table_1", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals(InterpreterResult.Type.TABLE, result.message().get(0).getType());
-    assertEquals("_1\t_2\n" + "1\tjeff\n" + "2\tandy\n", result.message().get(0).getData());
+    assertEquals("_1\t_2\n" +
+        "1\tjeff\n" +
+        "2\tandy\n", result.message().get(0).getData());
   }
 
   private InterpreterContext getInterpreterContext() {
     output = "";
-    InterpreterContext context =
-        InterpreterContext.builder()
-            .setInterpreterOut(new InterpreterOutput(null))
-            .setAngularObjectRegistry(new AngularObjectRegistry("flink", null))
-            .build();
-    context.out =
-        new InterpreterOutput(
-            new InterpreterOutputListener() {
-              @Override
-              public void onUpdateAll(InterpreterOutput out) {}
-
-              @Override
-              public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
-                try {
-                  output = out.toInterpreterResultMessage().getData();
-                } catch (IOException e) {
-                  e.printStackTrace();
-                }
-              }
-
-              @Override
-              public void onUpdate(int index, InterpreterResultMessageOutput out) {
-                messageOutput = out;
-              }
-            });
+    InterpreterContext context = InterpreterContext.builder()
+        .setInterpreterOut(new InterpreterOutput(null))
+        .setAngularObjectRegistry(new AngularObjectRegistry("flink", null))
+        .build();
+    context.out = new InterpreterOutput(
+        new InterpreterOutputListener() {
+          @Override
+          public void onUpdateAll(InterpreterOutput out) {
+
+          }
+
+          @Override
+          public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
+            try {
+              output = out.toInterpreterResultMessage().getData();
+            } catch (IOException e) {
+              e.printStackTrace();
+            }
+          }
+
+          @Override
+          public void onUpdate(int index, InterpreterResultMessageOutput out) {
+            messageOutput = out;
+          }
+        });
     return context;
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/geode/pom.xml
----------------------------------------------------------------------
diff --git a/geode/pom.xml b/geode/pom.xml
index d2adaad..5e354ae 100644
--- a/geode/pom.xml
+++ b/geode/pom.xml
@@ -95,6 +95,13 @@
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/geode/src/main/java/org/apache/zeppelin/geode/GeodeOqlInterpreter.java
----------------------------------------------------------------------
diff --git a/geode/src/main/java/org/apache/zeppelin/geode/GeodeOqlInterpreter.java b/geode/src/main/java/org/apache/zeppelin/geode/GeodeOqlInterpreter.java
index 3a013bb..638a9f3 100644
--- a/geode/src/main/java/org/apache/zeppelin/geode/GeodeOqlInterpreter.java
+++ b/geode/src/main/java/org/apache/zeppelin/geode/GeodeOqlInterpreter.java
@@ -4,19 +4,16 @@
  * 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
- *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
- *
- * <p>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.
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.geode;
 
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
 import org.apache.commons.lang.StringUtils;
 import org.apache.geode.cache.client.ClientCache;
 import org.apache.geode.cache.client.ClientCacheFactory;
@@ -34,36 +31,55 @@ import org.apache.zeppelin.scheduler.SchedulerFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+
 /**
  * Apache Geode OQL Interpreter (http://geode.apache.org)
  *
  * <ul>
- *   <li>{@code geode.locator.host} - The Geode Locator {@code <HOST>} to connect to.
- *   <li>{@code geode.locator.port} - The Geode Locator {@code <PORT>} to connect to.
- *   <li>{@code geode.max.result} - Max number of OQL result to display.
+ * <li>{@code geode.locator.host} - The Geode Locator {@code <HOST>} to connect to.</li>
+ * <li>{@code geode.locator.port} - The Geode Locator {@code <PORT>} to connect to.</li>
+ * <li>{@code geode.max.result} - Max number of OQL result to display.</li>
  * </ul>
- *
- * <p>Sample usages: <br>
- * {@code %geode.oql} <br>
- * {@code SELECT * FROM /regionEmployee e WHERE e.companyId > 95} <br>
- * {@code SELECT * FROM /regionEmployee ORDER BY employeeId} <br>
- * {@code SELECT * FROM /regionEmployee WHERE companyId IN SET(1, 3, 7) OR lastName IN SET('NameA',
- * 'NameB') } <br>
- * {@code SELECT e.employeeId, c.id as companyId FROM /regionEmployee e, /regionCompany c WHERE
- * e.companyId = c.id }
- *
- * <p>OQL specification and sample queries:
+ * <p>
+ * Sample usages: <br/>
+ * {@code %geode.oql} <br/>
+ * {@code SELECT * FROM /regionEmployee e WHERE e.companyId > 95} <br/>
+ * {@code SELECT * FROM /regionEmployee ORDER BY employeeId} <br/>
+ * {@code
+ * SELECT * FROM /regionEmployee
+ * WHERE companyId IN SET(1, 3, 7) OR lastName IN SET('NameA', 'NameB')
+ * } <br/>
+ * {@code
+ * SELECT e.employeeId, c.id as companyId FROM /regionEmployee e, /regionCompany c
+ * WHERE e.companyId = c.id
+ * }
+ * </p>
+ * <p>
+ * OQL specification and sample queries:
  * http://geode-docs.cfapps.io/docs/getting_started/querying_quick_reference.html
- *
- * <p>When the Zeppelin server is collocated with Geode Shell (gfsh) one can use the %sh interpreter
- * to run Geode shell commands: <br>
- * {@code %sh source /etc/geode/conf/geode-env.sh gfsh << EOF connect
- * --locator=ambari.localdomain[10334] destroy region --name=/regionEmployee create region
- * --name=regionEmployee --type=REPLICATE exit; EOF }
- *
- * <p>Known issue:http://gemfire.docs.pivotal.io/bugnotes/KnownIssuesGemFire810.html #43673 Using
- * query "select * from /exampleRegion.entrySet" fails in a client-server topology and/or in a
+ * </p>
+ * <p>
+ * When the Zeppelin server is collocated with Geode Shell (gfsh) one can use the %sh interpreter to
+ * run Geode shell commands: <br/>
+ * {@code
+ * %sh
+ *  source /etc/geode/conf/geode-env.sh
+ *  gfsh << EOF
+ *    connect --locator=ambari.localdomain[10334]
+ *    destroy region --name=/regionEmployee
+ *    create region --name=regionEmployee --type=REPLICATE
+ *    exit;
+ *  EOF
+ *}
+ * </p>
+ * <p>
+ * Known issue:http://gemfire.docs.pivotal.io/bugnotes/KnownIssuesGemFire810.html #43673 Using query
+ * "select * from /exampleRegion.entrySet" fails in a client-server topology and/or in a
  * PartitionedRegion.
+ * </p>
  */
 public class GeodeOqlInterpreter extends Interpreter {
 
@@ -236,6 +252,7 @@ public class GeodeOqlInterpreter extends Interpreter {
     msg.append("" + entry);
   }
 
+
   @Override
   public InterpreterResult interpret(String cmd, InterpreterContext contextInterpreter) {
     logger.info("Run OQL command '{}'", cmd);
@@ -259,13 +276,13 @@ public class GeodeOqlInterpreter extends Interpreter {
 
   @Override
   public Scheduler getScheduler() {
-    return SchedulerFactory.singleton()
-        .createOrGetFIFOScheduler(GeodeOqlInterpreter.class.getName() + this.hashCode());
+    return SchedulerFactory.singleton().createOrGetFIFOScheduler(
+        GeodeOqlInterpreter.class.getName() + this.hashCode());
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+                                                InterpreterContext interpreterContext) {
     return null;
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/geode/src/test/java/org/apache/zeppelin/geode/GeodeOqlInterpreterTest.java
----------------------------------------------------------------------
diff --git a/geode/src/test/java/org/apache/zeppelin/geode/GeodeOqlInterpreterTest.java b/geode/src/test/java/org/apache/zeppelin/geode/GeodeOqlInterpreterTest.java
index 38d9e30..4404863 100644
--- a/geode/src/test/java/org/apache/zeppelin/geode/GeodeOqlInterpreterTest.java
+++ b/geode/src/test/java/org/apache/zeppelin/geode/GeodeOqlInterpreterTest.java
@@ -4,31 +4,16 @@
  * 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
- *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
- *
- * <p>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.
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.geode;
 
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.Properties;
 import org.apache.geode.cache.query.QueryService;
 import org.apache.geode.cache.query.SelectResults;
 import org.apache.geode.cache.query.Struct;
@@ -42,6 +27,22 @@ import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.InterpreterResult.Code;
 import org.junit.Test;
 
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
 public class GeodeOqlInterpreterTest {
 
   private static final String OQL_QUERY = "select * from /region";
@@ -77,9 +78,9 @@ public class GeodeOqlInterpreterTest {
 
   @Test
   public void oqlStructResponse() throws Exception {
-    String[] fields = new String[] {"field1", "field2"};
-    Struct s1 = new StructImpl(new StructTypeImpl(fields), new String[] {"val11", "val12"});
-    Struct s2 = new StructImpl(new StructTypeImpl(fields), new String[] {"val21", "val22"});
+    String[] fields = new String[]{"field1", "field2"};
+    Struct s1 = new StructImpl(new StructTypeImpl(fields), new String[]{"val11", "val12"});
+    Struct s2 = new StructImpl(new StructTypeImpl(fields), new String[]{"val21", "val22"});
 
     testOql(asIterator(s1, s2), "field1\tfield2\t\nval11\tval12\t\nval21\tval22\t\n", 10);
     testOql(asIterator(s1, s2), "field1\tfield2\t\nval11\tval12\t\n", 1);
@@ -87,8 +88,8 @@ public class GeodeOqlInterpreterTest {
 
   @Test
   public void oqlStructResponseWithReservedCharacters() throws Exception {
-    String[] fields = new String[] {"fi\teld1", "f\nield2"};
-    Struct s1 = new StructImpl(new StructTypeImpl(fields), new String[] {"v\nal\t1", "val2"});
+    String[] fields = new String[]{"fi\teld1", "f\nield2"};
+    Struct s1 = new StructImpl(new StructTypeImpl(fields), new String[]{"v\nal\t1", "val2"});
 
     testOql(asIterator(s1), "fi eld1\tf ield2\t\nv al 1\tval2\t\n", 10);
   }
@@ -115,10 +116,8 @@ public class GeodeOqlInterpreterTest {
     DummyUnspportedType unspported1 = new DummyUnspportedType();
     DummyUnspportedType unspported2 = new DummyUnspportedType();
 
-    testOql(
-        asIterator(unspported1, unspported2),
-        "Unsuppoted Type\n" + unspported1.toString() + "\n" + unspported1.toString() + "\n",
-        10);
+    testOql(asIterator(unspported1, unspported2), "Unsuppoted Type\n" + unspported1.toString()
+        + "\n" + unspported1.toString() + "\n", 10);
   }
 
   private void testOql(Iterator<Object> queryResponseIterator, String expectedOutput, int maxResult)
@@ -149,8 +148,8 @@ public class GeodeOqlInterpreterTest {
 
     GeodeOqlInterpreter spyGeodeOqlInterpreter = spy(new GeodeOqlInterpreter(new Properties()));
 
-    when(spyGeodeOqlInterpreter.getExceptionOnConnect())
-        .thenReturn(new RuntimeException("Test Exception On Connect"));
+    when(spyGeodeOqlInterpreter.getExceptionOnConnect()).thenReturn(
+        new RuntimeException("Test Exception On Connect"));
 
     InterpreterResult interpreterResult = spyGeodeOqlInterpreter.interpret(OQL_QUERY, null);
 
@@ -163,8 +162,8 @@ public class GeodeOqlInterpreterTest {
 
     GeodeOqlInterpreter spyGeodeOqlInterpreter = spy(new GeodeOqlInterpreter(new Properties()));
 
-    when(spyGeodeOqlInterpreter.getQueryService())
-        .thenThrow(new RuntimeException("Expected Test Exception!"));
+    when(spyGeodeOqlInterpreter.getQueryService()).thenThrow(
+        new RuntimeException("Expected Test Exception!"));
 
     InterpreterResult interpreterResult = spyGeodeOqlInterpreter.interpret(OQL_QUERY, null);
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/groovy/pom-groovy-only.xml
----------------------------------------------------------------------
diff --git a/groovy/pom-groovy-only.xml b/groovy/pom-groovy-only.xml
index 78fff94..971c674 100644
--- a/groovy/pom-groovy-only.xml
+++ b/groovy/pom-groovy-only.xml
@@ -79,6 +79,17 @@
           </compilerArgs>
         </configuration>
       </plugin>
+ 
+      <!--TODO: comment local `maven-checkstyle-plugin` and use zeppelin common check style-->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+        <executions>
+        </executions>
+      </plugin>
       <plugin>
         <artifactId>maven-enforcer-plugin</artifactId>
         <version>1.3.1</version>            

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/groovy/pom.xml
----------------------------------------------------------------------
diff --git a/groovy/pom.xml b/groovy/pom.xml
index 8de3365..9b95fc3 100644
--- a/groovy/pom.xml
+++ b/groovy/pom.xml
@@ -80,6 +80,13 @@
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/groovy/src/main/java/org/apache/zeppelin/groovy/GObject.java
----------------------------------------------------------------------
diff --git a/groovy/src/main/java/org/apache/zeppelin/groovy/GObject.java b/groovy/src/main/java/org/apache/zeppelin/groovy/GObject.java
index de898cd..e7f27c3 100644
--- a/groovy/src/main/java/org/apache/zeppelin/groovy/GObject.java
+++ b/groovy/src/main/java/org/apache/zeppelin/groovy/GObject.java
@@ -18,12 +18,6 @@ package org.apache.zeppelin.groovy;
 
 import groovy.lang.Closure;
 import groovy.xml.MarkupBuilder;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Properties;
 import org.apache.thrift.TException;
 import org.apache.zeppelin.annotation.ZeppelinApi;
 import org.apache.zeppelin.display.AngularObject;
@@ -33,7 +27,16 @@ import org.apache.zeppelin.display.ui.OptionInput.ParamOption;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.slf4j.Logger;
 
-/** Groovy interpreter for Zeppelin. */
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * Groovy interpreter for Zeppelin.
+ */
 public class GObject extends groovy.lang.GroovyObjectSupport {
   Logger log;
   StringWriter out;
@@ -42,11 +45,7 @@ public class GObject extends groovy.lang.GroovyObjectSupport {
   Map<String, Object> bindings;
   GroovyZeppelinContext z;
 
-  public GObject(
-      Logger log,
-      StringWriter out,
-      Properties p,
-      InterpreterContext ctx,
+  public GObject(Logger log, StringWriter out, Properties p, InterpreterContext ctx,
       Map<String, Object> bindings) {
     this.log = log;
     this.out = out;
@@ -84,7 +83,9 @@ public class GObject extends groovy.lang.GroovyObjectSupport {
     }
   }
 
-  /** returns gui object. */
+  /**
+   * returns gui object.
+   */
   public GUI getGui() {
     return z.getGui();
   }
@@ -124,11 +125,12 @@ public class GObject extends groovy.lang.GroovyObjectSupport {
   }
 
   @ZeppelinApi
-  public Collection<Object> checkbox(
-      String name, Collection<Object> defaultChecked, Map<Object, String> options) {
+  public Collection<Object> checkbox(String name, Collection<Object> defaultChecked,
+      Map<Object, String> options) {
     return z.checkbox(name, new ArrayList<Object>(defaultChecked), toParamOptions(options));
   }
 
+
   /**
    * Returns shared variable if it was previously set. The same as getting groovy script variables
    * but this method will return null if script variable not assigned. To understand groovy script
@@ -153,9 +155,9 @@ public class GObject extends groovy.lang.GroovyObjectSupport {
   }
 
   /**
-   * Sets a new value to interpreter's shared variables. Could be set by <code>
-   * put('varName', newValue )</code> or by just assigning <code>varName = value</code> without
-   * declaring a variable.
+   * Sets a new value to interpreter's shared variables.
+   * Could be set by <code>put('varName', newValue )</code>
+   * or by just assigning <code>varName = value</code> without declaring a variable.
    */
   public Object put(String varName, Object newValue) {
     return bindings.put(varName, newValue);
@@ -163,7 +165,6 @@ public class GObject extends groovy.lang.GroovyObjectSupport {
 
   /**
    * starts or continues rendering html/angular and returns MarkupBuilder to build html.
-   *
    * <pre> g.html().with{
    *  h1("hello")
    *  h2("world")
@@ -186,7 +187,7 @@ public class GObject extends groovy.lang.GroovyObjectSupport {
     StringBuffer sb = out.getBuffer();
     startOutputType("%table");
     if (obj instanceof groovy.lang.Closure) {
-      // if closure run and get result collection
+      //if closure run and get result collection
       obj = ((Closure) obj).call();
     }
     if (obj instanceof Collection) {
@@ -244,8 +245,8 @@ public class GObject extends groovy.lang.GroovyObjectSupport {
   }
 
   /**
-   * Create angular variable in notebook scope and bind with front end Angular display system. If
-   * variable exists, it'll be overwritten.
+   * Create angular variable in notebook scope and bind with front end Angular display system.
+   * If variable exists, it'll be overwritten.
    *
    * @param name name of the variable
    * @param o value
@@ -254,19 +255,25 @@ public class GObject extends groovy.lang.GroovyObjectSupport {
     angularBind(name, o, interpreterContext.getNoteId());
   }
 
-  /** Run paragraph by id. */
+  /**
+   * Run paragraph by id.
+   */
   @ZeppelinApi
   public void run(String noteId, String paragraphId) throws IOException {
     z.run(noteId, paragraphId);
   }
 
-  /** Run paragraph by id. */
+  /**
+   * Run paragraph by id.
+   */
   @ZeppelinApi
   public void run(String paragraphId) throws IOException {
     z.run(paragraphId);
   }
 
-  /** Run paragraph by id. */
+  /**
+   * Run paragraph by id.
+   */
   @ZeppelinApi
   public void run(String noteId, String paragraphId, InterpreterContext context)
       throws IOException {
@@ -281,13 +288,17 @@ public class GObject extends groovy.lang.GroovyObjectSupport {
     z.runNote(noteId, context);
   }
 
-  /** Run all paragraphs. except this. */
+  /**
+   * Run all paragraphs. except this.
+   */
   @ZeppelinApi
   public void runAll() throws IOException {
     z.runAll(interpreterContext);
   }
 
-  /** Run all paragraphs. except this. */
+  /**
+   * Run all paragraphs. except this.
+   */
   @ZeppelinApi
   public void runAll(InterpreterContext context) throws IOException {
     z.runNote(context.getNoteId());

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/groovy/src/main/java/org/apache/zeppelin/groovy/GroovyInterpreter.java
----------------------------------------------------------------------
diff --git a/groovy/src/main/java/org/apache/zeppelin/groovy/GroovyInterpreter.java b/groovy/src/main/java/org/apache/zeppelin/groovy/GroovyInterpreter.java
index 26f812b..607a6d5 100644
--- a/groovy/src/main/java/org/apache/zeppelin/groovy/GroovyInterpreter.java
+++ b/groovy/src/main/java/org/apache/zeppelin/groovy/GroovyInterpreter.java
@@ -17,8 +17,12 @@
 
 package org.apache.zeppelin.groovy;
 
-import groovy.lang.GroovyShell;
-import groovy.lang.Script;
+import org.codehaus.groovy.control.CompilerConfiguration;
+import org.codehaus.groovy.runtime.StackTraceUtils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.File;
 import java.io.PrintWriter;
 import java.io.StringWriter;
@@ -31,6 +35,10 @@ import java.util.Properties;
 import java.util.Set;
 import java.util.WeakHashMap;
 import java.util.concurrent.ConcurrentHashMap;
+
+import groovy.lang.GroovyShell;
+import groovy.lang.Script;
+
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
@@ -39,20 +47,18 @@ import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Job;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
-import org.codehaus.groovy.control.CompilerConfiguration;
-import org.codehaus.groovy.runtime.StackTraceUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Groovy interpreter for Zeppelin. */
+/**
+ * Groovy interpreter for Zeppelin.
+ */
 public class GroovyInterpreter extends Interpreter {
   Logger log = LoggerFactory.getLogger(GroovyInterpreter.class);
-  GroovyShell shell = null; // new GroovyShell();
-  // here we will store Interpreters shared variables. concurrent just in case.
+  GroovyShell shell = null; //new GroovyShell();
+  //here we will store Interpreters shared variables. concurrent just in case.
   Map<String, Object> sharedBindings = new ConcurrentHashMap<String, Object>();
-  // cache for groovy compiled scripts
-  Map<String, Class<Script>> scriptCache =
-      Collections.synchronizedMap(new WeakHashMap<String, Class<Script>>(100));
+  //cache for groovy compiled scripts
+  Map<String, Class<Script>> scriptCache = Collections
+      .synchronizedMap(new WeakHashMap<String, Class<Script>>(100));
 
   public GroovyInterpreter(Properties property) {
     super(property);
@@ -66,14 +72,9 @@ public class GroovyInterpreter extends Interpreter {
     String classes = getProperty("GROOVY_CLASSES");
     if (classes == null || classes.length() == 0) {
       try {
-        File jar =
-            new File(
-                GroovyInterpreter.class
-                    .getProtectionDomain()
-                    .getCodeSource()
-                    .getLocation()
-                    .toURI()
-                    .getPath());
+        File jar = new File(
+            GroovyInterpreter.class.getProtectionDomain().getCodeSource().getLocation().toURI()
+                .getPath());
         classes = new File(jar.getParentFile(), "classes").toString();
       } catch (Exception e) {
         log.error(e.getMessage());
@@ -122,8 +123,8 @@ public class GroovyInterpreter extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+                                                InterpreterContext interpreterContext) {
     return null;
   }
 
@@ -160,24 +161,23 @@ public class GroovyInterpreter extends Interpreter {
     try {
       Script script = getGroovyScript(contextInterpreter.getParagraphId(), cmd);
       Job runningJob = getRunningJob(contextInterpreter.getParagraphId());
-      runningJob
-          .info()
-          .put("CURRENT_THREAD", Thread.currentThread()); // to be able to terminate thread
+      runningJob.info()
+          .put("CURRENT_THREAD", Thread.currentThread()); //to be able to terminate thread
       Map<String, Object> bindings = script.getBinding().getVariables();
       bindings.clear();
       StringWriter out = new StringWriter((int) (cmd.length() * 1.75));
-      // put shared bindings evaluated in this interpreter
+      //put shared bindings evaluated in this interpreter
       bindings.putAll(sharedBindings);
-      // put predefined bindings
+      //put predefined bindings
       bindings.put("g", new GObject(log, out, this.getProperties(), contextInterpreter, bindings));
       bindings.put("out", new PrintWriter(out, true));
 
       script.run();
-      // let's get shared variables defined in current script and store them in shared map
+      //let's get shared variables defined in current script and store them in shared map
       for (Map.Entry<String, Object> e : bindings.entrySet()) {
         if (!predefinedBindings.contains(e.getKey())) {
           if (log.isTraceEnabled()) {
-            log.trace("groovy script variable " + e); // let's see what we have...
+            log.trace("groovy script variable " + e);  //let's see what we have...
           }
           sharedBindings.put(e.getKey(), e.getValue());
         }
@@ -205,7 +205,7 @@ public class GroovyInterpreter extends Interpreter {
           Thread t = (Thread) object;
           t.dumpStack();
           t.interrupt();
-          // t.stop(); //TODO(dlukyanov): need some way to terminate maybe through GObject..
+          //t.stop(); //TODO(dlukyanov): need some way to terminate maybe through GObject..
         } catch (Throwable t) {
           log.error("Failed to cancel script: " + t, t);
         }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/groovy/src/main/java/org/apache/zeppelin/groovy/GroovyZeppelinContext.java
----------------------------------------------------------------------
diff --git a/groovy/src/main/java/org/apache/zeppelin/groovy/GroovyZeppelinContext.java b/groovy/src/main/java/org/apache/zeppelin/groovy/GroovyZeppelinContext.java
index 2016d3d..3d17462 100644
--- a/groovy/src/main/java/org/apache/zeppelin/groovy/GroovyZeppelinContext.java
+++ b/groovy/src/main/java/org/apache/zeppelin/groovy/GroovyZeppelinContext.java
@@ -17,12 +17,15 @@
 
 package org.apache.zeppelin.groovy;
 
-import java.util.List;
-import java.util.Map;
 import org.apache.zeppelin.interpreter.BaseZeppelinContext;
 import org.apache.zeppelin.interpreter.InterpreterHookRegistry;
 
-/** ZeppelinContext for Groovy */
+import java.util.List;
+import java.util.Map;
+
+/**
+ * ZeppelinContext for Groovy
+ */
 public class GroovyZeppelinContext extends BaseZeppelinContext {
 
   public GroovyZeppelinContext(InterpreterHookRegistry hooks, int maxResult) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/hbase/pom.xml
----------------------------------------------------------------------
diff --git a/hbase/pom.xml b/hbase/pom.xml
index 46886fd..f189c07 100644
--- a/hbase/pom.xml
+++ b/hbase/pom.xml
@@ -124,6 +124,13 @@
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/hbase/src/main/java/org/apache/zeppelin/hbase/HbaseInterpreter.java
----------------------------------------------------------------------
diff --git a/hbase/src/main/java/org/apache/zeppelin/hbase/HbaseInterpreter.java b/hbase/src/main/java/org/apache/zeppelin/hbase/HbaseInterpreter.java
index 9c92cc5..adddacf 100644
--- a/hbase/src/main/java/org/apache/zeppelin/hbase/HbaseInterpreter.java
+++ b/hbase/src/main/java/org/apache/zeppelin/hbase/HbaseInterpreter.java
@@ -14,6 +14,11 @@
 
 package org.apache.zeppelin.hbase;
 
+import org.jruby.embed.LocalContextScope;
+import org.jruby.embed.ScriptingContainer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -22,6 +27,7 @@ import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.List;
 import java.util.Properties;
+
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -29,25 +35,22 @@ import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
-import org.jruby.embed.LocalContextScope;
-import org.jruby.embed.ScriptingContainer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
- * Support for HBase Shell. All the commands documented here http://hbase.apache.org/book.html#shell
- * is supported.
+ * Support for HBase Shell. All the commands documented here
+ * http://hbase.apache.org/book.html#shell is supported.
  *
- * <p>Requirements: HBase Shell should be installed on the same machine. To be more specific, the
- * following dir. should be available:
- * https://github.com/apache/hbase/tree/master/hbase-shell/src/main/ruby HBase Shell should be able
- * to connect to the HBase cluster from terminal. This makes sure that the client is configured
- * properly.
+ * Requirements:
+ * HBase Shell should be installed on the same machine. To be more specific, the following dir.
+ * should be available: https://github.com/apache/hbase/tree/master/hbase-shell/src/main/ruby
+ * HBase Shell should be able to connect to the HBase cluster from terminal. This makes sure
+ * that the client is configured properly.
  *
- * <p>The interpreter takes 3 config parameters: hbase.home: Root directory where HBase is
- * installed. Default is /usr/lib/hbase/ hbase.ruby.sources: Dir where shell ruby code is installed.
- * Path is relative to hbase.home. Default: lib/ruby zeppelin.hbase.test.mode: (Testing only)
- * Disable checks for unit and manual tests. Default: false
+ * The interpreter takes 3 config parameters:
+ * hbase.home: Root directory where HBase is installed. Default is /usr/lib/hbase/
+ * hbase.ruby.sources: Dir where shell ruby code is installed.
+ *                          Path is relative to hbase.home. Default: lib/ruby
+ * zeppelin.hbase.test.mode: (Testing only) Disable checks for unit and manual tests. Default: false
  */
 public class HbaseInterpreter extends Interpreter {
   public static final String HBASE_HOME = "hbase.home";
@@ -65,7 +68,7 @@ public class HbaseInterpreter extends Interpreter {
 
   @Override
   public void open() throws InterpreterException {
-    this.scriptingContainer = new ScriptingContainer(LocalContextScope.SINGLETON);
+    this.scriptingContainer  = new ScriptingContainer(LocalContextScope.SINGLETON);
     this.writer = new StringWriter();
     scriptingContainer.setOutput(this.writer);
 
@@ -79,8 +82,8 @@ public class HbaseInterpreter extends Interpreter {
 
       File f = absRubySrc.toFile();
       if (!f.exists() || !f.isDirectory()) {
-        throw new InterpreterException(
-            "HBase ruby sources is not available at '" + absRubySrc + "'");
+        throw new InterpreterException("HBase ruby sources is not available at '" + absRubySrc
+            + "'");
       }
 
       logger.info("Absolute Ruby Source:" + absRubySrc.toString());
@@ -136,17 +139,20 @@ public class HbaseInterpreter extends Interpreter {
 
   @Override
   public Scheduler getScheduler() {
-    return SchedulerFactory.singleton()
-        .createOrGetFIFOScheduler(HbaseInterpreter.class.getName() + this.hashCode());
+    return SchedulerFactory.singleton().createOrGetFIFOScheduler(
+        HbaseInterpreter.class.getName() + this.hashCode());
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return null;
   }
 
-  private static String getSystemDefault(String envName, String propertyName, String defaultValue) {
+  private static String getSystemDefault(
+      String envName,
+      String propertyName,
+      String defaultValue) {
 
     if (envName != null && !envName.isEmpty()) {
       String envValue = System.getenv().get(envName);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/hbase/src/test/java/org/apache/zeppelin/hbase/HbaseInterpreterTest.java
----------------------------------------------------------------------
diff --git a/hbase/src/test/java/org/apache/zeppelin/hbase/HbaseInterpreterTest.java b/hbase/src/test/java/org/apache/zeppelin/hbase/HbaseInterpreterTest.java
index 82dd44c..37110d8 100644
--- a/hbase/src/test/java/org/apache/zeppelin/hbase/HbaseInterpreterTest.java
+++ b/hbase/src/test/java/org/apache/zeppelin/hbase/HbaseInterpreterTest.java
@@ -18,16 +18,20 @@ import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.notNullValue;
 import static org.junit.Assert.assertEquals;
 
-import java.util.Properties;
 import org.apache.log4j.BasicConfigurator;
-import org.apache.zeppelin.interpreter.InterpreterException;
-import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Tests for HBase Interpreter. */
+import java.util.Properties;
+
+import org.apache.zeppelin.interpreter.InterpreterException;
+import org.apache.zeppelin.interpreter.InterpreterResult;
+
+/**
+ * Tests for HBase Interpreter.
+ */
 public class HbaseInterpreterTest {
   private static Logger logger = LoggerFactory.getLogger(HbaseInterpreterTest.class);
   private static HbaseInterpreter hbaseInterpreter;
@@ -43,7 +47,7 @@ public class HbaseInterpreterTest {
     hbaseInterpreter = new HbaseInterpreter(properties);
     hbaseInterpreter.open();
   }
-
+  
   @Test
   public void newObject() {
     assertThat(hbaseInterpreter, notNullValue());
@@ -56,10 +60,10 @@ public class HbaseInterpreterTest {
     assertEquals(result.message().get(0).getType(), InterpreterResult.Type.TEXT);
     assertEquals("Hello World\n", result.message().get(0).getData());
   }
-
+  
   public void putsLoadPath() {
-    InterpreterResult result =
-        hbaseInterpreter.interpret("require 'two_power'; puts twoToThePowerOf(4)", null);
+    InterpreterResult result = hbaseInterpreter.interpret(
+            "require 'two_power'; puts twoToThePowerOf(4)", null);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals(result.message().get(0).getType(), InterpreterResult.Type.TEXT);
     assertEquals("16\n", result.message().get(0).getData());
@@ -69,8 +73,7 @@ public class HbaseInterpreterTest {
   public void testException() {
     InterpreterResult result = hbaseInterpreter.interpret("plot practical joke", null);
     assertEquals(InterpreterResult.Code.ERROR, result.code());
-    assertEquals(
-        "(NameError) undefined local variable or method `joke' for main:Object",
-        result.message().get(0).getData());
+    assertEquals("(NameError) undefined local variable or method `joke' for main:Object",
+            result.message().get(0).getData());
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/helium-dev/src/main/java/org/apache/zeppelin/helium/DevInterpreter.java
----------------------------------------------------------------------
diff --git a/helium-dev/src/main/java/org/apache/zeppelin/helium/DevInterpreter.java b/helium-dev/src/main/java/org/apache/zeppelin/helium/DevInterpreter.java
index 99c029b..00846de 100644
--- a/helium-dev/src/main/java/org/apache/zeppelin/helium/DevInterpreter.java
+++ b/helium-dev/src/main/java/org/apache/zeppelin/helium/DevInterpreter.java
@@ -17,17 +17,20 @@
 
 package org.apache.zeppelin.helium;
 
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 
-/** Dummy interpreter to support development mode for Zeppelin app */
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * Dummy interpreter to support development mode for Zeppelin app
+ */
 public class DevInterpreter extends Interpreter {
 
   private InterpreterEvent interpreterEvent;
@@ -38,7 +41,9 @@ public class DevInterpreter extends Interpreter {
     return replName.equals("dev");
   }
 
-  /** event handler for org.apache.zeppelin.helium.ZeppelinApplicationDevServer */
+  /**
+   * event handler for org.apache.zeppelin.helium.ZeppelinApplicationDevServer
+   */
   public static interface InterpreterEvent {
     public InterpreterResult interpret(String st, InterpreterContext context);
   }
@@ -58,7 +63,8 @@ public class DevInterpreter extends Interpreter {
   }
 
   @Override
-  public void close() {}
+  public void close() {
+  }
 
   public void rerun() {
     try {
@@ -81,7 +87,8 @@ public class DevInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+  }
 
   @Override
   public FormType getFormType() {
@@ -94,8 +101,8 @@ public class DevInterpreter extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return new LinkedList<>();
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/helium-dev/src/main/java/org/apache/zeppelin/helium/DevZeppelinContext.java
----------------------------------------------------------------------
diff --git a/helium-dev/src/main/java/org/apache/zeppelin/helium/DevZeppelinContext.java b/helium-dev/src/main/java/org/apache/zeppelin/helium/DevZeppelinContext.java
index 744cd3d..75d193c 100644
--- a/helium-dev/src/main/java/org/apache/zeppelin/helium/DevZeppelinContext.java
+++ b/helium-dev/src/main/java/org/apache/zeppelin/helium/DevZeppelinContext.java
@@ -15,14 +15,18 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.helium;
 
-import java.util.List;
-import java.util.Map;
 import org.apache.zeppelin.interpreter.BaseZeppelinContext;
 import org.apache.zeppelin.interpreter.InterpreterHookRegistry;
 
-/** ZeppelinContext for DevInterpreter */
+import java.util.List;
+import java.util.Map;
+
+/**
+ * ZeppelinContext for DevInterpreter
+ */
 public class DevZeppelinContext extends BaseZeppelinContext {
   public DevZeppelinContext(InterpreterHookRegistry hooks, int maxResult) {
     super(hooks, maxResult);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/helium-dev/src/main/java/org/apache/zeppelin/helium/ZeppelinApplicationDevServer.java
----------------------------------------------------------------------
diff --git a/helium-dev/src/main/java/org/apache/zeppelin/helium/ZeppelinApplicationDevServer.java b/helium-dev/src/main/java/org/apache/zeppelin/helium/ZeppelinApplicationDevServer.java
index edb1230..d0118e5 100644
--- a/helium-dev/src/main/java/org/apache/zeppelin/helium/ZeppelinApplicationDevServer.java
+++ b/helium-dev/src/main/java/org/apache/zeppelin/helium/ZeppelinApplicationDevServer.java
@@ -17,9 +17,10 @@
 
 package org.apache.zeppelin.helium;
 
-import com.google.gson.Gson;
 import java.io.IOException;
 import java.lang.reflect.Constructor;
+
+import com.google.gson.Gson;
 import org.apache.log4j.ConsoleAppender;
 import org.apache.log4j.Level;
 import org.apache.log4j.PatternLayout;
@@ -30,7 +31,9 @@ import org.apache.zeppelin.resource.ResourceSet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Run this server for development mode. */
+/**
+ * Run this server for development mode.
+ */
 public class ZeppelinApplicationDevServer extends ZeppelinDevServer {
   final Logger logger = LoggerFactory.getLogger(ZeppelinApplicationDevServer.class);
 
@@ -39,13 +42,13 @@ public class ZeppelinApplicationDevServer extends ZeppelinDevServer {
   private Application app;
   private InterpreterOutput out;
 
-  public ZeppelinApplicationDevServer(final String className, ResourceSet resourceSet)
-      throws Exception {
+  public ZeppelinApplicationDevServer(final String className, ResourceSet resourceSet) throws
+      Exception {
     this(Constants.ZEPPELIN_INTERPRETER_DEFAUlT_PORT, className, resourceSet);
   }
 
-  public ZeppelinApplicationDevServer(int port, String className, ResourceSet resourceSet)
-      throws Exception {
+  public ZeppelinApplicationDevServer(int port, String className, ResourceSet resourceSet) throws
+      Exception {
     super(port);
     this.className = className;
     this.resourceSet = resourceSet;
@@ -53,16 +56,17 @@ public class ZeppelinApplicationDevServer extends ZeppelinDevServer {
   };
 
   void setLogger() {
-    ConsoleAppender console = new ConsoleAppender(); // create appender
-    // configure the appender
+    ConsoleAppender console = new ConsoleAppender(); //create appender
+    //configure the appender
     String PATTERN = "%d [%p|%c|%C{1}] %m%n";
     console.setLayout(new PatternLayout(PATTERN));
     console.setThreshold(Level.DEBUG);
     console.activateOptions();
-    // add appender to any Logger (here is root)
+    //add appender to any Logger (here is root)
     org.apache.log4j.Logger.getRootLogger().addAppender(console);
   }
 
+
   @Override
   public InterpreterResult interpret(String st, InterpreterContext context) {
     if (app == null) {
@@ -136,29 +140,28 @@ public class ZeppelinApplicationDevServer extends ZeppelinDevServer {
     if (out == null) {
       final RemoteInterpreterEventClient eventClient = getIntpEventClient();
       try {
-        out =
-            new InterpreterOutput(
-                new InterpreterOutputListener() {
-                  @Override
-                  public void onUpdateAll(InterpreterOutput out) {}
-
-                  @Override
-                  public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
-                    eventClient.onInterpreterOutputAppend(
-                        noteId, paragraphId, index, new String(line));
-                  }
-
-                  @Override
-                  public void onUpdate(int index, InterpreterResultMessageOutput out) {
-                    try {
-                      eventClient.onInterpreterOutputUpdate(
-                          noteId, paragraphId, index, out.getType(), new String(out.toByteArray()));
-                    } catch (IOException e) {
-                      logger.error(e.getMessage(), e);
-                    }
-                  }
-                },
-                this);
+        out = new InterpreterOutput(new InterpreterOutputListener() {
+          @Override
+          public void onUpdateAll(InterpreterOutput out) {
+
+          }
+
+          @Override
+          public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
+            eventClient.onInterpreterOutputAppend(noteId, paragraphId, index, new String(line));
+          }
+
+          @Override
+          public void onUpdate(int index, InterpreterResultMessageOutput out) {
+            try {
+              eventClient.onInterpreterOutputUpdate(noteId, paragraphId,
+                  index, out.getType(), new String(out.toByteArray()));
+            } catch (IOException e) {
+              logger.error(e.getMessage(), e);
+            }
+          }
+
+        }, this);
       } catch (IOException e) {
         return null;
       }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/helium-dev/src/main/java/org/apache/zeppelin/helium/ZeppelinDevServer.java
----------------------------------------------------------------------
diff --git a/helium-dev/src/main/java/org/apache/zeppelin/helium/ZeppelinDevServer.java b/helium-dev/src/main/java/org/apache/zeppelin/helium/ZeppelinDevServer.java
index e260510..4c0e867 100644
--- a/helium-dev/src/main/java/org/apache/zeppelin/helium/ZeppelinDevServer.java
+++ b/helium-dev/src/main/java/org/apache/zeppelin/helium/ZeppelinDevServer.java
@@ -20,6 +20,7 @@ package org.apache.zeppelin.helium;
 import java.io.File;
 import java.io.IOException;
 import java.util.HashMap;
+
 import org.apache.thrift.TException;
 import org.apache.zeppelin.helium.DevInterpreter.InterpreterEvent;
 import org.apache.zeppelin.interpreter.*;
@@ -28,14 +29,15 @@ import org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Interpreter development server */
-public class ZeppelinDevServer extends RemoteInterpreterServer
-    implements InterpreterEvent, InterpreterOutputChangeListener {
+/**
+ * Interpreter development server
+ */
+public class ZeppelinDevServer extends
+    RemoteInterpreterServer implements InterpreterEvent, InterpreterOutputChangeListener {
   private static final Logger logger = LoggerFactory.getLogger(ZeppelinDevServer.class);
 
   private DevInterpreter interpreter = null;
   private InterpreterOutput out;
-
   public ZeppelinDevServer(int port) throws TException, IOException {
     super(null, port, null, ":");
   }
@@ -56,7 +58,8 @@ public class ZeppelinDevServer extends RemoteInterpreterServer
     }
 
     Interpreter intp = super.getInterpreter(sessionId, className);
-    interpreter = (DevInterpreter) (((LazyOpenInterpreter) intp).getInnerInterpreter());
+    interpreter = (DevInterpreter) (
+        ((LazyOpenInterpreter) intp).getInnerInterpreter());
     interpreter.setInterpreterEvent(this);
     return super.getInterpreter(sessionId, className);
   }
@@ -67,29 +70,27 @@ public class ZeppelinDevServer extends RemoteInterpreterServer
     if (out == null) {
       final RemoteInterpreterEventClient eventClient = getIntpEventClient();
       try {
-        out =
-            new InterpreterOutput(
-                new InterpreterOutputListener() {
-                  @Override
-                  public void onUpdateAll(InterpreterOutput out) {}
-
-                  @Override
-                  public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
-                    eventClient.onInterpreterOutputAppend(
-                        noteId, paragraphId, index, new String(line));
-                  }
-
-                  @Override
-                  public void onUpdate(int index, InterpreterResultMessageOutput out) {
-                    try {
-                      eventClient.onInterpreterOutputUpdate(
-                          noteId, paragraphId, index, out.getType(), new String(out.toByteArray()));
-                    } catch (IOException e) {
-                      logger.error(e.getMessage(), e);
-                    }
-                  }
-                },
-                this);
+        out = new InterpreterOutput(new InterpreterOutputListener() {
+          @Override
+          public void onUpdateAll(InterpreterOutput out) {
+
+          }
+
+          @Override
+          public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
+            eventClient.onInterpreterOutputAppend(noteId, paragraphId, index, new String(line));
+          }
+
+          @Override
+          public void onUpdate(int index, InterpreterResultMessageOutput out) {
+            try {
+              eventClient.onInterpreterOutputUpdate(noteId, paragraphId,
+                  index, out.getType(), new String(out.toByteArray()));
+            } catch (IOException e) {
+              logger.error(e.getMessage(), e);
+            }
+          }
+        }, this);
       } catch (IOException e) {
         return null;
       }
@@ -114,7 +115,9 @@ public class ZeppelinDevServer extends RemoteInterpreterServer
     interpreter.rerun();
   }
 
-  /** Wait until %dev paragraph is executed and connected to this process */
+  /**
+   * Wait until %dev paragraph is executed and connected to this process
+   */
   public void waitForConnected() {
     synchronized (this) {
       while (!isConnected()) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/ignite/pom.xml
----------------------------------------------------------------------
diff --git a/ignite/pom.xml b/ignite/pom.xml
index cd778b8..7d7b3db 100644
--- a/ignite/pom.xml
+++ b/ignite/pom.xml
@@ -114,6 +114,13 @@
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteInterpreter.java
----------------------------------------------------------------------
diff --git a/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteInterpreter.java b/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteInterpreter.java
index 9aa85a2..e104039 100644
--- a/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteInterpreter.java
+++ b/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteInterpreter.java
@@ -16,6 +16,14 @@
  */
 package org.apache.zeppelin.ignite;
 
+import org.apache.ignite.Ignite;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.PrintWriter;
@@ -27,21 +35,7 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
-import org.apache.zeppelin.interpreter.Interpreter;
-import org.apache.zeppelin.interpreter.InterpreterContext;
-import org.apache.zeppelin.interpreter.InterpreterResult;
-import org.apache.zeppelin.interpreter.InterpreterResult.Code;
-import org.apache.zeppelin.interpreter.InterpreterUtils;
-import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
-import org.apache.zeppelin.scheduler.Scheduler;
-import org.apache.zeppelin.scheduler.SchedulerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+
 import scala.Console;
 import scala.Some;
 import scala.collection.JavaConversions;
@@ -51,20 +45,29 @@ import scala.tools.nsc.interpreter.Results.Result;
 import scala.tools.nsc.settings.MutableSettings.BooleanSetting;
 import scala.tools.nsc.settings.MutableSettings.PathSetting;
 
+import org.apache.zeppelin.interpreter.Interpreter;
+import org.apache.zeppelin.interpreter.InterpreterContext;
+import org.apache.zeppelin.interpreter.InterpreterResult;
+import org.apache.zeppelin.interpreter.InterpreterResult.Code;
+import org.apache.zeppelin.interpreter.InterpreterUtils;
+import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
+import org.apache.zeppelin.scheduler.Scheduler;
+import org.apache.zeppelin.scheduler.SchedulerFactory;
+
 /**
  * Apache Ignite interpreter (http://ignite.incubator.apache.org/).
  *
- * <p>Use the following properties for interpreter configuration:
+ * Use the following properties for interpreter configuration:
  *
  * <ul>
- *   <li>{@code ignite.addresses} - coma separated list of hosts in form {@code <host>:<port>} or
- *       {@code <host>:<port_1>..<port_n>}
- *   <li>{@code ignite.clientMode} - indicates that Ignite interpreter should start node in client
- *       mode ({@code true} or {@code false}).
- *   <li>{@code ignite.peerClassLoadingEnabled} - enables/disables peer class loading ({@code true}
- *       or {@code false}).
- *   <li>{@code ignite.config.url} - URL for Ignite configuration. If this URL specified then all
- *       aforementioned properties will not be taken in account.
+ *     <li>{@code ignite.addresses} - coma separated list of hosts in form {@code <host>:<port>}
+ *     or {@code <host>:<port_1>..<port_n>} </li>
+ *     <li>{@code ignite.clientMode} - indicates that Ignite interpreter
+ *     should start node in client mode ({@code true} or {@code false}).</li>
+ *     <li>{@code ignite.peerClassLoadingEnabled} - enables/disables peer class loading
+ *     ({@code true} or {@code false}).</li>
+ *     <li>{@code ignite.config.url} - URL for Ignite configuration. If this URL specified then
+ *     all aforementioned properties will not be taken in account.</li>
  * </ul>
  */
 public class IgniteInterpreter extends Interpreter {
@@ -159,11 +162,9 @@ public class IgniteInterpreter extends Interpreter {
   }
 
   public Object getLastObject() {
-    Object obj =
-        imain
-            .lastRequest()
-            .lineRep()
-            .call("$result", JavaConversions.asScalaBuffer(new LinkedList<>()));
+    Object obj = imain.lastRequest().lineRep().call(
+        "$result",
+        JavaConversions.asScalaBuffer(new LinkedList<>()));
     return obj;
   }
 
@@ -187,14 +188,14 @@ public class IgniteInterpreter extends Interpreter {
           conf.setDiscoverySpi(discoSpi);
 
           conf.setPeerClassLoadingEnabled(
-              Boolean.parseBoolean(getProperty(IGNITE_PEER_CLASS_LOADING_ENABLED)));
+                  Boolean.parseBoolean(getProperty(IGNITE_PEER_CLASS_LOADING_ENABLED)));
 
           ignite = Ignition.start(conf);
         }
 
         initEx = null;
       } catch (Exception e) {
-        logger.error("Error in IgniteInterpreter while getIgnite: ", e);
+        logger.error("Error in IgniteInterpreter while getIgnite: " , e);
         initEx = e;
       }
     }
@@ -210,10 +211,9 @@ public class IgniteInterpreter extends Interpreter {
       if (getIgnite() != null) {
         binder.put("ignite", ignite);
 
-        imain.interpret(
-            "@transient val ignite = "
-                + "_binder.get(\"ignite\")"
-                + ".asInstanceOf[org.apache.ignite.Ignite]");
+        imain.interpret("@transient val ignite = "
+            + "_binder.get(\"ignite\")"
+            + ".asInstanceOf[org.apache.ignite.Ignite]");
       }
     } finally {
       Thread.currentThread().setContextClassLoader(contextClassLoader);
@@ -263,7 +263,8 @@ public class IgniteInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+  }
 
   private InterpreterResult interpret(String[] lines) {
     String[] linesToRun = new String[lines.length + 1];
@@ -276,7 +277,7 @@ public class IgniteInterpreter extends Interpreter {
 
     String incomplete = "";
     for (int l = 0; l < linesToRun.length; l++) {
-      String s = linesToRun[l];
+      String s = linesToRun[l];      
       // check if next line starts with "." (but not ".." or "./") it is treated as an invocation
       if (l + 1 < linesToRun.length) {
         String nextLine = linesToRun[l + 1].trim();
@@ -333,14 +334,14 @@ public class IgniteInterpreter extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return new LinkedList<>();
   }
 
   @Override
   public Scheduler getScheduler() {
-    return SchedulerFactory.singleton()
-        .createOrGetFIFOScheduler(IgniteInterpreter.class.getName() + this.hashCode());
+    return SchedulerFactory.singleton().createOrGetFIFOScheduler(
+            IgniteInterpreter.class.getName() + this.hashCode());
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteInterpreterUtils.java
----------------------------------------------------------------------
diff --git a/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteInterpreterUtils.java b/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteInterpreterUtils.java
index 936f081..74a0a7f 100644
--- a/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteInterpreterUtils.java
+++ b/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteInterpreterUtils.java
@@ -19,11 +19,12 @@ package org.apache.zeppelin.ignite;
 
 import org.apache.zeppelin.interpreter.InterpreterResult;
 
-/** Apache Ignite interpreter utils. */
+/**
+ * Apache Ignite interpreter utils.
+ */
 public class IgniteInterpreterUtils {
   /**
    * Builds error result from given exception.
-   *
    * @param e Exception.
    * @return result.
    */

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteSqlInterpreter.java
----------------------------------------------------------------------
diff --git a/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteSqlInterpreter.java b/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteSqlInterpreter.java
index 8357740..100a733 100644
--- a/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteSqlInterpreter.java
+++ b/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteSqlInterpreter.java
@@ -16,6 +16,9 @@
  */
 package org.apache.zeppelin.ignite;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.ResultSet;
@@ -25,6 +28,7 @@ import java.sql.Statement;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Properties;
+
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -33,20 +37,19 @@ import org.apache.zeppelin.interpreter.InterpreterResult.Code;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Apache Ignite SQL interpreter (http://ignite.incubator.apache.org/).
  *
- * <p>Use {@code ignite.jdbc.url} property to set up JDBC connection URL. URL has the following
- * pattern: {@code jdbc:ignite://<hostname>:<port>/<cache_name>}
+ * Use {@code ignite.jdbc.url} property to set up JDBC connection URL.
+ * URL has the following pattern:
+ * {@code jdbc:ignite://<hostname>:<port>/<cache_name>}
  *
  * <ul>
- *   <li>Hostname is required.
- *   <li>If port is not defined, 11211 is used (default for Ignite client).
- *   <li>Leave cache_name empty if you are connecting to a default cache. Note that the cache name
- *       is case sensitive.
+ *     <li>Hostname is required.</li>
+ *     <li>If port is not defined, 11211 is used (default for Ignite client).</li>
+ *     <li>Leave cache_name empty if you are connecting to a default cache.
+ *     Note that the cache name is case sensitive.</li>
  * </ul>
  */
 public class IgniteSqlInterpreter extends Interpreter {
@@ -176,13 +179,13 @@ public class IgniteSqlInterpreter extends Interpreter {
 
   @Override
   public Scheduler getScheduler() {
-    return SchedulerFactory.singleton()
-        .createOrGetFIFOScheduler(IgniteSqlInterpreter.class.getName() + this.hashCode());
+    return SchedulerFactory.singleton().createOrGetFIFOScheduler(
+            IgniteSqlInterpreter.class.getName() + this.hashCode());
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return new LinkedList<>();
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteInterpreterTest.java
----------------------------------------------------------------------
diff --git a/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteInterpreterTest.java b/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteInterpreterTest.java
index 11b39d7..de4588e 100644
--- a/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteInterpreterTest.java
+++ b/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteInterpreterTest.java
@@ -16,11 +16,6 @@
  */
 package org.apache.zeppelin.ignite;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Collections;
-import java.util.Properties;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -32,7 +27,15 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-/** Tests for Apache Ignite interpreter ({@link IgniteInterpreter}). */
+import java.util.Collections;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * Tests for Apache Ignite interpreter ({@link IgniteInterpreter}).
+ */
 public class IgniteInterpreterTest {
   private static final String HOST = "127.0.0.1:47500..47509";
 
@@ -57,9 +60,8 @@ public class IgniteInterpreterTest {
     ignite = Ignition.start(cfg);
 
     Properties props = new Properties();
-    props.setProperty(
-        IgniteSqlInterpreter.IGNITE_JDBC_URL,
-        "jdbc:ignite:cfg://cache=person@default-ignite-jdbc.xml");
+    props.setProperty(IgniteSqlInterpreter.IGNITE_JDBC_URL,
+            "jdbc:ignite:cfg://cache=person@default-ignite-jdbc.xml");
     props.setProperty(IgniteInterpreter.IGNITE_CLIENT_MODE, "false");
     props.setProperty(IgniteInterpreter.IGNITE_PEER_CLASS_LOADING_ENABLED, "false");
     props.setProperty(IgniteInterpreter.IGNITE_ADDRESSES, HOST);
@@ -78,21 +80,12 @@ public class IgniteInterpreterTest {
   public void testInterpret() {
     String sizeVal = "size";
 
-    InterpreterResult result =
-        intp.interpret(
-            "import org.apache.ignite.IgniteCache\n"
-                + "val "
-                + sizeVal
-                + " = ignite.cluster().nodes().size()",
-            INTP_CONTEXT);
+    InterpreterResult result = intp.interpret("import org.apache.ignite.IgniteCache\n" +
+            "val " + sizeVal + " = ignite.cluster().nodes().size()", INTP_CONTEXT);
 
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
-    assertTrue(
-        result
-            .message()
-            .get(0)
-            .getData()
-            .contains(sizeVal + ": Int = " + ignite.cluster().nodes().size()));
+    assertTrue(result.message().get(0).getData().contains(sizeVal + ": Int = " +
+            ignite.cluster().nodes().size()));
 
     result = intp.interpret("\"123\"\n  .toInt", INTP_CONTEXT);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteSqlInterpreterTest.java
----------------------------------------------------------------------
diff --git a/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteSqlInterpreterTest.java b/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteSqlInterpreterTest.java
index dd38614..3597769 100644
--- a/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteSqlInterpreterTest.java
+++ b/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteSqlInterpreterTest.java
@@ -16,10 +16,6 @@
  */
 package org.apache.zeppelin.ignite;
 
-import static org.junit.Assert.assertEquals;
-
-import java.util.Collections;
-import java.util.Properties;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
@@ -36,7 +32,14 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-/** Tests for Apache Ignite SQL interpreter ({@link IgniteSqlInterpreter}). */
+import java.util.Collections;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Tests for Apache Ignite SQL interpreter ({@link IgniteSqlInterpreter}).
+ */
 public class IgniteSqlInterpreterTest {
   private static final String HOST = "127.0.0.1:47500..47509";
 
@@ -62,9 +65,8 @@ public class IgniteSqlInterpreterTest {
     ignite = Ignition.start(cfg);
 
     Properties props = new Properties();
-    props.setProperty(
-        IgniteSqlInterpreter.IGNITE_JDBC_URL,
-        "jdbc:ignite:cfg://cache=person@default-ignite-jdbc.xml");
+    props.setProperty(IgniteSqlInterpreter.IGNITE_JDBC_URL,
+            "jdbc:ignite:cfg://cache=person@default-ignite-jdbc.xml");
 
     intp = new IgniteSqlInterpreter(props);
 
@@ -88,8 +90,8 @@ public class IgniteSqlInterpreterTest {
 
   @Test
   public void testSql() {
-    InterpreterResult result =
-        intp.interpret("select name, age from person where age > 10", INTP_CONTEXT);
+    InterpreterResult result = intp.interpret("select name, age from person where age > 10",
+            INTP_CONTEXT);
 
     assertEquals(Code.SUCCESS, result.code());
     assertEquals(Type.TABLE, result.message().get(0).getType());

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/ignite/src/test/java/org/apache/zeppelin/ignite/Person.java
----------------------------------------------------------------------
diff --git a/ignite/src/test/java/org/apache/zeppelin/ignite/Person.java b/ignite/src/test/java/org/apache/zeppelin/ignite/Person.java
index 7b863d2..e8bef93 100644
--- a/ignite/src/test/java/org/apache/zeppelin/ignite/Person.java
+++ b/ignite/src/test/java/org/apache/zeppelin/ignite/Person.java
@@ -16,13 +16,16 @@
  */
 package org.apache.zeppelin.ignite;
 
-import java.io.Serializable;
 import org.apache.ignite.cache.query.annotations.QuerySqlField;
 
+import java.io.Serializable;
+
 public class Person implements Serializable {
-  @QuerySqlField private String name;
+  @QuerySqlField
+  private String name;
 
-  @QuerySqlField private int age;
+  @QuerySqlField
+  private int age;
 
   public Person(String name, int age) {
     this.name = name;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/java/pom.xml
----------------------------------------------------------------------
diff --git a/java/pom.xml b/java/pom.xml
index 0bbb8e8..9e9bbc6 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -76,6 +76,13 @@
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/java/src/main/java/org/apache/zeppelin/java/JavaInterpreter.java
----------------------------------------------------------------------
diff --git a/java/src/main/java/org/apache/zeppelin/java/JavaInterpreter.java b/java/src/main/java/org/apache/zeppelin/java/JavaInterpreter.java
index 3690e35..1346bc7 100644
--- a/java/src/main/java/org/apache/zeppelin/java/JavaInterpreter.java
+++ b/java/src/main/java/org/apache/zeppelin/java/JavaInterpreter.java
@@ -17,11 +17,6 @@
 
 package org.apache.zeppelin.java;
 
-import java.io.File;
-import java.util.Collections;
-import java.util.List;
-import java.util.Properties;
-import java.util.UUID;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
@@ -29,7 +24,15 @@ import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Java interpreter */
+import java.io.File;
+import java.util.Collections;
+import java.util.List;
+import java.util.Properties;
+import java.util.UUID;
+
+/**
+ * Java interpreter
+ */
 public class JavaInterpreter extends Interpreter {
 
   private static final Logger logger = LoggerFactory.getLogger(JavaInterpreter.class);
@@ -39,7 +42,9 @@ public class JavaInterpreter extends Interpreter {
   }
 
   @Override
-  public void open() {}
+  public void open() {
+
+  }
 
   @Override
   public void close() {
@@ -66,11 +71,15 @@ public class JavaInterpreter extends Interpreter {
     } catch (Exception e) {
       logger.error("Exception in Interpreter while interpret", e);
       return new InterpreterResult(InterpreterResult.Code.ERROR, e.getMessage());
+
     }
+
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+
+  }
 
   @Override
   public FormType getFormType() {
@@ -83,8 +92,9 @@ public class JavaInterpreter extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+                                                InterpreterContext interpreterContext) {
     return Collections.emptyList();
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/java/src/main/java/org/apache/zeppelin/java/JavaInterpreterUtils.java
----------------------------------------------------------------------
diff --git a/java/src/main/java/org/apache/zeppelin/java/JavaInterpreterUtils.java b/java/src/main/java/org/apache/zeppelin/java/JavaInterpreterUtils.java
index e1f4d53..2a4cc4a 100644
--- a/java/src/main/java/org/apache/zeppelin/java/JavaInterpreterUtils.java
+++ b/java/src/main/java/org/apache/zeppelin/java/JavaInterpreterUtils.java
@@ -20,25 +20,25 @@ package org.apache.zeppelin.java;
 import java.util.Map;
 import java.util.stream.Collectors;
 
-/** Java interpreter utility methods */
+/**
+ * Java interpreter utility methods
+ */
 public class JavaInterpreterUtils {
 
   /**
    * Convert a map to %table display system to leverage Zeppelin's built in visualization
-   *
    * @param keyName Key column name
    * @param valueName Value column name
    * @param rows Map of keys and values
    * @return Zeppelin %table
    */
-  public static String displayTableFromSimpleMap(String keyName, String valueName, Map<?, ?> rows) {
+  public static String displayTableFromSimpleMap(String keyName, String valueName, Map<?, ?> rows){
     String table = "%table\n";
     table += keyName + "\t" + valueName + "\n";
-    table +=
-        rows.entrySet()
-            .stream()
+    table += rows.entrySet().stream()
             .map(e -> e.getKey() + "\t" + e.getValue())
             .collect(Collectors.joining("\n"));
     return table;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/java/src/main/java/org/apache/zeppelin/java/StaticRepl.java
----------------------------------------------------------------------
diff --git a/java/src/main/java/org/apache/zeppelin/java/StaticRepl.java b/java/src/main/java/org/apache/zeppelin/java/StaticRepl.java
index cb9d316..28a3275 100644
--- a/java/src/main/java/org/apache/zeppelin/java/StaticRepl.java
+++ b/java/src/main/java/org/apache/zeppelin/java/StaticRepl.java
@@ -20,6 +20,16 @@ package org.apache.zeppelin.java;
 import com.thoughtworks.qdox.JavaProjectBuilder;
 import com.thoughtworks.qdox.model.JavaClass;
 import com.thoughtworks.qdox.model.JavaSource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.tools.Diagnostic;
+import javax.tools.DiagnosticCollector;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaCompiler.CompilationTask;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.ToolProvider;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.PrintStream;
@@ -30,17 +40,10 @@ import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.Arrays;
 import java.util.List;
-import javax.tools.Diagnostic;
-import javax.tools.DiagnosticCollector;
-import javax.tools.JavaCompiler;
-import javax.tools.JavaCompiler.CompilationTask;
-import javax.tools.JavaFileObject;
-import javax.tools.SimpleJavaFileObject;
-import javax.tools.ToolProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** StaticRepl for compling the java code in memory */
+/**
+ * StaticRepl for compling the java code in memory
+ */
 public class StaticRepl {
   static Logger logger = LoggerFactory.getLogger(StaticRepl.class);
 
@@ -62,8 +65,8 @@ public class StaticRepl {
       boolean hasMain = false;
 
       for (int j = 0; j < classes.get(i).getMethods().size(); j++) {
-        if (classes.get(i).getMethods().get(j).getName().equals("main")
-            && classes.get(i).getMethods().get(j).isStatic()) {
+        if (classes.get(i).getMethods().get(j).getName().equals("main") && classes.get(i)
+            .getMethods().get(j).isStatic()) {
           mainClassName = classes.get(i).getName();
           hasMain = true;
           break;
@@ -72,12 +75,13 @@ public class StaticRepl {
       if (hasMain == true) {
         break;
       }
+
     }
 
     // if there isn't Main method, will retuen error
     if (mainClassName == null) {
-      logger.error(
-          "Exception for Main method", "There isn't any class " + "containing static main method.");
+      logger.error("Exception for Main method", "There isn't any class "
+          + "containing static main method.");
       throw new Exception("There isn't any class containing static main method.");
     }
 
@@ -111,8 +115,8 @@ public class StaticRepl {
         if (diagnostic.getLineNumber() == -1) {
           continue;
         }
-        System.err.println(
-            "line " + diagnostic.getLineNumber() + " : " + diagnostic.getMessage(null));
+        System.err.println("line " + diagnostic.getLineNumber() + " : "
+            + diagnostic.getMessage(null));
       }
       System.out.flush();
       System.err.flush();
@@ -125,12 +129,12 @@ public class StaticRepl {
       try {
 
         // creating new class loader
-        URLClassLoader classLoader =
-            URLClassLoader.newInstance(new URL[] {new File("").toURI().toURL()});
+        URLClassLoader classLoader = URLClassLoader.newInstance(new URL[]{new File("").toURI()
+            .toURL()});
         // execute the Main method
         Class.forName(generatedClassName, true, classLoader)
-            .getDeclaredMethod("main", new Class[] {String[].class})
-            .invoke(null, new Object[] {null});
+            .getDeclaredMethod("main", new Class[]{String[].class})
+            .invoke(null, new Object[]{null});
 
         System.out.flush();
         System.err.flush();
@@ -141,9 +145,7 @@ public class StaticRepl {
 
         return baosOut.toString();
 
-      } catch (ClassNotFoundException
-          | NoSuchMethodException
-          | IllegalAccessException
+      } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException
           | InvocationTargetException e) {
         logger.error("Exception in Interpreter while execution", e);
         System.err.println(e);
@@ -159,7 +161,9 @@ public class StaticRepl {
         System.setErr(oldErr);
       }
     }
+
   }
+
 }
 
 class JavaSourceFromString extends SimpleJavaFileObject {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/jdbc/pom.xml
----------------------------------------------------------------------
diff --git a/jdbc/pom.xml b/jdbc/pom.xml
index 38e1469..ad35a46 100644
--- a/jdbc/pom.xml
+++ b/jdbc/pom.xml
@@ -362,6 +362,13 @@
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>


[17/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/vfs/src/test/java/org/apache/zeppelin/notebook/repo/TestVFSNotebookRepo.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/vfs/src/test/java/org/apache/zeppelin/notebook/repo/TestVFSNotebookRepo.java b/zeppelin-plugins/notebookrepo/vfs/src/test/java/org/apache/zeppelin/notebook/repo/TestVFSNotebookRepo.java
index 72aaf74..452adc0 100644
--- a/zeppelin-plugins/notebookrepo/vfs/src/test/java/org/apache/zeppelin/notebook/repo/TestVFSNotebookRepo.java
+++ b/zeppelin-plugins/notebookrepo/vfs/src/test/java/org/apache/zeppelin/notebook/repo/TestVFSNotebookRepo.java
@@ -17,13 +17,7 @@
 
 package org.apache.zeppelin.notebook.repo;
 
-import static org.junit.Assert.assertEquals;
-
 import com.google.common.collect.ImmutableMap;
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
 import org.apache.commons.io.FileUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.notebook.Note;
@@ -33,6 +27,13 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+
 public class TestVFSNotebookRepo {
 
   private ZeppelinConfiguration zConf;
@@ -43,8 +44,7 @@ public class TestVFSNotebookRepo {
   public void setUp() throws IOException {
     notebookRepo = new VFSNotebookRepo();
     FileUtils.forceMkdir(new File(notebookDir));
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), notebookDir);
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), notebookDir);
     zConf = new ZeppelinConfiguration();
     notebookRepo.init(zConf);
   }
@@ -91,8 +91,7 @@ public class TestVFSNotebookRepo {
 
   @Test
   public void testUpdateSettings() throws IOException {
-    List<NotebookRepoSettingsInfo> repoSettings =
-        notebookRepo.getSettings(AuthenticationInfo.ANONYMOUS);
+    List<NotebookRepoSettingsInfo> repoSettings = notebookRepo.getSettings(AuthenticationInfo.ANONYMOUS);
     assertEquals(1, repoSettings.size());
     NotebookRepoSettingsInfo settingInfo = repoSettings.get(0);
     assertEquals("Notebook Path", settingInfo.name);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/zeppelin-hub/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/ZeppelinHubRepo.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/zeppelin-hub/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/ZeppelinHubRepo.java b/zeppelin-plugins/notebookrepo/zeppelin-hub/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/ZeppelinHubRepo.java
index adc54a1..9dd9fbf 100644
--- a/zeppelin-plugins/notebookrepo/zeppelin-hub/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/ZeppelinHubRepo.java
+++ b/zeppelin-plugins/notebookrepo/zeppelin-hub/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/ZeppelinHubRepo.java
@@ -16,26 +16,22 @@
  */
 package org.apache.zeppelin.notebook.repo.zeppelinhub;
 
-import com.google.common.base.Joiner;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
 import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.notebook.Note;
 import org.apache.zeppelin.notebook.NoteInfo;
-import org.apache.zeppelin.notebook.repo.NotebookRepoSettingsInfo;
 import org.apache.zeppelin.notebook.repo.NotebookRepoWithVersionControl;
+import org.apache.zeppelin.notebook.repo.NotebookRepoSettingsInfo;
 import org.apache.zeppelin.notebook.repo.zeppelinhub.model.Instance;
-import org.apache.zeppelin.notebook.repo.zeppelinhub.model.UserSessionContainer;
 import org.apache.zeppelin.notebook.repo.zeppelinhub.model.UserTokenContainer;
+import org.apache.zeppelin.notebook.repo.zeppelinhub.model.UserSessionContainer;
 import org.apache.zeppelin.notebook.repo.zeppelinhub.rest.ZeppelinhubRestApiHandler;
 import org.apache.zeppelin.notebook.repo.zeppelinhub.websocket.Client;
 import org.apache.zeppelin.notebook.repo.zeppelinhub.websocket.utils.ZeppelinhubUtils;
@@ -43,7 +39,15 @@ import org.apache.zeppelin.user.AuthenticationInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** ZeppelinHub repo class. */
+import com.google.common.base.Joiner;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Lists;
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+
+/**
+ * ZeppelinHub repo class.
+ */
 public class ZeppelinHubRepo implements NotebookRepoWithVersionControl {
   private static final Logger LOG = LoggerFactory.getLogger(ZeppelinHubRepo.class);
   private static final String DEFAULT_SERVER = "https://www.zeppelinhub.com";
@@ -57,10 +61,12 @@ public class ZeppelinHubRepo implements NotebookRepoWithVersionControl {
 
   private String token;
   private ZeppelinhubRestApiHandler restApiClient;
-
+  
   private ZeppelinConfiguration conf;
 
-  public ZeppelinHubRepo() {}
+  public ZeppelinHubRepo() {
+
+  }
 
   public ZeppelinHubRepo(ZeppelinConfiguration conf) {
     this();
@@ -74,12 +80,11 @@ public class ZeppelinHubRepo implements NotebookRepoWithVersionControl {
 
     token = conf.getString("ZEPPELINHUB_API_TOKEN", ZEPPELIN_CONF_PROP_NAME_TOKEN, "");
     restApiClient = ZeppelinhubRestApiHandler.newInstance(zeppelinHubUrl);
-    // TODO(khalid): check which realm for authentication, pass to token manager
+    //TODO(khalid): check which realm for authentication, pass to token manager
     tokenManager = UserTokenContainer.init(restApiClient, token);
 
-    websocketClient =
-        Client.initialize(
-            getZeppelinWebsocketUri(conf), getZeppelinhubWebsocketUri(conf), token, conf);
+    websocketClient = Client.initialize(getZeppelinWebsocketUri(conf),
+        getZeppelinhubWebsocketUri(conf), token, conf);
     websocketClient.start();
   }
 
@@ -92,10 +97,8 @@ public class ZeppelinHubRepo implements NotebookRepoWithVersionControl {
     }
 
     if (scheme == null) {
-      LOG.info(
-          "{} is not a valid zeppelinhub server address. proceed with default address {}",
-          apiRoot,
-          DEFAULT_SERVER);
+      LOG.info("{} is not a valid zeppelinhub server address. proceed with default address {}",
+          apiRoot, DEFAULT_SERVER);
       apiRoot = new URI(DEFAULT_SERVER);
       scheme = apiRoot.getScheme();
       port = apiRoot.getPort();
@@ -110,11 +113,8 @@ public class ZeppelinHubRepo implements NotebookRepoWithVersionControl {
   String getZeppelinhubWebsocketUri(ZeppelinConfiguration conf) {
     String zeppelinHubUri = StringUtils.EMPTY;
     try {
-      zeppelinHubUri =
-          getZeppelinHubWsUri(
-              new URI(
-                  conf.getString(
-                      "ZEPPELINHUB_API_ADDRESS", ZEPPELIN_CONF_PROP_NAME_SERVER, DEFAULT_SERVER)));
+      zeppelinHubUri = getZeppelinHubWsUri(new URI(conf.getString("ZEPPELINHUB_API_ADDRESS",
+          ZEPPELIN_CONF_PROP_NAME_SERVER, DEFAULT_SERVER)));
     } catch (URISyntaxException e) {
       LOG.error("Cannot get ZeppelinHub URI", e);
     }
@@ -143,8 +143,9 @@ public class ZeppelinHubRepo implements NotebookRepoWithVersionControl {
     URI apiRoot;
     String zeppelinhubUrl;
     try {
-      String url =
-          conf.getString("ZEPPELINHUB_API_ADDRESS", ZEPPELIN_CONF_PROP_NAME_SERVER, DEFAULT_SERVER);
+      String url = conf.getString("ZEPPELINHUB_API_ADDRESS",
+                                  ZEPPELIN_CONF_PROP_NAME_SERVER,
+                                  DEFAULT_SERVER);
       apiRoot = new URI(url);
     } catch (URISyntaxException e) {
       LOG.error("Invalid zeppelinhub url, using default address {}", DEFAULT_SERVER, e);
@@ -153,10 +154,8 @@ public class ZeppelinHubRepo implements NotebookRepoWithVersionControl {
 
     String scheme = apiRoot.getScheme();
     if (scheme == null) {
-      LOG.info(
-          "{} is not a valid zeppelinhub server address. proceed with default address {}",
-          apiRoot,
-          DEFAULT_SERVER);
+      LOG.info("{} is not a valid zeppelinhub server address. proceed with default address {}",
+               apiRoot, DEFAULT_SERVER);
       zeppelinhubUrl = DEFAULT_SERVER;
     } else {
       zeppelinhubUrl = scheme + "://" + apiRoot.getHost();
@@ -173,7 +172,7 @@ public class ZeppelinHubRepo implements NotebookRepoWithVersionControl {
     }
     return (subject.isAnonymous() && !conf.isAnonymousAllowed()) ? false : true;
   }
-
+  
   @Override
   public List<NoteInfo> list(AuthenticationInfo subject) throws IOException {
     if (!isSubjectValid(subject)) {
@@ -239,7 +238,7 @@ public class ZeppelinHubRepo implements NotebookRepoWithVersionControl {
     }
     String endpoint = Joiner.on("/").join(noteId, "checkpoint");
     String content = GSON.toJson(ImmutableMap.of("message", checkpointMsg));
-
+    
     String token = getUserToken(subject.getUser());
     String response = restApiClient.putWithResponseBody(token, endpoint, content);
 
@@ -273,13 +272,13 @@ public class ZeppelinHubRepo implements NotebookRepoWithVersionControl {
     try {
       String token = getUserToken(subject.getUser());
       String response = restApiClient.get(token, endpoint);
-      history = GSON.fromJson(response, new TypeToken<List<Revision>>() {}.getType());
+      history = GSON.fromJson(response, new TypeToken<List<Revision>>(){}.getType());
     } catch (IOException e) {
       LOG.error("Cannot get note history", e);
     }
     return history;
   }
-
+  
   private String getUserToken(String user) {
     return tokenManager.getUserToken(user);
   }
@@ -300,14 +299,13 @@ public class ZeppelinHubRepo implements NotebookRepoWithVersionControl {
     try {
       instances = tokenManager.getUserInstances(zeppelinHubUserSession);
     } catch (IOException e) {
-      LOG.warn(
-          "Couldnt find instances for the session {}, returning empty collection",
+      LOG.warn("Couldnt find instances for the session {}, returning empty collection",
           zeppelinHubUserSession);
       // user not logged
-      // TODO(xxx): handle this case.
+      //TODO(xxx): handle this case.
       instances = Collections.emptyList();
     }
-
+    
     NotebookRepoSettingsInfo repoSetting = NotebookRepoSettingsInfo.newInstance();
     repoSetting.type = NotebookRepoSettingsInfo.Type.DROPDOWN;
     for (Instance instance : instances) {
@@ -383,4 +381,5 @@ public class ZeppelinHubRepo implements NotebookRepoWithVersionControl {
     // Auto-generated method stub
     return null;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/pom.xml
----------------------------------------------------------------------
diff --git a/zeppelin-server/pom.xml b/zeppelin-server/pom.xml
index d30060d..4eaedb2 100644
--- a/zeppelin-server/pom.xml
+++ b/zeppelin-server/pom.xml
@@ -445,6 +445,14 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-dependency-plugin</artifactId>
       </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java
index 7d7d56b..41d9f5d 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java
@@ -16,23 +16,7 @@
  */
 package org.apache.zeppelin.realm;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
 import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
-import javax.naming.ldap.LdapContext;
 import org.apache.commons.lang.StringUtils;
 import org.apache.shiro.authc.AuthenticationException;
 import org.apache.shiro.authc.AuthenticationInfo;
@@ -50,10 +34,29 @@ import org.apache.shiro.subject.PrincipalCollection;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+import javax.naming.ldap.LdapContext;
+
 /**
- * A {@link org.apache.shiro.realm.Realm} that authenticates with an active directory LDAP server to
- * determine the roles for a particular user. This implementation queries for the user's groups and
- * then maps the group names to roles using the {@link #groupRolesMap}.
+ * A {@link org.apache.shiro.realm.Realm} that authenticates with an active directory LDAP
+ * server to determine the roles for a particular user.  This implementation
+ * queries for the user's groups and then maps the group names to roles using the
+ * {@link #groupRolesMap}.
  *
  * @since 0.1
  */
@@ -70,9 +73,9 @@ public class ActiveDirectoryGroupRealm extends AbstractLdapRealm {
   }
 
   /**
-   * Mapping from fully qualified active directory group names (e.g.
-   * CN=Group,OU=Company,DC=MyDomain,DC=local) as returned by the active directory LDAP server to
-   * role names.
+   * Mapping from fully qualified active directory
+   * group names (e.g. CN=Group,OU=Company,DC=MyDomain,DC=local)
+   * as returned by the active directory LDAP server to role names.
    */
   private Map<String, String> groupRolesMap = new LinkedHashMap<>();
 
@@ -106,10 +109,10 @@ public class ActiveDirectoryGroupRealm extends AbstractLdapRealm {
   }
 
   protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token)
-      throws AuthenticationException {
+          throws AuthenticationException {
     try {
-      AuthenticationInfo info =
-          this.queryForAuthenticationInfo(token, this.getLdapContextFactory());
+      AuthenticationInfo info = this.queryForAuthenticationInfo(token,
+          this.getLdapContextFactory());
       return info;
     } catch (javax.naming.AuthenticationException var5) {
       throw new AuthenticationException("LDAP authentication failed.", var5);
@@ -121,15 +124,12 @@ public class ActiveDirectoryGroupRealm extends AbstractLdapRealm {
 
   protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
     try {
-      AuthorizationInfo info =
-          this.queryForAuthorizationInfo(principals, this.getLdapContextFactory());
+      AuthorizationInfo info = this.queryForAuthorizationInfo(principals,
+          this.getLdapContextFactory());
       return info;
     } catch (NamingException var5) {
-      String msg =
-          "LDAP naming error while attempting to "
-              + "retrieve authorization for user ["
-              + principals
-              + "].";
+      String msg = "LDAP naming error while attempting to " +
+          "retrieve authorization for user [" + principals + "].";
       throw new AuthorizationException(msg, var5);
     }
   }
@@ -146,18 +146,18 @@ public class ActiveDirectoryGroupRealm extends AbstractLdapRealm {
 
   /**
    * Builds an {@link AuthenticationInfo} object by querying the active directory LDAP context for
-   * the specified username. This method binds to the LDAP server using the provided username and
-   * password - which if successful, indicates that the password is correct.
+   * the specified username.  This method binds to the LDAP server using the provided username
+   * and password - which if successful, indicates that the password is correct.
+   * <p/>
+   * This method can be overridden by subclasses to query the LDAP server in a more complex way.
    *
-   * <p>This method can be overridden by subclasses to query the LDAP server in a more complex way.
-   *
-   * @param token the authentication token provided by the user.
+   * @param token              the authentication token provided by the user.
    * @param ldapContextFactory the factory used to build connections to the LDAP server.
    * @return an {@link AuthenticationInfo} instance containing information retrieved from LDAP.
    * @throws NamingException if any LDAP errors occur during the search.
    */
-  protected AuthenticationInfo queryForAuthenticationInfo(
-      AuthenticationToken token, LdapContextFactory ldapContextFactory) throws NamingException {
+  protected AuthenticationInfo queryForAuthenticationInfo(AuthenticationToken token,
+          LdapContextFactory ldapContextFactory) throws NamingException {
     UsernamePasswordToken upToken = (UsernamePasswordToken) token;
 
     // Binds using the username and password provided by the user.
@@ -170,7 +170,8 @@ public class ActiveDirectoryGroupRealm extends AbstractLdapRealm {
       if (this.principalSuffix != null && userPrincipalName.indexOf('@') < 0) {
         userPrincipalName = upToken.getUsername() + this.principalSuffix;
       }
-      ctx = ldapContextFactory.getLdapContext(userPrincipalName, upToken.getPassword());
+      ctx = ldapContextFactory.getLdapContext(
+          userPrincipalName, upToken.getPassword());
     } finally {
       LdapUtils.closeContext(ctx);
     }
@@ -201,23 +202,22 @@ public class ActiveDirectoryGroupRealm extends AbstractLdapRealm {
 
   /**
    * Builds an {@link org.apache.shiro.authz.AuthorizationInfo} object by querying the active
-   * directory LDAP context for the groups that a user is a member of. The groups are then
+   * directory LDAP context for the groups that a user is a member of.  The groups are then
    * translated to role names by using the configured {@link #groupRolesMap}.
-   *
-   * <p>This implementation expects the <tt>principal</tt> argument to be a String username.
-   *
-   * <p>Subclasses can override this method to determine authorization data (roles, permissions,
-   * etc) in a more complex way. Note that this default implementation does not support permissions,
+   * <p/>
+   * This implementation expects the <tt>principal</tt> argument to be a String username.
+   * <p/>
+   * Subclasses can override this method to determine authorization data (roles, permissions, etc)
+   * in a more complex way.  Note that this default implementation does not support permissions,
    * only roles.
    *
-   * @param principals the principal of the Subject whose account is being retrieved.
+   * @param principals         the principal of the Subject whose account is being retrieved.
    * @param ldapContextFactory the factory used to create LDAP connections.
    * @return the AuthorizationInfo for the given Subject principal.
    * @throws NamingException if an error occurs when searching the LDAP server.
    */
-  protected AuthorizationInfo queryForAuthorizationInfo(
-      PrincipalCollection principals, LdapContextFactory ldapContextFactory)
-      throws NamingException {
+  protected AuthorizationInfo queryForAuthorizationInfo(PrincipalCollection principals,
+          LdapContextFactory ldapContextFactory) throws NamingException {
     String username = (String) getAvailablePrincipal(principals);
 
     // Perform context search
@@ -238,8 +238,9 @@ public class ActiveDirectoryGroupRealm extends AbstractLdapRealm {
     return new SimpleAuthorizationInfo(roleNames);
   }
 
-  public List<String> searchForUserName(
-      String containString, LdapContext ldapContext, int numUsersToFetch) throws NamingException {
+  public List<String> searchForUserName(String containString, LdapContext ldapContext,
+      int numUsersToFetch)
+          throws NamingException {
     List<String> userNameList = new ArrayList<>();
 
     SearchControls searchCtls = new SearchControls();
@@ -247,10 +248,10 @@ public class ActiveDirectoryGroupRealm extends AbstractLdapRealm {
     searchCtls.setCountLimit(numUsersToFetch);
 
     String searchFilter = "(&(objectClass=*)(userPrincipalName=*" + containString + "*))";
-    Object[] searchArguments = new Object[] {containString};
+    Object[] searchArguments = new Object[]{containString};
 
-    NamingEnumeration answer =
-        ldapContext.search(searchBase, searchFilter, searchArguments, searchCtls);
+    NamingEnumeration answer = ldapContext.search(searchBase, searchFilter, searchArguments,
+        searchCtls);
 
     while (answer.hasMoreElements()) {
       SearchResult sr = (SearchResult) answer.next();
@@ -284,7 +285,7 @@ public class ActiveDirectoryGroupRealm extends AbstractLdapRealm {
   }
 
   private Set<String> getRoleNamesForUser(String username, LdapContext ldapContext)
-      throws NamingException {
+          throws NamingException {
     Set<String> roleNames = new LinkedHashSet<>();
 
     SearchControls searchCtls = new SearchControls();
@@ -295,10 +296,10 @@ public class ActiveDirectoryGroupRealm extends AbstractLdapRealm {
     }
 
     String searchFilter = "(&(objectClass=*)(userPrincipalName=" + userPrincipalName + "))";
-    Object[] searchArguments = new Object[] {userPrincipalName};
+    Object[] searchArguments = new Object[]{userPrincipalName};
 
-    NamingEnumeration answer =
-        ldapContext.search(searchBase, searchFilter, searchArguments, searchCtls);
+    NamingEnumeration answer = ldapContext.search(searchBase, searchFilter, searchArguments,
+        searchCtls);
 
     while (answer.hasMoreElements()) {
       SearchResult sr = (SearchResult) answer.next();
@@ -333,7 +334,7 @@ public class ActiveDirectoryGroupRealm extends AbstractLdapRealm {
 
   /**
    * This method is called by the default implementation to translate Active Directory group names
-   * to role names. This implementation uses the {@link #groupRolesMap} to map group names to role
+   * to role names.  This implementation uses the {@link #groupRolesMap} to map group names to role
    * names.
    *
    * @param groupNames the group names that apply to the current user.
@@ -349,11 +350,12 @@ public class ActiveDirectoryGroupRealm extends AbstractLdapRealm {
           for (String roleName : strRoleNames.split(ROLE_NAMES_DELIMETER)) {
 
             if (log.isDebugEnabled()) {
-              log.debug(
-                  "User is member of group [" + groupName + "] so adding role [" + roleName + "]");
+              log.debug("User is member of group [" + groupName + "] so adding role [" +
+                  roleName + "]");
             }
 
             roleNames.add(roleName);
+
           }
         }
       }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/realm/LdapGroupRealm.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/LdapGroupRealm.java b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/LdapGroupRealm.java
index 06924dd..cdc2c22 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/LdapGroupRealm.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/LdapGroupRealm.java
@@ -16,9 +16,18 @@
  */
 package org.apache.zeppelin.realm;
 
+import org.apache.shiro.authz.AuthorizationInfo;
+import org.apache.shiro.authz.SimpleAuthorizationInfo;
+import org.apache.shiro.realm.ldap.JndiLdapRealm;
+import org.apache.shiro.realm.ldap.LdapContextFactory;
+import org.apache.shiro.subject.PrincipalCollection;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.Set;
+
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
@@ -26,29 +35,23 @@ import javax.naming.directory.Attributes;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
-import org.apache.shiro.authz.AuthorizationInfo;
-import org.apache.shiro.authz.SimpleAuthorizationInfo;
-import org.apache.shiro.realm.ldap.JndiLdapRealm;
-import org.apache.shiro.realm.ldap.LdapContextFactory;
-import org.apache.shiro.subject.PrincipalCollection;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Created for org.apache.zeppelin.server. */
+/**
+ * Created for org.apache.zeppelin.server.
+ */
 public class LdapGroupRealm extends JndiLdapRealm {
   private static final Logger LOG = LoggerFactory.getLogger(LdapGroupRealm.class);
 
-  public AuthorizationInfo queryForAuthorizationInfo(
-      PrincipalCollection principals, LdapContextFactory ldapContextFactory)
-      throws NamingException {
+  public AuthorizationInfo queryForAuthorizationInfo(PrincipalCollection principals,
+          LdapContextFactory ldapContextFactory) throws NamingException {
     String username = (String) getAvailablePrincipal(principals);
     LdapContext ldapContext = ldapContextFactory.getSystemLdapContext();
     Set<String> roleNames = getRoleNamesForUser(username, ldapContext, getUserDnTemplate());
     return new SimpleAuthorizationInfo(roleNames);
   }
 
-  public Set<String> getRoleNamesForUser(
-      String username, LdapContext ldapContext, String userDnTemplate) throws NamingException {
+  public Set<String> getRoleNamesForUser(String username, LdapContext ldapContext,
+          String userDnTemplate) throws NamingException {
     try {
       Set<String> roleNames = new LinkedHashSet<>();
 
@@ -56,14 +59,13 @@ public class LdapGroupRealm extends JndiLdapRealm {
       searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);
 
       String searchFilter = "(&(objectClass=groupOfNames)(member=" + userDnTemplate + "))";
-      Object[] searchArguments = new Object[] {username};
+      Object[] searchArguments = new Object[]{username};
 
-      NamingEnumeration<?> answer =
-          ldapContext.search(
-              String.valueOf(ldapContext.getEnvironment().get("ldap.searchBase")),
-              searchFilter,
-              searchArguments,
-              searchCtls);
+      NamingEnumeration<?> answer = ldapContext.search(
+          String.valueOf(ldapContext.getEnvironment().get("ldap.searchBase")),
+          searchFilter,
+          searchArguments,
+          searchCtls);
 
       while (answer.hasMoreElements()) {
         SearchResult sr = (SearchResult) answer.next();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/realm/LdapRealm.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/LdapRealm.java b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/LdapRealm.java
index c68ab35..562ed96 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/LdapRealm.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/LdapRealm.java
@@ -74,44 +74,56 @@ import org.slf4j.LoggerFactory;
  * Implementation of {@link org.apache.shiro.realm.ldap.JndiLdapRealm} that also returns each user's
  * groups. This implementation is heavily based on org.apache.isis.security.shiro.IsisLdapRealm.
  *
- * <p>This implementation saves looked up ldap groups in Shiro Session to make them easy to be
- * looked up outside of this object
+ * <p>This implementation saves looked up ldap groups in Shiro Session to make them
+ * easy to be looked up outside of this object
  *
  * <p>Sample config for <tt>shiro.ini</tt>:
  *
- * <p>[main] ldapRealm = org.apache.zeppelin.realm.LdapRealm ldapRealm.contextFactory.url =
- * ldap://localhost:33389 ldapRealm.contextFactory.authenticationMechanism = simple
- * ldapRealm.contextFactory.systemUsername = uid=guest,ou=people,dc=hadoop,dc= apache,dc=org
- * ldapRealm.contextFactory.systemPassword = S{ALIAS=ldcSystemPassword}
- * ldapRealm.hadoopSecurityCredentialPath = jceks://file/user/zeppelin/zeppelin.jceks
- * ldapRealm.userDnTemplate = uid={0},ou=people,dc=hadoop,dc=apache,dc=org # Ability to set ldap
- * paging Size if needed default is 100 ldapRealm.pagingSize = 200 ldapRealm.authorizationEnabled =
- * true ldapRealm.searchBase = dc=hadoop,dc=apache,dc=org ldapRealm.userSearchBase =
- * dc=hadoop,dc=apache,dc=org ldapRealm.groupSearchBase = ou=groups,dc=hadoop,dc=apache,dc=org
- * ldapRealm.userObjectClass = person ldapRealm.groupObjectClass = groupofnames # Allow
- * userSearchAttribute to be customized ldapRealm.userSearchAttributeName = sAMAccountName
- * ldapRealm.memberAttribute = member # force usernames returned from ldap to lowercase useful for
- * AD ldapRealm.userLowerCase = true # ability set searchScopes subtree (default), one, base
- * ldapRealm.userSearchScope = subtree; ldapRealm.groupSearchScope = subtree;
- * ldapRealm.userSearchFilter = (&(objectclass=person)(sAMAccountName={0}))
- * ldapRealm.groupSearchFilter = (&(objectclass=groupofnames)(member={0}))
- * ldapRealm.memberAttributeValueTemplate=cn={0},ou=people,dc=hadoop,dc=apache,dc=org # enable
- * support for nested groups using the LDAP_MATCHING_RULE_IN_CHAIN operator
- * ldapRealm.groupSearchEnableMatchingRuleInChain = true
- *
- * <p># 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,\
- * DEMOS: self-install_role
- *
- * <p># optional list of roles that are allowed to authenticate
- * ldapRealm.allowedRolesForAuthentication = admin_role,user_role
- *
- * <p>ldapRealm.permissionsByRole=\ user_role = *:ToDoItemsJdo:*:*,\*:ToDoItem:*:*; \
- * self-install_role = *:ToDoItemsFixturesService:install:* ; \ admin_role = *
- *
- * <p>[urls] **=authcBasic
- *
- * <p>securityManager.realms = $ldapRealm
+ * <p>
+ *   [main]
+ *   ldapRealm = org.apache.zeppelin.realm.LdapRealm
+ *   ldapRealm.contextFactory.url = ldap://localhost:33389
+ *   ldapRealm.contextFactory.authenticationMechanism = simple
+ *   ldapRealm.contextFactory.systemUsername = uid=guest,ou=people,dc=hadoop,dc= apache,dc=org
+ *   ldapRealm.contextFactory.systemPassword = S{ALIAS=ldcSystemPassword}
+ *   ldapRealm.hadoopSecurityCredentialPath = jceks://file/user/zeppelin/zeppelin.jceks
+ *   ldapRealm.userDnTemplate = uid={0},ou=people,dc=hadoop,dc=apache,dc=org
+ *   # Ability to set ldap paging Size if needed default is 100
+ *   ldapRealm.pagingSize = 200
+ *   ldapRealm.authorizationEnabled = true
+ *   ldapRealm.searchBase = dc=hadoop,dc=apache,dc=org
+ *   ldapRealm.userSearchBase = dc=hadoop,dc=apache,dc=org
+ *   ldapRealm.groupSearchBase = ou=groups,dc=hadoop,dc=apache,dc=org
+ *   ldapRealm.userObjectClass = person
+ *   ldapRealm.groupObjectClass = groupofnames
+ *   # Allow userSearchAttribute to be customized
+ *   ldapRealm.userSearchAttributeName = sAMAccountName
+ *   ldapRealm.memberAttribute = member
+ *   # force usernames returned from ldap to lowercase useful for AD
+ *   ldapRealm.userLowerCase = true
+ *   # ability set searchScopes subtree (default), one, base
+ *   ldapRealm.userSearchScope = subtree;
+ *   ldapRealm.groupSearchScope = subtree;
+ *   ldapRealm.userSearchFilter = (&(objectclass=person)(sAMAccountName={0}))
+ *   ldapRealm.groupSearchFilter = (&(objectclass=groupofnames)(member={0}))
+ *   ldapRealm.memberAttributeValueTemplate=cn={0},ou=people,dc=hadoop,dc=apache,dc=org
+ *   # enable support for nested groups using the LDAP_MATCHING_RULE_IN_CHAIN operator
+ *   ldapRealm.groupSearchEnableMatchingRuleInChain = true
+ * <p>
+ *   # 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,\ DEMOS: self-install_role
+ * <p>
+ *   # optional list of roles that are allowed to authenticate
+ *   ldapRealm.allowedRolesForAuthentication = admin_role,user_role
+ * <p>
+ *   ldapRealm.permissionsByRole=\ user_role = *:ToDoItemsJdo:*:*,\*:ToDoItem:*:*;
+ *   \ self-install_role = *:ToDoItemsFixturesService:install:* ; \ admin_role = *
+ * <p>
+ *   [urls]
+ *   **=authcBasic
+ * <p>
+ *   securityManager.realms = $ldapRealm
  */
 public class LdapRealm extends JndiLdapRealm {
 
@@ -181,6 +193,8 @@ public class LdapRealm extends JndiLdapRealm {
 
   private HashService hashService = new DefaultHashService();
 
+
+
   public void setHadoopSecurityCredentialPath(String hadoopSecurityCredentialPath) {
     this.hadoopSecurityCredentialPath = hadoopSecurityCredentialPath;
   }
@@ -204,17 +218,18 @@ public class LdapRealm extends JndiLdapRealm {
     super.onInit();
     if (!org.apache.commons.lang.StringUtils.isEmpty(this.hadoopSecurityCredentialPath)
         && getContextFactory() != null) {
-      ((JndiLdapContextFactory) getContextFactory())
-          .setSystemPassword(getSystemPassword(this.hadoopSecurityCredentialPath, keystorePass));
+      ((JndiLdapContextFactory) getContextFactory()).setSystemPassword(
+          getSystemPassword(this.hadoopSecurityCredentialPath, keystorePass));
     }
   }
 
-  static String getSystemPassword(String hadoopSecurityCredentialPath, String keystorePass) {
+  static String getSystemPassword(String hadoopSecurityCredentialPath,
+      String keystorePass) {
     String password = "";
     try {
       Configuration configuration = new Configuration();
-      configuration.set(
-          CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH, hadoopSecurityCredentialPath);
+      configuration.set(CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH,
+          hadoopSecurityCredentialPath);
       CredentialProvider provider = CredentialProviderFactory.getProviders(configuration).get(0);
       CredentialProvider.CredentialEntry credEntry = provider.getCredentialEntry(keystorePass);
       if (credEntry != null) {
@@ -224,19 +239,16 @@ public class LdapRealm extends JndiLdapRealm {
       throw new ShiroException("Error from getting credential entry from keystore", e);
     }
     if (org.apache.commons.lang.StringUtils.isEmpty(password)) {
-      throw new ShiroException(
-          "Error getting SystemPassword from the provided keystore:"
-              + keystorePass
-              + ", in path:"
-              + hadoopSecurityCredentialPath);
+      throw new ShiroException("Error getting SystemPassword from the provided keystore:"
+          + keystorePass + ", in path:" + hadoopSecurityCredentialPath);
     }
     return password;
   }
 
   /**
-   * This overrides the implementation of queryForAuthenticationInfo inside JndiLdapRealm. In
-   * addition to calling the super method for authentication it also tries to validate if this user
-   * has atleast one of the allowed roles for authentication. In case the property
+   * This overrides the implementation of queryForAuthenticationInfo inside JndiLdapRealm.
+   * In addition to calling the super method for authentication it also tries to validate
+   * if this user has atleast one of the allowed roles for authentication. In case the property
    * allowedRolesForAuthentication is empty this check always returns true.
    *
    * @param token the submitted authentication token that triggered the authentication attempt.
@@ -245,8 +257,8 @@ public class LdapRealm extends JndiLdapRealm {
    * @throws NamingException if any LDAP errors occur.
    */
   @Override
-  protected AuthenticationInfo queryForAuthenticationInfo(
-      AuthenticationToken token, LdapContextFactory ldapContextFactory) throws NamingException {
+  protected AuthenticationInfo queryForAuthenticationInfo(AuthenticationToken token,
+      LdapContextFactory ldapContextFactory) throws NamingException {
     AuthenticationInfo info = super.queryForAuthenticationInfo(token, ldapContextFactory);
     // Credentials were verified. Verify that the principal has all allowedRulesForAuthentication
     if (!hasAllowedAuthenticationRules(info.getPrincipals(), ldapContextFactory)) {
@@ -256,19 +268,21 @@ public class LdapRealm extends JndiLdapRealm {
   }
 
   /**
-   * Get groups from LDAP.
-   *
-   * @param principals the principals of the Subject whose AuthenticationInfo should be queried from
-   *     the LDAP server.
-   * @param ldapContextFactory factory used to retrieve LDAP connections.
-   * @return an {@link AuthorizationInfo} instance containing information retrieved from the LDAP
-   *     server.
-   * @throws NamingException if any LDAP errors occur during the search.
-   */
+  * Get groups from LDAP.
+  * 
+  * @param principals
+  *            the principals of the Subject whose AuthenticationInfo should
+  *            be queried from the LDAP server.
+  * @param ldapContextFactory
+  *            factory used to retrieve LDAP connections.
+  * @return an {@link AuthorizationInfo} instance containing information
+  *         retrieved from the LDAP server.
+  * @throws NamingException
+  *             if any LDAP errors occur during the search.
+  */
   @Override
-  public AuthorizationInfo queryForAuthorizationInfo(
-      final PrincipalCollection principals, final LdapContextFactory ldapContextFactory)
-      throws NamingException {
+  public AuthorizationInfo queryForAuthorizationInfo(final PrincipalCollection principals,
+      final LdapContextFactory ldapContextFactory) throws NamingException {
     if (!isAuthorizationEnabled()) {
       return null;
     }
@@ -282,9 +296,8 @@ public class LdapRealm extends JndiLdapRealm {
     return simpleAuthorizationInfo;
   }
 
-  private boolean hasAllowedAuthenticationRules(
-      PrincipalCollection principals, final LdapContextFactory ldapContextFactory)
-      throws NamingException {
+  private boolean hasAllowedAuthenticationRules(PrincipalCollection principals,
+          final LdapContextFactory ldapContextFactory) throws NamingException {
     boolean allowed = allowedRolesForAuthentication.isEmpty();
     if (!allowed) {
       Set<String> roles = getRoles(principals, ldapContextFactory);
@@ -299,20 +312,15 @@ public class LdapRealm extends JndiLdapRealm {
     return allowed;
   }
 
-  private Set<String> getRoles(
-      PrincipalCollection principals, final LdapContextFactory ldapContextFactory)
-      throws NamingException {
+  private Set<String> getRoles(PrincipalCollection principals,
+          final LdapContextFactory ldapContextFactory) throws NamingException {
     final String username = (String) getAvailablePrincipal(principals);
 
     LdapContext systemLdapCtx = null;
     try {
       systemLdapCtx = ldapContextFactory.getSystemLdapContext();
-      return rolesFor(
-          principals,
-          username,
-          systemLdapCtx,
-          ldapContextFactory,
-          SecurityUtils.getSubject().getSession());
+      return rolesFor(principals, username, systemLdapCtx,
+        ldapContextFactory, SecurityUtils.getSubject().getSession());
     } catch (AuthenticationException ae) {
       ae.printStackTrace();
       return Collections.emptySet();
@@ -321,13 +329,9 @@ public class LdapRealm extends JndiLdapRealm {
     }
   }
 
-  protected Set<String> rolesFor(
-      PrincipalCollection principals,
-      String userNameIn,
-      final LdapContext ldapCtx,
-      final LdapContextFactory ldapContextFactory,
-      Session session)
-      throws NamingException {
+  protected Set<String> rolesFor(PrincipalCollection principals, String userNameIn,
+          final LdapContext ldapCtx, final LdapContextFactory ldapContextFactory, Session session)
+          throws NamingException {
     final Set<String> roleNames = new HashSet<>();
     final Set<String> groupNames = new HashSet<>();
     final String userName;
@@ -337,7 +341,7 @@ public class LdapRealm extends JndiLdapRealm {
     } else {
       userName = userNameIn;
     }
-
+    
     String userDn = getUserDnForSearch(userName);
 
     // Activate paged results
@@ -349,10 +353,10 @@ public class LdapRealm extends JndiLdapRealm {
     byte[] cookie = null;
     try {
       ldapCtx.addToEnvironment(Context.REFERRAL, "ignore");
-
-      ldapCtx.setRequestControls(
-          new Control[] {new PagedResultsControl(pageSize, Control.NONCRITICAL)});
-
+        
+      ldapCtx.setRequestControls(new Control[]{new PagedResultsControl(pageSize, 
+            Control.NONCRITICAL)});
+        
       do {
         // ldapsearch -h localhost -p 33389 -D
         // uid=guest,ou=people,dc=hadoop,dc=apache,dc=org -w guest-password
@@ -361,20 +365,19 @@ public class LdapRealm extends JndiLdapRealm {
         SearchControls searchControls = getGroupSearchControls();
         try {
           if (groupSearchEnableMatchingRuleInChain) {
-            searchResultEnum =
-                ldapCtx.search(
-                    getGroupSearchBase(),
-                    String.format(
-                        MATCHING_RULE_IN_CHAIN_FORMAT, groupObjectClass, memberAttribute, userDn),
-                    searchControls);
+            searchResultEnum = ldapCtx.search(
+                getGroupSearchBase(),
+                String.format(
+                    MATCHING_RULE_IN_CHAIN_FORMAT, groupObjectClass, memberAttribute, userDn),
+                searchControls);
             while (searchResultEnum != null && searchResultEnum.hasMore()) {
               // searchResults contains all the groups in search scope
               numResults++;
               final SearchResult group = searchResultEnum.next();
 
               Attribute attribute = group.getAttributes().get(getGroupIdAttribute());
-              String groupName = attribute.get().toString();
-
+              String groupName = attribute.get().toString();            
+              
               String roleName = roleNameFor(groupName);
               if (roleName != null) {
                 roleNames.add(roleName);
@@ -389,18 +392,16 @@ public class LdapRealm extends JndiLdapRealm {
             // If group search filter is defined in Shiro config, then use it
             if (groupSearchFilter != null) {
               searchFilter = expandTemplate(groupSearchFilter, userName);
-              // searchFilter = String.format("%1$s", groupSearchFilter);
+              //searchFilter = String.format("%1$s", groupSearchFilter);
             }
             if (log.isDebugEnabled()) {
-              log.debug(
-                  "Group SearchBase|SearchFilter|GroupSearchScope: "
-                      + getGroupSearchBase()
-                      + "|"
-                      + searchFilter
-                      + "|"
-                      + groupSearchScope);
+              log.debug("Group SearchBase|SearchFilter|GroupSearchScope: " + getGroupSearchBase()
+                    + "|" + searchFilter + "|" + groupSearchScope);
             }
-            searchResultEnum = ldapCtx.search(getGroupSearchBase(), searchFilter, searchControls);
+            searchResultEnum = ldapCtx.search(
+                getGroupSearchBase(),
+                searchFilter,
+                searchControls);
             while (searchResultEnum != null && searchResultEnum.hasMore()) {
               // searchResults contains all the groups in search scope
               numResults++;
@@ -416,11 +417,12 @@ public class LdapRealm extends JndiLdapRealm {
           }
         }
         // Re-activate paged results
-        ldapCtx.setRequestControls(
-            new Control[] {new PagedResultsControl(pageSize, cookie, Control.CRITICAL)});
+        ldapCtx.setRequestControls(new Control[]{new PagedResultsControl(pageSize,
+            cookie, Control.CRITICAL)});
       } while (cookie != null);
     } catch (SizeLimitExceededException e) {
-      log.info("Only retrieved first " + numResults + " groups due to SizeLimitExceededException.");
+      log.info("Only retrieved first " + numResults +
+          " groups due to SizeLimitExceededException.");
     } catch (IOException e) {
       log.error("Unabled to setup paged results");
     }
@@ -447,13 +449,9 @@ public class LdapRealm extends JndiLdapRealm {
     }
   }
 
-  private void addRoleIfMember(
-      final String userDn,
-      final SearchResult group,
-      final Set<String> roleNames,
-      final Set<String> groupNames,
-      final LdapContextFactory ldapContextFactory)
-      throws NamingException {
+  private void addRoleIfMember(final String userDn, final SearchResult group,
+      final Set<String> roleNames, final Set<String> groupNames,
+      final LdapContextFactory ldapContextFactory) throws NamingException {
     NamingEnumeration<? extends Attribute> attributeEnum = null;
     NamingEnumeration<?> ne = null;
     try {
@@ -471,8 +469,8 @@ public class LdapRealm extends JndiLdapRealm {
         while (ne.hasMore()) {
           String attrValue = ne.next().toString();
           if (memberAttribute.equalsIgnoreCase(MEMBER_URL)) {
-            boolean dynamicGroupMember =
-                isUserMemberOfDynamicGroup(userLdapDn, attrValue, ldapContextFactory);
+            boolean dynamicGroupMember = isUserMemberOfDynamicGroup(userLdapDn, attrValue,
+                ldapContextFactory);
             if (dynamicGroupMember) {
               groupNames.add(groupName);
               String roleName = roleNameFor(groupName);
@@ -602,11 +600,13 @@ public class LdapRealm extends JndiLdapRealm {
   }
 
   /**
-   * Set Member Attribute Template for LDAP.
-   *
-   * @param template DN template to be used to query ldap.
-   * @throws IllegalArgumentException if template is empty or null.
-   */
+  * Set Member Attribute Template for LDAP.
+  * 
+  * @param template
+  *            DN template to be used to query ldap.
+  * @throws IllegalArgumentException
+  *             if template is empty or null.
+  */
   public void setMemberAttributeValueTemplate(String template) {
     if (!StringUtils.hasText(template)) {
       String msg = "User DN template cannot be null or empty.";
@@ -614,11 +614,8 @@ public class LdapRealm extends JndiLdapRealm {
     }
     int index = template.indexOf(MEMBER_SUBSTITUTION_TOKEN);
     if (index < 0) {
-      String msg =
-          "Member attribute value template must contain the '"
-              + MEMBER_SUBSTITUTION_TOKEN
-              + "' replacement token to understand how to "
-              + "parse the group members.";
+      String msg = "Member attribute value template must contain the '" + MEMBER_SUBSTITUTION_TOKEN
+          + "' replacement token to understand how to " + "parse the group members.";
       throw new IllegalArgumentException(msg);
     }
     String prefix = template.substring(0, index);
@@ -660,10 +657,11 @@ public class LdapRealm extends JndiLdapRealm {
   }
 
   /**
-   * Set User Search Attribute Name for LDAP.
-   *
-   * @param userSearchAttributeName userAttribute to search ldap.
-   */
+  * Set User Search Attribute Name for LDAP.
+  * 
+  * @param userSearchAttributeName
+  *            userAttribute to search ldap.
+  */
   public void setUserSearchAttributeName(String userSearchAttributeName) {
     if (userSearchAttributeName != null) {
       userSearchAttributeName = userSearchAttributeName.trim();
@@ -702,9 +700,8 @@ public class LdapRealm extends JndiLdapRealm {
     return perms;
   }
 
-  boolean isUserMemberOfDynamicGroup(
-      LdapName userLdapDn, String memberUrl, final LdapContextFactory ldapContextFactory)
-      throws NamingException {
+  boolean isUserMemberOfDynamicGroup(LdapName userLdapDn, String memberUrl,
+      final LdapContextFactory ldapContextFactory) throws NamingException {
     // ldap://host:port/dn?attributes?scope?filter?extensions
     if (memberUrl == null) {
       return false;
@@ -739,11 +736,8 @@ public class LdapRealm extends JndiLdapRealm {
     boolean member = false;
     NamingEnumeration<SearchResult> searchResultEnum = null;
     try {
-      searchResultEnum =
-          systemLdapCtx.search(
-              userLdapDn,
-              searchFilter,
-              searchScope.equalsIgnoreCase("sub") ? SUBTREE_SCOPE : ONELEVEL_SCOPE);
+      searchResultEnum = systemLdapCtx.search(userLdapDn, searchFilter,
+          searchScope.equalsIgnoreCase("sub") ? SUBTREE_SCOPE : ONELEVEL_SCOPE);
       if (searchResultEnum.hasMore()) {
         return true;
       }
@@ -764,10 +758,11 @@ public class LdapRealm extends JndiLdapRealm {
   }
 
   /**
-   * Set Regex for Principal LDAP.
-   *
-   * @param regex regex to use to search for principal in shiro.
-   */
+  * Set Regex for Principal LDAP.
+  * 
+  * @param regex
+  *            regex to use to search for principal in shiro.
+  */
   public void setPrincipalRegex(String regex) {
     if (regex == null || regex.trim().isEmpty()) {
       principalPattern = Pattern.compile(DEFAULT_PRINCIPAL_REGEX);
@@ -865,44 +860,47 @@ public class LdapRealm extends JndiLdapRealm {
   private String matchPrincipal(final String principal) {
     Matcher matchedPrincipal = principalPattern.matcher(principal);
     if (!matchedPrincipal.matches()) {
-      throw new IllegalArgumentException(
-          "Principal " + principal + " does not match " + principalRegex);
+      throw new IllegalArgumentException("Principal "
+          + principal + " does not match " + principalRegex);
     }
     return matchedPrincipal.group();
   }
 
   /**
-   * Returns the LDAP User Distinguished Name (DN) to use when acquiring an {@link
-   * javax.naming.ldap.LdapContext LdapContext} from the {@link LdapContextFactory}.
-   *
-   * <p>If the the {@link #getUserDnTemplate() userDnTemplate} property has been set, this
-   * implementation will construct the User DN by substituting the specified {@code principal} into
-   * the configured template. If the {@link #getUserDnTemplate() userDnTemplate} has not been set,
-   * the method argument will be returned directly (indicating that the submitted authentication
-   * token principal <em>is</em> the User DN).
-   *
-   * @param principal the principal to substitute into the configured {@link #getUserDnTemplate()
-   *     userDnTemplate}.
-   * @return the constructed User DN to use at runtime when acquiring an {@link
-   *     javax.naming.ldap.LdapContext}.
-   * @throws IllegalArgumentException if the method argument is null or empty
-   * @throws IllegalStateException if the {@link #getUserDnTemplate userDnTemplate} has not been
-   *     set.
-   * @see LdapContextFactory#getLdapContext(Object, Object)
-   */
+  * Returns the LDAP User Distinguished Name (DN) to use when acquiring an
+  * {@link javax.naming.ldap.LdapContext LdapContext} from the
+  * {@link LdapContextFactory}.
+  * <p/>
+  * If the the {@link #getUserDnTemplate() userDnTemplate} property has been
+  * set, this implementation will construct the User DN by substituting the
+  * specified {@code principal} into the configured template. If the
+  * {@link #getUserDnTemplate() userDnTemplate} has not been set, the method
+  * argument will be returned directly (indicating that the submitted
+  * authentication token principal <em>is</em> the User DN).
+  *
+  * @param principal
+  *            the principal to substitute into the configured
+  *            {@link #getUserDnTemplate() userDnTemplate}.
+  * @return the constructed User DN to use at runtime when acquiring an
+  *         {@link javax.naming.ldap.LdapContext}.
+  * @throws IllegalArgumentException
+  *             if the method argument is null or empty
+  * @throws IllegalStateException
+  *             if the {@link #getUserDnTemplate userDnTemplate} has not been
+  *             set.
+  * @see LdapContextFactory#getLdapContext(Object, Object)
+  */
   @Override
-  protected String getUserDn(final String principal)
-      throws IllegalArgumentException, IllegalStateException {
+  protected String getUserDn(final String principal) throws IllegalArgumentException,
+      IllegalStateException {
     String userDn;
     String matchedPrincipal = matchPrincipal(principal);
     String userSearchBase = getUserSearchBase();
     String userSearchAttributeName = getUserSearchAttributeName();
 
     // If not searching use the userDnTemplate and return.
-    if ((userSearchBase == null || userSearchBase.isEmpty())
-        || (userSearchAttributeName == null
-            && userSearchFilter == null
-            && !"object".equalsIgnoreCase(userSearchScope))) {
+    if ((userSearchBase == null || userSearchBase.isEmpty()) || (userSearchAttributeName == null
+        && userSearchFilter == null && !"object".equalsIgnoreCase(userSearchScope))) {
       userDn = expandTemplate(userDnTemplate, matchedPrincipal);
       if (log.isDebugEnabled()) {
         log.debug("LDAP UserDN and Principal: " + userDn + "," + principal);
@@ -917,12 +915,9 @@ public class LdapRealm extends JndiLdapRealm {
       if (userSearchAttributeName == null) {
         searchFilter = String.format("(objectclass=%1$s)", getUserObjectClass());
       } else {
-        searchFilter =
-            String.format(
-                "(&(objectclass=%1$s)(%2$s=%3$s))",
-                getUserObjectClass(),
-                userSearchAttributeName,
-                expandTemplate(getUserSearchAttributeTemplate(), matchedPrincipal));
+        searchFilter = String.format("(&(objectclass=%1$s)(%2$s=%3$s))", getUserObjectClass(),
+            userSearchAttributeName, expandTemplate(getUserSearchAttributeTemplate(),
+                matchedPrincipal));
       }
     } else {
       searchFilter = expandTemplate(userSearchFilter, matchedPrincipal);
@@ -935,13 +930,8 @@ public class LdapRealm extends JndiLdapRealm {
     try {
       systemLdapCtx = getContextFactory().getSystemLdapContext();
       if (log.isDebugEnabled()) {
-        log.debug(
-            "SearchBase,SearchFilter,UserSearchScope: "
-                + searchBase
-                + ","
-                + searchFilter
-                + ","
-                + userSearchScope);
+        log.debug("SearchBase,SearchFilter,UserSearchScope: " + searchBase
+            + "," + searchFilter + "," + userSearchScope);
       }
       searchResultEnum = systemLdapCtx.search(searchBase, searchFilter, searchControls);
       // SearchResults contains all the entries in search scope
@@ -974,18 +964,16 @@ public class LdapRealm extends JndiLdapRealm {
   }
 
   @Override
-  protected AuthenticationInfo createAuthenticationInfo(
-      AuthenticationToken token,
-      Object ldapPrincipal,
-      Object ldapCredentials,
-      LdapContext ldapContext)
+  protected AuthenticationInfo createAuthenticationInfo(AuthenticationToken token,
+      Object ldapPrincipal, Object ldapCredentials, LdapContext ldapContext)
       throws NamingException {
     HashRequest.Builder builder = new HashRequest.Builder();
-    Hash credentialsHash =
-        hashService.computeHash(
-            builder.setSource(token.getCredentials()).setAlgorithmName(HASHING_ALGORITHM).build());
-    return new SimpleAuthenticationInfo(
-        token.getPrincipal(), credentialsHash.toHex(), credentialsHash.getSalt(), getName());
+    Hash credentialsHash = hashService
+        .computeHash(builder.setSource(token.getCredentials())
+            .setAlgorithmName(HASHING_ALGORITHM).build());
+    return new SimpleAuthenticationInfo(token.getPrincipal(),
+        credentialsHash.toHex(), credentialsHash.getSalt(),
+        getName());
   }
 
   protected static final String expandTemplate(final String template, final String input) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/realm/PamRealm.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/PamRealm.java b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/PamRealm.java
index 2af5e81..0622673 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/PamRealm.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/PamRealm.java
@@ -16,8 +16,6 @@
  */
 package org.apache.zeppelin.realm;
 
-import java.util.LinkedHashSet;
-import java.util.Set;
 import org.apache.shiro.authc.AuthenticationException;
 import org.apache.shiro.authc.AuthenticationInfo;
 import org.apache.shiro.authc.AuthenticationToken;
@@ -33,7 +31,12 @@ import org.jvnet.libpam.UnixUser;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** An {@code AuthorizingRealm} based on libpam4j. */
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+/**
+ * An {@code AuthorizingRealm} based on libpam4j.
+ */
 public class PamRealm extends AuthorizingRealm {
   private static final Logger LOG = LoggerFactory.getLogger(PamRealm.class);
 
@@ -45,7 +48,7 @@ public class PamRealm extends AuthorizingRealm {
 
     UserPrincipal user = principals.oneByType(UserPrincipal.class);
 
-    if (user != null) {
+    if (user != null){
       roles.addAll(user.getUnixUser().getGroups());
     }
 
@@ -54,20 +57,21 @@ public class PamRealm extends AuthorizingRealm {
 
   @Override
   protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token)
-      throws AuthenticationException {
+          throws AuthenticationException {
     UsernamePasswordToken userToken = (UsernamePasswordToken) token;
     UnixUser user;
 
     try {
-      user =
-          (new PAM(this.getService()))
-              .authenticate(userToken.getUsername(), new String(userToken.getPassword()));
+      user = (new PAM(this.getService()))
+          .authenticate(userToken.getUsername(), new String(userToken.getPassword()));
     } catch (PAMException e) {
       throw new AuthenticationException("Authentication failed for PAM.", e);
     }
 
     return new SimpleAuthenticationInfo(
-        new UserPrincipal(user), userToken.getCredentials(), getName());
+        new UserPrincipal(user),
+        userToken.getCredentials(),
+        getName());
   }
 
   public String getService() {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/realm/UserPrincipal.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/UserPrincipal.java b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/UserPrincipal.java
index ee2ee30..c1221e7 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/UserPrincipal.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/UserPrincipal.java
@@ -16,10 +16,13 @@
  */
 package org.apache.zeppelin.realm;
 
-import java.security.Principal;
 import org.jvnet.libpam.UnixUser;
 
-/** A {@code java.security.Principal} implememtation for use with Shiro {@code PamRealm}. */
+import java.security.Principal;
+
+/**
+ * A {@code java.security.Principal} implememtation for use with Shiro {@code PamRealm}.
+ */
 public class UserPrincipal implements Principal {
   private final UnixUser userName;
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ZeppelinHubRealm.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ZeppelinHubRealm.java b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ZeppelinHubRealm.java
index 18b4b2c..2a4dcda 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ZeppelinHubRealm.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ZeppelinHubRealm.java
@@ -19,12 +19,7 @@ package org.apache.zeppelin.realm;
 import com.google.common.base.Joiner;
 import com.google.gson.Gson;
 import com.google.gson.JsonParseException;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashSet;
-import java.util.concurrent.atomic.AtomicInteger;
+
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.HttpStatus;
 import org.apache.commons.httpclient.methods.PutMethod;
@@ -39,15 +34,26 @@ import org.apache.shiro.authc.UsernamePasswordToken;
 import org.apache.shiro.authz.AuthorizationInfo;
 import org.apache.shiro.realm.AuthorizingRealm;
 import org.apache.shiro.subject.PrincipalCollection;
+import org.apache.zeppelin.service.ServiceContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.HashSet;
+import java.util.concurrent.atomic.AtomicInteger;
+
 import org.apache.zeppelin.common.JsonSerializable;
 import org.apache.zeppelin.notebook.repo.zeppelinhub.model.UserSessionContainer;
 import org.apache.zeppelin.notebook.repo.zeppelinhub.websocket.utils.ZeppelinhubUtils;
 import org.apache.zeppelin.server.ZeppelinServer;
-import org.apache.zeppelin.service.ServiceContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** A {@code Realm} implementation that uses the ZeppelinHub to authenticate users. */
+/**
+ * A {@code Realm} implementation that uses the ZeppelinHub to authenticate users.
+ *
+ */
 public class ZeppelinHubRealm extends AuthorizingRealm {
   private static final Logger LOG = LoggerFactory.getLogger(ZeppelinHubRealm.class);
   private static final String DEFAULT_ZEPPELINHUB_URL = "https://www.zeppelinhub.com";
@@ -65,7 +71,7 @@ public class ZeppelinHubRealm extends AuthorizingRealm {
   public ZeppelinHubRealm() {
     super();
     LOG.debug("Init ZeppelinhubRealm");
-    // TODO(anthonyc): think about more setting for this HTTP client.
+    //TODO(anthonyc): think about more setting for this HTTP client.
     //                eg: if user uses proxy etcetc...
     httpClient = new HttpClient();
     name = getClass().getName() + "_" + INSTANCE_COUNT.getAndIncrement();
@@ -73,7 +79,7 @@ public class ZeppelinHubRealm extends AuthorizingRealm {
 
   @Override
   protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authToken)
-      throws AuthenticationException {
+          throws AuthenticationException {
     UsernamePasswordToken token = (UsernamePasswordToken) authToken;
     if (StringUtils.isBlank(token.getUsername())) {
       throw new AccountException("Empty usernames are not allowed by this realm.");
@@ -95,11 +101,11 @@ public class ZeppelinHubRealm extends AuthorizingRealm {
   }
 
   /**
-   * Setter of ZeppelinHub URL, this will be called by Shiro based on zeppelinhubUrl property in
-   * shiro.ini file.
+   * Setter of ZeppelinHub URL, this will be called by Shiro based on zeppelinhubUrl property
+   * in shiro.ini file.
    *
-   * <p>It will also perform a check of ZeppelinHub url {@link #isZeppelinHubUrlValid}, if the url
-   * is not valid, the default zeppelinhub url will be used.
+   * It will also perform a check of ZeppelinHub url {@link #isZeppelinHubUrlValid},
+   * if the url is not valid, the default zeppelinhub url will be used.
    *
    * @param url
    */
@@ -131,8 +137,8 @@ public class ZeppelinHubRealm extends AuthorizingRealm {
       if (statusCode != HttpStatus.SC_OK) {
         LOG.error("Cannot login user, HTTP status code is {} instead on 200 (OK)", statusCode);
         put.releaseConnection();
-        throw new AuthenticationException(
-            "Couldnt login to ZeppelinHub. " + "Login or password incorrect");
+        throw new AuthenticationException("Couldnt login to ZeppelinHub. "
+            + "Login or password incorrect");
       }
       responseBody = put.getResponseBodyAsString();
       userSession = put.getResponseHeader(USER_SESSION_HEADER).getValue();
@@ -159,8 +165,13 @@ public class ZeppelinHubRealm extends AuthorizingRealm {
   /**
    * Create a JSON String that represent login payload.
    *
-   * <p>Payload will look like: {@code { 'login': 'userLogin', 'password': 'userpassword' } }
-   *
+   * Payload will look like:
+   * {@code
+   *  {
+   *   'login': 'userLogin',
+   *   'password': 'userpassword'
+   *  }
+   * }
    * @param login
    * @param pwd
    * @return
@@ -171,9 +182,9 @@ public class ZeppelinHubRealm extends AuthorizingRealm {
   }
 
   /**
-   * Perform a Simple URL check by using {@code URI(url).toURL()}. If the url is not valid, the
-   * try-catch condition will catch the exceptions and return false, otherwise true will be
-   * returned.
+   * Perform a Simple URL check by using {@code URI(url).toURL()}.
+   * If the url is not valid, the try-catch condition will catch the exceptions and return false,
+   * otherwise true will be returned.
    *
    * @param url
    * @return
@@ -190,7 +201,9 @@ public class ZeppelinHubRealm extends AuthorizingRealm {
     return valid;
   }
 
-  /** Helper class that will be use to fromJson ZeppelinHub response. */
+  /**
+   * Helper class that will be use to fromJson ZeppelinHub response.
+   */
   protected static class User implements JsonSerializable {
     private static final Gson gson = new Gson();
     public String login;
@@ -212,8 +225,8 @@ public class ZeppelinHubRealm extends AuthorizingRealm {
     /* TODO(xxx): add proper roles */
     HashSet<String> userAndRoles = new HashSet<>();
     userAndRoles.add(username);
-    ServiceContext context =
-        new ServiceContext(new org.apache.zeppelin.user.AuthenticationInfo(username), userAndRoles);
+    ServiceContext context = new ServiceContext(
+        new org.apache.zeppelin.user.AuthenticationInfo(username), userAndRoles);
     try {
       ZeppelinServer.notebookWsServer.broadcastReloadedNoteList(null, context);
     } catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/JWTAuthenticationToken.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/JWTAuthenticationToken.java b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/JWTAuthenticationToken.java
index 38c4d31..8dc86ed 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/JWTAuthenticationToken.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/JWTAuthenticationToken.java
@@ -18,7 +18,9 @@ package org.apache.zeppelin.realm.jwt;
 
 import org.apache.shiro.authc.AuthenticationToken;
 
-/** Created for org.apache.zeppelin.server. */
+/**
+ * Created for org.apache.zeppelin.server.
+ */
 public class JWTAuthenticationToken implements AuthenticationToken {
   private Object userId;
   private String token;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxAuthenticationFilter.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxAuthenticationFilter.java b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxAuthenticationFilter.java
index 1bfafcf..eccf6de 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxAuthenticationFilter.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxAuthenticationFilter.java
@@ -16,27 +16,30 @@
  */
 package org.apache.zeppelin.realm.jwt;
 
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.Cookie;
 import org.apache.shiro.web.filter.authc.FormAuthenticationFilter;
 import org.apache.shiro.web.servlet.ShiroHttpServletRequest;
-import org.apache.zeppelin.utils.SecurityUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Created for org.apache.zeppelin.server. */
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.Cookie;
+
+import org.apache.zeppelin.utils.SecurityUtils;
+
+/**
+ * Created for org.apache.zeppelin.server.
+ */
 public class KnoxAuthenticationFilter extends FormAuthenticationFilter {
   private static final Logger LOGGER = LoggerFactory.getLogger(KnoxAuthenticationFilter.class);
 
-  protected boolean isAccessAllowed(
-      ServletRequest request, ServletResponse response, Object mappedValue) {
-    // Check with existing shiro authentication logic
-    // https://github.com/apache/shiro/blob/shiro-root-1.3.2/web/src/main/java/org/apache/shiro/
+  protected boolean isAccessAllowed(ServletRequest request, ServletResponse response,
+          Object mappedValue) {
+    //Check with existing shiro authentication logic
+    //https://github.com/apache/shiro/blob/shiro-root-1.3.2/web/src/main/java/org/apache/shiro/
     // web/filter/authc/AuthenticatingFilter.java#L123-L124
-    Boolean accessAllowed =
-        super.isAccessAllowed(request, response, mappedValue)
-            || !isLoginRequest(request, response) && isPermissive(mappedValue);
+    Boolean accessAllowed = super.isAccessAllowed(request, response, mappedValue) ||
+            !isLoginRequest(request, response) && isPermissive(mappedValue);
 
     if (accessAllowed) {
       accessAllowed = false;
@@ -57,10 +60,9 @@ public class KnoxAuthenticationFilter extends FormAuthenticationFilter {
           }
         }
       } else {
-        LOGGER.error(
-            "Looks like this filter is enabled without enabling KnoxJwtRealm, please refer"
-                + " to https://zeppelin.apache.org/docs/latest/security/shiroauthentication.html"
-                + "#knox-sso");
+        LOGGER.error("Looks like this filter is enabled without enabling KnoxJwtRealm, please refer"
+            + " to https://zeppelin.apache.org/docs/latest/security/shiroauthentication.html"
+            + "#knox-sso");
       }
     }
     return accessAllowed;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxJwtRealm.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxJwtRealm.java b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxJwtRealm.java
index 83a75ff..3663174 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxJwtRealm.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxJwtRealm.java
@@ -16,10 +16,20 @@
  */
 package org.apache.zeppelin.realm.jwt;
 
-import com.nimbusds.jose.JWSObject;
-import com.nimbusds.jose.JWSVerifier;
-import com.nimbusds.jose.crypto.RSASSAVerifier;
-import com.nimbusds.jwt.SignedJWT;
+import java.util.Date;
+import org.apache.commons.io.FileUtils;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.security.Groups;
+import org.apache.shiro.authc.AuthenticationInfo;
+import org.apache.shiro.authc.AuthenticationToken;
+import org.apache.shiro.authc.SimpleAccount;
+import org.apache.shiro.authz.AuthorizationInfo;
+import org.apache.shiro.authz.SimpleAuthorizationInfo;
+import org.apache.shiro.realm.AuthorizingRealm;
+import org.apache.shiro.subject.PrincipalCollection;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.IOException;
@@ -30,25 +40,20 @@ import java.security.cert.CertificateFactory;
 import java.security.cert.X509Certificate;
 import java.security.interfaces.RSAPublicKey;
 import java.text.ParseException;
-import java.util.Date;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+
 import javax.servlet.ServletException;
-import org.apache.commons.io.FileUtils;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.security.Groups;
-import org.apache.shiro.authc.AuthenticationInfo;
-import org.apache.shiro.authc.AuthenticationToken;
-import org.apache.shiro.authc.SimpleAccount;
-import org.apache.shiro.authz.AuthorizationInfo;
-import org.apache.shiro.authz.SimpleAuthorizationInfo;
-import org.apache.shiro.realm.AuthorizingRealm;
-import org.apache.shiro.subject.PrincipalCollection;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Created for org.apache.zeppelin.server. */
+import com.nimbusds.jose.JWSObject;
+import com.nimbusds.jose.JWSVerifier;
+import com.nimbusds.jose.crypto.RSASSAVerifier;
+import com.nimbusds.jwt.SignedJWT;
+
+/**
+ * Created for org.apache.zeppelin.server.
+ */
 public class KnoxJwtRealm extends AuthorizingRealm {
   private static final Logger LOGGER = LoggerFactory.getLogger(KnoxJwtRealm.class);
 
@@ -65,10 +70,14 @@ public class KnoxJwtRealm extends AuthorizingRealm {
 
   private SimplePrincipalMapper mapper = new SimplePrincipalMapper();
 
-  /** Configuration object needed by for Hadoop classes. */
+  /**
+   * Configuration object needed by for Hadoop classes.
+   */
   private Configuration hadoopConfig;
 
-  /** Hadoop Groups implementation. */
+  /**
+   * Hadoop Groups implementation.
+   */
   private Groups hadoopGroups;
 
   @Override
@@ -153,16 +162,15 @@ public class KnoxJwtRealm extends AuthorizingRealm {
     PublicKey key = null;
     try {
       CertificateFactory fact = CertificateFactory.getInstance("X.509");
-      ByteArrayInputStream is =
-          new ByteArrayInputStream(FileUtils.readFileToString(new File(pem)).getBytes("UTF8"));
+      ByteArrayInputStream is = new ByteArrayInputStream(
+          FileUtils.readFileToString(new File(pem)).getBytes("UTF8"));
       X509Certificate cer = (X509Certificate) fact.generateCertificate(is);
       key = cer.getPublicKey();
     } catch (CertificateException ce) {
       String message = null;
       if (pem.startsWith(pemHeader)) {
-        message =
-            "CertificateException - be sure not to include PEM header "
-                + "and footer in the PEM configuration element.";
+        message = "CertificateException - be sure not to include PEM header "
+            + "and footer in the PEM configuration element.";
       } else {
         message = "CertificateException - PEM may be corrupt";
       }
@@ -194,11 +202,12 @@ public class KnoxJwtRealm extends AuthorizingRealm {
   }
 
   /**
-   * Validate that the expiration time of the JWT token has not been violated. If it has then throw
-   * an AuthenticationException. Override this method in subclasses in order to customize the
-   * expiration validation behavior.
+   * Validate that the expiration time of the JWT token has not been violated.
+   * If it has then throw an AuthenticationException. Override this method in
+   * subclasses in order to customize the expiration validation behavior.
    *
-   * @param jwtToken the token that contains the expiration date to validate
+   * @param jwtToken
+   *            the token that contains the expiration date to validate
    * @return valid true if the token has not expired; false otherwise
    */
   protected boolean validateExpiration(SignedJWT jwtToken) {
@@ -225,17 +234,20 @@ public class KnoxJwtRealm extends AuthorizingRealm {
     return new SimpleAuthorizationInfo(roles);
   }
 
-  /** Query the Hadoop implementation of {@link Groups} to retrieve groups for provided user. */
+  /**
+   * Query the Hadoop implementation of {@link Groups} to retrieve groups for provided user.
+   */
   public Set<String> mapGroupPrincipals(final String mappedPrincipalName) {
     /* return the groups as seen by Hadoop */
     Set<String> groups = null;
     try {
       hadoopGroups.refresh();
-      final List<String> groupList = hadoopGroups.getGroups(mappedPrincipalName);
+      final List<String> groupList = hadoopGroups
+          .getGroups(mappedPrincipalName);
 
       if (LOGGER.isDebugEnabled()) {
-        LOGGER.debug(
-            String.format("group found %s, %s", mappedPrincipalName, groupList.toString()));
+        LOGGER.debug(String.format("group found %s, %s",
+            mappedPrincipalName, groupList.toString()));
       }
 
       groups = new HashSet<>(groupList);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/PrincipalMapper.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/PrincipalMapper.java b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/PrincipalMapper.java
index 7e037c0..fec276c 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/PrincipalMapper.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/PrincipalMapper.java
@@ -19,27 +19,26 @@ package org.apache.zeppelin.realm.jwt;
 
 public interface PrincipalMapper {
   /**
-   * Load the internal principal mapping table from the provided string value which conforms to the
-   * following semicolon delimited format: actual[,another-actual]=mapped;...
-   *
+   * Load the internal principal mapping table from the provided
+   * string value which conforms to the following semicolon delimited format:
+   * actual[,another-actual]=mapped;...
    * @param principalMapping
    */
   void loadMappingTable(String principalMapping, String groupMapping)
-      throws PrincipalMappingException;
+          throws PrincipalMappingException;
 
   /**
-   * Acquire a mapped principal name from the mapping table as appropriate. Otherwise, the provided
-   * principalName will be used.
-   *
+   * Acquire a mapped principal name from the mapping table
+   * as appropriate. Otherwise, the provided principalName
+   * will be used.
    * @param principalName
    * @return principal name to be used in the assertion
    */
   String mapUserPrincipal(String principalName);
 
   /**
-   * Acquire array of group principal names from the mapping table as appropriate. Otherwise, return
-   * null.
-   *
+   * Acquire array of group principal names from the mapping table
+   * as appropriate. Otherwise, return null.
    * @param principalName
    * @return group principal names to be used in the assertion
    */

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/PrincipalMappingException.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/PrincipalMappingException.java b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/PrincipalMappingException.java
index 21d5fab..50e5036 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/PrincipalMappingException.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/PrincipalMappingException.java
@@ -1,20 +1,25 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.realm.jwt;
 
-/** * {@link System}. */
+/***
+ * {@link System}.
+ */
 public class PrincipalMappingException extends Exception {
   public PrincipalMappingException(String message) {
     super(message);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/SimplePrincipalMapper.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/SimplePrincipalMapper.java b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/SimplePrincipalMapper.java
index c1fbfb4..b194810 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/SimplePrincipalMapper.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/SimplePrincipalMapper.java
@@ -1,15 +1,18 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.realm.jwt;
@@ -18,13 +21,17 @@ import java.util.Arrays;
 import java.util.HashMap;
 import java.util.StringTokenizer;
 
-/** * */
+
+/***
+ * 
+ */
 public class SimplePrincipalMapper implements PrincipalMapper {
 
   public HashMap<String, String[]> principalMappings = null;
   public HashMap<String, String[]> groupMappings = null;
 
-  public SimplePrincipalMapper() {}
+  public SimplePrincipalMapper() {
+  }
 
   /* (non-Javadoc)
    * @see org.apache.hadoop.gateway.filter.PrincipalMapper#loadMappingTable(java.lang.String)
@@ -38,7 +45,8 @@ public class SimplePrincipalMapper implements PrincipalMapper {
     }
   }
 
-  private HashMap<String, String[]> parseMapping(String mappings) throws PrincipalMappingException {
+  private HashMap<String, String[]> parseMapping(String mappings)
+      throws PrincipalMappingException {
     if (mappings == null) {
       return null;
     }
@@ -63,10 +71,8 @@ public class SimplePrincipalMapper implements PrincipalMapper {
       // no principal mapping will occur
       table.clear();
       throw new PrincipalMappingException(
-          "Unable to load mappings from provided string: "
-              + mappings
-              + " - no principal mapping will be provided.",
-          e);
+          "Unable to load mappings from provided string: " + mappings
+              + " - no principal mapping will be provided.", e);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/AbstractRestApi.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/AbstractRestApi.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/AbstractRestApi.java
index aeede66..f4406a2 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/AbstractRestApi.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/AbstractRestApi.java
@@ -18,14 +18,15 @@
 package org.apache.zeppelin.rest;
 
 import com.google.common.collect.Sets;
-import java.io.IOException;
-import java.util.Set;
-import javax.ws.rs.WebApplicationException;
 import org.apache.zeppelin.service.ServiceContext;
 import org.apache.zeppelin.service.SimpleServiceCallback;
 import org.apache.zeppelin.user.AuthenticationInfo;
 import org.apache.zeppelin.utils.SecurityUtils;
 
+import javax.ws.rs.WebApplicationException;
+import java.io.IOException;
+import java.util.Set;
+
 public class AbstractRestApi {
 
   protected ServiceContext getServiceContext() {


[08/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterProcessListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterProcessListener.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterProcessListener.java
index 56fb516..ac7fa1e 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterProcessListener.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterProcessListener.java
@@ -16,30 +16,24 @@
  */
 package org.apache.zeppelin.interpreter.remote;
 
+import org.apache.zeppelin.interpreter.InterpreterResult;
+
 import java.io.IOException;
 import java.util.List;
 import java.util.Map;
-import org.apache.zeppelin.interpreter.InterpreterResult;
 
-/** Event from remoteInterpreterProcess */
+/**
+ * Event from remoteInterpreterProcess
+ */
 public interface RemoteInterpreterProcessListener {
   public void onOutputAppend(String noteId, String paragraphId, int index, String output);
-
   public void onOutputUpdated(
       String noteId, String paragraphId, int index, InterpreterResult.Type type, String output);
-
   public void onOutputClear(String noteId, String paragraphId);
-
-  void runParagraphs(
-      String noteId,
-      List<Integer> paragraphIndices,
-      List<String> paragraphIds,
-      String curParagraphId)
+  void runParagraphs(String noteId, List<Integer> paragraphIndices, List<String> paragraphIds,
+                     String curParagraphId)
       throws IOException;
 
-  public void onParaInfosReceived(
-      String noteId,
-      String paragraphId,
-      String interpreterSettingId,
-      Map<String, String> metaInfos);
+  public void onParaInfosReceived(String noteId, String paragraphId,
+                                  String interpreterSettingId, Map<String, String> metaInfos);
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterRunningProcess.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterRunningProcess.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterRunningProcess.java
index b012eab..69daa6f 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterRunningProcess.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterRunningProcess.java
@@ -16,11 +16,14 @@
  */
 package org.apache.zeppelin.interpreter.remote;
 
+import org.apache.zeppelin.helium.ApplicationEventListener;
 import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** This class connects to existing process */
+/**
+ * This class connects to existing process
+ */
 public class RemoteInterpreterRunningProcess extends RemoteInterpreterProcess {
   private final Logger logger = LoggerFactory.getLogger(RemoteInterpreterRunningProcess.class);
   private final String host;
@@ -28,7 +31,11 @@ public class RemoteInterpreterRunningProcess extends RemoteInterpreterProcess {
   private final String interpreterSettingName;
 
   public RemoteInterpreterRunningProcess(
-      String interpreterSettingName, int connectTimeout, String host, int port) {
+      String interpreterSettingName,
+      int connectTimeout,
+      String host,
+      int port
+  ) {
     super(connectTimeout);
     this.interpreterSettingName = interpreterSettingName;
     this.host = host;
@@ -63,14 +70,13 @@ public class RemoteInterpreterRunningProcess extends RemoteInterpreterProcess {
       if (isRunning()) {
         logger.info("Kill interpreter process");
         try {
-          callRemoteFunction(
-              new RemoteFunction<Void>() {
-                @Override
-                public Void call(RemoteInterpreterService.Client client) throws Exception {
-                  client.shutdown();
-                  return null;
-                }
-              });
+          callRemoteFunction(new RemoteFunction<Void>() {
+            @Override
+            public Void call(RemoteInterpreterService.Client client) throws Exception {
+              client.shutdown();
+              return null;
+            }
+          });
         } catch (Exception e) {
           logger.warn("ignore the exception when shutting down interpreter process.", e);
         }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ApplicationState.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ApplicationState.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ApplicationState.java
index 9f56f96..bc71d89 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ApplicationState.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ApplicationState.java
@@ -18,10 +18,14 @@ package org.apache.zeppelin.notebook;
 
 import org.apache.zeppelin.helium.HeliumPackage;
 
-/** Current state of application */
+/**
+ * Current state of application
+ */
 public class ApplicationState {
 
-  /** Status of Application */
+  /**
+   * Status of Application
+   */
   public static enum Status {
     LOADING,
     LOADED,
@@ -32,7 +36,7 @@ public class ApplicationState {
 
   Status status = Status.UNLOADED;
 
-  String id; // unique id for this instance. Similar to note id or paragraph id
+  String id;   // unique id for this instance. Similar to note id or paragraph id
   HeliumPackage pkg;
   String output;
 
@@ -42,8 +46,9 @@ public class ApplicationState {
   }
 
   /**
-   * After ApplicationState is restored from NotebookRepo, such as after Zeppelin daemon starts or
-   * Notebook import, Application status need to be reset.
+   * After ApplicationState is restored from NotebookRepo,
+   * such as after Zeppelin daemon starts or Notebook import,
+   * Application status need to be reset.
    */
   public void resetStatus() {
     if (status != Status.ERROR) {
@@ -51,6 +56,7 @@ public class ApplicationState {
     }
   }
 
+
   @Override
   public boolean equals(Object o) {
     String compareName;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/FileSystemStorage.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/FileSystemStorage.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/FileSystemStorage.java
index e7ed568..4670e20 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/FileSystemStorage.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/FileSystemStorage.java
@@ -1,14 +1,5 @@
 package org.apache.zeppelin.notebook;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.security.PrivilegedExceptionAction;
-import java.util.ArrayList;
-import java.util.List;
 import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileStatus;
@@ -21,7 +12,20 @@ import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Hadoop FileSystem wrapper. Support both secure and no-secure mode */
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.security.PrivilegedExceptionAction;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * Hadoop FileSystem wrapper. Support both secure and no-secure mode
+ */
 public class FileSystemStorage {
 
   private static Logger LOGGER = LoggerFactory.getLogger(FileSystemStorage.class);
@@ -31,22 +35,19 @@ public class FileSystemStorage {
   static {
     if (UserGroupInformation.isSecurityEnabled()) {
       ZeppelinConfiguration zConf = ZeppelinConfiguration.create();
-      String keytab =
-          zConf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_SERVER_KERBEROS_KEYTAB);
-      String principal =
-          zConf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_SERVER_KERBEROS_PRINCIPAL);
+      String keytab = zConf.getString(
+          ZeppelinConfiguration.ConfVars.ZEPPELIN_SERVER_KERBEROS_KEYTAB);
+      String principal = zConf.getString(
+          ZeppelinConfiguration.ConfVars.ZEPPELIN_SERVER_KERBEROS_PRINCIPAL);
       if (StringUtils.isBlank(keytab) || StringUtils.isBlank(principal)) {
-        throw new RuntimeException(
-            "keytab and principal can not be empty, keytab: "
-                + keytab
-                + ", principal: "
-                + principal);
+        throw new RuntimeException("keytab and principal can not be empty, keytab: " + keytab
+            + ", principal: " + principal);
       }
       try {
         UserGroupInformation.loginUserFromKeytab(principal, keytab);
       } catch (IOException e) {
-        throw new RuntimeException(
-            "Fail to login via keytab:" + keytab + ", principal:" + principal, e);
+        throw new RuntimeException("Fail to login via keytab:" + keytab +
+            ", principal:" + principal, e);
       }
     }
   }
@@ -80,93 +81,82 @@ public class FileSystemStorage {
   }
 
   public boolean exists(final Path path) throws IOException {
-    return callHdfsOperation(
-        new HdfsOperation<Boolean>() {
+    return callHdfsOperation(new HdfsOperation<Boolean>() {
 
-          @Override
-          public Boolean call() throws IOException {
-            return fs.exists(path);
-          }
-        });
+      @Override
+      public Boolean call() throws IOException {
+        return fs.exists(path);
+      }
+    });
   }
 
   public void tryMkDir(final Path dir) throws IOException {
-    callHdfsOperation(
-        new HdfsOperation<Void>() {
-          @Override
-          public Void call() throws IOException {
-            if (!fs.exists(dir)) {
-              fs.mkdirs(dir);
-              LOGGER.info("Create dir {} in hdfs", dir.toString());
-            }
-            if (fs.isFile(dir)) {
-              throw new IOException(
-                  dir.toString()
-                      + " is file instead of directory, please remove "
-                      + "it or specify another directory");
-            }
-            fs.mkdirs(dir);
-            return null;
-          }
-        });
+    callHdfsOperation(new HdfsOperation<Void>() {
+      @Override
+      public Void call() throws IOException {
+        if (!fs.exists(dir)) {
+          fs.mkdirs(dir);
+          LOGGER.info("Create dir {} in hdfs", dir.toString());
+        }
+        if (fs.isFile(dir)) {
+          throw new IOException(dir.toString() + " is file instead of directory, please remove " +
+              "it or specify another directory");
+        }
+        fs.mkdirs(dir);
+        return null;
+      }
+    });
   }
 
   public List<Path> list(final Path path) throws IOException {
-    return callHdfsOperation(
-        new HdfsOperation<List<Path>>() {
-          @Override
-          public List<Path> call() throws IOException {
-            List<Path> paths = new ArrayList<>();
-            for (FileStatus status : fs.globStatus(path)) {
-              paths.add(status.getPath());
-            }
-            return paths;
-          }
-        });
+    return callHdfsOperation(new HdfsOperation<List<Path>>() {
+      @Override
+      public List<Path> call() throws IOException {
+        List<Path> paths = new ArrayList<>();
+        for (FileStatus status : fs.globStatus(path)) {
+          paths.add(status.getPath());
+        }
+        return paths;
+      }
+    });
   }
 
   public boolean delete(final Path path) throws IOException {
-    return callHdfsOperation(
-        new HdfsOperation<Boolean>() {
-          @Override
-          public Boolean call() throws IOException {
-            return fs.delete(path, true);
-          }
-        });
+    return callHdfsOperation(new HdfsOperation<Boolean>() {
+      @Override
+      public Boolean call() throws IOException {
+        return fs.delete(path, true);
+      }
+    });
   }
 
   public String readFile(final Path file) throws IOException {
-    return callHdfsOperation(
-        new HdfsOperation<String>() {
-          @Override
-          public String call() throws IOException {
-            LOGGER.debug("Read from file: " + file);
-            ByteArrayOutputStream noteBytes = new ByteArrayOutputStream();
-            IOUtils.copyBytes(fs.open(file), noteBytes, hadoopConf);
-            return new String(
-                noteBytes.toString(
-                    zConf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_ENCODING)));
-          }
-        });
+    return callHdfsOperation(new HdfsOperation<String>() {
+      @Override
+      public String call() throws IOException {
+        LOGGER.debug("Read from file: " + file);
+        ByteArrayOutputStream noteBytes = new ByteArrayOutputStream();
+        IOUtils.copyBytes(fs.open(file), noteBytes, hadoopConf);
+        return new String(noteBytes.toString(
+            zConf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_ENCODING)));
+      }
+    });
   }
 
   public void writeFile(final String content, final Path file, boolean writeTempFileFirst)
       throws IOException {
-    callHdfsOperation(
-        new HdfsOperation<Void>() {
-          @Override
-          public Void call() throws IOException {
-            InputStream in =
-                new ByteArrayInputStream(
-                    content.getBytes(
-                        zConf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_ENCODING)));
-            Path tmpFile = new Path(file.toString() + ".tmp");
-            IOUtils.copyBytes(in, fs.create(tmpFile), hadoopConf);
-            fs.delete(file, true);
-            fs.rename(tmpFile, file);
-            return null;
-          }
-        });
+    callHdfsOperation(new HdfsOperation<Void>() {
+      @Override
+      public Void call() throws IOException {
+        InputStream in = new ByteArrayInputStream(content.getBytes(
+            zConf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_ENCODING)));
+        Path tmpFile = new Path(file.toString() + ".tmp");
+        IOUtils.copyBytes(in, fs.create(tmpFile), hadoopConf);
+        fs.delete(file, true);
+        fs.rename(tmpFile, file);
+        return null;
+      }
+    });
   }
 
   private interface HdfsOperation<T> {
@@ -176,14 +166,12 @@ public class FileSystemStorage {
   public synchronized <T> T callHdfsOperation(final HdfsOperation<T> func) throws IOException {
     if (isSecurityEnabled) {
       try {
-        return UserGroupInformation.getCurrentUser()
-            .doAs(
-                new PrivilegedExceptionAction<T>() {
-                  @Override
-                  public T run() throws Exception {
-                    return func.call();
-                  }
-                });
+        return UserGroupInformation.getCurrentUser().doAs(new PrivilegedExceptionAction<T>() {
+          @Override
+          public T run() throws Exception {
+            return func.call();
+          }
+        });
       } catch (InterruptedException e) {
         throw new IOException(e);
       }
@@ -191,4 +179,5 @@ public class FileSystemStorage {
       return func.call();
     }
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Folder.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Folder.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Folder.java
index d3709c2..afd5229 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Folder.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Folder.java
@@ -18,14 +18,16 @@
 package org.apache.zeppelin.notebook;
 
 import com.google.common.collect.Sets;
-import java.util.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.*;
+
 /**
- * Represents a folder of Notebook. ID of the folder is a normalized path of it. 'normalized path'
- * means the path that removed '/' from the beginning and the end of the path. e.g. "a/b/c", but not
- * "/a/b/c", "a/b/c/" or "/a/b/c/". One exception can be the root folder, which is '/'.
+ * Represents a folder of Notebook. ID of the folder is a normalized path of it.
+ * 'normalized path' means the path that removed '/' from the beginning and the end of the path.
+ * e.g. "a/b/c", but not "/a/b/c", "a/b/c/" or "/a/b/c/".
+ * One exception can be the root folder, which is '/'.
  */
 public class Folder {
   public static final String ROOT_FOLDER_ID = "/";
@@ -53,12 +55,13 @@ public class Folder {
   }
 
   public String getName() {
-    if (isRoot()) return ROOT_FOLDER_ID;
+    if (isRoot())
+      return ROOT_FOLDER_ID;
 
     String path = getId();
 
     int lastSlashIndex = path.lastIndexOf("/");
-    if (lastSlashIndex < 0) { // This folder is under the root
+    if (lastSlashIndex < 0) {   // This folder is under the root
       return path;
     }
 
@@ -66,7 +69,8 @@ public class Folder {
   }
 
   public String getParentFolderId() {
-    if (isRoot()) return ROOT_FOLDER_ID;
+    if (isRoot())
+      return ROOT_FOLDER_ID;
 
     int lastSlashIndex = getId().lastIndexOf("/");
     // The root folder
@@ -105,8 +109,8 @@ public class Folder {
    * @param newId
    */
   public void rename(String newId) {
-    if (isRoot()) // root folder cannot be renamed
-    return;
+    if (isRoot())   // root folder cannot be renamed
+      return;
 
     String oldId = getId();
     id = normalizeFolderId(newId);
@@ -168,7 +172,7 @@ public class Folder {
 
   public void addChild(Folder child) {
     if (child == this) // prevent the root folder from setting itself as child
-    return;
+      return;
     children.put(child.getId(), child);
   }
 
@@ -213,8 +217,8 @@ public class Folder {
     return notes;
   }
 
-  public List<Note> getNotesRecursively(
-      Set<String> userAndRoles, NotebookAuthorization notebookAuthorization) {
+  public List<Note> getNotesRecursively(Set<String> userAndRoles,
+      NotebookAuthorization notebookAuthorization) {
     final Set<String> entities = Sets.newHashSet();
     if (userAndRoles != null) {
       entities.addAll(userAndRoles);
@@ -245,7 +249,8 @@ public class Folder {
   }
 
   public boolean isTrash() {
-    if (isRoot()) return false;
+    if (isRoot())
+      return false;
 
     return getId().split("/")[0].equals(TRASH_FOLDER_ID);
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/FolderListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/FolderListener.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/FolderListener.java
index 0b7e0fb..efc2f72 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/FolderListener.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/FolderListener.java
@@ -16,7 +16,9 @@
  */
 package org.apache.zeppelin.notebook;
 
-/** Folder listener used by FolderView */
+/**
+ * Folder listener used by FolderView
+ */
 public interface FolderListener {
   void onFolderRenamed(Folder folder, String oldFolderId);
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/FolderView.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/FolderView.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/FolderView.java
index c111193..7d3f001 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/FolderView.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/FolderView.java
@@ -17,13 +17,15 @@
 
 package org.apache.zeppelin.notebook;
 
-import java.util.LinkedHashMap;
-import java.util.Map;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.LinkedHashMap;
+import java.util.Map;
+
 /**
- * Folder view of notes of Notebook. FolderView allows you to see notes from perspective of folders.
+ * Folder view of notes of Notebook.
+ * FolderView allows you to see notes from perspective of folders.
  */
 public class FolderView implements NoteNameListener, FolderListener {
   // key: folderId
@@ -43,20 +45,22 @@ public class FolderView implements NoteNameListener, FolderListener {
    *
    * @param oldFolderId folderId to rename
    * @param newFolderId newFolderId
-   * @return `null` if folder not exists, else old Folder in order to know which notes and child
-   *     folders are renamed
+   * @return `null` if folder not exists, else old Folder
+   * in order to know which notes and child folders are renamed
    */
   public Folder renameFolder(String oldFolderId, String newFolderId) {
     String normOldFolderId = Folder.normalizeFolderId(oldFolderId);
     String normNewFolderId = Folder.normalizeFolderId(newFolderId);
 
-    if (!hasFolder(normOldFolderId)) return null;
+    if (!hasFolder(normOldFolderId))
+      return null;
 
-    if (oldFolderId.equals(Folder.ROOT_FOLDER_ID)) // cannot rename the root folder
-    return null;
+    if (oldFolderId.equals(Folder.ROOT_FOLDER_ID))  // cannot rename the root folder
+      return null;
 
     // check whether oldFolderId and newFolderId are same or not
-    if (normOldFolderId.equals(normNewFolderId)) return getFolder(normOldFolderId);
+    if (normOldFolderId.equals(normNewFolderId))
+      return getFolder(normOldFolderId);
 
     logger.info("Rename {} to {}", normOldFolderId, normNewFolderId);
 
@@ -88,7 +92,8 @@ public class FolderView implements NoteNameListener, FolderListener {
   }
 
   private Folder getOrCreateFolder(String folderId) {
-    if (folders.containsKey(folderId)) return folders.get(folderId);
+    if (folders.containsKey(folderId))
+      return folders.get(folderId);
 
     return createFolder(folderId);
   }
@@ -129,7 +134,8 @@ public class FolderView implements NoteNameListener, FolderListener {
   }
 
   private void removeFolderIfEmpty(String folderId) {
-    if (!hasFolder(folderId)) return;
+    if (!hasFolder(folderId))
+      return;
 
     Folder folder = getFolder(folderId);
     if (folder.countNotes() == 0 && !folder.hasChild()) {
@@ -185,8 +191,8 @@ public class FolderView implements NoteNameListener, FolderListener {
   }
 
   /**
-   * Fired after a note's setName() run. When the note's name changed, FolderView should check if
-   * the note is in the right folder.
+   * Fired after a note's setName() run.
+   * When the note's name changed, FolderView should check if the note is in the right folder.
    *
    * @param note
    * @param oldName
@@ -216,11 +222,12 @@ public class FolderView implements NoteNameListener, FolderListener {
 
   @Override
   public void onFolderRenamed(Folder folder, String oldFolderId) {
-    if (getFolder(folder.getId()) == folder) // the folder is at the right place
-    return;
+    if (getFolder(folder.getId()) == folder)  // the folder is at the right place
+      return;
     logger.info("folder renamed: {} -> {}", oldFolderId, folder.getId());
 
-    if (getFolder(oldFolderId) == folder) folders.remove(oldFolderId);
+    if (getFolder(oldFolderId) == folder)
+      folders.remove(oldFolderId);
 
     Folder newFolder = getOrCreateFolder(folder.getId());
     newFolder.merge(folder);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java
index a845ec1..61a36ab 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
@@ -17,38 +17,29 @@
 
 package org.apache.zeppelin.notebook;
 
-import static java.lang.String.format;
-
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
-import java.io.IOException;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.ScheduledThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.common.JsonSerializable;
+import org.apache.zeppelin.completer.CompletionType;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.display.AngularObject;
 import org.apache.zeppelin.display.AngularObjectRegistry;
 import org.apache.zeppelin.display.Input;
 import org.apache.zeppelin.interpreter.InterpreterFactory;
 import org.apache.zeppelin.interpreter.InterpreterGroup;
+import org.apache.zeppelin.interpreter.InterpreterInfo;
 import org.apache.zeppelin.interpreter.InterpreterResult;
+import org.apache.zeppelin.interpreter.InterpreterResultMessage;
 import org.apache.zeppelin.interpreter.InterpreterSetting;
 import org.apache.zeppelin.interpreter.InterpreterSettingManager;
 import org.apache.zeppelin.interpreter.remote.RemoteAngularObjectRegistry;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.notebook.repo.NotebookRepo;
 import org.apache.zeppelin.notebook.utility.IdHashes;
+import org.apache.zeppelin.scheduler.Job;
 import org.apache.zeppelin.scheduler.Job.Status;
 import org.apache.zeppelin.search.SearchService;
 import org.apache.zeppelin.user.AuthenticationInfo;
@@ -56,17 +47,32 @@ import org.apache.zeppelin.user.Credentials;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Binded interpreters for a note */
+import java.io.IOException;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.ScheduledThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+import static java.lang.String.format;
+
+/**
+ * Binded interpreters for a note
+ */
 public class Note implements JsonSerializable {
   private static final Logger logger = LoggerFactory.getLogger(Note.class);
   private static final long serialVersionUID = 7920699076577612429L;
-  private static Gson gson =
-      new GsonBuilder()
-          .setPrettyPrinting()
-          .setDateFormat("yyyy-MM-dd HH:mm:ss.SSS")
-          .registerTypeAdapter(Date.class, new NotebookImportDeserializer())
-          .registerTypeAdapterFactory(Input.TypeAdapterFactory)
-          .create();
+  private static Gson gson = new GsonBuilder()
+      .setPrettyPrinting()
+      .setDateFormat("yyyy-MM-dd HH:mm:ss.SSS")
+      .registerTypeAdapter(Date.class, new NotebookImportDeserializer())
+      .registerTypeAdapterFactory(Input.TypeAdapterFactory)
+      .create();
 
   // threadpool for delayed persist of note
   private static final ScheduledThreadPoolExecutor delayedPersistThreadPool =
@@ -108,20 +114,14 @@ public class Note implements JsonSerializable {
    */
   private Map<String, Object> info = new HashMap<>();
 
+
   public Note() {
     generateId();
   }
 
-  public Note(
-      String name,
-      String defaultInterpreterGroup,
-      NotebookRepo repo,
-      InterpreterFactory factory,
-      InterpreterSettingManager interpreterSettingManager,
-      ParagraphJobListener paragraphJobListener,
-      SearchService noteIndex,
-      Credentials credentials,
-      NoteEventListener noteEventListener) {
+  public Note(String name, String defaultInterpreterGroup, NotebookRepo repo, InterpreterFactory factory,
+      InterpreterSettingManager interpreterSettingManager, ParagraphJobListener paragraphJobListener,
+      SearchService noteIndex, Credentials credentials, NoteEventListener noteEventListener) {
     this.name = name;
     this.defaultInterpreterGroup = defaultInterpreterGroup;
     this.repo = repo;
@@ -214,12 +214,15 @@ public class Note implements JsonSerializable {
     return notePath.substring(lastSlashIndex + 1);
   }
 
-  /** @return normalized folder path, which is folderId */
+  /**
+   * @return normalized folder path, which is folderId
+   */
   public String getFolderId() {
     String notePath = getName();
 
     // Ignore first '/'
-    if (notePath.charAt(0) == '/') notePath = notePath.substring(1);
+    if (notePath.charAt(0) == '/')
+      notePath = notePath.substring(1);
 
     int lastSlashIndex = notePath.lastIndexOf("/");
     // The root folder
@@ -283,9 +286,8 @@ public class Note implements JsonSerializable {
     final Note paragraphNote = paragraph.getNote();
     if (!paragraphNote.getId().equals(this.getId())) {
       throw new IllegalArgumentException(
-          format(
-              "The paragraph %s from note %s " + "does not belong to note %s",
-              paragraph.getId(), paragraphNote.getId(), this.getId()));
+          format("The paragraph %s from note %s " + "does not belong to note %s", paragraph.getId(),
+              paragraphNote.getId(), this.getId()));
     }
 
     boolean foundParagraph = false;
@@ -298,9 +300,8 @@ public class Note implements JsonSerializable {
 
     if (!foundParagraph) {
       throw new IllegalArgumentException(
-          format(
-              "Cannot find paragraph %s " + "from note %s",
-              paragraph.getId(), paragraphNote.getId()));
+          format("Cannot find paragraph %s " + "from note %s", paragraph.getId(),
+              paragraphNote.getId()));
     }
   }
 
@@ -345,11 +346,14 @@ public class Note implements JsonSerializable {
     this.credentials = credentials;
   }
 
+
   Map<String, List<AngularObject>> getAngularObjects() {
     return angularObjects;
   }
 
-  /** Create a new paragraph and add it to the end of the note. */
+  /**
+   * Create a new paragraph and add it to the end of the note.
+   */
   public Paragraph addNewParagraph(AuthenticationInfo authenticationInfo) {
     return insertNewParagraph(paragraphs.size(), authenticationInfo);
   }
@@ -362,24 +366,25 @@ public class Note implements JsonSerializable {
   void addCloneParagraph(Paragraph srcParagraph, AuthenticationInfo subject) {
 
     // Keep paragraph original ID
-    final Paragraph newParagraph =
-        new Paragraph(srcParagraph.getId(), this, paragraphJobListener, factory);
+    final Paragraph newParagraph = new Paragraph(srcParagraph.getId(), this,
+        paragraphJobListener, factory);
 
     Map<String, Object> config = new HashMap<>(srcParagraph.getConfig());
     Map<String, Object> param = srcParagraph.settings.getParams();
     Map<String, Input> form = srcParagraph.settings.getForms();
 
     logger.debug("srcParagraph user: " + srcParagraph.getUser());
-
+    
     newParagraph.setAuthenticationInfo(subject);
     newParagraph.setConfig(config);
     newParagraph.settings.setParams(param);
     newParagraph.settings.setForms(form);
     newParagraph.setText(srcParagraph.getText());
     newParagraph.setTitle(srcParagraph.getTitle());
-
+    
     logger.debug("newParagraph user: " + newParagraph.getUser());
 
+
     try {
       Gson gson = new Gson();
       String resultJson = gson.toJson(srcParagraph.getReturn());
@@ -497,7 +502,9 @@ public class Note implements JsonSerializable {
     return null;
   }
 
-  /** Clear all paragraph output of note */
+  /**
+   * Clear all paragraph output of note
+   */
   public void clearAllParagraphOutput() {
     synchronized (paragraphs) {
       for (Paragraph p : paragraphs) {
@@ -510,7 +517,7 @@ public class Note implements JsonSerializable {
    * Move paragraph into the new index (order from 0 ~ n-1).
    *
    * @param paragraphId ID of paragraph
-   * @param index new index
+   * @param index       new index
    */
   public void moveParagraph(String paragraphId, int index) {
     moveParagraph(paragraphId, index, false);
@@ -519,10 +526,10 @@ public class Note implements JsonSerializable {
   /**
    * Move paragraph into the new index (order from 0 ~ n-1).
    *
-   * @param paragraphId ID of paragraph
-   * @param index new index
-   * @param throwWhenIndexIsOutOfBound whether throw IndexOutOfBoundException when index is out of
-   *     bound
+   * @param paragraphId                ID of paragraph
+   * @param index                      new index
+   * @param throwWhenIndexIsOutOfBound whether throw IndexOutOfBoundException
+   *                                   when index is out of bound
    */
   public void moveParagraph(String paragraphId, int index, boolean throwWhenIndexIsOutOfBound) {
     synchronized (paragraphs) {
@@ -646,18 +653,19 @@ public class Note implements JsonSerializable {
     }
   }
 
-  /** Run all paragraphs sequentially. Only used for CronJob */
+  /**
+   * Run all paragraphs sequentially. Only used for CronJob
+   */
   public synchronized void runAll() {
     String cronExecutingUser = (String) getConfig().get("cronExecutingUser");
     String cronExecutingRoles = (String) getConfig().get("cronExecutingRoles");
     if (null == cronExecutingUser) {
       cronExecutingUser = "anonymous";
     }
-    AuthenticationInfo authenticationInfo =
-        new AuthenticationInfo(
-            cronExecutingUser,
-            StringUtils.isEmpty(cronExecutingRoles) ? null : cronExecutingRoles,
-            null);
+    AuthenticationInfo authenticationInfo = new AuthenticationInfo(
+        cronExecutingUser,
+        StringUtils.isEmpty(cronExecutingRoles) ? null : cronExecutingRoles,
+        null);
     runAll(authenticationInfo, true);
   }
 
@@ -689,7 +697,9 @@ public class Note implements JsonSerializable {
     return p.execute(blocking);
   }
 
-  /** Return true if there is a running or pending paragraph */
+  /**
+   * Return true if there is a running or pending paragraph
+   */
   boolean isRunningOrPending() {
     synchronized (paragraphs) {
       for (Paragraph p : paragraphs) {
@@ -731,7 +741,7 @@ public class Note implements JsonSerializable {
     if (settings == null || settings.size() == 0) {
       return;
     }
-
+    
     for (InterpreterSetting setting : settings) {
       InterpreterGroup intpGroup = setting.getInterpreterGroup(user, id);
       if (intpGroup != null) {
@@ -790,7 +800,9 @@ public class Note implements JsonSerializable {
     repo.save(this, subject);
   }
 
-  /** Persist this note with maximum delay. */
+  /**
+   * Persist this note with maximum delay.
+   */
   public void persist(int maxDelaySec, AuthenticationInfo subject) {
     startDelayedPersistTimer(maxDelaySec, subject);
   }
@@ -799,6 +811,7 @@ public class Note implements JsonSerializable {
     repo.remove(getId(), subject);
   }
 
+
   /**
    * Return new note for specific user. this inserts and replaces user paragraph which doesn't
    * exists in original paragraph
@@ -831,21 +844,17 @@ public class Note implements JsonSerializable {
         return;
       }
 
-      delayedPersist =
-          delayedPersistThreadPool.schedule(
-              new Runnable() {
+      delayedPersist = delayedPersistThreadPool.schedule(new Runnable() {
 
-                @Override
-                public void run() {
-                  try {
-                    persist(subject);
-                  } catch (IOException e) {
-                    logger.error(e.getMessage(), e);
-                  }
-                }
-              },
-              maxDelaySec,
-              TimeUnit.SECONDS);
+        @Override
+        public void run() {
+          try {
+            persist(subject);
+          } catch (IOException e) {
+            logger.error(e.getMessage(), e);
+          }
+        }
+      }, maxDelaySec, TimeUnit.SECONDS);
     }
   }
 
@@ -935,22 +944,21 @@ public class Note implements JsonSerializable {
     if (paragraphs != null ? !paragraphs.equals(note.paragraphs) : note.paragraphs != null) {
       return false;
     }
-    // TODO(zjffdu) exclude name because FolderView.index use Note as key and consider different
-    // name
-    // as same note
+    //TODO(zjffdu) exclude name because FolderView.index use Note as key and consider different name
+    //as same note
     //    if (name != null ? !name.equals(note.name) : note.name != null) return false;
     if (id != null ? !id.equals(note.id) : note.id != null) {
       return false;
     }
-    if (angularObjects != null
-        ? !angularObjects.equals(note.angularObjects)
-        : note.angularObjects != null) {
+    if (angularObjects != null ?
+        !angularObjects.equals(note.angularObjects) : note.angularObjects != null) {
       return false;
     }
     if (config != null ? !config.equals(note.config) : note.config != null) {
       return false;
     }
     return info != null ? info.equals(note.info) : note.info == null;
+
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteEventListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteEventListener.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteEventListener.java
index 83f311d..5f98f70 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteEventListener.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteEventListener.java
@@ -18,11 +18,11 @@ package org.apache.zeppelin.notebook;
 
 import org.apache.zeppelin.scheduler.Job;
 
-/** NoteEventListener */
+/**
+ * NoteEventListener
+ */
 public interface NoteEventListener {
   public void onParagraphRemove(Paragraph p);
-
   public void onParagraphCreate(Paragraph p);
-
   public void onParagraphStatusChange(Paragraph p, Job.Status status);
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteInfo.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteInfo.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteInfo.java
index 281744f..d316dfb 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteInfo.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteInfo.java
@@ -20,7 +20,9 @@ package org.apache.zeppelin.notebook;
 import java.util.HashMap;
 import java.util.Map;
 
-/** */
+/**
+ *
+ */
 public class NoteInfo {
   String id;
   String name;
@@ -62,4 +64,5 @@ public class NoteInfo {
   public void setConfig(Map<String, Object> config) {
     this.config = config;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteNameListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteNameListener.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteNameListener.java
index 2d5175e..28b53fb 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteNameListener.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteNameListener.java
@@ -17,11 +17,12 @@
 
 package org.apache.zeppelin.notebook;
 
-/** NoteNameListener. It's used by FolderView. */
+/**
+ * NoteNameListener. It's used by FolderView.
+ */
 public interface NoteNameListener {
   /**
    * Fired after note name changed
-   *
    * @param note
    * @param oldName
    */

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Notebook.java
----------------------------------------------------------------------
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 fbccd80..b7dcdc3 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
@@ -69,19 +69,21 @@ import org.quartz.impl.StdSchedulerFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Collection of Notes. */
+/**
+ * Collection of Notes.
+ */
 public class Notebook implements NoteEventListener {
   private static final Logger logger = LoggerFactory.getLogger(Notebook.class);
 
-  @SuppressWarnings("unused")
-  @Deprecated // TODO(bzz): remove unused
+  @SuppressWarnings("unused") @Deprecated //TODO(bzz): remove unused
   private SchedulerFactory schedulerFactory;
 
   private InterpreterFactory replFactory;
   private InterpreterSettingManager interpreterSettingManager;
-  /** Keep the order. */
+  /**
+   * Keep the order.
+   */
   private final Map<String, Note> notes = new LinkedHashMap<>();
-
   private final FolderView folders = new FolderView();
   private ZeppelinConfiguration conf;
   private StdSchedulerFactory quertzSchedFact;
@@ -97,21 +99,15 @@ public class Notebook implements NoteEventListener {
   /**
    * Main constructor \w manual Dependency Injection
    *
-   * @param noteSearchService - (nullable) for indexing all notebooks on creating.
+   * @param noteSearchService         - (nullable) for indexing all notebooks on creating.
    * @throws IOException
    * @throws SchedulerException
    */
-  public Notebook(
-      ZeppelinConfiguration conf,
-      NotebookRepo notebookRepo,
-      SchedulerFactory schedulerFactory,
-      InterpreterFactory replFactory,
-      InterpreterSettingManager interpreterSettingManager,
-      ParagraphJobListener paragraphJobListener,
-      SearchService noteSearchService,
-      NotebookAuthorization notebookAuthorization,
-      Credentials credentials)
-      throws IOException, SchedulerException {
+  public Notebook(ZeppelinConfiguration conf, NotebookRepo notebookRepo,
+      SchedulerFactory schedulerFactory, InterpreterFactory replFactory,
+      InterpreterSettingManager interpreterSettingManager, ParagraphJobListener paragraphJobListener,
+      SearchService noteSearchService, NotebookAuthorization notebookAuthorization,
+      Credentials credentials) throws IOException, SchedulerException {
     this.conf = conf;
     this.notebookRepo = notebookRepo;
     this.schedulerFactory = schedulerFactory;
@@ -132,9 +128,7 @@ public class Notebook implements NoteEventListener {
       long start = System.nanoTime();
       logger.info("Notebook indexing started...");
       noteSearchService.addIndexDocs(notes.values());
-      logger.info(
-          "Notebook indexing finished: {} indexed in {}s",
-          notes.size(),
+      logger.info("Notebook indexing finished: {} indexed in {}s", notes.size(),
           TimeUnit.NANOSECONDS.toSeconds(start - System.nanoTime()));
     }
   }
@@ -145,8 +139,7 @@ public class Notebook implements NoteEventListener {
    * @throws IOException
    */
   public Note createNote(AuthenticationInfo subject) throws IOException {
-    return createNote(
-        "", interpreterSettingManager.getDefaultInterpreterSetting().getName(), subject);
+    return createNote("", interpreterSettingManager.getDefaultInterpreterSetting().getName(), subject);
   }
 
   /**
@@ -157,16 +150,8 @@ public class Notebook implements NoteEventListener {
   public Note createNote(String name, String defaultInterpreterGroup, AuthenticationInfo subject)
       throws IOException {
     Note note =
-        new Note(
-            name,
-            defaultInterpreterGroup,
-            notebookRepo,
-            replFactory,
-            interpreterSettingManager,
-            paragraphJobListener,
-            noteSearchService,
-            credentials,
-            this);
+        new Note(name, defaultInterpreterGroup, notebookRepo, replFactory, interpreterSettingManager,
+            paragraphJobListener, noteSearchService, credentials, this);
     note.setNoteNameListener(folders);
 
     synchronized (notes) {
@@ -198,7 +183,7 @@ public class Notebook implements NoteEventListener {
    * import JSON as a new note.
    *
    * @param sourceJson - the note JSON to import
-   * @param noteName - the name of the new note
+   * @param noteName   - the name of the new note
    * @return note ID
    * @throws IOException
    */
@@ -233,7 +218,7 @@ public class Notebook implements NoteEventListener {
    * Clone existing note.
    *
    * @param sourceNoteId - the note ID to clone
-   * @param newNoteName - the name of the new note
+   * @param newNoteName  - the name of the new note
    * @return noteId
    * @throws IOException, CloneNotSupportedException, IllegalArgumentException
    */
@@ -269,8 +254,8 @@ public class Notebook implements NoteEventListener {
       for (Paragraph p : note.getParagraphs()) {
         try {
           Interpreter intp = p.getBindedInterpreter();
-          settings.add(
-              ((ManagedInterpreterGroup) intp.getInterpreterGroup()).getInterpreterSetting());
+          settings.add((
+              (ManagedInterpreterGroup) intp.getInterpreterGroup()).getInterpreterSetting());
         } catch (InterpreterNotFoundException e) {
           // ignore this
         }
@@ -306,11 +291,11 @@ public class Notebook implements NoteEventListener {
   }
 
   public void moveNoteToTrash(String noteId) {
-    //    try {
-    ////      interpreterSettingManager.setInterpreterBinding("", noteId, new ArrayList<String>());
-    //    } catch (IOException e) {
-    //      e.printStackTrace();
-    //    }
+//    try {
+////      interpreterSettingManager.setInterpreterBinding("", noteId, new ArrayList<String>());
+//    } catch (IOException e) {
+//      e.printStackTrace();
+//    }
   }
 
   public void removeNote(String id, AuthenticationInfo subject) {
@@ -377,13 +362,14 @@ public class Notebook implements NoteEventListener {
     }
   }
 
-  public Revision checkpointNote(
-      String noteId, String checkpointMessage, AuthenticationInfo subject) throws IOException {
+  public Revision checkpointNote(String noteId, String checkpointMessage,
+      AuthenticationInfo subject) throws IOException {
     if (((NotebookRepoSync) notebookRepo).isRevisionSupportedInDefaultRepo()) {
       return ((NotebookRepoWithVersionControl) notebookRepo)
           .checkpoint(noteId, checkpointMessage, subject);
     } else {
       return null;
+
     }
   }
 
@@ -426,7 +412,7 @@ public class Notebook implements NoteEventListener {
       return null;
     }
 
-    // Manually inject ALL dependencies, as DI constructor was NOT used
+    //Manually inject ALL dependencies, as DI constructor was NOT used
     note.setIndex(this.noteSearchService);
     note.setCredentials(this.credentials);
 
@@ -461,8 +447,7 @@ public class Notebook implements NoteEventListener {
         for (AngularObject object : objectList) {
           SnapshotAngularObject snapshot = angularObjectSnapshot.get(object.getName());
           if (snapshot == null || snapshot.getLastUpdate().before(lastUpdatedDate)) {
-            angularObjectSnapshot.put(
-                object.getName(),
+            angularObjectSnapshot.put(object.getName(),
                 new SnapshotAngularObject(intpGroupName, object, lastUpdatedDate));
           }
         }
@@ -509,8 +494,8 @@ public class Notebook implements NoteEventListener {
   }
 
   /**
-   * Reload all notes from repository after clearing `notes` and `folders` to reflect the changes of
-   * added/deleted/modified notes on file system level.
+   * Reload all notes from repository after clearing `notes` and `folders`
+   * to reflect the changes of added/deleted/modified notes on file system level.
    *
    * @throws IOException
    */
@@ -573,29 +558,28 @@ public class Notebook implements NoteEventListener {
     return folders.getFolder(folderId).getNotesRecursively();
   }
 
-  public List<Note> getNotesUnderFolder(String folderId, Set<String> userAndRoles) {
+  public List<Note> getNotesUnderFolder(String folderId,
+      Set<String> userAndRoles) {
     return folders.getFolder(folderId).getNotesRecursively(userAndRoles, notebookAuthorization);
   }
 
   public List<Note> getAllNotes() {
     synchronized (notes) {
       List<Note> noteList = new ArrayList<>(notes.values());
-      Collections.sort(
-          noteList,
-          new Comparator<Note>() {
-            @Override
-            public int compare(Note note1, Note note2) {
-              String name1 = note1.getId();
-              if (note1.getName() != null) {
-                name1 = note1.getName();
-              }
-              String name2 = note2.getId();
-              if (note2.getName() != null) {
-                name2 = note2.getName();
-              }
-              return name1.compareTo(name2);
-            }
-          });
+      Collections.sort(noteList, new Comparator<Note>() {
+        @Override
+        public int compare(Note note1, Note note2) {
+          String name1 = note1.getId();
+          if (note1.getName() != null) {
+            name1 = note1.getName();
+          }
+          String name2 = note2.getId();
+          if (note2.getName() != null) {
+            name2 = note2.getName();
+          }
+          return name1.compareTo(name2);
+        }
+      });
       return noteList;
     }
   }
@@ -607,33 +591,31 @@ public class Notebook implements NoteEventListener {
     }
 
     synchronized (notes) {
-      return FluentIterable.from(notes.values())
-          .filter(
-              new Predicate<Note>() {
-                @Override
-                public boolean apply(Note input) {
-                  return input != null && notebookAuthorization.isReader(input.getId(), entities);
-                }
-              })
-          .toSortedList(
-              new Comparator<Note>() {
-                @Override
-                public int compare(Note note1, Note note2) {
-                  String name1 = note1.getId();
-                  if (note1.getName() != null) {
-                    name1 = note1.getName();
-                  }
-                  String name2 = note2.getId();
-                  if (note2.getName() != null) {
-                    name2 = note2.getName();
-                  }
-                  return name1.compareTo(name2);
-                }
-              });
-    }
-  }
-
-  /** Cron task for the note. */
+      return FluentIterable.from(notes.values()).filter(new Predicate<Note>() {
+        @Override
+        public boolean apply(Note input) {
+          return input != null && notebookAuthorization.isReader(input.getId(), entities);
+        }
+      }).toSortedList(new Comparator<Note>() {
+        @Override
+        public int compare(Note note1, Note note2) {
+          String name1 = note1.getId();
+          if (note1.getName() != null) {
+            name1 = note1.getName();
+          }
+          String name2 = note2.getId();
+          if (note2.getName() != null) {
+            name2 = note2.getName();
+          }
+          return name1.compareTo(name2);
+        }
+      });
+    }
+  }
+
+  /**
+   * Cron task for the note.
+   */
   public static class CronJob implements org.quartz.Job {
     public static Notebook notebook;
 
@@ -644,16 +626,13 @@ public class Notebook implements NoteEventListener {
       Note note = notebook.getNote(noteId);
 
       if (note.isRunningOrPending()) {
-        logger.warn(
-            "execution of the cron job is skipped because there is a running or pending "
-                + "paragraph (note id: {})",
-            noteId);
+        logger.warn("execution of the cron job is skipped because there is a running or pending " +
+            "paragraph (note id: {})", noteId);
         return;
       }
 
       if (!note.isCronSupported(notebook.getConf())) {
-        logger.warn(
-            "execution of the cron job is skipped cron is not enabled from Zeppelin server");
+        logger.warn("execution of the cron job is skipped cron is not enabled from Zeppelin server");
         return;
       }
 
@@ -673,14 +652,10 @@ public class Notebook implements NoteEventListener {
         logger.error(e.getMessage(), e);
       }
       if (releaseResource) {
-        for (InterpreterSetting setting :
-            notebook.getInterpreterSettingManager().getInterpreterSettings(note.getId())) {
+        for (InterpreterSetting setting : notebook.getInterpreterSettingManager()
+            .getInterpreterSettings(note.getId())) {
           try {
-            notebook
-                .getInterpreterSettingManager()
-                .restart(
-                    setting.getId(),
-                    noteId,
+            notebook.getInterpreterSettingManager().restart(setting.getId(), noteId,
                     cronExecutingUser != null ? cronExecutingUser : "anonymous");
           } catch (InterpreterException e) {
             logger.error("Fail to restart interpreter: " + setting.getId(), e);
@@ -693,6 +668,7 @@ public class Notebook implements NoteEventListener {
   public void refreshCron(String id) {
     removeCron(id);
     synchronized (notes) {
+
       Note note = notes.get(id);
       if (note == null) {
         return;
@@ -703,8 +679,7 @@ public class Notebook implements NoteEventListener {
       }
 
       if (!note.isCronSupported(getConf())) {
-        logger.warn(
-            "execution of the cron job is skipped cron is not enabled from Zeppelin server");
+        logger.warn("execution of the cron job is skipped cron is not enabled from Zeppelin server");
         return;
       }
 
@@ -713,10 +688,9 @@ public class Notebook implements NoteEventListener {
         return;
       }
 
+
       JobDetail newJob =
-          JobBuilder.newJob(CronJob.class)
-              .withIdentity(id, "note")
-              .usingJobData("noteId", id)
+          JobBuilder.newJob(CronJob.class).withIdentity(id, "note").usingJobData("noteId", id)
               .build();
 
       Map<String, Object> info = note.getInfo();
@@ -724,17 +698,14 @@ public class Notebook implements NoteEventListener {
 
       CronTrigger trigger = null;
       try {
-        trigger =
-            TriggerBuilder.newTrigger()
-                .withIdentity("trigger_" + id, "note")
-                .withSchedule(CronScheduleBuilder.cronSchedule(cronExpr))
-                .forJob(id, "note")
-                .build();
+        trigger = TriggerBuilder.newTrigger().withIdentity("trigger_" + id, "note")
+            .withSchedule(CronScheduleBuilder.cronSchedule(cronExpr)).forJob(id, "note").build();
       } catch (Exception e) {
         logger.error("Error", e);
         info.put("cron", e.getMessage());
       }
 
+
       try {
         if (trigger != null) {
           quartzSched.scheduleJob(newJob, trigger);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 f0b5ac1..137af65 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
@@ -17,10 +17,13 @@
 
 package org.apache.zeppelin.notebook;
 
-import com.google.common.base.Predicate;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.Sets;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
@@ -28,6 +31,7 @@ import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars;
@@ -36,7 +40,15 @@ import org.apache.zeppelin.user.AuthenticationInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Contains authorization information for notes */
+import com.google.common.base.Predicate;
+import com.google.common.collect.FluentIterable;
+import com.google.common.collect.Sets;
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+/**
+ * Contains authorization information for notes
+ */
 public class NotebookAuthorization {
   private static final Logger LOG = LoggerFactory.getLogger(NotebookAuthorization.class);
   private static NotebookAuthorization instance = null;
@@ -71,9 +83,8 @@ public class NotebookAuthorization {
 
   public static NotebookAuthorization getInstance() {
     if (instance == null) {
-      LOG.warn(
-          "Notebook authorization module was called without initialization,"
-              + " initializing with default configuration");
+      LOG.warn("Notebook authorization module was called without initialization,"
+          + " initializing with default configuration");
       init(ZeppelinConfiguration.create());
     }
     return instance;
@@ -85,7 +96,7 @@ public class NotebookAuthorization {
       authInfo = info.authInfo;
     }
   }
-
+  
   public void setRoles(String user, Set<String> roles) {
     if (StringUtils.isBlank(user)) {
       LOG.warn("Setting roles for empty user");
@@ -94,7 +105,7 @@ public class NotebookAuthorization {
     roles = validateUser(roles);
     userRoles.put(user, roles);
   }
-
+  
   public Set<String> getRoles(String user) {
     Set<String> roles = Sets.newHashSet();
     if (userRoles.containsKey(user)) {
@@ -102,7 +113,7 @@ public class NotebookAuthorization {
     }
     return roles;
   }
-
+  
   private void saveToFile() {
     synchronized (authInfo) {
       NotebookAuthorizationInfoSaving info = new NotebookAuthorizationInfoSaving();
@@ -114,7 +125,7 @@ public class NotebookAuthorization {
       }
     }
   }
-
+  
   public boolean isPublic() {
     return conf.isNotebookPublic();
   }
@@ -177,6 +188,7 @@ public class NotebookAuthorization {
     saveToFile();
   }
 
+
   public void setWriters(String noteId, Set<String> entities) {
     Map<String, Set<String>> noteAuthInfo = authInfo.get(noteId);
     entities = validateUser(entities);
@@ -194,8 +206,8 @@ public class NotebookAuthorization {
   }
 
   /*
-   * If case conversion is enforced, then change entity names to lower case
-   */
+  * If case conversion is enforced, then change entity names to lower case
+  */
   private Set<String> checkCaseAndConvert(Set<String> entities) {
     if (conf.isUsernameForceLowerCase()) {
       Set<String> set2 = new HashSet<String>();
@@ -277,24 +289,24 @@ public class NotebookAuthorization {
   }
 
   public boolean isWriter(String noteId, Set<String> entities) {
-    return isMember(entities, getWriters(noteId))
-        || isMember(entities, getOwners(noteId))
-        || isAdmin(entities);
+    return isMember(entities, getWriters(noteId)) ||
+           isMember(entities, getOwners(noteId)) ||
+           isAdmin(entities);
   }
 
   public boolean isReader(String noteId, Set<String> entities) {
-    return isMember(entities, getReaders(noteId))
-        || isMember(entities, getOwners(noteId))
-        || isMember(entities, getWriters(noteId))
-        || isMember(entities, getRunners(noteId))
-        || isAdmin(entities);
+    return isMember(entities, getReaders(noteId)) ||
+           isMember(entities, getOwners(noteId)) ||
+           isMember(entities, getWriters(noteId)) ||
+           isMember(entities, getRunners(noteId)) ||
+           isAdmin(entities);
   }
 
   public boolean isRunner(String noteId, Set<String> entities) {
-    return isMember(entities, getRunners(noteId))
-        || isMember(entities, getWriters(noteId))
-        || isMember(entities, getOwners(noteId))
-        || isAdmin(entities);
+    return isMember(entities, getRunners(noteId)) ||
+           isMember(entities, getWriters(noteId)) ||
+           isMember(entities, getOwners(noteId)) ||
+           isAdmin(entities);
   }
 
   private boolean isAdmin(Set<String> entities) {
@@ -322,7 +334,7 @@ public class NotebookAuthorization {
     }
     return isOwner(noteId, userAndRoles);
   }
-
+  
   public boolean hasWriteAuthorization(Set<String> userAndRoles, String noteId) {
     if (conf.isAnonymousAllowed()) {
       LOG.debug("Zeppelin runs in anonymous mode, everybody is writer");
@@ -333,7 +345,7 @@ public class NotebookAuthorization {
     }
     return isWriter(noteId, userAndRoles);
   }
-
+  
   public boolean hasReadAuthorization(Set<String> userAndRoles, String noteId) {
     if (conf.isAnonymousAllowed()) {
       LOG.debug("Zeppelin runs in anonymous mode, everybody is reader");
@@ -366,17 +378,14 @@ public class NotebookAuthorization {
     if (subject != null) {
       entities.add(subject.getUser());
     }
-    return FluentIterable.from(notes)
-        .filter(
-            new Predicate<NoteInfo>() {
-              @Override
-              public boolean apply(NoteInfo input) {
-                return input != null && isReader(input.getId(), entities);
-              }
-            })
-        .toList();
+    return FluentIterable.from(notes).filter(new Predicate<NoteInfo>() {
+      @Override
+      public boolean apply(NoteInfo input) {
+        return input != null && isReader(input.getId(), entities);
+      }
+    }).toList();
   }
-
+  
   public void setNewNotePermissions(String noteId, AuthenticationInfo subject) {
     if (!AuthenticationInfo.isAnonymous(subject)) {
       if (isPublic()) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookAuthorizationInfoSaving.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookAuthorizationInfoSaving.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookAuthorizationInfoSaving.java
index 2227842..629e400 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookAuthorizationInfoSaving.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookAuthorizationInfoSaving.java
@@ -18,11 +18,14 @@
 package org.apache.zeppelin.notebook;
 
 import com.google.gson.Gson;
+import org.apache.zeppelin.common.JsonSerializable;
+
 import java.util.Map;
 import java.util.Set;
-import org.apache.zeppelin.common.JsonSerializable;
 
-/** Only used for saving NotebookAuthorization info */
+/**
+ * Only used for saving NotebookAuthorization info
+ */
 public class NotebookAuthorizationInfoSaving implements JsonSerializable {
 
   private static final Gson gson = new Gson();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookEventListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookEventListener.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookEventListener.java
index f5a62c4..01ebec6 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookEventListener.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookEventListener.java
@@ -16,9 +16,12 @@
  */
 package org.apache.zeppelin.notebook;
 
-/** Notebook event */
+import org.apache.zeppelin.interpreter.InterpreterSetting;
+
+/**
+ * Notebook event
+ */
 public interface NotebookEventListener extends NoteEventListener {
   public void onNoteRemove(Note note);
-
   public void onNoteCreate(Note note);
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookImportDeserializer.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookImportDeserializer.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookImportDeserializer.java
index bd34f80..0b8eed8 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookImportDeserializer.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookImportDeserializer.java
@@ -21,6 +21,7 @@ import com.google.gson.JsonDeserializationContext;
 import com.google.gson.JsonDeserializer;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonParseException;
+
 import java.lang.reflect.Type;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -28,29 +29,27 @@ import java.util.Arrays;
 import java.util.Date;
 import java.util.Locale;
 
-/** importNote date format deserializer */
+/**
+ *  importNote date format deserializer
+ */
 public class NotebookImportDeserializer implements JsonDeserializer<Date> {
-  private static final String[] DATE_FORMATS =
-      new String[] {
-        "yyyy-MM-dd'T'HH:mm:ssZ",
-        "MMM d, yyyy h:mm:ss a",
-        "MMM dd, yyyy HH:mm:ss",
-        "yyyy-MM-dd HH:mm:ss.SSS"
-      };
+  private static final String[] DATE_FORMATS = new String[] {
+    "yyyy-MM-dd'T'HH:mm:ssZ",
+    "MMM d, yyyy h:mm:ss a",
+    "MMM dd, yyyy HH:mm:ss",
+    "yyyy-MM-dd HH:mm:ss.SSS"
+  };
 
   @Override
-  public Date deserialize(JsonElement jsonElement, Type typeOF, JsonDeserializationContext context)
-      throws JsonParseException {
+  public Date deserialize(JsonElement jsonElement, Type typeOF,
+    JsonDeserializationContext context) throws JsonParseException {
     for (String format : DATE_FORMATS) {
       try {
         return new SimpleDateFormat(format, Locale.US).parse(jsonElement.getAsString());
       } catch (ParseException e) {
       }
     }
-    throw new JsonParseException(
-        "Unparsable date: \""
-            + jsonElement.getAsString()
-            + "\". Supported formats: "
-            + Arrays.toString(DATE_FORMATS));
+    throw new JsonParseException("Unparsable date: \"" + jsonElement.getAsString()
+      + "\". Supported formats: " + Arrays.toString(DATE_FORMATS));
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java
index 37bc77c..87dc5fd 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java
@@ -17,9 +17,6 @@
 
 package org.apache.zeppelin.notebook;
 
-import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Strings;
-import com.google.common.collect.Maps;
 import java.io.IOException;
 import java.security.SecureRandom;
 import java.util.ArrayList;
@@ -33,6 +30,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.common.JsonSerializable;
 import org.apache.zeppelin.display.AngularObject;
@@ -46,6 +44,7 @@ import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.InterpreterFactory;
 import org.apache.zeppelin.interpreter.InterpreterNotFoundException;
+import org.apache.zeppelin.interpreter.InterpreterOption;
 import org.apache.zeppelin.interpreter.InterpreterOutput;
 import org.apache.zeppelin.interpreter.InterpreterOutputListener;
 import org.apache.zeppelin.interpreter.InterpreterResult;
@@ -66,9 +65,15 @@ import org.apache.zeppelin.user.UserCredentials;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Paragraph is a representation of an execution unit. */
-public class Paragraph extends JobWithProgressPoller<InterpreterResult>
-    implements Cloneable, JsonSerializable {
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Strings;
+import com.google.common.collect.Maps;
+
+/**
+ * Paragraph is a representation of an execution unit.
+ */
+public class Paragraph extends JobWithProgressPoller<InterpreterResult> implements Cloneable,
+    JsonSerializable {
 
   private static Logger LOGGER = LoggerFactory.getLogger(Paragraph.class);
   private static Pattern REPL_PATTERN =
@@ -87,9 +92,8 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult>
   // Application states in this paragraph
   private final List<ApplicationState> apps = new LinkedList<>();
 
-  /** ************ Transient fields which are not serializabled into note json ************* */
+  /************** Transient fields which are not serializabled  into note json **************/
   private transient String intpText;
-
   private transient String scriptText;
   private transient InterpreterFactory interpreterFactory;
   private transient Interpreter interpreter;
@@ -100,13 +104,14 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult>
   private transient Map<String, String> localProperties = new HashMap<>();
   private transient Map<String, ParagraphRuntimeInfo> runtimeInfos = new HashMap<>();
 
+
   @VisibleForTesting
   Paragraph() {
     super(generateId(), null);
   }
 
-  public Paragraph(
-      String paragraphId, Note note, JobListener listener, InterpreterFactory interpreterFactory) {
+  public Paragraph(String paragraphId, Note note, JobListener listener,
+      InterpreterFactory interpreterFactory) {
     super(paragraphId, generateId(), listener);
     this.note = note;
     this.interpreterFactory = interpreterFactory;
@@ -193,8 +198,8 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult>
 
         if (matcher.groupCount() == 3 && matcher.group(3) != null) {
           String localPropertiesText = matcher.group(3);
-          String[] splits =
-              localPropertiesText.substring(1, localPropertiesText.length() - 1).split(",");
+          String[] splits = localPropertiesText.substring(1, localPropertiesText.length() -1)
+              .split(",");
           for (String split : splits) {
             String[] kv = split.split("=");
             if (StringUtils.isBlank(split) || kv.length == 0) {
@@ -209,14 +214,10 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult>
               localProperties.put(kv[0].trim(), kv[1].trim());
             }
           }
-          this.scriptText =
-              this.text
-                  .substring(
-                      headingSpace.length() + intpText.length() + localPropertiesText.length() + 1)
-                  .trim();
+          this.scriptText = this.text.substring(headingSpace.length() + intpText.length() +
+              localPropertiesText.length() + 1).trim();
         } else {
-          this.scriptText =
-              this.text.substring(headingSpace.length() + intpText.length() + 1).trim();
+          this.scriptText = this.text.substring(headingSpace.length() + intpText.length() + 1).trim();
         }
       } else {
         this.intpText = "";
@@ -270,8 +271,8 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult>
   }
 
   public Interpreter getBindedInterpreter() throws InterpreterNotFoundException {
-    return this.interpreterFactory.getInterpreter(
-        user, note.getId(), intpText, note.getDefaultInterpreterGroup());
+    return this.interpreterFactory.getInterpreter(user, note.getId(), intpText,
+        note.getDefaultInterpreterGroup());
   }
 
   public void setInterpreter(Interpreter interpreter) {
@@ -368,7 +369,8 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult>
         return true;
       }
     } catch (InterpreterNotFoundException e) {
-      InterpreterResult intpResult = new InterpreterResult(InterpreterResult.Code.ERROR);
+      InterpreterResult intpResult =
+          new InterpreterResult(InterpreterResult.Code.ERROR);
       setReturn(intpResult, e);
       setStatus(Job.Status.ERROR);
       throw new RuntimeException(e);
@@ -377,20 +379,16 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult>
 
   @Override
   protected InterpreterResult jobRun() throws Throwable {
-    LOGGER.info(
-        "Run paragraph [paragraph_id: {}, interpreter: {}, note_id: {}, user: {}]",
-        getId(),
-        intpText,
-        note.getId(),
-        subject.getUser());
+    LOGGER.info("Run paragraph [paragraph_id: {}, interpreter: {}, note_id: {}, user: {}]",
+            getId(), intpText, note.getId(), subject.getUser());
     this.runtimeInfos.clear();
     this.interpreter = getBindedInterpreter();
     if (this.interpreter == null) {
       LOGGER.error("Can not find interpreter name " + intpText);
       throw new RuntimeException("Can not find interpreter for " + intpText);
     }
-    InterpreterSetting interpreterSetting =
-        ((ManagedInterpreterGroup) interpreter.getInterpreterGroup()).getInterpreterSetting();
+    InterpreterSetting interpreterSetting = ((ManagedInterpreterGroup)
+        interpreter.getInterpreterGroup()).getInterpreterSetting();
     if (interpreterSetting != null) {
       interpreterSetting.waitForReady();
     }
@@ -421,7 +419,7 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult>
       settings.setForms(inputs);
       if (!noteInputs.isEmpty()) {
         if (!note.getNoteForms().isEmpty()) {
-          Map<String, Input> currentNoteForms = note.getNoteForms();
+          Map<String, Input> currentNoteForms =  note.getNoteForms();
           for (String s : noteInputs.keySet()) {
             if (!currentNoteForms.containsKey(s)) {
               currentNoteForms.put(s, noteInputs.get(s));
@@ -491,42 +489,40 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult>
   private InterpreterContext getInterpreterContext() {
     final Paragraph self = this;
 
-    return getInterpreterContext(
-        new InterpreterOutput(
-            new InterpreterOutputListener() {
-              @Override
-              public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
-                ((ParagraphJobListener) getListener())
-                    .onOutputAppend(self, index, new String(line));
-              }
-
-              @Override
-              public void onUpdate(int index, InterpreterResultMessageOutput out) {
-                try {
-                  ((ParagraphJobListener) getListener())
-                      .onOutputUpdate(self, index, out.toInterpreterResultMessage());
-                } catch (IOException e) {
-                  LOGGER.error(e.getMessage(), e);
-                }
-              }
-
-              @Override
-              public void onUpdateAll(InterpreterOutput out) {
-                try {
-                  List<InterpreterResultMessage> messages = out.toInterpreterResultMessage();
-                  ((ParagraphJobListener) getListener()).onOutputUpdateAll(self, messages);
-                  updateParagraphResult(messages);
-                } catch (IOException e) {
-                  LOGGER.error(e.getMessage(), e);
-                }
-              }
-
-              private void updateParagraphResult(List<InterpreterResultMessage> msgs) {
-                // update paragraph results
-                InterpreterResult result = new InterpreterResult(Code.SUCCESS, msgs);
-                setReturn(result, null);
-              }
-            }));
+    return getInterpreterContext(new InterpreterOutput(new InterpreterOutputListener() {
+      @Override
+      public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
+        ((ParagraphJobListener) getListener()).onOutputAppend(self, index, new String(line));
+      }
+
+      @Override
+      public void onUpdate(int index, InterpreterResultMessageOutput out) {
+        try {
+          ((ParagraphJobListener) getListener())
+              .onOutputUpdate(self, index, out.toInterpreterResultMessage());
+        } catch (IOException e) {
+          LOGGER.error(e.getMessage(), e);
+        }
+      }
+
+      @Override
+      public void onUpdateAll(InterpreterOutput out) {
+        try {
+          List<InterpreterResultMessage> messages = out.toInterpreterResultMessage();
+          ((ParagraphJobListener) getListener()).onOutputUpdateAll(self, messages);
+          updateParagraphResult(messages);
+        } catch (IOException e) {
+          LOGGER.error(e.getMessage(), e);
+        }
+
+      }
+
+      private void updateParagraphResult(List<InterpreterResultMessage> msgs) {
+        // update paragraph results
+        InterpreterResult result = new InterpreterResult(Code.SUCCESS, msgs);
+        setReturn(result, null);
+      }
+    }));
   }
 
   private InterpreterContext getInterpreterContext(InterpreterOutput output) {
@@ -540,7 +536,8 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult>
 
     Credentials credentials = note.getCredentials();
     if (subject != null) {
-      UserCredentials userCredentials = credentials.getUserCredentials(subject.getUser());
+      UserCredentials userCredentials =
+          credentials.getUserCredentials(subject.getUser());
       subject.setUserCredentials(userCredentials);
     }
 
@@ -603,6 +600,7 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult>
     }
   }
 
+
   public ApplicationState getApplicationState(String appId) {
     synchronized (apps) {
       for (ApplicationState as : apps) {
@@ -621,8 +619,8 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult>
     }
   }
 
-  String extractVariablesFromAngularRegistry(
-      String scriptBody, Map<String, Input> inputs, AngularObjectRegistry angularRegistry) {
+  String extractVariablesFromAngularRegistry(String scriptBody, Map<String, Input> inputs,
+      AngularObjectRegistry angularRegistry) {
 
     final String noteId = this.getNote().getId();
     final String paragraphId = this.getId();
@@ -644,16 +642,15 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult>
 
   public boolean isValidInterpreter(String replName) {
     try {
-      return interpreterFactory.getInterpreter(
-              user, note.getId(), replName, note.getDefaultInterpreterGroup())
-          != null;
+      return interpreterFactory.getInterpreter(user, note.getId(), replName,
+          note.getDefaultInterpreterGroup()) != null;
     } catch (InterpreterNotFoundException e) {
       return false;
     }
   }
 
-  public void updateRuntimeInfos(
-      String label, String tooltip, Map<String, String> infos, String group, String intpSettingId) {
+  public void updateRuntimeInfos(String label, String tooltip, Map<String, String> infos,
+      String group, String intpSettingId) {
     if (this.runtimeInfos == null) {
       this.runtimeInfos = new HashMap<>();
     }
@@ -708,9 +705,8 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult>
     if (user != null ? !user.equals(paragraph.user) : paragraph.user != null) {
       return false;
     }
-    if (dateUpdated != null
-        ? !dateUpdated.equals(paragraph.dateUpdated)
-        : paragraph.dateUpdated != null) {
+    if (dateUpdated != null ?
+        !dateUpdated.equals(paragraph.dateUpdated) : paragraph.dateUpdated != null) {
       return false;
     }
     if (config != null ? !config.equals(paragraph.config) : paragraph.config != null) {
@@ -720,7 +716,9 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult>
       return false;
     }
 
-    return results != null ? results.equals(paragraph.results) : paragraph.results == null;
+    return results != null ?
+        results.equals(paragraph.results) : paragraph.results == null;
+
   }
 
   @Override
@@ -744,4 +742,5 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult>
   public static Paragraph fromJson(String json) {
     return Note.getGson().fromJson(json, Paragraph.class);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphJobListener.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphJobListener.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphJobListener.java
index a721b03..8743fb7 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphJobListener.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphJobListener.java
@@ -17,15 +17,18 @@
 
 package org.apache.zeppelin.notebook;
 
-import java.util.List;
+import org.apache.zeppelin.interpreter.InterpreterOutput;
 import org.apache.zeppelin.interpreter.InterpreterResultMessage;
+import org.apache.zeppelin.interpreter.InterpreterResultMessageOutput;
 import org.apache.zeppelin.scheduler.JobListener;
 
-/** Listen paragraph update */
+import java.util.List;
+
+/**
+ * Listen paragraph update
+ */
 public interface ParagraphJobListener extends JobListener<Paragraph> {
   void onOutputAppend(Paragraph paragraph, int idx, String output);
-
   void onOutputUpdate(Paragraph paragraph, int idx, InterpreterResultMessage msg);
-
   void onOutputUpdateAll(Paragraph paragraph, List<InterpreterResultMessage> msgs);
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphRuntimeInfo.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphRuntimeInfo.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphRuntimeInfo.java
index eb1f872..0042023 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphRuntimeInfo.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphRuntimeInfo.java
@@ -3,18 +3,21 @@ package org.apache.zeppelin.notebook;
 import java.util.ArrayList;
 import java.util.List;
 
-/** Store runtime infos of each para */
+/**
+ * Store runtime infos of each para
+ *
+ */
 public class ParagraphRuntimeInfo {
 
-  private String propertyName; // Name of the property
-  private String label; // Label to be used in UI
-  private String tooltip; // Tooltip text toshow in UI
-  private String group; // The interpretergroup from which the info was derived
-  private List<String> values; // values for the property
+  private String propertyName;  // Name of the property
+  private String label;         // Label to be used in UI
+  private String tooltip;       // Tooltip text toshow in UI
+  private String group;         // The interpretergroup from which the info was derived
+  private List<String> values;  // values for the property
   private String interpreterSettingId;
-
-  public ParagraphRuntimeInfo(
-      String propertyName, String label, String tooltip, String group, String intpSettingId) {
+  
+  public ParagraphRuntimeInfo(String propertyName, String label, 
+      String tooltip, String group, String intpSettingId) {
     if (intpSettingId == null) {
       throw new IllegalArgumentException("Interpreter setting Id cannot be null");
     }
@@ -29,7 +32,7 @@ public class ParagraphRuntimeInfo {
   public void addValue(String value) {
     values.add(value);
   }
-
+  
   public String getInterpreterSettingId() {
     return interpreterSettingId;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphWithRuntimeInfo.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphWithRuntimeInfo.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphWithRuntimeInfo.java
index 78c58cc..33dce22 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphWithRuntimeInfo.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphWithRuntimeInfo.java
@@ -20,8 +20,8 @@ package org.apache.zeppelin.notebook;
 import java.util.Map;
 
 /**
- * This class is used for broadcast Paragrapah to frontend. runtimeInfos will also been prapagated
- * to frontend.
+ * This class is used for broadcast Paragrapah to frontend.
+ * runtimeInfos will also been prapagated to frontend.
  */
 public class ParagraphWithRuntimeInfo extends Paragraph {
 
@@ -31,4 +31,5 @@ public class ParagraphWithRuntimeInfo extends Paragraph {
     super(p);
     this.runtimeInfos = p.getRuntimeInfos();
   }
+
 }


[20/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/user/UsernamePassword.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/user/UsernamePassword.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/user/UsernamePassword.java
index 9be8200..00116a9 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/user/UsernamePassword.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/user/UsernamePassword.java
@@ -1,23 +1,25 @@
 /*
- * 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.
- */
+* 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.user;
 
-/** Username and Password POJO */
+/**
+ * Username and Password POJO
+ */
 public class UsernamePassword {
   private String username;
   private String password;
@@ -45,13 +47,9 @@ public class UsernamePassword {
 
   @Override
   public String toString() {
-    return "UsernamePassword{"
-        + "username='"
-        + username
-        + '\''
-        + ", password='"
-        + password
-        + '\''
-        + '}';
+    return "UsernamePassword{" +
+        "username='" + username + '\'' +
+        ", password='" + password + '\'' +
+        '}';
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/util/IdHashes.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/util/IdHashes.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/util/IdHashes.java
index 9a34380..9d4e10f 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/util/IdHashes.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/util/IdHashes.java
@@ -18,17 +18,17 @@
 package org.apache.zeppelin.util;
 
 import java.math.BigInteger;
-import java.security.SecureRandom;
 import java.util.ArrayList;
 import java.util.List;
+import java.security.SecureRandom;
 
-/** Generate Tiny ID. */
+/**
+ * Generate Tiny ID.
+ */
 public class IdHashes {
-  private static final char[] DICTIONARY =
-      new char[] {
-        '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J',
-        'K', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
-      };
+  private static final char[] DICTIONARY = new char[] {'1', '2', '3', '4', '5', '6', '7', '8', '9',
+      'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
+      'W', 'X', 'Y', 'Z'};
 
   /**
    * encodes the given string into the base of the dictionary provided in the constructor.

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/util/Util.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/util/Util.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/util/Util.java
index 2e189d5..6153f49 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/util/Util.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/util/Util.java
@@ -17,11 +17,14 @@
 
 package org.apache.zeppelin.util;
 
+import org.apache.commons.lang.StringUtils;
+
 import java.io.IOException;
 import java.util.Properties;
-import org.apache.commons.lang.StringUtils;
 
-/** TODO(moon) : add description. */
+/**
+ * TODO(moon) : add description.
+ */
 public class Util {
   private static final String PROJECT_PROPERTIES_VERSION_KEY = "version";
   private static final String GIT_PROPERTIES_COMMIT_ID_KEY = "git.commit.id.abbrev";
@@ -37,7 +40,7 @@ public class Util {
       projectProperties.load(Util.class.getResourceAsStream("/project.properties"));
       gitProperties.load(Util.class.getResourceAsStream("/git.properties"));
     } catch (IOException e) {
-      // Fail to read project.properties
+      //Fail to read project.properties
     }
   }
 
@@ -47,8 +50,8 @@ public class Util {
    * @return Current Zeppelin version
    */
   public static String getVersion() {
-    return StringUtils.defaultIfEmpty(
-        projectProperties.getProperty(PROJECT_PROPERTIES_VERSION_KEY), StringUtils.EMPTY);
+    return StringUtils.defaultIfEmpty(projectProperties.getProperty(PROJECT_PROPERTIES_VERSION_KEY),
+            StringUtils.EMPTY);
   }
 
   /**
@@ -57,8 +60,8 @@ public class Util {
    * @return Latest Zeppelin commit id
    */
   public static String getGitCommitId() {
-    return StringUtils.defaultIfEmpty(
-        gitProperties.getProperty(GIT_PROPERTIES_COMMIT_ID_KEY), StringUtils.EMPTY);
+    return StringUtils.defaultIfEmpty(gitProperties.getProperty(GIT_PROPERTIES_COMMIT_ID_KEY),
+            StringUtils.EMPTY);
   }
 
   /**
@@ -67,7 +70,7 @@ public class Util {
    * @return Latest Zeppelin commit timestamp
    */
   public static String getGitTimestamp() {
-    return StringUtils.defaultIfEmpty(
-        gitProperties.getProperty(GIT_PROPERTIES_COMMIT_TS_KEY), StringUtils.EMPTY);
+    return StringUtils.defaultIfEmpty(gitProperties.getProperty(GIT_PROPERTIES_COMMIT_TS_KEY),
+            StringUtils.EMPTY);
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/dep/BooterTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/dep/BooterTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/dep/BooterTest.java
index 8d74d4c..ffc3c8f 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/dep/BooterTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/dep/BooterTest.java
@@ -17,13 +17,14 @@
 
 package org.apache.zeppelin.dep;
 
+import org.junit.Test;
+
+import java.nio.file.Paths;
+
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
-import java.nio.file.Paths;
-import org.junit.Test;
-
 public class BooterTest {
 
   @Test
@@ -34,7 +35,8 @@ public class BooterTest {
 
   @Test
   public void should_not_change_absolute_path() {
-    String absolutePath = Paths.get("first", "second").toAbsolutePath().toString();
+    String absolutePath
+        = Paths.get("first", "second").toAbsolutePath().toString();
     String resolvedPath = Booter.resolveLocalRepoPath(absolutePath);
 
     assertThat(resolvedPath, equalTo(absolutePath));

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/dep/DependencyResolverTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/dep/DependencyResolverTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/dep/DependencyResolverTest.java
index 80ce490..7ccc7df 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/dep/DependencyResolverTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/dep/DependencyResolverTest.java
@@ -17,11 +17,6 @@
 
 package org.apache.zeppelin.dep;
 
-import static org.junit.Assert.assertEquals;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.util.Collections;
 import org.apache.commons.io.FileUtils;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -30,19 +25,25 @@ import org.junit.Test;
 import org.junit.rules.ExpectedException;
 import org.sonatype.aether.RepositoryException;
 
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.util.Collections;
+
+import static org.junit.Assert.assertEquals;
+
 public class DependencyResolverTest {
   private static DependencyResolver resolver;
   private static String testPath;
   private static File testCopyPath;
   private static File tmpDir;
 
-  @Rule public ExpectedException expectedException = ExpectedException.none();
+  @Rule
+  public ExpectedException expectedException = ExpectedException.none();
 
   @BeforeClass
   public static void setUp() throws Exception {
-    tmpDir =
-        new File(
-            System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis());
+    tmpDir = new File(System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" +
+        System.currentTimeMillis());
     testPath = tmpDir.getAbsolutePath() + "/test-repo";
     testCopyPath = new File(tmpDir, "test-copy-repo");
     resolver = new DependencyResolver(testPath);
@@ -53,7 +54,8 @@ public class DependencyResolverTest {
     FileUtils.deleteDirectory(tmpDir);
   }
 
-  @Rule public final ExpectedException exception = ExpectedException.none();
+  @Rule
+  public final ExpectedException exception = ExpectedException.none();
 
   @Test
   public void testAddRepo() {
@@ -78,16 +80,14 @@ public class DependencyResolverTest {
     FileUtils.cleanDirectory(testCopyPath);
 
     // load with exclusions parameter
-    resolver.load(
-        "com.databricks:spark-csv_2.10:1.3.0",
-        Collections.singletonList("org.scala-lang:scala-library"),
-        testCopyPath);
+    resolver.load("com.databricks:spark-csv_2.10:1.3.0",
+        Collections.singletonList("org.scala-lang:scala-library"), testCopyPath);
     assertEquals(testCopyPath.list().length, 3);
     FileUtils.cleanDirectory(testCopyPath);
 
     // load from added repository
-    resolver.addRepo(
-        "sonatype", "https://oss.sonatype.org/content/repositories/agimatec-releases/", false);
+    resolver.addRepo("sonatype",
+        "https://oss.sonatype.org/content/repositories/agimatec-releases/", false);
     resolver.load("com.agimatec:agimatec-validation:0.9.3", testCopyPath);
     assertEquals(testCopyPath.list().length, 8);
 
@@ -104,4 +104,5 @@ public class DependencyResolverTest {
 
     resolver.load("one.two:1.0", testCopyPath);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/AngularObjectRegistryTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/AngularObjectRegistryTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/AngularObjectRegistryTest.java
index 5b2f6ae..529284f 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/AngularObjectRegistryTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/AngularObjectRegistryTest.java
@@ -17,13 +17,14 @@
 
 package org.apache.zeppelin.display;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
-import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.thrift.TException;
 import org.junit.Test;
 
+import java.util.concurrent.atomic.AtomicInteger;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
 public class AngularObjectRegistryTest {
 
   @Test
@@ -32,27 +33,27 @@ public class AngularObjectRegistryTest {
     final AtomicInteger onUpdate = new AtomicInteger(0);
     final AtomicInteger onRemove = new AtomicInteger(0);
 
-    AngularObjectRegistry registry =
-        new AngularObjectRegistry(
-            "intpId",
-            new AngularObjectRegistryListener() {
+    AngularObjectRegistry registry = new AngularObjectRegistry("intpId",
+        new AngularObjectRegistryListener() {
 
-              @Override
-              public void onAdd(String interpreterGroupId, AngularObject object) {
-                onAdd.incrementAndGet();
-              }
+          @Override
+          public void onAdd(String interpreterGroupId, AngularObject object) {
+            onAdd.incrementAndGet();
+          }
 
-              @Override
-              public void onUpdate(String interpreterGroupId, AngularObject object) {
-                onUpdate.incrementAndGet();
-              }
+          @Override
+          public void onUpdate(String interpreterGroupId, AngularObject object) {
+            onUpdate.incrementAndGet();
+          }
 
-              @Override
-              public void onRemove(
-                  String interpreterGroupId, String name, String noteId, String paragraphId) {
-                onRemove.incrementAndGet();
-              }
-            });
+          @Override
+          public void onRemove(String interpreterGroupId,
+                               String name,
+                               String noteId,
+                               String paragraphId) {
+            onRemove.incrementAndGet();
+          }
+        });
 
     registry.add("name1", "value1", "note1", null);
     assertEquals(1, registry.getAll("note1", null).size());
@@ -87,6 +88,7 @@ public class AngularObjectRegistryTest {
     AngularObject ao4 = registry.add("name3", "o4", "noteId1", null);
     AngularObject ao5 = registry.add("name4", "o5", null, null);
 
+
     assertNull(registry.get("name3", "noteId1", "paragraphId1"));
     assertNull(registry.get("name1", "noteId2", null));
     assertEquals("o1", registry.get("name1", "noteId1", "paragraphId1").get());
@@ -111,4 +113,5 @@ public class AngularObjectRegistryTest {
     assertEquals(1, registry.getAll(null, null).size());
     assertEquals(5, registry.getAllWithGlobal("noteId1").size());
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/AngularObjectTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/AngularObjectTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/AngularObjectTest.java
index 80acea8..b30439a 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/AngularObjectTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/AngularObjectTest.java
@@ -17,71 +17,78 @@
 
 package org.apache.zeppelin.display;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotSame;
-
-import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.thrift.TException;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.junit.Test;
 
+import java.util.concurrent.atomic.AtomicInteger;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotSame;
+
 public class AngularObjectTest {
 
   @Test
   public void testEquals() {
     assertEquals(
         new AngularObject("name", "value", "note1", null, null),
-        new AngularObject("name", "value", "note1", null, null));
+        new AngularObject("name", "value", "note1", null, null)
+    );
 
     assertEquals(
         new AngularObject("name", "value", "note1", "paragraph1", null),
-        new AngularObject("name", "value", "note1", "paragraph1", null));
+        new AngularObject("name", "value", "note1", "paragraph1", null)
+    );
 
     assertEquals(
         new AngularObject("name", "value", null, null, null),
-        new AngularObject("name", "value", null, null, null));
+        new AngularObject("name", "value", null, null, null)
+    );
 
     assertEquals(
         new AngularObject("name", "value1", null, null, null),
-        new AngularObject("name", "value2", null, null, null));
+        new AngularObject("name", "value2", null, null, null)
+    );
 
     assertNotSame(
         new AngularObject("name1", "value", null, null, null),
-        new AngularObject("name2", "value", null, null, null));
+        new AngularObject("name2", "value", null, null, null)
+    );
 
     assertNotSame(
         new AngularObject("name1", "value", "note1", null, null),
-        new AngularObject("name2", "value", "note2", null, null));
+        new AngularObject("name2", "value", "note2", null, null)
+    );
 
     assertNotSame(
         new AngularObject("name1", "value", "note", null, null),
-        new AngularObject("name2", "value", null, null, null));
+        new AngularObject("name2", "value", null, null, null)
+    );
 
     assertNotSame(
         new AngularObject("name", "value", "note", "paragraph1", null),
-        new AngularObject("name", "value", "note", "paragraph2", null));
+        new AngularObject("name", "value", "note", "paragraph2", null)
+    );
 
     assertNotSame(
         new AngularObject("name", "value", "note1", null, null),
-        new AngularObject("name", "value", "note1", "paragraph1", null));
+        new AngularObject("name", "value", "note1", "paragraph1", null)
+    );
+
+
   }
 
   @Test
   public void testListener() throws TException {
     final AtomicInteger updated = new AtomicInteger(0);
-    AngularObject ao =
-        new AngularObject(
-            "name",
-            "value",
-            "note1",
-            null,
-            new AngularObjectListener() {
-
-              @Override
-              public void updated(AngularObject updatedObject) {
-                updated.incrementAndGet();
-              }
-            });
+    AngularObject ao = new AngularObject("name", "value", "note1", null,
+        new AngularObjectListener() {
+
+          @Override
+          public void updated(AngularObject updatedObject) {
+            updated.incrementAndGet();
+          }
+        });
 
     assertEquals(0, updated.get());
     ao.set("newValue");
@@ -100,27 +107,21 @@ public class AngularObjectTest {
   public void testWatcher() throws InterruptedException, TException {
     final AtomicInteger updated = new AtomicInteger(0);
     final AtomicInteger onWatch = new AtomicInteger(0);
-    AngularObject ao =
-        new AngularObject(
-            "name",
-            "value",
-            "note1",
-            null,
-            new AngularObjectListener() {
-              @Override
-              public void updated(AngularObject updatedObject) {
-                updated.incrementAndGet();
-              }
-            });
-
-    ao.addWatcher(
-        new AngularObjectWatcher(null) {
+    AngularObject ao = new AngularObject("name", "value", "note1", null,
+        new AngularObjectListener() {
           @Override
-          public void watch(Object oldObject, Object newObject, InterpreterContext context) {
-            onWatch.incrementAndGet();
+          public void updated(AngularObject updatedObject) {
+            updated.incrementAndGet();
           }
         });
 
+    ao.addWatcher(new AngularObjectWatcher(null) {
+      @Override
+      public void watch(Object oldObject, Object newObject, InterpreterContext context) {
+        onWatch.incrementAndGet();
+      }
+    });
+
     assertEquals(0, onWatch.get());
     ao.set("newValue");
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/GUITest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/GUITest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/GUITest.java
index 3ab50a9..211c379 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/GUITest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/GUITest.java
@@ -17,12 +17,6 @@
 
 package org.apache.zeppelin.display;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
 import org.apache.zeppelin.display.ui.CheckBox;
 import org.apache.zeppelin.display.ui.OptionInput.ParamOption;
 import org.apache.zeppelin.display.ui.Select;
@@ -30,10 +24,19 @@ import org.apache.zeppelin.display.ui.TextBox;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 public class GUITest {
 
-  private ParamOption[] options =
-      new ParamOption[] {new ParamOption("1", "value_1"), new ParamOption("2", "value_2")};
+  private ParamOption[] options = new ParamOption[]{
+      new ParamOption("1", "value_1"),
+      new ParamOption("2", "value_2")
+  };
 
   private List<Object> checkedItems;
 
@@ -83,7 +86,8 @@ public class GUITest {
     GUI gui = new GUI();
     gui.forms.put("textbox_1", new OldInput.OldTextBox("textbox_1", "default_text_1"));
     gui.forms.put("select_1", new OldInput.OldSelect("select_1", "1", options));
-    gui.forms.put("checkbox_1", new OldInput.OldCheckBox("checkbox_1", checkedItems, options));
+    gui.forms.put("checkbox_1",
+        new OldInput.OldCheckBox("checkbox_1", checkedItems, options));
 
     // convert to old json format.
     String json = gui.toJson();
@@ -107,7 +111,8 @@ public class GUITest {
     GUI gui = new GUI();
     gui.forms.put("textbox_1", new OldInput("textbox_1", "default_text_1"));
     gui.forms.put("select_1", new OldInput("select_1", "1", options));
-    gui.forms.put("checkbox_1", new OldInput.OldCheckBox("checkbox_1", checkedItems, options));
+    gui.forms.put("checkbox_1",
+        new OldInput.OldCheckBox("checkbox_1", checkedItems, options));
 
     // convert to old json format.
     String json = gui.toJson();
@@ -126,48 +131,46 @@ public class GUITest {
   // load old json file and will convert it into new forms of Input
   @Test
   public void testOldGson_3() throws IOException {
-    String oldJson =
-        "{\n"
-            + "        \"params\": {\n"
-            + "          \"maxAge\": \"35\"\n"
-            + "        },\n"
-            + "        \"forms\": {\n"
-            + "          \"maxAge\": {\n"
-            + "            \"name\": \"maxAge\",\n"
-            + "            \"defaultValue\": \"30\",\n"
-            + "            \"hidden\": false\n"
-            + "          }\n"
-            + "        }\n"
-            + "      }";
+    String oldJson = "{\n" +
+        "        \"params\": {\n" +
+        "          \"maxAge\": \"35\"\n" +
+        "        },\n" +
+        "        \"forms\": {\n" +
+        "          \"maxAge\": {\n" +
+        "            \"name\": \"maxAge\",\n" +
+        "            \"defaultValue\": \"30\",\n" +
+        "            \"hidden\": false\n" +
+        "          }\n" +
+        "        }\n" +
+        "      }";
     GUI gui = GUI.fromJson(oldJson);
     assertEquals(1, gui.forms.size());
     assertTrue(gui.forms.get("maxAge") instanceof TextBox);
     assertEquals("30", gui.forms.get("maxAge").getDefaultValue());
 
-    oldJson =
-        "{\n"
-            + "        \"params\": {\n"
-            + "          \"marital\": \"single\"\n"
-            + "        },\n"
-            + "        \"forms\": {\n"
-            + "          \"marital\": {\n"
-            + "            \"name\": \"marital\",\n"
-            + "            \"defaultValue\": \"single\",\n"
-            + "            \"options\": [\n"
-            + "              {\n"
-            + "                \"value\": \"single\"\n"
-            + "              },\n"
-            + "              {\n"
-            + "                \"value\": \"divorced\"\n"
-            + "              },\n"
-            + "              {\n"
-            + "                \"value\": \"married\"\n"
-            + "              }\n"
-            + "            ],\n"
-            + "            \"hidden\": false\n"
-            + "          }\n"
-            + "        }\n"
-            + "      }";
+    oldJson = "{\n" +
+        "        \"params\": {\n" +
+        "          \"marital\": \"single\"\n" +
+        "        },\n" +
+        "        \"forms\": {\n" +
+        "          \"marital\": {\n" +
+        "            \"name\": \"marital\",\n" +
+        "            \"defaultValue\": \"single\",\n" +
+        "            \"options\": [\n" +
+        "              {\n" +
+        "                \"value\": \"single\"\n" +
+        "              },\n" +
+        "              {\n" +
+        "                \"value\": \"divorced\"\n" +
+        "              },\n" +
+        "              {\n" +
+        "                \"value\": \"married\"\n" +
+        "              }\n" +
+        "            ],\n" +
+        "            \"hidden\": false\n" +
+        "          }\n" +
+        "        }\n" +
+        "      }";
     gui = GUI.fromJson(oldJson);
     assertEquals(1, gui.forms.size());
     assertTrue(gui.forms.get("marital") instanceof Select);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/InputTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/InputTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/InputTest.java
index 789ec49..abe2ac3 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/InputTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/display/InputTest.java
@@ -17,13 +17,6 @@
 
 package org.apache.zeppelin.display;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.HashMap;
-import java.util.Map;
 import org.apache.zeppelin.display.ui.CheckBox;
 import org.apache.zeppelin.display.ui.OptionInput.ParamOption;
 import org.apache.zeppelin.display.ui.Password;
@@ -31,6 +24,14 @@ import org.apache.zeppelin.display.ui.Select;
 import org.apache.zeppelin.display.ui.TextBox;
 import org.junit.Test;
 
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
 public class InputTest {
 
   @Test
@@ -67,12 +68,10 @@ public class InputTest {
     assertEquals("op1", form.defaultValue);
     assertEquals("Selection Form", form.getDisplayName());
     assertTrue(form instanceof Select);
-    assertArrayEquals(
-        new ParamOption[] {
-          new ParamOption("op1", null),
-          new ParamOption("op2", "Option 2"),
-          new ParamOption("op3", null)
-        },
+    assertArrayEquals(new ParamOption[]{
+        new ParamOption("op1", null),
+        new ParamOption("op2", "Option 2"),
+        new ParamOption("op3", null)},
         ((Select) form).getOptions());
 
     // checkbox form
@@ -81,11 +80,11 @@ public class InputTest {
     assertEquals("checkbox_form", form.name);
     assertTrue(form instanceof CheckBox);
 
-    assertArrayEquals(new Object[] {"op1"}, (Object[]) form.defaultValue);
-    assertArrayEquals(
-        new ParamOption[] {
-          new ParamOption("op1", null), new ParamOption("op2", null), new ParamOption("op3", null)
-        },
+    assertArrayEquals(new Object[]{"op1"}, (Object[]) form.defaultValue);
+    assertArrayEquals(new ParamOption[]{
+        new ParamOption("op1", null),
+        new ParamOption("op2", null),
+        new ParamOption("op3", null)},
         ((CheckBox) form).getOptions());
 
     // checkbox form with multiple default checks
@@ -94,13 +93,11 @@ public class InputTest {
     assertEquals("checkbox_form", form.name);
     assertEquals("Checkbox Form", form.displayName);
     assertTrue(form instanceof CheckBox);
-    assertArrayEquals(new Object[] {"op1", "op3"}, (Object[]) form.defaultValue);
-    assertArrayEquals(
-        new ParamOption[] {
-          new ParamOption("op1", "Option 1"),
-          new ParamOption("op2", null),
-          new ParamOption("op3", null)
-        },
+    assertArrayEquals(new Object[]{"op1", "op3"}, (Object[]) form.defaultValue);
+    assertArrayEquals(new ParamOption[]{
+        new ParamOption("op1", "Option 1"),
+        new ParamOption("op2", null),
+        new ParamOption("op3", null)},
         ((CheckBox) form).getOptions());
 
     // checkbox form with no default check
@@ -109,46 +106,42 @@ public class InputTest {
     assertEquals("checkbox_form", form.name);
     assertEquals("Checkbox Form", form.displayName);
     assertTrue(form instanceof CheckBox);
-    assertArrayEquals(new Object[] {}, (Object[]) form.defaultValue);
-    assertArrayEquals(
-        new ParamOption[] {
-          new ParamOption("op1", "Option 1"),
-          new ParamOption("op2", "Option 2"),
-          new ParamOption("op3", "Option 3")
-        },
+    assertArrayEquals(new Object[]{}, (Object[]) form.defaultValue);
+    assertArrayEquals(new ParamOption[]{
+        new ParamOption("op1", "Option 1"),
+        new ParamOption("op2", "Option 2"),
+        new ParamOption("op3", "Option 3")},
         ((CheckBox) form).getOptions());
   }
 
+
   @Test
   public void testFormSubstitution() {
     // test form substitution without new forms
-    String script =
-        "INPUT=${input_form=}SELECTED=${select_form(Selection Form)="
-            + ",s_op1|s_op2|s_op3}\nCHECKED=${checkbox:checkbox_form=c_op1|c_op2,c_op1|c_op2|c_op3}";
+    String script = "INPUT=${input_form=}SELECTED=${select_form(Selection Form)=" +
+        ",s_op1|s_op2|s_op3}\nCHECKED=${checkbox:checkbox_form=c_op1|c_op2,c_op1|c_op2|c_op3}";
     Map<String, Object> params = new HashMap<>();
     params.put("input_form", "some_input");
     params.put("select_form", "s_op2");
-    params.put("checkbox_form", new String[] {"c_op1", "c_op3"});
+    params.put("checkbox_form", new String[]{"c_op1", "c_op3"});
     String replaced = Input.getSimpleQuery(params, script, false);
     assertEquals("INPUT=some_inputSELECTED=s_op2\nCHECKED=c_op1,c_op3", replaced);
 
     // test form substitution with new forms
-    script =
-        "INPUT=${input_form=}SELECTED=${select_form(Selection Form)=,s_op1|s_op2|s_op3}\n"
-            + "CHECKED=${checkbox:checkbox_form=c_op1|c_op2,c_op1|c_op2|c_op3}\n"
-            + "NEW_CHECKED=${checkbox( and ):new_check=nc_a|nc_c,nc_a|nc_b|nc_c}";
+    script = "INPUT=${input_form=}SELECTED=${select_form(Selection Form)=,s_op1|s_op2|s_op3}\n" +
+        "CHECKED=${checkbox:checkbox_form=c_op1|c_op2,c_op1|c_op2|c_op3}\n" +
+        "NEW_CHECKED=${checkbox( and ):new_check=nc_a|nc_c,nc_a|nc_b|nc_c}";
     replaced = Input.getSimpleQuery(params, script, false);
-    assertEquals(
-        "INPUT=some_inputSELECTED=s_op2\nCHECKED=c_op1,c_op3\n" + "NEW_CHECKED=nc_a and nc_c",
-        replaced);
+    assertEquals("INPUT=some_inputSELECTED=s_op2\nCHECKED=c_op1,c_op3\n" +
+        "NEW_CHECKED=nc_a and nc_c", replaced);
 
     // test form substitution with obsoleted values
-    script =
-        "INPUT=${input_form=}SELECTED=${select_form(Selection Form)=,s_op1|s_op2|s_op3}\n"
-            + "CHECKED=${checkbox:checkbox_form=c_op1|c_op2,c_op1|c_op2|c_op3_new}\n"
-            + "NEW_CHECKED=${checkbox( and ):new_check=nc_a|nc_c,nc_a|nc_b|nc_c}";
+    script = "INPUT=${input_form=}SELECTED=${select_form(Selection Form)=,s_op1|s_op2|s_op3}\n" +
+        "CHECKED=${checkbox:checkbox_form=c_op1|c_op2,c_op1|c_op2|c_op3_new}\n" +
+        "NEW_CHECKED=${checkbox( and ):new_check=nc_a|nc_c,nc_a|nc_b|nc_c}";
     replaced = Input.getSimpleQuery(params, script, false);
-    assertEquals(
-        "INPUT=some_inputSELECTED=s_op2\nCHECKED=c_op1\n" + "NEW_CHECKED=nc_a and nc_c", replaced);
+    assertEquals("INPUT=some_inputSELECTED=s_op2\nCHECKED=c_op1\n" +
+        "NEW_CHECKED=nc_a and nc_c", replaced);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/helium/ApplicationLoaderTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/helium/ApplicationLoaderTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/helium/ApplicationLoaderTest.java
index 05896f4..490c911 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/helium/ApplicationLoaderTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/helium/ApplicationLoaderTest.java
@@ -17,12 +17,6 @@
 
 package org.apache.zeppelin.helium;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.IOException;
 import org.apache.commons.io.FileUtils;
 import org.apache.zeppelin.dep.DependencyResolver;
 import org.apache.zeppelin.interpreter.InterpreterOutput;
@@ -31,14 +25,20 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.File;
+import java.io.IOException;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 public class ApplicationLoaderTest {
   private File tmpDir;
 
   @Before
   public void setUp() {
-    tmpDir =
-        new File(
-            System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis());
+    tmpDir = new File(System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" +
+        System.currentTimeMillis());
     tmpDir.mkdirs();
   }
 
@@ -58,9 +58,8 @@ public class ApplicationLoaderTest {
     ApplicationContext context1 = createContext("note1", "paragraph1", "app1");
 
     // when load application
-    MockApplication1 app =
-        (MockApplication1)
-            ((ClassLoaderApplication) appLoader.load(pkg1, context1)).getInnerApplication();
+    MockApplication1 app = (MockApplication1) ((ClassLoaderApplication)
+        appLoader.load(pkg1, context1)).getInnerApplication();
 
     // then
     assertFalse(app.isUnloaded());
@@ -75,23 +74,25 @@ public class ApplicationLoaderTest {
   }
 
   public HeliumPackage createPackageInfo(String className, String artifact) {
-    HeliumPackage app1 =
-        new HeliumPackage(
-            HeliumType.APPLICATION,
-            "name1",
-            "desc1",
-            artifact,
-            className,
-            new String[][] {{}},
-            "license",
-            "icon");
+    HeliumPackage app1 = new HeliumPackage(
+        HeliumType.APPLICATION,
+        "name1",
+        "desc1",
+        artifact,
+        className,
+        new String[][]{{}},
+        "license",
+        "icon");
     return app1;
   }
 
   public ApplicationContext createContext(String noteId, String paragraphId, String appInstanceId) {
-    ApplicationContext context1 =
-        new ApplicationContext(
-            noteId, paragraphId, appInstanceId, null, new InterpreterOutput(null));
+    ApplicationContext context1 = new ApplicationContext(
+        noteId,
+        paragraphId,
+        appInstanceId,
+        null,
+        new InterpreterOutput(null));
     return context1;
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/helium/HeliumPackageTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/helium/HeliumPackageTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/helium/HeliumPackageTest.java
index 73fad6e..e810742 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/helium/HeliumPackageTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/helium/HeliumPackageTest.java
@@ -17,28 +17,28 @@
 
 package org.apache.zeppelin.helium;
 
-import static org.junit.Assert.assertEquals;
+import org.junit.Test;
 
 import java.util.Map;
-import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
 
 public class HeliumPackageTest {
 
   @Test
   public void parseSpellPackageInfo() {
-    String examplePackage =
-        "{\n"
-            + "  \"type\" : \"SPELL\",\n"
-            + "  \"name\" : \"echo-spell\",\n"
-            + "  \"description\" : \"'%echo' - return just what receive (example)\",\n"
-            + "  \"artifact\" : \"./zeppelin-examples/zeppelin-example-spell-echo\",\n"
-            + "  \"license\" : \"Apache-2.0\",\n"
-            + "  \"icon\" : \"<i class='fa fa-repeat'></i>\",\n"
-            + "  \"spell\": {\n"
-            + "    \"magic\": \"%echo\",\n"
-            + "    \"usage\": \"%echo <TEXT>\"\n"
-            + "  }\n"
-            + "}";
+    String examplePackage = "{\n" +
+        "  \"type\" : \"SPELL\",\n" +
+        "  \"name\" : \"echo-spell\",\n" +
+        "  \"description\" : \"'%echo' - return just what receive (example)\",\n" +
+        "  \"artifact\" : \"./zeppelin-examples/zeppelin-example-spell-echo\",\n" +
+        "  \"license\" : \"Apache-2.0\",\n" +
+        "  \"icon\" : \"<i class='fa fa-repeat'></i>\",\n" +
+        "  \"spell\": {\n" +
+        "    \"magic\": \"%echo\",\n" +
+        "    \"usage\": \"%echo <TEXT>\"\n" +
+        "  }\n" +
+        "}";
 
     HeliumPackage p = HeliumPackage.fromJson(examplePackage);
     assertEquals(p.getSpellInfo().getMagic(), "%echo");
@@ -47,34 +47,34 @@ public class HeliumPackageTest {
 
   @Test
   public void parseConfig() {
-    String examplePackage =
-        "{\n"
-            + "  \"type\" : \"SPELL\",\n"
-            + "  \"name\" : \"translator-spell\",\n"
-            + "  \"description\" : \"Translate langauges using Google API (examaple)\",\n"
-            + "  \"artifact\" : \"./zeppelin-examples/zeppelin-example-spell-translator\",\n"
-            + "  \"license\" : \"Apache-2.0\",\n"
-            + "  \"icon\" : \"<i class='fa fa-globe '></i>\",\n"
-            + "  \"config\": {\n"
-            + "    \"access-token\": {\n"
-            + "      \"type\": \"string\",\n"
-            + "      \"description\": \"access token for Google Translation API\",\n"
-            + "      \"defaultValue\": \"EXAMPLE-TOKEN\"\n"
-            + "    }\n"
-            + "  },\n"
-            + "  \"spell\": {\n"
-            + "    \"magic\": \"%translator\",\n"
-            + "    \"usage\": \"%translator <source>-<target> <access-key> <TEXT>\"\n"
-            + "  }\n"
-            + "}";
+    String examplePackage = "{\n" +
+        "  \"type\" : \"SPELL\",\n" +
+        "  \"name\" : \"translator-spell\",\n" +
+        "  \"description\" : \"Translate langauges using Google API (examaple)\",\n" +
+        "  \"artifact\" : \"./zeppelin-examples/zeppelin-example-spell-translator\",\n" +
+        "  \"license\" : \"Apache-2.0\",\n" +
+        "  \"icon\" : \"<i class='fa fa-globe '></i>\",\n" +
+        "  \"config\": {\n" +
+        "    \"access-token\": {\n" +
+        "      \"type\": \"string\",\n" +
+        "      \"description\": \"access token for Google Translation API\",\n" +
+        "      \"defaultValue\": \"EXAMPLE-TOKEN\"\n" +
+        "    }\n" +
+        "  },\n" +
+        "  \"spell\": {\n" +
+        "    \"magic\": \"%translator\",\n" +
+        "    \"usage\": \"%translator <source>-<target> <access-key> <TEXT>\"\n" +
+        "  }\n" +
+        "}";
 
     HeliumPackage p = HeliumPackage.fromJson(examplePackage);
     Map<String, Object> config = p.getConfig();
     Map<String, Object> accessToken = (Map<String, Object>) config.get("access-token");
 
     assertEquals((String) accessToken.get("type"), "string");
-    assertEquals(
-        (String) accessToken.get("description"), "access token for Google Translation API");
-    assertEquals((String) accessToken.get("defaultValue"), "EXAMPLE-TOKEN");
+    assertEquals((String) accessToken.get("description"),
+        "access token for Google Translation API");
+    assertEquals((String) accessToken.get("defaultValue"),
+        "EXAMPLE-TOKEN");
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/helium/MockApplication1.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/helium/MockApplication1.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/helium/MockApplication1.java
index a581f1e..c962d84 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/helium/MockApplication1.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/helium/MockApplication1.java
@@ -18,7 +18,9 @@ package org.apache.zeppelin.helium;
 
 import org.apache.zeppelin.resource.ResourceSet;
 
-/** Mock application */
+/**
+ * Mock application
+ */
 public class MockApplication1 extends Application {
   boolean unloaded;
   int run;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/BaseZeppelinContextTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/BaseZeppelinContextTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/BaseZeppelinContextTest.java
index a227adf..985ba4f 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/BaseZeppelinContextTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/BaseZeppelinContextTest.java
@@ -17,12 +17,14 @@
 
 package org.apache.zeppelin.interpreter;
 
-import static org.junit.Assert.assertEquals;
+import org.junit.Test;
 
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
 
 public class BaseZeppelinContextTest {
 
@@ -30,118 +32,87 @@ public class BaseZeppelinContextTest {
   public void testHooks() throws InvalidHookException {
     InterpreterHookRegistry hookRegistry = new InterpreterHookRegistry();
     TestZeppelinContext z = new TestZeppelinContext(hookRegistry, 10);
-    InterpreterContext context =
-        InterpreterContext.builder()
-            .setNoteId("note_1")
-            .setNoteName("note_name_1")
-            .setParagraphId("paragraph_1")
-            .setInterpreterClassName("Test1Interpreter")
-            .setReplName("test1")
-            .build();
+    InterpreterContext context = InterpreterContext.builder()
+        .setNoteId("note_1")
+        .setNoteName("note_name_1")
+        .setParagraphId("paragraph_1")
+        .setInterpreterClassName("Test1Interpreter")
+        .setReplName("test1")
+        .build();
     z.setInterpreterContext(context);
 
     // get note name via InterpreterContext
     String note_name = z.getInterpreterContext().getNoteName();
     assertEquals(
-        String.format("Actual note name: %s, but expected %s", note_name, "note_name_1"),
-        "note_name_1",
-        note_name);
+            String.format("Actual note name: %s, but expected %s", note_name, "note_name_1"),
+            "note_name_1",
+            note_name
+    );
 
     // register global hook for current interpreter
     z.registerHook(InterpreterHookRegistry.HookType.PRE_EXEC.getName(), "pre_cmd");
     z.registerHook(InterpreterHookRegistry.HookType.POST_EXEC.getName(), "post_cmd");
-    assertEquals(
-        "pre_cmd",
-        hookRegistry.get(
-            null, "Test1Interpreter", InterpreterHookRegistry.HookType.PRE_EXEC.getName()));
-    assertEquals(
-        "post_cmd",
-        hookRegistry.get(
-            null, "Test1Interpreter", InterpreterHookRegistry.HookType.POST_EXEC.getName()));
+    assertEquals("pre_cmd", hookRegistry.get(null, "Test1Interpreter",
+        InterpreterHookRegistry.HookType.PRE_EXEC.getName()));
+    assertEquals("post_cmd", hookRegistry.get(null, "Test1Interpreter",
+        InterpreterHookRegistry.HookType.POST_EXEC.getName()));
 
     z.unregisterHook(InterpreterHookRegistry.HookType.PRE_EXEC.getName());
     z.unregisterHook(InterpreterHookRegistry.HookType.POST_EXEC.getName());
-    assertEquals(
-        null,
-        hookRegistry.get(
-            null, "Test1Interpreter", InterpreterHookRegistry.HookType.PRE_EXEC.getName()));
-    assertEquals(
-        null,
-        hookRegistry.get(
-            null, "Test1Interpreter", InterpreterHookRegistry.HookType.POST_EXEC.getName()));
+    assertEquals(null, hookRegistry.get(null, "Test1Interpreter",
+        InterpreterHookRegistry.HookType.PRE_EXEC.getName()));
+    assertEquals(null, hookRegistry.get(null, "Test1Interpreter",
+        InterpreterHookRegistry.HookType.POST_EXEC.getName()));
 
     // register global hook for interpreter test2
     z.registerHook(InterpreterHookRegistry.HookType.PRE_EXEC.getName(), "pre_cmd2", "test2");
     z.registerHook(InterpreterHookRegistry.HookType.POST_EXEC.getName(), "post_cmd2", "test2");
-    assertEquals(
-        "pre_cmd2",
-        hookRegistry.get(
-            null, "Test2Interpreter", InterpreterHookRegistry.HookType.PRE_EXEC.getName()));
-    assertEquals(
-        "post_cmd2",
-        hookRegistry.get(
-            null, "Test2Interpreter", InterpreterHookRegistry.HookType.POST_EXEC.getName()));
+    assertEquals("pre_cmd2", hookRegistry.get(null, "Test2Interpreter",
+        InterpreterHookRegistry.HookType.PRE_EXEC.getName()));
+    assertEquals("post_cmd2", hookRegistry.get(null, "Test2Interpreter",
+        InterpreterHookRegistry.HookType.POST_EXEC.getName()));
 
     z.unregisterHook(InterpreterHookRegistry.HookType.PRE_EXEC.getName(), "test2");
     z.unregisterHook(InterpreterHookRegistry.HookType.POST_EXEC.getName(), "test2");
-    assertEquals(
-        null,
-        hookRegistry.get(
-            null, "Test2Interpreter", InterpreterHookRegistry.HookType.PRE_EXEC.getName()));
-    assertEquals(
-        null,
-        hookRegistry.get(
-            null, "Test2Interpreter", InterpreterHookRegistry.HookType.POST_EXEC.getName()));
+    assertEquals(null, hookRegistry.get(null, "Test2Interpreter",
+        InterpreterHookRegistry.HookType.PRE_EXEC.getName()));
+    assertEquals(null, hookRegistry.get(null, "Test2Interpreter",
+        InterpreterHookRegistry.HookType.POST_EXEC.getName()));
 
     // register hook for note_1 and current interpreter
     z.registerNoteHook(InterpreterHookRegistry.HookType.PRE_EXEC.getName(), "pre_cmd", "note_1");
     z.registerNoteHook(InterpreterHookRegistry.HookType.POST_EXEC.getName(), "post_cmd", "note_1");
-    assertEquals(
-        "pre_cmd",
-        hookRegistry.get(
-            "note_1", "Test1Interpreter", InterpreterHookRegistry.HookType.PRE_EXEC.getName()));
-    assertEquals(
-        "post_cmd",
-        hookRegistry.get(
-            "note_1", "Test1Interpreter", InterpreterHookRegistry.HookType.POST_EXEC.getName()));
+    assertEquals("pre_cmd", hookRegistry.get("note_1", "Test1Interpreter",
+        InterpreterHookRegistry.HookType.PRE_EXEC.getName()));
+    assertEquals("post_cmd", hookRegistry.get("note_1", "Test1Interpreter",
+        InterpreterHookRegistry.HookType.POST_EXEC.getName()));
 
     z.unregisterNoteHook("note_1", InterpreterHookRegistry.HookType.PRE_EXEC.getName(), "test1");
     z.unregisterNoteHook("note_1", InterpreterHookRegistry.HookType.POST_EXEC.getName(), "test1");
-    assertEquals(
-        null,
-        hookRegistry.get(
-            "note_1", "Test1Interpreter", InterpreterHookRegistry.HookType.PRE_EXEC.getName()));
-    assertEquals(
-        null,
-        hookRegistry.get(
-            "note_1", "Test1Interpreter", InterpreterHookRegistry.HookType.POST_EXEC.getName()));
+    assertEquals(null, hookRegistry.get("note_1", "Test1Interpreter",
+        InterpreterHookRegistry.HookType.PRE_EXEC.getName()));
+    assertEquals(null, hookRegistry.get("note_1", "Test1Interpreter",
+        InterpreterHookRegistry.HookType.POST_EXEC.getName()));
 
     // register hook for note_1 and interpreter test2
-    z.registerNoteHook(
-        InterpreterHookRegistry.HookType.PRE_EXEC.getName(), "pre_cmd2", "note_1", "test2");
-    z.registerNoteHook(
-        InterpreterHookRegistry.HookType.POST_EXEC.getName(), "post_cmd2", "note_1", "test2");
-    assertEquals(
-        "pre_cmd2",
-        hookRegistry.get(
-            "note_1", "Test2Interpreter", InterpreterHookRegistry.HookType.PRE_EXEC.getName()));
-    assertEquals(
-        "post_cmd2",
-        hookRegistry.get(
-            "note_1", "Test2Interpreter", InterpreterHookRegistry.HookType.POST_EXEC.getName()));
+    z.registerNoteHook(InterpreterHookRegistry.HookType.PRE_EXEC.getName(),
+        "pre_cmd2", "note_1", "test2");
+    z.registerNoteHook(InterpreterHookRegistry.HookType.POST_EXEC.getName(),
+        "post_cmd2", "note_1", "test2");
+    assertEquals("pre_cmd2", hookRegistry.get("note_1", "Test2Interpreter",
+        InterpreterHookRegistry.HookType.PRE_EXEC.getName()));
+    assertEquals("post_cmd2", hookRegistry.get("note_1", "Test2Interpreter",
+        InterpreterHookRegistry.HookType.POST_EXEC.getName()));
 
     z.unregisterNoteHook("note_1", InterpreterHookRegistry.HookType.PRE_EXEC.getName(), "test2");
     z.unregisterNoteHook("note_1", InterpreterHookRegistry.HookType.POST_EXEC.getName(), "test2");
-    assertEquals(
-        null,
-        hookRegistry.get(
-            "note_1", "Test2Interpreter", InterpreterHookRegistry.HookType.PRE_EXEC.getName()));
-    assertEquals(
-        null,
-        hookRegistry.get(
-            "note_1", "Test2Interpreter", InterpreterHookRegistry.HookType.POST_EXEC.getName()));
+    assertEquals(null, hookRegistry.get("note_1", "Test2Interpreter",
+        InterpreterHookRegistry.HookType.PRE_EXEC.getName()));
+    assertEquals(null, hookRegistry.get("note_1", "Test2Interpreter",
+        InterpreterHookRegistry.HookType.POST_EXEC.getName()));
   }
 
+
   public static class TestZeppelinContext extends BaseZeppelinContext {
 
     public TestZeppelinContext(InterpreterHookRegistry hooks, int maxResult) {
@@ -166,4 +137,6 @@ public class BaseZeppelinContextTest {
       return null;
     }
   }
+
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterContextTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterContextTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterContextTest.java
index ac6a2eb..62b4035 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterContextTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterContextTest.java
@@ -17,11 +17,11 @@
 
 package org.apache.zeppelin.interpreter;
 
+import org.junit.Test;
+
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
-import org.junit.Test;
-
 public class InterpreterContextTest {
 
   @Test
@@ -29,10 +29,12 @@ public class InterpreterContextTest {
     InterpreterContext.remove();
     assertNull(InterpreterContext.get());
 
-    InterpreterContext.set(InterpreterContext.builder().build());
+    InterpreterContext.set(InterpreterContext.builder()
+        .build());
     assertNotNull(InterpreterContext.get());
 
     InterpreterContext.remove();
     assertNull(InterpreterContext.get());
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterHookRegistryTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterHookRegistryTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterHookRegistryTest.java
index 52c37e1..2381dc3 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterHookRegistryTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterHookRegistryTest.java
@@ -17,6 +17,8 @@
 
 package org.apache.zeppelin.interpreter;
 
+import org.junit.Test;
+
 import static org.apache.zeppelin.interpreter.InterpreterHookRegistry.HookType.POST_EXEC;
 import static org.apache.zeppelin.interpreter.InterpreterHookRegistry.HookType.POST_EXEC_DEV;
 import static org.apache.zeppelin.interpreter.InterpreterHookRegistry.HookType.PRE_EXEC;
@@ -24,8 +26,6 @@ import static org.apache.zeppelin.interpreter.InterpreterHookRegistry.HookType.P
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 
-import org.junit.Test;
-
 public class InterpreterHookRegistryTest {
 
   @Test
@@ -71,4 +71,5 @@ public class InterpreterHookRegistryTest {
     // Test that only valid event codes ("pre_exec", "post_exec") are accepted
     registry.register("foo", "bar", "baz", "whatever");
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterOutputChangeWatcherTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterOutputChangeWatcherTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterOutputChangeWatcherTest.java
index 52f1f1c..2dbbbf8 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterOutputChangeWatcherTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterOutputChangeWatcherTest.java
@@ -16,16 +16,17 @@
  */
 package org.apache.zeppelin.interpreter;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import org.junit.After;
+import org.junit.Before;
 
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.util.concurrent.atomic.AtomicInteger;
-import org.junit.After;
-import org.junit.Before;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
 public class InterpreterOutputChangeWatcherTest implements InterpreterOutputChangeListener {
   private File tmpDir;
@@ -38,9 +39,8 @@ public class InterpreterOutputChangeWatcherTest implements InterpreterOutputChan
     watcher = new InterpreterOutputChangeWatcher(this);
     watcher.start();
 
-    tmpDir =
-        new File(
-            System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis());
+    tmpDir = new File(System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" +
+        System.currentTimeMillis());
     tmpDir.mkdirs();
     fileChanged = null;
     numChanged = new AtomicInteger(0);
@@ -66,6 +66,7 @@ public class InterpreterOutputChangeWatcherTest implements InterpreterOutputChan
     }
   }
 
+
   // @Test
   public void test() throws IOException, InterruptedException {
     assertNull(fileChanged);
@@ -98,6 +99,7 @@ public class InterpreterOutputChangeWatcherTest implements InterpreterOutputChan
     assertEquals(1, numChanged.get());
   }
 
+
   @Override
   public void fileChanged(File file) {
     fileChanged = file;
@@ -107,4 +109,5 @@ public class InterpreterOutputChangeWatcherTest implements InterpreterOutputChan
       notify();
     }
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterOutputTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterOutputTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterOutputTest.java
index 1d0ea7a..8158151 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterOutputTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterOutputTest.java
@@ -16,14 +16,16 @@
  */
 package org.apache.zeppelin.interpreter;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.IOException;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+
 public class InterpreterOutputTest implements InterpreterOutputListener {
   private InterpreterOutput out;
   int numAppendEvent;
@@ -77,6 +79,7 @@ public class InterpreterOutputTest implements InterpreterOutputListener {
     assertEquals("div", new String(out.getOutputAt(0).toByteArray()));
   }
 
+
   @Test
   public void testType() throws IOException {
     // default output stream type is TEXT
@@ -150,6 +153,7 @@ public class InterpreterOutputTest implements InterpreterOutputListener {
     assertEquals("<h3> This is a hack </h3>\t234\n", new String(out.getOutputAt(1).toByteArray()));
   }
 
+
   @Test
   public void testTableCellFormatting() throws IOException {
     out.write("%table col1\tcol2\n\n%html val1\tval2\n".getBytes());
@@ -188,8 +192,11 @@ public class InterpreterOutputTest implements InterpreterOutputListener {
     InterpreterOutput.limit = Constants.ZEPPELIN_INTERPRETER_OUTPUT_LIMIT;
   }
 
+
   @Override
-  public void onUpdateAll(InterpreterOutput out) {}
+  public void onUpdateAll(InterpreterOutput out) {
+
+  }
 
   @Override
   public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterResultTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterResultTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterResultTest.java
index db069fd..a8ff1bf 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterResultTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterResultTest.java
@@ -17,17 +17,18 @@
 
 package org.apache.zeppelin.interpreter;
 
+import org.junit.Test;
+
 import static org.junit.Assert.assertEquals;
 
-import org.junit.Test;
 
 public class InterpreterResultTest {
 
   @Test
   public void testTextType() {
 
-    InterpreterResult result =
-        new InterpreterResult(InterpreterResult.Code.SUCCESS, "this is a TEXT type");
+    InterpreterResult result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "this is a TEXT type");
     assertEquals("No magic", InterpreterResult.Type.TEXT, result.message().get(0).getType());
     result = new InterpreterResult(InterpreterResult.Code.SUCCESS, "%this is a TEXT type");
     assertEquals("No magic", InterpreterResult.Type.TEXT, result.message().get(0).getType());
@@ -39,15 +40,14 @@ public class InterpreterResultTest {
   public void testSimpleMagicType() {
     InterpreterResult result = null;
 
-    result = new InterpreterResult(InterpreterResult.Code.SUCCESS, "%table col1\tcol2\naaa\t123\n");
+    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "%table col1\tcol2\naaa\t123\n");
     assertEquals(InterpreterResult.Type.TABLE, result.message().get(0).getType());
-    result =
-        new InterpreterResult(InterpreterResult.Code.SUCCESS, "%table\ncol1\tcol2\naaa\t123\n");
+    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "%table\ncol1\tcol2\naaa\t123\n");
     assertEquals(InterpreterResult.Type.TABLE, result.message().get(0).getType());
-    result =
-        new InterpreterResult(
-            InterpreterResult.Code.SUCCESS,
-            "some text before magic word\n%table col1\tcol2\naaa\t123\n");
+    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "some text before magic word\n%table col1\tcol2\naaa\t123\n");
     assertEquals(InterpreterResult.Type.TABLE, result.message().get(1).getType());
   }
 
@@ -55,49 +55,29 @@ public class InterpreterResultTest {
   public void testComplexMagicType() {
     InterpreterResult result = null;
 
-    result =
-        new InterpreterResult(
-            InterpreterResult.Code.SUCCESS, "some text before %table col1\tcol2\naaa\t123\n");
-    assertEquals(
-        "some text before magic return magic",
-        InterpreterResult.Type.TEXT,
-        result.message().get(0).getType());
-    result =
-        new InterpreterResult(
-            InterpreterResult.Code.SUCCESS, "some text before\n%table col1\tcol2\naaa\t123\n");
-    assertEquals(
-        "some text before magic return magic",
-        InterpreterResult.Type.TEXT,
-        result.message().get(0).getType());
-    assertEquals(
-        "some text before magic return magic",
-        InterpreterResult.Type.TABLE,
-        result.message().get(1).getType());
-    result =
-        new InterpreterResult(
-            InterpreterResult.Code.SUCCESS,
-            "%html  <h3> This is a hack </h3> %table\n col1\tcol2\naaa\t123\n");
-    assertEquals(
-        "magic A before magic B return magic A",
-        InterpreterResult.Type.HTML,
-        result.message().get(0).getType());
-    result =
-        new InterpreterResult(
-            InterpreterResult.Code.SUCCESS,
-            "some text before magic word %table col1\tcol2\naaa\t123\n %html  "
-                + "<h3> This is a hack </h3>");
-    assertEquals(
-        "text & magic A before magic B return magic A",
-        InterpreterResult.Type.TEXT,
-        result.message().get(0).getType());
-    result =
-        new InterpreterResult(
-            InterpreterResult.Code.SUCCESS,
-            "%table col1\tcol2\naaa\t123\n %html  <h3> This is a hack </h3> %table col1\naaa\n123\n");
-    assertEquals(
-        "magic A, magic B, magic a' return magic A",
-        InterpreterResult.Type.TABLE,
-        result.message().get(0).getType());
+    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "some text before %table col1\tcol2\naaa\t123\n");
+    assertEquals("some text before magic return magic",
+        InterpreterResult.Type.TEXT, result.message().get(0).getType());
+    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "some text before\n%table col1\tcol2\naaa\t123\n");
+    assertEquals("some text before magic return magic",
+        InterpreterResult.Type.TEXT, result.message().get(0).getType());
+    assertEquals("some text before magic return magic",
+        InterpreterResult.Type.TABLE, result.message().get(1).getType());
+    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "%html  <h3> This is a hack </h3> %table\n col1\tcol2\naaa\t123\n");
+    assertEquals("magic A before magic B return magic A",
+        InterpreterResult.Type.HTML, result.message().get(0).getType());
+    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "some text before magic word %table col1\tcol2\naaa\t123\n %html  " +
+            "<h3> This is a hack </h3>");
+    assertEquals("text & magic A before magic B return magic A",
+        InterpreterResult.Type.TEXT, result.message().get(0).getType());
+    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "%table col1\tcol2\naaa\t123\n %html  <h3> This is a hack </h3> %table col1\naaa\n123\n");
+    assertEquals("magic A, magic B, magic a' return magic A",
+        InterpreterResult.Type.TABLE, result.message().get(0).getType());
   }
 
   @Test
@@ -105,21 +85,17 @@ public class InterpreterResultTest {
 
     InterpreterResult result = null;
 
-    result = new InterpreterResult(InterpreterResult.Code.SUCCESS, "%table col1\tcol2\naaa\t123\n");
-    assertEquals(
-        "%table col1\tcol2\naaa\t123\n",
+    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "%table col1\tcol2\naaa\t123\n");
+    assertEquals("%table col1\tcol2\naaa\t123\n",
         "col1\tcol2\naaa\t123\n", result.message().get(0).getData());
-    result =
-        new InterpreterResult(InterpreterResult.Code.SUCCESS, "%table\ncol1\tcol2\naaa\t123\n");
-    assertEquals(
-        "%table\ncol1\tcol2\naaa\t123\n",
+    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "%table\ncol1\tcol2\naaa\t123\n");
+    assertEquals("%table\ncol1\tcol2\naaa\t123\n",
         "col1\tcol2\naaa\t123\n", result.message().get(0).getData());
-    result =
-        new InterpreterResult(
-            InterpreterResult.Code.SUCCESS,
-            "some text before magic word\n%table col1\tcol2\naaa\t123\n");
-    assertEquals(
-        "some text before magic word\n%table col1\tcol2\naaa\t123\n",
+    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "some text before magic word\n%table col1\tcol2\naaa\t123\n");
+    assertEquals("some text before magic word\n%table col1\tcol2\naaa\t123\n",
         "col1\tcol2\naaa\t123\n", result.message().get(1).getData());
   }
 
@@ -127,40 +103,31 @@ public class InterpreterResultTest {
 
     InterpreterResult result = null;
 
-    result =
-        new InterpreterResult(
-            InterpreterResult.Code.SUCCESS, "some text before\n%table col1\tcol2\naaa\t123\n");
+    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "some text before\n%table col1\tcol2\naaa\t123\n");
     assertEquals("text before %table", "some text before\n", result.message().get(0).getData());
     assertEquals("text after %table", "col1\tcol2\naaa\t123\n", result.message().get(1).getData());
-    result =
-        new InterpreterResult(
-            InterpreterResult.Code.SUCCESS,
-            "%html  <h3> This is a hack </h3>\n%table\ncol1\tcol2\naaa\t123\n");
+    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "%html  <h3> This is a hack </h3>\n%table\ncol1\tcol2\naaa\t123\n");
     assertEquals(" <h3> This is a hack </h3>\n", result.message().get(0).getData());
     assertEquals("col1\tcol2\naaa\t123\n", result.message().get(1).getData());
-    result =
-        new InterpreterResult(
-            InterpreterResult.Code.SUCCESS,
-            "some text before magic word\n%table col1\tcol2\naaa\t123\n\n%html "
-                + "<h3> This is a hack </h3>");
+    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "some text before magic word\n%table col1\tcol2\naaa\t123\n\n%html " +
+            "<h3> This is a hack </h3>");
     assertEquals("<h3> This is a hack </h3>", result.message().get(2).getData());
-    result =
-        new InterpreterResult(
-            InterpreterResult.Code.SUCCESS,
-            "%table col1\tcol2\naaa\t123\n\n%html  <h3> This is a hack </h3>\n%table col1\naaa\n123\n");
+    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "%table col1\tcol2\naaa\t123\n\n%html  <h3> This is a hack </h3>\n%table col1\naaa\n123\n");
     assertEquals("col1\naaa\n123\n", result.message().get(2).getData());
-    result =
-        new InterpreterResult(
-            InterpreterResult.Code.SUCCESS,
-            "%table " + "col1\tcol2\naaa\t123\n\n%table col1\naaa\n123\n");
+    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "%table " + "col1\tcol2\naaa\t123\n\n%table col1\naaa\n123\n");
     assertEquals("col1\tcol2\naaa\t123\n", result.message().get(0).getData());
     assertEquals("col1\naaa\n123\n", result.message().get(1).getData());
   }
 
   @Test
   public void testToString() {
-    assertEquals(
-        "%html hello",
-        new InterpreterResult(InterpreterResult.Code.SUCCESS, "%html hello").toString());
+    assertEquals("%html hello", new InterpreterResult(InterpreterResult.Code.SUCCESS,
+        "%html hello").toString());
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterTest.java
index 11e9750..72b9f58 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterTest.java
@@ -17,12 +17,13 @@
 
 package org.apache.zeppelin.interpreter;
 
-import static org.junit.Assert.assertEquals;
+import org.junit.Test;
 
 import java.util.Properties;
-import org.junit.Test;
 
-// TODO(zjffdu) add more test for Interpreter which is a very important class
+import static org.junit.Assert.assertEquals;
+
+//TODO(zjffdu) add more test for Interpreter which is a very important class
 public class InterpreterTest {
 
   @Test
@@ -66,22 +67,20 @@ public class InterpreterTest {
             .build());
 
     Properties p = new Properties();
-    p.put(
-        "p1",
-        "replName #{noteId}, #{paragraphTitle}, #{paragraphId}, #{paragraphText}, "
-            + "#{replName}, #{noteId}, #{user},"
-            + " #{authenticationInfo}");
+    p.put("p1", "replName #{noteId}, #{paragraphTitle}, #{paragraphId}, #{paragraphText}, " +
+        "#{replName}, #{noteId}, #{user}," +
+        " #{authenticationInfo}");
     Interpreter intp = new DummyInterpreter(p);
     intp.setUserName(user);
     String actual = intp.getProperty("p1");
     InterpreterContext.remove();
 
     assertEquals(
-        String.format(
-            "replName %s, #{paragraphTitle}, #{paragraphId}, #{paragraphText}, , "
-                + "%s, %s, #{authenticationInfo}",
-            noteId, noteId, user),
-        actual);
+        String.format("replName %s, #{paragraphTitle}, #{paragraphId}, #{paragraphText}, , " +
+                "%s, %s, #{authenticationInfo}", noteId,
+            noteId, user),
+        actual
+    );
   }
 
   public static class DummyInterpreter extends Interpreter {
@@ -91,10 +90,14 @@ public class InterpreterTest {
     }
 
     @Override
-    public void open() {}
+    public void open() {
+
+    }
 
     @Override
-    public void close() {}
+    public void close() {
+
+    }
 
     @Override
     public InterpreterResult interpret(String st, InterpreterContext context) {
@@ -102,7 +105,9 @@ public class InterpreterTest {
     }
 
     @Override
-    public void cancel(InterpreterContext context) {}
+    public void cancel(InterpreterContext context) {
+
+    }
 
     @Override
     public FormType getFormType() {
@@ -114,4 +119,5 @@ public class InterpreterTest {
       return 0;
     }
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/LazyOpenInterpreterTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/LazyOpenInterpreterTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/LazyOpenInterpreterTest.java
index 272e9ed..417b72c 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/LazyOpenInterpreterTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/LazyOpenInterpreterTest.java
@@ -17,14 +17,14 @@
 
 package org.apache.zeppelin.interpreter;
 
+import org.junit.Test;
+
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
-import org.junit.Test;
-
 public class LazyOpenInterpreterTest {
   Interpreter interpreter = mock(Interpreter.class);
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/ZeppCtxtVariableTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/ZeppCtxtVariableTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/ZeppCtxtVariableTest.java
index e517b46..14b4b6b 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/ZeppCtxtVariableTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/ZeppCtxtVariableTest.java
@@ -17,15 +17,16 @@
 
 package org.apache.zeppelin.interpreter;
 
-import static org.junit.Assert.assertTrue;
-
-import java.util.Properties;
 import org.apache.zeppelin.resource.LocalResourcePool;
 import org.apache.zeppelin.resource.ResourcePool;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.util.Properties;
+
+import static org.junit.Assert.assertTrue;
+
 public class ZeppCtxtVariableTest {
 
   public static class TestInterpreter extends Interpreter {
@@ -35,10 +36,12 @@ public class ZeppCtxtVariableTest {
     }
 
     @Override
-    public void open() {}
+    public void open() {
+    }
 
     @Override
-    public void close() {}
+    public void close() {
+    }
 
     @Override
     public InterpreterResult interpret(String st, InterpreterContext context) {
@@ -46,7 +49,8 @@ public class ZeppCtxtVariableTest {
     }
 
     @Override
-    public void cancel(InterpreterContext context) {}
+    public void cancel(InterpreterContext context) {
+    }
 
     @Override
     public FormType getFormType() {
@@ -67,17 +71,17 @@ public class ZeppCtxtVariableTest {
 
     resourcePool = new LocalResourcePool("ZeppelinContextVariableInterpolationTest");
 
-    InterpreterContext context =
-        InterpreterContext.builder()
-            .setNoteId("noteId")
-            .setParagraphId("paragraphId")
-            .setResourcePool(resourcePool)
-            .build();
+    InterpreterContext context = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .setResourcePool(resourcePool)
+        .build();
     InterpreterContext.set(context);
 
     interpreter = new TestInterpreter(new Properties());
 
     resourcePool.put("PI", "3.1415");
+
   }
 
   @After
@@ -109,24 +113,28 @@ public class ZeppCtxtVariableTest {
     assertTrue("multiLineSubstitutionSuccessful1", "{PI}\n3.1415\n{PI}\n3.1415".equals(result));
   }
 
+
   @Test
   public void multiLineSubstitutionSuccessful2() {
     String result = interpreter.interpolate("prefix {PI} {{PI\n}} suffix", resourcePool);
     assertTrue("multiLineSubstitutionSuccessful2", "prefix 3.1415 {PI\n} suffix".equals(result));
   }
 
+
   @Test
   public void multiLineSubstitutionSuccessful3() {
     String result = interpreter.interpolate("prefix {{\nPI}} {PI} suffix", resourcePool);
     assertTrue("multiLineSubstitutionSuccessful3", "prefix {\nPI} 3.1415 suffix".equals(result));
   }
 
+
   @Test
   public void multiLineSubstitutionFailure2() {
     String result = interpreter.interpolate("prefix {PI\n} suffix", resourcePool);
     assertTrue("multiLineSubstitutionFailure2", "prefix {PI\n} suffix".equals(result));
   }
 
+
   @Test
   public void multiLineSubstitutionFailure3() {
     String result = interpreter.interpolate("prefix {\nPI} suffix", resourcePool);
@@ -192,4 +200,5 @@ public class ZeppCtxtVariableTest {
     String result = interpreter.interpolate("Paired } end an escaped sequence", resourcePool);
     assertTrue("Random braces - four", "Paired } end an escaped sequence".equals(result));
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServerTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServerTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServerTest.java
index fa16ace..9719717 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServerTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServerTest.java
@@ -17,16 +17,6 @@
 
 package org.apache.zeppelin.interpreter.remote;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.atomic.AtomicBoolean;
 import org.apache.thrift.TException;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
@@ -37,17 +27,23 @@ import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterContext;
 import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResult;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+
 public class RemoteInterpreterServerTest {
 
   @Test
   public void testStartStop() throws InterruptedException, IOException, TException {
-    RemoteInterpreterServer server =
-        new RemoteInterpreterServer(
-            "localhost",
-            RemoteInterpreterUtils.findRandomAvailablePortOnAllLocalInterfaces(),
-            ":",
-            "groupId",
-            true);
+    RemoteInterpreterServer server = new RemoteInterpreterServer("localhost",
+        RemoteInterpreterUtils.findRandomAvailablePortOnAllLocalInterfaces(), ":", "groupId", true);
 
     startRemoteInterpreterServer(server, 10 * 1000);
     stopRemoteInterpreterServer(server, 10 * 10000);
@@ -55,13 +51,8 @@ public class RemoteInterpreterServerTest {
 
   @Test
   public void testStartStopWithQueuedEvents() throws InterruptedException, IOException, TException {
-    RemoteInterpreterServer server =
-        new RemoteInterpreterServer(
-            "localhost",
-            RemoteInterpreterUtils.findRandomAvailablePortOnAllLocalInterfaces(),
-            ":",
-            "groupId",
-            true);
+    RemoteInterpreterServer server = new RemoteInterpreterServer("localhost",
+        RemoteInterpreterUtils.findRandomAvailablePortOnAllLocalInterfaces(), ":", "groupId", true);
     server.intpEventClient = mock(RemoteInterpreterEventClient.class);
     startRemoteInterpreterServer(server, 10 * 1000);
 
@@ -81,9 +72,8 @@ public class RemoteInterpreterServerTest {
       Thread.sleep(200);
     }
     assertEquals(true, server.isRunning());
-    assertEquals(
-        true,
-        RemoteInterpreterUtils.checkIfRemoteEndpointAccessible("localhost", server.getPort()));
+    assertEquals(true, RemoteInterpreterUtils.checkIfRemoteEndpointAccessible("localhost",
+        server.getPort()));
   }
 
   private void stopRemoteInterpreterServer(RemoteInterpreterServer server, int timeout)
@@ -98,20 +88,14 @@ public class RemoteInterpreterServerTest {
       Thread.sleep(200);
     }
     assertEquals(false, server.isRunning());
-    assertEquals(
-        false,
-        RemoteInterpreterUtils.checkIfRemoteEndpointAccessible("localhost", server.getPort()));
+    assertEquals(false, RemoteInterpreterUtils.checkIfRemoteEndpointAccessible("localhost",
+        server.getPort()));
   }
 
   @Test
   public void testInterpreter() throws IOException, TException, InterruptedException {
-    final RemoteInterpreterServer server =
-        new RemoteInterpreterServer(
-            "localhost",
-            RemoteInterpreterUtils.findRandomAvailablePortOnAllLocalInterfaces(),
-            ":",
-            "groupId",
-            true);
+    final RemoteInterpreterServer server = new RemoteInterpreterServer("localhost",
+        RemoteInterpreterUtils.findRandomAvailablePortOnAllLocalInterfaces(), ":", "groupId", true);
     server.intpEventClient = mock(RemoteInterpreterEventClient.class);
 
     Map<String, String> intpProperties = new HashMap<>();
@@ -119,25 +103,24 @@ public class RemoteInterpreterServerTest {
     intpProperties.put("zeppelin.interpreter.localRepo", "/tmp");
 
     // create Test1Interpreter in session_1
-    server.createInterpreter(
-        "group_1", "session_1", Test1Interpreter.class.getName(), intpProperties, "user_1");
-    Test1Interpreter interpreter1 =
-        (Test1Interpreter)
-            ((LazyOpenInterpreter) server.getInterpreterGroup().get("session_1").get(0))
-                .getInnerInterpreter();
+    server.createInterpreter("group_1", "session_1", Test1Interpreter.class.getName(),
+        intpProperties, "user_1");
+    Test1Interpreter interpreter1 = (Test1Interpreter)
+        ((LazyOpenInterpreter) server.getInterpreterGroup().get("session_1").get(0))
+            .getInnerInterpreter();
     assertEquals(1, server.getInterpreterGroup().getSessionNum());
     assertEquals(1, server.getInterpreterGroup().get("session_1").size());
     assertEquals(2, interpreter1.getProperties().size());
     assertEquals("value_1", interpreter1.getProperty("property_1"));
 
     // create Test2Interpreter in session_1
-    server.createInterpreter(
-        "group_1", "session_1", Test1Interpreter.class.getName(), intpProperties, "user_1");
+    server.createInterpreter("group_1", "session_1", Test1Interpreter.class.getName(),
+        intpProperties, "user_1");
     assertEquals(2, server.getInterpreterGroup().get("session_1").size());
 
     // create Test1Interpreter in session_2
-    server.createInterpreter(
-        "group_1", "session_2", Test1Interpreter.class.getName(), intpProperties, "user_1");
+    server.createInterpreter("group_1", "session_2", Test1Interpreter.class.getName(),
+        intpProperties, "user_1");
     assertEquals(2, server.getInterpreterGroup().getSessionNum());
     assertEquals(2, server.getInterpreterGroup().get("session_1").size());
     assertEquals(1, server.getInterpreterGroup().get("session_2").size());
@@ -149,26 +132,23 @@ public class RemoteInterpreterServerTest {
     intpContext.setNoteGui("{}");
 
     // single output of SUCCESS
-    RemoteInterpreterResult result =
-        server.interpret(
-            "session_1", Test1Interpreter.class.getName(), "SINGLE_OUTPUT_SUCCESS", intpContext);
+    RemoteInterpreterResult result = server.interpret("session_1", Test1Interpreter.class.getName(),
+        "SINGLE_OUTPUT_SUCCESS", intpContext);
     assertEquals("SUCCESS", result.code);
     assertEquals(1, result.getMsg().size());
     assertEquals("SINGLE_OUTPUT_SUCCESS", result.getMsg().get(0).getData());
 
     // combo output of SUCCESS
-    result =
-        server.interpret(
-            "session_1", Test1Interpreter.class.getName(), "COMBO_OUTPUT_SUCCESS", intpContext);
+    result = server.interpret("session_1", Test1Interpreter.class.getName(), "COMBO_OUTPUT_SUCCESS",
+        intpContext);
     assertEquals("SUCCESS", result.code);
     assertEquals(2, result.getMsg().size());
     assertEquals("INTERPRETER_OUT", result.getMsg().get(0).getData());
     assertEquals("SINGLE_OUTPUT_SUCCESS", result.getMsg().get(1).getData());
 
     // single output of ERROR
-    result =
-        server.interpret(
-            "session_1", Test1Interpreter.class.getName(), "SINGLE_OUTPUT_ERROR", intpContext);
+    result = server.interpret("session_1", Test1Interpreter.class.getName(), "SINGLE_OUTPUT_ERROR",
+        intpContext);
     assertEquals("ERROR", result.code);
     assertEquals(1, result.getMsg().size());
     assertEquals("SINGLE_OUTPUT_ERROR", result.getMsg().get(0).getData());
@@ -178,17 +158,16 @@ public class RemoteInterpreterServerTest {
     assertEquals("NATIVE", formType);
 
     // cancel
-    Thread sleepThread =
-        new Thread() {
-          @Override
-          public void run() {
-            try {
-              server.interpret("session_1", Test1Interpreter.class.getName(), "SLEEP", intpContext);
-            } catch (TException e) {
-              e.printStackTrace();
-            }
-          }
-        };
+    Thread sleepThread = new Thread() {
+      @Override
+      public void run() {
+        try {
+          server.interpret("session_1", Test1Interpreter.class.getName(), "SLEEP", intpContext);
+        } catch (TException e) {
+          e.printStackTrace();
+        }
+      }
+    };
     sleepThread.start();
 
     Thread.sleep(1000);
@@ -197,8 +176,8 @@ public class RemoteInterpreterServerTest {
     assertTrue(interpreter1.cancelled.get());
 
     // getProgress
-    assertEquals(
-        10, server.getProgress("session_1", Test1Interpreter.class.getName(), intpContext));
+    assertEquals(10, server.getProgress("session_1", Test1Interpreter.class.getName(),
+        intpContext));
 
     // close
     server.close("session_1", Test1Interpreter.class.getName());
@@ -215,7 +194,9 @@ public class RemoteInterpreterServerTest {
     }
 
     @Override
-    public void open() {}
+    public void open() {
+
+    }
 
     @Override
     public InterpreterResult interpret(String st, InterpreterContext context) {
@@ -260,16 +241,20 @@ public class RemoteInterpreterServerTest {
     public void close() {
       closed.set(true);
     }
+
   }
 
   public static class Test2Interpreter extends Interpreter {
 
+
     public Test2Interpreter(Properties properties) {
       super(properties);
     }
 
     @Override
-    public void open() {}
+    public void open() {
+
+    }
 
     @Override
     public InterpreterResult interpret(String st, InterpreterContext context) {
@@ -277,7 +262,9 @@ public class RemoteInterpreterServerTest {
     }
 
     @Override
-    public void cancel(InterpreterContext context) throws InterpreterException {}
+    public void cancel(InterpreterContext context) throws InterpreterException {
+
+    }
 
     @Override
     public FormType getFormType() throws InterpreterException {
@@ -290,6 +277,9 @@ public class RemoteInterpreterServerTest {
     }
 
     @Override
-    public void close() {}
+    public void close() {
+
+    }
+
   }
 }


[39/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseClient.java
----------------------------------------------------------------------
diff --git a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseClient.java b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseClient.java
index 8c87fbc..c397f45 100644
--- a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseClient.java
+++ b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseClient.java
@@ -18,20 +18,6 @@
 package org.apache.zeppelin.sap.universe;
 
 import com.sun.org.apache.xpath.internal.NodeSet;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.TimeUnit;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpression;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.http.Header;
@@ -52,7 +38,24 @@ import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.xml.sax.SAXException;
 
-/** Client for API SAP Universe */
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Client for API  SAP Universe
+ */
 public class UniverseClient {
 
   private static Logger logger = LoggerFactory.getLogger(UniverseClient.class);
@@ -73,7 +76,8 @@ public class UniverseClient {
   private String apiUrl;
   private String authType;
   private Header[] commonHeaders = {
-    new BasicHeader("Accept", "application/xml"), new BasicHeader("Content-Type", "application/xml")
+    new BasicHeader("Accept", "application/xml"),
+    new BasicHeader("Content-Type", "application/xml")
   };
   // <name, id>
   private final Map<String, UniverseInfo> universesMap = new ConcurrentHashMap();
@@ -83,55 +87,53 @@ public class UniverseClient {
   private long universesUpdated = 0;
   private Map<String, Long> universesInfoUpdatedMap = new HashMap<>();
 
-  private final String loginRequestTemplate =
-      "<attrs xmlns=\"http://www.sap.com/rws/bip\">\n"
-          + "<attr name=\"userName\" type=\"string\">%s</attr>\n"
-          + "<attr name=\"password\" type=\"string\">%s</attr>\n"
-          + "<attr name=\"auth\" type=\"string\" "
-          + "possibilities=\"secEnterprise,secLDAP,secWinAD,secSAPR3\">%s</attr>\n"
-          + "</attrs>";
+  private final String loginRequestTemplate = "<attrs xmlns=\"http://www.sap.com/rws/bip\">\n"
+      + "<attr name=\"userName\" type=\"string\">%s</attr>\n"
+      + "<attr name=\"password\" type=\"string\">%s</attr>\n"
+      + "<attr name=\"auth\" type=\"string\" "
+      + "possibilities=\"secEnterprise,secLDAP,secWinAD,secSAPR3\">%s</attr>\n" + "</attrs>";
   private final String createQueryRequestTemplate =
-      "<query xmlns=\"http://www.sap.com/rws/sl/universe\" dataSourceType=\"%s\" "
-          + "dataSourceId=\"%s\">\n"
-          + "<querySpecification version=\"1.0\">\n"
-          + "   <queryOptions>\n"
-          + "            <queryOption name=\"duplicatedRows\" value=\"%s\"/>\n"
-          + "            <queryOption name=\"maxRowsRetrieved\" activated=\"%s\" value=\"%d\"/>\n"
-          + "  </queryOptions>"
-          + "  <queryData>\n%s\n"
-          + "     %s\n"
-          + "  </queryData>\n"
-          + "</querySpecification>\n"
-          + "</query>\n";
+      "<query xmlns=\"http://www.sap.com/rws/sl/universe\" dataSourceType=\"%s\" " +
+          "dataSourceId=\"%s\">\n" +
+          "<querySpecification version=\"1.0\">\n" +
+          "   <queryOptions>\n" +
+          "            <queryOption name=\"duplicatedRows\" value=\"%s\"/>\n" +
+          "            <queryOption name=\"maxRowsRetrieved\" activated=\"%s\" value=\"%d\"/>\n" +
+          "  </queryOptions>" +
+          "  <queryData>\n%s\n" +
+          "     %s\n" +
+          "  </queryData>\n" +
+          "</querySpecification>\n" +
+          "</query>\n";
   private final String filterPartTemplate = "<filterPart>%s\n</filterPart>";
   private final String errorMessageTemplate = "%s\n\n%s";
-  private final String parameterTemplate =
-      "<parameter type=\"prompt\">\n" + "%s\n" + "%s\n" + "%s\n" + "%s\n" + "</parameter>\n";
-  private final String parameterAnswerTemplate =
-      "<answer constrained=\"%s\" type=\"%s\">\n"
-          + "            <info cardinality=\"%s\" keepLastValues=\"%s\"></info>\n"
-          + "               <values>\n"
-          + "     "
-          + "                 <value>%s</value>\n"
-          + "              </values>\n"
-          + "        </answer>\n";
-
-  public UniverseClient(
-      String user, String password, String apiUrl, String authType, int queryTimeout) {
-    RequestConfig requestConfig =
-        RequestConfig.custom()
-            .setConnectTimeout(queryTimeout)
-            .setSocketTimeout(queryTimeout)
-            .build();
+  private final String parameterTemplate = "<parameter type=\"prompt\">\n" +
+      "%s\n" +
+      "%s\n" +
+      "%s\n" +
+      "%s\n" +
+      "</parameter>\n";
+  private final String parameterAnswerTemplate = "<answer constrained=\"%s\" type=\"%s\">\n" +
+      "            <info cardinality=\"%s\" keepLastValues=\"%s\"></info>\n" +
+      "               <values>\n" + "     " +
+      "                 <value>%s</value>\n" +
+      "              </values>\n" +
+      "        </answer>\n";
+
+  public UniverseClient(String user, String password, String apiUrl, String authType,
+                        int queryTimeout) {
+    RequestConfig requestConfig = RequestConfig.custom()
+        .setConnectTimeout(queryTimeout)
+        .setSocketTimeout(queryTimeout)
+        .build();
     PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager();
     cm.setMaxTotal(100);
     cm.setDefaultMaxPerRoute(100);
     cm.closeIdleConnections(10, TimeUnit.MINUTES);
-    httpClient =
-        HttpClientBuilder.create()
-            .setConnectionManager(cm)
-            .setDefaultRequestConfig(requestConfig)
-            .build();
+    httpClient = HttpClientBuilder.create()
+        .setConnectionManager(cm)
+        .setDefaultRequestConfig(requestConfig)
+        .build();
 
     this.user = user;
     this.password = password;
@@ -148,98 +150,68 @@ public class UniverseClient {
     try {
       httpClient.close();
     } catch (Exception e) {
-      throw new UniverseException(
-          String.format(
-              errorMessageTemplate,
-              "UniverseClient " + "(close all): Error close HTTP client",
-              ExceptionUtils.getStackTrace(e)));
+      throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient " +
+          "(close all): Error close HTTP client", ExceptionUtils.getStackTrace(e)));
     }
+
   }
 
   public String createQuery(String token, UniverseQuery query) throws UniverseException {
     try {
       HttpPost httpPost = new HttpPost(String.format("%s%s", apiUrl, "/sl/v1/queries"));
       setHeaders(httpPost, token);
-      String where =
-          StringUtils.isNotBlank(query.getWhere())
-              ? String.format(filterPartTemplate, query.getWhere())
-              : StringUtils.EMPTY;
-      httpPost.setEntity(
-          new StringEntity(
-              String.format(
-                  createQueryRequestTemplate,
-                  query.getUniverseInfo().getType(),
-                  query.getUniverseInfo().getId(),
-                  query.getDuplicatedRows(),
-                  query.getMaxRowsRetrieved().isPresent(),
-                  query.getMaxRowsRetrieved().orElse(0),
-                  query.getSelect(),
-                  where),
-              "UTF-8"));
+      String where = StringUtils.isNotBlank(query.getWhere()) ?
+          String.format(filterPartTemplate, query.getWhere()) : StringUtils.EMPTY;
+      httpPost.setEntity(new StringEntity(
+          String.format(createQueryRequestTemplate, query.getUniverseInfo().getType(),
+              query.getUniverseInfo().getId(), query.getDuplicatedRows(),
+              query.getMaxRowsRetrieved().isPresent(), query.getMaxRowsRetrieved().orElse(0),
+              query.getSelect(), where), "UTF-8"));
       HttpResponse response = httpClient.execute(httpPost);
 
       if (response.getStatusLine().getStatusCode() == 200) {
         return getValue(EntityUtils.toString(response.getEntity()), "//success/id");
       }
 
-      throw new UniverseException(
-          String.format(
-              errorMessageTemplate,
-              "UniverseClient " + "(create query): Request failed\n",
-              EntityUtils.toString(response.getEntity())));
+      throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+          + "(create query): Request failed\n", EntityUtils.toString(response.getEntity())));
     } catch (IOException e) {
-      throw new UniverseException(
-          String.format(
-              errorMessageTemplate,
-              "UniverseClient " + "(create query): Request failed",
-              ExceptionUtils.getStackTrace(e)));
+      throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+          + "(create query): Request failed", ExceptionUtils.getStackTrace(e)));
     } catch (ParserConfigurationException | SAXException | XPathExpressionException e) {
-      throw new UniverseException(
-          String.format(
-              errorMessageTemplate,
-              "UniverseClient " + "(create query): Response processing failed",
-              ExceptionUtils.getStackTrace(e)));
+      throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+          + "(create query): Response processing failed", ExceptionUtils.getStackTrace(e)));
     }
   }
 
   public void deleteQuery(String token, String queryId) throws UniverseException {
     try {
       if (StringUtils.isNotBlank(queryId)) {
-        HttpDelete httpDelete =
-            new HttpDelete(String.format("%s%s%s", apiUrl, "/sl/v1/queries/", queryId));
+        HttpDelete httpDelete = new HttpDelete(String.format("%s%s%s", apiUrl, "/sl/v1/queries/",
+            queryId));
         setHeaders(httpDelete, token);
         httpClient.execute(httpDelete);
       }
     } catch (Exception e) {
-      throw new UniverseException(
-          String.format(
-              errorMessageTemplate,
-              "UniverseClient " + "(delete query): Request failed",
-              ExceptionUtils.getStackTrace(e)));
+      throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient " +
+          "(delete query): Request failed", ExceptionUtils.getStackTrace(e)));
     }
   }
 
   public List<List<String>> getResults(String token, String queryId) throws UniverseException {
-    HttpGet httpGet =
-        new HttpGet(
-            String.format("%s%s%s%s", apiUrl, "/sl/v1/queries/", queryId, "/data.svc/Flows0"));
+    HttpGet httpGet = new HttpGet(String.format("%s%s%s%s", apiUrl, "/sl/v1/queries/",
+        queryId, "/data.svc/Flows0"));
     setHeaders(httpGet, token);
     HttpResponse response = null;
     try {
       response = httpClient.execute(httpGet);
       if (response.getStatusLine().getStatusCode() != 200) {
-        throw new UniverseException(
-            String.format(
-                errorMessageTemplate,
-                "UniverseClient " + "(get results): Request failed\n",
-                EntityUtils.toString(response.getEntity())));
+        throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+            + "(get results): Request failed\n", EntityUtils.toString(response.getEntity())));
       }
     } catch (IOException e) {
-      throw new UniverseException(
-          String.format(
-              errorMessageTemplate,
-              "UniverseClient " + "(get results): Request failed",
-              ExceptionUtils.getStackTrace(e)));
+      throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient " +
+          "(get results): Request failed", ExceptionUtils.getStackTrace(e)));
     }
 
     try (InputStream xmlStream = response.getEntity().getContent()) {
@@ -253,23 +225,15 @@ public class UniverseClient {
       if (resultsNodes != null) {
         return parseResults(resultsNodes);
       } else {
-        throw new UniverseException(
-            String.format(
-                errorMessageTemplate,
-                "UniverseClient " + "(get results): Response processing failed"));
+        throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+            + "(get results): Response processing failed"));
       }
     } catch (IOException e) {
-      throw new UniverseException(
-          String.format(
-              errorMessageTemplate,
-              "UniverseClient " + "(get results): Request failed",
-              ExceptionUtils.getStackTrace(e)));
+      throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+          + "(get results): Request failed", ExceptionUtils.getStackTrace(e)));
     } catch (ParserConfigurationException | SAXException | XPathExpressionException e) {
-      throw new UniverseException(
-          String.format(
-              errorMessageTemplate,
-              "UniverseClient " + "(get results): Response processing failed",
-              ExceptionUtils.getStackTrace(e)));
+      throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+          + "(get results): Response processing failed", ExceptionUtils.getStackTrace(e)));
     }
   }
 
@@ -281,31 +245,23 @@ public class UniverseClient {
       HttpPost httpPost = new HttpPost(String.format("%s%s", apiUrl, "/logon/long"));
       setHeaders(httpPost);
 
-      httpPost.setEntity(
-          new StringEntity(String.format(loginRequestTemplate, user, password, authType), "UTF-8"));
+      httpPost.setEntity(new StringEntity(
+          String.format(loginRequestTemplate, user, password, authType), "UTF-8"));
       HttpResponse response = httpClient.execute(httpPost);
       String result = null;
       if (response.getStatusLine().getStatusCode() == 200) {
-        result =
-            getValue(
-                EntityUtils.toString(response.getEntity()),
-                "//content/attrs/attr[@name=\"logonToken\"]");
+        result = getValue(EntityUtils.toString(response.getEntity()),
+            "//content/attrs/attr[@name=\"logonToken\"]");
         tokens.put(paragraphId, result);
       }
 
       return result;
     } catch (IOException e) {
-      throw new UniverseException(
-          String.format(
-              errorMessageTemplate,
-              "UniverseClient " + "(get token): Request failed",
-              ExceptionUtils.getStackTrace(e)));
+      throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+          + "(get token): Request failed", ExceptionUtils.getStackTrace(e)));
     } catch (ParserConfigurationException | SAXException | XPathExpressionException e) {
-      throw new UniverseException(
-          String.format(
-              errorMessageTemplate,
-              "UniverseClient " + "(get token): Response processing failed",
-              ExceptionUtils.getStackTrace(e)));
+      throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+          + "(get token): Response processing failed", ExceptionUtils.getStackTrace(e)));
     }
   }
 
@@ -322,11 +278,8 @@ public class UniverseClient {
 
       return false;
     } catch (Exception e) {
-      throw new UniverseException(
-          String.format(
-              errorMessageTemplate,
-              "UniverseClient " + "(close session): Request failed",
-              ExceptionUtils.getStackTrace(e)));
+      throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+          + "(close session): Request failed", ExceptionUtils.getStackTrace(e)));
     } finally {
       tokens.remove(paragraphId);
     }
@@ -341,9 +294,8 @@ public class UniverseClient {
     UniverseInfo universeInfo = universesMap.get(universeName);
     if (universeInfo != null && StringUtils.isNotBlank(universeInfo.getId())) {
       Map<String, UniverseNodeInfo> universeNodeInfoMap = universeInfosMap.get(universeName);
-      if (universeNodeInfoMap != null
-          && universesInfoUpdatedMap.containsKey(universeName)
-          && !isExpired(universesInfoUpdatedMap.get(universeName))) {
+      if (universeNodeInfoMap != null && universesInfoUpdatedMap.containsKey(universeName) &&
+          !isExpired(universesInfoUpdatedMap.get(universeName))) {
         return universeNodeInfoMap;
       } else {
         universeNodeInfoMap = new HashMap<>();
@@ -373,19 +325,14 @@ public class UniverseClient {
               parseUniverseInfo(universeRootInfoNodes, universeNodeInfoMap);
             }
           } catch (Exception e) {
-            throw new UniverseException(
-                String.format(
-                    errorMessageTemplate,
-                    "UniverseClient " + "(get universe nodes info): Response processing failed",
-                    ExceptionUtils.getStackTrace(e)));
+            throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+                    + "(get universe nodes info): Response processing failed",
+                ExceptionUtils.getStackTrace(e)));
           }
         }
       } catch (IOException e) {
-        throw new UniverseException(
-            String.format(
-                errorMessageTemplate,
-                "UniverseClient " + "(get universe nodes info): Request failed",
-                ExceptionUtils.getStackTrace(e)));
+        throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+            + "(get universe nodes info): Request failed", ExceptionUtils.getStackTrace(e)));
       }
       universeInfosMap.put(universeName, universeNodeInfoMap);
       universesInfoUpdatedMap.put(universeName, System.currentTimeMillis());
@@ -393,6 +340,7 @@ public class UniverseClient {
       return universeNodeInfoMap;
     }
     return Collections.emptyMap();
+
   }
 
   public void loadUniverses(String token) throws UniverseException {
@@ -419,25 +367,19 @@ public class UniverseClient {
 
   public List<UniverseQueryPrompt> getParameters(String token, String queryId)
       throws UniverseException {
-    HttpGet httpGet =
-        new HttpGet(String.format("%s%s%s%s", apiUrl, "/sl/v1/queries/", queryId, "/parameters"));
+    HttpGet httpGet = new HttpGet(String.format("%s%s%s%s", apiUrl, "/sl/v1/queries/",
+        queryId, "/parameters"));
     setHeaders(httpGet, token);
     HttpResponse response = null;
     try {
       response = httpClient.execute(httpGet);
       if (response.getStatusLine().getStatusCode() != 200) {
-        throw new UniverseException(
-            String.format(
-                errorMessageTemplate,
-                "UniverseClient " + "(get parameters): Request failed\n",
-                EntityUtils.toString(response.getEntity())));
+        throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+            + "(get parameters): Request failed\n", EntityUtils.toString(response.getEntity())));
       }
     } catch (IOException e) {
-      throw new UniverseException(
-          String.format(
-              errorMessageTemplate,
-              "UniverseClient " + "(get parameters): Request failed",
-              ExceptionUtils.getStackTrace(e)));
+      throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient " +
+          "(get parameters): Request failed", ExceptionUtils.getStackTrace(e)));
     }
 
     try (InputStream xmlStream = response.getEntity().getContent()) {
@@ -451,56 +393,39 @@ public class UniverseClient {
       if (parametersNodes != null) {
         return parseParameters(parametersNodes);
       } else {
-        throw new UniverseException(
-            String.format(
-                errorMessageTemplate,
-                "UniverseClient " + "(get parameters): Response processing failed"));
+        throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+            + "(get parameters): Response processing failed"));
       }
     } catch (IOException e) {
-      throw new UniverseException(
-          String.format(
-              errorMessageTemplate,
-              "UniverseClient " + "(get parameters): Response processing failed",
-              ExceptionUtils.getStackTrace(e)));
+      throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+          + "(get parameters): Response processing failed", ExceptionUtils.getStackTrace(e)));
     } catch (ParserConfigurationException | SAXException | XPathExpressionException e) {
-      throw new UniverseException(
-          String.format(
-              errorMessageTemplate,
-              "UniverseClient " + "(get parameters): Response processing failed",
-              ExceptionUtils.getStackTrace(e)));
+      throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+          + "(get parameters): Response processing failed", ExceptionUtils.getStackTrace(e)));
     }
   }
 
-  public void setParametersValues(
-      String token, String queryId, List<UniverseQueryPrompt> parameters) throws UniverseException {
-    HttpPut httpPut =
-        new HttpPut(String.format("%s%s%s%s", apiUrl, "/sl/v1/queries/", queryId, "/parameters"));
+  public void setParametersValues(String token, String queryId,
+                                  List<UniverseQueryPrompt> parameters) throws UniverseException {
+    HttpPut httpPut = new HttpPut(String.format("%s%s%s%s", apiUrl, "/sl/v1/queries/",
+        queryId, "/parameters"));
     setHeaders(httpPut, token);
     HttpResponse response = null;
     try {
       StringBuilder request = new StringBuilder();
       request.append("<parameters>\n");
       for (UniverseQueryPrompt parameter : parameters) {
-        String answer =
-            String.format(
-                parameterAnswerTemplate,
-                parameter.getConstrained(),
-                parameter.getType(),
-                parameter.getCardinality(),
-                parameter.getKeepLastValues(),
-                parameter.getValue());
-        String id =
-            parameter.getId() != null
-                ? String.format("<id>%s</id>\n", parameter.getId())
-                : StringUtils.EMPTY;
-        String technicalName =
-            parameter.getTechnicalName() != null
-                ? String.format("<technicalName>%s</technicalName>\n", parameter.getTechnicalName())
-                : StringUtils.EMPTY;
-        String name =
-            parameter.getTechnicalName() != null
-                ? String.format("<name>%s</name>\n", parameter.getName())
-                : StringUtils.EMPTY;
+        String answer = String.format(parameterAnswerTemplate, parameter.getConstrained(),
+            parameter.getType(), parameter.getCardinality(), parameter.getKeepLastValues(),
+            parameter.getValue());
+        String id = parameter.getId() != null ? String.format("<id>%s</id>\n", parameter.getId()) :
+            StringUtils.EMPTY;
+        String technicalName = parameter.getTechnicalName() != null ?
+            String.format("<technicalName>%s</technicalName>\n", parameter.getTechnicalName()) :
+            StringUtils.EMPTY;
+        String name = parameter.getTechnicalName() != null ?
+            String.format("<name>%s</name>\n", parameter.getName()) :
+            StringUtils.EMPTY;
         request.append(String.format(parameterTemplate, id, technicalName, name, answer));
       }
       request.append("</parameters>\n");
@@ -509,37 +434,28 @@ public class UniverseClient {
 
       response = httpClient.execute(httpPut);
       if (response.getStatusLine().getStatusCode() != 200) {
-        throw new UniverseException(
-            String.format(
-                errorMessageTemplate,
-                "UniverseClient " + "(set parameters): Request failed\n",
-                EntityUtils.toString(response.getEntity())));
+        throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+            + "(set parameters): Request failed\n", EntityUtils.toString(response.getEntity())));
       }
     } catch (IOException e) {
-      throw new UniverseException(
-          String.format(
-              errorMessageTemplate,
-              "UniverseClient " + "(set parameters): Request failed",
-              ExceptionUtils.getStackTrace(e)));
+      throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient " +
+          "(set parameters): Request failed", ExceptionUtils.getStackTrace(e)));
     }
   }
 
   private void loadUniverses(String token, int offset, Map<String, UniverseInfo> universesMap)
       throws UniverseException {
     int limit = 50;
-    HttpGet httpGet =
-        new HttpGet(
-            String.format("%s%s?offset=%s&limit=%s", apiUrl, "/sl/v1/universes", offset, limit));
+    HttpGet httpGet = new HttpGet(String.format("%s%s?offset=%s&limit=%s", apiUrl,
+        "/sl/v1/universes",
+        offset, limit));
     setHeaders(httpGet, token);
     HttpResponse response = null;
     try {
       response = httpClient.execute(httpGet);
     } catch (Exception e) {
-      throw new UniverseException(
-          String.format(
-              errorMessageTemplate,
-              "UniverseClient " + "(get universes): Request failed",
-              ExceptionUtils.getStackTrace(e)));
+      throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+          + "(get universes): Request failed", ExceptionUtils.getStackTrace(e)));
     }
     if (response != null && response.getStatusLine().getStatusCode() == 200) {
       try (InputStream xmlStream = response.getEntity().getContent()) {
@@ -590,17 +506,11 @@ public class UniverseClient {
           }
         }
       } catch (IOException e) {
-        throw new UniverseException(
-            String.format(
-                errorMessageTemplate,
-                "UniverseClient " + "(get universes): Response processing failed",
-                ExceptionUtils.getStackTrace(e)));
+        throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+            + "(get universes): Response processing failed", ExceptionUtils.getStackTrace(e)));
       } catch (ParserConfigurationException | SAXException | XPathExpressionException e) {
-        throw new UniverseException(
-            String.format(
-                errorMessageTemplate,
-                "UniverseClient " + "(get universes): Response processing failed",
-                ExceptionUtils.getStackTrace(e)));
+        throw new UniverseException(String.format(errorMessageTemplate, "UniverseClient "
+            + "(get universes): Response processing failed", ExceptionUtils.getStackTrace(e)));
       }
     }
   }
@@ -624,8 +534,8 @@ public class UniverseClient {
     }
   }
 
-  private String getValue(String response, String xPathString)
-      throws ParserConfigurationException, IOException, SAXException, XPathExpressionException {
+  private String getValue(String response, String xPathString) throws ParserConfigurationException,
+      IOException, SAXException, XPathExpressionException {
     try (InputStream xmlStream = new ByteArrayInputStream(response.getBytes())) {
       DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
       DocumentBuilder builder = factory.newDocumentBuilder();
@@ -648,9 +558,8 @@ public class UniverseClient {
       for (int i = 0; i < count; i++) {
         Node parameterNode = parametersNodeList.item(i);
         Node type = parameterNode.getAttributes().getNamedItem("type");
-        if (type != null
-            && type.getTextContent().equalsIgnoreCase("prompt")
-            && parameterNode.hasChildNodes()) {
+        if (type != null && type.getTextContent().equalsIgnoreCase("prompt") &&
+            parameterNode.hasChildNodes()) {
           NodeList parameterInfoNodes = parameterNode.getChildNodes();
           int childNodesCount = parameterInfoNodes.getLength();
           String name = null;
@@ -703,9 +612,8 @@ public class UniverseClient {
             }
           }
           if (name != null && id != null && cardinality != null) {
-            parameters.add(
-                new UniverseQueryPrompt(
-                    id, name, cardinality, constrained, valueType, technicalName, keepLastValues));
+            parameters.add(new UniverseQueryPrompt(id, name, cardinality, constrained, valueType,
+                technicalName, keepLastValues));
             break;
           }
         }
@@ -797,8 +705,8 @@ public class UniverseClient {
           key.append("[");
           key.append(StringUtils.join(path, "].["));
           key.append(String.format("].[%s]", nodeName));
-          nodes.put(
-              key.toString(), new UniverseNodeInfo(nodeId, nodeName, nodeType, folder, nodePath));
+          nodes.put(key.toString(),
+              new UniverseNodeInfo(nodeId, nodeName, nodeType, folder, nodePath));
         }
       }
     }
@@ -880,8 +788,7 @@ public class UniverseClient {
                   key.append(String.format("].[%s]", nodeName));
                 }
               }
-              nodes.put(
-                  key.toString(),
+              nodes.put(key.toString(),
                   new UniverseNodeInfo(nodeId, nodeName, nodeType, folder, nodePath));
             }
           }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseCompleter.java
----------------------------------------------------------------------
diff --git a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseCompleter.java b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseCompleter.java
index b1e304b..e67011b 100644
--- a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseCompleter.java
+++ b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseCompleter.java
@@ -17,11 +17,6 @@
 
 package org.apache.zeppelin.sap.universe;
 
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.*;
-import java.util.regex.Pattern;
 import jline.console.completer.ArgumentCompleter.ArgumentList;
 import jline.console.completer.ArgumentCompleter.WhitespaceArgumentDelimiter;
 import org.apache.commons.lang.StringUtils;
@@ -32,7 +27,15 @@ import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** SAP Universe auto complete functionality. */
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.*;
+import java.util.regex.Pattern;
+
+/**
+ * SAP Universe auto complete functionality.
+ */
 public class UniverseCompleter {
 
   private static Logger logger = LoggerFactory.getLogger(UniverseCompleter.class);
@@ -44,63 +47,69 @@ public class UniverseCompleter {
   public static final String KW_UNIVERSE = "universe";
   public static final String TYPE_FOLDER = "folder";
 
-  private static final Comparator nodeInfoComparator =
-      new Comparator<UniverseNodeInfo>() {
-        @Override
-        public int compare(UniverseNodeInfo o1, UniverseNodeInfo o2) {
-          if (o1.getType().equalsIgnoreCase(TYPE_FOLDER)
-              && o2.getType().equalsIgnoreCase(TYPE_FOLDER)) {
-            return o1.getName().compareToIgnoreCase(o2.getName());
-          }
-          if (o1.getType().equalsIgnoreCase(TYPE_FOLDER)) {
-            return -1;
-          }
-          if (o2.getType().equalsIgnoreCase(TYPE_FOLDER)) {
-            return 1;
-          }
-          if (!o1.getType().equalsIgnoreCase(o2.getType())) {
-            return o1.getType().compareToIgnoreCase(o2.getType());
-          } else {
+  private static final Comparator nodeInfoComparator = new Comparator<UniverseNodeInfo>() {
+    @Override
+    public int compare(UniverseNodeInfo o1, UniverseNodeInfo o2) {
+      if (o1.getType().equalsIgnoreCase(TYPE_FOLDER)
+          && o2.getType().equalsIgnoreCase(TYPE_FOLDER)) {
+        return o1.getName().compareToIgnoreCase(o2.getName());
+      }
+      if (o1.getType().equalsIgnoreCase(TYPE_FOLDER)) {
+        return -1;
+      }
+      if (o2.getType().equalsIgnoreCase(TYPE_FOLDER)) {
+        return 1;
+      }
+      if (!o1.getType().equalsIgnoreCase(o2.getType())) {
+        return o1.getType().compareToIgnoreCase(o2.getType());
+      } else {
 
-            return o1.getName().compareToIgnoreCase(o2.getName());
-          }
+        return o1.getName().compareToIgnoreCase(o2.getName());
+      }
+    }
+  };
+
+  /**
+   * Delimiter that can split keyword list
+   */
+  private WhitespaceArgumentDelimiter sqlDelimiter = new WhitespaceArgumentDelimiter() {
+
+    private Pattern pattern = Pattern.compile(",|;");
+
+    @Override
+    public boolean isDelimiterChar(CharSequence buffer, int pos) {
+      char c = buffer.charAt(pos);
+      boolean endName = false;
+      for (int i = pos; i > 0; i--) {
+        char ch = buffer.charAt(i);
+        if (ch == '\n') {
+          break;
         }
-      };
-
-  /** Delimiter that can split keyword list */
-  private WhitespaceArgumentDelimiter sqlDelimiter =
-      new WhitespaceArgumentDelimiter() {
-
-        private Pattern pattern = Pattern.compile(",|;");
-
-        @Override
-        public boolean isDelimiterChar(CharSequence buffer, int pos) {
-          char c = buffer.charAt(pos);
-          boolean endName = false;
-          for (int i = pos; i > 0; i--) {
-            char ch = buffer.charAt(i);
-            if (ch == '\n') {
-              break;
-            }
-            if (ch == START_NAME && !endName) {
-              return false;
-            }
-            if (ch == END_NAME) {
-              break;
-            }
-          }
-          return pattern.matcher(StringUtils.EMPTY + buffer.charAt(pos)).matches()
-              || super.isDelimiterChar(buffer, pos);
+        if (ch == START_NAME && !endName) {
+          return false;
         }
-      };
+        if (ch == END_NAME) {
+          break;
+        }
+      }
+      return pattern.matcher(StringUtils.EMPTY + buffer.charAt(pos)).matches()
+              || super.isDelimiterChar(buffer, pos);
+    }
+  };
 
-  /** Universe completer */
+  /**
+   * Universe completer
+   */
   private CachedCompleter universeCompleter;
 
-  /** Keywords completer */
+  /**
+   * Keywords completer
+   */
   private CachedCompleter keywordCompleter;
 
-  /** UniverseInfo completers */
+  /**
+   * UniverseInfo completers
+   */
   private Map<String, CachedCompleter> universeInfoCompletersMap = new HashMap<>();
 
   private int ttlInSeconds;
@@ -115,7 +124,8 @@ public class UniverseCompleter {
     String argument = cursorArgument.getCursorArgumentPartForComplete();
     if (cursorArgument.isUniverseNamePosition()) {
       List<CharSequence> universeCandidates = new ArrayList<>();
-      universeCompleter.getCompleter().complete(argument, argument.length(), universeCandidates);
+      universeCompleter.getCompleter().complete(argument, argument.length(),
+          universeCandidates);
       addCompletions(candidates, universeCandidates, CompletionType.universe.name());
       return universeCandidates.size();
     }
@@ -132,9 +142,8 @@ public class UniverseCompleter {
     }
 
     List<CharSequence> keywordCandidates = new ArrayList<>();
-    keywordCompleter
-        .getCompleter()
-        .complete(argument, argument.length() > 0 ? argument.length() : 0, keywordCandidates);
+    keywordCompleter.getCompleter().complete(argument,
+        argument.length() > 0 ? argument.length() : 0, keywordCandidates);
     addCompletions(candidates, keywordCandidates, CompletionType.keyword.name());
 
     return keywordCandidates.size();
@@ -143,36 +152,32 @@ public class UniverseCompleter {
   public void createOrUpdate(UniverseClient client, String token, String buffer, int cursor) {
     try {
       CursorArgument cursorArgument = parseCursorArgument(buffer, cursor);
-      if (keywordCompleter == null
-          || keywordCompleter.getCompleter() == null
+      if (keywordCompleter == null || keywordCompleter.getCompleter() == null
           || keywordCompleter.isExpired()) {
         Set<String> keywords = getKeywordsCompletions();
         if (keywords != null && !keywords.isEmpty()) {
           keywordCompleter = new CachedCompleter(new StringsCompleter(keywords), 0);
         }
       }
-      if (cursorArgument.needLoadUniverses()
-          || (universeCompleter == null
-              || universeCompleter.getCompleter() == null
-              || universeCompleter.isExpired())) {
+      if (cursorArgument.needLoadUniverses() || (universeCompleter == null
+          || universeCompleter.getCompleter() == null || universeCompleter.isExpired())) {
         client.cleanUniverses();
         client.loadUniverses(token);
         if (client.getUniversesMap().size() > 0) {
-          universeCompleter =
-              new CachedCompleter(
-                  new StringsCompleter(client.getUniversesMap().keySet()), ttlInSeconds);
+          universeCompleter = new CachedCompleter(
+              new StringsCompleter(client.getUniversesMap().keySet()), ttlInSeconds);
         }
       }
-      if (cursorArgument.needLoadUniverseInfo()
-          && (!universeInfoCompletersMap.containsKey(cursorArgument.getUniverse())
-              || universeInfoCompletersMap.get(cursorArgument.getUniverse()).getCompleter() == null
-              || universeInfoCompletersMap.get(cursorArgument.getUniverse()).isExpired())) {
+      if (cursorArgument.needLoadUniverseInfo() &&
+          (!universeInfoCompletersMap.containsKey(cursorArgument.getUniverse()) ||
+              universeInfoCompletersMap.get(cursorArgument.getUniverse()).getCompleter() == null ||
+              universeInfoCompletersMap.get(cursorArgument.getUniverse()).isExpired())) {
         if (StringUtils.isNotBlank(cursorArgument.getUniverse())) {
           client.removeUniverseInfo(cursorArgument.getUniverse());
-          Map<String, UniverseNodeInfo> info =
-              client.getUniverseNodesInfo(token, cursorArgument.getUniverse());
-          CachedCompleter completer =
-              new CachedCompleter(new UniverseNodeInfoCompleter(info.values()), ttlInSeconds);
+          Map<String, UniverseNodeInfo> info = client.getUniverseNodesInfo(token, cursorArgument
+              .getUniverse());
+          CachedCompleter completer = new CachedCompleter(
+              new UniverseNodeInfoCompleter(info.values()), ttlInSeconds);
           universeInfoCompletersMap.put(cursorArgument.getUniverse(), completer);
         }
       }
@@ -183,10 +188,8 @@ public class UniverseCompleter {
 
   private Set<String> getKeywordsCompletions() throws IOException {
     String keywords =
-        new BufferedReader(
-                new InputStreamReader(
-                    UniverseCompleter.class.getResourceAsStream("/universe.keywords")))
-            .readLine();
+        new BufferedReader(new InputStreamReader(
+            UniverseCompleter.class.getResourceAsStream("/universe.keywords"))).readLine();
 
     Set<String> completions = new TreeSet<>();
 
@@ -214,8 +217,8 @@ public class UniverseCompleter {
 
         if (argIndex > 0 && argList.getArguments()[argIndex - 1].equalsIgnoreCase(KW_UNIVERSE)) {
           result.setUniverseNamePosition(true);
-          result.setCursorArgumentPartForComplete(
-              cleanName(argList.getCursorArgument().substring(0, argList.getArgumentPosition())));
+          result.setCursorArgumentPartForComplete(cleanName(argList.getCursorArgument()
+              .substring(0, argList.getArgumentPosition())));
           return result;
         }
         if (argIndex > 1) {
@@ -233,8 +236,8 @@ public class UniverseCompleter {
             result.setUniverseNodePosition(true);
             return result;
           } else {
-            result.setCursorArgumentPartForComplete(
-                argList.getCursorArgument().substring(0, argList.getArgumentPosition()));
+            result.setCursorArgumentPartForComplete(argList.getCursorArgument()
+                .substring(0, argList.getArgumentPosition()));
           }
         }
       }
@@ -251,10 +254,8 @@ public class UniverseCompleter {
     return name.replaceAll(CLEAN_NAME_REGEX, StringUtils.EMPTY);
   }
 
-  private void addCompletions(
-      List<InterpreterCompletion> interpreterCompletions,
-      List<CharSequence> candidates,
-      String meta) {
+  private void addCompletions(List<InterpreterCompletion> interpreterCompletions,
+                              List<CharSequence> candidates, String meta) {
     for (CharSequence candidate : candidates) {
       String value;
       if (meta.equalsIgnoreCase(CompletionType.universe.name())) {
@@ -266,8 +267,8 @@ public class UniverseCompleter {
     }
   }
 
-  private void addCompletions(
-      List<InterpreterCompletion> interpreterCompletions, List<UniverseNodeInfo> candidates) {
+  private void addCompletions(List<InterpreterCompletion> interpreterCompletions,
+                              List<UniverseNodeInfo> candidates) {
     for (UniverseNodeInfo candidate : candidates) {
       String value;
       if (candidate.getType().equalsIgnoreCase(TYPE_FOLDER)) {
@@ -275,8 +276,8 @@ public class UniverseCompleter {
       } else {
         value = String.format("%s%s", candidate.getName(), END_NAME);
       }
-      interpreterCompletions.add(
-          new InterpreterCompletion(candidate.getName(), value, candidate.getType()));
+      interpreterCompletions.add(new InterpreterCompletion(candidate.getName(), value,
+          candidate.getType()));
     }
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseException.java
----------------------------------------------------------------------
diff --git a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseException.java b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseException.java
index 0a3a671..8086f94 100644
--- a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseException.java
+++ b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseException.java
@@ -17,7 +17,10 @@
 
 package org.apache.zeppelin.sap.universe;
 
-/** Runtime Exception for SAP universe */
+
+/**
+ * Runtime Exception for SAP universe
+ */
 public class UniverseException extends Exception {
 
   public UniverseException(Throwable e) {
@@ -31,4 +34,5 @@ public class UniverseException extends Exception {
   public UniverseException(String msg, Throwable t) {
     super(msg, t);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseInfo.java
----------------------------------------------------------------------
diff --git a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseInfo.java b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseInfo.java
index 76cc507..4f40dce 100644
--- a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseInfo.java
+++ b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseInfo.java
@@ -17,13 +17,16 @@
 
 package org.apache.zeppelin.sap.universe;
 
-/** Info about of universe node */
+/**
+ * Info about of universe node
+ */
 public class UniverseInfo {
   private String id;
   private String name;
   private String type;
 
-  public UniverseInfo() {}
+  public UniverseInfo() {
+  }
 
   public UniverseInfo(String id, String name, String type) {
     this.id = id;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseNodeInfo.java
----------------------------------------------------------------------
diff --git a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseNodeInfo.java b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseNodeInfo.java
index c9eda24..fe0c97e 100644
--- a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseNodeInfo.java
+++ b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseNodeInfo.java
@@ -17,7 +17,9 @@
 
 package org.apache.zeppelin.sap.universe;
 
-/** Info about of universe item */
+/**
+ * Info about of universe item
+ */
 public class UniverseNodeInfo {
   private String id;
   private String name;
@@ -25,7 +27,8 @@ public class UniverseNodeInfo {
   private String folder;
   private String nodePath;
 
-  public UniverseNodeInfo() {}
+  public UniverseNodeInfo() {
+  }
 
   public UniverseNodeInfo(String id, String name, String type, String folder, String nodePath) {
     this.id = id;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseNodeInfoCompleter.java
----------------------------------------------------------------------
diff --git a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseNodeInfoCompleter.java b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseNodeInfoCompleter.java
index 2729440..af46b46 100644
--- a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseNodeInfoCompleter.java
+++ b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseNodeInfoCompleter.java
@@ -16,16 +16,20 @@
  */
 package org.apache.zeppelin.sap.universe;
 
-import java.util.*;
 import jline.console.completer.Completer;
 import jline.internal.Preconditions;
 import org.apache.commons.lang.StringUtils;
 
-/** Case-insensitive completer. */
+import java.util.*;
+
+/**
+ * Case-insensitive completer.
+ */
 public class UniverseNodeInfoCompleter implements Completer {
   private final UniverseInfoTreeNode tree = new UniverseInfoTreeNode();
 
-  public UniverseNodeInfoCompleter() {}
+  public UniverseNodeInfoCompleter() {
+  }
 
   public UniverseNodeInfoCompleter(final Collection<UniverseNodeInfo> nodes) {
     Preconditions.checkNotNull(nodes);
@@ -52,8 +56,8 @@ public class UniverseNodeInfoCompleter implements Completer {
     return completeCollection(buffer, cursor, candidates);
   }
 
-  private int completeCollection(
-      final String buffer, final int cursor, final Collection candidates) {
+  private int completeCollection(final String buffer, final int cursor,
+      final Collection candidates) {
     Preconditions.checkNotNull(candidates);
     if (buffer == null) {
       candidates.addAll(tree.getNodesInfo());

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseQuery.java
----------------------------------------------------------------------
diff --git a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseQuery.java b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseQuery.java
index 7347e65..43894b2 100644
--- a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseQuery.java
+++ b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseQuery.java
@@ -17,10 +17,13 @@
 
 package org.apache.zeppelin.sap.universe;
 
-import java.util.OptionalInt;
 import org.apache.commons.lang.StringUtils;
 
-/** Data of universe query */
+import java.util.OptionalInt;
+
+/**
+ * Data of universe query
+ */
 public class UniverseQuery {
   private String select;
   private String where;
@@ -28,12 +31,8 @@ public class UniverseQuery {
   private boolean duplicatedRows = false;
   private OptionalInt maxRowsRetrieved;
 
-  public UniverseQuery(
-      String select,
-      String where,
-      UniverseInfo universeInfo,
-      boolean duplicatedRows,
-      OptionalInt maxRowsRetrieved) {
+  public UniverseQuery(String select, String where, UniverseInfo universeInfo,
+                       boolean duplicatedRows, OptionalInt maxRowsRetrieved) {
     this.select = select;
     this.where = where;
     this.universeInfo = universeInfo;
@@ -42,9 +41,8 @@ public class UniverseQuery {
   }
 
   public boolean isCorrect() {
-    return StringUtils.isNotBlank(select)
-        && universeInfo != null
-        && StringUtils.isNotBlank(universeInfo.getId())
+    return StringUtils.isNotBlank(select) && universeInfo != null &&
+        StringUtils.isNotBlank(universeInfo.getId())
         && StringUtils.isNotBlank(universeInfo.getName());
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseQueryPrompt.java
----------------------------------------------------------------------
diff --git a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseQueryPrompt.java b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseQueryPrompt.java
index b143275..04b2b49 100644
--- a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseQueryPrompt.java
+++ b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseQueryPrompt.java
@@ -17,7 +17,9 @@
 
 package org.apache.zeppelin.sap.universe;
 
-/** Info about parameter of universe query */
+/**
+ * Info about parameter of universe query
+ */
 public class UniverseQueryPrompt {
   private Integer id;
   private String name;
@@ -28,16 +30,11 @@ public class UniverseQueryPrompt {
   private String technicalName;
   private String keepLastValues;
 
-  public UniverseQueryPrompt() {}
+  public UniverseQueryPrompt() {
+  }
 
-  public UniverseQueryPrompt(
-      Integer id,
-      String name,
-      String cardinality,
-      String constrained,
-      String type,
-      String technicalName,
-      String keepLastValues) {
+  public UniverseQueryPrompt(Integer id, String name, String cardinality, String constrained,
+                             String type, String technicalName, String keepLastValues) {
     this.id = id;
     this.name = name;
     this.cardinality = cardinality;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseUtil.java
----------------------------------------------------------------------
diff --git a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseUtil.java b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseUtil.java
index a727994..6f24639 100644
--- a/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseUtil.java
+++ b/sap/src/main/java/org/apache/zeppelin/sap/universe/UniverseUtil.java
@@ -17,24 +17,27 @@
 
 package org.apache.zeppelin.sap.universe;
 
-import java.util.*;
 import jline.console.completer.ArgumentCompleter.WhitespaceArgumentDelimiter;
 import org.apache.commons.lang.StringUtils;
 
-/** Util class for convert request from Zeppelin to SAP */
+import java.util.*;
+
+/**
+ * Util class for convert request from Zeppelin to SAP
+ */
 public class UniverseUtil {
 
-  private static final String COMPRASION_START_TEMPLATE =
-      "<comparisonFilter path=\"%s\" " + "operator=\"%s\" id=\"%s\">\n";
+  private static final String COMPRASION_START_TEMPLATE = "<comparisonFilter path=\"%s\" " +
+      "operator=\"%s\" id=\"%s\">\n";
   private static final String COMPRASION_END_TEMPLATE = "</comparisonFilter>\n";
-  private static final String COMPARISON_FILTER =
-      "<comparisonFilter id=\"%s\" path=\"%s\" " + "operator=\"%s\"/>\n";
+  private static final String COMPARISON_FILTER = "<comparisonFilter id=\"%s\" path=\"%s\" " +
+      "operator=\"%s\"/>\n";
   private static final String CONST_OPERAND_START_TEMPLATE = "<constantOperand>\n";
   private static final String CONST_OPERAND_END_TEMPLATE = "</constantOperand>\n";
-  private static final String CONST_OPERAND_VALUE_TEMPLATE =
-      "<value>\n" + "<caption type=\"%s\">%s</caption>\n</value>\n";
-  private static final String PREDEFINED_FILTER_TEMPLATE =
-      "<predefinedFilter path=\"%s\"" + " id=\"%s\"/>\n";
+  private static final String CONST_OPERAND_VALUE_TEMPLATE = "<value>\n" +
+      "<caption type=\"%s\">%s</caption>\n</value>\n";
+  private static final String PREDEFINED_FILTER_TEMPLATE = "<predefinedFilter path=\"%s\"" +
+      " id=\"%s\"/>\n";
   private static final String OBJECT_OPERAND_TEMPLATE = "<objectOperand id=\"%s\" path=\"%s\"/>\n";
   private static final String RESULT_START_TEMPLATE = "<resultObjects>\n";
   private static final String RESULT_END_TEMPLATE = "</resultObjects>\n";
@@ -57,6 +60,7 @@ public class UniverseUtil {
   private static final String MARKER_LEFT_BRACE = "#left_brace#";
   private static final String MARKER_RIGHT_BRACE = "#right_brace#";
 
+
   private static final String LEFT_BRACE = "(";
   private static final String RIGHT_BRACE = ")";
 
@@ -116,8 +120,8 @@ public class UniverseUtil {
         limit = parseInt(arguments[length - 2]);
       } else if (arguments[length - 2].equals("limit")) {
         final String toParse = arguments[length - 1];
-        limit =
-            parseInt(toParse.endsWith(";") ? toParse.substring(0, toParse.length() - 1) : toParse);
+        limit = parseInt(toParse.endsWith(";") ?
+            toParse.substring(0, toParse.length() - 1) : toParse);
       }
       text = text.substring(0, limitIndex);
     }
@@ -145,9 +149,8 @@ public class UniverseUtil {
         pathClosed = true;
         if (wherePart) {
           operatorPosition = true;
-          if (i + 1 == array.length
-              || (array[i + 1] != '.'
-                  && isFilter(String.format("%s]", whereBuf.toString()), text.substring(i + 1)))) {
+          if (i + 1 == array.length || (array[i + 1] != '.'
+              && isFilter(String.format("%s]", whereBuf.toString()), text.substring(i + 1)))) {
             whereBuf.append(c);
             whereBuf.append(MARKER_FILTER);
             if (i + 1 == array.length) {
@@ -178,7 +181,8 @@ public class UniverseUtil {
         }
       }
 
-      if (!universePart && singleQuoteClosed && buf.toString().toLowerCase().endsWith("universe")) {
+      if (!universePart && singleQuoteClosed
+          && buf.toString().toLowerCase().endsWith("universe")) {
         universePart = true;
         continue;
       }
@@ -198,9 +202,7 @@ public class UniverseUtil {
         continue;
       }
 
-      if (!selectPart
-          && pathClosed
-          && singleQuoteClosed
+      if (!selectPart && pathClosed && singleQuoteClosed
           && buf.toString().toLowerCase().endsWith("select")) {
         if (StringUtils.isBlank(universe.toString())) {
           throw new UniverseException("Not found universe name");
@@ -216,10 +218,9 @@ public class UniverseUtil {
         }
         if (buf.toString().toLowerCase().endsWith("where") || i == array.length - 1) {
           selectPart = false;
-          select.append(
-              parseResultObj(
-                  resultObj.toString().replaceAll("(?i)wher$", "").replaceAll("(?i)distinc", ""),
-                  nodeInfos));
+          select.append(parseResultObj(resultObj.toString()
+                  .replaceAll("(?i)wher$", "").replaceAll("(?i)distinc", ""),
+              nodeInfos));
           select.append(RESULT_END_TEMPLATE);
           continue;
         }
@@ -231,8 +232,7 @@ public class UniverseUtil {
           continue;
         }
         if (pathClosed && singleQuoteClosed && c == ',') {
-          select.append(
-              parseResultObj(resultObj.toString().replaceAll("(?i)distinc", ""), nodeInfos));
+          select.append(parseResultObj(resultObj.toString().replaceAll("(?i)distinc", ""), nodeInfos));
           resultObj = new StringBuilder();
         } else {
           resultObj.append(c);
@@ -261,17 +261,15 @@ public class UniverseUtil {
                 whereBuf.append(c);
             }
           } else if (pathClosed) {
-            if ((c == 'a' || c == 'A')
-                && i < array.length - 2
-                && text.substring(i, i + 3).equalsIgnoreCase("and")) {
+            if ((c == 'a' || c == 'A') && i < array.length - 2 &&
+                text.substring(i, i + 3).equalsIgnoreCase("and")) {
               i += 2;
               whereBuf.append(MARKER_AND);
               operatorPosition = false;
               continue;
             }
-            if ((c == 'o' || c == 'O')
-                && i < array.length - 1
-                && text.substring(i, i + 2).equalsIgnoreCase("or")) {
+            if ((c == 'o' || c == 'O') && i < array.length - 1 &&
+                text.substring(i, i + 2).equalsIgnoreCase("or")) {
               i += 1;
               whereBuf.append(MARKER_OR);
               operatorPosition = false;
@@ -398,8 +396,8 @@ public class UniverseUtil {
       throw new UniverseException("Incorrect block where");
     }
 
-    UniverseQuery universeQuery =
-        new UniverseQuery(select.toString().trim(), where, universeInfo, duplicatedRows, limit);
+    UniverseQuery universeQuery = new UniverseQuery(select.toString().trim(),
+        where, universeInfo, duplicatedRows, limit);
 
     if (!universeQuery.isCorrect()) {
       throw new UniverseException("Incorrect query");
@@ -449,9 +447,8 @@ public class UniverseUtil {
           }
           stack.pop();
         } else {
-          while (!stack.empty()
-              && !stack.peek().equals(LEFT_BRACE)
-              && (OPERATIONS.get(nextOperation) >= OPERATIONS.get(stack.peek()))) {
+          while (!stack.empty() && !stack.peek().equals(LEFT_BRACE) &&
+              (OPERATIONS.get(nextOperation) >= OPERATIONS.get(stack.peek()))) {
             out.add(stack.pop());
           }
           stack.push(nextOperation);
@@ -466,8 +463,10 @@ public class UniverseUtil {
       out.add(stack.pop());
     }
     StringBuffer result = new StringBuffer();
-    if (!out.isEmpty()) result.append(out.remove(0));
-    while (!out.isEmpty()) result.append(" ").append(out.remove(0));
+    if (!out.isEmpty())
+      result.append(out.remove(0));
+    while (!out.isEmpty())
+      result.append(" ").append(out.remove(0));
 
     // result contains the reverse polish notation
     return convertWhereToXml(result.toString(), nodeInfos);
@@ -480,8 +479,8 @@ public class UniverseUtil {
       if (nodeInfo != null) {
         return String.format(RESULT_OBJ_TEMPLATE, nodeInfo.getNodePath(), nodeInfo.getId());
       }
-      throw new UniverseException(
-          String.format("Not found information about: \"%s\"", resultObj.trim()));
+      throw new UniverseException(String.format("Not found information about: \"%s\"",
+          resultObj.trim()));
     }
 
     return StringUtils.EMPTY;
@@ -504,22 +503,15 @@ public class UniverseUtil {
 
         if (token.equalsIgnoreCase(MARKER_NOT_NULL) || token.equalsIgnoreCase(MARKER_NULL)) {
           UniverseNodeInfo rightOperandInfo = nodeInfos.get(rightOperand);
-          stack.push(
-              String.format(
-                  COMPARISON_FILTER,
-                  rightOperandInfo.getId(),
-                  rightOperandInfo.getNodePath(),
-                  operator));
+          stack.push(String.format(COMPARISON_FILTER, rightOperandInfo.getId(),
+              rightOperandInfo.getNodePath(), operator));
           continue;
         }
 
         if (token.equalsIgnoreCase(MARKER_FILTER)) {
           UniverseNodeInfo rightOperandInfo = nodeInfos.get(rightOperand);
-          stack.push(
-              String.format(
-                  PREDEFINED_FILTER_TEMPLATE,
-                  rightOperandInfo.getNodePath(),
-                  rightOperandInfo.getId()));
+          stack.push(String.format(PREDEFINED_FILTER_TEMPLATE, rightOperandInfo.getNodePath(),
+              rightOperandInfo.getId()));
           continue;
         }
 
@@ -529,26 +521,20 @@ public class UniverseUtil {
           if (rightOperand.matches("^\\[.*\\]$")) {
             UniverseNodeInfo rightOperandInfo = nodeInfos.get(rightOperand);
             if (rightOperandInfo == null) {
-              throw new UniverseException(
-                  String.format("Not found information about: \"%s\"", rightOperand));
+              throw new UniverseException(String.format("Not found information about: \"%s\"",
+                  rightOperand));
             }
-            rightOperand =
-                String.format(
-                    PREDEFINED_FILTER_TEMPLATE,
-                    rightOperandInfo.getNodePath(),
-                    rightOperandInfo.getId());
+            rightOperand = String.format(PREDEFINED_FILTER_TEMPLATE,
+                rightOperandInfo.getNodePath(), rightOperandInfo.getId());
           }
           if (leftOperand.matches("^\\[.*\\]$")) {
             UniverseNodeInfo leftOperandInfo = nodeInfos.get(leftOperand);
             if (leftOperandInfo == null) {
-              throw new UniverseException(
-                  String.format("Not found information about: \"%s\"", leftOperand));
+              throw new UniverseException(String.format("Not found information about: \"%s\"",
+                  leftOperand));
             }
-            leftOperand =
-                String.format(
-                    PREDEFINED_FILTER_TEMPLATE,
-                    leftOperandInfo.getNodePath(),
-                    leftOperandInfo.getId());
+            leftOperand = String.format(PREDEFINED_FILTER_TEMPLATE, leftOperandInfo.getNodePath(),
+                leftOperandInfo.getId());
           }
           tmp.append(String.format("<%s>\n", operator));
           tmp.append(leftOperand);
@@ -562,8 +548,8 @@ public class UniverseUtil {
 
         UniverseNodeInfo leftOperandInfo = nodeInfos.get(leftOperand);
         if (leftOperandInfo == null) {
-          throw new UniverseException(
-              String.format("Not found information about: \"%s\"", leftOperand));
+          throw new UniverseException(String.format("Not found information about: \"%s\"",
+              leftOperand));
         }
         if (token.equalsIgnoreCase(MARKER_IN) || token.equalsIgnoreCase(MARKER_NOT_IN)) {
           String listValues = rightOperand.replaceAll("^\\(|\\)$", "").trim();
@@ -597,12 +583,8 @@ public class UniverseUtil {
           }
 
           if (!values.isEmpty()) {
-            tmp.append(
-                String.format(
-                    COMPRASION_START_TEMPLATE,
-                    leftOperandInfo.getNodePath(),
-                    operator,
-                    leftOperandInfo.getId()));
+            tmp.append(String.format(COMPRASION_START_TEMPLATE, leftOperandInfo.getNodePath(),
+                operator, leftOperandInfo.getId()));
             tmp.append(CONST_OPERAND_START_TEMPLATE);
             String type = isNumericList ? "Numeric" : "String";
             for (String v : values) {
@@ -620,33 +602,22 @@ public class UniverseUtil {
         if (rightOperand.startsWith("[") && rightOperand.endsWith("]")) {
           rightOperandInfo = nodeInfos.get(rightOperand);
           if (rightOperandInfo == null) {
-            throw new UniverseException(
-                String.format("Not found information about: \"%s\"", rightOperand));
+            throw new UniverseException(String.format("Not found information about: \"%s\"",
+                rightOperand));
           }
         }
         if (OPERATIONS.containsKey(token)) {
           if (rightOperandInfo != null) {
-            tmp.append(
-                String.format(
-                    COMPRASION_START_TEMPLATE,
-                    leftOperandInfo.getNodePath(),
-                    operator,
-                    leftOperandInfo.getId()));
-            tmp.append(
-                String.format(
-                    OBJECT_OPERAND_TEMPLATE,
-                    rightOperandInfo.getId(),
-                    rightOperandInfo.getNodePath()));
+            tmp.append(String.format(COMPRASION_START_TEMPLATE, leftOperandInfo.getNodePath(),
+                operator, leftOperandInfo.getId()));
+            tmp.append(String.format(OBJECT_OPERAND_TEMPLATE, rightOperandInfo.getId(),
+                rightOperandInfo.getNodePath()));
             tmp.append(COMPRASION_END_TEMPLATE);
           } else {
             String type = rightOperand.startsWith("'") ? "String" : "Numeric";
             String value = rightOperand.replaceAll("^'|'$", "");
-            tmp.append(
-                String.format(
-                    COMPRASION_START_TEMPLATE,
-                    leftOperandInfo.getNodePath(),
-                    operator,
-                    leftOperandInfo.getId()));
+            tmp.append(String.format(COMPRASION_START_TEMPLATE, leftOperandInfo.getNodePath(),
+                operator, leftOperandInfo.getId()));
             tmp.append(CONST_OPERAND_START_TEMPLATE);
             tmp.append(String.format(CONST_OPERAND_VALUE_TEMPLATE, type, value));
             tmp.append(CONST_OPERAND_END_TEMPLATE);
@@ -695,11 +666,8 @@ public class UniverseUtil {
       }
       after = after.trim();
       // check after
-      if (result
-          && !after.startsWith("and")
-          && !after.startsWith("or")
-          && !after.startsWith(";")
-          && StringUtils.isNotBlank(after)) {
+      if (result && !after.startsWith("and") && !after.startsWith("or") &&
+          !after.startsWith(";") && StringUtils.isNotBlank(after)) {
         result = false;
       }
     }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/sap/src/test/java/org/apache/zeppelin/sap/universe/UniverseCompleterTest.java
----------------------------------------------------------------------
diff --git a/sap/src/test/java/org/apache/zeppelin/sap/universe/UniverseCompleterTest.java b/sap/src/test/java/org/apache/zeppelin/sap/universe/UniverseCompleterTest.java
index 1c0bbf2..91a4217 100644
--- a/sap/src/test/java/org/apache/zeppelin/sap/universe/UniverseCompleterTest.java
+++ b/sap/src/test/java/org/apache/zeppelin/sap/universe/UniverseCompleterTest.java
@@ -5,27 +5,30 @@
  * "License"); you may not use this file except in compliance with the License. You may obtain a
  * copy of the License at
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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.
+ * 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.sap.universe;
 
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.util.*;
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.completer.CachedCompleter;
 import org.junit.Before;
 import org.junit.Test;
 
-/** Universe completer unit tests */
+import java.util.*;
+
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+/**
+ * Universe completer unit tests
+ */
 public class UniverseCompleterTest {
 
   private UniverseCompleter universeCompleter;
@@ -43,34 +46,21 @@ public class UniverseCompleterTest {
     universes.put("(GLOBAL) universe", new UniverseInfo("3", "(GLOBAL) universe", "uvx"));
     UniverseInfo universeInfo = new UniverseInfo("1", "testUniverse", "uvx");
     Map<String, UniverseNodeInfo> testUniverseNodes = new HashMap<>();
-    testUniverseNodes.put(
-        "[Dimension].[Test].[name1]",
-        new UniverseNodeInfo(
-            "name1id",
-            "name1",
-            "dimension",
-            "Dimension\\Test",
+    testUniverseNodes.put("[Dimension].[Test].[name1]",
+        new UniverseNodeInfo("name1id", "name1", "dimension", "Dimension\\Test",
             "Dimension|folder\\Test|folder\\name1|dimension"));
-    testUniverseNodes.put(
-        "[Dimension].[Test].[name2]",
-        new UniverseNodeInfo(
-            "name2id",
-            "name2",
-            "dimension",
-            "Dimension\\Test",
+    testUniverseNodes.put("[Dimension].[Test].[name2]",
+        new UniverseNodeInfo("name2id", "name2", "dimension", "Dimension\\Test",
             "Dimension|folder\\Test|folder\\name2|dimension"));
-    testUniverseNodes.put(
-        "[Filter].[name3]",
-        new UniverseNodeInfo(
-            "name3id", "name3", "filter", "Filter", "Filter|folder\\name3|filter"));
-    testUniverseNodes.put(
-        "[Filter].[name4]",
-        new UniverseNodeInfo(
-            "name4id", "name4", "filter", "Filter", "Filter|folder\\name4|filter"));
-    testUniverseNodes.put(
-        "[Measure].[name5]",
-        new UniverseNodeInfo(
-            "name5id", "name5", "measure", "Measure", "Measure|folder\\name5|measure"));
+    testUniverseNodes.put("[Filter].[name3]",
+        new UniverseNodeInfo("name3id", "name3", "filter", "Filter",
+            "Filter|folder\\name3|filter"));
+    testUniverseNodes.put("[Filter].[name4]",
+        new UniverseNodeInfo("name4id", "name4", "filter", "Filter",
+            "Filter|folder\\name4|filter"));
+    testUniverseNodes.put("[Measure].[name5]",
+        new UniverseNodeInfo("name5id", "name5", "measure", "Measure",
+            "Measure|folder\\name5|measure"));
 
     universeClient = mock(UniverseClient.class);
     when(universeClient.getUniverseInfo(anyString())).thenReturn(universeInfo);


[18/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/filesystem/src/main/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepo.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/filesystem/src/main/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepo.java b/zeppelin-plugins/notebookrepo/filesystem/src/main/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepo.java
index 8d1bf4d..5d9c85c 100644
--- a/zeppelin-plugins/notebookrepo/filesystem/src/main/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepo.java
+++ b/zeppelin-plugins/notebookrepo/filesystem/src/main/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepo.java
@@ -1,10 +1,12 @@
 package org.apache.zeppelin.notebook.repo;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
+import org.apache.commons.lang.StringUtils;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileStatus;
+import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.io.IOUtils;
+import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.notebook.FileSystemStorage;
 import org.apache.zeppelin.notebook.Note;
@@ -13,11 +15,25 @@ import org.apache.zeppelin.user.AuthenticationInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.security.PrivilegedExceptionAction;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
 /**
  * NotebookRepos for hdfs.
  *
- * <p>Assume the notebook directory structure is as following - notebookdir - noteId/note.json -
- * noteId/note.json - noteId/note.json
+ * Assume the notebook directory structure is as following
+ * - notebookdir
+ *              - noteId/note.json
+ *              - noteId/note.json
+ *              - noteId/note.json
  */
 public class FileSystemNotebookRepo implements NotebookRepo {
   private static final Logger LOGGER = LoggerFactory.getLogger(FileSystemNotebookRepo.class);
@@ -25,12 +41,14 @@ public class FileSystemNotebookRepo implements NotebookRepo {
   private FileSystemStorage fs;
   private Path notebookDir;
 
-  public FileSystemNotebookRepo() {}
+  public FileSystemNotebookRepo() {
+
+  }
 
   public void init(ZeppelinConfiguration zConf) throws IOException {
     this.fs = new FileSystemStorage(zConf, zConf.getNotebookDir());
-    LOGGER.info(
-        "Creating FileSystem: " + this.fs.getFs().getClass().getName() + " for Zeppelin Notebook.");
+    LOGGER.info("Creating FileSystem: " + this.fs.getFs().getClass().getName() +
+        " for Zeppelin Notebook.");
     this.notebookDir = this.fs.makeQualified(new Path(zConf.getNotebookDir()));
     LOGGER.info("Using folder {} to store notebook", notebookDir);
     this.fs.tryMkDir(notebookDir);
@@ -49,15 +67,16 @@ public class FileSystemNotebookRepo implements NotebookRepo {
 
   @Override
   public Note get(final String noteId, AuthenticationInfo subject) throws IOException {
-    String content =
-        this.fs.readFile(new Path(notebookDir.toString() + "/" + noteId + "/note.json"));
+    String content = this.fs.readFile(
+        new Path(notebookDir.toString() + "/" + noteId + "/note.json"));
     return Note.fromJson(content);
   }
 
   @Override
   public void save(final Note note, AuthenticationInfo subject) throws IOException {
-    this.fs.writeFile(
-        note.toJson(), new Path(notebookDir.toString() + "/" + note.getId() + "/note.json"), true);
+    this.fs.writeFile(note.toJson(),
+        new Path(notebookDir.toString() + "/" + note.getId() + "/note.json"),
+        true);
   }
 
   @Override
@@ -80,4 +99,5 @@ public class FileSystemNotebookRepo implements NotebookRepo {
   public void updateSettings(Map<String, String> settings, AuthenticationInfo subject) {
     LOGGER.warn("updateSettings is not implemented for HdfsNotebookRepo");
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/filesystem/src/test/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepoTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/filesystem/src/test/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepoTest.java b/zeppelin-plugins/notebookrepo/filesystem/src/test/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepoTest.java
index cbbe5a6..5fd8becc 100644
--- a/zeppelin-plugins/notebookrepo/filesystem/src/test/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepoTest.java
+++ b/zeppelin-plugins/notebookrepo/filesystem/src/test/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepoTest.java
@@ -1,13 +1,6 @@
 package org.apache.zeppelin.notebook.repo;
 
-import static org.junit.Assert.assertEquals;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.nio.file.Files;
-import java.util.HashMap;
-import java.util.Map;
 import org.apache.commons.io.FileUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
@@ -19,6 +12,15 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.file.Files;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+
 public class FileSystemNotebookRepoTest {
 
   private ZeppelinConfiguration zConf;
@@ -30,11 +32,9 @@ public class FileSystemNotebookRepoTest {
 
   @Before
   public void setUp() throws IOException {
-    notebookDir =
-        Files.createTempDirectory("FileSystemNotebookRepoTest").toFile().getAbsolutePath();
+    notebookDir = Files.createTempDirectory("FileSystemNotebookRepoTest").toFile().getAbsolutePath();
     zConf = new ZeppelinConfiguration();
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), notebookDir);
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), notebookDir);
     hadoopConf = new Configuration();
     fs = FileSystem.get(hadoopConf);
     hdfsNotebookRepo = new FileSystemNotebookRepo();
@@ -80,8 +80,7 @@ public class FileSystemNotebookRepoTest {
 
   @Test
   public void testComplicatedScenarios() throws IOException {
-    // scenario_1: notebook_dir is not clean. There're some unrecognized dir and file under
-    // notebook_dir
+    // scenario_1: notebook_dir is not clean. There're some unrecognized dir and file under notebook_dir
     fs.mkdirs(new Path(notebookDir, "1/2"));
     OutputStream out = fs.create(new Path(notebookDir, "1/a.json"));
     out.close();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/gcs/src/main/java/org/apache/zeppelin/notebook/repo/GCSNotebookRepo.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/gcs/src/main/java/org/apache/zeppelin/notebook/repo/GCSNotebookRepo.java b/zeppelin-plugins/notebookrepo/gcs/src/main/java/org/apache/zeppelin/notebook/repo/GCSNotebookRepo.java
index 7647fbc..ad99aba 100644
--- a/zeppelin-plugins/notebookrepo/gcs/src/main/java/org/apache/zeppelin/notebook/repo/GCSNotebookRepo.java
+++ b/zeppelin-plugins/notebookrepo/gcs/src/main/java/org/apache/zeppelin/notebook/repo/GCSNotebookRepo.java
@@ -49,14 +49,14 @@ import org.slf4j.LoggerFactory;
 /**
  * A NotebookRepo implementation for storing notebooks in Google Cloud Storage.
  *
- * <p>Notes are stored in the GCS "directory" specified by zeppelin.notebook.gcs.dir. This path must
- * be in the form gs://bucketName/path/to/Dir. The bucket must already exist. N.B: GCS is an object
- * store, so this "directory" should not itself be an object. Instead, it represents the base path
- * for the note.json files.
+ * Notes are stored in the GCS "directory" specified by zeppelin.notebook.gcs.dir. This path
+ * must be in the form gs://bucketName/path/to/Dir. The bucket must already exist. N.B: GCS is an
+ * object store, so this "directory" should not itself be an object. Instead, it represents the base
+ * path for the note.json files.
  *
- * <p>Authentication is provided by google-auth-library-java.
- *
- * @see <a href="https://github.com/google/google-auth-library-java">google-auth-library-java</a>.
+ * Authentication is provided by google-auth-library-java.
+ * @see <a href="https://github.com/google/google-auth-library-java">
+ *   google-auth-library-java</a>.
  */
 public class GCSNotebookRepo implements NotebookRepo {
 
@@ -67,7 +67,8 @@ public class GCSNotebookRepo implements NotebookRepo {
   private Pattern noteNamePattern;
   private Storage storage;
 
-  public GCSNotebookRepo() {}
+  public GCSNotebookRepo() {
+  }
 
   @VisibleForTesting
   public GCSNotebookRepo(ZeppelinConfiguration zConf, Storage storage) throws IOException {
@@ -77,38 +78,37 @@ public class GCSNotebookRepo implements NotebookRepo {
 
   @Override
   public void init(ZeppelinConfiguration zConf) throws IOException {
-    this.encoding = zConf.getString(ConfVars.ZEPPELIN_ENCODING);
+    this.encoding =  zConf.getString(ConfVars.ZEPPELIN_ENCODING);
 
     String gcsStorageDir = zConf.getGCSStorageDir();
     if (gcsStorageDir.isEmpty()) {
       throw new IOException("GCS storage directory must be set using 'zeppelin.notebook.gcs.dir'");
     }
     if (!gcsStorageDir.startsWith("gs://")) {
-      throw new IOException(
-          String.format("GCS storage directory '%s' must start with 'gs://'.", gcsStorageDir));
+      throw new IOException(String.format(
+          "GCS storage directory '%s' must start with 'gs://'.", gcsStorageDir));
     }
     String storageDirWithoutScheme = gcsStorageDir.substring("gs://".length());
 
     // pathComponents excludes empty string if trailing slash is present
     List<String> pathComponents = Arrays.asList(storageDirWithoutScheme.split("/"));
     if (pathComponents.size() < 1) {
-      throw new IOException(
-          String.format(
-              "GCS storage directory '%s' must be in the form gs://bucketname/path/to/dir",
-              gcsStorageDir));
+      throw new IOException(String.format(
+          "GCS storage directory '%s' must be in the form gs://bucketname/path/to/dir",
+          gcsStorageDir));
     }
     this.bucketName = pathComponents.get(0);
     if (pathComponents.size() > 1) {
-      this.basePath =
-          Optional.of(StringUtils.join(pathComponents.subList(1, pathComponents.size()), "/"));
+      this.basePath = Optional.of(StringUtils.join(
+          pathComponents.subList(1, pathComponents.size()), "/"));
     } else {
       this.basePath = Optional.absent();
     }
 
     // Notes are stored at gs://bucketName/basePath/<note-id>/note.json
     if (basePath.isPresent()) {
-      this.noteNamePattern =
-          Pattern.compile("^" + Pattern.quote(basePath.get() + "/") + "([^/]+)/note\\.json$");
+      this.noteNamePattern = Pattern.compile(
+          "^" + Pattern.quote(basePath.get() + "/") + "([^/]+)/note\\.json$");
     } else {
       this.noteNamePattern = Pattern.compile("^([^/]+)/note\\.json$");
     }
@@ -130,10 +130,13 @@ public class GCSNotebookRepo implements NotebookRepo {
       List<NoteInfo> infos = new ArrayList<>();
       Iterable<Blob> blobsUnderDir;
       if (basePath.isPresent()) {
-        blobsUnderDir =
-            storage.list(bucketName, BlobListOption.prefix(this.basePath.get() + "/")).iterateAll();
+        blobsUnderDir = storage
+          .list(bucketName, BlobListOption.prefix(this.basePath.get() + "/"))
+          .iterateAll();
       } else {
-        blobsUnderDir = storage.list(bucketName).iterateAll();
+        blobsUnderDir = storage
+          .list(bucketName)
+          .iterateAll();
       }
       for (Blob b : blobsUnderDir) {
         Matcher matcher = noteNamePattern.matcher(b.getName());
@@ -169,8 +172,9 @@ public class GCSNotebookRepo implements NotebookRepo {
 
   @Override
   public void save(Note note, AuthenticationInfo subject) throws IOException {
-    BlobInfo info =
-        BlobInfo.newBuilder(makeBlobId(note.getId())).setContentType("application/json").build();
+    BlobInfo info = BlobInfo.newBuilder(makeBlobId(note.getId()))
+        .setContentType("application/json")
+        .build();
     try {
       storage.create(info, note.toJson().getBytes("UTF-8"));
     } catch (StorageException se) {
@@ -194,7 +198,7 @@ public class GCSNotebookRepo implements NotebookRepo {
 
   @Override
   public void close() {
-    // no-op
+    //no-op
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/gcs/src/test/java/org/apache/zeppelin/notebook/repo/GCSNotebookRepoTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/gcs/src/test/java/org/apache/zeppelin/notebook/repo/GCSNotebookRepoTest.java b/zeppelin-plugins/notebookrepo/gcs/src/test/java/org/apache/zeppelin/notebook/repo/GCSNotebookRepoTest.java
index 2c603ad..c1fae67 100644
--- a/zeppelin-plugins/notebookrepo/gcs/src/test/java/org/apache/zeppelin/notebook/repo/GCSNotebookRepoTest.java
+++ b/zeppelin-plugins/notebookrepo/gcs/src/test/java/org/apache/zeppelin/notebook/repo/GCSNotebookRepoTest.java
@@ -55,13 +55,12 @@ public class GCSNotebookRepoTest {
 
   @Parameters
   public static Collection<Object[]> data() {
-    return Arrays.asList(
-        new Object[][] {
-          {"bucketname", Optional.absent(), "gs://bucketname"},
-          {"bucketname-with-slash", Optional.absent(), "gs://bucketname-with-slash/"},
-          {"bucketname", Optional.of("path/to/dir"), "gs://bucketname/path/to/dir"},
-          {"bucketname", Optional.of("trailing/slash"), "gs://bucketname/trailing/slash/"}
-        });
+    return Arrays.asList(new Object[][] {
+        { "bucketname", Optional.absent(), "gs://bucketname" },
+        { "bucketname-with-slash", Optional.absent(), "gs://bucketname-with-slash/" },
+        { "bucketname", Optional.of("path/to/dir"), "gs://bucketname/path/to/dir" },
+        { "bucketname", Optional.of("trailing/slash"), "gs://bucketname/trailing/slash/" }
+    });
   }
 
   @Parameter(0)
@@ -124,8 +123,7 @@ public class GCSNotebookRepoTest {
     try {
       notebookRepo.get("id", AUTH_INFO);
       fail();
-    } catch (IOException e) {
-    }
+    } catch (IOException e) {}
   }
 
   @Test
@@ -147,8 +145,7 @@ public class GCSNotebookRepoTest {
     try {
       notebookRepo.get("id", AUTH_INFO);
       fail();
-    } catch (IOException e) {
-    }
+    } catch (IOException e) {}
   }
 
   @Test
@@ -174,8 +171,7 @@ public class GCSNotebookRepoTest {
     try {
       notebookRepo.remove("id", AUTH_INFO);
       fail();
-    } catch (IOException e) {
-    }
+    } catch (IOException e) {}
   }
 
   @Test
@@ -204,14 +200,16 @@ public class GCSNotebookRepoTest {
   }
 
   private void create(Note note) throws IOException {
-    BlobInfo info =
-        BlobInfo.newBuilder(makeBlobId(note.getId())).setContentType("application/json").build();
+    BlobInfo info = BlobInfo.newBuilder(makeBlobId(note.getId()))
+        .setContentType("application/json")
+        .build();
     storage.create(info, note.toJson().getBytes("UTF-8"));
   }
 
   private void createMalformed(String noteId) throws IOException {
-    BlobInfo info =
-        BlobInfo.newBuilder(makeBlobId(noteId)).setContentType("application/json").build();
+    BlobInfo info = BlobInfo.newBuilder(makeBlobId(noteId))
+        .setContentType("application/json")
+        .build();
     storage.create(info, "{ invalid-json }".getBytes("UTF-8"));
   }
 
@@ -223,8 +221,7 @@ public class GCSNotebookRepoTest {
       System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_GCS_STORAGE_DIR.getVarName(), "");
       new GCSNotebookRepo(new ZeppelinConfiguration(), storage);
       fail();
-    } catch (IOException e) {
-    }
+    } catch (IOException e) {}
   }
 
   @Test
@@ -233,7 +230,6 @@ public class GCSNotebookRepoTest {
       System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_GCS_STORAGE_DIR.getVarName(), "foo");
       new GCSNotebookRepo(new ZeppelinConfiguration(), storage);
       fail();
-    } catch (IOException e) {
-    }
+    } catch (IOException e) {}
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/git/src/main/java/org/apache/zeppelin/notebook/repo/GitNotebookRepo.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/git/src/main/java/org/apache/zeppelin/notebook/repo/GitNotebookRepo.java b/zeppelin-plugins/notebookrepo/git/src/main/java/org/apache/zeppelin/notebook/repo/GitNotebookRepo.java
index 29ed2f4..7729d52 100644
--- a/zeppelin-plugins/notebookrepo/git/src/main/java/org/apache/zeppelin/notebook/repo/GitNotebookRepo.java
+++ b/zeppelin-plugins/notebookrepo/git/src/main/java/org/apache/zeppelin/notebook/repo/GitNotebookRepo.java
@@ -20,10 +20,6 @@ package org.apache.zeppelin.notebook.repo;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Joiner;
 import com.google.common.collect.Lists;
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.List;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.notebook.Note;
 import org.apache.zeppelin.user.AuthenticationInfo;
@@ -41,14 +37,20 @@ import org.eclipse.jgit.treewalk.filter.PathFilter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+
 /**
  * NotebookRepo that hosts all the notebook FS in a single Git repo
  *
- * <p>This impl intended to be simple and straightforward: - does not handle branches - only basic
- * local git file repo, no remote Github push\pull. GitHub integration is implemented in @see {@link
- * org.apache.zeppelin.notebook.repo.GitNotebookRepo}
+ * This impl intended to be simple and straightforward:
+ *   - does not handle branches
+ *   - only basic local git file repo, no remote Github push\pull. GitHub integration is
+ *   implemented in @see {@link org.apache.zeppelin.notebook.repo.GitNotebookRepo}
  *
- * <p>TODO(bzz): add default .gitignore
+ *   TODO(bzz): add default .gitignore
  */
 public class GitNotebookRepo extends VFSNotebookRepo implements NotebookRepoWithVersionControl {
   private static final Logger LOG = LoggerFactory.getLogger(GitNotebookRepo.class);
@@ -68,8 +70,8 @@ public class GitNotebookRepo extends VFSNotebookRepo implements NotebookRepoWith
 
   @Override
   public void init(ZeppelinConfiguration conf) throws IOException {
-    // TODO(zjffdu), it is weird that I can not call super.init directly here, as it would cause
-    // AbstractMethodError
+    //TODO(zjffdu), it is weird that I can not call super.init directly here, as it would cause
+    //AbstractMethodError
     this.conf = conf;
     setNotebookDirectory(conf.getNotebookDir());
 
@@ -115,8 +117,11 @@ public class GitNotebookRepo extends VFSNotebookRepo implements NotebookRepoWith
   }
 
   /**
-   * the idea is to: 1. stash current changes 2. remember head commit and checkout to the desired
-   * revision 3. get note and checkout back to the head 4. apply stash on top and remove it
+   * the idea is to:
+   * 1. stash current changes
+   * 2. remember head commit and checkout to the desired revision
+   * 3. get note and checkout back to the head
+   * 4. apply stash on top and remove it
    */
   @Override
   public synchronized Note get(String noteId, String revId, AuthenticationInfo subject)
@@ -144,10 +149,7 @@ public class GitNotebookRepo extends VFSNotebookRepo implements NotebookRepoWith
         ObjectId applied = git.stashApply().setStashRef(stash.getName()).call();
         ObjectId dropped = git.stashDrop().setStashRef(0).call();
         Collection<RevCommit> stashes = git.stashList().call();
-        LOG.debug(
-            "Stash applied as : {}, and dropped : {}, stash size: {}",
-            applied,
-            dropped,
+        LOG.debug("Stash applied as : {}, and dropped : {}, stash size: {}", applied, dropped,
             stashes.size());
       }
     } catch (GitAPIException e) {
@@ -162,12 +164,12 @@ public class GitNotebookRepo extends VFSNotebookRepo implements NotebookRepoWith
     LOG.debug("Listing history for {}:", noteId);
     try {
       Iterable<RevCommit> logs = git.log().addPath(noteId).call();
-      for (RevCommit log : logs) {
+      for (RevCommit log: logs) {
         history.add(new Revision(log.getName(), log.getShortMessage(), log.getCommitTime()));
         LOG.debug(" - ({},{},{})", log.getName(), log.getCommitTime(), log.getFullMessage());
       }
     } catch (NoHeadException e) {
-      // when no initial commit exists
+      //when no initial commit exists
       LOG.warn("No Head found for {}, {}", noteId, e.getMessage());
     } catch (GitAPIException e) {
       LOG.error("Failed to get logs for {}", noteId, e);
@@ -184,13 +186,13 @@ public class GitNotebookRepo extends VFSNotebookRepo implements NotebookRepoWith
     }
     return revisionNote;
   }
-
+  
   @Override
   public void close() {
     git.getRepository().close();
   }
 
-  // DI replacements for Tests
+  //DI replacements for Tests
   protected Git getGit() {
     return git;
   }
@@ -198,4 +200,6 @@ public class GitNotebookRepo extends VFSNotebookRepo implements NotebookRepoWith
   void setGit(Git git) {
     this.git = git;
   }
+
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/GitNotebookRepoTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/GitNotebookRepoTest.java b/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/GitNotebookRepoTest.java
index 7de299d..58d7cc1 100644
--- a/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/GitNotebookRepoTest.java
+++ b/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/GitNotebookRepoTest.java
@@ -20,11 +20,11 @@ package org.apache.zeppelin.notebook.repo;
 import static com.google.common.truth.Truth.assertThat;
 import static org.mockito.Mockito.mock;
 
-import com.google.common.base.Joiner;
 import java.io.File;
 import java.io.IOException;
 import java.util.List;
 import java.util.Map;
+
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
@@ -44,6 +44,8 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.base.Joiner;
+
 public class GitNotebookRepoTest {
   private static final Logger LOG = LoggerFactory.getLogger(GitNotebookRepoTest.class);
 
@@ -57,8 +59,7 @@ public class GitNotebookRepoTest {
 
   @Before
   public void setUp() throws Exception {
-    String zpath =
-        System.getProperty("java.io.tmpdir") + "/ZeppelinTest_" + System.currentTimeMillis();
+    String zpath = System.getProperty("java.io.tmpdir") + "/ZeppelinTest_" + System.currentTimeMillis();
     zeppelinDir = new File(zpath);
     zeppelinDir.mkdirs();
     new File(zeppelinDir, "conf").mkdirs();
@@ -70,23 +71,24 @@ public class GitNotebookRepoTest {
     String testNoteDir = Joiner.on(File.separator).join(notebooksDir, TEST_NOTE_ID);
     String testNoteDir2 = Joiner.on(File.separator).join(notebooksDir, TEST_NOTE_ID2);
     FileUtils.copyDirectory(
-        new File(
-            GitNotebookRepoTest.class
-                .getResource(Joiner.on(File.separator).join("", TEST_NOTE_ID))
-                .getFile()),
-        new File(testNoteDir));
+            new File(
+                GitNotebookRepoTest.class.getResource(
+                Joiner.on(File.separator).join("", TEST_NOTE_ID)
+              ).getFile()
+            ),
+            new File(testNoteDir));
     FileUtils.copyDirectory(
-        new File(
-            GitNotebookRepoTest.class
-                .getResource(Joiner.on(File.separator).join("", TEST_NOTE_ID2))
-                .getFile()),
-        new File(testNoteDir2));
+            new File(
+                GitNotebookRepoTest.class.getResource(
+                Joiner.on(File.separator).join("", TEST_NOTE_ID2)
+              ).getFile()
+            ),
+        new File(testNoteDir2)
+    );
 
     System.setProperty(ConfVars.ZEPPELIN_HOME.getVarName(), zeppelinDir.getAbsolutePath());
     System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), notebookDir.getAbsolutePath());
-    System.setProperty(
-        ConfVars.ZEPPELIN_NOTEBOOK_STORAGE.getVarName(),
-        "org.apache.zeppelin.notebook.repo.GitNotebookRepo");
+    System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_STORAGE.getVarName(), "org.apache.zeppelin.notebook.repo.GitNotebookRepo");
 
     conf = ZeppelinConfiguration.create();
   }
@@ -100,14 +102,14 @@ public class GitNotebookRepoTest {
 
   @Test
   public void initNonemptyNotebookDir() throws IOException, GitAPIException {
-    // given - .git does not exit
+    //given - .git does not exit
     File dotGit = new File(Joiner.on(File.separator).join(notebooksDir, ".git"));
     assertThat(dotGit.exists()).isEqualTo(false);
 
-    // when
+    //when
     notebookRepo = new GitNotebookRepo(conf);
 
-    // then
+    //then
     Git git = notebookRepo.getGit();
     assertThat(git).isNotNull();
 
@@ -121,21 +123,21 @@ public class GitNotebookRepoTest {
 
   @Test
   public void showNotebookHistoryEmptyTest() throws GitAPIException, IOException {
-    // given
+    //given
     notebookRepo = new GitNotebookRepo(conf);
     assertThat(notebookRepo.list(null)).isNotEmpty();
 
-    // when
+    //when
     List<Revision> testNotebookHistory = notebookRepo.revisionHistory(TEST_NOTE_ID, null);
 
-    // then
-    // no initial commit, empty history
+    //then
+    //no initial commit, empty history
     assertThat(testNotebookHistory).isEmpty();
   }
 
   @Test
   public void showNotebookHistoryMultipleNotesTest() throws IOException {
-    // initial checks
+    //initial checks
     notebookRepo = new GitNotebookRepo(conf);
     assertThat(notebookRepo.list(null)).isNotEmpty();
     assertThat(containsNote(notebookRepo.list(null), TEST_NOTE_ID)).isTrue();
@@ -143,13 +145,13 @@ public class GitNotebookRepoTest {
     assertThat(notebookRepo.revisionHistory(TEST_NOTE_ID, null)).isEmpty();
     assertThat(notebookRepo.revisionHistory(TEST_NOTE_ID2, null)).isEmpty();
 
-    // add commit to both notes
+    //add commit to both notes
     notebookRepo.checkpoint(TEST_NOTE_ID, "first commit, note1", null);
     assertThat(notebookRepo.revisionHistory(TEST_NOTE_ID, null).size()).isEqualTo(1);
     notebookRepo.checkpoint(TEST_NOTE_ID2, "first commit, note2", null);
     assertThat(notebookRepo.revisionHistory(TEST_NOTE_ID2, null).size()).isEqualTo(1);
 
-    // modify, save and checkpoint first note
+    //modify, save and checkpoint first note
     Note note = notebookRepo.get(TEST_NOTE_ID, null);
     note.setInterpreterFactory(mock(InterpreterFactory.class));
     Paragraph p = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
@@ -162,10 +164,10 @@ public class GitNotebookRepoTest {
     assertThat(notebookRepo.revisionHistory(TEST_NOTE_ID, null).size()).isEqualTo(2);
     assertThat(notebookRepo.revisionHistory(TEST_NOTE_ID2, null).size()).isEqualTo(1);
     assertThat(notebookRepo.checkpoint(TEST_NOTE_ID2, "first commit, note2", null))
-        .isEqualTo(Revision.EMPTY);
+      .isEqualTo(Revision.EMPTY);
     assertThat(notebookRepo.revisionHistory(TEST_NOTE_ID2, null).size()).isEqualTo(1);
 
-    // modify, save and checkpoint second note
+    //modify, save and checkpoint second note
     note = notebookRepo.get(TEST_NOTE_ID2, null);
     note.setInterpreterFactory(mock(InterpreterFactory.class));
     p = note.addNewParagraph(AuthenticationInfo.ANONYMOUS);
@@ -211,7 +213,7 @@ public class GitNotebookRepoTest {
   }
 
   private boolean containsNote(List<NoteInfo> notes, String noteId) {
-    for (NoteInfo note : notes) {
+    for (NoteInfo note: notes) {
       if (note.getId().equals(noteId)) {
         return true;
       }
@@ -321,7 +323,7 @@ public class GitNotebookRepoTest {
 
   @Test
   public void setRevisionTest() throws IOException {
-    // create repo and check that note doesn't contain revisions
+    //create repo and check that note doesn't contain revisions
     notebookRepo = new GitNotebookRepo(conf);
     assertThat(notebookRepo.list(null)).isNotEmpty();
     assertThat(containsNote(notebookRepo.list(null), TEST_NOTE_ID)).isTrue();
@@ -335,7 +337,7 @@ public class GitNotebookRepoTest {
 
     // checkpoint revision1
     Revision revision1 = notebookRepo.checkpoint(TEST_NOTE_ID, "set revision: first commit", null);
-    // TODO(khalid): change to EMPTY after rebase
+    //TODO(khalid): change to EMPTY after rebase
     assertThat(revision1).isNotNull();
     assertThat(notebookRepo.revisionHistory(TEST_NOTE_ID, null).size()).isEqualTo(1);
 
@@ -352,7 +354,7 @@ public class GitNotebookRepoTest {
 
     // checkpoint revision2
     Revision revision2 = notebookRepo.checkpoint(TEST_NOTE_ID, "set revision: second commit", null);
-    // TODO(khalid): change to EMPTY after rebase
+    //TODO(khalid): change to EMPTY after rebase
     assertThat(revision2).isNotNull();
     assertThat(notebookRepo.revisionHistory(TEST_NOTE_ID, null).size()).isEqualTo(2);
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/NotebookRepoSyncInitializationTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/NotebookRepoSyncInitializationTest.java b/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/NotebookRepoSyncInitializationTest.java
index bf35f67..738d708 100644
--- a/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/NotebookRepoSyncInitializationTest.java
+++ b/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/NotebookRepoSyncInitializationTest.java
@@ -17,11 +17,6 @@
 
 package org.apache.zeppelin.notebook.repo;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.IOException;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars;
 import org.apache.zeppelin.notebook.repo.mock.VFSNotebookRepoMock;
@@ -31,31 +26,33 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-// TODO(zjffdu) move it to zeppelin-zengine
+import java.io.File;
+import java.io.IOException;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+//TODO(zjffdu) move it to zeppelin-zengine
 public class NotebookRepoSyncInitializationTest {
-  private static final Logger LOG =
-      LoggerFactory.getLogger(NotebookRepoSyncInitializationTest.class);
+  private static final Logger LOG = LoggerFactory.getLogger(NotebookRepoSyncInitializationTest.class);
   private String validFirstStorageClass = "org.apache.zeppelin.notebook.repo.VFSNotebookRepo";
-  private String validSecondStorageClass =
-      "org.apache.zeppelin.notebook.repo.mock.VFSNotebookRepoMock";
+  private String validSecondStorageClass = "org.apache.zeppelin.notebook.repo.mock.VFSNotebookRepoMock";
   private String invalidStorageClass = "org.apache.zeppelin.notebook.repo.DummyNotebookRepo";
   private String validOneStorageConf = validFirstStorageClass;
   private String validTwoStorageConf = validFirstStorageClass + "," + validSecondStorageClass;
   private String invalidTwoStorageConf = validFirstStorageClass + "," + invalidStorageClass;
-  private String unsupportedStorageConf =
-      validFirstStorageClass + "," + validSecondStorageClass + "," + validSecondStorageClass;
+  private String unsupportedStorageConf = validFirstStorageClass + "," + validSecondStorageClass + "," + validSecondStorageClass;
   private String emptyStorageConf = "";
 
   @Before
-  public void setUp() {
-    System.setProperty(
-        ConfVars.ZEPPELIN_PLUGINS_DIR.getVarName(), new File("../../../plugins").getAbsolutePath());
-    // setup routine
+  public void setUp(){
+    System.setProperty(ConfVars.ZEPPELIN_PLUGINS_DIR.getVarName(), new File("../../../plugins").getAbsolutePath());
+    //setup routine
   }
 
   @After
   public void tearDown() {
-    // tear-down routine
+    //tear-down routine
   }
 
   @Test
@@ -74,12 +71,11 @@ public class NotebookRepoSyncInitializationTest {
   @Test
   public void validInitTwoStorageTest() throws IOException {
     // initialize folders for each storage
-    String zpath =
-        System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis();
+    String zpath = System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis();
     File mainZepDir = new File(zpath);
     mainZepDir.mkdirs();
     new File(mainZepDir, "conf").mkdirs();
-    String mainNotePath = zpath + "/notebook";
+    String mainNotePath = zpath+"/notebook";
     String secNotePath = mainNotePath + "_secondary";
     File mainNotebookDir = new File(mainNotePath);
     File secNotebookDir = new File(secNotePath);
@@ -88,8 +84,7 @@ public class NotebookRepoSyncInitializationTest {
 
     // set confs
     System.setProperty(ConfVars.ZEPPELIN_HOME.getVarName(), mainZepDir.getAbsolutePath());
-    System.setProperty(
-        ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), mainNotebookDir.getAbsolutePath());
+    System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), mainNotebookDir.getAbsolutePath());
     System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_STORAGE.getVarName(), validTwoStorageConf);
     ZeppelinConfiguration conf = ZeppelinConfiguration.create();
     // create repo
@@ -116,12 +111,11 @@ public class NotebookRepoSyncInitializationTest {
   @Test
   public void initUnsupportedNumberStoragesTest() throws IOException {
     // initialize folders for each storage, currently for 2 only
-    String zpath =
-        System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis();
+    String zpath = System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis();
     File mainZepDir = new File(zpath);
     mainZepDir.mkdirs();
     new File(mainZepDir, "conf").mkdirs();
-    String mainNotePath = zpath + "/notebook";
+    String mainNotePath = zpath+"/notebook";
     String secNotePath = mainNotePath + "_secondary";
     File mainNotebookDir = new File(mainNotePath);
     File secNotebookDir = new File(secNotePath);
@@ -130,8 +124,7 @@ public class NotebookRepoSyncInitializationTest {
 
     // set confs
     System.setProperty(ConfVars.ZEPPELIN_HOME.getVarName(), mainZepDir.getAbsolutePath());
-    System.setProperty(
-        ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), mainNotebookDir.getAbsolutePath());
+    System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), mainNotebookDir.getAbsolutePath());
     System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_STORAGE.getVarName(), unsupportedStorageConf);
     ZeppelinConfiguration conf = ZeppelinConfiguration.create();
     // create repo
@@ -156,7 +149,7 @@ public class NotebookRepoSyncInitializationTest {
 
   @Test
   public void initOneDummyStorageTest() throws IOException {
-    // set confs
+ // set confs
     System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_STORAGE.getVarName(), invalidStorageClass);
     ZeppelinConfiguration conf = ZeppelinConfiguration.create();
     // create repo
@@ -165,4 +158,4 @@ public class NotebookRepoSyncInitializationTest {
     assertEquals(notebookRepoSync.getRepoCount(), 1);
     assertTrue(notebookRepoSync.getRepo(0) instanceof NotebookRepo);
   }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/NotebookRepoSyncTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/NotebookRepoSyncTest.java b/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/NotebookRepoSyncTest.java
index a012f72..68e2615 100644
--- a/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/NotebookRepoSyncTest.java
+++ b/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/NotebookRepoSyncTest.java
@@ -17,17 +17,6 @@
 
 package org.apache.zeppelin.notebook.repo;
 
-import static com.google.common.truth.Truth.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
 import org.apache.commons.io.FileUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars;
@@ -43,6 +32,7 @@ import org.apache.zeppelin.notebook.Notebook;
 import org.apache.zeppelin.notebook.NotebookAuthorization;
 import org.apache.zeppelin.notebook.Paragraph;
 import org.apache.zeppelin.notebook.ParagraphJobListener;
+import org.apache.zeppelin.scheduler.Job;
 import org.apache.zeppelin.scheduler.Job.Status;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
 import org.apache.zeppelin.search.SearchService;
@@ -56,7 +46,20 @@ import org.quartz.SchedulerException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-// TODO(zjffdu) move it to zeppelin-zengine
+import java.io.File;
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+
+
+//TODO(zjffdu) move it to zeppelin-zengine
 public class NotebookRepoSyncTest implements ParagraphJobListener {
 
   private File mainZepDir;
@@ -77,12 +80,11 @@ public class NotebookRepoSyncTest implements ParagraphJobListener {
 
   @Before
   public void setUp() throws Exception {
-    String zpath =
-        System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis();
+    String zpath = System.getProperty("java.io.tmpdir")+"/ZeppelinLTest_"+System.currentTimeMillis();
     mainZepDir = new File(zpath);
     mainZepDir.mkdirs();
     new File(mainZepDir, "conf").mkdirs();
-    String mainNotePath = zpath + "/notebook";
+    String mainNotePath = zpath+"/notebook";
     String secNotePath = mainNotePath + "_secondary";
     mainNotebookDir = new File(mainNotePath);
     secNotebookDir = new File(secNotePath);
@@ -90,16 +92,11 @@ public class NotebookRepoSyncTest implements ParagraphJobListener {
     secNotebookDir.mkdirs();
 
     System.setProperty(ConfVars.ZEPPELIN_HOME.getVarName(), mainZepDir.getAbsolutePath());
-    System.setProperty(
-        ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), mainNotebookDir.getAbsolutePath());
-    System.setProperty(
-        ConfVars.ZEPPELIN_NOTEBOOK_STORAGE.getVarName(),
-        "org.apache.zeppelin.notebook.repo.VFSNotebookRepo,org.apache.zeppelin.notebook.repo.mock.VFSNotebookRepoMock");
+    System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), mainNotebookDir.getAbsolutePath());
+    System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_STORAGE.getVarName(), "org.apache.zeppelin.notebook.repo.VFSNotebookRepo,org.apache.zeppelin.notebook.repo.mock.VFSNotebookRepoMock");
     System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_ONE_WAY_SYNC.getVarName(), "false");
-    System.setProperty(
-        ConfVars.ZEPPELIN_CONFIG_FS_DIR.getVarName(), mainZepDir.getAbsolutePath() + "/conf");
-    System.setProperty(
-        ConfVars.ZEPPELIN_PLUGINS_DIR.getVarName(), new File("../../../plugins").getAbsolutePath());
+    System.setProperty(ConfVars.ZEPPELIN_CONFIG_FS_DIR.getVarName(), mainZepDir.getAbsolutePath() + "/conf");
+    System.setProperty(ConfVars.ZEPPELIN_PLUGINS_DIR.getVarName(), new File("../../../plugins").getAbsolutePath());
 
     LOG.info("main Note dir : " + mainNotePath);
     LOG.info("secondary note dir : " + secNotePath);
@@ -110,29 +107,16 @@ public class NotebookRepoSyncTest implements ParagraphJobListener {
     this.schedulerFactory = SchedulerFactory.singleton();
 
     depResolver = new DependencyResolver(mainZepDir.getAbsolutePath() + "/local-repo");
-    interpreterSettingManager =
-        new InterpreterSettingManager(
-            conf,
-            mock(AngularObjectRegistryListener.class),
-            mock(RemoteInterpreterProcessListener.class),
-            mock(ApplicationEventListener.class));
+    interpreterSettingManager = new InterpreterSettingManager(conf,
+        mock(AngularObjectRegistryListener.class), mock(RemoteInterpreterProcessListener.class), mock(ApplicationEventListener.class));
     factory = new InterpreterFactory(interpreterSettingManager);
 
     search = mock(SearchService.class);
     notebookRepoSync = new NotebookRepoSync(conf);
     notebookAuthorization = NotebookAuthorization.init(conf);
     credentials = new Credentials(conf.credentialsPersist(), conf.getCredentialsPath(), null);
-    notebookSync =
-        new Notebook(
-            conf,
-            notebookRepoSync,
-            schedulerFactory,
-            factory,
-            interpreterSettingManager,
-            this,
-            search,
-            notebookAuthorization,
-            credentials);
+    notebookSync = new Notebook(conf, notebookRepoSync, schedulerFactory, factory, interpreterSettingManager, this, search,
+            notebookAuthorization, credentials);
     anonymous = new AuthenticationInfo("anonymous");
   }
 
@@ -159,9 +143,7 @@ public class NotebookRepoSyncTest implements ParagraphJobListener {
     // check that automatically saved on both storages
     assertEquals(1, notebookRepoSync.list(0, anonymous).size());
     assertEquals(1, notebookRepoSync.list(1, anonymous).size());
-    assertEquals(
-        notebookRepoSync.list(0, anonymous).get(0).getId(),
-        notebookRepoSync.list(1, anonymous).get(0).getId());
+    assertEquals(notebookRepoSync.list(0, anonymous).get(0).getId(),notebookRepoSync.list(1, anonymous).get(0).getId());
 
     notebookSync.removeNote(notebookRepoSync.list(0, null).get(0).getId(), anonymous);
   }
@@ -178,9 +160,7 @@ public class NotebookRepoSyncTest implements ParagraphJobListener {
     /* check that created in both storage systems */
     assertEquals(1, notebookRepoSync.list(0, anonymous).size());
     assertEquals(1, notebookRepoSync.list(1, anonymous).size());
-    assertEquals(
-        notebookRepoSync.list(0, anonymous).get(0).getId(),
-        notebookRepoSync.list(1, anonymous).get(0).getId());
+    assertEquals(notebookRepoSync.list(0, anonymous).get(0).getId(),notebookRepoSync.list(1, anonymous).get(0).getId());
 
     /* remove Note */
     notebookSync.removeNote(notebookRepoSync.list(0, anonymous).get(0).getId(), anonymous);
@@ -188,6 +168,7 @@ public class NotebookRepoSyncTest implements ParagraphJobListener {
     /* check that deleted in both storages */
     assertEquals(0, notebookRepoSync.list(0, anonymous).size());
     assertEquals(0, notebookRepoSync.list(1, anonymous).size());
+
   }
 
   @Test
@@ -205,58 +186,30 @@ public class NotebookRepoSyncTest implements ParagraphJobListener {
     assertEquals(1, note.getParagraphs().size());
 
     /* new paragraph not yet saved into storages */
-    assertEquals(
-        0,
-        notebookRepoSync
-            .get(0, notebookRepoSync.list(0, anonymous).get(0).getId(), anonymous)
-            .getParagraphs()
-            .size());
-    assertEquals(
-        0,
-        notebookRepoSync
-            .get(1, notebookRepoSync.list(1, anonymous).get(0).getId(), anonymous)
-            .getParagraphs()
-            .size());
+    assertEquals(0, notebookRepoSync.get(0,
+        notebookRepoSync.list(0, anonymous).get(0).getId(), anonymous).getParagraphs().size());
+    assertEquals(0, notebookRepoSync.get(1,
+        notebookRepoSync.list(1, anonymous).get(0).getId(), anonymous).getParagraphs().size());
 
     /* save to storage under index 0 (first storage) */
     notebookRepoSync.save(0, note, anonymous);
 
     /* check paragraph saved to first storage */
-    assertEquals(
-        1,
-        notebookRepoSync
-            .get(0, notebookRepoSync.list(0, anonymous).get(0).getId(), anonymous)
-            .getParagraphs()
-            .size());
+    assertEquals(1, notebookRepoSync.get(0,
+        notebookRepoSync.list(0, anonymous).get(0).getId(), anonymous).getParagraphs().size());
     /* check paragraph isn't saved to second storage */
-    assertEquals(
-        0,
-        notebookRepoSync
-            .get(1, notebookRepoSync.list(1, anonymous).get(0).getId(), anonymous)
-            .getParagraphs()
-            .size());
+    assertEquals(0, notebookRepoSync.get(1,
+        notebookRepoSync.list(1, anonymous).get(0).getId(), anonymous).getParagraphs().size());
     /* apply sync */
     notebookRepoSync.sync(null);
     /* check whether added to second storage */
-    assertEquals(
-        1,
-        notebookRepoSync
-            .get(1, notebookRepoSync.list(1, anonymous).get(0).getId(), anonymous)
-            .getParagraphs()
-            .size());
+    assertEquals(1, notebookRepoSync.get(1,
+    notebookRepoSync.list(1, anonymous).get(0).getId(), anonymous).getParagraphs().size());
     /* check whether same paragraph id */
-    assertEquals(
-        p1.getId(),
-        notebookRepoSync
-            .get(0, notebookRepoSync.list(0, anonymous).get(0).getId(), anonymous)
-            .getLastParagraph()
-            .getId());
-    assertEquals(
-        p1.getId(),
-        notebookRepoSync
-            .get(1, notebookRepoSync.list(1, anonymous).get(0).getId(), anonymous)
-            .getLastParagraph()
-            .getId());
+    assertEquals(p1.getId(), notebookRepoSync.get(0,
+        notebookRepoSync.list(0, anonymous).get(0).getId(), anonymous).getLastParagraph().getId());
+    assertEquals(p1.getId(), notebookRepoSync.get(1,
+        notebookRepoSync.list(1, anonymous).get(0).getId(), anonymous).getLastParagraph().getId());
     notebookRepoSync.remove(note.getId(), anonymous);
   }
 
@@ -287,22 +240,12 @@ public class NotebookRepoSyncTest implements ParagraphJobListener {
 
   @Test
   public void testOneWaySyncOnReloadedList() throws IOException, SchedulerException {
-    System.setProperty(
-        ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), mainNotebookDir.getAbsolutePath());
+    System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), mainNotebookDir.getAbsolutePath());
     System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_ONE_WAY_SYNC.getVarName(), "true");
     conf = ZeppelinConfiguration.create();
     notebookRepoSync = new NotebookRepoSync(conf);
-    notebookSync =
-        new Notebook(
-            conf,
-            notebookRepoSync,
-            schedulerFactory,
-            factory,
-            interpreterSettingManager,
-            this,
-            search,
-            notebookAuthorization,
-            credentials);
+    notebookSync = new Notebook(conf, notebookRepoSync, schedulerFactory, factory, interpreterSettingManager, this, search,
+            notebookAuthorization, credentials);
 
     // check that both storage repos are empty
     assertTrue(notebookRepoSync.getRepoCount() > 1);
@@ -345,23 +288,12 @@ public class NotebookRepoSyncTest implements ParagraphJobListener {
 
   @Test
   public void testCheckpointOneStorage() throws IOException, SchedulerException {
-    System.setProperty(
-        ConfVars.ZEPPELIN_NOTEBOOK_STORAGE.getVarName(),
-        "org.apache.zeppelin.notebook.repo.GitNotebookRepo");
+    System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_STORAGE.getVarName(), "org.apache.zeppelin.notebook.repo.GitNotebookRepo");
     ZeppelinConfiguration vConf = ZeppelinConfiguration.create();
 
     NotebookRepoSync vRepoSync = new NotebookRepoSync(vConf);
-    Notebook vNotebookSync =
-        new Notebook(
-            vConf,
-            vRepoSync,
-            schedulerFactory,
-            factory,
-            interpreterSettingManager,
-            this,
-            search,
-            notebookAuthorization,
-            credentials);
+    Notebook vNotebookSync = new Notebook(vConf, vRepoSync, schedulerFactory, factory, interpreterSettingManager, this, search,
+            notebookAuthorization, credentials);
 
     // one git versioned storage initialized
     assertThat(vRepoSync.getRepoCount()).isEqualTo(1);
@@ -422,30 +354,18 @@ public class NotebookRepoSyncTest implements ParagraphJobListener {
     notebookRepoSync.save(1, note, null);
 
     /* check paragraph isn't saved into first storage */
-    assertEquals(
-        0,
-        notebookRepoSync
-            .get(0, notebookRepoSync.list(0, null).get(0).getId(), null)
-            .getParagraphs()
-            .size());
+    assertEquals(0, notebookRepoSync.get(0,
+        notebookRepoSync.list(0, null).get(0).getId(), null).getParagraphs().size());
     /* check paragraph is saved into second storage */
-    assertEquals(
-        1,
-        notebookRepoSync
-            .get(1, notebookRepoSync.list(1, null).get(0).getId(), null)
-            .getParagraphs()
-            .size());
+    assertEquals(1, notebookRepoSync.get(1,
+        notebookRepoSync.list(1, null).get(0).getId(), null).getParagraphs().size());
 
     /* now sync by user1 */
     notebookRepoSync.sync(user1);
 
     /* check that note updated and acl are same on main storage*/
-    assertEquals(
-        1,
-        notebookRepoSync
-            .get(0, notebookRepoSync.list(0, null).get(0).getId(), null)
-            .getParagraphs()
-            .size());
+    assertEquals(1, notebookRepoSync.get(0,
+        notebookRepoSync.list(0, null).get(0).getId(), null).getParagraphs().size());
     assertEquals(true, authInfo.isOwner(note.getId(), entity));
     assertEquals(1, authInfo.getOwners(note.getId()).size());
     assertEquals(0, authInfo.getReaders(note.getId()).size());
@@ -477,31 +397,44 @@ public class NotebookRepoSyncTest implements ParagraphJobListener {
     assertEquals(true, authInfo.isWriter(note.getId(), entity));
   }
 
-  static void delete(File file) {
-    if (file.isFile()) file.delete();
-    else if (file.isDirectory()) {
-      File[] files = file.listFiles();
-      if (files != null && files.length > 0) {
-        for (File f : files) {
-          delete(f);
+  static void delete(File file){
+    if(file.isFile()) file.delete();
+      else if(file.isDirectory()){
+        File [] files = file.listFiles();
+        if(files!=null && files.length>0){
+          for(File f : files){
+            delete(f);
+          }
         }
+        file.delete();
       }
-      file.delete();
-    }
   }
 
+
+
   @Override
-  public void onOutputAppend(Paragraph paragraph, int idx, String output) {}
+  public void onOutputAppend(Paragraph paragraph, int idx, String output) {
+
+  }
 
   @Override
-  public void onOutputUpdate(Paragraph paragraph, int idx, InterpreterResultMessage msg) {}
+  public void onOutputUpdate(Paragraph paragraph, int idx, InterpreterResultMessage msg) {
+
+  }
 
   @Override
-  public void onOutputUpdateAll(Paragraph paragraph, List<InterpreterResultMessage> msgs) {}
+  public void onOutputUpdateAll(Paragraph paragraph, List<InterpreterResultMessage> msgs) {
+
+  }
 
   @Override
-  public void onProgressUpdate(Paragraph paragraph, int progress) {}
+  public void onProgressUpdate(Paragraph paragraph, int progress) {
+  }
 
   @Override
-  public void onStatusChange(Paragraph paragraph, Status before, Status after) {}
+  public void onStatusChange(Paragraph paragraph, Status before, Status after) {
+
+  }
+
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/mock/VFSNotebookRepoMock.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/mock/VFSNotebookRepoMock.java b/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/mock/VFSNotebookRepoMock.java
index 4d8bf52..7f450df 100644
--- a/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/mock/VFSNotebookRepoMock.java
+++ b/zeppelin-plugins/notebookrepo/git/src/test/java/org/apache/zeppelin/notebook/repo/mock/VFSNotebookRepoMock.java
@@ -16,11 +16,12 @@
  */
 package org.apache.zeppelin.notebook.repo.mock;
 
-import java.io.IOException;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars;
 import org.apache.zeppelin.notebook.repo.VFSNotebookRepo;
 
+import java.io.IOException;
+
 public class VFSNotebookRepoMock extends VFSNotebookRepo {
 
   public VFSNotebookRepoMock() {
@@ -31,4 +32,5 @@ public class VFSNotebookRepoMock extends VFSNotebookRepo {
   public void init(ZeppelinConfiguration conf) throws IOException {
     super.init(conf);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/github/src/main/java/org/apache/zeppelin/notebook/repo/GitHubNotebookRepo.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/github/src/main/java/org/apache/zeppelin/notebook/repo/GitHubNotebookRepo.java b/zeppelin-plugins/notebookrepo/github/src/main/java/org/apache/zeppelin/notebook/repo/GitHubNotebookRepo.java
index 19da9d5..7d0415b 100644
--- a/zeppelin-plugins/notebookrepo/github/src/main/java/org/apache/zeppelin/notebook/repo/GitHubNotebookRepo.java
+++ b/zeppelin-plugins/notebookrepo/github/src/main/java/org/apache/zeppelin/notebook/repo/GitHubNotebookRepo.java
@@ -17,8 +17,6 @@
 
 package org.apache.zeppelin.notebook.repo;
 
-import java.io.IOException;
-import java.net.URISyntaxException;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.user.AuthenticationInfo;
 import org.eclipse.jgit.api.Git;
@@ -31,18 +29,22 @@ import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.net.URISyntaxException;
+
 /**
- * GitHub integration to store notebooks in a GitHub repository. It uses the same simple logic
- * implemented in @see {@link org.apache.zeppelin.notebook.repo.GitNotebookRepo}
+ * GitHub integration to store notebooks in a GitHub repository.
+ * It uses the same simple logic implemented in @see
+ * {@link org.apache.zeppelin.notebook.repo.GitNotebookRepo}
  *
- * <p>The logic for updating the local repository from the remote repository is the following: -
- * When the <code>GitHubNotebookRepo</code> is initialized - When pushing the changes to the remote
- * repository
+ * The logic for updating the local repository from the remote repository is the following:
+ * - When the <code>GitHubNotebookRepo</code> is initialized
+ * - When pushing the changes to the remote repository
  *
- * <p>The logic for updating the remote repository on GitHub from local repository is the following:
+ * The logic for updating the remote repository on GitHub from local repository is the following:
  * - When commit the changes (saving the notebook)
  *
- * <p>You should be able to use this integration with all remote git repositories that accept
+ * You should be able to use this integration with all remote git repositories that accept
  * username + password authentication, not just GitHub.
  */
 public class GitHubNotebookRepo extends GitNotebookRepo {
@@ -96,9 +98,11 @@ public class GitHubNotebookRepo extends GitNotebookRepo {
       LOG.debug("Pulling latest changes from remote stream");
       PullCommand pullCommand = git.pull();
       pullCommand.setCredentialsProvider(
-          new UsernamePasswordCredentialsProvider(
-              zeppelinConfiguration.getZeppelinNotebookGitUsername(),
-              zeppelinConfiguration.getZeppelinNotebookGitAccessToken()));
+        new UsernamePasswordCredentialsProvider(
+          zeppelinConfiguration.getZeppelinNotebookGitUsername(),
+          zeppelinConfiguration.getZeppelinNotebookGitAccessToken()
+        )
+      );
 
       pullCommand.call();
 
@@ -112,9 +116,11 @@ public class GitHubNotebookRepo extends GitNotebookRepo {
       LOG.debug("Pushing latest changes to remote stream");
       PushCommand pushCommand = git.push();
       pushCommand.setCredentialsProvider(
-          new UsernamePasswordCredentialsProvider(
-              zeppelinConfiguration.getZeppelinNotebookGitUsername(),
-              zeppelinConfiguration.getZeppelinNotebookGitAccessToken()));
+        new UsernamePasswordCredentialsProvider(
+          zeppelinConfiguration.getZeppelinNotebookGitUsername(),
+          zeppelinConfiguration.getZeppelinNotebookGitAccessToken()
+        )
+      );
 
       pushCommand.call();
     } catch (GitAPIException e) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/github/src/test/java/org/apache/zeppelin/notebook/repo/GitHubNotebookRepoTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/github/src/test/java/org/apache/zeppelin/notebook/repo/GitHubNotebookRepoTest.java b/zeppelin-plugins/notebookrepo/github/src/test/java/org/apache/zeppelin/notebook/repo/GitHubNotebookRepoTest.java
index de59e94..e331714 100644
--- a/zeppelin-plugins/notebookrepo/github/src/test/java/org/apache/zeppelin/notebook/repo/GitHubNotebookRepoTest.java
+++ b/zeppelin-plugins/notebookrepo/github/src/test/java/org/apache/zeppelin/notebook/repo/GitHubNotebookRepoTest.java
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -17,12 +18,8 @@
 
 package org.apache.zeppelin.notebook.repo;
 
-import static org.mockito.Mockito.mock;
 
 import com.google.common.base.Joiner;
-import java.io.File;
-import java.io.IOException;
-import java.util.Iterator;
 import org.apache.commons.io.FileUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.interpreter.InterpreterFactory;
@@ -40,11 +37,17 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.Iterator;
+
+import static org.mockito.Mockito.mock;
+
 /**
- * This tests the remote Git tracking for notebooks. The tests uses two local Git repositories
- * created locally to handle the tracking of Git actions (pushes and pulls). The repositories are:
- * 1. The first repository is considered as a remote that mimics a remote GitHub directory 2. The
- * second repository is considered as the local notebook repository
+ * This tests the remote Git tracking for notebooks. The tests uses two local Git repositories created locally
+ * to handle the tracking of Git actions (pushes and pulls). The repositories are:
+ * 1. The first repository is considered as a remote that mimics a remote GitHub directory
+ * 2. The second repository is considered as the local notebook repository
  */
 public class GitHubNotebookRepoTest {
   private static final Logger LOG = LoggerFactory.getLogger(GitHubNotebookRepoTest.class);
@@ -64,10 +67,10 @@ public class GitHubNotebookRepoTest {
   public void setUp() throws Exception {
     conf = ZeppelinConfiguration.create();
 
-    String remoteRepositoryPath =
-        System.getProperty("java.io.tmpdir") + "/ZeppelinTestRemote_" + System.currentTimeMillis();
-    String localRepositoryPath =
-        System.getProperty("java.io.tmpdir") + "/ZeppelinTest_" + System.currentTimeMillis();
+    String remoteRepositoryPath = System.getProperty("java.io.tmpdir") + "/ZeppelinTestRemote_" +
+            System.currentTimeMillis();
+    String localRepositoryPath = System.getProperty("java.io.tmpdir") + "/ZeppelinTest_" +
+            System.currentTimeMillis();
 
     // Create a fake remote notebook Git repository locally in another directory
     remoteZeppelinDir = new File(remoteRepositoryPath);
@@ -84,46 +87,37 @@ public class GitHubNotebookRepoTest {
     File notebookDir = new File(localNotebooksDir);
     notebookDir.mkdirs();
 
-    // Copy the test notebook directory from the test/resources/2A94M5J1Z folder to the fake remote
-    // Git directory
+    // Copy the test notebook directory from the test/resources/2A94M5J1Z folder to the fake remote Git directory
     String remoteTestNoteDir = Joiner.on(File.separator).join(remoteNotebooksDir, TEST_NOTE_ID);
     FileUtils.copyDirectory(
-        new File(
-            GitHubNotebookRepoTest.class
-                .getResource(Joiner.on(File.separator).join("", TEST_NOTE_ID))
-                .getFile()),
-        new File(remoteTestNoteDir));
+            new File(
+              GitHubNotebookRepoTest.class.getResource(
+                Joiner.on(File.separator).join("", TEST_NOTE_ID)
+              ).getFile()
+            ), new File(remoteTestNoteDir)
+    );
 
     // Create the fake remote Git repository
-    Repository remoteRepository =
-        new FileRepository(Joiner.on(File.separator).join(remoteNotebooksDir, ".git"));
+    Repository remoteRepository = new FileRepository(Joiner.on(File.separator).join(remoteNotebooksDir, ".git"));
     remoteRepository.create();
 
     remoteGit = new Git(remoteRepository);
     remoteGit.add().addFilepattern(".").call();
-    firstCommitRevision =
-        remoteGit.commit().setMessage("First commit from remote repository").call();
+    firstCommitRevision = remoteGit.commit().setMessage("First commit from remote repository").call();
 
     // Set the Git and Git configurations
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(),
-        remoteZeppelinDir.getAbsolutePath());
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(),
-        notebookDir.getAbsolutePath());
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(), remoteZeppelinDir.getAbsolutePath());
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), notebookDir.getAbsolutePath());
 
     // Set the GitHub configurations
     System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_STORAGE.getVarName(),
-        "org.apache.zeppelin.notebook.repo.GitHubNotebookRepo");
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_GIT_REMOTE_URL.getVarName(),
-        remoteNotebooksDir + File.separator + ".git");
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_GIT_REMOTE_USERNAME.getVarName(), "token");
-    System.setProperty(
-        ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_GIT_REMOTE_ACCESS_TOKEN.getVarName(),
-        "access-token");
+            ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_STORAGE.getVarName(),
+            "org.apache.zeppelin.notebook.repo.GitHubNotebookRepo");
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_GIT_REMOTE_URL.getVarName(),
+            remoteNotebooksDir + File.separator + ".git");
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_GIT_REMOTE_USERNAME.getVarName(), "token");
+    System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_GIT_REMOTE_ACCESS_TOKEN.getVarName(),
+            "access-token");
 
     // Create the Notebook repository (configured for the local repository)
     gitHubNotebookRepo = new GitHubNotebookRepo();
@@ -133,9 +127,9 @@ public class GitHubNotebookRepoTest {
   @After
   public void tearDown() throws Exception {
     // Cleanup the temporary folders uses as Git repositories
-    File[] temporaryFolders = {remoteZeppelinDir, localZeppelinDir};
+    File[] temporaryFolders = { remoteZeppelinDir, localZeppelinDir };
 
-    for (File temporaryFolder : temporaryFolders) {
+    for(File temporaryFolder : temporaryFolders) {
       if (!FileUtils.deleteQuietly(temporaryFolder))
         LOG.error("Failed to delete {} ", temporaryFolder.getName());
     }
@@ -143,75 +137,66 @@ public class GitHubNotebookRepoTest {
 
   @Test
   /**
-   * Test the case when the Notebook repository is created, it pulls the latest changes from the
-   * remote repository
+   * Test the case when the Notebook repository is created, it pulls the latest changes from the remote repository
    */
-  public void pullChangesFromRemoteRepositoryOnLoadingNotebook()
-      throws IOException, GitAPIException {
-    NotebookRepoWithVersionControl.Revision firstHistoryRevision =
-        gitHubNotebookRepo.revisionHistory(TEST_NOTE_ID, null).get(0);
+  public void pullChangesFromRemoteRepositoryOnLoadingNotebook() throws IOException, GitAPIException {
+    NotebookRepoWithVersionControl.Revision firstHistoryRevision = gitHubNotebookRepo.revisionHistory(TEST_NOTE_ID, null).get(0);
 
-    assert (this.firstCommitRevision.getName().equals(firstHistoryRevision.id));
+    assert(this.firstCommitRevision.getName().equals(firstHistoryRevision.id));
   }
 
   @Test
   /**
-   * Test the case when the check-pointing (add new files and commit) it also pulls the latest
-   * changes from the remote repository
+   * Test the case when the check-pointing (add new files and commit) it also pulls the latest changes from the
+   * remote repository
    */
   public void pullChangesFromRemoteRepositoryOnCheckpointing() throws GitAPIException, IOException {
     // Create a new commit in the remote repository
-    RevCommit secondCommitRevision =
-        remoteGit.commit().setMessage("Second commit from remote repository").call();
+    RevCommit secondCommitRevision = remoteGit.commit().setMessage("Second commit from remote repository").call();
 
     // Add a new paragraph to the local repository
     addParagraphToNotebook(TEST_NOTE_ID);
 
     // Commit and push the changes to remote repository
-    NotebookRepoWithVersionControl.Revision thirdCommitRevision =
-        gitHubNotebookRepo.checkpoint(TEST_NOTE_ID, "Third commit from local repository", null);
+    NotebookRepoWithVersionControl.Revision thirdCommitRevision = gitHubNotebookRepo.checkpoint(
+            TEST_NOTE_ID, "Third commit from local repository", null);
 
-    // Check all the commits as seen from the local repository. The commits are ordered
-    // chronologically. The last
+    // Check all the commits as seen from the local repository. The commits are ordered chronologically. The last
     // commit is the first in the commit logs.
     Iterator<RevCommit> revisions = gitHubNotebookRepo.getGit().log().all().call().iterator();
 
     revisions.next(); // The Merge `master` commit after pushing to the remote repository
 
-    assert (thirdCommitRevision.id.equals(
-        revisions.next().getName())); // The local commit after adding the paragraph
+    assert(thirdCommitRevision.id.equals(revisions.next().getName())); // The local commit after adding the paragraph
 
     // The second commit done on the remote repository
-    assert (secondCommitRevision.getName().equals(revisions.next().getName()));
+    assert(secondCommitRevision.getName().equals(revisions.next().getName()));
 
     // The first commit done on the remote repository
-    assert (firstCommitRevision.getName().equals(revisions.next().getName()));
+    assert(firstCommitRevision.getName().equals(revisions.next().getName()));
   }
 
   @Test
   /**
-   * Test the case when the check-pointing (add new files and commit) it pushes the local commits to
-   * the remote repository
+   * Test the case when the check-pointing (add new files and commit) it pushes the local commits to the remote
+   * repository
    */
-  public void pushLocalChangesToRemoteRepositoryOnCheckpointing()
-      throws IOException, GitAPIException {
+  public void pushLocalChangesToRemoteRepositoryOnCheckpointing() throws IOException, GitAPIException {
     // Add a new paragraph to the local repository
     addParagraphToNotebook(TEST_NOTE_ID);
 
     // Commit and push the changes to remote repository
-    NotebookRepoWithVersionControl.Revision secondCommitRevision =
-        gitHubNotebookRepo.checkpoint(TEST_NOTE_ID, "Second commit from local repository", null);
+    NotebookRepoWithVersionControl.Revision secondCommitRevision = gitHubNotebookRepo.checkpoint(
+            TEST_NOTE_ID, "Second commit from local repository", null);
 
-    // Check all the commits as seen from the remote repository. The commits are ordered
-    // chronologically. The last
+    // Check all the commits as seen from the remote repository. The commits are ordered chronologically. The last
     // commit is the first in the commit logs.
     Iterator<RevCommit> revisions = remoteGit.log().all().call().iterator();
 
-    assert (secondCommitRevision.id.equals(
-        revisions.next().getName())); // The local commit after adding the paragraph
+    assert(secondCommitRevision.id.equals(revisions.next().getName())); // The local commit after adding the paragraph
 
     // The first commit done on the remote repository
-    assert (firstCommitRevision.getName().equals(revisions.next().getName()));
+    assert(firstCommitRevision.getName().equals(revisions.next().getName()));
   }
 
   private void addParagraphToNotebook(String noteId) throws IOException {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/mongodb/src/main/java/org/apache/zeppelin/notebook/repo/MongoNotebookRepo.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/mongodb/src/main/java/org/apache/zeppelin/notebook/repo/MongoNotebookRepo.java b/zeppelin-plugins/notebookrepo/mongodb/src/main/java/org/apache/zeppelin/notebook/repo/MongoNotebookRepo.java
index 0bc85fd..618568d 100644
--- a/zeppelin-plugins/notebookrepo/mongodb/src/main/java/org/apache/zeppelin/notebook/repo/MongoNotebookRepo.java
+++ b/zeppelin-plugins/notebookrepo/mongodb/src/main/java/org/apache/zeppelin/notebook/repo/MongoNotebookRepo.java
@@ -30,7 +30,9 @@ import org.bson.types.ObjectId;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Backend for storing Notebook on MongoDB */
+/**
+ * Backend for storing Notebook on MongoDB
+ */
 public class MongoNotebookRepo implements NotebookRepo {
   private static final Logger LOG = LoggerFactory.getLogger(MongoNotebookRepo.class);
 
@@ -39,7 +41,9 @@ public class MongoNotebookRepo implements NotebookRepo {
   private MongoDatabase db;
   private MongoCollection<Document> coll;
 
-  public MongoNotebookRepo() {}
+  public MongoNotebookRepo() {
+
+  }
 
   public void init(ZeppelinConfiguration conf) throws IOException {
     this.conf = conf;
@@ -55,14 +59,15 @@ public class MongoNotebookRepo implements NotebookRepo {
   }
 
   /**
-   * If environment variable ZEPPELIN_NOTEBOOK_MONGO_AUTOIMPORT is true, this method will insert
-   * local notes into MongoDB on startup. If a note already exists in MongoDB, skip it.
+   * If environment variable ZEPPELIN_NOTEBOOK_MONGO_AUTOIMPORT is true,
+   * this method will insert local notes into MongoDB on startup.
+   * If a note already exists in MongoDB, skip it.
    */
   private void insertFileSystemNotes() throws IOException {
     LinkedList<Document> docs = new LinkedList<>(); // docs to be imported
     NotebookRepo vfsRepo = new VFSNotebookRepo();
     vfsRepo.init(conf);
-    List<NoteInfo> infos = vfsRepo.list(null);
+    List<NoteInfo> infos =  vfsRepo.list(null);
     // collect notes to be imported
     for (NoteInfo info : infos) {
       Note note = vfsRepo.get(info.getId(), null);
@@ -78,16 +83,15 @@ public class MongoNotebookRepo implements NotebookRepo {
     try {
       coll.insertMany(docs, new InsertManyOptions().ordered(false));
     } catch (MongoBulkWriteException e) {
-      printDuplicatedException(e); // print duplicated document warning log
+      printDuplicatedException(e);  //print duplicated document warning log
     }
 
-    vfsRepo.close(); // it does nothing for now but maybe in the future...
+    vfsRepo.close();  // it does nothing for now but maybe in the future...
   }
 
   /**
-   * MongoBulkWriteException contains error messages that inform which documents were duplicated.
-   * This method catches those ID and print them.
-   *
+   * MongoBulkWriteException contains error messages that inform
+   * which documents were duplicated. This method catches those ID and print them.
    * @param e
    */
   private void printDuplicatedException(MongoBulkWriteException e) {
@@ -123,17 +127,19 @@ public class MongoNotebookRepo implements NotebookRepo {
   }
 
   /**
-   * Find documents of which type of _id is object ID, and change it to note ID. Since updating _id
-   * field is not allowed, remove original documents and insert new ones with string _id(note ID)
+   * Find documents of which type of _id is object ID, and change it to note ID.
+   * Since updating _id field is not allowed, remove original documents and insert
+   * new ones with string _id(note ID)
    */
   private void syncId() {
     // find documents whose id type is object id
-    MongoCursor<Document> cursor = coll.find(type("_id", BsonType.OBJECT_ID)).iterator();
+    MongoCursor<Document> cursor =  coll.find(type("_id", BsonType.OBJECT_ID)).iterator();
     // if there is no such document, exit
-    if (!cursor.hasNext()) return;
+    if (!cursor.hasNext())
+      return;
 
-    List<ObjectId> oldDocIds = new LinkedList<>(); // document ids need to update
-    List<Document> updatedDocs = new LinkedList<>(); // new documents to be inserted
+    List<ObjectId> oldDocIds = new LinkedList<>();    // document ids need to update
+    List<Document> updatedDocs = new LinkedList<>();  // new documents to be inserted
 
     while (cursor.hasNext()) {
       Document doc = cursor.next();
@@ -152,7 +158,9 @@ public class MongoNotebookRepo implements NotebookRepo {
     cursor.close();
   }
 
-  /** Convert document to note */
+  /**
+   * Convert document to note
+   */
   private Note documentToNote(Document doc) {
     // document to JSON
     String json = doc.toJson();
@@ -160,7 +168,9 @@ public class MongoNotebookRepo implements NotebookRepo {
     return Note.fromJson(json);
   }
 
-  /** Convert note to document */
+  /**
+   * Convert note to document
+   */
   private Document noteToDocument(Note note) {
     // note to JSON
     String json = note.toJson();
@@ -208,4 +218,5 @@ public class MongoNotebookRepo implements NotebookRepo {
   public void updateSettings(Map<String, String> settings, AuthenticationInfo subject) {
     LOG.warn("Method not implemented");
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/s3/src/main/java/org/apache/zeppelin/notebook/repo/S3NotebookRepo.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/s3/src/main/java/org/apache/zeppelin/notebook/repo/S3NotebookRepo.java b/zeppelin-plugins/notebookrepo/s3/src/main/java/org/apache/zeppelin/notebook/repo/S3NotebookRepo.java
index 21363d8..364943c 100644
--- a/zeppelin-plugins/notebookrepo/s3/src/main/java/org/apache/zeppelin/notebook/repo/S3NotebookRepo.java
+++ b/zeppelin-plugins/notebookrepo/s3/src/main/java/org/apache/zeppelin/notebook/repo/S3NotebookRepo.java
@@ -17,26 +17,6 @@
 
 package org.apache.zeppelin.notebook.repo;
 
-import com.amazonaws.AmazonClientException;
-import com.amazonaws.ClientConfiguration;
-import com.amazonaws.ClientConfigurationFactory;
-import com.amazonaws.auth.AWSCredentialsProvider;
-import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
-import com.amazonaws.regions.Region;
-import com.amazonaws.regions.Regions;
-import com.amazonaws.services.s3.AmazonS3;
-import com.amazonaws.services.s3.AmazonS3Client;
-import com.amazonaws.services.s3.AmazonS3EncryptionClient;
-import com.amazonaws.services.s3.model.CryptoConfiguration;
-import com.amazonaws.services.s3.model.EncryptionMaterialsProvider;
-import com.amazonaws.services.s3.model.GetObjectRequest;
-import com.amazonaws.services.s3.model.KMSEncryptionMaterialsProvider;
-import com.amazonaws.services.s3.model.ListObjectsRequest;
-import com.amazonaws.services.s3.model.ObjectListing;
-import com.amazonaws.services.s3.model.ObjectMetadata;
-import com.amazonaws.services.s3.model.PutObjectRequest;
-import com.amazonaws.services.s3.model.S3Object;
-import com.amazonaws.services.s3.model.S3ObjectSummary;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
@@ -47,6 +27,7 @@ import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
+
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -54,11 +35,36 @@ import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars;
 import org.apache.zeppelin.notebook.Note;
 import org.apache.zeppelin.notebook.NoteInfo;
+import org.apache.zeppelin.notebook.Paragraph;
+import org.apache.zeppelin.scheduler.Job.Status;
 import org.apache.zeppelin.user.AuthenticationInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Backend for storing Notebooks on S3 */
+import com.amazonaws.AmazonClientException;
+import com.amazonaws.ClientConfiguration;
+import com.amazonaws.ClientConfigurationFactory;
+import com.amazonaws.auth.AWSCredentialsProvider;
+import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
+import com.amazonaws.services.s3.AmazonS3;
+import com.amazonaws.services.s3.AmazonS3Client;
+import com.amazonaws.services.s3.AmazonS3EncryptionClient;
+import com.amazonaws.services.s3.model.CryptoConfiguration;
+import com.amazonaws.services.s3.model.EncryptionMaterialsProvider;
+import com.amazonaws.services.s3.model.GetObjectRequest;
+import com.amazonaws.services.s3.model.KMSEncryptionMaterialsProvider;
+import com.amazonaws.services.s3.model.ListObjectsRequest;
+import com.amazonaws.services.s3.model.ObjectListing;
+import com.amazonaws.services.s3.model.ObjectMetadata;
+import com.amazonaws.services.s3.model.PutObjectRequest;
+import com.amazonaws.regions.Region;
+import com.amazonaws.regions.Regions;
+import com.amazonaws.services.s3.model.S3Object;
+import com.amazonaws.services.s3.model.S3ObjectSummary;
+
+/**
+ * Backend for storing Notebooks on S3
+ */
 public class S3NotebookRepo implements NotebookRepo {
   private static final Logger LOG = LoggerFactory.getLogger(S3NotebookRepo.class);
 
@@ -82,7 +88,9 @@ public class S3NotebookRepo implements NotebookRepo {
   private boolean useServerSideEncryption;
   private ZeppelinConfiguration conf;
 
-  public S3NotebookRepo() {}
+  public S3NotebookRepo() {
+
+  }
 
   public void init(ZeppelinConfiguration conf) throws IOException {
     this.conf = conf;
@@ -100,18 +108,20 @@ public class S3NotebookRepo implements NotebookRepo {
     }
 
     ClientConfiguration cliConf = createClientConfiguration();
-
+    
     // see if we should be encrypting data in S3
     String kmsKeyID = conf.getS3KMSKeyID();
     if (kmsKeyID != null) {
       // use the AWS KMS to encrypt data
       KMSEncryptionMaterialsProvider emp = new KMSEncryptionMaterialsProvider(kmsKeyID);
       this.s3client = new AmazonS3EncryptionClient(credentialsProvider, emp, cliConf, cryptoConf);
-    } else if (conf.getS3EncryptionMaterialsProviderClass() != null) {
+    }
+    else if (conf.getS3EncryptionMaterialsProviderClass() != null) {
       // use a custom encryption materials provider class
       EncryptionMaterialsProvider emp = createCustomProvider(conf);
       this.s3client = new AmazonS3EncryptionClient(credentialsProvider, emp, cliConf, cryptoConf);
-    } else {
+    }
+    else {
       // regular S3
       this.s3client = new AmazonS3Client(credentialsProvider, cliConf);
     }
@@ -121,8 +131,8 @@ public class S3NotebookRepo implements NotebookRepo {
   }
 
   /**
-   * Create an instance of a custom encryption materials provider class which supplies encryption
-   * keys to use when reading/writing data in S3.
+   * Create an instance of a custom encryption materials provider class
+   * which supplies encryption keys to use when reading/writing data in S3.
    */
   private EncryptionMaterialsProvider createCustomProvider(ZeppelinConfiguration conf)
       throws IOException {
@@ -133,17 +143,15 @@ public class S3NotebookRepo implements NotebookRepo {
       Object empInstance = Class.forName(empClassname).newInstance();
       if (empInstance instanceof EncryptionMaterialsProvider) {
         emp = (EncryptionMaterialsProvider) empInstance;
-      } else {
-        throw new IOException(
-            "Class "
-                + empClassname
-                + " does not implement "
+      }
+      else {
+        throw new IOException("Class " + empClassname + " does not implement "
                 + EncryptionMaterialsProvider.class.getName());
       }
-    } catch (Exception e) {
-      throw new IOException(
-          "Unable to instantiate encryption materials provider class " + empClassname + ": " + e,
-          e);
+    }
+    catch (Exception e) {
+      throw new IOException("Unable to instantiate encryption materials provider class "
+              + empClassname + ": " + e, e);
     }
 
     return emp;
@@ -151,7 +159,6 @@ public class S3NotebookRepo implements NotebookRepo {
 
   /**
    * Create AWS client configuration and return it.
-   *
    * @return AWS client configuration
    */
   private ClientConfiguration createClientConfiguration() {
@@ -171,8 +178,9 @@ public class S3NotebookRepo implements NotebookRepo {
     List<NoteInfo> infos = new LinkedList<>();
     NoteInfo info;
     try {
-      ListObjectsRequest listObjectsRequest =
-          new ListObjectsRequest().withBucketName(bucketName).withPrefix(user + "/" + "notebook");
+      ListObjectsRequest listObjectsRequest = new ListObjectsRequest()
+              .withBucketName(bucketName)
+              .withPrefix(user + "/" + "notebook");
       ObjectListing objectListing;
       do {
         objectListing = s3client.listObjects(listObjectsRequest);
@@ -196,7 +204,8 @@ public class S3NotebookRepo implements NotebookRepo {
     S3Object s3object;
     try {
       s3object = s3client.getObject(new GetObjectRequest(bucketName, key));
-    } catch (AmazonClientException ace) {
+    }
+    catch (AmazonClientException ace) {
       throw new IOException("Unable to retrieve object from S3: " + ace, ace);
     }
 
@@ -237,9 +246,11 @@ public class S3NotebookRepo implements NotebookRepo {
       }
 
       s3client.putObject(putRequest);
-    } catch (AmazonClientException ace) {
+    }
+    catch (AmazonClientException ace) {
       throw new IOException("Unable to store note in S3: " + ace, ace);
-    } finally {
+    }
+    finally {
       FileUtils.deleteQuietly(file);
     }
   }
@@ -247,8 +258,8 @@ public class S3NotebookRepo implements NotebookRepo {
   @Override
   public void remove(String noteId, AuthenticationInfo subject) throws IOException {
     String key = user + "/" + "notebook" + "/" + noteId;
-    final ListObjectsRequest listObjectsRequest =
-        new ListObjectsRequest().withBucketName(bucketName).withPrefix(key);
+    final ListObjectsRequest listObjectsRequest = new ListObjectsRequest()
+        .withBucketName(bucketName).withPrefix(key);
 
     try {
       ObjectListing objects = s3client.listObjects(listObjectsRequest);
@@ -258,14 +269,15 @@ public class S3NotebookRepo implements NotebookRepo {
         }
         objects = s3client.listNextBatchOfObjects(objects);
       } while (objects.isTruncated());
-    } catch (AmazonClientException ace) {
+    }
+    catch (AmazonClientException ace) {
       throw new IOException("Unable to remove note in S3: " + ace, ace);
     }
   }
 
   @Override
   public void close() {
-    // no-op
+    //no-op
   }
 
   @Override
@@ -278,4 +290,5 @@ public class S3NotebookRepo implements NotebookRepo {
   public void updateSettings(Map<String, String> settings, AuthenticationInfo subject) {
     LOG.warn("Method not implemented");
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-plugins/notebookrepo/vfs/src/main/java/org/apache/zeppelin/notebook/repo/VFSNotebookRepo.java
----------------------------------------------------------------------
diff --git a/zeppelin-plugins/notebookrepo/vfs/src/main/java/org/apache/zeppelin/notebook/repo/VFSNotebookRepo.java b/zeppelin-plugins/notebookrepo/vfs/src/main/java/org/apache/zeppelin/notebook/repo/VFSNotebookRepo.java
index 8577554..4294b86 100644
--- a/zeppelin-plugins/notebookrepo/vfs/src/main/java/org/apache/zeppelin/notebook/repo/VFSNotebookRepo.java
+++ b/zeppelin-plugins/notebookrepo/vfs/src/main/java/org/apache/zeppelin/notebook/repo/VFSNotebookRepo.java
@@ -17,6 +17,7 @@
 
 package org.apache.zeppelin.notebook.repo;
 
+import com.google.common.collect.Lists;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
@@ -45,7 +46,9 @@ import org.apache.zeppelin.user.AuthenticationInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** */
+/**
+*
+*/
 public class VFSNotebookRepo implements NotebookRepo {
   private static final Logger LOG = LoggerFactory.getLogger(VFSNotebookRepo.class);
 
@@ -53,7 +56,9 @@ public class VFSNotebookRepo implements NotebookRepo {
   private URI filesystemRoot;
   protected ZeppelinConfiguration conf;
 
-  public VFSNotebookRepo() {}
+  public VFSNotebookRepo() {
+
+  }
 
   @Override
   public void init(ZeppelinConfiguration conf) throws IOException {
@@ -157,7 +162,7 @@ public class VFSNotebookRepo implements NotebookRepo {
     if (!noteJson.exists()) {
       throw new IOException(noteJson.getName().toString() + " not found");
     }
-
+    
     FileContent content = noteJson.getContent();
     InputStream ins = content.getInputStream();
     String json = IOUtils.toString(ins, conf.getString(ConfVars.ZEPPELIN_ENCODING));
@@ -237,7 +242,7 @@ public class VFSNotebookRepo implements NotebookRepo {
 
   @Override
   public void close() {
-    // no-op
+    //no-op    
   }
 
   @Override
@@ -268,15 +273,14 @@ public class VFSNotebookRepo implements NotebookRepo {
       LOG.error("Notebook path is invalid");
       return;
     }
-    LOG.warn(
-        "{} will change notebook dir from {} to {}",
-        subject.getUser(),
-        getNotebookDirPath(),
-        newNotebookDirectotyPath);
+    LOG.warn("{} will change notebook dir from {} to {}",
+        subject.getUser(), getNotebookDirPath(), newNotebookDirectotyPath);
     try {
       setNotebookDirectory(newNotebookDirectotyPath);
     } catch (IOException e) {
       LOG.error("Cannot update notebook directory", e);
     }
   }
+
 }
+


[24/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterEventService.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterEventService.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterEventService.java
index 2dbfd01..1290b74 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterEventService.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterEventService.java
@@ -1,45 +1,52 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -49,8 +56,7 @@ public class RemoteInterpreterEventService {
 
   public interface Iface {
 
-    public void registerInterpreterProcess(RegisterInfo registerInfo)
-        throws org.apache.thrift.TException;
+    public void registerInterpreterProcess(RegisterInfo registerInfo) throws org.apache.thrift.TException;
 
     public void appendOutput(OutputAppendEvent event) throws org.apache.thrift.TException;
 
@@ -66,311 +72,286 @@ public class RemoteInterpreterEventService {
 
     public void runParagraphs(RunParagraphsEvent event) throws org.apache.thrift.TException;
 
-    public void addAngularObject(String intpGroupId, String json)
-        throws org.apache.thrift.TException;
+    public void addAngularObject(String intpGroupId, String json) throws org.apache.thrift.TException;
 
-    public void updateAngularObject(String intpGroupId, String json)
-        throws org.apache.thrift.TException;
+    public void updateAngularObject(String intpGroupId, String json) throws org.apache.thrift.TException;
 
-    public void removeAngularObject(
-        String intpGroupId, String noteId, String paragraphId, String name)
-        throws org.apache.thrift.TException;
+    public void removeAngularObject(String intpGroupId, String noteId, String paragraphId, String name) throws org.apache.thrift.TException;
 
-    public void sendParagraphInfo(String intpGroupId, String json)
-        throws org.apache.thrift.TException;
+    public void sendParagraphInfo(String intpGroupId, String json) throws org.apache.thrift.TException;
 
     public List<String> getAllResources(String intpGroupId) throws org.apache.thrift.TException;
 
     public ByteBuffer getResource(String resourceIdJson) throws org.apache.thrift.TException;
 
-    public ByteBuffer invokeMethod(String intpGroupId, String invokeMethodJson)
-        throws org.apache.thrift.TException;
+    public ByteBuffer invokeMethod(String intpGroupId, String invokeMethodJson) throws org.apache.thrift.TException;
+
   }
 
   public interface AsyncIface {
 
-    public void registerInterpreterProcess(
-        RegisterInfo registerInfo, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void appendOutput(
-        OutputAppendEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void updateOutput(
-        OutputUpdateEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void updateAllOutput(
-        OutputUpdateAllEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void appendAppOutput(
-        AppOutputAppendEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void updateAppOutput(
-        AppOutputUpdateEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void updateAppStatus(
-        AppStatusUpdateEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void runParagraphs(
-        RunParagraphsEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void addAngularObject(
-        String intpGroupId, String json, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void updateAngularObject(
-        String intpGroupId, String json, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void removeAngularObject(
-        String intpGroupId,
-        String noteId,
-        String paragraphId,
-        String name,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void sendParagraphInfo(
-        String intpGroupId, String json, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void getAllResources(
-        String intpGroupId, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void getResource(
-        String resourceIdJson, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
-
-    public void invokeMethod(
-        String intpGroupId,
-        String invokeMethodJson,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException;
+    public void registerInterpreterProcess(RegisterInfo registerInfo, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void appendOutput(OutputAppendEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void updateOutput(OutputUpdateEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void updateAllOutput(OutputUpdateAllEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void appendAppOutput(AppOutputAppendEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void updateAppOutput(AppOutputUpdateEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void updateAppStatus(AppStatusUpdateEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void runParagraphs(RunParagraphsEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void addAngularObject(String intpGroupId, String json, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void updateAngularObject(String intpGroupId, String json, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void removeAngularObject(String intpGroupId, String noteId, String paragraphId, String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void sendParagraphInfo(String intpGroupId, String json, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getAllResources(String intpGroupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getResource(String resourceIdJson, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void invokeMethod(String intpGroupId, String invokeMethodJson, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
   }
 
   public static class Client extends org.apache.thrift.TServiceClient implements Iface {
     public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
       public Factory() {}
-
       public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
         return new Client(prot);
       }
-
-      public Client getClient(
-          org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
         return new Client(iprot, oprot);
       }
     }
 
-    public Client(org.apache.thrift.protocol.TProtocol prot) {
+    public Client(org.apache.thrift.protocol.TProtocol prot)
+    {
       super(prot, prot);
     }
 
-    public Client(
-        org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
       super(iprot, oprot);
     }
 
-    public void registerInterpreterProcess(RegisterInfo registerInfo)
-        throws org.apache.thrift.TException {
+    public void registerInterpreterProcess(RegisterInfo registerInfo) throws org.apache.thrift.TException
+    {
       send_registerInterpreterProcess(registerInfo);
       recv_registerInterpreterProcess();
     }
 
-    public void send_registerInterpreterProcess(RegisterInfo registerInfo)
-        throws org.apache.thrift.TException {
+    public void send_registerInterpreterProcess(RegisterInfo registerInfo) throws org.apache.thrift.TException
+    {
       registerInterpreterProcess_args args = new registerInterpreterProcess_args();
       args.setRegisterInfo(registerInfo);
       sendBase("registerInterpreterProcess", args);
     }
 
-    public void recv_registerInterpreterProcess() throws org.apache.thrift.TException {
+    public void recv_registerInterpreterProcess() throws org.apache.thrift.TException
+    {
       registerInterpreterProcess_result result = new registerInterpreterProcess_result();
       receiveBase(result, "registerInterpreterProcess");
       return;
     }
 
-    public void appendOutput(OutputAppendEvent event) throws org.apache.thrift.TException {
+    public void appendOutput(OutputAppendEvent event) throws org.apache.thrift.TException
+    {
       send_appendOutput(event);
       recv_appendOutput();
     }
 
-    public void send_appendOutput(OutputAppendEvent event) throws org.apache.thrift.TException {
+    public void send_appendOutput(OutputAppendEvent event) throws org.apache.thrift.TException
+    {
       appendOutput_args args = new appendOutput_args();
       args.setEvent(event);
       sendBase("appendOutput", args);
     }
 
-    public void recv_appendOutput() throws org.apache.thrift.TException {
+    public void recv_appendOutput() throws org.apache.thrift.TException
+    {
       appendOutput_result result = new appendOutput_result();
       receiveBase(result, "appendOutput");
       return;
     }
 
-    public void updateOutput(OutputUpdateEvent event) throws org.apache.thrift.TException {
+    public void updateOutput(OutputUpdateEvent event) throws org.apache.thrift.TException
+    {
       send_updateOutput(event);
       recv_updateOutput();
     }
 
-    public void send_updateOutput(OutputUpdateEvent event) throws org.apache.thrift.TException {
+    public void send_updateOutput(OutputUpdateEvent event) throws org.apache.thrift.TException
+    {
       updateOutput_args args = new updateOutput_args();
       args.setEvent(event);
       sendBase("updateOutput", args);
     }
 
-    public void recv_updateOutput() throws org.apache.thrift.TException {
+    public void recv_updateOutput() throws org.apache.thrift.TException
+    {
       updateOutput_result result = new updateOutput_result();
       receiveBase(result, "updateOutput");
       return;
     }
 
-    public void updateAllOutput(OutputUpdateAllEvent event) throws org.apache.thrift.TException {
+    public void updateAllOutput(OutputUpdateAllEvent event) throws org.apache.thrift.TException
+    {
       send_updateAllOutput(event);
       recv_updateAllOutput();
     }
 
-    public void send_updateAllOutput(OutputUpdateAllEvent event)
-        throws org.apache.thrift.TException {
+    public void send_updateAllOutput(OutputUpdateAllEvent event) throws org.apache.thrift.TException
+    {
       updateAllOutput_args args = new updateAllOutput_args();
       args.setEvent(event);
       sendBase("updateAllOutput", args);
     }
 
-    public void recv_updateAllOutput() throws org.apache.thrift.TException {
+    public void recv_updateAllOutput() throws org.apache.thrift.TException
+    {
       updateAllOutput_result result = new updateAllOutput_result();
       receiveBase(result, "updateAllOutput");
       return;
     }
 
-    public void appendAppOutput(AppOutputAppendEvent event) throws org.apache.thrift.TException {
+    public void appendAppOutput(AppOutputAppendEvent event) throws org.apache.thrift.TException
+    {
       send_appendAppOutput(event);
       recv_appendAppOutput();
     }
 
-    public void send_appendAppOutput(AppOutputAppendEvent event)
-        throws org.apache.thrift.TException {
+    public void send_appendAppOutput(AppOutputAppendEvent event) throws org.apache.thrift.TException
+    {
       appendAppOutput_args args = new appendAppOutput_args();
       args.setEvent(event);
       sendBase("appendAppOutput", args);
     }
 
-    public void recv_appendAppOutput() throws org.apache.thrift.TException {
+    public void recv_appendAppOutput() throws org.apache.thrift.TException
+    {
       appendAppOutput_result result = new appendAppOutput_result();
       receiveBase(result, "appendAppOutput");
       return;
     }
 
-    public void updateAppOutput(AppOutputUpdateEvent event) throws org.apache.thrift.TException {
+    public void updateAppOutput(AppOutputUpdateEvent event) throws org.apache.thrift.TException
+    {
       send_updateAppOutput(event);
       recv_updateAppOutput();
     }
 
-    public void send_updateAppOutput(AppOutputUpdateEvent event)
-        throws org.apache.thrift.TException {
+    public void send_updateAppOutput(AppOutputUpdateEvent event) throws org.apache.thrift.TException
+    {
       updateAppOutput_args args = new updateAppOutput_args();
       args.setEvent(event);
       sendBase("updateAppOutput", args);
     }
 
-    public void recv_updateAppOutput() throws org.apache.thrift.TException {
+    public void recv_updateAppOutput() throws org.apache.thrift.TException
+    {
       updateAppOutput_result result = new updateAppOutput_result();
       receiveBase(result, "updateAppOutput");
       return;
     }
 
-    public void updateAppStatus(AppStatusUpdateEvent event) throws org.apache.thrift.TException {
+    public void updateAppStatus(AppStatusUpdateEvent event) throws org.apache.thrift.TException
+    {
       send_updateAppStatus(event);
       recv_updateAppStatus();
     }
 
-    public void send_updateAppStatus(AppStatusUpdateEvent event)
-        throws org.apache.thrift.TException {
+    public void send_updateAppStatus(AppStatusUpdateEvent event) throws org.apache.thrift.TException
+    {
       updateAppStatus_args args = new updateAppStatus_args();
       args.setEvent(event);
       sendBase("updateAppStatus", args);
     }
 
-    public void recv_updateAppStatus() throws org.apache.thrift.TException {
+    public void recv_updateAppStatus() throws org.apache.thrift.TException
+    {
       updateAppStatus_result result = new updateAppStatus_result();
       receiveBase(result, "updateAppStatus");
       return;
     }
 
-    public void runParagraphs(RunParagraphsEvent event) throws org.apache.thrift.TException {
+    public void runParagraphs(RunParagraphsEvent event) throws org.apache.thrift.TException
+    {
       send_runParagraphs(event);
       recv_runParagraphs();
     }
 
-    public void send_runParagraphs(RunParagraphsEvent event) throws org.apache.thrift.TException {
+    public void send_runParagraphs(RunParagraphsEvent event) throws org.apache.thrift.TException
+    {
       runParagraphs_args args = new runParagraphs_args();
       args.setEvent(event);
       sendBase("runParagraphs", args);
     }
 
-    public void recv_runParagraphs() throws org.apache.thrift.TException {
+    public void recv_runParagraphs() throws org.apache.thrift.TException
+    {
       runParagraphs_result result = new runParagraphs_result();
       receiveBase(result, "runParagraphs");
       return;
     }
 
-    public void addAngularObject(String intpGroupId, String json)
-        throws org.apache.thrift.TException {
+    public void addAngularObject(String intpGroupId, String json) throws org.apache.thrift.TException
+    {
       send_addAngularObject(intpGroupId, json);
       recv_addAngularObject();
     }
 
-    public void send_addAngularObject(String intpGroupId, String json)
-        throws org.apache.thrift.TException {
+    public void send_addAngularObject(String intpGroupId, String json) throws org.apache.thrift.TException
+    {
       addAngularObject_args args = new addAngularObject_args();
       args.setIntpGroupId(intpGroupId);
       args.setJson(json);
       sendBase("addAngularObject", args);
     }
 
-    public void recv_addAngularObject() throws org.apache.thrift.TException {
+    public void recv_addAngularObject() throws org.apache.thrift.TException
+    {
       addAngularObject_result result = new addAngularObject_result();
       receiveBase(result, "addAngularObject");
       return;
     }
 
-    public void updateAngularObject(String intpGroupId, String json)
-        throws org.apache.thrift.TException {
+    public void updateAngularObject(String intpGroupId, String json) throws org.apache.thrift.TException
+    {
       send_updateAngularObject(intpGroupId, json);
       recv_updateAngularObject();
     }
 
-    public void send_updateAngularObject(String intpGroupId, String json)
-        throws org.apache.thrift.TException {
+    public void send_updateAngularObject(String intpGroupId, String json) throws org.apache.thrift.TException
+    {
       updateAngularObject_args args = new updateAngularObject_args();
       args.setIntpGroupId(intpGroupId);
       args.setJson(json);
       sendBase("updateAngularObject", args);
     }
 
-    public void recv_updateAngularObject() throws org.apache.thrift.TException {
+    public void recv_updateAngularObject() throws org.apache.thrift.TException
+    {
       updateAngularObject_result result = new updateAngularObject_result();
       receiveBase(result, "updateAngularObject");
       return;
     }
 
-    public void removeAngularObject(
-        String intpGroupId, String noteId, String paragraphId, String name)
-        throws org.apache.thrift.TException {
+    public void removeAngularObject(String intpGroupId, String noteId, String paragraphId, String name) throws org.apache.thrift.TException
+    {
       send_removeAngularObject(intpGroupId, noteId, paragraphId, name);
       recv_removeAngularObject();
     }
 
-    public void send_removeAngularObject(
-        String intpGroupId, String noteId, String paragraphId, String name)
-        throws org.apache.thrift.TException {
+    public void send_removeAngularObject(String intpGroupId, String noteId, String paragraphId, String name) throws org.apache.thrift.TException
+    {
       removeAngularObject_args args = new removeAngularObject_args();
       args.setIntpGroupId(intpGroupId);
       args.setNoteId(noteId);
@@ -379,160 +360,138 @@ public class RemoteInterpreterEventService {
       sendBase("removeAngularObject", args);
     }
 
-    public void recv_removeAngularObject() throws org.apache.thrift.TException {
+    public void recv_removeAngularObject() throws org.apache.thrift.TException
+    {
       removeAngularObject_result result = new removeAngularObject_result();
       receiveBase(result, "removeAngularObject");
       return;
     }
 
-    public void sendParagraphInfo(String intpGroupId, String json)
-        throws org.apache.thrift.TException {
+    public void sendParagraphInfo(String intpGroupId, String json) throws org.apache.thrift.TException
+    {
       send_sendParagraphInfo(intpGroupId, json);
       recv_sendParagraphInfo();
     }
 
-    public void send_sendParagraphInfo(String intpGroupId, String json)
-        throws org.apache.thrift.TException {
+    public void send_sendParagraphInfo(String intpGroupId, String json) throws org.apache.thrift.TException
+    {
       sendParagraphInfo_args args = new sendParagraphInfo_args();
       args.setIntpGroupId(intpGroupId);
       args.setJson(json);
       sendBase("sendParagraphInfo", args);
     }
 
-    public void recv_sendParagraphInfo() throws org.apache.thrift.TException {
+    public void recv_sendParagraphInfo() throws org.apache.thrift.TException
+    {
       sendParagraphInfo_result result = new sendParagraphInfo_result();
       receiveBase(result, "sendParagraphInfo");
       return;
     }
 
-    public List<String> getAllResources(String intpGroupId) throws org.apache.thrift.TException {
+    public List<String> getAllResources(String intpGroupId) throws org.apache.thrift.TException
+    {
       send_getAllResources(intpGroupId);
       return recv_getAllResources();
     }
 
-    public void send_getAllResources(String intpGroupId) throws org.apache.thrift.TException {
+    public void send_getAllResources(String intpGroupId) throws org.apache.thrift.TException
+    {
       getAllResources_args args = new getAllResources_args();
       args.setIntpGroupId(intpGroupId);
       sendBase("getAllResources", args);
     }
 
-    public List<String> recv_getAllResources() throws org.apache.thrift.TException {
+    public List<String> recv_getAllResources() throws org.apache.thrift.TException
+    {
       getAllResources_result result = new getAllResources_result();
       receiveBase(result, "getAllResources");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(
-          org.apache.thrift.TApplicationException.MISSING_RESULT,
-          "getAllResources failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllResources failed: unknown result");
     }
 
-    public ByteBuffer getResource(String resourceIdJson) throws org.apache.thrift.TException {
+    public ByteBuffer getResource(String resourceIdJson) throws org.apache.thrift.TException
+    {
       send_getResource(resourceIdJson);
       return recv_getResource();
     }
 
-    public void send_getResource(String resourceIdJson) throws org.apache.thrift.TException {
+    public void send_getResource(String resourceIdJson) throws org.apache.thrift.TException
+    {
       getResource_args args = new getResource_args();
       args.setResourceIdJson(resourceIdJson);
       sendBase("getResource", args);
     }
 
-    public ByteBuffer recv_getResource() throws org.apache.thrift.TException {
+    public ByteBuffer recv_getResource() throws org.apache.thrift.TException
+    {
       getResource_result result = new getResource_result();
       receiveBase(result, "getResource");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(
-          org.apache.thrift.TApplicationException.MISSING_RESULT,
-          "getResource failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getResource failed: unknown result");
     }
 
-    public ByteBuffer invokeMethod(String intpGroupId, String invokeMethodJson)
-        throws org.apache.thrift.TException {
+    public ByteBuffer invokeMethod(String intpGroupId, String invokeMethodJson) throws org.apache.thrift.TException
+    {
       send_invokeMethod(intpGroupId, invokeMethodJson);
       return recv_invokeMethod();
     }
 
-    public void send_invokeMethod(String intpGroupId, String invokeMethodJson)
-        throws org.apache.thrift.TException {
+    public void send_invokeMethod(String intpGroupId, String invokeMethodJson) throws org.apache.thrift.TException
+    {
       invokeMethod_args args = new invokeMethod_args();
       args.setIntpGroupId(intpGroupId);
       args.setInvokeMethodJson(invokeMethodJson);
       sendBase("invokeMethod", args);
     }
 
-    public ByteBuffer recv_invokeMethod() throws org.apache.thrift.TException {
+    public ByteBuffer recv_invokeMethod() throws org.apache.thrift.TException
+    {
       invokeMethod_result result = new invokeMethod_result();
       receiveBase(result, "invokeMethod");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(
-          org.apache.thrift.TApplicationException.MISSING_RESULT,
-          "invokeMethod failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "invokeMethod failed: unknown result");
     }
-  }
 
-  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient
-      implements AsyncIface {
-    public static class Factory
-        implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
+  }
+  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
+    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
       private org.apache.thrift.async.TAsyncClientManager clientManager;
       private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
-
-      public Factory(
-          org.apache.thrift.async.TAsyncClientManager clientManager,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
         this.clientManager = clientManager;
         this.protocolFactory = protocolFactory;
       }
-
-      public AsyncClient getAsyncClient(
-          org.apache.thrift.transport.TNonblockingTransport transport) {
+      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
         return new AsyncClient(protocolFactory, clientManager, transport);
       }
     }
 
-    public AsyncClient(
-        org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-        org.apache.thrift.async.TAsyncClientManager clientManager,
-        org.apache.thrift.transport.TNonblockingTransport transport) {
+    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
       super(protocolFactory, clientManager, transport);
     }
 
-    public void registerInterpreterProcess(
-        RegisterInfo registerInfo, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void registerInterpreterProcess(RegisterInfo registerInfo, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      registerInterpreterProcess_call method_call =
-          new registerInterpreterProcess_call(
-              registerInfo, resultHandler, this, ___protocolFactory, ___transport);
+      registerInterpreterProcess_call method_call = new registerInterpreterProcess_call(registerInfo, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class registerInterpreterProcess_call
-        extends org.apache.thrift.async.TAsyncMethodCall {
+    public static class registerInterpreterProcess_call extends org.apache.thrift.async.TAsyncMethodCall {
       private RegisterInfo registerInfo;
-
-      public registerInterpreterProcess_call(
-          RegisterInfo registerInfo,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public registerInterpreterProcess_call(RegisterInfo registerInfo, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.registerInfo = registerInfo;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "registerInterpreterProcess", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerInterpreterProcess", org.apache.thrift.protocol.TMessageType.CALL, 0));
         registerInterpreterProcess_args args = new registerInterpreterProcess_args();
         args.setRegisterInfo(registerInfo);
         args.write(prot);
@@ -543,43 +502,28 @@ public class RemoteInterpreterEventService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_registerInterpreterProcess();
       }
     }
 
-    public void appendOutput(
-        OutputAppendEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void appendOutput(OutputAppendEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      appendOutput_call method_call =
-          new appendOutput_call(event, resultHandler, this, ___protocolFactory, ___transport);
+      appendOutput_call method_call = new appendOutput_call(event, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class appendOutput_call extends org.apache.thrift.async.TAsyncMethodCall {
       private OutputAppendEvent event;
-
-      public appendOutput_call(
-          OutputAppendEvent event,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public appendOutput_call(OutputAppendEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.event = event;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "appendOutput", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("appendOutput", org.apache.thrift.protocol.TMessageType.CALL, 0));
         appendOutput_args args = new appendOutput_args();
         args.setEvent(event);
         args.write(prot);
@@ -590,43 +534,28 @@ public class RemoteInterpreterEventService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_appendOutput();
       }
     }
 
-    public void updateOutput(
-        OutputUpdateEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void updateOutput(OutputUpdateEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      updateOutput_call method_call =
-          new updateOutput_call(event, resultHandler, this, ___protocolFactory, ___transport);
+      updateOutput_call method_call = new updateOutput_call(event, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class updateOutput_call extends org.apache.thrift.async.TAsyncMethodCall {
       private OutputUpdateEvent event;
-
-      public updateOutput_call(
-          OutputUpdateEvent event,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public updateOutput_call(OutputUpdateEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.event = event;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "updateOutput", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateOutput", org.apache.thrift.protocol.TMessageType.CALL, 0));
         updateOutput_args args = new updateOutput_args();
         args.setEvent(event);
         args.write(prot);
@@ -637,43 +566,28 @@ public class RemoteInterpreterEventService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_updateOutput();
       }
     }
 
-    public void updateAllOutput(
-        OutputUpdateAllEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void updateAllOutput(OutputUpdateAllEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      updateAllOutput_call method_call =
-          new updateAllOutput_call(event, resultHandler, this, ___protocolFactory, ___transport);
+      updateAllOutput_call method_call = new updateAllOutput_call(event, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class updateAllOutput_call extends org.apache.thrift.async.TAsyncMethodCall {
       private OutputUpdateAllEvent event;
-
-      public updateAllOutput_call(
-          OutputUpdateAllEvent event,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public updateAllOutput_call(OutputUpdateAllEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.event = event;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "updateAllOutput", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateAllOutput", org.apache.thrift.protocol.TMessageType.CALL, 0));
         updateAllOutput_args args = new updateAllOutput_args();
         args.setEvent(event);
         args.write(prot);
@@ -684,43 +598,28 @@ public class RemoteInterpreterEventService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_updateAllOutput();
       }
     }
 
-    public void appendAppOutput(
-        AppOutputAppendEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void appendAppOutput(AppOutputAppendEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      appendAppOutput_call method_call =
-          new appendAppOutput_call(event, resultHandler, this, ___protocolFactory, ___transport);
+      appendAppOutput_call method_call = new appendAppOutput_call(event, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class appendAppOutput_call extends org.apache.thrift.async.TAsyncMethodCall {
       private AppOutputAppendEvent event;
-
-      public appendAppOutput_call(
-          AppOutputAppendEvent event,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public appendAppOutput_call(AppOutputAppendEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.event = event;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "appendAppOutput", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("appendAppOutput", org.apache.thrift.protocol.TMessageType.CALL, 0));
         appendAppOutput_args args = new appendAppOutput_args();
         args.setEvent(event);
         args.write(prot);
@@ -731,43 +630,28 @@ public class RemoteInterpreterEventService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_appendAppOutput();
       }
     }
 
-    public void updateAppOutput(
-        AppOutputUpdateEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void updateAppOutput(AppOutputUpdateEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      updateAppOutput_call method_call =
-          new updateAppOutput_call(event, resultHandler, this, ___protocolFactory, ___transport);
+      updateAppOutput_call method_call = new updateAppOutput_call(event, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class updateAppOutput_call extends org.apache.thrift.async.TAsyncMethodCall {
       private AppOutputUpdateEvent event;
-
-      public updateAppOutput_call(
-          AppOutputUpdateEvent event,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public updateAppOutput_call(AppOutputUpdateEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.event = event;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "updateAppOutput", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateAppOutput", org.apache.thrift.protocol.TMessageType.CALL, 0));
         updateAppOutput_args args = new updateAppOutput_args();
         args.setEvent(event);
         args.write(prot);
@@ -778,43 +662,28 @@ public class RemoteInterpreterEventService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_updateAppOutput();
       }
     }
 
-    public void updateAppStatus(
-        AppStatusUpdateEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void updateAppStatus(AppStatusUpdateEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      updateAppStatus_call method_call =
-          new updateAppStatus_call(event, resultHandler, this, ___protocolFactory, ___transport);
+      updateAppStatus_call method_call = new updateAppStatus_call(event, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class updateAppStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
       private AppStatusUpdateEvent event;
-
-      public updateAppStatus_call(
-          AppStatusUpdateEvent event,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public updateAppStatus_call(AppStatusUpdateEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.event = event;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "updateAppStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateAppStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
         updateAppStatus_args args = new updateAppStatus_args();
         args.setEvent(event);
         args.write(prot);
@@ -825,43 +694,28 @@ public class RemoteInterpreterEventService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_updateAppStatus();
       }
     }
 
-    public void runParagraphs(
-        RunParagraphsEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void runParagraphs(RunParagraphsEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      runParagraphs_call method_call =
-          new runParagraphs_call(event, resultHandler, this, ___protocolFactory, ___transport);
+      runParagraphs_call method_call = new runParagraphs_call(event, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class runParagraphs_call extends org.apache.thrift.async.TAsyncMethodCall {
       private RunParagraphsEvent event;
-
-      public runParagraphs_call(
-          RunParagraphsEvent event,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public runParagraphs_call(RunParagraphsEvent event, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.event = event;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "runParagraphs", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("runParagraphs", org.apache.thrift.protocol.TMessageType.CALL, 0));
         runParagraphs_args args = new runParagraphs_args();
         args.setEvent(event);
         args.write(prot);
@@ -872,21 +726,15 @@ public class RemoteInterpreterEventService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_runParagraphs();
       }
     }
 
-    public void addAngularObject(
-        String intpGroupId, String json, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void addAngularObject(String intpGroupId, String json, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      addAngularObject_call method_call =
-          new addAngularObject_call(
-              intpGroupId, json, resultHandler, this, ___protocolFactory, ___transport);
+      addAngularObject_call method_call = new addAngularObject_call(intpGroupId, json, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -894,25 +742,14 @@ public class RemoteInterpreterEventService {
     public static class addAngularObject_call extends org.apache.thrift.async.TAsyncMethodCall {
       private String intpGroupId;
       private String json;
-
-      public addAngularObject_call(
-          String intpGroupId,
-          String json,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public addAngularObject_call(String intpGroupId, String json, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.intpGroupId = intpGroupId;
         this.json = json;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "addAngularObject", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addAngularObject", org.apache.thrift.protocol.TMessageType.CALL, 0));
         addAngularObject_args args = new addAngularObject_args();
         args.setIntpGroupId(intpGroupId);
         args.setJson(json);
@@ -924,21 +761,15 @@ public class RemoteInterpreterEventService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_addAngularObject();
       }
     }
 
-    public void updateAngularObject(
-        String intpGroupId, String json, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void updateAngularObject(String intpGroupId, String json, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      updateAngularObject_call method_call =
-          new updateAngularObject_call(
-              intpGroupId, json, resultHandler, this, ___protocolFactory, ___transport);
+      updateAngularObject_call method_call = new updateAngularObject_call(intpGroupId, json, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -946,25 +777,14 @@ public class RemoteInterpreterEventService {
     public static class updateAngularObject_call extends org.apache.thrift.async.TAsyncMethodCall {
       private String intpGroupId;
       private String json;
-
-      public updateAngularObject_call(
-          String intpGroupId,
-          String json,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public updateAngularObject_call(String intpGroupId, String json, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.intpGroupId = intpGroupId;
         this.json = json;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "updateAngularObject", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateAngularObject", org.apache.thrift.protocol.TMessageType.CALL, 0));
         updateAngularObject_args args = new updateAngularObject_args();
         args.setIntpGroupId(intpGroupId);
         args.setJson(json);
@@ -976,32 +796,15 @@ public class RemoteInterpreterEventService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_updateAngularObject();
       }
     }
 
-    public void removeAngularObject(
-        String intpGroupId,
-        String noteId,
-        String paragraphId,
-        String name,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void removeAngularObject(String intpGroupId, String noteId, String paragraphId, String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      removeAngularObject_call method_call =
-          new removeAngularObject_call(
-              intpGroupId,
-              noteId,
-              paragraphId,
-              name,
-              resultHandler,
-              this,
-              ___protocolFactory,
-              ___transport);
+      removeAngularObject_call method_call = new removeAngularObject_call(intpGroupId, noteId, paragraphId, name, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -1011,17 +814,7 @@ public class RemoteInterpreterEventService {
       private String noteId;
       private String paragraphId;
       private String name;
-
-      public removeAngularObject_call(
-          String intpGroupId,
-          String noteId,
-          String paragraphId,
-          String name,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public removeAngularObject_call(String intpGroupId, String noteId, String paragraphId, String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.intpGroupId = intpGroupId;
         this.noteId = noteId;
@@ -1029,11 +822,8 @@ public class RemoteInterpreterEventService {
         this.name = name;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "removeAngularObject", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeAngularObject", org.apache.thrift.protocol.TMessageType.CALL, 0));
         removeAngularObject_args args = new removeAngularObject_args();
         args.setIntpGroupId(intpGroupId);
         args.setNoteId(noteId);
@@ -1047,21 +837,15 @@ public class RemoteInterpreterEventService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_removeAngularObject();
       }
     }
 
-    public void sendParagraphInfo(
-        String intpGroupId, String json, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void sendParagraphInfo(String intpGroupId, String json, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      sendParagraphInfo_call method_call =
-          new sendParagraphInfo_call(
-              intpGroupId, json, resultHandler, this, ___protocolFactory, ___transport);
+      sendParagraphInfo_call method_call = new sendParagraphInfo_call(intpGroupId, json, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -1069,25 +853,14 @@ public class RemoteInterpreterEventService {
     public static class sendParagraphInfo_call extends org.apache.thrift.async.TAsyncMethodCall {
       private String intpGroupId;
       private String json;
-
-      public sendParagraphInfo_call(
-          String intpGroupId,
-          String json,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public sendParagraphInfo_call(String intpGroupId, String json, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.intpGroupId = intpGroupId;
         this.json = json;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "sendParagraphInfo", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sendParagraphInfo", org.apache.thrift.protocol.TMessageType.CALL, 0));
         sendParagraphInfo_args args = new sendParagraphInfo_args();
         args.setIntpGroupId(intpGroupId);
         args.setJson(json);
@@ -1099,44 +872,28 @@ public class RemoteInterpreterEventService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         (new Client(prot)).recv_sendParagraphInfo();
       }
     }
 
-    public void getAllResources(
-        String intpGroupId, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void getAllResources(String intpGroupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getAllResources_call method_call =
-          new getAllResources_call(
-              intpGroupId, resultHandler, this, ___protocolFactory, ___transport);
+      getAllResources_call method_call = new getAllResources_call(intpGroupId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class getAllResources_call extends org.apache.thrift.async.TAsyncMethodCall {
       private String intpGroupId;
-
-      public getAllResources_call(
-          String intpGroupId,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public getAllResources_call(String intpGroupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.intpGroupId = intpGroupId;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "getAllResources", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllResources", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getAllResources_args args = new getAllResources_args();
         args.setIntpGroupId(intpGroupId);
         args.write(prot);
@@ -1147,44 +904,28 @@ public class RemoteInterpreterEventService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         return (new Client(prot)).recv_getAllResources();
       }
     }
 
-    public void getResource(
-        String resourceIdJson, org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void getResource(String resourceIdJson, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getResource_call method_call =
-          new getResource_call(
-              resourceIdJson, resultHandler, this, ___protocolFactory, ___transport);
+      getResource_call method_call = new getResource_call(resourceIdJson, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class getResource_call extends org.apache.thrift.async.TAsyncMethodCall {
       private String resourceIdJson;
-
-      public getResource_call(
-          String resourceIdJson,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public getResource_call(String resourceIdJson, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.resourceIdJson = resourceIdJson;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "getResource", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getResource", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getResource_args args = new getResource_args();
         args.setResourceIdJson(resourceIdJson);
         args.write(prot);
@@ -1195,23 +936,15 @@ public class RemoteInterpreterEventService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         return (new Client(prot)).recv_getResource();
       }
     }
 
-    public void invokeMethod(
-        String intpGroupId,
-        String invokeMethodJson,
-        org.apache.thrift.async.AsyncMethodCallback resultHandler)
-        throws org.apache.thrift.TException {
+    public void invokeMethod(String intpGroupId, String invokeMethodJson, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      invokeMethod_call method_call =
-          new invokeMethod_call(
-              intpGroupId, invokeMethodJson, resultHandler, this, ___protocolFactory, ___transport);
+      invokeMethod_call method_call = new invokeMethod_call(intpGroupId, invokeMethodJson, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -1219,25 +952,14 @@ public class RemoteInterpreterEventService {
     public static class invokeMethod_call extends org.apache.thrift.async.TAsyncMethodCall {
       private String intpGroupId;
       private String invokeMethodJson;
-
-      public invokeMethod_call(
-          String intpGroupId,
-          String invokeMethodJson,
-          org.apache.thrift.async.AsyncMethodCallback resultHandler,
-          org.apache.thrift.async.TAsyncClient client,
-          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
-          org.apache.thrift.transport.TNonblockingTransport transport)
-          throws org.apache.thrift.TException {
+      public invokeMethod_call(String intpGroupId, String invokeMethodJson, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.intpGroupId = intpGroupId;
         this.invokeMethodJson = invokeMethodJson;
       }
 
-      public void write_args(org.apache.thrift.protocol.TProtocol prot)
-          throws org.apache.thrift.TException {
-        prot.writeMessageBegin(
-            new org.apache.thrift.protocol.TMessage(
-                "invokeMethod", org.apache.thrift.protocol.TMessageType.CALL, 0));
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("invokeMethod", org.apache.thrift.protocol.TMessageType.CALL, 0));
         invokeMethod_args args = new invokeMethod_args();
         args.setIntpGroupId(intpGroupId);
         args.setInvokeMethodJson(invokeMethodJson);
@@ -1249,40 +971,25 @@ public class RemoteInterpreterEventService {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
-            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot =
-            client.getProtocolFactory().getProtocol(memoryTransport);
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
         return (new Client(prot)).recv_invokeMethod();
       }
     }
+
   }
 
-  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I>
-      implements org.apache.thrift.TProcessor {
+  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
     private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
-
     public Processor(I iface) {
-      super(
-          iface,
-          getProcessMap(
-              new HashMap<
-                  String,
-                  org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
-    }
-
-    protected Processor(
-        I iface,
-        Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>
-            processMap) {
+      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+    }
+
+    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
       super(iface, getProcessMap(processMap));
     }
 
-    private static <I extends Iface>
-        Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>
-            getProcessMap(
-                Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>
-                    processMap) {
+    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
       processMap.put("registerInterpreterProcess", new registerInterpreterProcess());
       processMap.put("appendOutput", new appendOutput());
       processMap.put("updateOutput", new updateOutput());
@@ -1301,8 +1008,7 @@ public class RemoteInterpreterEventService {
       return processMap;
     }
 
-    public static class registerInterpreterProcess<I extends Iface>
-        extends org.apache.thrift.ProcessFunction<I, registerInterpreterProcess_args> {
+    public static class registerInterpreterProcess<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerInterpreterProcess_args> {
       public registerInterpreterProcess() {
         super("registerInterpreterProcess");
       }
@@ -1315,16 +1021,14 @@ public class RemoteInterpreterEventService {
         return false;
       }
 
-      public registerInterpreterProcess_result getResult(
-          I iface, registerInterpreterProcess_args args) throws org.apache.thrift.TException {
+      public registerInterpreterProcess_result getResult(I iface, registerInterpreterProcess_args args) throws org.apache.thrift.TException {
         registerInterpreterProcess_result result = new registerInterpreterProcess_result();
         iface.registerInterpreterProcess(args.registerInfo);
         return result;
       }
     }
 
-    public static class appendOutput<I extends Iface>
-        extends org.apache.thrift.ProcessFunction<I, appendOutput_args> {
+    public static class appendOutput<I extends Iface> extends org.apache.thrift.ProcessFunction<I, appendOutput_args> {
       public appendOutput() {
         super("appendOutput");
       }
@@ -1337,16 +1041,14 @@ public class RemoteInterpreterEventService {
         return false;
       }
 
-      public appendOutput_result getResult(I iface, appendOutput_args args)
-          throws org.apache.thrift.TException {
+      public appendOutput_result getResult(I iface, appendOutput_args args) throws org.apache.thrift.TException {
         appendOutput_result result = new appendOutput_result();
         iface.appendOutput(args.event);
         return result;
       }
     }
 
-    public static class updateOutput<I extends Iface>
-        extends org.apache.thrift.ProcessFunction<I, updateOutput_args> {
+    public static class updateOutput<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateOutput_args> {
       public updateOutput() {
         super("updateOutput");
       }
@@ -1359,16 +1061,14 @@ public class RemoteInterpreterEventService {
         return false;
       }
 
-      public updateOutput_result getResult(I iface, updateOutput_args args)
-          throws org.apache.thrift.TException {
+      public updateOutput_result getResult(I iface, updateOutput_args args) throws org.apache.thrift.TException {
         updateOutput_result result = new updateOutput_result();
         iface.updateOutput(args.event);
         return result;
       }
     }
 
-    public static class updateAllOutput<I extends Iface>
-        extends org.apache.thrift.ProcessFunction<I, updateAllOutput_args> {
+    public static class updateAllOutput<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateAllOutput_args> {
       public updateAllOutput() {
         super("updateAllOutput");
       }
@@ -1381,16 +1081,14 @@ public class RemoteInterpreterEventService {
         return false;
       }
 
-      public updateAllOutput_result getResult(I iface, updateAllOutput_args args)
-          throws org.apache.thrift.TException {
+      public updateAllOutput_result getResult(I iface, updateAllOutput_args args) throws org.apache.thrift.TException {
         updateAllOutput_result result = new updateAllOutput_result();
         iface.updateAllOutput(args.event);
         return result;
       }
     }
 
-    public static class appendAppOutput<I extends Iface>
-        extends org.apache.thrift.ProcessFunction<I, appendAppOutput_args> {
+    public static class appendAppOutput<I extends Iface> extends org.apache.thrift.ProcessFunction<I, appendAppOutput_args> {
       public appendAppOutput() {
         super("appendAppOutput");
       }
@@ -1403,16 +1101,14 @@ public class RemoteInterpreterEventService {
         return false;
       }
 
-      public appendAppOutput_result getResult(I iface, appendAppOutput_args args)
-          throws org.apache.thrift.TException {
+      public appendAppOutput_result getResult(I iface, appendAppOutput_args args) throws org.apache.thrift.TException {
         appendAppOutput_result result = new appendAppOutput_result();
         iface.appendAppOutput(args.event);
         return result;
       }
     }
 
-    public static class updateAppOutput<I extends Iface>
-        extends org.apache.thrift.ProcessFunction<I, updateAppOutput_args> {
+    public static class updateAppOutput<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateAppOutput_args> {
       public updateAppOutput() {
         super("updateAppOutput");
       }
@@ -1425,16 +1121,14 @@ public class RemoteInterpreterEventService {
         return false;
       }
 
-      public updateAppOutput_result getResult(I iface, updateAppOutput_args args)
-          throws org.apache.thrift.TException {
+      public updateAppOutput_result getResult(I iface, updateAppOutput_args args) throws org.apache.thrift.TException {
         updateAppOutput_result result = new updateAppOutput_result();
         iface.updateAppOutput(args.event);
         return result;
       }
     }
 
-    public static class updateAppStatus<I extends Iface>
-        extends org.apache.thrift.ProcessFunction<I, updateAppStatus_args> {
+    public static class updateAppStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateAppStatus_args> {
       public updateAppStatus() {
         super("updateAppStatus");
       }
@@ -1447,16 +1141,14 @@ public class RemoteInterpreterEventService {
         return false;
       }
 
-      public updateAppStatus_result getResult(I iface, updateAppStatus_args args)
-          throws org.apache.thrift.TException {
+      public updateAppStatus_result getResult(I iface, updateAppStatus_args args) throws org.apache.thrift.TException {
         updateAppStatus_result result = new updateAppStatus_result();
         iface.updateAppStatus(args.event);
         return result;
       }
     }
 
-    public static class runParagraphs<I extends Iface>
-        extends org.apache.thrift.ProcessFunction<I, runParagraphs_args> {
+    public static class runParagraphs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, runParagraphs_args> {
       public runParagraphs() {
         super("runParagraphs");
       }
@@ -1469,16 +1161,14 @@ public class RemoteInterpreterEventService {
         return false;
       }
 
-      public runParagraphs_result getResult(I iface, runParagraphs_args args)
-          throws org.apache.thrift.TException {
+      pu

<TRUNCATED>

[28/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppOutputUpdateEvent.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppOutputUpdateEvent.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppOutputUpdateEvent.java
index 21de67e..a37f828 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppOutputUpdateEvent.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppOutputUpdateEvent.java
@@ -1,75 +1,68 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2018-8-9")
-public class AppOutputUpdateEvent
-    implements org.apache.thrift.TBase<AppOutputUpdateEvent, AppOutputUpdateEvent._Fields>,
-        java.io.Serializable,
-        Cloneable,
-        Comparable<AppOutputUpdateEvent> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
-      new org.apache.thrift.protocol.TStruct("AppOutputUpdateEvent");
-
-  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "noteId", org.apache.thrift.protocol.TType.STRING, (short) 1);
-  private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "paragraphId", org.apache.thrift.protocol.TType.STRING, (short) 2);
-  private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "appId", org.apache.thrift.protocol.TType.STRING, (short) 3);
-  private static final org.apache.thrift.protocol.TField INDEX_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "index", org.apache.thrift.protocol.TType.I32, (short) 4);
-  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "type", org.apache.thrift.protocol.TType.STRING, (short) 5);
-  private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "data", org.apache.thrift.protocol.TType.STRING, (short) 6);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
-      new HashMap<Class<? extends IScheme>, SchemeFactory>();
+public class AppOutputUpdateEvent implements org.apache.thrift.TBase<AppOutputUpdateEvent, AppOutputUpdateEvent._Fields>, java.io.Serializable, Cloneable, Comparable<AppOutputUpdateEvent> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AppOutputUpdateEvent");
+
+  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("noteId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("paragraphId", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("appId", org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("index", org.apache.thrift.protocol.TType.I32, (short)4);
+  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)5);
+  private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)6);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
     schemes.put(StandardScheme.class, new AppOutputUpdateEventStandardSchemeFactory());
     schemes.put(TupleScheme.class, new AppOutputUpdateEventTupleSchemeFactory());
@@ -82,17 +75,14 @@ public class AppOutputUpdateEvent
   public String type; // required
   public String data; // required
 
-  /**
-   * The set of fields this struct contains, along with convenience methods for finding and
-   * manipulating them.
-   */
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    NOTE_ID((short) 1, "noteId"),
-    PARAGRAPH_ID((short) 2, "paragraphId"),
-    APP_ID((short) 3, "appId"),
-    INDEX((short) 4, "index"),
-    TYPE((short) 5, "type"),
-    DATA((short) 6, "data");
+    NOTE_ID((short)1, "noteId"),
+    PARAGRAPH_ID((short)2, "paragraphId"),
+    APP_ID((short)3, "appId"),
+    INDEX((short)4, "index"),
+    TYPE((short)5, "type"),
+    DATA((short)6, "data");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -102,9 +92,11 @@ public class AppOutputUpdateEvent
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
     public static _Fields findByThriftId(int fieldId) {
-      switch (fieldId) {
+      switch(fieldId) {
         case 1: // NOTE_ID
           return NOTE_ID;
         case 2: // PARAGRAPH_ID
@@ -122,15 +114,19 @@ public class AppOutputUpdateEvent
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null)
-        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
 
-    /** Find the _Fields constant that matches name, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
@@ -156,61 +152,35 @@ public class AppOutputUpdateEvent
   private static final int __INDEX_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
-        new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(
-        _Fields.NOTE_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "noteId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.PARAGRAPH_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "paragraphId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.APP_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "appId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.INDEX,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "index",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.I32)));
-    tmpMap.put(
-        _Fields.TYPE,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "type",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.DATA,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "data",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.NOTE_ID, new org.apache.thrift.meta_data.FieldMetaData("noteId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PARAGRAPH_ID, new org.apache.thrift.meta_data.FieldMetaData("paragraphId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.APP_ID, new org.apache.thrift.meta_data.FieldMetaData("appId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.INDEX, new org.apache.thrift.meta_data.FieldMetaData("index", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
-        AppOutputUpdateEvent.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AppOutputUpdateEvent.class, metaDataMap);
   }
 
-  public AppOutputUpdateEvent() {}
+  public AppOutputUpdateEvent() {
+  }
 
   public AppOutputUpdateEvent(
-      String noteId, String paragraphId, String appId, int index, String type, String data) {
+    String noteId,
+    String paragraphId,
+    String appId,
+    int index,
+    String type,
+    String data)
+  {
     this();
     this.noteId = noteId;
     this.paragraphId = paragraphId;
@@ -221,7 +191,9 @@ public class AppOutputUpdateEvent
     this.data = data;
   }
 
-  /** Performs a deep copy on <i>other</i>. */
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
   public AppOutputUpdateEvent(AppOutputUpdateEvent other) {
     __isset_bitfield = other.__isset_bitfield;
     if (other.isSetNoteId()) {
@@ -402,155 +374,169 @@ public class AppOutputUpdateEvent
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-      case NOTE_ID:
-        if (value == null) {
-          unsetNoteId();
-        } else {
-          setNoteId((String) value);
-        }
-        break;
+    case NOTE_ID:
+      if (value == null) {
+        unsetNoteId();
+      } else {
+        setNoteId((String)value);
+      }
+      break;
 
-      case PARAGRAPH_ID:
-        if (value == null) {
-          unsetParagraphId();
-        } else {
-          setParagraphId((String) value);
-        }
-        break;
+    case PARAGRAPH_ID:
+      if (value == null) {
+        unsetParagraphId();
+      } else {
+        setParagraphId((String)value);
+      }
+      break;
 
-      case APP_ID:
-        if (value == null) {
-          unsetAppId();
-        } else {
-          setAppId((String) value);
-        }
-        break;
+    case APP_ID:
+      if (value == null) {
+        unsetAppId();
+      } else {
+        setAppId((String)value);
+      }
+      break;
 
-      case INDEX:
-        if (value == null) {
-          unsetIndex();
-        } else {
-          setIndex((Integer) value);
-        }
-        break;
+    case INDEX:
+      if (value == null) {
+        unsetIndex();
+      } else {
+        setIndex((Integer)value);
+      }
+      break;
 
-      case TYPE:
-        if (value == null) {
-          unsetType();
-        } else {
-          setType((String) value);
-        }
-        break;
+    case TYPE:
+      if (value == null) {
+        unsetType();
+      } else {
+        setType((String)value);
+      }
+      break;
+
+    case DATA:
+      if (value == null) {
+        unsetData();
+      } else {
+        setData((String)value);
+      }
+      break;
 
-      case DATA:
-        if (value == null) {
-          unsetData();
-        } else {
-          setData((String) value);
-        }
-        break;
     }
   }
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-      case NOTE_ID:
-        return getNoteId();
+    case NOTE_ID:
+      return getNoteId();
 
-      case PARAGRAPH_ID:
-        return getParagraphId();
+    case PARAGRAPH_ID:
+      return getParagraphId();
 
-      case APP_ID:
-        return getAppId();
+    case APP_ID:
+      return getAppId();
 
-      case INDEX:
-        return Integer.valueOf(getIndex());
+    case INDEX:
+      return Integer.valueOf(getIndex());
 
-      case TYPE:
-        return getType();
+    case TYPE:
+      return getType();
+
+    case DATA:
+      return getData();
 
-      case DATA:
-        return getData();
     }
     throw new IllegalStateException();
   }
 
-  /**
-   * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
-   * otherwise
-   */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
     }
 
     switch (field) {
-      case NOTE_ID:
-        return isSetNoteId();
-      case PARAGRAPH_ID:
-        return isSetParagraphId();
-      case APP_ID:
-        return isSetAppId();
-      case INDEX:
-        return isSetIndex();
-      case TYPE:
-        return isSetType();
-      case DATA:
-        return isSetData();
+    case NOTE_ID:
+      return isSetNoteId();
+    case PARAGRAPH_ID:
+      return isSetParagraphId();
+    case APP_ID:
+      return isSetAppId();
+    case INDEX:
+      return isSetIndex();
+    case TYPE:
+      return isSetType();
+    case DATA:
+      return isSetData();
     }
     throw new IllegalStateException();
   }
 
   @Override
   public boolean equals(Object that) {
-    if (that == null) return false;
-    if (that instanceof AppOutputUpdateEvent) return this.equals((AppOutputUpdateEvent) that);
+    if (that == null)
+      return false;
+    if (that instanceof AppOutputUpdateEvent)
+      return this.equals((AppOutputUpdateEvent)that);
     return false;
   }
 
   public boolean equals(AppOutputUpdateEvent that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
 
     boolean this_present_noteId = true && this.isSetNoteId();
     boolean that_present_noteId = true && that.isSetNoteId();
     if (this_present_noteId || that_present_noteId) {
-      if (!(this_present_noteId && that_present_noteId)) return false;
-      if (!this.noteId.equals(that.noteId)) return false;
+      if (!(this_present_noteId && that_present_noteId))
+        return false;
+      if (!this.noteId.equals(that.noteId))
+        return false;
     }
 
     boolean this_present_paragraphId = true && this.isSetParagraphId();
     boolean that_present_paragraphId = true && that.isSetParagraphId();
     if (this_present_paragraphId || that_present_paragraphId) {
-      if (!(this_present_paragraphId && that_present_paragraphId)) return false;
-      if (!this.paragraphId.equals(that.paragraphId)) return false;
+      if (!(this_present_paragraphId && that_present_paragraphId))
+        return false;
+      if (!this.paragraphId.equals(that.paragraphId))
+        return false;
     }
 
     boolean this_present_appId = true && this.isSetAppId();
     boolean that_present_appId = true && that.isSetAppId();
     if (this_present_appId || that_present_appId) {
-      if (!(this_present_appId && that_present_appId)) return false;
-      if (!this.appId.equals(that.appId)) return false;
+      if (!(this_present_appId && that_present_appId))
+        return false;
+      if (!this.appId.equals(that.appId))
+        return false;
     }
 
     boolean this_present_index = true;
     boolean that_present_index = true;
     if (this_present_index || that_present_index) {
-      if (!(this_present_index && that_present_index)) return false;
-      if (this.index != that.index) return false;
+      if (!(this_present_index && that_present_index))
+        return false;
+      if (this.index != that.index)
+        return false;
     }
 
     boolean this_present_type = true && this.isSetType();
     boolean that_present_type = true && that.isSetType();
     if (this_present_type || that_present_type) {
-      if (!(this_present_type && that_present_type)) return false;
-      if (!this.type.equals(that.type)) return false;
+      if (!(this_present_type && that_present_type))
+        return false;
+      if (!this.type.equals(that.type))
+        return false;
     }
 
     boolean this_present_data = true && this.isSetData();
     boolean that_present_data = true && that.isSetData();
     if (this_present_data || that_present_data) {
-      if (!(this_present_data && that_present_data)) return false;
-      if (!this.data.equals(that.data)) return false;
+      if (!(this_present_data && that_present_data))
+        return false;
+      if (!this.data.equals(that.data))
+        return false;
     }
 
     return true;
@@ -562,27 +548,33 @@ public class AppOutputUpdateEvent
 
     boolean present_noteId = true && (isSetNoteId());
     list.add(present_noteId);
-    if (present_noteId) list.add(noteId);
+    if (present_noteId)
+      list.add(noteId);
 
     boolean present_paragraphId = true && (isSetParagraphId());
     list.add(present_paragraphId);
-    if (present_paragraphId) list.add(paragraphId);
+    if (present_paragraphId)
+      list.add(paragraphId);
 
     boolean present_appId = true && (isSetAppId());
     list.add(present_appId);
-    if (present_appId) list.add(appId);
+    if (present_appId)
+      list.add(appId);
 
     boolean present_index = true;
     list.add(present_index);
-    if (present_index) list.add(index);
+    if (present_index)
+      list.add(index);
 
     boolean present_type = true && (isSetType());
     list.add(present_type);
-    if (present_type) list.add(type);
+    if (present_type)
+      list.add(type);
 
     boolean present_data = true && (isSetData());
     list.add(present_data);
-    if (present_data) list.add(data);
+    if (present_data)
+      list.add(data);
 
     return list.hashCode();
   }
@@ -666,8 +658,7 @@ public class AppOutputUpdateEvent
     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
-  public void write(org.apache.thrift.protocol.TProtocol oprot)
-      throws org.apache.thrift.TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
@@ -730,23 +721,17 @@ public class AppOutputUpdateEvent
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
     try {
-      write(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(out)));
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in)
-      throws java.io.IOException, ClassNotFoundException {
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
-      // it doesn't seem like you should have to do this, but java serialization is wacky, and
-      // doesn't call the default constructor.
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
       __isset_bitfield = 0;
-      read(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(in)));
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
@@ -758,16 +743,15 @@ public class AppOutputUpdateEvent
     }
   }
 
-  private static class AppOutputUpdateEventStandardScheme
-      extends StandardScheme<AppOutputUpdateEvent> {
+  private static class AppOutputUpdateEventStandardScheme extends StandardScheme<AppOutputUpdateEvent> {
 
-    public void read(org.apache.thrift.protocol.TProtocol iprot, AppOutputUpdateEvent struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol iprot, AppOutputUpdateEvent struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
       iprot.readStructBegin();
-      while (true) {
+      while (true)
+      {
         schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
           break;
         }
         switch (schemeField.id) {
@@ -775,7 +759,7 @@ public class AppOutputUpdateEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.noteId = iprot.readString();
               struct.setNoteIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -783,7 +767,7 @@ public class AppOutputUpdateEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.paragraphId = iprot.readString();
               struct.setParagraphIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -791,7 +775,7 @@ public class AppOutputUpdateEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.appId = iprot.readString();
               struct.setAppIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -799,7 +783,7 @@ public class AppOutputUpdateEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
               struct.index = iprot.readI32();
               struct.setIndexIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -807,7 +791,7 @@ public class AppOutputUpdateEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.type = iprot.readString();
               struct.setTypeIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -815,7 +799,7 @@ public class AppOutputUpdateEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.data = iprot.readString();
               struct.setDataIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -830,8 +814,7 @@ public class AppOutputUpdateEvent
       struct.validate();
     }
 
-    public void write(org.apache.thrift.protocol.TProtocol oprot, AppOutputUpdateEvent struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol oprot, AppOutputUpdateEvent struct) throws org.apache.thrift.TException {
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
@@ -866,6 +849,7 @@ public class AppOutputUpdateEvent
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
+
   }
 
   private static class AppOutputUpdateEventTupleSchemeFactory implements SchemeFactory {
@@ -877,8 +861,7 @@ public class AppOutputUpdateEvent
   private static class AppOutputUpdateEventTupleScheme extends TupleScheme<AppOutputUpdateEvent> {
 
     @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, AppOutputUpdateEvent struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol prot, AppOutputUpdateEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
       if (struct.isSetNoteId()) {
@@ -921,8 +904,7 @@ public class AppOutputUpdateEvent
     }
 
     @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, AppOutputUpdateEvent struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol prot, AppOutputUpdateEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(6);
       if (incoming.get(0)) {
@@ -951,4 +933,6 @@ public class AppOutputUpdateEvent
       }
     }
   }
+
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppStatusUpdateEvent.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppStatusUpdateEvent.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppStatusUpdateEvent.java
index 1e7dcb4..5923dcc 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppStatusUpdateEvent.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppStatusUpdateEvent.java
@@ -1,68 +1,66 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2018-8-9")
-public class AppStatusUpdateEvent
-    implements org.apache.thrift.TBase<AppStatusUpdateEvent, AppStatusUpdateEvent._Fields>,
-        java.io.Serializable,
-        Cloneable,
-        Comparable<AppStatusUpdateEvent> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
-      new org.apache.thrift.protocol.TStruct("AppStatusUpdateEvent");
-
-  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "noteId", org.apache.thrift.protocol.TType.STRING, (short) 1);
-  private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "paragraphId", org.apache.thrift.protocol.TType.STRING, (short) 2);
-  private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "appId", org.apache.thrift.protocol.TType.STRING, (short) 3);
-  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "status", org.apache.thrift.protocol.TType.STRING, (short) 4);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
-      new HashMap<Class<? extends IScheme>, SchemeFactory>();
+public class AppStatusUpdateEvent implements org.apache.thrift.TBase<AppStatusUpdateEvent, AppStatusUpdateEvent._Fields>, java.io.Serializable, Cloneable, Comparable<AppStatusUpdateEvent> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AppStatusUpdateEvent");
 
+  private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("noteId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("paragraphId", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("appId", org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRING, (short)4);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
     schemes.put(StandardScheme.class, new AppStatusUpdateEventStandardSchemeFactory());
     schemes.put(TupleScheme.class, new AppStatusUpdateEventTupleSchemeFactory());
@@ -73,15 +71,12 @@ public class AppStatusUpdateEvent
   public String appId; // required
   public String status; // required
 
-  /**
-   * The set of fields this struct contains, along with convenience methods for finding and
-   * manipulating them.
-   */
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    NOTE_ID((short) 1, "noteId"),
-    PARAGRAPH_ID((short) 2, "paragraphId"),
-    APP_ID((short) 3, "appId"),
-    STATUS((short) 4, "status");
+    NOTE_ID((short)1, "noteId"),
+    PARAGRAPH_ID((short)2, "paragraphId"),
+    APP_ID((short)3, "appId"),
+    STATUS((short)4, "status");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -91,9 +86,11 @@ public class AppStatusUpdateEvent
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
     public static _Fields findByThriftId(int fieldId) {
-      switch (fieldId) {
+      switch(fieldId) {
         case 1: // NOTE_ID
           return NOTE_ID;
         case 2: // PARAGRAPH_ID
@@ -107,15 +104,19 @@ public class AppStatusUpdateEvent
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null)
-        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
 
-    /** Find the _Fields constant that matches name, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
@@ -139,46 +140,29 @@ public class AppStatusUpdateEvent
 
   // isset id assignments
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
-        new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(
-        _Fields.NOTE_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "noteId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.PARAGRAPH_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "paragraphId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.APP_ID,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "appId",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.STATUS,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "status",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.NOTE_ID, new org.apache.thrift.meta_data.FieldMetaData("noteId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PARAGRAPH_ID, new org.apache.thrift.meta_data.FieldMetaData("paragraphId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.APP_ID, new org.apache.thrift.meta_data.FieldMetaData("appId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
-        AppStatusUpdateEvent.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AppStatusUpdateEvent.class, metaDataMap);
   }
 
-  public AppStatusUpdateEvent() {}
+  public AppStatusUpdateEvent() {
+  }
 
-  public AppStatusUpdateEvent(String noteId, String paragraphId, String appId, String status) {
+  public AppStatusUpdateEvent(
+    String noteId,
+    String paragraphId,
+    String appId,
+    String status)
+  {
     this();
     this.noteId = noteId;
     this.paragraphId = paragraphId;
@@ -186,7 +170,9 @@ public class AppStatusUpdateEvent
     this.status = status;
   }
 
-  /** Performs a deep copy on <i>other</i>. */
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
   public AppStatusUpdateEvent(AppStatusUpdateEvent other) {
     if (other.isSetNoteId()) {
       this.noteId = other.noteId;
@@ -312,115 +298,125 @@ public class AppStatusUpdateEvent
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-      case NOTE_ID:
-        if (value == null) {
-          unsetNoteId();
-        } else {
-          setNoteId((String) value);
-        }
-        break;
+    case NOTE_ID:
+      if (value == null) {
+        unsetNoteId();
+      } else {
+        setNoteId((String)value);
+      }
+      break;
 
-      case PARAGRAPH_ID:
-        if (value == null) {
-          unsetParagraphId();
-        } else {
-          setParagraphId((String) value);
-        }
-        break;
+    case PARAGRAPH_ID:
+      if (value == null) {
+        unsetParagraphId();
+      } else {
+        setParagraphId((String)value);
+      }
+      break;
 
-      case APP_ID:
-        if (value == null) {
-          unsetAppId();
-        } else {
-          setAppId((String) value);
-        }
-        break;
+    case APP_ID:
+      if (value == null) {
+        unsetAppId();
+      } else {
+        setAppId((String)value);
+      }
+      break;
+
+    case STATUS:
+      if (value == null) {
+        unsetStatus();
+      } else {
+        setStatus((String)value);
+      }
+      break;
 
-      case STATUS:
-        if (value == null) {
-          unsetStatus();
-        } else {
-          setStatus((String) value);
-        }
-        break;
     }
   }
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-      case NOTE_ID:
-        return getNoteId();
+    case NOTE_ID:
+      return getNoteId();
+
+    case PARAGRAPH_ID:
+      return getParagraphId();
 
-      case PARAGRAPH_ID:
-        return getParagraphId();
+    case APP_ID:
+      return getAppId();
 
-      case APP_ID:
-        return getAppId();
+    case STATUS:
+      return getStatus();
 
-      case STATUS:
-        return getStatus();
     }
     throw new IllegalStateException();
   }
 
-  /**
-   * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
-   * otherwise
-   */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
     }
 
     switch (field) {
-      case NOTE_ID:
-        return isSetNoteId();
-      case PARAGRAPH_ID:
-        return isSetParagraphId();
-      case APP_ID:
-        return isSetAppId();
-      case STATUS:
-        return isSetStatus();
+    case NOTE_ID:
+      return isSetNoteId();
+    case PARAGRAPH_ID:
+      return isSetParagraphId();
+    case APP_ID:
+      return isSetAppId();
+    case STATUS:
+      return isSetStatus();
     }
     throw new IllegalStateException();
   }
 
   @Override
   public boolean equals(Object that) {
-    if (that == null) return false;
-    if (that instanceof AppStatusUpdateEvent) return this.equals((AppStatusUpdateEvent) that);
+    if (that == null)
+      return false;
+    if (that instanceof AppStatusUpdateEvent)
+      return this.equals((AppStatusUpdateEvent)that);
     return false;
   }
 
   public boolean equals(AppStatusUpdateEvent that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
 
     boolean this_present_noteId = true && this.isSetNoteId();
     boolean that_present_noteId = true && that.isSetNoteId();
     if (this_present_noteId || that_present_noteId) {
-      if (!(this_present_noteId && that_present_noteId)) return false;
-      if (!this.noteId.equals(that.noteId)) return false;
+      if (!(this_present_noteId && that_present_noteId))
+        return false;
+      if (!this.noteId.equals(that.noteId))
+        return false;
     }
 
     boolean this_present_paragraphId = true && this.isSetParagraphId();
     boolean that_present_paragraphId = true && that.isSetParagraphId();
     if (this_present_paragraphId || that_present_paragraphId) {
-      if (!(this_present_paragraphId && that_present_paragraphId)) return false;
-      if (!this.paragraphId.equals(that.paragraphId)) return false;
+      if (!(this_present_paragraphId && that_present_paragraphId))
+        return false;
+      if (!this.paragraphId.equals(that.paragraphId))
+        return false;
     }
 
     boolean this_present_appId = true && this.isSetAppId();
     boolean that_present_appId = true && that.isSetAppId();
     if (this_present_appId || that_present_appId) {
-      if (!(this_present_appId && that_present_appId)) return false;
-      if (!this.appId.equals(that.appId)) return false;
+      if (!(this_present_appId && that_present_appId))
+        return false;
+      if (!this.appId.equals(that.appId))
+        return false;
     }
 
     boolean this_present_status = true && this.isSetStatus();
     boolean that_present_status = true && that.isSetStatus();
     if (this_present_status || that_present_status) {
-      if (!(this_present_status && that_present_status)) return false;
-      if (!this.status.equals(that.status)) return false;
+      if (!(this_present_status && that_present_status))
+        return false;
+      if (!this.status.equals(that.status))
+        return false;
     }
 
     return true;
@@ -432,19 +428,23 @@ public class AppStatusUpdateEvent
 
     boolean present_noteId = true && (isSetNoteId());
     list.add(present_noteId);
-    if (present_noteId) list.add(noteId);
+    if (present_noteId)
+      list.add(noteId);
 
     boolean present_paragraphId = true && (isSetParagraphId());
     list.add(present_paragraphId);
-    if (present_paragraphId) list.add(paragraphId);
+    if (present_paragraphId)
+      list.add(paragraphId);
 
     boolean present_appId = true && (isSetAppId());
     list.add(present_appId);
-    if (present_appId) list.add(appId);
+    if (present_appId)
+      list.add(appId);
 
     boolean present_status = true && (isSetStatus());
     list.add(present_status);
-    if (present_status) list.add(status);
+    if (present_status)
+      list.add(status);
 
     return list.hashCode();
   }
@@ -508,8 +508,7 @@ public class AppStatusUpdateEvent
     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
-  public void write(org.apache.thrift.protocol.TProtocol oprot)
-      throws org.apache.thrift.TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
@@ -560,20 +559,15 @@ public class AppStatusUpdateEvent
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
     try {
-      write(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(out)));
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in)
-      throws java.io.IOException, ClassNotFoundException {
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
-      read(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(in)));
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
@@ -585,16 +579,15 @@ public class AppStatusUpdateEvent
     }
   }
 
-  private static class AppStatusUpdateEventStandardScheme
-      extends StandardScheme<AppStatusUpdateEvent> {
+  private static class AppStatusUpdateEventStandardScheme extends StandardScheme<AppStatusUpdateEvent> {
 
-    public void read(org.apache.thrift.protocol.TProtocol iprot, AppStatusUpdateEvent struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol iprot, AppStatusUpdateEvent struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
       iprot.readStructBegin();
-      while (true) {
+      while (true)
+      {
         schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
           break;
         }
         switch (schemeField.id) {
@@ -602,7 +595,7 @@ public class AppStatusUpdateEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.noteId = iprot.readString();
               struct.setNoteIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -610,7 +603,7 @@ public class AppStatusUpdateEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.paragraphId = iprot.readString();
               struct.setParagraphIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -618,7 +611,7 @@ public class AppStatusUpdateEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.appId = iprot.readString();
               struct.setAppIdIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -626,7 +619,7 @@ public class AppStatusUpdateEvent
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.status = iprot.readString();
               struct.setStatusIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -641,8 +634,7 @@ public class AppStatusUpdateEvent
       struct.validate();
     }
 
-    public void write(org.apache.thrift.protocol.TProtocol oprot, AppStatusUpdateEvent struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol oprot, AppStatusUpdateEvent struct) throws org.apache.thrift.TException {
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
@@ -669,6 +661,7 @@ public class AppStatusUpdateEvent
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
+
   }
 
   private static class AppStatusUpdateEventTupleSchemeFactory implements SchemeFactory {
@@ -680,8 +673,7 @@ public class AppStatusUpdateEvent
   private static class AppStatusUpdateEventTupleScheme extends TupleScheme<AppStatusUpdateEvent> {
 
     @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, AppStatusUpdateEvent struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol prot, AppStatusUpdateEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
       if (struct.isSetNoteId()) {
@@ -712,8 +704,7 @@ public class AppStatusUpdateEvent
     }
 
     @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, AppStatusUpdateEvent struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol prot, AppStatusUpdateEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(4);
       if (incoming.get(0)) {
@@ -734,4 +725,6 @@ public class AppStatusUpdateEvent
       }
     }
   }
+
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/InterpreterCompletion.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/InterpreterCompletion.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/InterpreterCompletion.java
index 4a989e1..68caf43 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/InterpreterCompletion.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/InterpreterCompletion.java
@@ -1,65 +1,65 @@
 /**
- * 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
+ * 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
  *
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * <p>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
+ * 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.
  */
 /**
  * Autogenerated by Thrift Compiler (0.9.2)
  *
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.zeppelin.interpreter.thrift;
 
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
 import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2018-8-9")
-public class InterpreterCompletion
-    implements org.apache.thrift.TBase<InterpreterCompletion, InterpreterCompletion._Fields>,
-        java.io.Serializable,
-        Cloneable,
-        Comparable<InterpreterCompletion> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
-      new org.apache.thrift.protocol.TStruct("InterpreterCompletion");
-
-  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "name", org.apache.thrift.protocol.TType.STRING, (short) 1);
-  private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "value", org.apache.thrift.protocol.TType.STRING, (short) 2);
-  private static final org.apache.thrift.protocol.TField META_FIELD_DESC =
-      new org.apache.thrift.protocol.TField(
-          "meta", org.apache.thrift.protocol.TType.STRING, (short) 3);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
-      new HashMap<Class<? extends IScheme>, SchemeFactory>();
+public class InterpreterCompletion implements org.apache.thrift.TBase<InterpreterCompletion, InterpreterCompletion._Fields>, java.io.Serializable, Cloneable, Comparable<InterpreterCompletion> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InterpreterCompletion");
+
+  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField META_FIELD_DESC = new org.apache.thrift.protocol.TField("meta", org.apache.thrift.protocol.TType.STRING, (short)3);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
     schemes.put(StandardScheme.class, new InterpreterCompletionStandardSchemeFactory());
     schemes.put(TupleScheme.class, new InterpreterCompletionTupleSchemeFactory());
@@ -69,14 +69,11 @@ public class InterpreterCompletion
   public String value; // required
   public String meta; // required
 
-  /**
-   * The set of fields this struct contains, along with convenience methods for finding and
-   * manipulating them.
-   */
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    NAME((short) 1, "name"),
-    VALUE((short) 2, "value"),
-    META((short) 3, "meta");
+    NAME((short)1, "name"),
+    VALUE((short)2, "value"),
+    META((short)3, "meta");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -86,9 +83,11 @@ public class InterpreterCompletion
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
     public static _Fields findByThriftId(int fieldId) {
-      switch (fieldId) {
+      switch(fieldId) {
         case 1: // NAME
           return NAME;
         case 2: // VALUE
@@ -100,15 +99,19 @@ public class InterpreterCompletion
       }
     }
 
-    /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null)
-        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
 
-    /** Find the _Fields constant that matches name, or null if its not found. */
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
@@ -132,46 +135,35 @@ public class InterpreterCompletion
 
   // isset id assignments
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
-        new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(
-        _Fields.NAME,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "name",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.VALUE,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "value",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(
-        _Fields.META,
-        new org.apache.thrift.meta_data.FieldMetaData(
-            "meta",
-            org.apache.thrift.TFieldRequirementType.DEFAULT,
-            new org.apache.thrift.meta_data.FieldValueMetaData(
-                org.apache.thrift.protocol.TType.STRING)));
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.META, new org.apache.thrift.meta_data.FieldMetaData("meta", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
-        InterpreterCompletion.class, metaDataMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InterpreterCompletion.class, metaDataMap);
   }
 
-  public InterpreterCompletion() {}
+  public InterpreterCompletion() {
+  }
 
-  public InterpreterCompletion(String name, String value, String meta) {
+  public InterpreterCompletion(
+    String name,
+    String value,
+    String meta)
+  {
     this();
     this.name = name;
     this.value = value;
     this.meta = meta;
   }
 
-  /** Performs a deep copy on <i>other</i>. */
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
   public InterpreterCompletion(InterpreterCompletion other) {
     if (other.isSetName()) {
       this.name = other.name;
@@ -269,95 +261,103 @@ public class InterpreterCompletion
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-      case NAME:
-        if (value == null) {
-          unsetName();
-        } else {
-          setName((String) value);
-        }
-        break;
+    case NAME:
+      if (value == null) {
+        unsetName();
+      } else {
+        setName((String)value);
+      }
+      break;
 
-      case VALUE:
-        if (value == null) {
-          unsetValue();
-        } else {
-          setValue((String) value);
-        }
-        break;
+    case VALUE:
+      if (value == null) {
+        unsetValue();
+      } else {
+        setValue((String)value);
+      }
+      break;
+
+    case META:
+      if (value == null) {
+        unsetMeta();
+      } else {
+        setMeta((String)value);
+      }
+      break;
 
-      case META:
-        if (value == null) {
-          unsetMeta();
-        } else {
-          setMeta((String) value);
-        }
-        break;
     }
   }
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-      case NAME:
-        return getName();
+    case NAME:
+      return getName();
+
+    case VALUE:
+      return getValue();
 
-      case VALUE:
-        return getValue();
+    case META:
+      return getMeta();
 
-      case META:
-        return getMeta();
     }
     throw new IllegalStateException();
   }
 
-  /**
-   * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
-   * otherwise
-   */
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
       throw new IllegalArgumentException();
     }
 
     switch (field) {
-      case NAME:
-        return isSetName();
-      case VALUE:
-        return isSetValue();
-      case META:
-        return isSetMeta();
+    case NAME:
+      return isSetName();
+    case VALUE:
+      return isSetValue();
+    case META:
+      return isSetMeta();
     }
     throw new IllegalStateException();
   }
 
   @Override
   public boolean equals(Object that) {
-    if (that == null) return false;
-    if (that instanceof InterpreterCompletion) return this.equals((InterpreterCompletion) that);
+    if (that == null)
+      return false;
+    if (that instanceof InterpreterCompletion)
+      return this.equals((InterpreterCompletion)that);
     return false;
   }
 
   public boolean equals(InterpreterCompletion that) {
-    if (that == null) return false;
+    if (that == null)
+      return false;
 
     boolean this_present_name = true && this.isSetName();
     boolean that_present_name = true && that.isSetName();
     if (this_present_name || that_present_name) {
-      if (!(this_present_name && that_present_name)) return false;
-      if (!this.name.equals(that.name)) return false;
+      if (!(this_present_name && that_present_name))
+        return false;
+      if (!this.name.equals(that.name))
+        return false;
     }
 
     boolean this_present_value = true && this.isSetValue();
     boolean that_present_value = true && that.isSetValue();
     if (this_present_value || that_present_value) {
-      if (!(this_present_value && that_present_value)) return false;
-      if (!this.value.equals(that.value)) return false;
+      if (!(this_present_value && that_present_value))
+        return false;
+      if (!this.value.equals(that.value))
+        return false;
     }
 
     boolean this_present_meta = true && this.isSetMeta();
     boolean that_present_meta = true && that.isSetMeta();
     if (this_present_meta || that_present_meta) {
-      if (!(this_present_meta && that_present_meta)) return false;
-      if (!this.meta.equals(that.meta)) return false;
+      if (!(this_present_meta && that_present_meta))
+        return false;
+      if (!this.meta.equals(that.meta))
+        return false;
     }
 
     return true;
@@ -369,15 +369,18 @@ public class InterpreterCompletion
 
     boolean present_name = true && (isSetName());
     list.add(present_name);
-    if (present_name) list.add(name);
+    if (present_name)
+      list.add(name);
 
     boolean present_value = true && (isSetValue());
     list.add(present_value);
-    if (present_value) list.add(value);
+    if (present_value)
+      list.add(value);
 
     boolean present_meta = true && (isSetMeta());
     list.add(present_meta);
-    if (present_meta) list.add(meta);
+    if (present_meta)
+      list.add(meta);
 
     return list.hashCode();
   }
@@ -431,8 +434,7 @@ public class InterpreterCompletion
     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
-  public void write(org.apache.thrift.protocol.TProtocol oprot)
-      throws org.apache.thrift.TException {
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
@@ -475,20 +477,15 @@ public class InterpreterCompletion
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
     try {
-      write(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(out)));
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in)
-      throws java.io.IOException, ClassNotFoundException {
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
-      read(
-          new org.apache.thrift.protocol.TCompactProtocol(
-              new org.apache.thrift.transport.TIOStreamTransport(in)));
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
     }
@@ -500,16 +497,15 @@ public class InterpreterCompletion
     }
   }
 
-  private static class InterpreterCompletionStandardScheme
-      extends StandardScheme<InterpreterCompletion> {
+  private static class InterpreterCompletionStandardScheme extends StandardScheme<InterpreterCompletion> {
 
-    public void read(org.apache.thrift.protocol.TProtocol iprot, InterpreterCompletion struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol iprot, InterpreterCompletion struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
       iprot.readStructBegin();
-      while (true) {
+      while (true)
+      {
         schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
           break;
         }
         switch (schemeField.id) {
@@ -517,7 +513,7 @@ public class InterpreterCompletion
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.name = iprot.readString();
               struct.setNameIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -525,7 +521,7 @@ public class InterpreterCompletion
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.value = iprot.readString();
               struct.setValueIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -533,7 +529,7 @@ public class InterpreterCompletion
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.meta = iprot.readString();
               struct.setMetaIsSet(true);
-            } else {
+            } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
@@ -548,8 +544,7 @@ public class InterpreterCompletion
       struct.validate();
     }
 
-    public void write(org.apache.thrift.protocol.TProtocol oprot, InterpreterCompletion struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol oprot, InterpreterCompletion struct) throws org.apache.thrift.TException {
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
@@ -571,6 +566,7 @@ public class InterpreterCompletion
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
+
   }
 
   private static class InterpreterCompletionTupleSchemeFactory implements SchemeFactory {
@@ -582,8 +578,7 @@ public class InterpreterCompletion
   private static class InterpreterCompletionTupleScheme extends TupleScheme<InterpreterCompletion> {
 
     @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, InterpreterCompletion struct)
-        throws org.apache.thrift.TException {
+    public void write(org.apache.thrift.protocol.TProtocol prot, InterpreterCompletion struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
       if (struct.isSetName()) {
@@ -608,8 +603,7 @@ public class InterpreterCompletion
     }
 
     @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, InterpreterCompletion struct)
-        throws org.apache.thrift.TException {
+    public void read(org.apache.thrift.protocol.TProtocol prot, InterpreterCompletion struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(3);
       if (incoming.get(0)) {
@@ -626,4 +620,6 @@ public class InterpreterCompletion
       }
     }
   }
+
 }
+


[36/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/test/java/org/apache/zeppelin/spark/IPySparkInterpreterTest.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/IPySparkInterpreterTest.java b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/IPySparkInterpreterTest.java
index c33db1f..20c336d 100644
--- a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/IPySparkInterpreterTest.java
+++ b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/IPySparkInterpreterTest.java
@@ -17,19 +17,8 @@
 
 package org.apache.zeppelin.spark;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.verify;
 
 import com.google.common.io.Files;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -43,11 +32,23 @@ import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.python.IPythonInterpreterTest;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.verify;
+
 public class IPySparkInterpreterTest extends IPythonInterpreterTest {
 
   private InterpreterGroup intpGroup;
-  private RemoteInterpreterEventClient mockIntpEventClient =
-      mock(RemoteInterpreterEventClient.class);
+  private RemoteInterpreterEventClient mockIntpEventClient = mock(RemoteInterpreterEventClient.class);
 
   @Override
   protected Properties initIntpProperties() {
@@ -66,14 +67,15 @@ public class IPySparkInterpreterTest extends IPythonInterpreterTest {
     return p;
   }
 
+
   @Override
   protected void startInterpreter(Properties properties) throws InterpreterException {
     InterpreterContext context = getInterpreterContext();
     context.setIntpEventClient(mockIntpEventClient);
     InterpreterContext.set(context);
 
-    LazyOpenInterpreter sparkInterpreter =
-        new LazyOpenInterpreter(new SparkInterpreter(properties));
+    LazyOpenInterpreter sparkInterpreter = new LazyOpenInterpreter(
+        new SparkInterpreter(properties));
     intpGroup = new InterpreterGroup();
     intpGroup.put("session_1", new ArrayList<Interpreter>());
     intpGroup.get("session_1").add(sparkInterpreter);
@@ -91,6 +93,7 @@ public class IPySparkInterpreterTest extends IPythonInterpreterTest {
     interpreter.open();
   }
 
+
   @Override
   public void tearDown() throws InterpreterException {
     intpGroup.close();
@@ -103,8 +106,7 @@ public class IPySparkInterpreterTest extends IPythonInterpreterTest {
     testPySpark(interpreter, mockIntpEventClient);
   }
 
-  public static void testPySpark(
-      final Interpreter interpreter, RemoteInterpreterEventClient mockIntpEventClient)
+  public static void testPySpark(final Interpreter interpreter, RemoteInterpreterEventClient mockIntpEventClient)
       throws InterpreterException, IOException, InterruptedException {
     reset(mockIntpEventClient);
     // rdd
@@ -118,8 +120,7 @@ public class IPySparkInterpreterTest extends IPythonInterpreterTest {
     result = interpreter.interpret("sc.range(1,10).sum()", context);
     Thread.sleep(100);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
-    List<InterpreterResultMessage> interpreterResultMessages =
-        context.out.toInterpreterResultMessage();
+    List<InterpreterResultMessage> interpreterResultMessages = context.out.toInterpreterResultMessage();
     assertEquals("45", interpreterResultMessages.get(0).getData().trim());
     // spark job url is sent
     verify(mockIntpEventClient).onParaInfosReceived(any(Map.class));
@@ -127,73 +128,69 @@ public class IPySparkInterpreterTest extends IPythonInterpreterTest {
     // spark sql
     context = createInterpreterContext(mockIntpEventClient);
     if (!isSpark2(sparkVersion)) {
-      result =
-          interpreter.interpret(
-              "df = sqlContext.createDataFrame([(1,'a'),(2,'b')])\ndf.show()", context);
+      result = interpreter.interpret("df = sqlContext.createDataFrame([(1,'a'),(2,'b')])\ndf.show()", context);
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
       interpreterResultMessages = context.out.toInterpreterResultMessage();
       assertEquals(
-          "+---+---+\n"
-              + "| _1| _2|\n"
-              + "+---+---+\n"
-              + "|  1|  a|\n"
-              + "|  2|  b|\n"
-              + "+---+---+",
-          interpreterResultMessages.get(0).getData().trim());
+          "+---+---+\n" +
+              "| _1| _2|\n" +
+              "+---+---+\n" +
+              "|  1|  a|\n" +
+              "|  2|  b|\n" +
+              "+---+---+", interpreterResultMessages.get(0).getData().trim());
 
       context = createInterpreterContext(mockIntpEventClient);
       result = interpreter.interpret("z.show(df)", context);
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
       interpreterResultMessages = context.out.toInterpreterResultMessage();
-      assertEquals("_1	_2\n" + "1	a\n" + "2	b", interpreterResultMessages.get(0).getData().trim());
+      assertEquals(
+          "_1	_2\n" +
+              "1	a\n" +
+              "2	b", interpreterResultMessages.get(0).getData().trim());
     } else {
-      result =
-          interpreter.interpret(
-              "df = spark.createDataFrame([(1,'a'),(2,'b')])\ndf.show()", context);
+      result = interpreter.interpret("df = spark.createDataFrame([(1,'a'),(2,'b')])\ndf.show()", context);
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
       interpreterResultMessages = context.out.toInterpreterResultMessage();
       assertEquals(
-          "+---+---+\n"
-              + "| _1| _2|\n"
-              + "+---+---+\n"
-              + "|  1|  a|\n"
-              + "|  2|  b|\n"
-              + "+---+---+",
-          interpreterResultMessages.get(0).getData().trim());
+          "+---+---+\n" +
+              "| _1| _2|\n" +
+              "+---+---+\n" +
+              "|  1|  a|\n" +
+              "|  2|  b|\n" +
+              "+---+---+", interpreterResultMessages.get(0).getData().trim());
 
       context = createInterpreterContext(mockIntpEventClient);
       result = interpreter.interpret("z.show(df)", context);
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
       interpreterResultMessages = context.out.toInterpreterResultMessage();
-      assertEquals("_1	_2\n" + "1	a\n" + "2	b", interpreterResultMessages.get(0).getData().trim());
+      assertEquals(
+          "_1	_2\n" +
+              "1	a\n" +
+              "2	b", interpreterResultMessages.get(0).getData().trim());
     }
     // cancel
     if (interpreter instanceof IPySparkInterpreter) {
       final InterpreterContext context2 = createInterpreterContext(mockIntpEventClient);
 
-      Thread thread =
-          new Thread() {
-            @Override
-            public void run() {
-              InterpreterResult result = null;
-              try {
-                result =
-                    interpreter.interpret(
-                        "import time\nsc.range(1,10).foreach(lambda x: time.sleep(1))", context2);
-              } catch (InterpreterException e) {
-                e.printStackTrace();
-              }
-              assertEquals(InterpreterResult.Code.ERROR, result.code());
-              List<InterpreterResultMessage> interpreterResultMessages = null;
-              try {
-                interpreterResultMessages = context2.out.toInterpreterResultMessage();
-                assertTrue(
-                    interpreterResultMessages.get(0).getData().contains("KeyboardInterrupt"));
-              } catch (IOException e) {
-                e.printStackTrace();
-              }
-            }
-          };
+      Thread thread = new Thread() {
+        @Override
+        public void run() {
+          InterpreterResult result = null;
+          try {
+            result = interpreter.interpret("import time\nsc.range(1,10).foreach(lambda x: time.sleep(1))", context2);
+          } catch (InterpreterException e) {
+            e.printStackTrace();
+          }
+          assertEquals(InterpreterResult.Code.ERROR, result.code());
+          List<InterpreterResultMessage> interpreterResultMessages = null;
+          try {
+            interpreterResultMessages = context2.out.toInterpreterResultMessage();
+            assertTrue(interpreterResultMessages.get(0).getData().contains("KeyboardInterrupt"));
+          } catch (IOException e) {
+            e.printStackTrace();
+          }
+        }
+      };
       thread.start();
 
       // sleep 1 second to wait for the spark job starts
@@ -203,8 +200,7 @@ public class IPySparkInterpreterTest extends IPythonInterpreterTest {
     }
 
     // completions
-    List<InterpreterCompletion> completions =
-        interpreter.completion("sc.ran", 6, createInterpreterContext(mockIntpEventClient));
+    List<InterpreterCompletion> completions = interpreter.completion("sc.ran", 6, createInterpreterContext(mockIntpEventClient));
     assertEquals(1, completions.size());
     assertEquals("range", completions.get(0).getValue());
 
@@ -212,8 +208,7 @@ public class IPySparkInterpreterTest extends IPythonInterpreterTest {
     assertTrue(completions.size() > 0);
     completions.contains(new InterpreterCompletion("range", "range", ""));
 
-    completions =
-        interpreter.completion("1+1\nsc.", 7, createInterpreterContext(mockIntpEventClient));
+    completions = interpreter.completion("1+1\nsc.", 7, createInterpreterContext(mockIntpEventClient));
     assertTrue(completions.size() > 0);
     completions.contains(new InterpreterCompletion("range", "range", ""));
 
@@ -223,22 +218,20 @@ public class IPySparkInterpreterTest extends IPythonInterpreterTest {
 
     // pyspark streaming
     context = createInterpreterContext(mockIntpEventClient);
-    result =
-        interpreter.interpret(
-            "from pyspark.streaming import StreamingContext\n"
-                + "import time\n"
-                + "ssc = StreamingContext(sc, 1)\n"
-                + "rddQueue = []\n"
-                + "for i in range(5):\n"
-                + "    rddQueue += [ssc.sparkContext.parallelize([j for j in range(1, 1001)], 10)]\n"
-                + "inputStream = ssc.queueStream(rddQueue)\n"
-                + "mappedStream = inputStream.map(lambda x: (x % 10, 1))\n"
-                + "reducedStream = mappedStream.reduceByKey(lambda a, b: a + b)\n"
-                + "reducedStream.pprint()\n"
-                + "ssc.start()\n"
-                + "time.sleep(6)\n"
-                + "ssc.stop(stopSparkContext=False, stopGraceFully=True)",
-            context);
+    result = interpreter.interpret(
+        "from pyspark.streaming import StreamingContext\n" +
+            "import time\n" +
+            "ssc = StreamingContext(sc, 1)\n" +
+            "rddQueue = []\n" +
+            "for i in range(5):\n" +
+            "    rddQueue += [ssc.sparkContext.parallelize([j for j in range(1, 1001)], 10)]\n" +
+            "inputStream = ssc.queueStream(rddQueue)\n" +
+            "mappedStream = inputStream.map(lambda x: (x % 10, 1))\n" +
+            "reducedStream = mappedStream.reduceByKey(lambda a, b: a + b)\n" +
+            "reducedStream.pprint()\n" +
+            "ssc.start()\n" +
+            "time.sleep(6)\n" +
+            "ssc.stop(stopSparkContext=False, stopGraceFully=True)", context);
     Thread.sleep(1000);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     interpreterResultMessages = context.out.toInterpreterResultMessage();
@@ -250,8 +243,7 @@ public class IPySparkInterpreterTest extends IPythonInterpreterTest {
     return sparkVersion.startsWith("'2.") || sparkVersion.startsWith("u'2.");
   }
 
-  private static InterpreterContext createInterpreterContext(
-      RemoteInterpreterEventClient mockRemoteEventClient) {
+  private static InterpreterContext createInterpreterContext(RemoteInterpreterEventClient mockRemoteEventClient) {
     return InterpreterContext.builder()
         .setNoteId("noteId")
         .setParagraphId("paragraphId")

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
index 2722bfb..ea19866 100644
--- a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
+++ b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
@@ -17,24 +17,7 @@
 
 package org.apache.zeppelin.spark;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-
 import com.google.common.io.Files;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.nio.channels.Channels;
-import java.nio.channels.ReadableByteChannel;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
 import org.apache.zeppelin.display.AngularObjectRegistry;
 import org.apache.zeppelin.display.ui.CheckBox;
 import org.apache.zeppelin.display.ui.Password;
@@ -54,6 +37,26 @@ import org.junit.After;
 import org.junit.Ignore;
 import org.junit.Test;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.nio.channels.Channels;
+import java.nio.channels.ReadableByteChannel;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.verify;
+
+
 public class NewSparkInterpreterTest {
 
   private SparkInterpreter interpreter;
@@ -64,12 +67,10 @@ public class NewSparkInterpreterTest {
   // catch the interpreter output in onUpdate
   private InterpreterResultMessageOutput messageOutput;
 
-  private RemoteInterpreterEventClient mockRemoteEventClient =
-      mock(RemoteInterpreterEventClient.class);
+  private RemoteInterpreterEventClient mockRemoteEventClient = mock(RemoteInterpreterEventClient.class);
 
   @Test
-  public void testSparkInterpreter()
-      throws IOException, InterruptedException, InterpreterException {
+  public void testSparkInterpreter() throws IOException, InterruptedException, InterpreterException {
     Properties properties = new Properties();
     properties.setProperty("spark.master", "local");
     properties.setProperty("spark.app.name", "test");
@@ -78,12 +79,11 @@ public class NewSparkInterpreterTest {
     properties.setProperty("zeppelin.spark.useNew", "true");
     properties.setProperty("zeppelin.spark.uiWebUrl", "fake_spark_weburl");
 
-    InterpreterContext context =
-        InterpreterContext.builder()
-            .setInterpreterOut(new InterpreterOutput(null))
-            .setIntpEventClient(mockRemoteEventClient)
-            .setAngularObjectRegistry(new AngularObjectRegistry("spark", null))
-            .build();
+    InterpreterContext context = InterpreterContext.builder()
+        .setInterpreterOut(new InterpreterOutput(null))
+        .setIntpEventClient(mockRemoteEventClient)
+        .setAngularObjectRegistry(new AngularObjectRegistry("spark", null))
+        .build();
     InterpreterContext.set(context);
 
     interpreter = new SparkInterpreter(properties);
@@ -93,8 +93,7 @@ public class NewSparkInterpreterTest {
 
     assertEquals("fake_spark_weburl", interpreter.getSparkUIUrl());
 
-    InterpreterResult result =
-        interpreter.interpret("val a=\"hello world\"", getInterpreterContext());
+    InterpreterResult result = interpreter.interpret("val a=\"hello world\"", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals("a: String = hello world\n", output);
 
@@ -121,13 +120,11 @@ public class NewSparkInterpreterTest {
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
     // single line comment
-    result =
-        interpreter.interpret("print(\"hello world\")/*comment here*/", getInterpreterContext());
+    result = interpreter.interpret("print(\"hello world\")/*comment here*/", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals("hello world", output);
 
-    result =
-        interpreter.interpret("/*comment here*/\nprint(\"hello world\")", getInterpreterContext());
+    result = interpreter.interpret("/*comment here*/\nprint(\"hello world\")", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
     // multiple line comment
@@ -135,32 +132,27 @@ public class NewSparkInterpreterTest {
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
     // test function
-    result =
-        interpreter.interpret("def add(x:Int, y:Int)\n{ return x+y }", getInterpreterContext());
+    result = interpreter.interpret("def add(x:Int, y:Int)\n{ return x+y }", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
     result = interpreter.interpret("print(add(1,2))", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
-    result =
-        interpreter.interpret(
-            "/*line 1 \n line 2*/print(\"hello world\")", getInterpreterContext());
+    result = interpreter.interpret("/*line 1 \n line 2*/print(\"hello world\")", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
+
     // Companion object with case class
-    result =
-        interpreter.interpret(
-            "import scala.math._\n"
-                + "object Circle {\n"
-                + "  private def calculateArea(radius: Double): Double = Pi * pow(radius, 2.0)\n"
-                + "}\n"
-                + "case class Circle(radius: Double) {\n"
-                + "  import Circle._\n"
-                + "  def area: Double = calculateArea(radius)\n"
-                + "}\n"
-                + "\n"
-                + "val circle1 = new Circle(5.0)",
-            getInterpreterContext());
+    result = interpreter.interpret("import scala.math._\n" +
+        "object Circle {\n" +
+        "  private def calculateArea(radius: Double): Double = Pi * pow(radius, 2.0)\n" +
+        "}\n" +
+        "case class Circle(radius: Double) {\n" +
+        "  import Circle._\n" +
+        "  def area: Double = calculateArea(radius)\n" +
+        "}\n" +
+        "\n" +
+        "val circle1 = new Circle(5.0)", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
     // spark rdd operation
@@ -172,22 +164,19 @@ public class NewSparkInterpreterTest {
     verify(mockRemoteEventClient).onParaInfosReceived(any(Map.class));
 
     // case class
-    result =
-        interpreter.interpret("val bankText = sc.textFile(\"bank.csv\")", getInterpreterContext());
+    result = interpreter.interpret("val bankText = sc.textFile(\"bank.csv\")", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
-    result =
-        interpreter.interpret(
-            "case class Bank(age:Integer, job:String, marital : String, education : String, balance : Integer)\n"
-                + "val bank = bankText.map(s=>s.split(\";\")).filter(s => s(0)!=\"\\\"age\\\"\").map(\n"
-                + "    s => Bank(s(0).toInt, \n"
-                + "            s(1).replaceAll(\"\\\"\", \"\"),\n"
-                + "            s(2).replaceAll(\"\\\"\", \"\"),\n"
-                + "            s(3).replaceAll(\"\\\"\", \"\"),\n"
-                + "            s(5).replaceAll(\"\\\"\", \"\").toInt\n"
-                + "        )\n"
-                + ").toDF()",
-            getInterpreterContext());
+    result = interpreter.interpret(
+        "case class Bank(age:Integer, job:String, marital : String, education : String, balance : Integer)\n" +
+            "val bank = bankText.map(s=>s.split(\";\")).filter(s => s(0)!=\"\\\"age\\\"\").map(\n" +
+            "    s => Bank(s(0).toInt, \n" +
+            "            s(1).replaceAll(\"\\\"\", \"\"),\n" +
+            "            s(2).replaceAll(\"\\\"\", \"\"),\n" +
+            "            s(3).replaceAll(\"\\\"\", \"\"),\n" +
+            "            s(5).replaceAll(\"\\\"\", \"\").toInt\n" +
+            "        )\n" +
+            ").toDF()", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
     // spark version
@@ -200,36 +189,32 @@ public class NewSparkInterpreterTest {
       result = interpreter.interpret("sqlContext", getInterpreterContext());
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
-      result =
-          interpreter.interpret(
-              "val df = sqlContext.createDataFrame(Seq((1,\"a\"),(2, null)))\n" + "df.show()",
-              getInterpreterContext());
+      result = interpreter.interpret(
+          "val df = sqlContext.createDataFrame(Seq((1,\"a\"),(2, null)))\n" +
+              "df.show()", getInterpreterContext());
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
-      assertTrue(
-          output.contains(
-              "+---+----+\n"
-                  + "| _1|  _2|\n"
-                  + "+---+----+\n"
-                  + "|  1|   a|\n"
-                  + "|  2|null|\n"
-                  + "+---+----+"));
+      assertTrue(output.contains(
+          "+---+----+\n" +
+              "| _1|  _2|\n" +
+              "+---+----+\n" +
+              "|  1|   a|\n" +
+              "|  2|null|\n" +
+              "+---+----+"));
     } else if (version.contains("String = 2.")) {
       result = interpreter.interpret("spark", getInterpreterContext());
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
-      result =
-          interpreter.interpret(
-              "val df = spark.createDataFrame(Seq((1,\"a\"),(2, null)))\n" + "df.show()",
-              getInterpreterContext());
+      result = interpreter.interpret(
+          "val df = spark.createDataFrame(Seq((1,\"a\"),(2, null)))\n" +
+              "df.show()", getInterpreterContext());
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
-      assertTrue(
-          output.contains(
-              "+---+----+\n"
-                  + "| _1|  _2|\n"
-                  + "+---+----+\n"
-                  + "|  1|   a|\n"
-                  + "|  2|null|\n"
-                  + "+---+----+"));
+      assertTrue(output.contains(
+          "+---+----+\n" +
+              "| _1|  _2|\n" +
+              "+---+----+\n" +
+              "|  1|   a|\n" +
+              "|  2|null|\n" +
+              "+---+----+"));
     }
 
     // ZeppelinContext
@@ -257,10 +242,7 @@ public class NewSparkInterpreterTest {
     assertEquals("pwd", pwd.getName());
 
     context = getInterpreterContext();
-    result =
-        interpreter.interpret(
-            "z.checkbox(\"checkbox_1\", Seq(\"value_2\"), Seq((\"value_1\", \"name_1\"), (\"value_2\", \"name_2\")))",
-            context);
+    result = interpreter.interpret("z.checkbox(\"checkbox_1\", Seq(\"value_2\"), Seq((\"value_1\", \"name_1\"), (\"value_2\", \"name_2\")))", context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals(1, context.getGui().getForms().size());
     assertTrue(context.getGui().getForms().get("checkbox_1") instanceof CheckBox);
@@ -275,17 +257,13 @@ public class NewSparkInterpreterTest {
     assertEquals("name_2", checkBox.getOptions()[1].getDisplayName());
 
     context = getInterpreterContext();
-    result =
-        interpreter.interpret(
-            "z.select(\"select_1\", Seq(\"value_2\"), Seq((\"value_1\", \"name_1\"), (\"value_2\", \"name_2\")))",
-            context);
+    result = interpreter.interpret("z.select(\"select_1\", Seq(\"value_2\"), Seq((\"value_1\", \"name_1\"), (\"value_2\", \"name_2\")))", context);
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals(1, context.getGui().getForms().size());
     assertTrue(context.getGui().getForms().get("select_1") instanceof Select);
     Select select = (Select) context.getGui().getForms().get("select_1");
     assertEquals("select_1", select.getName());
-    // TODO(zjffdu) it seems a bug of GUI, the default value should be 'value_2', but it is
-    // List(value_2)
+    // TODO(zjffdu) it seems a bug of GUI, the default value should be 'value_2', but it is List(value_2)
     // assertEquals("value_2", select.getDefaultValue());
     assertEquals(2, select.getOptions().length);
     assertEquals("value_1", select.getOptions()[0].getValue());
@@ -293,9 +271,9 @@ public class NewSparkInterpreterTest {
     assertEquals("value_2", select.getOptions()[1].getValue());
     assertEquals("name_2", select.getOptions()[1].getDisplayName());
 
+
     // completions
-    List<InterpreterCompletion> completions =
-        interpreter.completion("a.", 2, getInterpreterContext());
+    List<InterpreterCompletion> completions = interpreter.completion("a.", 2, getInterpreterContext());
     assertTrue(completions.size() > 0);
 
     completions = interpreter.completion("a.isEm", 6, getInterpreterContext());
@@ -306,57 +284,43 @@ public class NewSparkInterpreterTest {
     assertEquals(1, completions.size());
     assertEquals("range", completions.get(0).name);
 
+
     // Zeppelin-Display
-    result =
-        interpreter.interpret(
-            "import org.apache.zeppelin.display.angular.notebookscope._\n" + "import AngularElem._",
-            getInterpreterContext());
+    result = interpreter.interpret("import org.apache.zeppelin.display.angular.notebookscope._\n" +
+        "import AngularElem._", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
-    result =
-        interpreter.interpret(
-            "<div style=\"color:blue\">\n"
-                + "<h4>Hello Angular Display System</h4>\n"
-                + "</div>.display",
-            getInterpreterContext());
+    result = interpreter.interpret("<div style=\"color:blue\">\n" +
+        "<h4>Hello Angular Display System</h4>\n" +
+        "</div>.display", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals(InterpreterResult.Type.ANGULAR, messageOutput.getType());
-    assertTrue(
-        messageOutput
-            .toInterpreterResultMessage()
-            .getData()
-            .contains("Hello Angular Display System"));
-
-    result =
-        interpreter.interpret(
-            "<div class=\"btn btn-success\">\n"
-                + "  Click me\n"
-                + "</div>.onClick{() =>\n"
-                + "  println(\"hello world\")\n"
-                + "}.display",
-            getInterpreterContext());
+    assertTrue(messageOutput.toInterpreterResultMessage().getData().contains("Hello Angular Display System"));
+
+    result = interpreter.interpret("<div class=\"btn btn-success\">\n" +
+        "  Click me\n" +
+        "</div>.onClick{() =>\n" +
+        "  println(\"hello world\")\n" +
+        "}.display", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals(InterpreterResult.Type.ANGULAR, messageOutput.getType());
     assertTrue(messageOutput.toInterpreterResultMessage().getData().contains("Click me"));
 
     // getProgress
     final InterpreterContext context2 = getInterpreterContext();
-    Thread interpretThread =
-        new Thread() {
-          @Override
-          public void run() {
-            InterpreterResult result = null;
-            try {
-              result =
-                  interpreter.interpret(
-                      "val df = sc.parallelize(1 to 10, 2).foreach(e=>Thread.sleep(1000))",
-                      context2);
-            } catch (InterpreterException e) {
-              e.printStackTrace();
-            }
-            assertEquals(InterpreterResult.Code.SUCCESS, result.code());
-          }
-        };
+    Thread interpretThread = new Thread() {
+      @Override
+      public void run() {
+        InterpreterResult result = null;
+        try {
+          result = interpreter.interpret(
+              "val df = sc.parallelize(1 to 10, 2).foreach(e=>Thread.sleep(1000))", context2);
+        } catch (InterpreterException e) {
+          e.printStackTrace();
+        }
+        assertEquals(InterpreterResult.Code.SUCCESS, result.code());
+      }
+    };
     interpretThread.start();
     boolean nonZeroProgress = false;
     int progress = 0;
@@ -372,23 +336,20 @@ public class NewSparkInterpreterTest {
 
     // cancel
     final InterpreterContext context3 = getInterpreterContext();
-    interpretThread =
-        new Thread() {
-          @Override
-          public void run() {
-            InterpreterResult result = null;
-            try {
-              result =
-                  interpreter.interpret(
-                      "val df = sc.parallelize(1 to 10, 2).foreach(e=>Thread.sleep(1000))",
-                      context3);
-            } catch (InterpreterException e) {
-              e.printStackTrace();
-            }
-            assertEquals(InterpreterResult.Code.ERROR, result.code());
-            assertTrue(output.contains("cancelled"));
-          }
-        };
+    interpretThread = new Thread() {
+      @Override
+      public void run() {
+        InterpreterResult result = null;
+        try {
+          result = interpreter.interpret(
+              "val df = sc.parallelize(1 to 10, 2).foreach(e=>Thread.sleep(1000))", context3);
+        } catch (InterpreterException e) {
+          e.printStackTrace();
+        }
+        assertEquals(InterpreterResult.Code.ERROR, result.code());
+        assertTrue(output.contains("cancelled"));
+      }
+    };
 
     interpretThread.start();
     // sleep 1 second to wait for the spark job start
@@ -406,9 +367,7 @@ public class NewSparkInterpreterTest {
     properties.setProperty("zeppelin.spark.useNew", "true");
 
     // download spark-avro jar
-    URL website =
-        new URL(
-            "http://repo1.maven.org/maven2/com/databricks/spark-avro_2.11/3.2.0/spark-avro_2.11-3.2.0.jar");
+    URL website = new URL("http://repo1.maven.org/maven2/com/databricks/spark-avro_2.11/3.2.0/spark-avro_2.11-3.2.0.jar");
     ReadableByteChannel rbc = Channels.newChannel(website.openStream());
     File avroJarFile = new File("spark-avro_2.11-3.2.0.jar");
     FileOutputStream fos = new FileOutputStream(avroJarFile);
@@ -421,13 +380,11 @@ public class NewSparkInterpreterTest {
     interpreter.setInterpreterGroup(mock(InterpreterGroup.class));
     interpreter.open();
 
-    InterpreterResult result =
-        interpreter.interpret("import com.databricks.spark.avro._", getInterpreterContext());
+    InterpreterResult result = interpreter.interpret("import com.databricks.spark.avro._", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
   }
 
-  // TODO(zjffdu) This unit test will fail due to classpath issue, should enable it after the
-  // classpath issue is fixed.
+  //TODO(zjffdu) This unit test will fail due to classpath issue, should enable it after the classpath issue is fixed.
   @Ignore
   public void testDepInterpreter() throws InterpreterException {
     Properties properties = new Properties();
@@ -449,8 +406,7 @@ public class NewSparkInterpreterTest {
 
     depInterpreter.open();
     InterpreterResult result =
-        depInterpreter.interpret(
-            "z.load(\"com.databricks:spark-avro_2.11:3.2.0\")", getInterpreterContext());
+        depInterpreter.interpret("z.load(\"com.databricks:spark-avro_2.11:3.2.0\")", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
 
     interpreter.open();
@@ -474,8 +430,7 @@ public class NewSparkInterpreterTest {
     interpreter.setInterpreterGroup(mock(InterpreterGroup.class));
     interpreter.open();
 
-    InterpreterResult result =
-        interpreter.interpret("val a=\"hello world\"", getInterpreterContext());
+    InterpreterResult result = interpreter.interpret("val a=\"hello world\"", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     // no output for define new variable
     assertEquals("", output);
@@ -577,17 +532,19 @@ public class NewSparkInterpreterTest {
 
   private InterpreterContext getInterpreterContext() {
     output = "";
-    InterpreterContext context =
-        InterpreterContext.builder()
-            .setInterpreterOut(new InterpreterOutput(null))
-            .setIntpEventClient(mockRemoteEventClient)
-            .setAngularObjectRegistry(new AngularObjectRegistry("spark", null))
-            .build();
+    InterpreterContext context = InterpreterContext.builder()
+        .setInterpreterOut(new InterpreterOutput(null))
+        .setIntpEventClient(mockRemoteEventClient)
+        .setAngularObjectRegistry(new AngularObjectRegistry("spark", null))
+        .build();
     context.out =
         new InterpreterOutput(
+
             new InterpreterOutputListener() {
               @Override
-              public void onUpdateAll(InterpreterOutput out) {}
+              public void onUpdateAll(InterpreterOutput out) {
+
+              }
 
               @Override
               public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkSqlInterpreterTest.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkSqlInterpreterTest.java b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkSqlInterpreterTest.java
index cac3295..ed91ffe 100644
--- a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkSqlInterpreterTest.java
+++ b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkSqlInterpreterTest.java
@@ -17,12 +17,6 @@
 
 package org.apache.zeppelin.spark;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-
-import java.util.LinkedList;
-import java.util.Properties;
 import org.apache.zeppelin.display.AngularObjectRegistry;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
@@ -37,6 +31,13 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.util.LinkedList;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+
 public class NewSparkSqlInterpreterTest {
 
   private static SparkSqlInterpreter sqlInterpreter;
@@ -63,16 +64,15 @@ public class NewSparkSqlInterpreterTest {
     intpGroup.get("session_1").add(sparkInterpreter);
     intpGroup.get("session_1").add(sqlInterpreter);
 
-    context =
-        InterpreterContext.builder()
-            .setNoteId("noteId")
-            .setParagraphId("paragraphId")
-            .setParagraphTitle("title")
-            .setAngularObjectRegistry(new AngularObjectRegistry(intpGroup.getId(), null))
-            .setResourcePool(new LocalResourcePool("id"))
-            .setInterpreterOut(new InterpreterOutput(null))
-            .setIntpEventClient(mock(RemoteInterpreterEventClient.class))
-            .build();
+    context = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .setParagraphTitle("title")
+        .setAngularObjectRegistry(new AngularObjectRegistry(intpGroup.getId(), null))
+        .setResourcePool(new LocalResourcePool("id"))
+        .setInterpreterOut(new InterpreterOutput(null))
+        .setIntpEventClient(mock(RemoteInterpreterEventClient.class))
+        .build();
     InterpreterContext.set(context);
 
     sparkInterpreter.open();
@@ -88,13 +88,10 @@ public class NewSparkSqlInterpreterTest {
   @Test
   public void test() throws InterpreterException {
     sparkInterpreter.interpret("case class Test(name:String, age:Int)", context);
-    sparkInterpreter.interpret(
-        "val test = sc.parallelize(Seq(Test(\"moon\", 33), Test(\"jobs\", 51), Test(\"gates\", 51), Test(\"park\", 34)))",
-        context);
+    sparkInterpreter.interpret("val test = sc.parallelize(Seq(Test(\"moon\", 33), Test(\"jobs\", 51), Test(\"gates\", 51), Test(\"park\", 34)))", context);
     sparkInterpreter.interpret("test.toDF.registerTempTable(\"test\")", context);
 
-    InterpreterResult ret =
-        sqlInterpreter.interpret("select name, age from test where age < 40", context);
+    InterpreterResult ret = sqlInterpreter.interpret("select name, age from test where age < 40", context);
     assertEquals(InterpreterResult.Code.SUCCESS, ret.code());
     assertEquals(Type.TABLE, ret.message().get(0).getType());
     assertEquals("name\tage\nmoon\t33\npark\t34\n", ret.message().get(0).getData());
@@ -103,11 +100,7 @@ public class NewSparkSqlInterpreterTest {
     assertEquals(InterpreterResult.Code.ERROR, ret.code());
     assertTrue(ret.message().get(0).getData().length() > 0);
 
-    assertEquals(
-        InterpreterResult.Code.SUCCESS,
-        sqlInterpreter
-            .interpret("select case when name='aa' then name else name end from test", context)
-            .code());
+    assertEquals(InterpreterResult.Code.SUCCESS, sqlInterpreter.interpret("select case when name='aa' then name else name end from test", context).code());
   }
 
   @Test
@@ -136,14 +129,17 @@ public class NewSparkSqlInterpreterTest {
         "val schema = StructType(Seq(StructField(\"name\", StringType, false),StructField(\"age\" , IntegerType, true),StructField(\"other\" , StringType, false)))",
         context);
     sparkInterpreter.interpret(
-        "val csv = sc.parallelize(Seq((\"jobs, 51, apple\"), (\"gates, , microsoft\")))", context);
+        "val csv = sc.parallelize(Seq((\"jobs, 51, apple\"), (\"gates, , microsoft\")))",
+        context);
     sparkInterpreter.interpret(
-        "val raw = csv.map(_.split(\",\")).map(p => Row(p(0),toInt(p(1)),p(2)))", context);
-    sparkInterpreter.interpret("val people = sqlContext.createDataFrame(raw, schema)", context);
+        "val raw = csv.map(_.split(\",\")).map(p => Row(p(0),toInt(p(1)),p(2)))",
+        context);
+    sparkInterpreter.interpret("val people = sqlContext.createDataFrame(raw, schema)",
+        context);
     sparkInterpreter.interpret("people.toDF.registerTempTable(\"people\")", context);
 
-    InterpreterResult ret =
-        sqlInterpreter.interpret("select name, age from people where name = 'gates'", context);
+    InterpreterResult ret = sqlInterpreter.interpret(
+        "select name, age from people where name = 'gates'", context);
     assertEquals(InterpreterResult.Code.SUCCESS, ret.code());
     assertEquals(Type.TABLE, ret.message().get(0).getType());
     assertEquals("name\tage\ngates\tnull\n", ret.message().get(0).getData());
@@ -165,38 +161,34 @@ public class NewSparkSqlInterpreterTest {
   @Test
   public void testConcurrentSQL() throws InterpreterException, InterruptedException {
     if (sparkInterpreter.getSparkVersion().isSpark2()) {
-      sparkInterpreter.interpret(
-          "spark.udf.register(\"sleep\", (e:Int) => {Thread.sleep(e*1000); e})", context);
+      sparkInterpreter.interpret("spark.udf.register(\"sleep\", (e:Int) => {Thread.sleep(e*1000); e})", context);
     } else {
-      sparkInterpreter.interpret(
-          "sqlContext.udf.register(\"sleep\", (e:Int) => {Thread.sleep(e*1000); e})", context);
+      sparkInterpreter.interpret("sqlContext.udf.register(\"sleep\", (e:Int) => {Thread.sleep(e*1000); e})", context);
     }
 
-    Thread thread1 =
-        new Thread() {
-          @Override
-          public void run() {
-            try {
-              InterpreterResult result = sqlInterpreter.interpret("select sleep(10)", context);
-              assertEquals(InterpreterResult.Code.SUCCESS, result.code());
-            } catch (InterpreterException e) {
-              e.printStackTrace();
-            }
-          }
-        };
-
-    Thread thread2 =
-        new Thread() {
-          @Override
-          public void run() {
-            try {
-              InterpreterResult result = sqlInterpreter.interpret("select sleep(10)", context);
-              assertEquals(InterpreterResult.Code.SUCCESS, result.code());
-            } catch (InterpreterException e) {
-              e.printStackTrace();
-            }
-          }
-        };
+    Thread thread1 = new Thread() {
+      @Override
+      public void run() {
+        try {
+          InterpreterResult result = sqlInterpreter.interpret("select sleep(10)", context);
+          assertEquals(InterpreterResult.Code.SUCCESS, result.code());
+        } catch (InterpreterException e) {
+          e.printStackTrace();
+        }
+      }
+    };
+
+    Thread thread2 = new Thread() {
+      @Override
+      public void run() {
+        try {
+          InterpreterResult result = sqlInterpreter.interpret("select sleep(10)", context);
+          assertEquals(InterpreterResult.Code.SUCCESS, result.code());
+        } catch (InterpreterException e) {
+          e.printStackTrace();
+        }
+      }
+    };
 
     // start running 2 spark sql, each would sleep 10 seconds, the totally running time should
     // be less than 20 seconds, which means they run concurrently.
@@ -206,6 +198,8 @@ public class NewSparkSqlInterpreterTest {
     thread1.join();
     thread2.join();
     long end = System.currentTimeMillis();
-    assertTrue("running time must be less than 20 seconds", ((end - start) / 1000) < 20);
+    assertTrue("running time must be less than 20 seconds", ((end - start)/1000) < 20);
+
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/test/java/org/apache/zeppelin/spark/OldSparkInterpreterTest.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/OldSparkInterpreterTest.java b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/OldSparkInterpreterTest.java
index 12e3252..8ae66b2 100644
--- a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/OldSparkInterpreterTest.java
+++ b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/OldSparkInterpreterTest.java
@@ -17,14 +17,6 @@
 
 package org.apache.zeppelin.spark;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Properties;
 import org.apache.spark.SparkConf;
 import org.apache.zeppelin.display.AngularObjectRegistry;
 import org.apache.zeppelin.interpreter.Interpreter;
@@ -49,10 +41,21 @@ import org.junit.runners.MethodSorters;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 public class OldSparkInterpreterTest {
 
-  @ClassRule public static TemporaryFolder tmpDir = new TemporaryFolder();
+  @ClassRule
+  public static TemporaryFolder tmpDir = new TemporaryFolder();
 
   static SparkInterpreter repl;
   static InterpreterGroup intpGroup;
@@ -60,7 +63,8 @@ public class OldSparkInterpreterTest {
   static Logger LOGGER = LoggerFactory.getLogger(OldSparkInterpreterTest.class);
 
   /**
-   * Get spark version number as a numerical value. eg. 1.1.x => 11, 1.2.x => 12, 1.3.x => 13 ...
+   * Get spark version number as a numerical value.
+   * eg. 1.1.x => 11, 1.2.x => 12, 1.3.x => 13 ...
    */
   public static int getSparkVersionNumber(SparkInterpreter repl) {
     if (repl == null) {
@@ -87,16 +91,15 @@ public class OldSparkInterpreterTest {
   @BeforeClass
   public static void setUp() throws Exception {
     intpGroup = new InterpreterGroup();
-    context =
-        InterpreterContext.builder()
-            .setNoteId("noteId")
-            .setParagraphId("paragraphId")
-            .setParagraphTitle("title")
-            .setAngularObjectRegistry(new AngularObjectRegistry(intpGroup.getId(), null))
-            .setResourcePool(new LocalResourcePool("id"))
-            .setInterpreterOut(new InterpreterOutput(null))
-            .setIntpEventClient(mock(RemoteInterpreterEventClient.class))
-            .build();
+    context = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .setParagraphTitle("title")
+        .setAngularObjectRegistry(new AngularObjectRegistry(intpGroup.getId(), null))
+        .setResourcePool(new LocalResourcePool("id"))
+        .setInterpreterOut(new InterpreterOutput(null))
+        .setIntpEventClient(mock(RemoteInterpreterEventClient.class))
+        .build();
     InterpreterContext.set(context);
 
     intpGroup.put("note", new LinkedList<Interpreter>());
@@ -105,10 +108,10 @@ public class OldSparkInterpreterTest {
     intpGroup.get("note").add(repl);
     repl.open();
     // The first para interpretdr will set the Eventclient wrapper
-    // SparkInterpreter.interpret(String, InterpreterContext) ->
-    // SparkInterpreter.populateSparkWebUrl(InterpreterContext) ->
-    // ZeppelinContext.setEventClient(RemoteEventClientWrapper)
-    // running a dummy to ensure that we dont have any race conditions among tests
+    //SparkInterpreter.interpret(String, InterpreterContext) ->
+    //SparkInterpreter.populateSparkWebUrl(InterpreterContext) ->
+    //ZeppelinContext.setEventClient(RemoteEventClientWrapper)
+    //running a dummy to ensure that we dont have any race conditions among tests
     repl.interpret("sc", context);
   }
 
@@ -119,14 +122,14 @@ public class OldSparkInterpreterTest {
 
   @Test
   public void testBasicIntp() throws InterpreterException {
-    assertEquals(
-        InterpreterResult.Code.SUCCESS, repl.interpret("val a = 1\nval b = 2", context).code());
+    assertEquals(InterpreterResult.Code.SUCCESS,
+        repl.interpret("val a = 1\nval b = 2", context).code());
 
     // when interpret incomplete expression
     InterpreterResult incomplete = repl.interpret("val a = \"\"\"", context);
     assertEquals(InterpreterResult.Code.INCOMPLETE, incomplete.code());
     assertTrue(incomplete.message().get(0).getData().length() > 0); // expecting some error
-    // message
+                                                   // message
 
     /*
      * assertEquals(1, repl.getValue("a")); assertEquals(2, repl.getValue("b"));
@@ -150,41 +153,30 @@ public class OldSparkInterpreterTest {
 
   @Test
   public void testNextLineComments() throws InterpreterException {
-    assertEquals(
-        InterpreterResult.Code.SUCCESS,
-        repl.interpret("\"123\"\n/*comment here\n*/.toInt", context).code());
+    assertEquals(InterpreterResult.Code.SUCCESS, repl.interpret("\"123\"\n/*comment here\n*/.toInt", context).code());
   }
 
   @Test
   public void testNextLineCompanionObject() throws InterpreterException {
-    String code =
-        "class Counter {\nvar value: Long = 0\n}\n // comment\n\n object Counter {\n def apply(x: Long) = new Counter()\n}";
+    String code = "class Counter {\nvar value: Long = 0\n}\n // comment\n\n object Counter {\n def apply(x: Long) = new Counter()\n}";
     assertEquals(InterpreterResult.Code.SUCCESS, repl.interpret(code, context).code());
   }
 
   @Test
   public void testEndWithComment() throws InterpreterException {
-    assertEquals(
-        InterpreterResult.Code.SUCCESS, repl.interpret("val c=1\n//comment", context).code());
+    assertEquals(InterpreterResult.Code.SUCCESS, repl.interpret("val c=1\n//comment", context).code());
   }
 
   @Test
   public void testCreateDataFrame() throws InterpreterException {
     if (getSparkVersionNumber(repl) >= 13) {
       repl.interpret("case class Person(name:String, age:Int)\n", context);
-      repl.interpret(
-          "val people = sc.parallelize(Seq(Person(\"moon\", 33), Person(\"jobs\", 51), Person(\"gates\", 51), Person(\"park\", 34)))\n",
-          context);
+      repl.interpret("val people = sc.parallelize(Seq(Person(\"moon\", 33), Person(\"jobs\", 51), Person(\"gates\", 51), Person(\"park\", 34)))\n", context);
       repl.interpret("people.toDF.count", context);
-      assertEquals(
-          new Long(4),
-          context
-              .getResourcePool()
-              .get(
-                  context.getNoteId(),
-                  context.getParagraphId(),
-                  WellKnownResourceName.ZeppelinReplResult.toString())
-              .get());
+      assertEquals(new Long(4), context.getResourcePool().get(
+          context.getNoteId(),
+          context.getParagraphId(),
+          WellKnownResourceName.ZeppelinReplResult.toString()).get());
     }
   }
 
@@ -192,26 +184,23 @@ public class OldSparkInterpreterTest {
   public void testZShow() throws InterpreterException {
     String code = "";
     repl.interpret("case class Person(name:String, age:Int)\n", context);
-    repl.interpret(
-        "val people = sc.parallelize(Seq(Person(\"moon\", 33), Person(\"jobs\", 51), Person(\"gates\", 51), Person(\"park\", 34)))\n",
-        context);
+    repl.interpret("val people = sc.parallelize(Seq(Person(\"moon\", 33), Person(\"jobs\", 51), Person(\"gates\", 51), Person(\"park\", 34)))\n", context);
     if (getSparkVersionNumber(repl) < 13) {
       repl.interpret("people.registerTempTable(\"people\")", context);
       code = "z.show(sqlc.sql(\"select * from people\"))";
     } else {
       code = "z.show(people.toDF)";
     }
-    assertEquals(Code.SUCCESS, repl.interpret(code, context).code());
+      assertEquals(Code.SUCCESS, repl.interpret(code, context).code());
   }
 
   @Test
   public void testSparkSql() throws IOException, InterpreterException {
     repl.interpret("case class Person(name:String, age:Int)\n", context);
-    repl.interpret(
-        "val people = sc.parallelize(Seq(Person(\"moon\", 33), Person(\"jobs\", 51), Person(\"gates\", 51), Person(\"park\", 34)))\n",
-        context);
+    repl.interpret("val people = sc.parallelize(Seq(Person(\"moon\", 33), Person(\"jobs\", 51), Person(\"gates\", 51), Person(\"park\", 34)))\n", context);
     assertEquals(Code.SUCCESS, repl.interpret("people.take(3)", context).code());
 
+
     if (getSparkVersionNumber(repl) <= 11) { // spark 1.2 or later does not allow create multiple
       // SparkContext in the same jvm by default.
       // create new interpreter
@@ -221,9 +210,7 @@ public class OldSparkInterpreterTest {
       repl2.open();
 
       repl2.interpret("case class Man(name:String, age:Int)", context);
-      repl2.interpret(
-          "val man = sc.parallelize(Seq(Man(\"moon\", 33), Man(\"jobs\", 51), Man(\"gates\", 51), Man(\"park\", 34)))",
-          context);
+      repl2.interpret("val man = sc.parallelize(Seq(Man(\"moon\", 33), Man(\"jobs\", 51), Man(\"gates\", 51), Man(\"park\", 34)))", context);
       assertEquals(Code.SUCCESS, repl2.interpret("man.take(3)", context).code());
       repl2.close();
     }
@@ -231,9 +218,8 @@ public class OldSparkInterpreterTest {
 
   @Test
   public void testReferencingUndefinedVal() throws InterpreterException {
-    InterpreterResult result =
-        repl.interpret(
-            "def category(min: Int) = {" + "    if (0 <= value) \"error\"" + "}", context);
+    InterpreterResult result = repl.interpret("def category(min: Int) = {"
+        + "    if (0 <= value) \"error\"" + "}", context);
     assertEquals(Code.ERROR, result.code());
   }
 
@@ -246,26 +232,23 @@ public class OldSparkInterpreterTest {
       String value = (String) intpProperty.get(key);
       LOGGER.debug(String.format("[%s]: [%s]", key, value));
       if (key.startsWith("spark.") && value.isEmpty()) {
-        assertTrue(
-            String.format("configuration starting from 'spark.' should not be empty. [%s]", key),
-            !sparkConf.contains(key) || !sparkConf.get(key).isEmpty());
+        assertTrue(String.format("configuration starting from 'spark.' should not be empty. [%s]", key), !sparkConf.contains(key) || !sparkConf.get(key).isEmpty());
       }
     }
   }
 
   @Test
-  public void shareSingleSparkContext()
-      throws InterruptedException, IOException, InterpreterException {
+  public void shareSingleSparkContext() throws InterruptedException, IOException, InterpreterException {
     // create another SparkInterpreter
     SparkInterpreter repl2 = new SparkInterpreter(getSparkTestProperties(tmpDir));
     repl2.setInterpreterGroup(intpGroup);
     intpGroup.get("note").add(repl2);
     repl2.open();
 
-    assertEquals(
-        Code.SUCCESS, repl.interpret("print(sc.parallelize(1 to 10).count())", context).code());
-    assertEquals(
-        Code.SUCCESS, repl2.interpret("print(sc.parallelize(1 to 10).count())", context).code());
+    assertEquals(Code.SUCCESS,
+        repl.interpret("print(sc.parallelize(1 to 10).count())", context).code());
+    assertEquals(Code.SUCCESS,
+        repl2.interpret("print(sc.parallelize(1 to 10).count())", context).code());
 
     repl2.close();
   }
@@ -314,17 +297,17 @@ public class OldSparkInterpreterTest {
   @Test
   public void testMultilineCompletion() throws InterpreterException {
     String buf = "val x = 1\nsc.";
-    List<InterpreterCompletion> completions = repl.completion(buf, buf.length(), null);
+	List<InterpreterCompletion> completions = repl.completion(buf, buf.length(), null);
     assertTrue(completions.size() > 0);
   }
 
   @Test
   public void testMultilineCompletionNewVar() throws InterpreterException {
     Assume.assumeFalse("this feature does not work with scala 2.10", Utils.isScala2_10());
-    Assume.assumeTrue(
-        "This feature does not work with scala < 2.11.8", Utils.isCompilerAboveScala2_11_7());
+    Assume.assumeTrue("This feature does not work with scala < 2.11.8", Utils.isCompilerAboveScala2_11_7());
     String buf = "val x = sc\nx.";
-    List<InterpreterCompletion> completions = repl.completion(buf, buf.length(), null);
+	  List<InterpreterCompletion> completions = repl.completion(buf, buf.length(), null);
     assertTrue(completions.size() > 0);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/test/java/org/apache/zeppelin/spark/OldSparkSqlInterpreterTest.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/OldSparkSqlInterpreterTest.java b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/OldSparkSqlInterpreterTest.java
index f69eb0c..fa1e257 100644
--- a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/OldSparkSqlInterpreterTest.java
+++ b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/OldSparkSqlInterpreterTest.java
@@ -17,12 +17,6 @@
 
 package org.apache.zeppelin.spark;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-
-import java.util.LinkedList;
-import java.util.Properties;
 import org.apache.zeppelin.display.AngularObjectRegistry;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
@@ -39,9 +33,17 @@ import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
+import java.util.LinkedList;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+
 public class OldSparkSqlInterpreterTest {
 
-  @ClassRule public static TemporaryFolder tmpDir = new TemporaryFolder();
+  @ClassRule
+  public static TemporaryFolder tmpDir = new TemporaryFolder();
 
   static SparkSqlInterpreter sql;
   static SparkInterpreter repl;
@@ -72,16 +74,15 @@ public class OldSparkSqlInterpreterTest {
     sql.setInterpreterGroup(intpGroup);
     sql.open();
 
-    context =
-        InterpreterContext.builder()
-            .setNoteId("noteId")
-            .setParagraphId("paragraphId")
-            .setParagraphTitle("title")
-            .setAngularObjectRegistry(new AngularObjectRegistry(intpGroup.getId(), null))
-            .setResourcePool(new LocalResourcePool("id"))
-            .setInterpreterOut(new InterpreterOutput(null))
-            .setIntpEventClient(mock(RemoteInterpreterEventClient.class))
-            .build();
+    context = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .setParagraphTitle("title")
+        .setAngularObjectRegistry(new AngularObjectRegistry(intpGroup.getId(), null))
+        .setResourcePool(new LocalResourcePool("id"))
+        .setInterpreterOut(new InterpreterOutput(null))
+        .setIntpEventClient(mock(RemoteInterpreterEventClient.class))
+        .build();
   }
 
   @AfterClass
@@ -97,9 +98,7 @@ public class OldSparkSqlInterpreterTest {
   @Test
   public void test() throws InterpreterException {
     repl.interpret("case class Test(name:String, age:Int)", context);
-    repl.interpret(
-        "val test = sc.parallelize(Seq(Test(\"moon\", 33), Test(\"jobs\", 51), Test(\"gates\", 51), Test(\"park\", 34)))",
-        context);
+    repl.interpret("val test = sc.parallelize(Seq(Test(\"moon\", 33), Test(\"jobs\", 51), Test(\"gates\", 51), Test(\"park\", 34)))", context);
     if (isDataFrameSupported()) {
       repl.interpret("test.toDF.registerTempTable(\"test\")", context);
     } else {
@@ -115,10 +114,7 @@ public class OldSparkSqlInterpreterTest {
     assertEquals(InterpreterResult.Code.ERROR, ret.code());
     assertTrue(ret.message().get(0).getData().length() > 0);
 
-    assertEquals(
-        InterpreterResult.Code.SUCCESS,
-        sql.interpret("select case when name==\"aa\" then name else name end from test", context)
-            .code());
+    assertEquals(InterpreterResult.Code.SUCCESS, sql.interpret("select case when name==\"aa\" then name else name end from test", context).code());
   }
 
   @Test
@@ -153,19 +149,23 @@ public class OldSparkSqlInterpreterTest {
         "val schema = StructType(Seq(StructField(\"name\", StringType, false),StructField(\"age\" , IntegerType, true),StructField(\"other\" , StringType, false)))",
         context);
     repl.interpret(
-        "val csv = sc.parallelize(Seq((\"jobs, 51, apple\"), (\"gates, , microsoft\")))", context);
+        "val csv = sc.parallelize(Seq((\"jobs, 51, apple\"), (\"gates, , microsoft\")))",
+        context);
     repl.interpret(
-        "val raw = csv.map(_.split(\",\")).map(p => Row(p(0),toInt(p(1)),p(2)))", context);
+        "val raw = csv.map(_.split(\",\")).map(p => Row(p(0),toInt(p(1)),p(2)))",
+        context);
     if (isDataFrameSupported()) {
-      repl.interpret("val people = sqlContext.createDataFrame(raw, schema)", context);
+      repl.interpret("val people = sqlContext.createDataFrame(raw, schema)",
+          context);
       repl.interpret("people.toDF.registerTempTable(\"people\")", context);
     } else {
-      repl.interpret("val people = sqlContext.applySchema(raw, schema)", context);
+      repl.interpret("val people = sqlContext.applySchema(raw, schema)",
+          context);
       repl.interpret("people.registerTempTable(\"people\")", context);
     }
 
-    InterpreterResult ret =
-        sql.interpret("select name, age from people where name = 'gates'", context);
+    InterpreterResult ret = sql.interpret(
+        "select name, age from people where name = 'gates'", context);
     System.err.println("RET=" + ret.message());
     assertEquals(InterpreterResult.Code.SUCCESS, ret.code());
     assertEquals(Type.TABLE, ret.message().get(0).getType());

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/test/java/org/apache/zeppelin/spark/PySparkInterpreterMatplotlibTest.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/PySparkInterpreterMatplotlibTest.java b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/PySparkInterpreterMatplotlibTest.java
index c365160..5a05ad5 100644
--- a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/PySparkInterpreterMatplotlibTest.java
+++ b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/PySparkInterpreterMatplotlibTest.java
@@ -17,15 +17,6 @@
 
 package org.apache.zeppelin.spark;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Properties;
 import org.apache.zeppelin.display.AngularObjectRegistry;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
@@ -46,10 +37,21 @@ import org.junit.runners.MethodSorters;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 public class PySparkInterpreterMatplotlibTest {
 
-  @ClassRule public static TemporaryFolder tmpDir = new TemporaryFolder();
+  @ClassRule
+  public static TemporaryFolder tmpDir = new TemporaryFolder();
 
   static SparkInterpreter sparkInterpreter;
   static PySparkInterpreter pyspark;
@@ -59,21 +61,21 @@ public class PySparkInterpreterMatplotlibTest {
 
   public static class AltPySparkInterpreter extends PySparkInterpreter {
     /**
-     * Since pyspark output is sent to an outputstream rather than being directly provided by
-     * interpret(), this subclass is created to override interpret() to append the result from the
-     * outputStream for the sake of convenience in testing.
+     * Since pyspark output is  sent to an outputstream rather than
+     * being directly provided by interpret(), this subclass is created to
+     * override interpret() to append the result from the outputStream
+     * for the sake of convenience in testing.
      */
     public AltPySparkInterpreter(Properties property) {
       super(property);
     }
 
     /**
-     * This code is mainly copied from RemoteInterpreterServer.java which normally handles this in
-     * real use cases.
+     * This code is mainly copied from RemoteInterpreterServer.java which
+     * normally handles this in real use cases.
      */
     @Override
-    public InterpreterResult interpret(String st, InterpreterContext context)
-        throws InterpreterException {
+    public InterpreterResult interpret(String st, InterpreterContext context) throws InterpreterException {
       context.out.clear();
       InterpreterResult result = super.interpret(st, context);
       List<InterpreterResultMessage> resultMessages = null;
@@ -104,7 +106,8 @@ public class PySparkInterpreterMatplotlibTest {
   }
 
   /**
-   * Get spark version number as a numerical value. eg. 1.1.x => 11, 1.2.x => 12, 1.3.x => 13 ...
+   * Get spark version number as a numerical value.
+   * eg. 1.1.x => 11, 1.2.x => 12, 1.3.x => 13 ...
    */
   public static int getSparkVersionNumber() {
     if (sparkInterpreter == null) {
@@ -120,13 +123,12 @@ public class PySparkInterpreterMatplotlibTest {
   public static void setUp() throws Exception {
     intpGroup = new InterpreterGroup();
     intpGroup.put("note", new LinkedList<Interpreter>());
-    context =
-        InterpreterContext.builder()
-            .setNoteId("note")
-            .setInterpreterOut(new InterpreterOutput(null))
-            .setIntpEventClient(mock(RemoteInterpreterEventClient.class))
-            .setAngularObjectRegistry(new AngularObjectRegistry(intpGroup.getId(), null))
-            .build();
+    context = InterpreterContext.builder()
+        .setNoteId("note")
+        .setInterpreterOut(new InterpreterOutput(null))
+        .setIntpEventClient(mock(RemoteInterpreterEventClient.class))
+        .setAngularObjectRegistry(new AngularObjectRegistry(intpGroup.getId(), null))
+        .build();
     InterpreterContext.set(context);
 
     sparkInterpreter = new SparkInterpreter(getPySparkTestProperties());
@@ -181,8 +183,7 @@ public class PySparkInterpreterMatplotlibTest {
     InterpreterResult ret2;
     ret = pyspark.interpret("import matplotlib.pyplot as plt", context);
     ret = pyspark.interpret("plt.close()", context);
-    ret =
-        pyspark.interpret("z.configure_mpl(interactive=False, close=True, angular=False)", context);
+    ret = pyspark.interpret("z.configure_mpl(interactive=False, close=True, angular=False)", context);
     ret = pyspark.interpret("plt.plot([1, 2, 3])", context);
     ret1 = pyspark.interpret("plt.show()", context);
 
@@ -209,9 +210,7 @@ public class PySparkInterpreterMatplotlibTest {
     InterpreterResult ret2;
     ret = pyspark.interpret("import matplotlib.pyplot as plt", context);
     ret = pyspark.interpret("plt.close()", context);
-    ret =
-        pyspark.interpret(
-            "z.configure_mpl(interactive=False, close=False, angular=False)", context);
+    ret = pyspark.interpret("z.configure_mpl(interactive=False, close=False, angular=False)", context);
     ret = pyspark.interpret("plt.plot([1, 2, 3])", context);
     ret1 = pyspark.interpret("plt.show()", context);
 
@@ -236,8 +235,7 @@ public class PySparkInterpreterMatplotlibTest {
     InterpreterResult ret;
     ret = pyspark.interpret("import matplotlib.pyplot as plt", context);
     ret = pyspark.interpret("plt.close()", context);
-    ret =
-        pyspark.interpret("z.configure_mpl(interactive=False, close=False, angular=True)", context);
+    ret = pyspark.interpret("z.configure_mpl(interactive=False, close=False, angular=True)", context);
     ret = pyspark.interpret("plt.plot([1, 2, 3])", context);
     ret = pyspark.interpret("plt.show()", context);
     assertEquals(ret.message().toString(), InterpreterResult.Code.SUCCESS, ret.code());

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/test/java/org/apache/zeppelin/spark/PySparkInterpreterTest.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/PySparkInterpreterTest.java b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/PySparkInterpreterTest.java
index 0a3677c..64f1ff5 100644
--- a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/PySparkInterpreterTest.java
+++ b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/PySparkInterpreterTest.java
@@ -17,12 +17,8 @@
 
 package org.apache.zeppelin.spark;
 
-import static org.mockito.Mockito.mock;
 
 import com.google.common.io.Files;
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
@@ -33,10 +29,16 @@ import org.apache.zeppelin.interpreter.remote.RemoteInterpreterEventClient;
 import org.apache.zeppelin.python.PythonInterpreterTest;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.Properties;
+
+import static org.mockito.Mockito.mock;
+
+
 public class PySparkInterpreterTest extends PythonInterpreterTest {
 
-  private RemoteInterpreterEventClient mockRemoteEventClient =
-      mock(RemoteInterpreterEventClient.class);
+  private RemoteInterpreterEventClient mockRemoteEventClient = mock(RemoteInterpreterEventClient.class);
 
   @Override
   public void setUp() throws InterpreterException {
@@ -57,11 +59,10 @@ public class PySparkInterpreterTest extends PythonInterpreterTest {
     intpGroup = new InterpreterGroup();
     intpGroup.put("note", new LinkedList<Interpreter>());
 
-    InterpreterContext context =
-        InterpreterContext.builder()
-            .setInterpreterOut(new InterpreterOutput(null))
-            .setIntpEventClient(mockRemoteEventClient)
-            .build();
+    InterpreterContext context = InterpreterContext.builder()
+        .setInterpreterOut(new InterpreterOutput(null))
+        .setIntpEventClient(mockRemoteEventClient)
+        .build();
     InterpreterContext.set(context);
     LazyOpenInterpreter sparkInterpreter =
         new LazyOpenInterpreter(new SparkInterpreter(properties));

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/test/java/org/apache/zeppelin/spark/SparkRInterpreterTest.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/SparkRInterpreterTest.java b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/SparkRInterpreterTest.java
index e685d8a..fb9ad62 100644
--- a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/SparkRInterpreterTest.java
+++ b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/SparkRInterpreterTest.java
@@ -17,17 +17,6 @@
 
 package org.apache.zeppelin.spark;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.InterpreterGroup;
@@ -39,12 +28,23 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.atLeastOnce;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
 public class SparkRInterpreterTest {
 
   private SparkRInterpreter sparkRInterpreter;
   private SparkInterpreter sparkInterpreter;
-  private RemoteInterpreterEventClient mockRemoteIntpEventClient =
-      mock(RemoteInterpreterEventClient.class);
+  private RemoteInterpreterEventClient mockRemoteIntpEventClient = mock(RemoteInterpreterEventClient.class);
 
   @Before
   public void setUp() throws InterpreterException {
@@ -63,10 +63,8 @@ public class SparkRInterpreterTest {
     sparkInterpreter = new SparkInterpreter(properties);
 
     InterpreterGroup interpreterGroup = new InterpreterGroup();
-    interpreterGroup.addInterpreterToSession(
-        new LazyOpenInterpreter(sparkRInterpreter), "session_1");
-    interpreterGroup.addInterpreterToSession(
-        new LazyOpenInterpreter(sparkInterpreter), "session_1");
+    interpreterGroup.addInterpreterToSession(new LazyOpenInterpreter(sparkRInterpreter), "session_1");
+    interpreterGroup.addInterpreterToSession(new LazyOpenInterpreter(sparkInterpreter), "session_1");
     sparkRInterpreter.setInterpreterGroup(interpreterGroup);
     sparkInterpreter.setInterpreterGroup(interpreterGroup);
 
@@ -81,6 +79,7 @@ public class SparkRInterpreterTest {
   @Test
   public void testSparkRInterpreter() throws InterpreterException, InterruptedException {
 
+
     InterpreterResult result = sparkRInterpreter.interpret("1+1", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertTrue(result.message().get(0).getData().contains("2"));
@@ -89,9 +88,7 @@ public class SparkRInterpreterTest {
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     if (result.message().get(0).getData().contains("2.")) {
       // spark 2.x
-      result =
-          sparkRInterpreter.interpret(
-              "df <- as.DataFrame(faithful)\nhead(df)", getInterpreterContext());
+      result = sparkRInterpreter.interpret("df <- as.DataFrame(faithful)\nhead(df)", getInterpreterContext());
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
       assertTrue(result.message().get(0).getData().contains("eruptions waiting"));
       // spark job url is sent
@@ -99,36 +96,30 @@ public class SparkRInterpreterTest {
 
       // cancel
       final InterpreterContext context = getInterpreterContext();
-      Thread thread =
-          new Thread() {
-            @Override
-            public void run() {
-              try {
-                InterpreterResult result =
-                    sparkRInterpreter.interpret(
-                        "ldf <- dapplyCollect(\n"
-                            + "         df,\n"
-                            + "         function(x) {\n"
-                            + "           Sys.sleep(3)\n"
-                            + "           x <- cbind(x, \"waiting_secs\" = x$waiting * 60)\n"
-                            + "         })\n"
-                            + "head(ldf, 3)",
-                        context);
-                assertTrue(result.message().get(0).getData().contains("cancelled"));
-              } catch (InterpreterException e) {
-                fail("Should not throw InterpreterException");
-              }
-            }
-          };
+      Thread thread = new Thread() {
+        @Override
+        public void run() {
+          try {
+            InterpreterResult result = sparkRInterpreter.interpret("ldf <- dapplyCollect(\n" +
+                "         df,\n" +
+                "         function(x) {\n" +
+                "           Sys.sleep(3)\n" +
+                "           x <- cbind(x, \"waiting_secs\" = x$waiting * 60)\n" +
+                "         })\n" +
+                "head(ldf, 3)", context);
+            assertTrue(result.message().get(0).getData().contains("cancelled"));
+          } catch (InterpreterException e) {
+            fail("Should not throw InterpreterException");
+          }
+        }
+      };
       thread.setName("Cancel-Thread");
       thread.start();
       Thread.sleep(1000);
       sparkRInterpreter.cancel(context);
     } else {
       // spark 1.x
-      result =
-          sparkRInterpreter.interpret(
-              "df <- createDataFrame(sqlContext, faithful)\nhead(df)", getInterpreterContext());
+      result = sparkRInterpreter.interpret("df <- createDataFrame(sqlContext, faithful)\nhead(df)", getInterpreterContext());
       assertEquals(InterpreterResult.Code.SUCCESS, result.code());
       assertTrue(result.message().get(0).getData().contains("eruptions waiting"));
       // spark job url is sent
@@ -145,11 +136,8 @@ public class SparkRInterpreterTest {
     assertTrue(result.message().get(0).getData().contains("<img src="));
     assertTrue(result.message().get(0).getData().contains("width=\"100\""));
 
-    result =
-        sparkRInterpreter.interpret(
-            "library(ggplot2)\n"
-                + "ggplot(diamonds, aes(x=carat, y=price, color=cut)) + geom_point()",
-            getInterpreterContext());
+    result = sparkRInterpreter.interpret("library(ggplot2)\n" +
+        "ggplot(diamonds, aes(x=carat, y=price, color=cut)) + geom_point()", getInterpreterContext());
     assertEquals(InterpreterResult.Code.SUCCESS, result.code());
     assertEquals(1, result.message().size());
     assertEquals(InterpreterResult.Type.HTML, result.message().get(0).getType());
@@ -163,14 +151,14 @@ public class SparkRInterpreterTest {
   }
 
   private InterpreterContext getInterpreterContext() {
-    InterpreterContext context =
-        InterpreterContext.builder()
-            .setNoteId("note_1")
-            .setParagraphId("paragraph_1")
-            .setIntpEventClient(mockRemoteIntpEventClient)
-            .setInterpreterOut(new InterpreterOutput(null))
-            .setLocalProperties(new HashMap<>())
-            .build();
+    InterpreterContext context = InterpreterContext.builder()
+        .setNoteId("note_1")
+        .setParagraphId("paragraph_1")
+        .setIntpEventClient(mockRemoteIntpEventClient)
+        .setInterpreterOut(new InterpreterOutput(null))
+        .setLocalProperties(new HashMap<>())
+        .build();
     return context;
   }
 }
+

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/test/java/org/apache/zeppelin/spark/SparkShimsTest.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/SparkShimsTest.java b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/SparkShimsTest.java
index d6170b7..48d0055 100644
--- a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/SparkShimsTest.java
+++ b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/SparkShimsTest.java
@@ -41,6 +41,7 @@ import org.junit.runners.Parameterized.Parameter;
 import org.junit.runners.Parameterized.Parameters;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Captor;
+import org.mockito.Mock;
 import org.powermock.core.classloader.annotations.PowerMockIgnore;
 import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
@@ -90,8 +91,9 @@ public class SparkShimsTest {
       SparkShims sparkShims =
           new SparkShims(new Properties()) {
             @Override
-            public void setupSparkListener(
-                String master, String sparkWebUrl, InterpreterContext context) {}
+            public void setupSparkListener(String master,
+                                           String sparkWebUrl,
+                                           InterpreterContext context) {}
 
             @Override
             public String showDataFrame(Object obj, int maxResult) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-examples/zeppelin-example-clock/src/main/java/org/apache/zeppelin/example/app/clock/Clock.java
----------------------------------------------------------------------
diff --git a/zeppelin-examples/zeppelin-example-clock/src/main/java/org/apache/zeppelin/example/app/clock/Clock.java b/zeppelin-examples/zeppelin-example-clock/src/main/java/org/apache/zeppelin/example/app/clock/Clock.java
index e22e003..bee8cf1 100644
--- a/zeppelin-examples/zeppelin-example-clock/src/main/java/org/apache/zeppelin/example/app/clock/Clock.java
+++ b/zeppelin-examples/zeppelin-example-clock/src/main/java/org/apache/zeppelin/example/app/clock/Clock.java
@@ -16,9 +16,6 @@
  */
 package org.apache.zeppelin.example.app.clock;
 
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
 import org.apache.zeppelin.helium.Application;
 import org.apache.zeppelin.helium.ApplicationContext;
 import org.apache.zeppelin.helium.ApplicationException;
@@ -27,7 +24,14 @@ import org.apache.zeppelin.resource.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Basic example application. Get java.util.Date from resource pool and display it */
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * Basic example application.
+ * Get java.util.Date from resource pool and display it
+ */
 public class Clock extends Application {
   private final Logger logger = LoggerFactory.getLogger(Clock.class);
 
@@ -56,30 +60,31 @@ public class Clock extends Application {
     }
   }
 
+
   public void start() {
-    updateThread =
-        new Thread() {
-          public void run() {
-            while (!shutdown) {
-              // format date
-              SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
-              // put formatted string to angular object.
-              context().getAngularObjectRegistry().add("date", df.format(date));
-
-              try {
-                Thread.sleep(1000);
-              } catch (InterruptedException e) {
-                // nothing todo
-              }
-              date = new Date(date.getTime() + 1000);
-            }
+    updateThread = new Thread() {
+      public void run() {
+        while (!shutdown) {
+          // format date
+          SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+          // put formatted string to angular object.
+          context().getAngularObjectRegistry().add("date", df.format(date));
+
+          try {
+            Thread.sleep(1000);
+          } catch (InterruptedException e) {
+            // nothing todo
           }
-        };
+          date = new Date(date.getTime() + 1000);
+        }
+      }
+    };
 
     updateThread.start();
   }
 
+
   @Override
   public void unload() throws ApplicationException {
     shutdown = true;
@@ -91,13 +96,16 @@ public class Clock extends Application {
     context().getAngularObjectRegistry().remove("date");
   }
 
-  /** Development mode */
+  /**
+   * Development mode
+   */
   public static void main(String[] args) throws Exception {
     LocalResourcePool pool = new LocalResourcePool("dev");
     pool.put("date", new Date());
 
-    ZeppelinApplicationDevServer devServer =
-        new ZeppelinApplicationDevServer(Clock.class.getName(), pool.getAll());
+    ZeppelinApplicationDevServer devServer = new ZeppelinApplicationDevServer(
+        Clock.class.getName(),
+        pool.getAll());
 
     devServer.start();
     devServer.join();


[16/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/HeliumRestApi.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/HeliumRestApi.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/HeliumRestApi.java
index 4e5f180..1c04500 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/HeliumRestApi.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/HeliumRestApi.java
@@ -19,11 +19,18 @@ package org.apache.zeppelin.rest;
 import com.google.gson.Gson;
 import com.google.gson.JsonParseException;
 import com.google.gson.reflect.TypeToken;
+
+import javax.inject.Inject;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.List;
 import java.util.Map;
-import javax.inject.Inject;
+
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
@@ -31,8 +38,7 @@ import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Response;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang3.StringUtils;
+
 import org.apache.zeppelin.helium.Helium;
 import org.apache.zeppelin.helium.HeliumPackage;
 import org.apache.zeppelin.helium.HeliumPackageSearchResult;
@@ -40,10 +46,10 @@ import org.apache.zeppelin.notebook.Note;
 import org.apache.zeppelin.notebook.Notebook;
 import org.apache.zeppelin.notebook.Paragraph;
 import org.apache.zeppelin.server.JsonResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Helium Rest Api. */
+/**
+ * Helium Rest Api.
+ */
 @Path("/helium")
 @Produces("application/json")
 public class HeliumRestApi {
@@ -55,11 +61,13 @@ public class HeliumRestApi {
 
   @Inject
   public HeliumRestApi(Helium helium, Notebook notebook) {
-    this.helium = helium;
+    this.helium  = helium;
     this.notebook = notebook;
   }
 
-  /** Get all packages info. */
+  /**
+   * Get all packages info.
+   */
   @GET
   @Path("package")
   public Response getAllPackageInfo() {
@@ -71,7 +79,9 @@ public class HeliumRestApi {
     }
   }
 
-  /** Get all enabled packages info. */
+  /**
+   * Get all enabled packages info.
+   */
   @GET
   @Path("enabledPackage")
   public Response getAllEnabledPackageInfo() {
@@ -83,18 +93,20 @@ public class HeliumRestApi {
     }
   }
 
-  /** Get single package info. */
+  /**
+   * Get single package info.
+   */
   @GET
   @Path("package/{packageName}")
   public Response getSinglePackageInfo(@PathParam("packageName") String packageName) {
     if (StringUtils.isEmpty(packageName)) {
-      return new JsonResponse(Response.Status.BAD_REQUEST, "Can't get package info for empty name")
-          .build();
+      return new JsonResponse(Response.Status.BAD_REQUEST,
+              "Can't get package info for empty name").build();
     }
 
     try {
-      return new JsonResponse<>(Response.Status.OK, "", helium.getSinglePackageInfo(packageName))
-          .build();
+      return new JsonResponse<>(
+          Response.Status.OK, "", helium.getSinglePackageInfo(packageName)).build();
     } catch (RuntimeException e) {
       logger.error(e.getMessage(), e);
       return new JsonResponse(Response.Status.INTERNAL_SERVER_ERROR, e.getMessage()).build();
@@ -103,8 +115,8 @@ public class HeliumRestApi {
 
   @GET
   @Path("suggest/{noteId}/{paragraphId}")
-  public Response suggest(
-      @PathParam("noteId") String noteId, @PathParam("paragraphId") String paragraphId) {
+  public Response suggest(@PathParam("noteId") String noteId,
+          @PathParam("paragraphId") String paragraphId) {
     Note note = notebook.getNote(noteId);
     if (note == null) {
       return new JsonResponse(Response.Status.NOT_FOUND, "Note " + noteId + " not found").build();
@@ -121,14 +133,13 @@ public class HeliumRestApi {
       logger.error(e.getMessage(), e);
       return new JsonResponse(Response.Status.INTERNAL_SERVER_ERROR, e.getMessage()).build();
     }
+
   }
 
   @POST
   @Path("load/{noteId}/{paragraphId}")
-  public Response load(
-      @PathParam("noteId") String noteId,
-      @PathParam("paragraphId") String paragraphId,
-      String heliumPackage) {
+  public Response load(@PathParam("noteId") String noteId,
+          @PathParam("paragraphId") String paragraphId, String heliumPackage) {
     Note note = notebook.getNote(noteId);
     if (note == null) {
       return new JsonResponse(Response.Status.NOT_FOUND, "Note " + noteId + " not found").build();
@@ -141,9 +152,8 @@ public class HeliumRestApi {
     }
     HeliumPackage pkg = HeliumPackage.fromJson(heliumPackage);
     try {
-      return new JsonResponse<>(
-              Response.Status.OK, "", helium.getApplicationFactory().loadAndRun(pkg, paragraph))
-          .build();
+      return new JsonResponse<>(Response.Status.OK, "",
+              helium.getApplicationFactory().loadAndRun(pkg, paragraph)).build();
     } catch (RuntimeException e) {
       logger.error(e.getMessage(), e);
       return new JsonResponse(Response.Status.INTERNAL_SERVER_ERROR, e.getMessage()).build();
@@ -153,12 +163,12 @@ public class HeliumRestApi {
   @GET
   @Path("bundle/load/{packageName}")
   @Produces("text/javascript")
-  public Response bundleLoad(
-      @QueryParam("refresh") String refresh, @PathParam("packageName") String packageName) {
+  public Response bundleLoad(@QueryParam("refresh") String refresh,
+          @PathParam("packageName") String packageName) {
     if (StringUtils.isEmpty(packageName)) {
       return new JsonResponse(
-              Response.Status.BAD_REQUEST, "Can't get bundle due to empty package name")
-          .build();
+          Response.Status.BAD_REQUEST,
+          "Can't get bundle due to empty package name").build();
     }
 
     HeliumPackageSearchResult psr = null;
@@ -233,12 +243,12 @@ public class HeliumRestApi {
     }
 
     try {
-      Map<String, Map<String, Object>> config = helium.getSpellConfig(packageName);
+      Map<String, Map<String, Object>> config =
+          helium.getSpellConfig(packageName);
 
       if (config == null) {
-        return new JsonResponse(
-                Response.Status.BAD_REQUEST, "Failed to find enabled package for " + packageName)
-            .build();
+        return new JsonResponse(Response.Status.BAD_REQUEST,
+            "Failed to find enabled package for " + packageName).build();
       }
 
       return new JsonResponse<>(Response.Status.OK, config).build();
@@ -262,20 +272,21 @@ public class HeliumRestApi {
 
   @GET
   @Path("config/{packageName}/{artifact}")
-  public Response getPackageConfig(
-      @PathParam("packageName") String packageName, @PathParam("artifact") String artifact) {
+  public Response getPackageConfig(@PathParam("packageName") String packageName,
+          @PathParam("artifact") String artifact) {
     if (StringUtils.isEmpty(packageName) || StringUtils.isEmpty(artifact)) {
-      return new JsonResponse(Response.Status.BAD_REQUEST, "package name or artifact is empty")
-          .build();
+      return new JsonResponse(Response.Status.BAD_REQUEST,
+          "package name or artifact is empty"
+      ).build();
     }
 
     try {
-      Map<String, Map<String, Object>> config = helium.getPackageConfig(packageName, artifact);
+      Map<String, Map<String, Object>> config =
+          helium.getPackageConfig(packageName, artifact);
 
       if (config == null) {
-        return new JsonResponse(
-                Response.Status.BAD_REQUEST, "Failed to find package for " + artifact)
-            .build();
+        return new JsonResponse(Response.Status.BAD_REQUEST,
+            "Failed to find package for " + artifact).build();
       }
 
       return new JsonResponse<>(Response.Status.OK, config).build();
@@ -287,25 +298,26 @@ public class HeliumRestApi {
 
   @POST
   @Path("config/{packageName}/{artifact}")
-  public Response updatePackageConfig(
-      @PathParam("packageName") String packageName,
-      @PathParam("artifact") String artifact,
-      String rawConfig) {
+  public Response updatePackageConfig(@PathParam("packageName") String packageName,
+          @PathParam("artifact") String artifact, String rawConfig) {
     if (StringUtils.isEmpty(packageName) || StringUtils.isEmpty(artifact)) {
-      return new JsonResponse(Response.Status.BAD_REQUEST, "package name or artifact is empty")
-          .build();
+      return new JsonResponse(Response.Status.BAD_REQUEST,
+          "package name or artifact is empty"
+      ).build();
     }
 
     try {
-      Map<String, Object> packageConfig =
-          gson.fromJson(rawConfig, new TypeToken<Map<String, Object>>() {}.getType());
+      Map<String, Object> packageConfig = gson.fromJson(
+          rawConfig, new TypeToken<Map<String, Object>>(){}.getType());
       helium.updatePackageConfig(artifact, packageConfig);
       return new JsonResponse<>(Response.Status.OK, packageConfig).build();
     } catch (JsonParseException e) {
       logger.error(e.getMessage(), e);
-      return new JsonResponse(Response.Status.BAD_REQUEST, e.getMessage()).build();
+      return new JsonResponse(Response.Status.BAD_REQUEST,
+          e.getMessage()).build();
     } catch (IOException | RuntimeException e) {
-      return new JsonResponse(Response.Status.INTERNAL_SERVER_ERROR, e.getMessage()).build();
+      return new JsonResponse(Response.Status.INTERNAL_SERVER_ERROR,
+          e.getMessage()).build();
     }
   }
 
@@ -324,8 +336,8 @@ public class HeliumRestApi {
   @POST
   @Path("order/visualization")
   public Response setVisualizationPackageOrder(String orderedPackageNameList) {
-    List<String> orderedList =
-        gson.fromJson(orderedPackageNameList, new TypeToken<List<String>>() {}.getType());
+    List<String> orderedList = gson.fromJson(
+        orderedPackageNameList, new TypeToken<List<String>>(){}.getType());
     try {
       helium.setVisualizationPackageOrder(orderedList);
       return new JsonResponse(Response.Status.OK).build();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/InterpreterRestApi.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/InterpreterRestApi.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/InterpreterRestApi.java
index afe3b4f..abf7de8 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/InterpreterRestApi.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/InterpreterRestApi.java
@@ -18,20 +18,7 @@
 package org.apache.zeppelin.rest;
 
 import com.google.common.collect.Maps;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
 import javax.inject.Inject;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.zeppelin.annotation.ZeppelinApi;
 import org.apache.zeppelin.dep.Repository;
@@ -55,7 +42,23 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.sonatype.aether.repository.RemoteRepository;
 
-/** Interpreter Rest API. */
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Interpreter Rest API.
+ */
 @Path("/interpreter")
 @Produces("application/json")
 public class InterpreterRestApi {
@@ -76,7 +79,9 @@ public class InterpreterRestApi {
     this.notebookServer = notebookWsServer;
   }
 
-  /** List all interpreter settings. */
+  /**
+   * List all interpreter settings.
+   */
   @GET
   @Path("setting")
   @ZeppelinApi
@@ -84,7 +89,9 @@ public class InterpreterRestApi {
     return new JsonResponse<>(Status.OK, "", interpreterSettingManager.get()).build();
   }
 
-  /** Get a setting. */
+  /**
+   * Get a setting.
+   */
   @GET
   @Path("setting/{settingId}")
   @ZeppelinApi
@@ -98,9 +105,8 @@ public class InterpreterRestApi {
       }
     } catch (NullPointerException e) {
       logger.error("Exception in InterpreterRestApi while creating ", e);
-      return new JsonResponse<>(
-              Status.INTERNAL_SERVER_ERROR, e.getMessage(), ExceptionUtils.getStackTrace(e))
-          .build();
+      return new JsonResponse<>(Status.INTERNAL_SERVER_ERROR, e.getMessage(),
+          ExceptionUtils.getStackTrace(e)).build();
     }
   }
 
@@ -114,18 +120,15 @@ public class InterpreterRestApi {
   @ZeppelinApi
   public Response newSettings(String message) {
     try {
-      NewInterpreterSettingRequest request = NewInterpreterSettingRequest.fromJson(message);
+      NewInterpreterSettingRequest request =
+          NewInterpreterSettingRequest.fromJson(message);
       if (request == null) {
         return new JsonResponse<>(Status.BAD_REQUEST).build();
       }
 
-      InterpreterSetting interpreterSetting =
-          interpreterSettingManager.createNewSetting(
-              request.getName(),
-              request.getGroup(),
-              request.getDependencies(),
-              request.getOption(),
-              request.getProperties());
+      InterpreterSetting interpreterSetting = interpreterSettingManager
+          .createNewSetting(request.getName(), request.getGroup(), request.getDependencies(),
+              request.getOption(), request.getProperties());
       logger.info("new setting created with {}", interpreterSetting.getId());
       return new JsonResponse<>(Status.OK, "", interpreterSetting).build();
     } catch (IOException e) {
@@ -142,18 +145,19 @@ public class InterpreterRestApi {
     logger.info("Update interpreterSetting {}", settingId);
 
     try {
-      UpdateInterpreterSettingRequest request = UpdateInterpreterSettingRequest.fromJson(message);
-      interpreterSettingManager.setPropertyAndRestart(
-          settingId, request.getOption(), request.getProperties(), request.getDependencies());
+      UpdateInterpreterSettingRequest request =
+          UpdateInterpreterSettingRequest.fromJson(message);
+      interpreterSettingManager
+          .setPropertyAndRestart(settingId, request.getOption(), request.getProperties(),
+              request.getDependencies());
     } catch (InterpreterException e) {
       logger.error("Exception in InterpreterRestApi while updateSetting ", e);
       return new JsonResponse<>(Status.NOT_FOUND, e.getMessage(), ExceptionUtils.getStackTrace(e))
           .build();
     } catch (IOException e) {
       logger.error("Exception in InterpreterRestApi while updateSetting ", e);
-      return new JsonResponse<>(
-              Status.INTERNAL_SERVER_ERROR, e.getMessage(), ExceptionUtils.getStackTrace(e))
-          .build();
+      return new JsonResponse<>(Status.INTERNAL_SERVER_ERROR, e.getMessage(),
+          ExceptionUtils.getStackTrace(e)).build();
     }
     InterpreterSetting setting = interpreterSettingManager.get(settingId);
     if (setting == null) {
@@ -162,7 +166,9 @@ public class InterpreterRestApi {
     return new JsonResponse<>(Status.OK, "", setting).build();
   }
 
-  /** Remove interpreter setting. */
+  /**
+   * Remove interpreter setting.
+   */
   @DELETE
   @Path("setting/{settingId}")
   @ZeppelinApi
@@ -172,7 +178,9 @@ public class InterpreterRestApi {
     return new JsonResponse(Status.OK).build();
   }
 
-  /** Restart interpreter setting. */
+  /**
+   * Restart interpreter setting.
+   */
   @PUT
   @Path("setting/restart/{settingId}")
   @ZeppelinApi
@@ -201,7 +209,9 @@ public class InterpreterRestApi {
     return new JsonResponse<>(Status.OK, "", setting).build();
   }
 
-  /** List all available interpreters by group. */
+  /**
+   * List all available interpreters by group.
+   */
   @GET
   @ZeppelinApi
   public Response listInterpreter() {
@@ -209,7 +219,9 @@ public class InterpreterRestApi {
     return new JsonResponse<>(Status.OK, "", m).build();
   }
 
-  /** List of dependency resolving repositories. */
+  /**
+   * List of dependency resolving repositories.
+   */
   @GET
   @Path("repository")
   @ZeppelinApi
@@ -229,18 +241,13 @@ public class InterpreterRestApi {
   public Response addRepository(String message) {
     try {
       Repository request = Repository.fromJson(message);
-      interpreterSettingManager.addRepository(
-          request.getId(),
-          request.getUrl(),
-          request.isSnapshot(),
-          request.getAuthentication(),
-          request.getProxy());
+      interpreterSettingManager.addRepository(request.getId(), request.getUrl(),
+          request.isSnapshot(), request.getAuthentication(), request.getProxy());
       logger.info("New repository {} added", request.getId());
     } catch (Exception e) {
       logger.error("Exception in InterpreterRestApi while adding repository ", e);
-      return new JsonResponse<>(
-              Status.INTERNAL_SERVER_ERROR, e.getMessage(), ExceptionUtils.getStackTrace(e))
-          .build();
+      return new JsonResponse<>(Status.INTERNAL_SERVER_ERROR, e.getMessage(),
+          ExceptionUtils.getStackTrace(e)).build();
     }
     return new JsonResponse(Status.OK).build();
   }
@@ -259,14 +266,15 @@ public class InterpreterRestApi {
       interpreterSettingManager.removeRepository(repoId);
     } catch (Exception e) {
       logger.error("Exception in InterpreterRestApi while removing repository ", e);
-      return new JsonResponse<>(
-              Status.INTERNAL_SERVER_ERROR, e.getMessage(), ExceptionUtils.getStackTrace(e))
-          .build();
+      return new JsonResponse<>(Status.INTERNAL_SERVER_ERROR, e.getMessage(),
+          ExceptionUtils.getStackTrace(e)).build();
     }
     return new JsonResponse(Status.OK).build();
   }
 
-  /** Get available types for property */
+  /**
+   * Get available types for property
+   */
   @GET
   @Path("property/types")
   public Response listInterpreterPropertyTypes() {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java
index 74abe56..f13c222 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java
@@ -17,13 +17,27 @@
 package org.apache.zeppelin.rest;
 
 import com.google.gson.Gson;
+import javax.inject.Inject;
+import org.apache.shiro.authc.AuthenticationException;
+import org.apache.shiro.authc.AuthenticationToken;
+import org.apache.shiro.authc.IncorrectCredentialsException;
+import org.apache.shiro.authc.LockedAccountException;
+import org.apache.shiro.authc.UnknownAccountException;
+import org.apache.shiro.authc.UsernamePasswordToken;
+import org.apache.shiro.realm.Realm;
+import org.apache.shiro.subject.Subject;
+import org.apache.zeppelin.conf.ZeppelinConfiguration;
+import org.apache.zeppelin.notebook.Notebook;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.text.ParseException;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
-import javax.inject.Inject;
+
 import javax.ws.rs.FormParam;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
@@ -34,27 +48,18 @@ import javax.ws.rs.core.Cookie;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.Status;
-import org.apache.shiro.authc.AuthenticationException;
-import org.apache.shiro.authc.AuthenticationToken;
-import org.apache.shiro.authc.IncorrectCredentialsException;
-import org.apache.shiro.authc.LockedAccountException;
-import org.apache.shiro.authc.UnknownAccountException;
-import org.apache.shiro.authc.UsernamePasswordToken;
-import org.apache.shiro.realm.Realm;
-import org.apache.shiro.subject.Subject;
+
 import org.apache.zeppelin.annotation.ZeppelinApi;
-import org.apache.zeppelin.conf.ZeppelinConfiguration;
-import org.apache.zeppelin.notebook.Notebook;
 import org.apache.zeppelin.notebook.NotebookAuthorization;
 import org.apache.zeppelin.realm.jwt.JWTAuthenticationToken;
 import org.apache.zeppelin.realm.jwt.KnoxJwtRealm;
 import org.apache.zeppelin.server.JsonResponse;
 import org.apache.zeppelin.ticket.TicketContainer;
 import org.apache.zeppelin.utils.SecurityUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Created for org.apache.zeppelin.rest.message. */
+/**
+ * Created for org.apache.zeppelin.rest.message.
+ */
 @Path("/login")
 @Produces("application/json")
 public class LoginRestApi {
@@ -150,36 +155,38 @@ public class LoginRestApi {
       data.put("ticket", ticket);
 
       response = new JsonResponse(Response.Status.OK, "", data);
-      // if no exception, that's it, we're done!
+      //if no exception, that's it, we're done!
 
-      // set roles for user in NotebookAuthorization module
+      //set roles for user in NotebookAuthorization module
       NotebookAuthorization.getInstance().setRoles(principal, roles);
     } catch (UnknownAccountException uae) {
-      // username wasn't in the system, show them an error message?
+      //username wasn't in the system, show them an error message?
       LOG.error("Exception in login: ", uae);
     } catch (IncorrectCredentialsException ice) {
-      // password didn't match, try again?
+      //password didn't match, try again?
       LOG.error("Exception in login: ", ice);
     } catch (LockedAccountException lae) {
-      // account for that username is locked - can't login.  Show them a message?
+      //account for that username is locked - can't login.  Show them a message?
       LOG.error("Exception in login: ", lae);
     } catch (AuthenticationException ae) {
-      // unexpected condition - error?
+      //unexpected condition - error?
       LOG.error("Exception in login: ", ae);
     }
     return response;
   }
 
   /**
-   * Post Login Returns userName & password for anonymous access, username is always anonymous.
+   * Post Login
+   * Returns userName & password
+   * for anonymous access, username is always anonymous.
    * After getting this ticket, access through websockets become safe
    *
    * @return 200 response
    */
   @POST
   @ZeppelinApi
-  public Response postLogin(
-      @FormParam("userName") String userName, @FormParam("password") String password) {
+  public Response postLogin(@FormParam("userName") String userName,
+      @FormParam("password") String password) {
     JsonResponse response = null;
     // ticket set to anonymous for anonymous user. Simplify testing.
     Subject currentUser = org.apache.shiro.SecurityUtils.getSubject();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRepoRestApi.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRepoRestApi.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRepoRestApi.java
index bbf3692..2615c2f 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRepoRestApi.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRepoRestApi.java
@@ -19,31 +19,38 @@ package org.apache.zeppelin.rest;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Sets;
 import com.google.gson.JsonSyntaxException;
+
+import javax.inject.Inject;
+import org.apache.commons.lang.StringUtils;
+import org.apache.zeppelin.service.ServiceContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.IOException;
 import java.util.Collections;
 import java.util.List;
 import java.util.Set;
-import javax.inject.Inject;
+
 import javax.ws.rs.GET;
 import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.Status;
-import org.apache.commons.lang.StringUtils;
+
 import org.apache.zeppelin.annotation.ZeppelinApi;
 import org.apache.zeppelin.notebook.repo.NotebookRepoSync;
 import org.apache.zeppelin.notebook.repo.NotebookRepoWithSettings;
 import org.apache.zeppelin.rest.message.NotebookRepoSettingsRequest;
 import org.apache.zeppelin.server.JsonResponse;
-import org.apache.zeppelin.service.ServiceContext;
 import org.apache.zeppelin.socket.NotebookServer;
 import org.apache.zeppelin.user.AuthenticationInfo;
 import org.apache.zeppelin.utils.SecurityUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** NoteRepo rest API endpoint. */
+/**
+ * NoteRepo rest API endpoint.
+ *
+ */
 @Path("/notebook-repositories")
 @Produces("application/json")
 public class NotebookRepoRestApi {
@@ -58,7 +65,9 @@ public class NotebookRepoRestApi {
     this.notebookWsServer = notebookWsServer;
   }
 
-  /** List all notebook repository. */
+  /**
+   * List all notebook repository.
+   */
   @GET
   @ZeppelinApi
   public Response listRepoSettings() {
@@ -68,11 +77,13 @@ public class NotebookRepoRestApi {
     return new JsonResponse<>(Status.OK, "", settings).build();
   }
 
-  /** Reload notebook repository. */
+  /**
+   * Reload notebook repository.
+   */
   @GET
   @Path("reload")
   @ZeppelinApi
-  public Response refreshRepo() {
+  public Response refreshRepo(){
     AuthenticationInfo subject = new AuthenticationInfo(SecurityUtils.getPrincipal());
     LOG.info("Reloading notebook repository for user {}", subject.getUser());
     try {
@@ -109,16 +120,14 @@ public class NotebookRepoRestApi {
       newSettings = NotebookRepoSettingsRequest.fromJson(payload);
     } catch (JsonSyntaxException e) {
       LOG.error("Cannot update notebook repo settings", e);
-      return new JsonResponse<>(
-              Status.NOT_ACCEPTABLE, "", ImmutableMap.of("error", "Invalid payload structure"))
-          .build();
+      return new JsonResponse<>(Status.NOT_ACCEPTABLE, "",
+          ImmutableMap.of("error", "Invalid payload structure")).build();
     }
 
     if (NotebookRepoSettingsRequest.isEmpty(newSettings)) {
       LOG.error("Invalid property");
-      return new JsonResponse<>(
-              Status.NOT_ACCEPTABLE, "", ImmutableMap.of("error", "Invalid payload"))
-          .build();
+      return new JsonResponse<>(Status.NOT_ACCEPTABLE, "",
+          ImmutableMap.of("error", "Invalid payload")).build();
     }
     LOG.info("User {} is going to change repo setting", subject.getUser());
     NotebookRepoWithSettings updatedSettings =

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookResponse.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookResponse.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookResponse.java
index 37f1a3f..16b6692 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookResponse.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookResponse.java
@@ -19,7 +19,9 @@ package org.apache.zeppelin.rest;
 
 import javax.xml.bind.annotation.XmlRootElement;
 
-/** Response wrapper. */
+/**
+ * Response wrapper.
+ */
 @XmlRootElement
 public class NotebookResponse {
   private String msg;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/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 59c13fb..8411263 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
@@ -20,24 +20,7 @@ package org.apache.zeppelin.rest;
 import com.google.common.collect.Sets;
 import com.google.common.reflect.TypeToken;
 import com.google.gson.Gson;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
 import javax.inject.Inject;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-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;
@@ -68,7 +51,27 @@ import org.quartz.CronExpression;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Rest api endpoint for the notebook. */
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Rest api endpoint for the notebook.
+ */
 @Path("/notebook")
 @Produces("application/json")
 public class NotebookRestApi extends AbstractRestApi {
@@ -94,14 +97,16 @@ public class NotebookRestApi extends AbstractRestApi {
     this.zConf = notebook.getConf();
   }
 
-  /** 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");
+    checkIfUserCanRead(noteId,
+        "Insufficient privileges you cannot get the list of permissions for this note");
     HashMap<String, Set<String>> permissionsMap = new HashMap<>();
     permissionsMap.put("owners", notebookAuthorization.getOwners(noteId));
     permissionsMap.put("readers", notebookAuthorization.getReaders(noteId));
@@ -111,16 +116,11 @@ public class NotebookRestApi extends AbstractRestApi {
   }
 
   private String ownerPermissionError(Set<String> current, Set<String> allowed) {
-    LOG.info(
-        "Cannot change permissions. Connection owners {}. Allowed owners {}",
-        current.toString(),
-        allowed.toString());
-    return "Insufficient privileges to change permissions.\n\n"
-        + "Allowed owners: "
-        + allowed.toString()
-        + "\n\n"
-        + "User belongs to: "
-        + current.toString();
+    LOG.info("Cannot change permissions. Connection owners {}. Allowed owners {}",
+        current.toString(), allowed.toString());
+    return "Insufficient privileges to change permissions.\n\n" +
+        "Allowed owners: " + allowed.toString() + "\n\n" +
+        "User belongs to: " + current.toString();
   }
 
   private String getBlockNotAuthenticatedUserErrorMsg() {
@@ -133,7 +133,9 @@ public class NotebookRestApi extends AbstractRestApi {
    * 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();
     if (isAuthenticated && SecurityUtils.getPrincipal().equals("anonymous")) {
@@ -142,7 +144,9 @@ public class NotebookRestApi extends AbstractRestApi {
     }
   }
 
-  /** Check if the current user own the given note. */
+  /**
+   * Check if the current user own the given note.
+   */
   private void checkIfUserIsOwner(String noteId, String errorMsg) {
     Set<String> userAndRoles = Sets.newHashSet();
     userAndRoles.add(SecurityUtils.getPrincipal());
@@ -152,7 +156,9 @@ public class NotebookRestApi extends AbstractRestApi {
     }
   }
 
-  /** Check if the current user is either Owner or Writer for the given note. */
+  /**
+   * Check if the current user is either Owner or Writer for the given note.
+   */
   private void checkIfUserCanWrite(String noteId, String errorMsg) {
     Set<String> userAndRoles = Sets.newHashSet();
     userAndRoles.add(SecurityUtils.getPrincipal());
@@ -162,7 +168,9 @@ public class NotebookRestApi extends AbstractRestApi {
     }
   }
 
-  /** Check if the current user can access (at least he have to be reader) the given note. */
+  /**
+   * Check if the current user can access (at least he have to be reader) the given note.
+   */
   private void checkIfUserCanRead(String noteId, String errorMsg) {
     Set<String> userAndRoles = Sets.newHashSet();
     userAndRoles.add(SecurityUtils.getPrincipal());
@@ -172,7 +180,9 @@ public class NotebookRestApi extends AbstractRestApi {
     }
   }
 
-  /** Check if the current user can run the given note. */
+  /**
+   * Check if the current user can run the given note.
+   */
   private void checkIfUserCanRun(String noteId, String errorMsg) {
     Set<String> userAndRoles = Sets.newHashSet();
     userAndRoles.add(SecurityUtils.getPrincipal());
@@ -201,7 +211,9 @@ public class NotebookRestApi extends AbstractRestApi {
     }
   }
 
-  /** Set note authorization information. */
+  /**
+   * Set note authorization information.
+   */
   @PUT
   @Path("{noteId}/permissions")
   @ZeppelinApi
@@ -214,21 +226,16 @@ public class NotebookRestApi extends AbstractRestApi {
     userAndRoles.addAll(roles);
 
     checkIfUserIsAnon(getBlockNotAuthenticatedUserErrorMsg());
-    checkIfUserIsOwner(
-        noteId, ownerPermissionError(userAndRoles, notebookAuthorization.getOwners(noteId)));
+    checkIfUserIsOwner(noteId,
+        ownerPermissionError(userAndRoles, notebookAuthorization.getOwners(noteId)));
 
     HashMap<String, HashSet<String>> permMap =
-        gson.fromJson(req, new TypeToken<HashMap<String, HashSet<String>>>() {}.getType());
+        gson.fromJson(req, new TypeToken<HashMap<String, HashSet<String>>>() {
+        }.getType());
     Note note = notebook.getNote(noteId);
 
-    LOG.info(
-        "Set permissions {} {} {} {} {} {}",
-        noteId,
-        principal,
-        permMap.get("owners"),
-        permMap.get("readers"),
-        permMap.get("runners"),
-        permMap.get("writers"));
+    LOG.info("Set permissions {} {} {} {} {} {}", noteId, principal, permMap.get("owners"),
+        permMap.get("readers"), permMap.get("runners"), permMap.get("writers"));
 
     HashSet<String> readers = permMap.get("readers");
     HashSet<String> runners = permMap.get("runners");
@@ -266,11 +273,8 @@ public class NotebookRestApi extends AbstractRestApi {
     notebookAuthorization.setRunners(noteId, runners);
     notebookAuthorization.setWriters(noteId, writers);
     notebookAuthorization.setOwners(noteId, owners);
-    LOG.debug(
-        "After set permissions {} {} {} {}",
-        notebookAuthorization.getOwners(noteId),
-        notebookAuthorization.getReaders(noteId),
-        notebookAuthorization.getRunners(noteId),
+    LOG.debug("After set permissions {} {} {} {}", notebookAuthorization.getOwners(noteId),
+        notebookAuthorization.getReaders(noteId), notebookAuthorization.getRunners(noteId),
         notebookAuthorization.getWriters(noteId));
     AuthenticationInfo subject = new AuthenticationInfo(SecurityUtils.getPrincipal());
     note.persist(subject);
@@ -282,8 +286,8 @@ public class NotebookRestApi extends AbstractRestApi {
   @GET
   @ZeppelinApi
   public Response getNoteList() throws IOException {
-    List<Map<String, String>> notesInfo =
-        notebookService.listNotes(false, getServiceContext(), new RestServiceCallback());
+    List<Map<String, String>> notesInfo = notebookService.listNotes(false, getServiceContext(),
+        new RestServiceCallback());
     return new JsonResponse<>(Status.OK, "", notesInfo).build();
   }
 
@@ -291,7 +295,8 @@ public class NotebookRestApi extends AbstractRestApi {
   @Path("{noteId}")
   @ZeppelinApi
   public Response getNote(@PathParam("noteId") String noteId) throws IOException {
-    Note note = notebookService.getNote(noteId, getServiceContext(), new RestServiceCallback());
+    Note note =
+        notebookService.getNote(noteId, getServiceContext(), new RestServiceCallback());
     return new JsonResponse<>(Status.OK, "", note).build();
   }
 
@@ -322,8 +327,8 @@ public class NotebookRestApi extends AbstractRestApi {
   @Path("import")
   @ZeppelinApi
   public Response importNote(String noteJson) throws IOException {
-    Note note =
-        notebookService.importNote(null, noteJson, getServiceContext(), new RestServiceCallback());
+    Note note = notebookService.importNote(null, noteJson, getServiceContext(),
+        new RestServiceCallback());
     return new JsonResponse<>(Status.OK, "", note.getId()).build();
   }
 
@@ -340,12 +345,11 @@ public class NotebookRestApi extends AbstractRestApi {
     String user = SecurityUtils.getPrincipal();
     LOG.info("Create new note by JSON {}", message);
     NewNoteRequest request = NewNoteRequest.fromJson(message);
-    Note note =
-        notebookService.createNote(
-            request.getName(),
-            zConf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_GROUP_DEFAULT),
-            getServiceContext(),
-            new RestServiceCallback<>());
+    Note note = notebookService.createNote(
+        request.getName(),
+        zConf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_GROUP_DEFAULT),
+        getServiceContext(),
+        new RestServiceCallback<>());
     AuthenticationInfo subject = new AuthenticationInfo(SecurityUtils.getPrincipal());
     if (request.getParagraphs() != null) {
       for (NewParagraphRequest paragraphRequest : request.getParagraphs()) {
@@ -368,8 +372,7 @@ public class NotebookRestApi extends AbstractRestApi {
   @ZeppelinApi
   public Response deleteNote(@PathParam("noteId") String noteId) throws IOException {
     LOG.info("Delete note {} ", noteId);
-    notebookService.removeNote(
-        noteId,
+    notebookService.removeNote(noteId,
         getServiceContext(),
         new RestServiceCallback<String>() {
           @Override
@@ -403,18 +406,14 @@ public class NotebookRestApi extends AbstractRestApi {
       newNoteName = request.getName();
     }
     AuthenticationInfo subject = new AuthenticationInfo(SecurityUtils.getPrincipal());
-    Note newNote =
-        notebookService.cloneNote(
-            noteId,
-            newNoteName,
-            getServiceContext(),
-            new RestServiceCallback<Note>() {
-              @Override
-              public void onSuccess(Note newNote, ServiceContext context) throws IOException {
-                notebookServer.broadcastNote(newNote);
-                notebookServer.broadcastNoteList(subject, context.getUserAndRoles());
-              }
-            });
+    Note newNote = notebookService.cloneNote(noteId, newNoteName, getServiceContext(),
+        new RestServiceCallback<Note>(){
+          @Override
+          public void onSuccess(Note newNote, ServiceContext context) throws IOException {
+            notebookServer.broadcastNote(newNote);
+            notebookServer.broadcastNoteList(subject, context.getUserAndRoles());
+          }
+        });
     return new JsonResponse<>(Status.OK, "", newNote.getId()).build();
   }
 
@@ -428,8 +427,8 @@ public class NotebookRestApi extends AbstractRestApi {
   @PUT
   @Path("{noteId}/rename")
   @ZeppelinApi
-  public Response renameNote(@PathParam("noteId") String noteId, String message)
-      throws IOException {
+  public Response renameNote(@PathParam("noteId") String noteId,
+                             String message) throws IOException {
     LOG.info("rename note by JSON {}", message);
     RenameNoteRequest request = gson.fromJson(message, RenameNoteRequest.class);
     String newName = request.getName();
@@ -437,11 +436,8 @@ public class NotebookRestApi extends AbstractRestApi {
       LOG.warn("Trying to rename notebook {} with empty name parameter", noteId);
       throw new BadRequestException("name can not be empty");
     }
-    notebookService.renameNote(
-        noteId,
-        request.getName(),
-        getServiceContext(),
-        new RestServiceCallback<Note>() {
+    notebookService.renameNote(noteId, request.getName(), getServiceContext(),
+        new RestServiceCallback<Note>(){
           @Override
           public void onSuccess(Note note, ServiceContext context) throws IOException {
             notebookServer.broadcastNote(note);
@@ -495,9 +491,8 @@ public class NotebookRestApi extends AbstractRestApi {
   @GET
   @Path("{noteId}/paragraph/{paragraphId}")
   @ZeppelinApi
-  public Response getParagraph(
-      @PathParam("noteId") String noteId, @PathParam("paragraphId") String paragraphId)
-      throws IOException {
+  public Response getParagraph(@PathParam("noteId") String noteId,
+                               @PathParam("paragraphId") String paragraphId) throws IOException {
     LOG.info("get paragraph {} {}", noteId, paragraphId);
 
     Note note = notebook.getNote(noteId);
@@ -513,16 +508,14 @@ public class NotebookRestApi extends AbstractRestApi {
    * Update paragraph.
    *
    * @param message json containing the "text" and optionally the "title" of the paragraph, e.g.
-   *     {"text" : "updated text", "title" : "Updated title" }
+   *                {"text" : "updated text", "title" : "Updated title" }
    */
   @PUT
   @Path("{noteId}/paragraph/{paragraphId}")
   @ZeppelinApi
-  public Response updateParagraph(
-      @PathParam("noteId") String noteId,
-      @PathParam("paragraphId") String paragraphId,
-      String message)
-      throws IOException {
+  public Response updateParagraph(@PathParam("noteId") String noteId,
+                                  @PathParam("paragraphId") String paragraphId,
+                                  String message) throws IOException {
     String user = SecurityUtils.getPrincipal();
     LOG.info("{} will update paragraph {} {}", user, noteId, paragraphId);
 
@@ -548,11 +541,9 @@ public class NotebookRestApi extends AbstractRestApi {
   @PUT
   @Path("{noteId}/paragraph/{paragraphId}/config")
   @ZeppelinApi
-  public Response updateParagraphConfig(
-      @PathParam("noteId") String noteId,
-      @PathParam("paragraphId") String paragraphId,
-      String message)
-      throws IOException {
+  public Response updateParagraphConfig(@PathParam("noteId") String noteId,
+                                        @PathParam("paragraphId") String paragraphId,
+                                        String message) throws IOException {
     String user = SecurityUtils.getPrincipal();
     LOG.info("{} will update paragraph config {} {}", user, noteId, paragraphId);
 
@@ -579,16 +570,12 @@ public class NotebookRestApi extends AbstractRestApi {
   @POST
   @Path("{noteId}/paragraph/{paragraphId}/move/{newIndex}")
   @ZeppelinApi
-  public Response moveParagraph(
-      @PathParam("noteId") String noteId,
-      @PathParam("paragraphId") String paragraphId,
-      @PathParam("newIndex") String newIndex)
+  public Response moveParagraph(@PathParam("noteId") String noteId,
+                                @PathParam("paragraphId") String paragraphId,
+                                @PathParam("newIndex") String newIndex)
       throws IOException {
     LOG.info("move paragraph {} {} {}", noteId, paragraphId, newIndex);
-    notebookService.moveParagraph(
-        noteId,
-        paragraphId,
-        Integer.parseInt(newIndex),
+    notebookService.moveParagraph(noteId, paragraphId, Integer.parseInt(newIndex),
         getServiceContext(),
         new RestServiceCallback<Paragraph>() {
           @Override
@@ -597,6 +584,7 @@ public class NotebookRestApi extends AbstractRestApi {
           }
         });
     return new JsonResponse(Status.OK, "").build();
+
   }
 
   /**
@@ -609,14 +597,10 @@ public class NotebookRestApi extends AbstractRestApi {
   @DELETE
   @Path("{noteId}/paragraph/{paragraphId}")
   @ZeppelinApi
-  public Response deleteParagraph(
-      @PathParam("noteId") String noteId, @PathParam("paragraphId") String paragraphId)
-      throws IOException {
+  public Response deleteParagraph(@PathParam("noteId") String noteId,
+                                  @PathParam("paragraphId") String paragraphId) throws IOException {
     LOG.info("delete paragraph {} {}", noteId, paragraphId);
-    notebookService.removeParagraph(
-        noteId,
-        paragraphId,
-        getServiceContext(),
+    notebookService.removeParagraph(noteId, paragraphId, getServiceContext(),
         new RestServiceCallback<Paragraph>() {
           @Override
           public void onSuccess(Paragraph p, ServiceContext context) throws IOException {
@@ -636,10 +620,11 @@ public class NotebookRestApi extends AbstractRestApi {
   @PUT
   @Path("{noteId}/clear")
   @ZeppelinApi
-  public Response clearAllParagraphOutput(@PathParam("noteId") String noteId) throws IOException {
+  public Response clearAllParagraphOutput(@PathParam("noteId") String noteId)
+      throws IOException {
     LOG.info("clear all paragraph output of note {}", noteId);
-    notebookService.clearAllParagraphOutput(
-        noteId, getServiceContext(), new RestServiceCallback<>());
+    notebookService.clearAllParagraphOutput(noteId, getServiceContext(),
+        new RestServiceCallback<>());
     return new JsonResponse(Status.OK, "").build();
   }
 
@@ -654,8 +639,8 @@ public class NotebookRestApi extends AbstractRestApi {
   @POST
   @Path("job/{noteId}")
   @ZeppelinApi
-  public Response runNoteJobs(
-      @PathParam("noteId") String noteId, @QueryParam("waitToFinish") Boolean waitToFinish)
+  public Response runNoteJobs(@PathParam("noteId") String noteId,
+                              @QueryParam("waitToFinish") Boolean waitToFinish)
       throws IOException, IllegalArgumentException {
     boolean blocking = waitToFinish == null || waitToFinish;
     LOG.info("run note jobs {} waitToFinish: {}", noteId, blocking);
@@ -669,10 +654,8 @@ public class NotebookRestApi extends AbstractRestApi {
       note.runAll(subject, blocking);
     } catch (Exception ex) {
       LOG.error("Exception from run", ex);
-      return new JsonResponse<>(
-              Status.PRECONDITION_FAILED,
-              ex.getMessage() + "- Not selected or Invalid Interpreter bind")
-          .build();
+      return new JsonResponse<>(Status.PRECONDITION_FAILED,
+          ex.getMessage() + "- Not selected or Invalid Interpreter bind").build();
     }
     return new JsonResponse<>(Status.OK).build();
   }
@@ -727,7 +710,7 @@ public class NotebookRestApi extends AbstractRestApi {
   /**
    * Get note paragraph job status REST API.
    *
-   * @param noteId ID of Note
+   * @param noteId      ID of Note
    * @param paragraphId ID of Paragraph
    * @return JSON with status.OK
    * @throws IOException
@@ -736,8 +719,8 @@ public class NotebookRestApi extends AbstractRestApi {
   @GET
   @Path("job/{noteId}/{paragraphId}")
   @ZeppelinApi
-  public Response getNoteParagraphJobStatus(
-      @PathParam("noteId") String noteId, @PathParam("paragraphId") String paragraphId)
+  public Response getNoteParagraphJobStatus(@PathParam("noteId") String noteId,
+                                            @PathParam("paragraphId") String paragraphId)
       throws IOException, IllegalArgumentException {
     LOG.info("get note paragraph job status.");
     Note note = notebook.getNote(noteId);
@@ -747,15 +730,15 @@ public class NotebookRestApi extends AbstractRestApi {
     Paragraph paragraph = note.getParagraph(paragraphId);
     checkIfParagraphIsNotNull(paragraph);
 
-    return new JsonResponse<>(Status.OK, null, note.generateSingleParagraphInfo(paragraphId))
-        .build();
+    return new JsonResponse<>(Status.OK, null, note.generateSingleParagraphInfo(paragraphId)).
+        build();
   }
 
   /**
    * Run asynchronously paragraph job REST API.
    *
-   * @param message - JSON with params if user wants to update dynamic form's value null, empty
-   *     string, empty json if user doesn't want to update
+   * @param message - JSON with params if user wants to update dynamic form's value
+   *                null, empty string, empty json if user doesn't want to update
    * @return JSON with status.OK
    * @throws IOException
    * @throws IllegalArgumentException
@@ -763,10 +746,8 @@ public class NotebookRestApi extends AbstractRestApi {
   @POST
   @Path("job/{noteId}/{paragraphId}")
   @ZeppelinApi
-  public Response runParagraph(
-      @PathParam("noteId") String noteId,
-      @PathParam("paragraphId") String paragraphId,
-      String message)
+  public Response runParagraph(@PathParam("noteId") String noteId,
+                               @PathParam("paragraphId") String paragraphId, String message)
       throws IOException, IllegalArgumentException {
     LOG.info("run paragraph job asynchronously {} {} {}", noteId, paragraphId, message);
 
@@ -776,27 +757,18 @@ public class NotebookRestApi extends AbstractRestApi {
           RunParagraphWithParametersRequest.fromJson(message);
       params = request.getParams();
     }
-    notebookService.runParagraph(
-        noteId,
-        paragraphId,
-        "",
-        "",
-        params,
-        new HashMap<>(),
-        false,
-        false,
-        getServiceContext(),
-        new RestServiceCallback<>());
+    notebookService.runParagraph(noteId, paragraphId, "", "", params,
+        new HashMap<>(), false, false, getServiceContext(), new RestServiceCallback<>());
     return new JsonResponse<>(Status.OK).build();
   }
 
   /**
    * Run synchronously a paragraph REST API.
    *
-   * @param noteId - noteId
+   * @param noteId      - noteId
    * @param paragraphId - paragraphId
-   * @param message - JSON with params if user wants to update dynamic form's value null, empty
-   *     string, empty json if user doesn't want to update
+   * @param message     - JSON with params if user wants to update dynamic form's value
+   *                    null, empty string, empty json if user doesn't want to update
    * @return JSON with status.OK
    * @throws IOException
    * @throws IllegalArgumentException
@@ -804,10 +776,9 @@ public class NotebookRestApi extends AbstractRestApi {
   @POST
   @Path("run/{noteId}/{paragraphId}")
   @ZeppelinApi
-  public Response runParagraphSynchronously(
-      @PathParam("noteId") String noteId,
-      @PathParam("paragraphId") String paragraphId,
-      String message)
+  public Response runParagraphSynchronously(@PathParam("noteId") String noteId,
+                                            @PathParam("paragraphId") String paragraphId,
+                                            String message)
       throws IOException, IllegalArgumentException {
     LOG.info("run paragraph synchronously {} {} {}", noteId, paragraphId, message);
 
@@ -817,17 +788,8 @@ public class NotebookRestApi extends AbstractRestApi {
           RunParagraphWithParametersRequest.fromJson(message);
       params = request.getParams();
     }
-    if (notebookService.runParagraph(
-        noteId,
-        paragraphId,
-        "",
-        "",
-        params,
-        new HashMap<>(),
-        false,
-        true,
-        getServiceContext(),
-        new RestServiceCallback<>())) {
+    if (notebookService.runParagraph(noteId, paragraphId, "", "", params,
+        new HashMap<>(), false, true, getServiceContext(), new RestServiceCallback<>())) {
       Note note = notebookService.getNote(noteId, getServiceContext(), new RestServiceCallback<>());
       Paragraph p = note.getParagraph(paragraphId);
       InterpreterResult result = p.getReturn();
@@ -844,7 +806,7 @@ public class NotebookRestApi extends AbstractRestApi {
   /**
    * Stop(delete) paragraph job REST API.
    *
-   * @param noteId ID of Note
+   * @param noteId      ID of Note
    * @param paragraphId ID of Paragraph
    * @return JSON with status.OK
    * @throws IOException
@@ -853,12 +815,12 @@ public class NotebookRestApi extends AbstractRestApi {
   @DELETE
   @Path("job/{noteId}/{paragraphId}")
   @ZeppelinApi
-  public Response cancelParagraph(
-      @PathParam("noteId") String noteId, @PathParam("paragraphId") String paragraphId)
+  public Response cancelParagraph(@PathParam("noteId") String noteId,
+                                  @PathParam("paragraphId") String paragraphId)
       throws IOException, IllegalArgumentException {
     LOG.info("stop paragraph job {} ", noteId);
-    notebookService.cancelParagraph(
-        noteId, paragraphId, getServiceContext(), new RestServiceCallback<Paragraph>());
+    notebookService.cancelParagraph(noteId, paragraphId, getServiceContext(),
+        new RestServiceCallback<Paragraph>());
     return new JsonResponse<>(Status.OK).build();
   }
 
@@ -913,8 +875,8 @@ public class NotebookRestApi extends AbstractRestApi {
 
     Note note = notebook.getNote(noteId);
     checkIfNoteIsNotNull(note);
-    checkIfUserIsOwner(
-        noteId, "Insufficient privileges you cannot remove this cron job from this note");
+    checkIfUserIsOwner(noteId,
+        "Insufficient privileges you cannot remove this cron job from this note");
     checkIfNoteSupportsCron(note);
 
     Map<String, Object> config = note.getConfig();
@@ -960,9 +922,8 @@ public class NotebookRestApi extends AbstractRestApi {
   @ZeppelinApi
   public Response getJobListforNote() throws IOException, IllegalArgumentException {
     LOG.info("Get note jobs for job manager");
-    List<JobManagerService.NoteJobInfo> noteJobs =
-        jobManagerService.getNoteJobInfoByUnixTime(
-            0, getServiceContext(), new RestServiceCallback<>());
+    List<JobManagerService.NoteJobInfo> noteJobs = jobManagerService
+        .getNoteJobInfoByUnixTime(0, getServiceContext(), new RestServiceCallback<>());
     Map<String, Object> response = new HashMap<>();
     response.put("lastResponseUnixTime", System.currentTimeMillis());
     response.put("jobs", noteJobs);
@@ -971,8 +932,8 @@ public class NotebookRestApi extends AbstractRestApi {
 
   /**
    * Get updated note jobs for job manager
-   *
-   * <p>Return the `Note` change information within the post unix timestamp.
+   * <p>
+   * Return the `Note` change information within the post unix timestamp.
    *
    * @return JSON with status.OK
    * @throws IOException
@@ -985,15 +946,17 @@ public class NotebookRestApi extends AbstractRestApi {
       throws IOException, IllegalArgumentException {
     LOG.info("Get updated note jobs lastUpdateTime {}", lastUpdateUnixTime);
     List<JobManagerService.NoteJobInfo> noteJobs =
-        jobManagerService.getNoteJobInfoByUnixTime(
-            lastUpdateUnixTime, getServiceContext(), new RestServiceCallback<>());
+        jobManagerService.getNoteJobInfoByUnixTime(lastUpdateUnixTime, getServiceContext(),
+            new RestServiceCallback<>());
     Map<String, Object> response = new HashMap<>();
     response.put("lastResponseUnixTime", System.currentTimeMillis());
     response.put("jobs", noteJobs);
     return new JsonResponse<>(Status.OK, response).build();
   }
 
-  /** Search for a Notes with permissions. */
+  /**
+   * Search for a Notes with permissions.
+   */
   @GET
   @Path("search")
   @ZeppelinApi
@@ -1008,10 +971,10 @@ public class NotebookRestApi extends AbstractRestApi {
     for (int i = 0; i < notesFound.size(); i++) {
       String[] ids = notesFound.get(i).get("id").split("/", 2);
       String noteId = ids[0];
-      if (!notebookAuthorization.isOwner(noteId, userAndRoles)
-          && !notebookAuthorization.isReader(noteId, userAndRoles)
-          && !notebookAuthorization.isWriter(noteId, userAndRoles)
-          && !notebookAuthorization.isRunner(noteId, userAndRoles)) {
+      if (!notebookAuthorization.isOwner(noteId, userAndRoles) &&
+          !notebookAuthorization.isReader(noteId, userAndRoles) &&
+          !notebookAuthorization.isWriter(noteId, userAndRoles) &&
+          !notebookAuthorization.isRunner(noteId, userAndRoles)) {
         notesFound.remove(i);
         i--;
       }
@@ -1020,6 +983,7 @@ public class NotebookRestApi extends AbstractRestApi {
     return new JsonResponse<>(Status.OK, notesFound).build();
   }
 
+
   private void handleParagraphParams(String message, Note note, Paragraph paragraph)
       throws IOException {
     // handle params if presented
@@ -1049,11 +1013,8 @@ public class NotebookRestApi extends AbstractRestApi {
   private void configureParagraph(Paragraph p, Map<String, Object> newConfig, String user) {
     LOG.info("Configure Paragraph for user {}", user);
     if (newConfig == null || newConfig.isEmpty()) {
-      LOG.warn(
-          "{} is trying to update paragraph {} of note {} with empty config",
-          user,
-          p.getId(),
-          p.getNote().getId());
+      LOG.warn("{} is trying to update paragraph {} of note {} with empty config",
+          user, p.getId(), p.getNote().getId());
       throw new BadRequestException("paragraph config cannot be empty");
     }
     Map<String, Object> origConfig = p.getConfig();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/SecurityRestApi.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/SecurityRestApi.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/SecurityRestApi.java
index b4d71d9..45b76fa 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/SecurityRestApi.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/SecurityRestApi.java
@@ -17,18 +17,6 @@
 package org.apache.zeppelin.rest;
 
 import com.google.gson.Gson;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Response;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.zeppelin.annotation.ZeppelinApi;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
@@ -38,7 +26,22 @@ import org.apache.zeppelin.utils.SecurityUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Zeppelin security rest api endpoint. */
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Zeppelin security rest api endpoint.
+ */
 @Path("/security")
 @Produces("application/json")
 public class SecurityRestApi {
@@ -46,8 +49,10 @@ public class SecurityRestApi {
   private static final Gson gson = new Gson();
 
   /**
-   * Get ticket Returns username & ticket for anonymous access, username is always anonymous. After
-   * getting this ticket, access through websockets become safe
+   * Get ticket
+   * Returns username & ticket
+   * for anonymous access, username is always anonymous.
+   * After getting this ticket, access through websockets become safe
    *
    * @return 200 response
    */
@@ -80,7 +85,7 @@ public class SecurityRestApi {
   /**
    * Get userlist.
    *
-   * <p>Returns list of all user from available realms
+   * Returns list of all user from available realms
    *
    * @return 200 response
    */
@@ -96,19 +101,17 @@ public class SecurityRestApi {
     List<String> autoSuggestRoleList = new ArrayList<>();
     Collections.sort(usersList);
     Collections.sort(rolesList);
-    Collections.sort(
-        usersList,
-        new Comparator<String>() {
-          @Override
-          public int compare(String o1, String o2) {
-            if (o1.matches(searchText + "(.*)") && o2.matches(searchText + "(.*)")) {
-              return 0;
-            } else if (o1.matches(searchText + "(.*)")) {
-              return -1;
-            }
-            return 0;
-          }
-        });
+    Collections.sort(usersList, new Comparator<String>() {
+      @Override
+      public int compare(String o1, String o2) {
+        if (o1.matches(searchText + "(.*)") && o2.matches(searchText + "(.*)")) {
+          return 0;
+        } else if (o1.matches(searchText + "(.*)")) {
+          return -1;
+        }
+        return 0;
+      }
+    });
     int maxLength = 0;
     for (String user : usersList) {
       if (StringUtils.containsIgnoreCase(user, searchText)) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/ZeppelinRestApi.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/ZeppelinRestApi.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/ZeppelinRestApi.java
index 75e92e5..20d6973 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/ZeppelinRestApi.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/ZeppelinRestApi.java
@@ -16,8 +16,12 @@
  */
 package org.apache.zeppelin.rest;
 
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+
 import java.util.HashMap;
 import java.util.Map;
+
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.GET;
 import javax.ws.rs.PUT;
@@ -25,8 +29,7 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.Response;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
+
 import org.apache.zeppelin.annotation.ZeppelinApi;
 import org.apache.zeppelin.server.JsonResponse;
 import org.apache.zeppelin.util.Util;
@@ -70,18 +73,16 @@ public class ZeppelinRestApi {
    */
   @PUT
   @Path("log/level/{logLevel}")
-  public Response changeRootLogLevel(
-      @Context HttpServletRequest request, @PathParam("logLevel") String logLevel) {
+  public Response changeRootLogLevel(@Context HttpServletRequest request,
+      @PathParam("logLevel") String logLevel) {
     Level level = Level.toLevel(logLevel);
     if (logLevel.toLowerCase().equalsIgnoreCase(level.toString().toLowerCase())) {
       Logger.getRootLogger().setLevel(level);
       return new JsonResponse<>(Response.Status.OK).build();
     } else {
-      return new JsonResponse<>(
-              Response.Status.NOT_ACCEPTABLE,
-              "Please check LOG level specified. Valid values: DEBUG, ERROR, FATAL, "
-                  + "INFO, TRACE, WARN")
-          .build();
+      return new JsonResponse<>(Response.Status.NOT_ACCEPTABLE,
+          "Please check LOG level specified. Valid values: DEBUG, ERROR, FATAL, "
+              + "INFO, TRACE, WARN").build();
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/BadRequestException.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/BadRequestException.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/BadRequestException.java
index 15a7d4d..9af2fdd 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/BadRequestException.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/BadRequestException.java
@@ -20,9 +20,12 @@ import static javax.ws.rs.core.Response.Status.BAD_REQUEST;
 
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Response;
+
 import org.apache.zeppelin.utils.ExceptionUtils;
 
-/** BadRequestException handler for WebApplicationException. */
+/**
+ * BadRequestException handler for WebApplicationException.
+ */
 public class BadRequestException extends WebApplicationException {
   public BadRequestException() {
     super(ExceptionUtils.jsonResponse(BAD_REQUEST));

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/ForbiddenException.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/ForbiddenException.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/ForbiddenException.java
index 17e0a13..abe08eb 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/ForbiddenException.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/ForbiddenException.java
@@ -20,9 +20,12 @@ import static javax.ws.rs.core.Response.Status.FORBIDDEN;
 
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Response;
+
 import org.apache.zeppelin.utils.ExceptionUtils;
 
-/** UnauthorizedException handler for WebApplicationException. */
+/**
+ * UnauthorizedException handler for WebApplicationException.
+ */
 public class ForbiddenException extends WebApplicationException {
   private static Response forbiddenJson(String message) {
     return ExceptionUtils.jsonResponseContent(FORBIDDEN, message);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/NoteNotFoundException.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/NoteNotFoundException.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/NoteNotFoundException.java
index a406089..773d749 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/NoteNotFoundException.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/NoteNotFoundException.java
@@ -17,14 +17,16 @@
 
 package org.apache.zeppelin.rest.exception;
 
-import static javax.ws.rs.core.Response.Status.NOT_FOUND;
+import org.apache.zeppelin.utils.ExceptionUtils;
 
 import javax.ws.rs.WebApplicationException;
-import org.apache.zeppelin.utils.ExceptionUtils;
+
+import static javax.ws.rs.core.Response.Status.NOT_FOUND;
 
 public class NoteNotFoundException extends WebApplicationException {
 
   public NoteNotFoundException(String noteId) {
     super(ExceptionUtils.jsonResponseContent(NOT_FOUND, "No such note: " + noteId));
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/ParagraphNotFoundException.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/ParagraphNotFoundException.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/ParagraphNotFoundException.java
index 4213cc7..4ec5ee1 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/ParagraphNotFoundException.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/ParagraphNotFoundException.java
@@ -17,10 +17,11 @@
 
 package org.apache.zeppelin.rest.exception;
 
-import static javax.ws.rs.core.Response.Status.NOT_FOUND;
+import org.apache.zeppelin.utils.ExceptionUtils;
 
 import javax.ws.rs.WebApplicationException;
-import org.apache.zeppelin.utils.ExceptionUtils;
+
+import static javax.ws.rs.core.Response.Status.NOT_FOUND;
 
 public class ParagraphNotFoundException extends WebApplicationException {
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/WebApplicationExceptionMapper.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/WebApplicationExceptionMapper.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/WebApplicationExceptionMapper.java
index 5c83828..79e3fe0 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/WebApplicationExceptionMapper.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/exception/WebApplicationExceptionMapper.java
@@ -31,14 +31,14 @@ public class WebApplicationExceptionMapper implements ExceptionMapper<WebApplica
 
   public WebApplicationExceptionMapper() {
     GsonBuilder gsonBuilder = new GsonBuilder().enableComplexMapKeySerialization();
-    gsonBuilder.registerTypeHierarchyAdapter(Exception.class, new ExceptionSerializer());
+    gsonBuilder.registerTypeHierarchyAdapter(
+        Exception.class, new ExceptionSerializer());
     this.gson = gsonBuilder.create();
   }
 
   @Override
   public Response toResponse(WebApplicationException exception) {
     return Response.status(exception.getResponse().getStatus())
-        .entity(gson.toJson(exception))
-        .build();
+        .entity(gson.toJson(exception)).build();
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/CronRequest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/CronRequest.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/CronRequest.java
index fb1408c..404a3c3 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/CronRequest.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/CronRequest.java
@@ -17,15 +17,19 @@
 package org.apache.zeppelin.rest.message;
 
 import com.google.gson.Gson;
+
 import org.apache.zeppelin.common.JsonSerializable;
 
-/** CronRequest rest api request message. */
+/**
+ *  CronRequest rest api request message.
+ */
 public class CronRequest implements JsonSerializable {
   private static final Gson gson = new Gson();
 
   String cron;
 
-  public CronRequest() {}
+  public CronRequest (){
+  }
 
   public String getCronString() {
     return cron;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NewInterpreterSettingRequest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NewInterpreterSettingRequest.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NewInterpreterSettingRequest.java
index bf5cc5d..3d577ef 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NewInterpreterSettingRequest.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NewInterpreterSettingRequest.java
@@ -17,14 +17,18 @@
 package org.apache.zeppelin.rest.message;
 
 import com.google.gson.Gson;
+
 import java.util.List;
 import java.util.Map;
+
 import org.apache.zeppelin.common.JsonSerializable;
 import org.apache.zeppelin.dep.Dependency;
 import org.apache.zeppelin.interpreter.InterpreterOption;
 import org.apache.zeppelin.interpreter.InterpreterProperty;
 
-/** NewInterpreterSetting REST API request message. */
+/**
+ * NewInterpreterSetting REST API request message.
+ */
 public class NewInterpreterSettingRequest implements JsonSerializable {
   private static final Gson gson = new Gson();
   private String name;
@@ -34,7 +38,8 @@ public class NewInterpreterSettingRequest implements JsonSerializable {
   private List<Dependency> dependencies;
   private InterpreterOption option;
 
-  public NewInterpreterSettingRequest() {}
+  public NewInterpreterSettingRequest() {
+  }
 
   public String getName() {
     return name;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NewNoteRequest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NewNoteRequest.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NewNoteRequest.java
index e1aa3c1..9cf1df1 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NewNoteRequest.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NewNoteRequest.java
@@ -17,17 +17,22 @@
 package org.apache.zeppelin.rest.message;
 
 import com.google.gson.Gson;
+
 import java.util.List;
+
 import org.apache.zeppelin.common.JsonSerializable;
 
-/** NewNoteRequest rest api request message. */
+/**
+ *  NewNoteRequest rest api request message.
+ */
 public class NewNoteRequest implements JsonSerializable {
   private static final Gson gson = new Gson();
 
   String name;
   List<NewParagraphRequest> paragraphs;
 
-  public NewNoteRequest() {}
+  public NewNoteRequest (){
+  }
 
   public String getName() {
     return name;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NewParagraphRequest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NewParagraphRequest.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NewParagraphRequest.java
index 506fc72..e0cb786 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NewParagraphRequest.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NewParagraphRequest.java
@@ -17,15 +17,18 @@
 package org.apache.zeppelin.rest.message;
 
 import com.google.gson.Gson;
+
 import java.util.HashMap;
+
 import org.apache.zeppelin.common.JsonSerializable;
 
 /**
  * NewParagraphRequest rest api request message
  *
- * <p>index field will be ignored when it's used to provide initial paragraphs visualization
- * (optional) one of: table,pieChart,multibarChart,stackedAreaChart,lineChart,scatterChart colWidth
- * (optional), e.g. 12.0
+ * index field will be ignored when it's used to provide initial paragraphs
+ * visualization (optional) one of:
+ * table,pieChart,multibarChart,stackedAreaChart,lineChart,scatterChart
+ * colWidth (optional), e.g. 12.0
  */
 public class NewParagraphRequest implements JsonSerializable {
   private static final Gson gson = new Gson();
@@ -33,9 +36,10 @@ public class NewParagraphRequest implements JsonSerializable {
   String title;
   String text;
   Double index;
-  HashMap<String, Object> config;
+  HashMap< String, Object > config;
 
-  public NewParagraphRequest() {}
+  public NewParagraphRequest() {
+  }
 
   public String getTitle() {
     return title;
@@ -49,7 +53,7 @@ public class NewParagraphRequest implements JsonSerializable {
     return index;
   }
 
-  public HashMap<String, Object> getConfig() {
+  public HashMap< String, Object > getConfig() {
     return config;
   }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NotebookRepoSettingsRequest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NotebookRepoSettingsRequest.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NotebookRepoSettingsRequest.java
index ad6db52..31f3be8 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NotebookRepoSettingsRequest.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/NotebookRepoSettingsRequest.java
@@ -17,12 +17,17 @@
 package org.apache.zeppelin.rest.message;
 
 import com.google.gson.Gson;
+
+import org.apache.commons.lang.StringUtils;
+
 import java.util.Collections;
 import java.util.Map;
-import org.apache.commons.lang.StringUtils;
+
 import org.apache.zeppelin.common.JsonSerializable;
 
-/** Represent payload of a notebook repo settings. */
+/**
+ * Represent payload of a notebook repo settings.
+ */
 public class NotebookRepoSettingsRequest implements JsonSerializable {
   private static final Gson gson = new Gson();
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/RenameNoteRequest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/RenameNoteRequest.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/RenameNoteRequest.java
index ad0e5a3..72ee2a6 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/RenameNoteRequest.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/RenameNoteRequest.java
@@ -17,11 +17,17 @@
 
 package org.apache.zeppelin.rest.message;
 
-/** RenameNoteRequest rest api request message */
+/**
+ *  RenameNoteRequest rest api request message
+ *
+ */
+
 public class RenameNoteRequest {
   String name;
 
-  public RenameNoteRequest() {}
+  public RenameNoteRequest (){
+
+  }
 
   public String getName() {
     return name;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/RestartInterpreterRequest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/RestartInterpreterRequest.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/RestartInterpreterRequest.java
index 479d2a9..8a6d0d0 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/RestartInterpreterRequest.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/RestartInterpreterRequest.java
@@ -17,15 +17,19 @@
 package org.apache.zeppelin.rest.message;
 
 import com.google.gson.Gson;
+
 import org.apache.zeppelin.common.JsonSerializable;
 
-/** RestartInterpreter rest api request message. */
+/**
+ * RestartInterpreter rest api request message.
+ */
 public class RestartInterpreterRequest implements JsonSerializable {
   private static final Gson gson = new Gson();
 
   String noteId;
 
-  public RestartInterpreterRequest() {}
+  public RestartInterpreterRequest() {
+  }
 
   public String getNoteId() {
     return noteId;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/RunParagraphWithParametersRequest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/RunParagraphWithParametersRequest.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/RunParagraphWithParametersRequest.java
index 48401d8..be703da 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/RunParagraphWithParametersRequest.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/RunParagraphWithParametersRequest.java
@@ -17,16 +17,21 @@
 package org.apache.zeppelin.rest.message;
 
 import com.google.gson.Gson;
+
 import java.util.Map;
+
 import org.apache.zeppelin.common.JsonSerializable;
 
-/** RunParagraphWithParametersRequest rest api request message. */
+/**
+ * RunParagraphWithParametersRequest rest api request message.
+ */
 public class RunParagraphWithParametersRequest implements JsonSerializable {
   private static final Gson gson = new Gson();
 
   Map<String, Object> params;
 
-  public RunParagraphWithParametersRequest() {}
+  public RunParagraphWithParametersRequest() {
+  }
 
   public Map<String, Object> getParams() {
     return params;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/UpdateInterpreterSettingRequest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/UpdateInterpreterSettingRequest.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/UpdateInterpreterSettingRequest.java
index 2a12c89..cc446e2 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/UpdateInterpreterSettingRequest.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/UpdateInterpreterSettingRequest.java
@@ -17,14 +17,18 @@
 package org.apache.zeppelin.rest.message;
 
 import com.google.gson.Gson;
+
 import java.util.List;
 import java.util.Map;
+
 import org.apache.zeppelin.common.JsonSerializable;
 import org.apache.zeppelin.dep.Dependency;
 import org.apache.zeppelin.interpreter.InterpreterOption;
 import org.apache.zeppelin.interpreter.InterpreterProperty;
 
-/** UpdateInterpreterSetting rest api request message. */
+/**
+ * UpdateInterpreterSetting rest api request message.
+ */
 public class UpdateInterpreterSettingRequest implements JsonSerializable {
   private static final Gson gson = new Gson();
 
@@ -32,10 +36,8 @@ public class UpdateInterpreterSettingRequest implements JsonSerializable {
   List<Dependency> dependencies;
   InterpreterOption option;
 
-  public UpdateInterpreterSettingRequest(
-      Map<String, InterpreterProperty> properties,
-      List<Dependency> dependencies,
-      InterpreterOption option) {
+  public UpdateInterpreterSettingRequest(Map<String, InterpreterProperty> properties,
+      List<Dependency> dependencies, InterpreterOption option) {
     this.properties = properties;
     this.dependencies = dependencies;
     this.option = option;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/UpdateParagraphRequest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/UpdateParagraphRequest.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/UpdateParagraphRequest.java
index 5e343d0..9b0db40 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/UpdateParagraphRequest.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/UpdateParagraphRequest.java
@@ -16,12 +16,15 @@
  */
 package org.apache.zeppelin.rest.message;
 
-/** UpdateParagraphRequest. */
+/**
+ * UpdateParagraphRequest.
+ */
 public class UpdateParagraphRequest {
   String title;
   String text;
 
-  public UpdateParagraphRequest() {}
+  public UpdateParagraphRequest() {
+  }
 
   public String getTitle() {
     return title;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/server/CorsFilter.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/server/CorsFilter.java b/zeppelin-server/src/main/java/org/apache/zeppelin/server/CorsFilter.java
index da30187..efbd8c5 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/server/CorsFilter.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/server/CorsFilter.java
@@ -16,8 +16,12 @@
  */
 package org.apache.zeppelin.server;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.IOException;
 import java.net.URISyntaxException;
+
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
@@ -26,12 +30,13 @@ import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.utils.SecurityUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Cors filter. */
+/**
+ * Cors filter.
+ */
 public class CorsFilter implements Filter {
   private static final Logger LOGGER = LoggerFactory.getLogger(CorsFilter.class);
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/server/JsonResponse.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/server/JsonResponse.java b/zeppelin-server/src/main/java/org/apache/zeppelin/server/JsonResponse.java
index b7fe773..fcb4ea8 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/server/JsonResponse.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/server/JsonResponse.java
@@ -18,7 +18,9 @@ package org.apache.zeppelin.server;
 
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
+
 import java.util.ArrayList;
+
 import javax.ws.rs.core.NewCookie;
 import javax.ws.rs.core.Response.ResponseBuilder;
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-server/src/main/java/org/apache/zeppelin/service/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/service/ConfigurationService.java b/zeppelin-server/src/main/java/org/apache/zeppelin/service/ConfigurationService.java
index 40a27ff..280449b 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/service/ConfigurationService.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/service/ConfigurationService.java
@@ -15,15 +15,17 @@
  * limitations under the License.
  */
 
+
 package org.apache.zeppelin.service;
 
-import java.io.IOException;
-import java.util.Map;
 import javax.inject.Inject;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.util.Map;
+
 public class ConfigurationService {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(ConfigurationService.class);
@@ -35,30 +37,27 @@ public class ConfigurationService {
     this.zConf = zConf;
   }
 
-  public Map<String, String> getAllProperties(
-      ServiceContext context, ServiceCallback<Map<String, String>> callback) throws IOException {
-    Map<String, String> properties =
-        zConf.dumpConfigurations(
-            key ->
-                !key.contains("password")
-                    && !key.equals(
-                        ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_AZURE_CONNECTION_STRING
-                            .getVarName()));
+  public Map<String, String> getAllProperties(ServiceContext context,
+                                              ServiceCallback<Map<String, String>> callback)
+      throws IOException {
+    Map<String, String> properties = zConf.dumpConfigurations(key ->
+        !key.contains("password") &&
+            !key.equals(ZeppelinConfiguration.ConfVars
+                .ZEPPELIN_NOTEBOOK_AZURE_CONNECTION_STRING.getVarName()));
     callback.onSuccess(properties, context);
     return properties;
   }
 
-  public Map<String, String> getPropertiesWithPrefix(
-      String prefix, ServiceContext context, ServiceCallback<Map<String, String>> callback)
+  public Map<String, String> getPropertiesWithPrefix(String prefix,
+                                                     ServiceContext context,
+                                                     ServiceCallback<Map<String, String>> callback)
       throws IOException {
-    Map<String, String> properties =
-        zConf.dumpConfigurations(
-            key ->
-                !key.contains("password")
-                    && !key.equals(
-                        ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_AZURE_CONNECTION_STRING
-                            .getVarName())
-                    && key.startsWith(prefix));
+    Map<String, String> properties = zConf.dumpConfigurations(key ->
+        !key.contains("password") &&
+            !key.equals(ZeppelinConfiguration.ConfVars
+                    .ZEPPELIN_NOTEBOOK_AZURE_CONNECTION_STRING
+                    .getVarName()) &&
+            key.startsWith(prefix));
     callback.onSuccess(properties, context);
     return properties;
   }


[38/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin`"

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/sap/src/test/java/org/apache/zeppelin/sap/universe/UniverseUtilTest.java
----------------------------------------------------------------------
diff --git a/sap/src/test/java/org/apache/zeppelin/sap/universe/UniverseUtilTest.java b/sap/src/test/java/org/apache/zeppelin/sap/universe/UniverseUtilTest.java
index af80c3a..81a027e 100644
--- a/sap/src/test/java/org/apache/zeppelin/sap/universe/UniverseUtilTest.java
+++ b/sap/src/test/java/org/apache/zeppelin/sap/universe/UniverseUtilTest.java
@@ -17,6 +17,12 @@
 
 package org.apache.zeppelin.sap.universe;
 
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
@@ -24,11 +30,6 @@ import static org.mockito.Matchers.anyString;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.Before;
-import org.junit.Test;
-
 public class UniverseUtilTest {
 
   private UniverseClient universeClient;
@@ -36,368 +37,335 @@ public class UniverseUtilTest {
 
   @Before
   public void beforeTest() throws UniverseException {
-    universeUtil = new UniverseUtil();
-    UniverseInfo universeInfo = new UniverseInfo("1", "testUniverse", "uvx");
-    Map<String, UniverseNodeInfo> testUniverseNodes = new HashMap<>();
-    testUniverseNodes.put(
-        "[Dimension].[Test].[name1]",
-        new UniverseNodeInfo(
-            "name1id",
-            "name1",
-            "dimension",
-            "Dimension\\Test",
-            "Dimension|folder\\Test|folder\\name1|dimension"));
-    testUniverseNodes.put(
-        "[Dimension].[Test].[name2]",
-        new UniverseNodeInfo(
-            "name2id",
-            "name2",
-            "dimension",
-            "Filter\\Test",
-            "Dimension|folder\\Test|folder\\name2|dimension"));
-    testUniverseNodes.put(
-        "[Filter].[name3]",
-        new UniverseNodeInfo(
-            "name3id", "name3", "filter", "Filter", "Filter|folder\\name3|filter"));
-    testUniverseNodes.put(
-        "[Filter].[name4]",
-        new UniverseNodeInfo(
-            "name4id", "name4", "filter", "Filter", "Filter|folder\\name4|filter"));
-    testUniverseNodes.put(
-        "[Measure].[name5]",
-        new UniverseNodeInfo(
-            "name5id", "name5", "measure", "Measure", "Measure|folder\\name5|measure"));
+      universeUtil = new UniverseUtil();
+      UniverseInfo universeInfo = new UniverseInfo("1", "testUniverse", "uvx");
+      Map<String, UniverseNodeInfo> testUniverseNodes = new HashMap<>();
+      testUniverseNodes.put("[Dimension].[Test].[name1]",
+          new UniverseNodeInfo("name1id", "name1", "dimension", "Dimension\\Test",
+              "Dimension|folder\\Test|folder\\name1|dimension"));
+      testUniverseNodes.put("[Dimension].[Test].[name2]",
+          new UniverseNodeInfo("name2id", "name2", "dimension", "Filter\\Test",
+              "Dimension|folder\\Test|folder\\name2|dimension"));
+      testUniverseNodes.put("[Filter].[name3]",
+          new UniverseNodeInfo("name3id", "name3", "filter", "Filter",
+              "Filter|folder\\name3|filter"));
+      testUniverseNodes.put("[Filter].[name4]",
+          new UniverseNodeInfo("name4id", "name4", "filter", "Filter",
+              "Filter|folder\\name4|filter"));
+      testUniverseNodes.put("[Measure].[name5]",
+          new UniverseNodeInfo("name5id", "name5", "measure", "Measure",
+              "Measure|folder\\name5|measure"));
 
-    universeClient = mock(UniverseClient.class);
-    when(universeClient.getUniverseInfo(anyString())).thenReturn(universeInfo);
-    when(universeClient.getUniverseNodesInfo(anyString(), anyString()))
-        .thenReturn(testUniverseNodes);
+      universeClient = mock(UniverseClient.class);
+      when(universeClient.getUniverseInfo(anyString())).thenReturn(universeInfo);
+      when(universeClient.getUniverseNodesInfo(anyString(), anyString()))
+          .thenReturn(testUniverseNodes);
   }
 
   @Test
   public void testForConvert() throws UniverseException {
-    String request =
-        "universe [testUniverse];\n"
-            + "select [Measure].[name5]\n"
-            + "where [Filter].[name3] and [Dimension].[Test].[name2] > 1;";
-    UniverseQuery universeQuery = universeUtil.convertQuery(request, universeClient, null);
-    assertNotNull(universeQuery);
-    assertNotNull(universeQuery.getUniverseInfo());
-    assertEquals(
-        "<resultObjects>\n"
-            + "<resultObject path=\"Measure|folder\\name5|measure\" id=\"name5id\"/>\n"
-            + "</resultObjects>",
-        universeQuery.getSelect());
-    assertEquals(
-        "<and>\n"
-            + "<predefinedFilter path=\"Filter|folder\\name3|filter\" id=\"name3id\"/>\n"
-            + "\n<comparisonFilter path=\"Dimension|folder\\Test|folder\\name2|dimension\""
-            + " operator=\"GreaterThan\" id=\"name2id\">\n"
-            + "<constantOperand>\n"
-            + "<value>\n"
-            + "<caption type=\"Numeric\">1</caption>\n"
-            + "</value>\n"
-            + "</constantOperand>\n"
-            + "</comparisonFilter>\n\n"
-            + "</and>\n",
-        universeQuery.getWhere());
-    assertEquals("testUniverse", universeQuery.getUniverseInfo().getName());
+      String request = "universe [testUniverse];\n" +
+          "select [Measure].[name5]\n" +
+          "where [Filter].[name3] and [Dimension].[Test].[name2] > 1;";
+      UniverseQuery universeQuery = universeUtil.convertQuery(request, universeClient, null);
+      assertNotNull(universeQuery);
+      assertNotNull(universeQuery.getUniverseInfo());
+      assertEquals("<resultObjects>\n" +
+					"<resultObject path=\"Measure|folder\\name5|measure\" id=\"name5id\"/>\n" +
+					"</resultObjects>", universeQuery.getSelect());
+      assertEquals("<and>\n" +
+          "<predefinedFilter path=\"Filter|folder\\name3|filter\" id=\"name3id\"/>\n" +
+          "\n<comparisonFilter path=\"Dimension|folder\\Test|folder\\name2|dimension\"" +
+          " operator=\"GreaterThan\" id=\"name2id\">\n" +
+          "<constantOperand>\n" +
+          "<value>\n" +
+          "<caption type=\"Numeric\">1</caption>\n" +
+          "</value>\n" +
+          "</constantOperand>\n" +
+          "</comparisonFilter>\n\n" +
+          "</and>\n", universeQuery.getWhere());
+      assertEquals("testUniverse", universeQuery.getUniverseInfo().getName());
   }
 
   @Test
   public void testConvertConditions() throws UniverseException {
-    String request =
-        "universe [testUniverse];\n"
-            + "select [Measure].[name5]\n"
-            + "where [Filter].[name3] "
-            + "and [Dimension].[Test].[name2] >= 1 "
-            + "and [Dimension].[Test].[name2] < 20 "
-            + "and [Dimension].[Test].[name1] <> 'test' "
-            + "and [Dimension].[Test].[name1] is not null "
-            + "and [Measure].[name5] is null"
-            + "and [Dimension].[Test].[name1] in ('var1', 'v a r 2') "
-            + "and [Dimension].[Test].[name1] in ('var1','withoutspaces')"
-            + "and [Dimension].[Test].[name1] in ('one value')"
-            + "and [Dimension].[Test].[name2] in (1,3,4);";
+    String request = "universe [testUniverse];\n" +
+        "select [Measure].[name5]\n" +
+        "where [Filter].[name3] " +
+        "and [Dimension].[Test].[name2] >= 1 " +
+        "and [Dimension].[Test].[name2] < 20 " +
+        "and [Dimension].[Test].[name1] <> 'test' " +
+        "and [Dimension].[Test].[name1] is not null " +
+        "and [Measure].[name5] is null" +
+        "and [Dimension].[Test].[name1] in ('var1', 'v a r 2') " +
+        "and [Dimension].[Test].[name1] in ('var1','withoutspaces')" +
+        "and [Dimension].[Test].[name1] in ('one value')" +
+        "and [Dimension].[Test].[name2] in (1,3,4);";
     UniverseQuery universeQuery = universeUtil.convertQuery(request, universeClient, null);
     assertNotNull(universeQuery);
-    assertEquals(
-        "<and>\n"
-            + "<and>\n"
-            + "<and>\n"
-            + "<and>\n"
-            + "<and>\n"
-            + "<and>\n"
-            + "<and>\n"
-            + "<and>\n"
-            + "<and>\n"
-            + "<predefinedFilter path=\"Filter|folder\\name3|filter\" id=\"name3id\"/>\n\n"
-            + "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name2|dimension\""
-            + " operator=\"GreaterThanOrEqualTo\" id=\"name2id\">\n"
-            + "<constantOperand>\n"
-            + "<value>\n"
-            + "<caption type=\"Numeric\">1</caption>\n"
-            + "</value>\n"
-            + "</constantOperand>\n"
-            + "</comparisonFilter>\n\n"
-            + "</and>\n\n"
-            + "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name2|dimension\""
-            + " operator=\"LessThan\" id=\"name2id\">\n"
-            + "<constantOperand>\n"
-            + "<value>\n"
-            + "<caption type=\"Numeric\">20</caption>\n"
-            + "</value>\n"
-            + "</constantOperand>\n"
-            + "</comparisonFilter>\n\n"
-            + "</and>\n\n"
-            + "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name1|dimension\""
-            + " operator=\"NotEqualTo\" id=\"name1id\">\n"
-            + "<constantOperand>\n"
-            + "<value>\n"
-            + "<caption type=\"String\">test</caption>\n"
-            + "</value>\n"
-            + "</constantOperand>\n"
-            + "</comparisonFilter>\n\n"
-            + "</and>\n\n"
-            + "<comparisonFilter id=\"name1id\" path=\"Dimension|folder\\Test|folder\\name1|dimension\""
-            + " operator=\"IsNotNull\"/>\n\n"
-            + "</and>\n\n"
-            + "<comparisonFilter id=\"name5id\" path=\"Measure|folder\\name5|measure\" operator=\"IsNull\"/>\n\n"
-            + "</and>\n\n"
-            + "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name1|dimension\""
-            + " operator=\"InList\" id=\"name1id\">\n"
-            + "<constantOperand>\n"
-            + "<value>\n"
-            + "<caption type=\"String\">var1</caption>\n"
-            + "</value>\n"
-            + "<value>\n"
-            + "<caption type=\"String\">v a r 2</caption>\n"
-            + "</value>\n"
-            + "</constantOperand>\n"
-            + "</comparisonFilter>\n\n"
-            + "</and>\n\n"
-            + "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name1|dimension\""
-            + " operator=\"InList\" id=\"name1id\">\n"
-            + "<constantOperand>\n"
-            + "<value>\n"
-            + "<caption type=\"String\">var1</caption>\n"
-            + "</value>\n"
-            + "<value>\n"
-            + "<caption type=\"String\">withoutspaces</caption>\n"
-            + "</value>\n"
-            + "</constantOperand>\n"
-            + "</comparisonFilter>\n\n"
-            + "</and>\n\n"
-            + "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name1|dimension\""
-            + " operator=\"InList\" id=\"name1id\">\n"
-            + "<constantOperand>\n"
-            + "<value>\n"
-            + "<caption type=\"String\">one value</caption>\n"
-            + "</value>\n"
-            + "</constantOperand>\n"
-            + "</comparisonFilter>\n\n"
-            + "</and>\n\n"
-            + "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name2|dimension\""
-            + " operator=\"InList\" id=\"name2id\">\n"
-            + "<constantOperand>\n"
-            + "<value>\n"
-            + "<caption type=\"Numeric\">1</caption>\n"
-            + "</value>\n"
-            + "<value>\n"
-            + "<caption type=\"Numeric\">3</caption>\n"
-            + "</value>\n"
-            + "<value>\n"
-            + "<caption type=\"Numeric\">4</caption>\n"
-            + "</value>\n"
-            + "</constantOperand>\n"
-            + "</comparisonFilter>\n\n"
-            + "</and>\n",
+    assertEquals("<and>\n" +
+            "<and>\n" +
+            "<and>\n" +
+            "<and>\n" +
+            "<and>\n" +
+            "<and>\n" +
+            "<and>\n" +
+            "<and>\n" +
+            "<and>\n" +
+            "<predefinedFilter path=\"Filter|folder\\name3|filter\" id=\"name3id\"/>\n\n" +
+            "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name2|dimension\"" +
+            " operator=\"GreaterThanOrEqualTo\" id=\"name2id\">\n" +
+            "<constantOperand>\n" +
+            "<value>\n" +
+            "<caption type=\"Numeric\">1</caption>\n" +
+            "</value>\n" +
+            "</constantOperand>\n" +
+            "</comparisonFilter>\n\n" +
+            "</and>\n\n" +
+            "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name2|dimension\"" +
+            " operator=\"LessThan\" id=\"name2id\">\n" +
+            "<constantOperand>\n" +
+            "<value>\n" +
+            "<caption type=\"Numeric\">20</caption>\n" +
+            "</value>\n" +
+            "</constantOperand>\n" +
+            "</comparisonFilter>\n\n" +
+            "</and>\n\n" +
+            "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name1|dimension\"" +
+            " operator=\"NotEqualTo\" id=\"name1id\">\n" +
+            "<constantOperand>\n" +
+            "<value>\n" +
+            "<caption type=\"String\">test</caption>\n" +
+            "</value>\n" +
+            "</constantOperand>\n" +
+            "</comparisonFilter>\n\n" +
+            "</and>\n\n" +
+            "<comparisonFilter id=\"name1id\" path=\"Dimension|folder\\Test|folder\\name1|dimension\"" +
+            " operator=\"IsNotNull\"/>\n\n" +
+            "</and>\n\n" +
+            "<comparisonFilter id=\"name5id\" path=\"Measure|folder\\name5|measure\" operator=\"IsNull\"/>\n\n" +
+            "</and>\n\n" +
+            "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name1|dimension\"" +
+            " operator=\"InList\" id=\"name1id\">\n" +
+            "<constantOperand>\n" +
+            "<value>\n" +
+            "<caption type=\"String\">var1</caption>\n" +
+            "</value>\n" +
+            "<value>\n" +
+            "<caption type=\"String\">v a r 2</caption>\n" +
+            "</value>\n" +
+            "</constantOperand>\n" +
+            "</comparisonFilter>\n\n" +
+            "</and>\n\n" +
+            "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name1|dimension\"" +
+            " operator=\"InList\" id=\"name1id\">\n" +
+            "<constantOperand>\n" +
+            "<value>\n" +
+            "<caption type=\"String\">var1</caption>\n" +
+            "</value>\n" +
+            "<value>\n" +
+            "<caption type=\"String\">withoutspaces</caption>\n" +
+            "</value>\n" +
+            "</constantOperand>\n" +
+            "</comparisonFilter>\n\n" +
+            "</and>\n\n" +
+            "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name1|dimension\"" +
+            " operator=\"InList\" id=\"name1id\">\n" +
+            "<constantOperand>\n" +
+            "<value>\n" +
+            "<caption type=\"String\">one value</caption>\n" +
+            "</value>\n" +
+            "</constantOperand>\n" +
+            "</comparisonFilter>\n\n" +
+            "</and>\n\n" +
+            "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name2|dimension\"" +
+            " operator=\"InList\" id=\"name2id\">\n" +
+            "<constantOperand>\n" +
+            "<value>\n" +
+            "<caption type=\"Numeric\">1</caption>\n" +
+            "</value>\n" +
+            "<value>\n" +
+            "<caption type=\"Numeric\">3</caption>\n" +
+            "</value>\n" +
+            "<value>\n" +
+            "<caption type=\"Numeric\">4</caption>\n" +
+            "</value>\n" +
+            "</constantOperand>\n" +
+            "</comparisonFilter>\n\n" +
+            "</and>\n",
         universeQuery.getWhere());
   }
 
   @Test(expected = UniverseException.class)
   public void testFailConvertWithoutUniverse() throws UniverseException {
-    String request =
-        "universe ;\n"
-            + "select [Measure].[name5]\n"
-            + "where [Filter].[name3] and [Dimension].[Test].[name2] > 1;";
+    String request = "universe ;\n" +
+        "select [Measure].[name5]\n" +
+        "where [Filter].[name3] and [Dimension].[Test].[name2] > 1;";
     universeUtil.convertQuery(request, universeClient, null);
   }
 
   @Test(expected = UniverseException.class)
   public void testFailConvertWithIncorrectSelect() throws UniverseException {
-    String request = "universe [testUniverse];\n" + "select [not].[exist];";
+    String request = "universe [testUniverse];\n" +
+        "select [not].[exist];";
     universeUtil.convertQuery(request, universeClient, null);
   }
 
+
   @Test(expected = UniverseException.class)
   public void testFailConvertWithIncorrectCondition() throws UniverseException {
-    String request =
-        "universe [testUniverse];\n" + "select [Measure].[name5]\n" + "where [Filter].[name;";
+    String request = "universe [testUniverse];\n" +
+        "select [Measure].[name5]\n" +
+        "where [Filter].[name;";
     universeUtil.convertQuery(request, universeClient, null);
   }
 
   @Test
   public void testFiltersConditions() throws UniverseException {
-    String request1 =
-        "universe [testUniverse];\n" + "select [Measure].[name5]\n" + "where [Filter].[name3];";
-    String request2 =
-        "universe [testUniverse];\n"
-            + "select [Measure].[name5]\n"
-            + "where [Measure].[name5] > 2 and [Filter].[name3];";
-    String request3 =
-        "universe [testUniverse];\n"
-            + "select [Measure].[name5]\n"
-            + "where [Filter].[name3] or [Measure].[name5];";
-    String request4 =
-        "universe [testUniverse];\n"
-            + "select [Measure].[name5]\n"
-            + "where [Filter].[name3] and [Measure].[name5] is null;";
+    String request1 = "universe [testUniverse];\n" +
+        "select [Measure].[name5]\n" +
+        "where [Filter].[name3];";
+    String request2 = "universe [testUniverse];\n" +
+        "select [Measure].[name5]\n" +
+        "where [Measure].[name5] > 2 and [Filter].[name3];";
+    String request3 = "universe [testUniverse];\n" +
+        "select [Measure].[name5]\n" +
+        "where [Filter].[name3] or [Measure].[name5];";
+    String request4 = "universe [testUniverse];\n" +
+        "select [Measure].[name5]\n" +
+        "where [Filter].[name3] and [Measure].[name5] is null;";
     UniverseQuery universeQuery = universeUtil.convertQuery(request1, universeClient, null);
-    assertEquals(
-        "<predefinedFilter path=\"Filter|folder\\name3|filter\" id=\"name3id\"/>\n",
+    assertEquals("<predefinedFilter path=\"Filter|folder\\name3|filter\" id=\"name3id\"/>\n",
         universeQuery.getWhere());
     universeQuery = universeUtil.convertQuery(request2, universeClient, null);
-    assertEquals(
-        "<and>\n"
-            + "<comparisonFilter path=\"Measure|folder\\name5|measure\" operator=\"GreaterThan\" id=\"name5id\">\n"
-            + "<constantOperand>\n"
-            + "<value>\n"
-            + "<caption type=\"Numeric\">2</caption>\n"
-            + "</value>\n"
-            + "</constantOperand>\n"
-            + "</comparisonFilter>\n\n"
-            + "<predefinedFilter path=\"Filter|folder\\name3|filter\" id=\"name3id\"/>\n\n"
-            + "</and>\n",
+    assertEquals("<and>\n" +
+            "<comparisonFilter path=\"Measure|folder\\name5|measure\" operator=\"GreaterThan\" id=\"name5id\">\n" +
+            "<constantOperand>\n" +
+            "<value>\n" +
+            "<caption type=\"Numeric\">2</caption>\n" +
+            "</value>\n" +
+            "</constantOperand>\n" +
+            "</comparisonFilter>\n\n" +
+            "<predefinedFilter path=\"Filter|folder\\name3|filter\" id=\"name3id\"/>\n\n" +
+            "</and>\n",
         universeQuery.getWhere());
     universeQuery = universeUtil.convertQuery(request3, universeClient, null);
-    assertEquals(
-        "<or>\n"
-            + "<predefinedFilter path=\"Filter|folder\\name3|filter\" id=\"name3id\"/>\n\n"
-            + "<predefinedFilter path=\"Measure|folder\\name5|measure\" id=\"name5id\"/>\n\n"
-            + "</or>\n",
+    assertEquals("<or>\n" +
+            "<predefinedFilter path=\"Filter|folder\\name3|filter\" id=\"name3id\"/>\n\n" +
+            "<predefinedFilter path=\"Measure|folder\\name5|measure\" id=\"name5id\"/>\n\n" +
+            "</or>\n",
         universeQuery.getWhere());
     universeQuery = universeUtil.convertQuery(request4, universeClient, null);
-    assertEquals(
-        "<and>\n"
-            + "<predefinedFilter path=\"Filter|folder\\name3|filter\" id=\"name3id\"/>\n\n"
-            + "<comparisonFilter id=\"name5id\" path=\"Measure|folder\\name5|measure\" operator=\"IsNull\"/>\n\n"
-            + "</and>\n",
+    assertEquals("<and>\n" +
+            "<predefinedFilter path=\"Filter|folder\\name3|filter\" id=\"name3id\"/>\n\n" +
+            "<comparisonFilter id=\"name5id\" path=\"Measure|folder\\name5|measure\" operator=\"IsNull\"/>\n\n" +
+            "</and>\n",
         universeQuery.getWhere());
   }
 
   @Test
   public void testNestedConditions() throws UniverseException {
-    String request =
-        "universe [testUniverse];\n"
-            + "select [Dimension].[Test].[name2]\n"
-            + "where ([Measure].[name5] = 'text' or ([Dimension].[Test].[name1] in ('1','2', '3') and\n"
-            + "[Dimension].[Test].[name2] is not null)) and ([Filter].[name4] or [Measure].[name5] >=12)\n"
-            + "or [Dimension].[Test].[name2] not in (31, 65, 77);";
+    String request = "universe [testUniverse];\n" +
+        "select [Dimension].[Test].[name2]\n" +
+        "where ([Measure].[name5] = 'text' or ([Dimension].[Test].[name1] in ('1','2', '3') and\n" +
+        "[Dimension].[Test].[name2] is not null)) and ([Filter].[name4] or [Measure].[name5] >=12)\n" +
+        "or [Dimension].[Test].[name2] not in (31, 65, 77);";
     UniverseQuery universeQuery = universeUtil.convertQuery(request, universeClient, null);
-    assertEquals(
-        "<or>\n"
-            + "<and>\n"
-            + "<or>\n"
-            + "<comparisonFilter path=\"Measure|folder\\name5|measure\" operator=\"EqualTo\" id=\"name5id\">\n"
-            + "<constantOperand>\n"
-            + "<value>\n"
-            + "<caption type=\"String\">text</caption>\n"
-            + "</value>\n"
-            + "</constantOperand>\n"
-            + "</comparisonFilter>\n\n"
-            + "<and>\n"
-            + "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name1|dimension\" operator=\"InList\" id=\"name1id\">\n"
-            + "<constantOperand>\n"
-            + "<value>\n"
-            + "<caption type=\"String\">1</caption>\n"
-            + "</value>\n"
-            + "<value>\n"
-            + "<caption type=\"String\">2</caption>\n"
-            + "</value>\n"
-            + "<value>\n"
-            + "<caption type=\"String\">3</caption>\n"
-            + "</value>\n"
-            + "</constantOperand>\n"
-            + "</comparisonFilter>\n\n"
-            + "<comparisonFilter id=\"name2id\" path=\"Dimension|folder\\Test|folder\\name2|dimension\" operator=\"IsNotNull\"/>\n\n"
-            + "</and>\n\n"
-            + "</or>\n\n"
-            + "<or>\n"
-            + "<predefinedFilter path=\"Filter|folder\\name4|filter\" id=\"name4id\"/>\n\n"
-            + "<comparisonFilter path=\"Measure|folder\\name5|measure\" operator=\"GreaterThanOrEqualTo\" id=\"name5id\">\n"
-            + "<constantOperand>\n"
-            + "<value>\n"
-            + "<caption type=\"Numeric\">12</caption>\n"
-            + "</value>\n"
-            + "</constantOperand>\n"
-            + "</comparisonFilter>\n\n"
-            + "</or>\n\n"
-            + "</and>\n\n"
-            + "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name2|dimension\" operator=\"NotInList\" id=\"name2id\">\n"
-            + "<constantOperand>\n"
-            + "<value>\n"
-            + "<caption type=\"Numeric\">31</caption>\n"
-            + "</value>\n"
-            + "<value>\n"
-            + "<caption type=\"Numeric\">65</caption>\n"
-            + "</value>\n"
-            + "<value>\n"
-            + "<caption type=\"Numeric\">77</caption>\n"
-            + "</value>\n"
-            + "</constantOperand>\n"
-            + "</comparisonFilter>\n\n"
-            + "</or>\n",
+    assertEquals("<or>\n" +
+            "<and>\n" +
+            "<or>\n" +
+            "<comparisonFilter path=\"Measure|folder\\name5|measure\" operator=\"EqualTo\" id=\"name5id\">\n" +
+            "<constantOperand>\n" +
+            "<value>\n" +
+            "<caption type=\"String\">text</caption>\n" +
+            "</value>\n" +
+            "</constantOperand>\n" +
+            "</comparisonFilter>\n\n" +
+            "<and>\n" +
+            "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name1|dimension\" operator=\"InList\" id=\"name1id\">\n" +
+            "<constantOperand>\n" +
+            "<value>\n" +
+            "<caption type=\"String\">1</caption>\n" +
+            "</value>\n" +
+            "<value>\n" +
+            "<caption type=\"String\">2</caption>\n" +
+            "</value>\n" +
+            "<value>\n" +
+            "<caption type=\"String\">3</caption>\n" +
+            "</value>\n" +
+            "</constantOperand>\n" +
+            "</comparisonFilter>\n\n" +
+            "<comparisonFilter id=\"name2id\" path=\"Dimension|folder\\Test|folder\\name2|dimension\" operator=\"IsNotNull\"/>\n\n" +
+            "</and>\n\n" +
+            "</or>\n\n" +
+            "<or>\n" +
+            "<predefinedFilter path=\"Filter|folder\\name4|filter\" id=\"name4id\"/>\n\n" +
+            "<comparisonFilter path=\"Measure|folder\\name5|measure\" operator=\"GreaterThanOrEqualTo\" id=\"name5id\">\n" +
+            "<constantOperand>\n" +
+            "<value>\n" +
+            "<caption type=\"Numeric\">12</caption>\n" +
+            "</value>\n" +
+            "</constantOperand>\n" +
+            "</comparisonFilter>\n\n" +
+            "</or>\n\n" +
+            "</and>\n\n" +
+            "<comparisonFilter path=\"Dimension|folder\\Test|folder\\name2|dimension\" operator=\"NotInList\" id=\"name2id\">\n" +
+            "<constantOperand>\n" +
+            "<value>\n" +
+            "<caption type=\"Numeric\">31</caption>\n" +
+            "</value>\n" +
+            "<value>\n" +
+            "<caption type=\"Numeric\">65</caption>\n" +
+            "</value>\n" +
+            "<value>\n" +
+            "<caption type=\"Numeric\">77</caption>\n" +
+            "</value>\n" +
+            "</constantOperand>\n" +
+            "</comparisonFilter>\n\n" +
+            "</or>\n",
         universeQuery.getWhere());
   }
 
   @Test
   public void testWithoutConditions() throws UniverseException {
-    String request =
-        "universe [testUniverse];\n"
-            + "select [Dimension].[Test].[name2], [Measure].[name5],\n"
-            + "[Dimension].[Test].[name1] ;";
+    String request = "universe [testUniverse];\n" +
+        "select [Dimension].[Test].[name2], [Measure].[name5],\n" +
+        "[Dimension].[Test].[name1] ;";
     UniverseQuery universeQuery = universeUtil.convertQuery(request, universeClient, null);
     assertNull(universeQuery.getWhere());
-    assertEquals(
-        "<resultObjects>\n"
-            + "<resultObject path=\"Dimension|folder\\Test|folder\\name2|dimension\" id=\"name2id\"/>\n"
-            + "<resultObject path=\"Measure|folder\\name5|measure\" id=\"name5id\"/>\n"
-            + "<resultObject path=\"Dimension|folder\\Test|folder\\name1|dimension\" id=\"name1id\"/>\n"
-            + "</resultObjects>",
+    assertEquals("<resultObjects>\n" +
+            "<resultObject path=\"Dimension|folder\\Test|folder\\name2|dimension\" id=\"name2id\"/>\n" +
+            "<resultObject path=\"Measure|folder\\name5|measure\" id=\"name5id\"/>\n" +
+            "<resultObject path=\"Dimension|folder\\Test|folder\\name1|dimension\" id=\"name1id\"/>\n" +
+            "</resultObjects>",
         universeQuery.getSelect());
   }
 
   @Test
   public void testCaseSensitive() throws UniverseException {
-    String request =
-        "uniVersE [testUniverse];\n"
-            + "seLEct [Dimension].[Test].[name2], [Measure].[name5]\n"
-            + "whERE [Dimension].[Test].[name2] Is NULl Or [Measure].[name5] IN (1,2) aNd [Measure].[name5] is NOT nUll;";
+    String request = "uniVersE [testUniverse];\n" +
+        "seLEct [Dimension].[Test].[name2], [Measure].[name5]\n" +
+        "whERE [Dimension].[Test].[name2] Is NULl Or [Measure].[name5] IN (1,2) aNd [Measure].[name5] is NOT nUll;";
     UniverseQuery universeQuery = universeUtil.convertQuery(request, universeClient, null);
-    assertEquals(
-        "<resultObjects>\n"
-            + "<resultObject path=\"Dimension|folder\\Test|folder\\name2|dimension\" id=\"name2id\"/>\n"
-            + "<resultObject path=\"Measure|folder\\name5|measure\" id=\"name5id\"/>\n"
-            + "</resultObjects>",
+    assertEquals("<resultObjects>\n" +
+            "<resultObject path=\"Dimension|folder\\Test|folder\\name2|dimension\" id=\"name2id\"/>\n" +
+            "<resultObject path=\"Measure|folder\\name5|measure\" id=\"name5id\"/>\n" +
+            "</resultObjects>",
         universeQuery.getSelect());
-    assertEquals(
-        "<or>\n"
-            + "<comparisonFilter id=\"name2id\" path=\"Dimension|folder\\Test|folder\\name2|dimension\" operator=\"IsNull\"/>\n\n"
-            + "<and>\n"
-            + "<comparisonFilter path=\"Measure|folder\\name5|measure\" operator=\"InList\" id=\"name5id\">\n"
-            + "<constantOperand>\n"
-            + "<value>\n"
-            + "<caption type=\"Numeric\">1</caption>\n"
-            + "</value>\n"
-            + "<value>\n"
-            + "<caption type=\"Numeric\">2</caption>\n"
-            + "</value>\n"
-            + "</constantOperand>\n"
-            + "</comparisonFilter>\n\n"
-            + "<comparisonFilter id=\"name5id\" path=\"Measure|folder\\name5|measure\" operator=\"IsNotNull\"/>\n\n"
-            + "</and>\n\n"
-            + "</or>\n",
+    assertEquals("<or>\n" +
+            "<comparisonFilter id=\"name2id\" path=\"Dimension|folder\\Test|folder\\name2|dimension\" operator=\"IsNull\"/>\n\n" +
+            "<and>\n" +
+            "<comparisonFilter path=\"Measure|folder\\name5|measure\" operator=\"InList\" id=\"name5id\">\n" +
+            "<constantOperand>\n" + "<value>\n" + "<caption type=\"Numeric\">1</caption>\n" +
+            "</value>\n" +
+            "<value>\n" +
+            "<caption type=\"Numeric\">2</caption>\n" +
+            "</value>\n" +
+            "</constantOperand>\n" +
+            "</comparisonFilter>\n\n" +
+            "<comparisonFilter id=\"name5id\" path=\"Measure|folder\\name5|measure\" operator=\"IsNotNull\"/>\n\n" +
+            "</and>\n\n" +
+            "</or>\n",
         universeQuery.getWhere());
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/scalding/pom.xml
----------------------------------------------------------------------
diff --git a/scalding/pom.xml b/scalding/pom.xml
index ec7fe40..2a9e456 100644
--- a/scalding/pom.xml
+++ b/scalding/pom.xml
@@ -184,6 +184,14 @@
           </execution>
         </executions>
       </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/scalding/src/main/java/org/apache/zeppelin/scalding/ScaldingInterpreter.java
----------------------------------------------------------------------
diff --git a/scalding/src/main/java/org/apache/zeppelin/scalding/ScaldingInterpreter.java b/scalding/src/main/java/org/apache/zeppelin/scalding/ScaldingInterpreter.java
index 0985c03..f46a1d7 100644
--- a/scalding/src/main/java/org/apache/zeppelin/scalding/ScaldingInterpreter.java
+++ b/scalding/src/main/java/org/apache/zeppelin/scalding/ScaldingInterpreter.java
@@ -17,7 +17,10 @@
 
 package org.apache.zeppelin.scalding;
 
-import com.twitter.scalding.ScaldingILoop;
+import org.apache.hadoop.security.UserGroupInformation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.PrintStream;
@@ -28,7 +31,11 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.Properties;
-import org.apache.hadoop.security.UserGroupInformation;
+
+import com.twitter.scalding.ScaldingILoop;
+
+import scala.Console;
+
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
@@ -36,11 +43,11 @@ import org.apache.zeppelin.interpreter.InterpreterResult.Code;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import scala.Console;
 
-/** Scalding interpreter for Zeppelin. Based off the Spark interpreter code. */
+/**
+ * Scalding interpreter for Zeppelin. Based off the Spark interpreter code.
+ *
+ */
 public class ScaldingInterpreter extends Interpreter {
   Logger logger = LoggerFactory.getLogger(ScaldingInterpreter.class);
 
@@ -63,7 +70,8 @@ public class ScaldingInterpreter extends Interpreter {
   @Override
   public void open() {
     numOpenInstances = numOpenInstances + 1;
-    String maxOpenInstancesStr = getProperty(MAX_OPEN_INSTANCES, MAX_OPEN_INSTANCES_DEFAULT);
+    String maxOpenInstancesStr = getProperty(MAX_OPEN_INSTANCES,
+            MAX_OPEN_INSTANCES_DEFAULT);
     int maxOpenInstances = 50;
     try {
       maxOpenInstances = Integer.valueOf(maxOpenInstancesStr);
@@ -96,6 +104,7 @@ public class ScaldingInterpreter extends Interpreter {
     interpreter.intp().close();
   }
 
+
   @Override
   public InterpreterResult interpret(String cmd, InterpreterContext contextInterpreter) {
     String user = contextInterpreter.getAuthenticationInfo().getUser();
@@ -104,10 +113,10 @@ public class ScaldingInterpreter extends Interpreter {
     if (interpreter == null) {
       logger.error(
           "interpreter == null, open may not have been called because max.open.instances reached");
-      return new InterpreterResult(
-          Code.ERROR,
-          "interpreter == null\n"
-              + "open may not have been called because max.open.instances reached");
+      return new InterpreterResult(Code.ERROR,
+        "interpreter == null\n" +
+        "open may not have been called because max.open.instances reached"
+      );
     }
     if (cmd == null || cmd.trim().length() == 0) {
       return new InterpreterResult(Code.SUCCESS);
@@ -178,9 +187,9 @@ public class ScaldingInterpreter extends Interpreter {
         String nextLine = linesToRun[l + 1].trim();
         boolean continuation = false;
         if (nextLine.isEmpty()
-            || nextLine.startsWith("//") // skip empty line or comment
-            || nextLine.startsWith("}")
-            || nextLine.startsWith("object")) { // include "} object" for Scala companion object
+                || nextLine.startsWith("//")         // skip empty line or comment
+                || nextLine.startsWith("}")
+                || nextLine.startsWith("object")) { // include "} object" for Scala companion object
           continuation = true;
         } else if (!inComment && nextLine.startsWith("/*")) {
           inComment = true;
@@ -189,9 +198,9 @@ public class ScaldingInterpreter extends Interpreter {
           inComment = false;
           continuation = true;
         } else if (nextLine.length() > 1
-            && nextLine.charAt(0) == '.'
-            && nextLine.charAt(1) != '.' // ".."
-            && nextLine.charAt(1) != '/') { // "./"
+                && nextLine.charAt(0) == '.'
+                && nextLine.charAt(1) != '.'     // ".."
+                && nextLine.charAt(1) != '/') {  // "./"
           continuation = true;
         } else if (inComment) {
           continuation = true;
@@ -257,13 +266,14 @@ public class ScaldingInterpreter extends Interpreter {
 
   @Override
   public Scheduler getScheduler() {
-    return SchedulerFactory.singleton()
-        .createOrGetFIFOScheduler(ScaldingInterpreter.class.getName() + this.hashCode());
+    return SchedulerFactory.singleton().createOrGetFIFOScheduler(
+        ScaldingInterpreter.class.getName() + this.hashCode());
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return NO_COMPLETION;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/scalding/src/test/java/org/apache/zeppelin/scalding/ScaldingInterpreterTest.java
----------------------------------------------------------------------
diff --git a/scalding/src/test/java/org/apache/zeppelin/scalding/ScaldingInterpreterTest.java b/scalding/src/test/java/org/apache/zeppelin/scalding/ScaldingInterpreterTest.java
index afb0bae..992c155 100644
--- a/scalding/src/test/java/org/apache/zeppelin/scalding/ScaldingInterpreterTest.java
+++ b/scalding/src/test/java/org/apache/zeppelin/scalding/ScaldingInterpreterTest.java
@@ -17,11 +17,6 @@
 
 package org.apache.zeppelin.scalding;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.util.Properties;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.InterpreterResult.Code;
@@ -32,7 +27,16 @@ import org.junit.FixMethodOrder;
 import org.junit.Test;
 import org.junit.runners.MethodSorters;
 
-/** Tests for the Scalding interpreter for Zeppelin. */
+import java.io.File;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * Tests for the Scalding interpreter for Zeppelin.
+ *
+ */
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 public class ScaldingInterpreterTest {
   public static ScaldingInterpreter repl;
@@ -41,9 +45,8 @@ public class ScaldingInterpreterTest {
 
   @Before
   public void setUp() throws Exception {
-    tmpDir =
-        new File(
-            System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis());
+    tmpDir = new File(System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" +
+            System.currentTimeMillis());
     System.setProperty("zeppelin.dep.localrepo", tmpDir.getAbsolutePath() + "/local-repo");
 
     tmpDir.mkdirs();
@@ -56,12 +59,11 @@ public class ScaldingInterpreterTest {
       repl.open();
     }
 
-    context =
-        InterpreterContext.builder()
-            .setNoteId("noteId")
-            .setParagraphId("paragraphId")
-            .setAuthenticationInfo(new AuthenticationInfo())
-            .build();
+    context = InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .setAuthenticationInfo(new AuthenticationInfo())
+        .build();
   }
 
   @After
@@ -86,45 +88,40 @@ public class ScaldingInterpreterTest {
 
   @Test
   public void testNextLineComments() {
-    assertEquals(
-        InterpreterResult.Code.SUCCESS,
-        repl.interpret("\"123\"\n/*comment here\n*/.toInt", context).code());
+    assertEquals(InterpreterResult.Code.SUCCESS,
+            repl.interpret("\"123\"\n/*comment here\n*/.toInt", context).code());
   }
 
   @Test
   public void testNextLineCompanionObject() {
-    String code =
-        "class Counter {\nvar value: Long = 0\n}\n // comment\n\n object Counter "
-            + "{\n def apply(x: Long) = new Counter()\n}";
+    String code = "class Counter {\nvar value: Long = 0\n}\n // comment\n\n object Counter " +
+            "{\n def apply(x: Long) = new Counter()\n}";
     assertEquals(InterpreterResult.Code.SUCCESS, repl.interpret(code, context).code());
   }
 
   @Test
   public void testBasicIntp() {
-    assertEquals(
-        InterpreterResult.Code.SUCCESS, repl.interpret("val a = 1\nval b = 2", context).code());
+    assertEquals(InterpreterResult.Code.SUCCESS,
+        repl.interpret("val a = 1\nval b = 2", context).code());
 
     // when interpret incomplete expression
     InterpreterResult incomplete = repl.interpret("val a = \"\"\"", context);
     assertEquals(InterpreterResult.Code.INCOMPLETE, incomplete.code());
     assertTrue(incomplete.message().get(0).getData().length() > 0); // expecting some error
-    // message
+                                                   // message
   }
 
   @Test
   public void testBasicScalding() {
-    assertEquals(
-        InterpreterResult.Code.SUCCESS,
-        repl.interpret(
-                "case class Sale(state: String, name: String, sale: Int)\n"
-                    + "val salesList = List(Sale(\"CA\", \"A\", 60), Sale(\"CA\", \"A\", 20), "
-                    + "Sale(\"VA\", \"B\", 15))\n"
-                    + "val salesPipe = TypedPipe.from(salesList)\n"
-                    + "val results = salesPipe.map{x => (1, Set(x.state), x.sale)}.\n"
-                    + "    groupAll.sum.values.map{ case(count, set, sum) => (count, set.size, sum) }\n"
-                    + "results.dump",
-                context)
-            .code());
+    assertEquals(InterpreterResult.Code.SUCCESS,
+        repl.interpret("case class Sale(state: String, name: String, sale: Int)\n" +
+          "val salesList = List(Sale(\"CA\", \"A\", 60), Sale(\"CA\", \"A\", 20), " +
+                        "Sale(\"VA\", \"B\", 15))\n" +
+          "val salesPipe = TypedPipe.from(salesList)\n" +
+          "val results = salesPipe.map{x => (1, Set(x.state), x.sale)}.\n" +
+          "    groupAll.sum.values.map{ case(count, set, sum) => (count, set.size, sum) }\n" +
+          "results.dump",
+          context).code());
   }
 
   @Test
@@ -134,15 +131,14 @@ public class ScaldingInterpreterTest {
 
   @Test
   public void testEndWithComment() {
-    assertEquals(
-        InterpreterResult.Code.SUCCESS, repl.interpret("val c=1\n//comment", context).code());
+    assertEquals(InterpreterResult.Code.SUCCESS, repl.interpret("val c=1\n//comment",
+            context).code());
   }
 
   @Test
   public void testReferencingUndefinedVal() {
-    InterpreterResult result =
-        repl.interpret(
-            "def category(min: Int) = {" + "    if (0 <= value) \"error\"" + "}", context);
+    InterpreterResult result = repl.interpret("def category(min: Int) = {"
+        + "    if (0 <= value) \"error\"" + "}", context);
     assertEquals(Code.ERROR, result.code());
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/scio/src/test/java/org/apache/zeppelin/scio/ScioInterpreterTest.java
----------------------------------------------------------------------
diff --git a/scio/src/test/java/org/apache/zeppelin/scio/ScioInterpreterTest.java b/scio/src/test/java/org/apache/zeppelin/scio/ScioInterpreterTest.java
index 63cc7ce..2e5c0d9 100644
--- a/scio/src/test/java/org/apache/zeppelin/scio/ScioInterpreterTest.java
+++ b/scio/src/test/java/org/apache/zeppelin/scio/ScioInterpreterTest.java
@@ -17,15 +17,21 @@
 
 package org.apache.zeppelin.scio;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.LinkedList;
-import java.util.Properties;
+import org.apache.zeppelin.display.AngularObjectRegistry;
+import org.apache.zeppelin.display.GUI;
 import org.apache.zeppelin.interpreter.*;
+import org.apache.zeppelin.resource.LocalResourcePool;
+import org.apache.zeppelin.user.AuthenticationInfo;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 public class ScioInterpreterTest {
   private static ScioInterpreter repl;
   private static InterpreterGroup intpGroup;
@@ -34,7 +40,10 @@ public class ScioInterpreterTest {
   private final String newline = "\n";
 
   private InterpreterContext getNewContext() {
-    return InterpreterContext.builder().setNoteId("noteId").setParagraphId("paragraphId").build();
+    return InterpreterContext.builder()
+        .setNoteId("noteId")
+        .setParagraphId("paragraphId")
+        .build();
   }
 
   @Before
@@ -53,8 +62,7 @@ public class ScioInterpreterTest {
 
   @Test
   public void testBasicSuccess() {
-    assertEquals(
-        InterpreterResult.Code.SUCCESS,
+    assertEquals(InterpreterResult.Code.SUCCESS,
         repl.interpret("val a = 1" + newline + "val b = 2", context).code());
   }
 
@@ -74,36 +82,28 @@ public class ScioInterpreterTest {
 
   @Test
   public void testBasicPipeline() {
-    assertEquals(
-        InterpreterResult.Code.SUCCESS,
-        repl.interpret(
-                "val (sc, _) = ContextAndArgs(argz)"
-                    + newline
-                    + "sc.parallelize(1 to 10).closeAndCollect().toList",
-                context)
-            .code());
+    assertEquals(InterpreterResult.Code.SUCCESS,
+        repl.interpret("val (sc, _) = ContextAndArgs(argz)" + newline
+            + "sc.parallelize(1 to 10).closeAndCollect().toList", context).code());
   }
 
   @Test
   public void testBasicMultiStepPipeline() {
     final StringBuilder code = new StringBuilder();
-    code.append("val (sc, _) = ContextAndArgs(argz)")
-        .append(newline)
-        .append("val numbers = sc.parallelize(1 to 10)")
-        .append(newline)
-        .append("val results = numbers.closeAndCollect().toList")
-        .append(newline)
+    code.append("val (sc, _) = ContextAndArgs(argz)").append(newline)
+        .append("val numbers = sc.parallelize(1 to 10)").append(newline)
+        .append("val results = numbers.closeAndCollect().toList").append(newline)
         .append("println(results)");
-    assertEquals(InterpreterResult.Code.SUCCESS, repl.interpret(code.toString(), context).code());
+    assertEquals(InterpreterResult.Code.SUCCESS,
+        repl.interpret(code.toString(), context).code());
   }
 
   @Test
   public void testException() {
-    InterpreterResult exception =
-        repl.interpret(
-            "val (sc, _) = ContextAndArgs(argz)" + newline + "throw new Exception(\"test\")",
-            context);
+    InterpreterResult exception = repl.interpret("val (sc, _) = ContextAndArgs(argz)" + newline
+        + "throw new Exception(\"test\")", context);
     assertEquals(InterpreterResult.Code.ERROR, exception.code());
     assertTrue(exception.message().get(0).getData().length() > 0);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/shell/pom.xml
----------------------------------------------------------------------
diff --git a/shell/pom.xml b/shell/pom.xml
index 6a7fda9..9f51dcc 100644
--- a/shell/pom.xml
+++ b/shell/pom.xml
@@ -88,6 +88,13 @@
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java b/shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java
index 3072d5c..c686896 100644
--- a/shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java
+++ b/shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java
@@ -17,6 +17,15 @@
 
 package org.apache.zeppelin.shell;
 
+import org.apache.commons.exec.CommandLine;
+import org.apache.commons.exec.DefaultExecutor;
+import org.apache.commons.exec.ExecuteException;
+import org.apache.commons.exec.ExecuteWatchdog;
+import org.apache.commons.exec.PumpStreamHandler;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.IOException;
@@ -24,12 +33,7 @@ import java.io.OutputStream;
 import java.util.List;
 import java.util.Properties;
 import java.util.concurrent.ConcurrentHashMap;
-import org.apache.commons.exec.CommandLine;
-import org.apache.commons.exec.DefaultExecutor;
-import org.apache.commons.exec.ExecuteException;
-import org.apache.commons.exec.ExecuteWatchdog;
-import org.apache.commons.exec.PumpStreamHandler;
-import org.apache.commons.lang3.StringUtils;
+
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
 import org.apache.zeppelin.interpreter.InterpreterResult;
@@ -38,10 +42,10 @@ import org.apache.zeppelin.interpreter.KerberosInterpreter;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.scheduler.SchedulerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Shell interpreter for Zeppelin. */
+/**
+ * Shell interpreter for Zeppelin.
+ */
 public class ShellInterpreter extends KerberosInterpreter {
   private static final Logger LOGGER = LoggerFactory.getLogger(ShellInterpreter.class);
 
@@ -72,22 +76,21 @@ public class ShellInterpreter extends KerberosInterpreter {
       if (executor != null) {
         try {
           executor.getWatchdog().destroyProcess();
-        } catch (Exception e) {
+        } catch (Exception e){
           LOGGER.error("error destroying executor for paragraphId: " + executorKey, e);
         }
       }
     }
   }
 
+
   @Override
   public InterpreterResult interpret(String originalCmd, InterpreterContext contextInterpreter) {
-    String cmd =
-        Boolean.parseBoolean(getProperty("zeppelin.shell.interpolation"))
-            ? interpolate(originalCmd, contextInterpreter.getResourcePool())
-            : originalCmd;
+    String cmd = Boolean.parseBoolean(getProperty("zeppelin.shell.interpolation")) ?
+            interpolate(originalCmd, contextInterpreter.getResourcePool()) : originalCmd;
     LOGGER.debug("Run shell command '" + cmd + "'");
     OutputStream outStream = new ByteArrayOutputStream();
-
+    
     CommandLine cmdLine = CommandLine.parse(shell);
     // the Windows CMD shell doesn't handle multiline statements,
     // they need to be delimited by '&&' instead
@@ -99,22 +102,19 @@ public class ShellInterpreter extends KerberosInterpreter {
 
     try {
       DefaultExecutor executor = new DefaultExecutor();
-      executor.setStreamHandler(
-          new PumpStreamHandler(contextInterpreter.out, contextInterpreter.out));
+      executor.setStreamHandler(new PumpStreamHandler(
+          contextInterpreter.out, contextInterpreter.out));
 
-      executor.setWatchdog(
-          new ExecuteWatchdog(Long.valueOf(getProperty(TIMEOUT_PROPERTY, defaultTimeoutProperty))));
+      executor.setWatchdog(new ExecuteWatchdog(
+          Long.valueOf(getProperty(TIMEOUT_PROPERTY, defaultTimeoutProperty))));
       executors.put(contextInterpreter.getParagraphId(), executor);
       if (Boolean.valueOf(getProperty(DIRECTORY_USER_HOME))) {
         executor.setWorkingDirectory(new File(System.getProperty("user.home")));
       }
 
       int exitVal = executor.execute(cmdLine);
-      LOGGER.info(
-          "Paragraph "
-              + contextInterpreter.getParagraphId()
-              + " return with exit value: "
-              + exitVal);
+      LOGGER.info("Paragraph " + contextInterpreter.getParagraphId() 
+          + " return with exit value: " + exitVal);
       return new InterpreterResult(Code.SUCCESS, outStream.toString());
     } catch (ExecuteException e) {
       int exitValue = e.getExitValue();
@@ -124,11 +124,8 @@ public class ShellInterpreter extends KerberosInterpreter {
       if (exitValue == 143) {
         code = Code.INCOMPLETE;
         message += "Paragraph received a SIGTERM\n";
-        LOGGER.info(
-            "The paragraph "
-                + contextInterpreter.getParagraphId()
-                + " stopped executing: "
-                + message);
+        LOGGER.info("The paragraph " + contextInterpreter.getParagraphId()
+            + " stopped executing: " + message);
       }
       message += "ExitValue: " + exitValue;
       return new InterpreterResult(code, message);
@@ -146,7 +143,7 @@ public class ShellInterpreter extends KerberosInterpreter {
     if (executor != null) {
       try {
         executor.getWatchdog().destroyProcess();
-      } catch (Exception e) {
+      } catch (Exception e){
         LOGGER.error("error destroying executor for paragraphId: " + context.getParagraphId(), e);
       }
     }
@@ -164,13 +161,13 @@ public class ShellInterpreter extends KerberosInterpreter {
 
   @Override
   public Scheduler getScheduler() {
-    return SchedulerFactory.singleton()
-        .createOrGetParallelScheduler(ShellInterpreter.class.getName() + this.hashCode(), 10);
+    return SchedulerFactory.singleton().createOrGetParallelScheduler(
+        ShellInterpreter.class.getName() + this.hashCode(), 10);
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+      InterpreterContext interpreterContext) {
     return null;
   }
 
@@ -189,11 +186,9 @@ public class ShellInterpreter extends KerberosInterpreter {
     Properties properties = getProperties();
     CommandLine cmdLine = CommandLine.parse(shell);
     cmdLine.addArgument("-c", false);
-    String kinitCommand =
-        String.format(
-            "kinit -k -t %s %s",
-            properties.getProperty("zeppelin.shell.keytab.location"),
-            properties.getProperty("zeppelin.shell.principal"));
+    String kinitCommand = String.format("kinit -k -t %s %s",
+        properties.getProperty("zeppelin.shell.keytab.location"),
+        properties.getProperty("zeppelin.shell.principal"));
     cmdLine.addArgument(kinitCommand, false);
     DefaultExecutor executor = new DefaultExecutor();
     try {
@@ -206,10 +201,11 @@ public class ShellInterpreter extends KerberosInterpreter {
 
   @Override
   protected boolean isKerboseEnabled() {
-    if (!StringUtils.isAnyEmpty(getProperty("zeppelin.shell.auth.type"))
-        && getProperty("zeppelin.shell.auth.type").equalsIgnoreCase("kerberos")) {
+    if (!StringUtils.isAnyEmpty(getProperty("zeppelin.shell.auth.type")) && getProperty(
+        "zeppelin.shell.auth.type").equalsIgnoreCase("kerberos")) {
       return true;
     }
     return false;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/shell/src/test/java/org/apache/zeppelin/shell/ShellInterpreterTest.java
----------------------------------------------------------------------
diff --git a/shell/src/test/java/org/apache/zeppelin/shell/ShellInterpreterTest.java b/shell/src/test/java/org/apache/zeppelin/shell/ShellInterpreterTest.java
index f8b702f..5a8f4b4 100644
--- a/shell/src/test/java/org/apache/zeppelin/shell/ShellInterpreterTest.java
+++ b/shell/src/test/java/org/apache/zeppelin/shell/ShellInterpreterTest.java
@@ -20,13 +20,15 @@ package org.apache.zeppelin.shell;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
 import java.util.Properties;
+
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.InterpreterResult.Code;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
 
 public class ShellInterpreterTest {
 
@@ -45,7 +47,8 @@ public class ShellInterpreterTest {
   }
 
   @After
-  public void tearDown() throws Exception {}
+  public void tearDown() throws Exception {
+  }
 
   @Test
   public void test() {
@@ -62,7 +65,7 @@ public class ShellInterpreterTest {
   }
 
   @Test
-  public void testInvalidCommand() {
+  public void testInvalidCommand(){
     if (System.getProperty("os.name").startsWith("Windows")) {
       result = shell.interpret("invalid_command\ndir", context);
     } else {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/main/java/org/apache/zeppelin/spark/AbstractSparkInterpreter.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/AbstractSparkInterpreter.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/AbstractSparkInterpreter.java
index 7008a14..239a7fe 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/AbstractSparkInterpreter.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/AbstractSparkInterpreter.java
@@ -17,15 +17,17 @@
 
 package org.apache.zeppelin.spark;
 
-import java.util.Properties;
 import org.apache.spark.SparkContext;
 import org.apache.spark.api.java.JavaSparkContext;
 import org.apache.spark.sql.SQLContext;
 import org.apache.zeppelin.interpreter.Interpreter;
+import org.apache.zeppelin.interpreter.InterpreterContext;
+
+import java.util.Properties;
 
 /**
- * Abstract class for SparkInterpreter. For the purpose of co-exist of NewSparkInterpreter and
- * OldSparkInterpreter
+ * Abstract class for SparkInterpreter. For the purpose of co-exist of NewSparkInterpreter
+ * and OldSparkInterpreter
  */
 public abstract class AbstractSparkInterpreter extends Interpreter {
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/main/java/org/apache/zeppelin/spark/DepInterpreter.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/DepInterpreter.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/DepInterpreter.java
index cce73bb..d76b09e 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/DepInterpreter.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/DepInterpreter.java
@@ -21,6 +21,8 @@ import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.PrintStream;
 import java.io.PrintWriter;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
@@ -28,13 +30,19 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
+
+import com.google.common.reflect.TypeToken;
+import com.google.gson.Gson;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.spark.repl.SparkILoop;
 import org.apache.zeppelin.interpreter.Interpreter;
 import org.apache.zeppelin.interpreter.InterpreterContext;
 import org.apache.zeppelin.interpreter.InterpreterException;
+import org.apache.zeppelin.interpreter.InterpreterGroup;
 import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.apache.zeppelin.interpreter.InterpreterResult.Code;
+import org.apache.zeppelin.interpreter.WrappedInterpreter;
 import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
 import org.apache.zeppelin.scheduler.Scheduler;
 import org.apache.zeppelin.spark.dep.SparkDependencyContext;
@@ -42,11 +50,12 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.sonatype.aether.resolution.ArtifactResolutionException;
 import org.sonatype.aether.resolution.DependencyResolutionException;
+
 import scala.Console;
 import scala.None;
 import scala.Some;
-import scala.collection.JavaConversions;
 import scala.collection.convert.WrapAsJava$;
+import scala.collection.JavaConversions;
 import scala.tools.nsc.Settings;
 import scala.tools.nsc.interpreter.Completion.Candidates;
 import scala.tools.nsc.interpreter.Completion.ScalaCompleter;
@@ -55,22 +64,24 @@ import scala.tools.nsc.interpreter.Results;
 import scala.tools.nsc.settings.MutableSettings.BooleanSetting;
 import scala.tools.nsc.settings.MutableSettings.PathSetting;
 
+
 /**
- * DepInterpreter downloads dependencies and pass them when SparkInterpreter initialized. It extends
- * SparkInterpreter but does not create sparkcontext
+ * DepInterpreter downloads dependencies and pass them when SparkInterpreter initialized.
+ * It extends SparkInterpreter but does not create sparkcontext
+ *
  */
 public class DepInterpreter extends Interpreter {
   /**
-   * intp - org.apache.spark.repl.SparkIMain (scala 2.10) intp - scala.tools.nsc.interpreter.IMain;
-   * (scala 2.11)
+   * intp - org.apache.spark.repl.SparkIMain (scala 2.10)
+   * intp - scala.tools.nsc.interpreter.IMain; (scala 2.11)
    */
   private Object intp;
-
   private ByteArrayOutputStream out;
   private SparkDependencyContext depc;
-  /** completer - org.apache.spark.repl.SparkJLineCompletion (scala 2.10) */
+  /**
+   * completer - org.apache.spark.repl.SparkJLineCompletion (scala 2.10)
+   */
   private Object completer;
-
   private SparkILoop interpreter;
   static final Logger LOGGER = LoggerFactory.getLogger(DepInterpreter.class);
 
@@ -82,7 +93,10 @@ public class DepInterpreter extends Interpreter {
     return depc;
   }
 
-  public static String getSystemDefault(String envName, String propertyName, String defaultValue) {
+  public static String getSystemDefault(
+      String envName,
+      String propertyName,
+      String defaultValue) {
 
     if (envName != null && !envName.isEmpty()) {
       String envValue = System.getenv().get(envName);
@@ -113,6 +127,7 @@ public class DepInterpreter extends Interpreter {
     createIMain();
   }
 
+
   private void createIMain() {
     Settings settings = new Settings();
     URL[] urls = getClassloaderUrls();
@@ -141,7 +156,8 @@ public class DepInterpreter extends Interpreter {
     settings.scala$tools$nsc$settings$ScalaSettings$_setter_$classpath_$eq(pathSettings);
 
     // set classloader for scala compiler
-    settings.explicitParentLoader_$eq(new Some<>(Thread.currentThread().getContextClassLoader()));
+    settings.explicitParentLoader_$eq(new Some<>(Thread.currentThread()
+        .getContextClassLoader()));
 
     BooleanSetting b = (BooleanSetting) settings.usejavacp();
     b.v_$eq(true);
@@ -152,6 +168,7 @@ public class DepInterpreter extends Interpreter {
 
     interpreter.createInterpreter();
 
+
     intp = Utils.invokeMethod(interpreter, "intp");
 
     if (Utils.isScala2_10()) {
@@ -159,16 +176,13 @@ public class DepInterpreter extends Interpreter {
       Utils.invokeMethod(intp, "initializeSynchronous");
     }
 
-    depc =
-        new SparkDependencyContext(
-            getProperty("zeppelin.dep.localrepo"),
-            getProperty("zeppelin.dep.additionalRemoteRepository"));
+    depc = new SparkDependencyContext(getProperty("zeppelin.dep.localrepo"),
+        getProperty("zeppelin.dep.additionalRemoteRepository"));
     if (Utils.isScala2_10()) {
-      completer =
-          Utils.instantiateClass(
-              "org.apache.spark.repl.SparkJLineCompletion",
-              new Class[] {Utils.findClass("org.apache.spark.repl.SparkIMain")},
-              new Object[] {intp});
+      completer = Utils.instantiateClass(
+          "org.apache.spark.repl.SparkJLineCompletion",
+          new Class[]{Utils.findClass("org.apache.spark.repl.SparkIMain")},
+          new Object[]{intp});
     }
     interpret("@transient var _binder = new java.util.HashMap[String, Object]()");
     Map<String, Object> binder;
@@ -179,20 +193,23 @@ public class DepInterpreter extends Interpreter {
     }
     binder.put("depc", depc);
 
-    interpret(
-        "@transient val z = "
-            + "_binder.get(\"depc\")"
-            + ".asInstanceOf[org.apache.zeppelin.spark.dep.SparkDependencyContext]");
+    interpret("@transient val z = "
+        + "_binder.get(\"depc\")"
+        + ".asInstanceOf[org.apache.zeppelin.spark.dep.SparkDependencyContext]");
+
   }
 
   private Results.Result interpret(String line) {
-    return (Results.Result)
-        Utils.invokeMethod(intp, "interpret", new Class[] {String.class}, new Object[] {line});
+    return (Results.Result) Utils.invokeMethod(
+        intp,
+        "interpret",
+        new Class[] {String.class},
+        new Object[] {line});
   }
 
   public Object getValue(String name) {
-    Object ret =
-        Utils.invokeMethod(intp, "valueOfTerm", new Class[] {String.class}, new Object[] {name});
+    Object ret = Utils.invokeMethod(
+        intp, "valueOfTerm", new Class[]{String.class}, new Object[]{name});
     if (ret instanceof None) {
       return null;
     } else if (ret instanceof Some) {
@@ -204,7 +221,8 @@ public class DepInterpreter extends Interpreter {
 
   public Object getLastObject() {
     IMain.Request r = (IMain.Request) Utils.invokeMethod(intp, "lastRequest");
-    Object obj = r.lineRep().call("$result", JavaConversions.asScalaBuffer(new LinkedList<>()));
+    Object obj = r.lineRep().call("$result",
+        JavaConversions.asScalaBuffer(new LinkedList<>()));
     return obj;
   }
 
@@ -219,11 +237,10 @@ public class DepInterpreter extends Interpreter {
         getInterpreterInTheSameSessionByClassName(SparkInterpreter.class, false);
 
     if (sparkInterpreter != null && sparkInterpreter.getDelegation().isSparkContextInitialized()) {
-      return new InterpreterResult(
-          Code.ERROR,
-          "Must be used before SparkInterpreter (%spark) initialized\n"
-              + "Hint: put this paragraph before any Spark code and "
-              + "restart Zeppelin/Interpreter");
+      return new InterpreterResult(Code.ERROR,
+          "Must be used before SparkInterpreter (%spark) initialized\n" +
+              "Hint: put this paragraph before any Spark code and " +
+              "restart Zeppelin/Interpreter" );
     }
 
     scala.tools.nsc.interpreter.Results.Result ret = interpret(st);
@@ -231,8 +248,7 @@ public class DepInterpreter extends Interpreter {
 
     try {
       depc.fetch();
-    } catch (MalformedURLException
-        | DependencyResolutionException
+    } catch (MalformedURLException | DependencyResolutionException
         | ArtifactResolutionException e) {
       LOGGER.error("Exception in DepInterpreter while interpret ", e);
       return new InterpreterResult(Code.ERROR, e.toString());
@@ -258,7 +274,9 @@ public class DepInterpreter extends Interpreter {
   }
 
   @Override
-  public void cancel(InterpreterContext context) {}
+  public void cancel(InterpreterContext context) {
+  }
+
 
   @Override
   public FormType getFormType() {
@@ -271,8 +289,8 @@ public class DepInterpreter extends Interpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf, int cursor,
+                                                InterpreterContext interpreterContext) {
     if (Utils.isScala2_10()) {
       ScalaCompleter c = (ScalaCompleter) Utils.invokeMethod(completer, "completer");
       Candidates ret = c.complete(buf, cursor);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/main/java/org/apache/zeppelin/spark/IPySparkInterpreter.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/IPySparkInterpreter.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/IPySparkInterpreter.java
index 9f43377..7589895 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/IPySparkInterpreter.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/IPySparkInterpreter.java
@@ -17,9 +17,6 @@
 
 package org.apache.zeppelin.spark;
 
-import java.io.IOException;
-import java.util.Map;
-import java.util.Properties;
 import org.apache.spark.SparkConf;
 import org.apache.spark.api.java.JavaSparkContext;
 import org.apache.zeppelin.interpreter.BaseZeppelinContext;
@@ -30,7 +27,13 @@ import org.apache.zeppelin.python.IPythonInterpreter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** PySparkInterpreter which use IPython underlying. */
+import java.io.IOException;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * PySparkInterpreter which use IPython underlying.
+ */
 public class IPySparkInterpreter extends IPythonInterpreter {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(IPySparkInterpreter.class);
@@ -47,19 +50,19 @@ public class IPySparkInterpreter extends IPythonInterpreter {
         getInterpreterInTheSameSessionByClassName(PySparkInterpreter.class, false);
     setProperty("zeppelin.python", pySparkInterpreter.getPythonExec());
     sparkInterpreter = getInterpreterInTheSameSessionByClassName(SparkInterpreter.class);
-    setProperty(
-        "zeppelin.py4j.useAuth", sparkInterpreter.getSparkVersion().isSecretSocketSupported() + "");
+    setProperty("zeppelin.py4j.useAuth",
+        sparkInterpreter.getSparkVersion().isSecretSocketSupported() + "");
     SparkConf conf = sparkInterpreter.getSparkContext().getConf();
     // only set PYTHONPATH in embedded, local or yarn-client mode.
     // yarn-cluster will setup PYTHONPATH automatically.
-    if (!conf.contains("spark.submit.deployMode")
-        || !conf.get("spark.submit.deployMode").equals("cluster")) {
+    if (!conf.contains("spark.submit.deployMode") ||
+        !conf.get("spark.submit.deployMode").equals("cluster")) {
       setAdditionalPythonPath(PythonUtils.sparkPythonPath());
     }
     setAddBulitinPy4j(false);
     setAdditionalPythonInitFile("python/zeppelin_ipyspark.py");
-    setProperty(
-        "zeppelin.py4j.useAuth", sparkInterpreter.getSparkVersion().isSecretSocketSupported() + "");
+    setProperty("zeppelin.py4j.useAuth",
+        sparkInterpreter.getSparkVersion().isSecretSocketSupported() + "");
     super.open();
   }
 
@@ -84,7 +87,7 @@ public class IPySparkInterpreter extends IPythonInterpreter {
     InterpreterContext.set(context);
     String jobGroupId = Utils.buildJobGroupId(context);
     String jobDesc = Utils.buildJobDesc(context);
-    String setJobGroupStmt = "sc.setJobGroup('" + jobGroupId + "', '" + jobDesc + "')";
+    String setJobGroupStmt = "sc.setJobGroup('" +  jobGroupId + "', '" + jobDesc + "')";
     InterpreterResult result = super.interpret(setJobGroupStmt, context);
     if (result.code().equals(InterpreterResult.Code.ERROR)) {
       return new InterpreterResult(InterpreterResult.Code.ERROR, "Fail to setJobGroup");

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/spark/interpreter/src/main/java/org/apache/zeppelin/spark/NewSparkInterpreter.java
----------------------------------------------------------------------
diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/NewSparkInterpreter.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/NewSparkInterpreter.java
index 031fff4..23e6dad 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/NewSparkInterpreter.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/NewSparkInterpreter.java
@@ -18,13 +18,6 @@
 package org.apache.zeppelin.spark;
 
 import com.google.common.collect.Lists;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang3.exception.ExceptionUtils;
 import org.apache.spark.SparkConf;
@@ -40,9 +33,17 @@ import org.apache.zeppelin.spark.dep.SparkDependencyContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
 /**
- * SparkInterpreter of Java implementation. It is just wrapper of Spark211Interpreter and
- * Spark210Interpreter.
+ * SparkInterpreter of Java implementation. It is just wrapper of Spark211Interpreter
+ * and Spark210Interpreter.
  */
 public class NewSparkInterpreter extends AbstractSparkInterpreter {
 
@@ -63,11 +64,11 @@ public class NewSparkInterpreter extends AbstractSparkInterpreter {
 
   private static InterpreterHookRegistry hooks;
 
+
   public NewSparkInterpreter(Properties properties) {
     super(properties);
-    this.enableSupportedVersionCheck =
-        java.lang.Boolean.parseBoolean(
-            properties.getProperty("zeppelin.spark.enableSupportedVersionCheck", "true"));
+    this.enableSupportedVersionCheck = java.lang.Boolean.parseBoolean(
+        properties.getProperty("zeppelin.spark.enableSupportedVersionCheck", "true"));
     innerInterpreterClassMap.put("2.10", "org.apache.zeppelin.spark.SparkScala210Interpreter");
     innerInterpreterClassMap.put("2.11", "org.apache.zeppelin.spark.SparkScala211Interpreter");
   }
@@ -97,25 +98,19 @@ public class NewSparkInterpreter extends AbstractSparkInterpreter {
 
       String innerIntpClassName = innerInterpreterClassMap.get(scalaVersion);
       Class clazz = Class.forName(innerIntpClassName);
-      this.innerInterpreter =
-          (BaseSparkScalaInterpreter)
-              clazz
-                  .getConstructor(SparkConf.class, List.class, Boolean.class)
-                  .newInstance(
-                      conf,
-                      getDependencyFiles(),
-                      Boolean.parseBoolean(getProperty("zeppelin.spark.printREPLOutput", "true")));
+      this.innerInterpreter = (BaseSparkScalaInterpreter)
+          clazz.getConstructor(SparkConf.class, List.class, Boolean.class)
+              .newInstance(conf, getDependencyFiles(),
+                  Boolean.parseBoolean(getProperty("zeppelin.spark.printREPLOutput", "true")));
       this.innerInterpreter.open();
 
       sc = this.innerInterpreter.sc();
       jsc = JavaSparkContext.fromSparkContext(sc);
       sparkVersion = SparkVersion.fromVersionString(sc.version());
       if (enableSupportedVersionCheck && sparkVersion.isUnsupportedVersion()) {
-        throw new Exception(
-            "This is not officially supported spark version: "
-                + sparkVersion
-                + "\nYou can set zeppelin.spark.enableSupportedVersionCheck to false if you really"
-                + " want to try this version of spark.");
+        throw new Exception("This is not officially supported spark version: " + sparkVersion
+            + "\nYou can set zeppelin.spark.enableSupportedVersionCheck to false if you really" +
+            " want to try this version of spark.");
       }
       sqlContext = this.innerInterpreter.sqlContext();
       sparkSession = this.innerInterpreter.sparkSession();
@@ -128,11 +123,10 @@ public class NewSparkInterpreter extends AbstractSparkInterpreter {
       sparkShims = SparkShims.getInstance(sc.version(), getProperties());
       sparkShims.setupSparkListener(sc.master(), sparkUrl, InterpreterContext.get());
 
-      z =
-          new SparkZeppelinContext(
-              sc, sparkShims, hooks, Integer.parseInt(getProperty("zeppelin.spark.maxResult")));
-      this.innerInterpreter.bind(
-          "z", z.getClass().getCanonicalName(), z, Lists.newArrayList("@transient"));
+      z = new SparkZeppelinContext(sc, sparkShims, hooks,
+          Integer.parseInt(getProperty("zeppelin.spark.maxResult")));
+      this.innerInterpreter.bind("z", z.getClass().getCanonicalName(), z,
+          Lists.newArrayList("@transient"));
     } catch (Exception e) {
       LOGGER.error("Fail to open SparkInterpreter", ExceptionUtils.getStackTrace(e));
       throw new InterpreterException("Fail to open SparkInterpreter", e);
@@ -168,8 +162,9 @@ public class NewSparkInterpreter extends AbstractSparkInterpreter {
   }
 
   @Override
-  public List<InterpreterCompletion> completion(
-      String buf, int cursor, InterpreterContext interpreterContext) {
+  public List<InterpreterCompletion> completion(String buf,
+                                                int cursor,
+                                                InterpreterContext interpreterContext) {
     LOGGER.debug("buf: " + buf + ", cursor:" + cursor);
     return innerInterpreter.completion(buf, cursor, interpreterContext);
   }
@@ -225,9 +220,8 @@ public class NewSparkInterpreter extends AbstractSparkInterpreter {
   private List<String> getDependencyFiles() throws InterpreterException {
     List<String> depFiles = new ArrayList<>();
     // add jar from DepInterpreter
-    DepInterpreter depInterpreter =
-        getParentSparkInterpreter()
-            .getInterpreterInTheSameSessionByClassName(DepInterpreter.class, false);
+    DepInterpreter depInterpreter = getParentSparkInterpreter().
+        getInterpreterInTheSameSessionByClassName(DepInterpreter.class, false);
     if (depInterpreter != null) {
       SparkDependencyContext depc = depInterpreter.getDependencyContext();
       if (depc != null) {
@@ -263,6 +257,6 @@ public class NewSparkInterpreter extends AbstractSparkInterpreter {
 
   @Override
   public boolean isUnsupportedSparkVersion() {
-    return enableSupportedVersionCheck && sparkVersion.isUnsupportedVersion();
+    return enableSupportedVersionCheck  && sparkVersion.isUnsupportedVersion();
   }
 }