Repository: zeppelin
Updated Branches:
  refs/heads/master 6919c4ad3 -> 5e37eed12


ZEPPELIN-3158. Fixed Checkstyle errors and warnings in ignite module

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

### What type of PR is it?
Improvement

### Todos
* [ ] - Task

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

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

### Screenshots (if appropriate)

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

Author: Jan Hentschel <jan.hentsc...@ultratendency.com>

Closes #2797 from HorizonNet/ZEPPELIN-3158 and squashes the following commits:

a4bb15b [Jan Hentschel] ZEPPELIN-3158. Fixed Checkstyle errors and warnings in 
ignite module


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

Branch: refs/heads/master
Commit: 5e37eed1270b1aa4a2ed9f540fee16fad29127b4
Parents: 6919c4a
Author: Jan Hentschel <jan.hentsc...@ultratendency.com>
Authored: Tue Feb 13 14:59:53 2018 +0100
Committer: Jeff Zhang <zjf...@apache.org>
Committed: Wed Mar 14 10:01:03 2018 +0800

----------------------------------------------------------------------
 ignite/pom.xml                                  |  7 ++++++
 .../zeppelin/ignite/IgniteInterpreter.java      | 17 ++++++++------
 .../zeppelin/ignite/IgniteSqlInterpreter.java   | 20 ++++++++--------
 .../zeppelin/ignite/IgniteInterpreterTest.java  | 23 +++++++++++--------
 .../ignite/IgniteSqlInterpreterTest.java        | 24 ++++++++++++--------
 .../java/org/apache/zeppelin/ignite/Person.java |  4 ++--
 6 files changed, 56 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/5e37eed1/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/5e37eed1/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 ac385ea..e104039 100644
--- a/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteInterpreter.java
+++ b/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteInterpreter.java
@@ -21,11 +21,6 @@ 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.*;
-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;
 
@@ -36,13 +31,12 @@ import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.List;
 import java.util.LinkedList;
+import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
 import scala.Console;
-import scala.None;
 import scala.Some;
 import scala.collection.JavaConversions;
 import scala.tools.nsc.Settings;
@@ -51,6 +45,15 @@ 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/).
  *

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/5e37eed1/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 6af8eb5..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,15 +16,6 @@
  */
 package org.apache.zeppelin.ignite;
 
-import org.apache.zeppelin.interpreter.Interpreter;
-import org.apache.zeppelin.interpreter.InterpreterContext;
-import org.apache.zeppelin.interpreter.InterpreterException;
-import org.apache.zeppelin.interpreter.InterpreterPropertyBuilder;
-import org.apache.zeppelin.interpreter.InterpreterResult;
-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;
 
@@ -32,12 +23,21 @@ import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
-import java.sql.Statement;
 import java.sql.SQLException;
+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;
+import org.apache.zeppelin.interpreter.InterpreterResult;
+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;
+
 /**
  * Apache Ignite SQL interpreter (http://ignite.incubator.apache.org/).
  *

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/5e37eed1/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 e8f2265..1f6c49c 100644
--- a/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteInterpreterTest.java
+++ b/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteInterpreterTest.java
@@ -16,22 +16,23 @@
  */
 package org.apache.zeppelin.ignite;
 
-import java.util.Collections;
-import java.util.Properties;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 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.InterpreterContext;
-import org.apache.zeppelin.interpreter.InterpreterResult;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import java.util.Collections;
+import java.util.Properties;
+
+import org.apache.zeppelin.interpreter.InterpreterContext;
+import org.apache.zeppelin.interpreter.InterpreterResult;
 
 /**
  * Tests for Apache Ignite interpreter ({@link IgniteInterpreter}).
@@ -40,7 +41,8 @@ public class IgniteInterpreterTest {
   private static final String HOST = "127.0.0.1:47500..47509";
 
   private static final InterpreterContext INTP_CONTEXT =
-      new InterpreterContext(null, null, null, null, null, null, null, null, 
null, null, null, null, null);
+      new InterpreterContext(null, null, null, null, null, null, null, null, 
null, null,
+              null, null, null);
 
   private IgniteInterpreter intp;
   private Ignite ignite;
@@ -61,7 +63,8 @@ public class IgniteInterpreterTest {
     ignite = Ignition.start(cfg);
 
     Properties props = new Properties();
-    props.setProperty(IgniteSqlInterpreter.IGNITE_JDBC_URL, 
"jdbc:ignite:cfg://cache=per...@default-ignite-jdbc.xml");
+    props.setProperty(IgniteSqlInterpreter.IGNITE_JDBC_URL,
+            "jdbc:ignite:cfg://cache=per...@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);
@@ -84,7 +87,8 @@ public class IgniteInterpreterTest {
             "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());
@@ -96,5 +100,4 @@ public class IgniteInterpreterTest {
 
     assertEquals(InterpreterResult.Code.ERROR, result.code());
   }
-
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/5e37eed1/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 4cb2cbb..5006fa3 100644
--- 
a/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteSqlInterpreterTest.java
+++ 
b/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteSqlInterpreterTest.java
@@ -16,8 +16,7 @@
  */
 package org.apache.zeppelin.ignite;
 
-import java.util.Collections;
-import java.util.Properties;
+import static org.junit.Assert.assertEquals;
 
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
@@ -26,16 +25,18 @@ import org.apache.ignite.configuration.CacheConfiguration;
 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.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Collections;
+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.InterpreterResult.Type;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
 
 /**
  * Tests for Apache Ignite SQL interpreter ({@link IgniteSqlInterpreter}).
@@ -44,7 +45,8 @@ public class IgniteSqlInterpreterTest {
   private static final String HOST = "127.0.0.1:47500..47509";
 
   private static final InterpreterContext INTP_CONTEXT =
-      new InterpreterContext(null, null, null, null, null, null, null, null, 
null, null, null, null, null);
+      new InterpreterContext(null, null, null, null, null, null, null, null, 
null, null, null,
+              null, null);
 
   private Ignite ignite;
   private IgniteSqlInterpreter intp;
@@ -66,7 +68,8 @@ public class IgniteSqlInterpreterTest {
     ignite = Ignition.start(cfg);
 
     Properties props = new Properties();
-    props.setProperty(IgniteSqlInterpreter.IGNITE_JDBC_URL, 
"jdbc:ignite:cfg://cache=per...@default-ignite-jdbc.xml");
+    props.setProperty(IgniteSqlInterpreter.IGNITE_JDBC_URL,
+            "jdbc:ignite:cfg://cache=per...@default-ignite-jdbc.xml");
 
     intp = new IgniteSqlInterpreter(props);
 
@@ -90,7 +93,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/5e37eed1/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 e0b4367..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,10 +16,10 @@
  */
 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;

Reply via email to