From 0ae295639e69f2cbd79ab349cdd6234414e7c463 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Mon, 28 Nov 2016 11:27:18 +0900
Subject: [PATCH 01/25] chore: Use pluginManagement block
so that config be shared in children projects
---
pom.xml | 54 +++++++++++++++++++++++++++---------------------------
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/pom.xml b/pom.xml
index d0eb7a7ee57..54b24395b7b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -334,33 +334,6 @@
org.apache.maven.plugins
maven-checkstyle-plugin
-
- _tools/checkstyle.xml
- false
-
-
-
- checkstyle-fail-build
- validate
-
- check
-
-
- true
- org/apache/zeppelin/interpreter/thrift/*,org/apache/zeppelin/scio/avro/*
-
-
-
- checkstyle-gen-html-report
- install
-
- checkstyle-aggregate
-
-
- org/apache/zeppelin/interpreter/thrift/*,org/apache/zeppelin/scio/avro/*
-
-
-
@@ -503,6 +476,33 @@
org.apache.maven.plugins
maven-checkstyle-plugin
${plugin.checkstyle.version}
+
+ _tools/checkstyle.xml
+ false
+
+
+
+ checkstyle-fail-build
+ validate
+
+ check
+
+
+ true
+ org/apache/zeppelin/interpreter/thrift/*,org/apache/zeppelin/scio/avro/*,org/apache/zeppelin/scio/avro/*
+
+
+
+ checkstyle-gen-html-report
+ install
+
+ checkstyle-aggregate
+
+
+ org/apache/zeppelin/interpreter/thrift/*,org/apache/zeppelin/scio/avro/*,org/apache/zeppelin/scio/avro/*
+
+
+
From 092155dfb06a17f78a0dd949b2edd152a12b907e Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Mon, 28 Nov 2016 11:28:29 +0900
Subject: [PATCH 02/25] chore: Remove useless failOnViolation config
its default value is already `true`
see https://maven.apache.org/plugins/maven-checkstyle-plugin/check-mojo.html
---
pom.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 54b24395b7b..cd9e10bd419 100644
--- a/pom.xml
+++ b/pom.xml
@@ -488,7 +488,6 @@
check
- true
org/apache/zeppelin/interpreter/thrift/*,org/apache/zeppelin/scio/avro/*,org/apache/zeppelin/scio/avro/*
From 1c3048ea763c5108f1489fdf15a72b40b19436f4 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Mon, 28 Nov 2016 11:29:46 +0900
Subject: [PATCH 03/25] chore: Remove duplicated exclude
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index cd9e10bd419..40f95e1b3c2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -488,7 +488,7 @@
check
- org/apache/zeppelin/interpreter/thrift/*,org/apache/zeppelin/scio/avro/*,org/apache/zeppelin/scio/avro/*
+ org/apache/zeppelin/interpreter/thrift/*,org/apache/zeppelin/scio/avro/*
@@ -498,7 +498,7 @@
checkstyle-aggregate
- org/apache/zeppelin/interpreter/thrift/*,org/apache/zeppelin/scio/avro/*,org/apache/zeppelin/scio/avro/*
+ org/apache/zeppelin/interpreter/thrift/*,org/apache/zeppelin/scio/avro/*
From e04de2f52a18ab822f8bdcadbc2e552d47a9a31f Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Mon, 28 Nov 2016 12:08:36 +0900
Subject: [PATCH 04/25] chore: Use recent checkstyle runtime
---
pom.xml | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 40f95e1b3c2..733c55b0df8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -119,7 +119,7 @@
1.5
1.8.1
1.3.1
- 2.13
+ 2.17
2.17
3.0.0
1.2.1
@@ -475,7 +475,14 @@
org.apache.maven.plugins
maven-checkstyle-plugin
- ${plugin.checkstyle.version}
+ 2.17
+
+
+ com.puppycrawl.tools
+ checkstyle
+ 6.19
+
+
_tools/checkstyle.xml
false
From 0e90cc3d39845388742b99bf9501c08965746025 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Mon, 28 Nov 2016 11:52:15 +0900
Subject: [PATCH 05/25] style: Fix Invalid indents in interpreter
[INFO] ------------------------------------------------------------------------
[INFO] Building Zeppelin: Interpreter 0.7.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-checkstyle-plugin:2.17:check (checkstyle-fail-build) @ zeppelin-interpreter ---
[INFO] There are 5 errors reported by Checkstyle 6.11.2 with _tools/checkstyle.xml ruleset.
[ERROR] src/main/java/org/apache/zeppelin/dep/DependencyResolver.java:[162] (indentation) Indentation: 'Collection' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java:[242] (indentation) Indentation: 'getClassName' have incorrect indentation level 10, expected level should be 12.
[ERROR] src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java:[59] (indentation) Indentation: 'extends' have incorrect indentation level 2, expected level should be 4.
[ERROR] src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java:[60] (indentation) Indentation: 'implements' have incorrect indentation level 2, expected level should be 4.
[ERROR] src/test/resources/log4j.properties:[0] (misc) NewlineAtEndOfFile: File does not end with a newline.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Zeppelin ........................................... SUCCESS [ 3.587 s]
[INFO] Zeppelin: Interpreter .............................. FAILURE [ 0.901 s]
---
.../java/org/apache/zeppelin/dep/DependencyResolver.java | 2 +-
.../zeppelin/interpreter/remote/RemoteInterpreter.java | 2 +-
.../zeppelin/interpreter/remote/RemoteInterpreterServer.java | 5 ++---
zeppelin-interpreter/src/test/resources/log4j.properties | 2 +-
4 files changed, 5 insertions(+), 6 deletions(-)
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 03f6b323185..c4ec04b5028 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
@@ -159,7 +159,7 @@ private List loadFromMvn(String artifact, Collection excludes)
*/
@Override
public List getArtifactsWithDep(String dependency,
- Collection excludes) throws RepositoryException {
+ Collection excludes) throws RepositoryException {
Artifact artifact = new DefaultArtifact(dependency);
DependencyFilter classpathFilter = DependencyFilterUtils.classpathFilter(JavaScopes.COMPILE);
PatternExclusionsDependencyFilter exclusionFilter =
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java
index 50ff689bcb7..072651bdf38 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java
@@ -240,7 +240,7 @@ public synchronized void init() {
property.put("zeppelin.interpreter.localRepo", localRepoPath);
}
client.createInterpreter(groupId, sessionKey,
- getClassName(), (Map) property, userName);
+ getClassName(), (Map) property, userName);
// Push angular object loaded from JSON file to remote interpreter
if (!interpreterGroup.isAngularRegistryPushed()) {
pushAngularObjectRegistryToRemote(client);
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 b167256e6bc..d90117c55eb 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
@@ -58,9 +58,8 @@
* Entry point for Interpreter process.
* Accepting thrift connections from ZeppelinServer.
*/
-public class RemoteInterpreterServer
- extends Thread
- implements RemoteInterpreterService.Iface, AngularObjectRegistryListener {
+public class RemoteInterpreterServer extends Thread
+ implements RemoteInterpreterService.Iface, AngularObjectRegistryListener {
Logger logger = LoggerFactory.getLogger(RemoteInterpreterServer.class);
InterpreterGroup interpreterGroup;
diff --git a/zeppelin-interpreter/src/test/resources/log4j.properties b/zeppelin-interpreter/src/test/resources/log4j.properties
index d8a783974e3..b81d6729f87 100644
--- a/zeppelin-interpreter/src/test/resources/log4j.properties
+++ b/zeppelin-interpreter/src/test/resources/log4j.properties
@@ -26,4 +26,4 @@ log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c:%L - %m%n
#
# Root logger option
-log4j.rootLogger=INFO, stdout
\ No newline at end of file
+log4j.rootLogger=INFO, stdout
From 13c53fcdfc526f63f083cedb991128fcda1ba739 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Mon, 28 Nov 2016 12:03:06 +0900
Subject: [PATCH 06/25] style: Fix invalid indents in zengine
[INFO] ------------------------------------------------------------------------
[INFO] Building Zeppelin: Zengine 0.7.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-checkstyle-plugin:2.17:check (checkstyle-fail-build) @ zeppelin-zengine ---
[INFO] There are 13 errors reported by Checkstyle 6.11.2 with _tools/checkstyle.xml ruleset.
[ERROR] src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java:[348] (indentation) Indentation: '.' have incorrect indentation level 5, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java:[412] (indentation) Indentation: '"Information From loaded Interpreter Setting Ref - {} "' have incorrect indentation level10, expected level should be 12.
[ERROR] src/main/java/org/apache/zeppelin/notebook/NotebookImportDeserializer.java:[37] (indentation) Indentation: 'array initialization' child have incorrect indentation level 4, expected level shouldbe 6.
[ERROR] src/main/java/org/apache/zeppelin/notebook/NotebookImportDeserializer.java:[38] (indentation) Indentation: 'array initialization' child have incorrect indentation level 4, expected level shouldbe 6.
[ERROR] src/main/java/org/apache/zeppelin/notebook/NotebookImportDeserializer.java:[39] (indentation) Indentation: 'array initialization' child have incorrect indentation level 4, expected level shouldbe 6.
[ERROR] src/main/java/org/apache/zeppelin/notebook/NotebookImportDeserializer.java:[44] (indentation) Indentation: 'JsonDeserializationContext' have incorrect indentation level 4, expected level shouldbe 6.
[ERROR] src/main/java/org/apache/zeppelin/notebook/Paragraph.java:[229] (indentation) Indentation: '&&' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/notebook/Paragraph.java:[230] (indentation) Indentation: '&&' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/notebook/Paragraph.java:[306] (indentation) Indentation: 'interpreterHasUser' have incorrect indentation level 8, expected level should be 10.
[ERROR] src/main/java/org/apache/zeppelin/notebook/Paragraph.java:[307] (indentation) Indentation: 'isUserAuthorizedToAccessInterpreter' have incorrect indentation level 8, expected level should be 10.
[ERROR] src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java:[440] (indentation) Indentation: 'getRepo' have incorrect indentation level 10, expected level should be 12.
[ERROR] src/main/java/org/apache/zeppelin/notebook/utility/IdHashes.java:[30] (indentation) Indentation: 'array initialization' child have incorrect indentation level 4, expected level should be one ofthe following: 6, 55, 58.
[ERROR] src/main/java/org/apache/zeppelin/notebook/utility/IdHashes.java:[31] (indentation) Indentation: 'array initialization' child have incorrect indentation level 4, expected level should be one ofthe following: 6, 55, 58.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Zeppelin ........................................... SUCCESS [ 3.116 s]
[INFO] Zeppelin: Interpreter .............................. SUCCESS [ 1.237 s]
[INFO] Zeppelin: Zengine .................................. FAILURE [ 0.612 s]
---
.../apache/zeppelin/interpreter/InterpreterFactory.java | 6 +++---
.../zeppelin/notebook/NotebookImportDeserializer.java | 8 ++++----
.../main/java/org/apache/zeppelin/notebook/Paragraph.java | 8 ++++----
.../apache/zeppelin/notebook/repo/NotebookRepoSync.java | 2 +-
.../org/apache/zeppelin/notebook/utility/IdHashes.java | 4 ++--
5 files changed, 14 insertions(+), 14 deletions(-)
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 c620b3564f0..56342f5ec6e 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
@@ -344,8 +344,8 @@ private List getInterpreterListFromJson(Path filename)
}
private List getInterpreterListFromJson(InputStream stream) {
- Type registeredInterpreterListType = new TypeToken>() {
- }.getType();
+ Type registeredInterpreterListType =
+ new TypeToken>() {}.getType();
return gson.fromJson(new InputStreamReader(stream), registeredInterpreterListType);
}
@@ -409,7 +409,7 @@ private void loadFromFile() throws IOException {
interpreterSettingObject = interpreterSettingsRef.get(setting.getGroup());
if (interpreterSettingObject == null) {
logger.warn("can't get InterpreterSetting " +
- "Information From loaded Interpreter Setting Ref - {} ", setting.getGroup());
+ "Information From loaded Interpreter Setting Ref - {} ", setting.getGroup());
continue;
}
depClassPath = interpreterSettingObject.getPath();
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 86e0f0bf77e..47c3eca43eb 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
@@ -34,14 +34,14 @@
*/
public class NotebookImportDeserializer implements JsonDeserializer {
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'T'HH:mm:ssZ",
+ "MMM d, yyyy h:mm:ss a",
+ "MMM dd, yyyy HH:mm:ss"
};
@Override
public Date deserialize(JsonElement jsonElement, Type typeOF,
- JsonDeserializationContext context) throws JsonParseException {
+ JsonDeserializationContext context) throws JsonParseException {
for (String format : DATE_FORMATS) {
try {
return new SimpleDateFormat(format, Locale.US).parse(jsonElement.getAsString());
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 114babfd008..ddf583d29a8 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
@@ -227,8 +227,8 @@ public List getInterpreterCompletion() {
public List completion(String buffer, int cursor) {
String lines[] = buffer.split(System.getProperty("line.separator"));
if (lines.length > 0
- && lines[0].startsWith("%")
- && cursor <= lines[0].trim().length()) {
+ && lines[0].startsWith("%")
+ && cursor <= lines[0].trim().length()) {
int idx = lines[0].indexOf(' ');
if (idx < 0 || (idx > 0 && cursor <= idx)) {
@@ -309,8 +309,8 @@ protected Object jobRun() throws Throwable {
}
if (this.noteHasUser() && this.noteHasInterpreters()) {
if (intp != null &&
- interpreterHasUser(intp) &&
- isUserAuthorizedToAccessInterpreter(intp.getOption()) == false) {
+ interpreterHasUser(intp) &&
+ isUserAuthorizedToAccessInterpreter(intp.getOption()) == false) {
logger.error("{} has no permission for {} ", authenticationInfo.getUser(), repl);
return new InterpreterResult(Code.ERROR, authenticationInfo.getUser() +
" has no permission for " + getRequiredReplName());
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 1a513aab86a..9c6470c807d 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
@@ -437,7 +437,7 @@ public Revision checkpoint(String noteId, String checkpointMsg, AuthenticationIn
allRepoCheckpoints.add(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);
+ getRepo(i).getClass().toString(), i, noteId);
errorMessage += "Error on storage class " + getRepo(i).getClass().toString() +
" with index " + i + " : " + e.getMessage() + "\n";
errorCount++;
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 98aaac8a756..e3b6bda93a7 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
@@ -27,8 +27,8 @@
*/
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'};
+ '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.
From bf6e39fd2d5073b961882a86c575a2a68e59680d Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Mon, 28 Nov 2016 12:11:54 +0900
Subject: [PATCH 07/25] style: Fix indents in spark
[INFO] ------------------------------------------------------------------------
[INFO] Building Zeppelin: Spark 0.7.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-checkstyle-plugin:2.17:check (checkstyle-fail-build) @ zeppelin-spark_2.10 ---
[INFO] There are 10 errors reported by Checkstyle 6.19 with _tools/checkstyle.xml ruleset.
[ERROR] src/main/java/org/apache/zeppelin/spark/DepInterpreter.java:[209] (indentation) Indentation:'intp' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java:[418] (indentation) Indentation: 'e' have incorrect indentation level 10, expected level should be 12.
[ERROR] src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java:[493] (indentation) Indentation: 'array initialization' child have incorrect indentation level 6, expected level should be one of the following: 8, 39, 42.
[ERROR] src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java:[1158] (indentation) Indentation: '||' have incorrect indentation level 11, expected level should be 12.
[ERROR] src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java:[1159] (indentation) Indentation: '||' have incorrect indentation level 11, expected level should be 12.
[ERROR] src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java:[1160] (indentation) Indentation: '||' have incorrect indentation level 11, expected level should be 12.
[ERROR] src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java:[1451] (indentation) Indentation: 'array initialization' child have incorrect indentation level 12, expected level should be 14.
[ERROR] src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java:[1454] (indentation) Indentation: 'array initialization' child have incorrect indentation level 8, expected level should be 10.
[ERROR] src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java:[1463] (indentation) Indentation: 'array initialization' child have incorrect indentation level 14, expected level should be 16.
[ERROR] src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java:[1465] (indentation) Indentation: 'array initialization' child have incorrect indentation level 10, expected level should be 12.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Zeppelin ........................................... SUCCESS [ 3.472 s]
[INFO] Zeppelin: Interpreter .............................. SUCCESS [ 1.153 s]
[INFO] Zeppelin: Zengine .................................. SUCCESS [ 0.867 s]
[INFO] Zeppelin: Display system apis ...................... SUCCESS [ 0.214 s]
[INFO] Zeppelin: Spark dependencies ....................... SUCCESS [ 0.644 s]
[INFO] Zeppelin: Spark .................................... FAILURE [ 0.348 s]
---
.../apache/zeppelin/spark/DepInterpreter.java | 2 +-
.../zeppelin/spark/SparkInterpreter.java | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/spark/src/main/java/org/apache/zeppelin/spark/DepInterpreter.java b/spark/src/main/java/org/apache/zeppelin/spark/DepInterpreter.java
index 478d0bc794c..a39b8c4152a 100644
--- a/spark/src/main/java/org/apache/zeppelin/spark/DepInterpreter.java
+++ b/spark/src/main/java/org/apache/zeppelin/spark/DepInterpreter.java
@@ -206,7 +206,7 @@ private Results.Result interpret(String line) {
public Object getValue(String name) {
Object ret = Utils.invokeMethod(
- intp, "valueOfTerm", new Class[]{String.class}, new Object[]{name});
+ intp, "valueOfTerm", new Class[]{String.class}, new Object[]{name});
if (ret instanceof None) {
return null;
} else if (ret instanceof Some) {
diff --git a/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java b/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
index e8c76bcccd4..2edb26e0ad1 100644
--- a/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
+++ b/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
@@ -415,7 +415,7 @@ public SparkContext createSparkContext_1() {
// 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()));
+ e.getMessage()));
}
}
@@ -490,7 +490,7 @@ private void setupConfForPySpark(SparkConf conf) {
//Only one of py4j-0.9-src.zip and py4j-0.8.2.1-src.zip should exist
String[] pythonLibs = new String[]{"pyspark.zip", "py4j-0.9-src.zip", "py4j-0.8.2.1-src.zip",
- "py4j-0.10.1-src.zip", "py4j-0.10.3-src.zip"};
+ "py4j-0.10.1-src.zip", "py4j-0.10.3-src.zip"};
ArrayList pythonLibUris = new ArrayList<>();
for (String lib : pythonLibs) {
File libFile = new File(pysparkPath, lib);
@@ -1155,9 +1155,9 @@ public InterpreterResult interpretInput(String[] lines, InterpreterContext conte
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;
@@ -1448,10 +1448,10 @@ private Object createHttpServer(File outputDir) {
Constructor> constructor = getClass().getClassLoader()
.loadClass("org.apache.spark.HttpServer")
.getConstructor(new Class[]{
- SparkConf.class, File.class, SecurityManager.class, int.class, String.class});
+ SparkConf.class, File.class, SecurityManager.class, int.class, String.class});
return constructor.newInstance(new Object[] {
- conf, outputDir, new SecurityManager(conf), 0, "HTTP Server"});
+ conf, outputDir, new SecurityManager(conf), 0, "HTTP Server"});
} catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException |
InstantiationException | InvocationTargetException e) {
// fallback to old constructor
@@ -1460,9 +1460,9 @@ private Object createHttpServer(File outputDir) {
constructor = getClass().getClassLoader()
.loadClass("org.apache.spark.HttpServer")
.getConstructor(new Class[]{
- File.class, SecurityManager.class, int.class, String.class});
+ File.class, SecurityManager.class, int.class, String.class});
return constructor.newInstance(new Object[] {
- outputDir, new SecurityManager(conf), 0, "HTTP Server"});
+ outputDir, new SecurityManager(conf), 0, "HTTP Server"});
} catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException |
InstantiationException | InvocationTargetException e1) {
logger.error(e1.getMessage(), e1);
From 06c4fae53bee3f20755c9a1a0fe2658dbce523b1 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Mon, 28 Nov 2016 12:18:19 +0900
Subject: [PATCH 08/25] style: Fix indents in shell
[INFO] ------------------------------------------------------------------------
[INFO] Building Zeppelin: Shell interpreter 0.7.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-checkstyle-plugin:2.17:check (checkstyle-fail-build) @ zeppelin-shell ---
[INFO] There are 5 errors reported by Checkstyle 6.19 with _tools/checkstyle.xml ruleset.
[ERROR] src/main/java/org/apache/zeppelin/shell/security/ShellSecurityImpl.java:[39] (indentation) Indentation: '.' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/shell/security/ShellSecurityImpl.java:[46] (indentation) Indentation: 'properties' have incorrect indentation level 12, expected level should be 14.
[ERROR] src/main/java/org/apache/zeppelin/shell/security/ShellSecurityImpl.java:[47] (indentation) Indentation: 'properties' have incorrect indentation level 12, expected level should be 14.
[ERROR] src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java:[94] (indentation) Indentation: '+' have incorrect indentation level 8, expected level should be 10.
[ERROR] src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java:[105] (indentation) Indentation: '+' have incorrect indentation level 10, expected level should be 12.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Zeppelin ........................................... SUCCESS [ 3.454 s]
[INFO] Zeppelin: Interpreter .............................. SUCCESS [ 1.074 s]
[INFO] Zeppelin: Zengine .................................. SUCCESS [ 0.889 s]
[INFO] Zeppelin: Display system apis ...................... SUCCESS [ 0.173 s]
[INFO] Zeppelin: Spark dependencies ....................... SUCCESS [ 0.723 s]
[INFO] Zeppelin: Spark .................................... SUCCESS [ 0.640 s]
[INFO] Zeppelin: Markdown interpreter ..................... SUCCESS [ 0.181 s]
[INFO] Zeppelin: Angular interpreter ...................... SUCCESS [ 0.135 s]
[INFO] Zeppelin: Shell interpreter ........................ FAILURE [ 0.135 s]
---
.../java/org/apache/zeppelin/shell/ShellInterpreter.java | 8 ++++----
.../apache/zeppelin/shell/security/ShellSecurityImpl.java | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
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 838c6f15358..1c760d1ef77 100644
--- a/shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java
+++ b/shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java
@@ -90,8 +90,8 @@ public InterpreterResult interpret(String cmd, InterpreterContext contextInterpr
executor.setWatchdog(new ExecuteWatchdog(Long.valueOf(getProperty(TIMEOUT_PROPERTY))));
executors.put(contextInterpreter.getParagraphId(), executor);
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();
@@ -101,8 +101,8 @@ public InterpreterResult interpret(String cmd, InterpreterContext contextInterpr
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);
diff --git a/shell/src/main/java/org/apache/zeppelin/shell/security/ShellSecurityImpl.java b/shell/src/main/java/org/apache/zeppelin/shell/security/ShellSecurityImpl.java
index bb3ce861f78..f11576fbd10 100644
--- a/shell/src/main/java/org/apache/zeppelin/shell/security/ShellSecurityImpl.java
+++ b/shell/src/main/java/org/apache/zeppelin/shell/security/ShellSecurityImpl.java
@@ -36,15 +36,15 @@ public class ShellSecurityImpl {
public static void createSecureConfiguration(Properties properties, String shell) {
String authType = properties.getProperty("zeppelin.shell.auth.type")
- .trim().toUpperCase();
+ .trim().toUpperCase();
switch (authType) {
case "KERBEROS":
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"));
+ properties.getProperty("zeppelin.shell.keytab.location"),
+ properties.getProperty("zeppelin.shell.principal"));
cmdLine.addArgument(kinitCommand, false);
DefaultExecutor executor = new DefaultExecutor();
From 787163cb64bde1b9101c762f414079f88ca895a2 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Mon, 28 Nov 2016 12:25:15 +0900
Subject: [PATCH 09/25] style: Fix indents in jdbc
[INFO] ------------------------------------------------------------------------
[INFO] Building Zeppelin: JDBC interpreter 0.7.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-checkstyle-plugin:2.17:check (checkstyle-fail-build) @ zeppelin-jdbc ---
[INFO] There are 6 errors reported by Checkstyle 6.19 with _tools/checkstyle.xml ruleset.
[ERROR] src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java:[259] (indentation) Indentation:'jdbcUserConfigurationsMap' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java:[282] (indentation) Indentation:'getJDBCConfiguration' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java:[291] (indentation) Indentation:'getEntityName' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java:[302] (indentation) Indentation:'new' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java:[305] (indentation) Indentation:'connectionFactory' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java:[532] (indentation) Indentation:'getJDBCConfiguration' have incorrect indentation level 6, expected level should be 8.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Zeppelin ........................................... SUCCESS [ 3.206 s]
[INFO] Zeppelin: Interpreter .............................. SUCCESS [ 1.011 s]
[INFO] Zeppelin: Zengine .................................. SUCCESS [ 0.778 s]
[INFO] Zeppelin: Display system apis ...................... SUCCESS [ 0.175 s]
[INFO] Zeppelin: Spark dependencies ....................... SUCCESS [ 0.481 s]
[INFO] Zeppelin: Spark .................................... SUCCESS [ 0.365 s]
[INFO] Zeppelin: Markdown interpreter ..................... SUCCESS [ 0.160 s]
[INFO] Zeppelin: Angular interpreter ...................... SUCCESS [ 0.142 s]
[INFO] Zeppelin: Shell interpreter ........................ SUCCESS [ 0.142 s]
[INFO] Zeppelin: Livy interpreter ......................... SUCCESS [ 0.476 s]
[INFO] Zeppelin: HBase interpreter ........................ SUCCESS [ 0.272 s]
[INFO] Zeppelin: Apache Pig Interpreter ................... SUCCESS [ 0.224 s]
[INFO] Zeppelin: PostgreSQL interpreter ................... SUCCESS [ 0.200 s]
[INFO] Zeppelin: JDBC interpreter ......................... FAILURE [ 0.186 s]
---
.../org/apache/zeppelin/jdbc/JDBCInterpreter.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
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 407e81ea2a9..fcd02a0bd3d 100644
--- a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
+++ b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
@@ -256,7 +256,7 @@ private UsernamePassword getUsernamePassword(InterpreterContext interpreterConte
public JDBCUserConfigurations getJDBCConfiguration(String user) {
JDBCUserConfigurations jdbcUserConfigurations =
- jdbcUserConfigurationsMap.get(user);
+ jdbcUserConfigurationsMap.get(user);
if (jdbcUserConfigurations == null) {
jdbcUserConfigurations = new JDBCUserConfigurations();
@@ -279,7 +279,7 @@ private void setUserProperty(String propertyKey, InterpreterContext interpreterC
String user = interpreterContext.getAuthenticationInfo().getUser();
JDBCUserConfigurations jdbcUserConfigurations =
- getJDBCConfiguration(user);
+ getJDBCConfiguration(user);
jdbcUserConfigurations.setPropertyMap(propertyKey, basePropretiesMap.get(propertyKey));
if (existAccountInBaseProperty()) {
@@ -288,7 +288,7 @@ private void setUserProperty(String propertyKey, InterpreterContext interpreterC
jdbcUserConfigurations.cleanUserProperty(propertyKey);
UsernamePassword usernamePassword = getUsernamePassword(interpreterContext,
- getEntityName(interpreterContext.getReplName()));
+ getEntityName(interpreterContext.getReplName()));
if (usernamePassword != null) {
jdbcUserConfigurations.setUserProperty(propertyKey, usernamePassword);
} else {
@@ -299,10 +299,10 @@ private void setUserProperty(String propertyKey, InterpreterContext interpreterC
private void createConnectionPool(String url, String user, String propertyKey,
Properties properties) throws SQLException, ClassNotFoundException {
ConnectionFactory connectionFactory =
- new DriverManagerConnectionFactory(url, properties);
+ new DriverManagerConnectionFactory(url, properties);
PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(
- connectionFactory, null);
+ connectionFactory, null);
ObjectPool connectionPool = new GenericObjectPool(poolableConnectionFactory);
poolableConnectionFactory.setPool(connectionPool);
@@ -542,7 +542,7 @@ public void cancel(InterpreterContext context) {
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) {
From b853bf03dceb40d2f202202cadc093ba82fff7d3 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Mon, 28 Nov 2016 12:28:35 +0900
Subject: [PATCH 10/25] style: Fix indents in lens
[INFO] ------------------------------------------------------------------------
[INFO] Building Zeppelin: Lens interpreter 0.7.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-checkstyle-plugin:2.17:check (checkstyle-fail-build) @ zeppelin-lens ---
[INFO] There are 18 errors reported by Checkstyle 6.19 with _tools/checkstyle.xml ruleset.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensInterpreter.java:[79] (indentation) Indentation: 'new' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensInterpreter.java:[81] (indentation) Indentation: 'new' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensInterpreter.java:[103,37] (whitespace) WhitespaceAround: '|' is not preceded with whitespace.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensInterpreter.java:[103,38] (whitespace) WhitespaceAround: '|' is not followed by whitespace.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensInterpreter.java:[106] (indentation) Indentation:'+' have incorrect indentation level 10, expected level should be 12.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensInterpreter.java:[110,37] (whitespace) WhitespaceAround: '|' is not preceded with whitespace.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensInterpreter.java:[110,38] (whitespace) WhitespaceAround: '|' is not followed by whitespace.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensInterpreter.java:[269] (indentation) Indentation:'new' have incorrect indentation level 10, expected level should be 12.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensInterpreter.java:[272] (indentation) Indentation:'+' have incorrect indentation level 10, expected level should be 12.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensInterpreter.java:[324] (indentation) Indentation:'result' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensInterpreter.java:[351] (indentation) Indentation:'+' have incorrect indentation level 8, expected level should be 10.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensInterpreter.java:[354] (indentation) Indentation:'+' have incorrect indentation level 8, expected level should be 10.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensJLineShellComponent.java:[41] (indentation) Indentation: 'implements' have incorrect indentation level 2, expected level should be 4.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensJLineShellComponent.java:[105] (indentation) Indentation: 'BeanFactoryUtils' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensJLineShellComponent.java:[112] (indentation) Indentation: '.' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensJLineShellComponent.java:[172] (indentation) Indentation: '.' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensJLineShellComponent.java:[189] (indentation) Indentation: '.' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/lens/LensJLineShellComponent.java:[209] (indentation) Indentation: '.' have incorrect indentation level 6, expected level should be 8.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Zeppelin ........................................... SUCCESS [ 3.334 s]
[INFO] Zeppelin: Interpreter .............................. SUCCESS [ 1.060 s]
[INFO] Zeppelin: Zengine .................................. SUCCESS [ 0.781 s]
[INFO] Zeppelin: Display system apis ...................... SUCCESS [ 0.184 s]
[INFO] Zeppelin: Spark dependencies ....................... SUCCESS [ 0.514 s]
[INFO] Zeppelin: Spark .................................... SUCCESS [ 0.388 s]
[INFO] Zeppelin: Markdown interpreter ..................... SUCCESS [ 0.155 s]
[INFO] Zeppelin: Angular interpreter ...................... SUCCESS [ 0.133 s]
[INFO] Zeppelin: Shell interpreter ........................ SUCCESS [ 0.133 s]
[INFO] Zeppelin: Livy interpreter ......................... SUCCESS [ 0.438 s]
[INFO] Zeppelin: HBase interpreter ........................ SUCCESS [ 0.256 s]
[INFO] Zeppelin: Apache Pig Interpreter ................... SUCCESS [ 0.269 s]
[INFO] Zeppelin: PostgreSQL interpreter ................... SUCCESS [ 0.165 s]
[INFO] Zeppelin: JDBC interpreter ......................... SUCCESS [ 0.200 s]
[INFO] Zeppelin: File System Interpreters ................. SUCCESS [ 0.170 s]
[INFO] Zeppelin: Flink .................................... SUCCESS [ 0.241 s]
[INFO] Zeppelin: Apache Ignite interpreter ................ SUCCESS [ 0.173 s]
[INFO] Zeppelin: Kylin interpreter ........................ SUCCESS [ 0.141 s]
[INFO] Zeppelin: Python interpreter ....................... SUCCESS [ 0.188 s]
[INFO] Zeppelin: Lens interpreter ......................... FAILURE [ 0.260 s]
---
.../apache/zeppelin/lens/LensInterpreter.java | 30 +++++++++----------
.../lens/LensJLineShellComponent.java | 16 +++++-----
2 files changed, 23 insertions(+), 23 deletions(-)
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 17e3a46c68f..fb95fd6793a 100644
--- a/lens/src/main/java/org/apache/zeppelin/lens/LensInterpreter.java
+++ b/lens/src/main/java/org/apache/zeppelin/lens/LensInterpreter.java
@@ -75,10 +75,10 @@ public class LensInterpreter extends Interpreter {
};
private static Pattern s_queryExecutePattern = Pattern.compile(".*query\\s+execute\\s+(.*)");
- private static Map s_paraToQH =
- new ConcurrentHashMap<> (); //tracks paragraphId -> Lens QueryHandle
+ private static Map s_paraToQH =
+ new ConcurrentHashMap<> (); //tracks paragraphId -> Lens QueryHandle
private static Map s_clientMap =
- new ConcurrentHashMap<>();
+ new ConcurrentHashMap<>();
private int m_maxResults;
private int m_maxThreads;
@@ -100,14 +100,14 @@ public LensInterpreter(Properties property) {
m_lensConf.set(LENS_PERSIST_RESULTSET, property.get(LENS_PERSIST_RESULTSET).toString());
try {
m_maxResults = Integer.parseInt(property.get(ZEPPELIN_MAX_ROWS).toString());
- } catch (NumberFormatException|NullPointerException e) {
+ } catch (NumberFormatException | NullPointerException e) {
m_maxResults = 1000;
- s_logger.error("unable to parse " + ZEPPELIN_MAX_ROWS + " :"
- + property.get(ZEPPELIN_MAX_ROWS), e);
+ s_logger.error("unable to parse " + ZEPPELIN_MAX_ROWS + " :"
+ + property.get(ZEPPELIN_MAX_ROWS), e);
}
try {
m_maxThreads = Integer.parseInt(property.get(ZEPPELIN_LENS_CONCURRENT_SESSIONS).toString());
- } catch (NumberFormatException|NullPointerException e) {
+ } catch (NumberFormatException | NullPointerException e) {
m_maxThreads = 10;
s_logger.error("unable to parse " + ZEPPELIN_LENS_CONCURRENT_SESSIONS + " :"
+ property.get(ZEPPELIN_LENS_CONCURRENT_SESSIONS), e);
@@ -265,11 +265,11 @@ public InterpreterResult interpret(String input, InterpreterContext context) {
&& res.getResult().toString().trim().matches("[a-z0-9-]+")) {
// setup query progress tracking
qh = res.getResult().toString();
- s_paraToQH.put(context.getParagraphId(),
- new ExecutionDetail(qh, lensClient, shell));
+ s_paraToQH.put(context.getParagraphId(),
+ new ExecutionDetail(qh, lensClient, shell));
String getResultsCmd = "query results --async false " + qh;
- s_logger.info("executing query results command : " + context.getParagraphId()
- + " : " + getResultsCmd);
+ s_logger.info("executing query results command : " + context.getParagraphId()
+ + " : " + getResultsCmd);
res = shell.executeCommand(getResultsCmd);
s_paraToQH.remove(context.getParagraphId());
}
@@ -321,7 +321,7 @@ private String formatResult(String st, CommandResult result) {
}
}
if (s_queryExecutePattern.matcher(st.toLowerCase()).find() &&
- result.getResult().toString().contains(" rows process in (")) {
+ result.getResult().toString().contains(" rows process in (")) {
sb.append("%table ");
}
if (sb.length() > 0) {
@@ -347,11 +347,11 @@ public void cancel(InterpreterContext context) {
s_clientMap.put(lensClient, true);
s_logger.info("invoke query kill (" + context.getParagraphId() + ") " + qh);
CommandResult res = shell.executeCommand("query kill " + qh);
- s_logger.info("query kill returned (" + context.getParagraphId() + ") " + qh
- + " with: " + res.getResult());
+ s_logger.info("query kill returned (" + context.getParagraphId() + ") " + qh
+ + " with: " + res.getResult());
} catch (Exception e) {
s_logger.error("unable to kill query ("
- + context.getParagraphId() + ") " + qh, e);
+ + context.getParagraphId() + ") " + qh, e);
} finally {
try {
if (lensClient != null) {
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 7bf20592651..97a857b1f70 100644
--- a/lens/src/main/java/org/apache/zeppelin/lens/LensJLineShellComponent.java
+++ b/lens/src/main/java/org/apache/zeppelin/lens/LensJLineShellComponent.java
@@ -37,8 +37,8 @@
/**
* workaround for https://github.com/spring-projects/spring-shell/issues/73
*/
-public class LensJLineShellComponent extends JLineShell
- implements SmartLifecycle, ApplicationContextAware, InitializingBean {
+public class LensJLineShellComponent extends JLineShell
+ implements SmartLifecycle, ApplicationContextAware, InitializingBean {
@Autowired
private CommandLine commandLine;
@@ -101,15 +101,15 @@ public boolean isRunning() {
@SuppressWarnings("rawtypes")
public void afterPropertiesSet() {
- Map commands =
- BeanFactoryUtils.beansOfTypeIncludingAncestors(applicationContext,
+ Map commands =
+ BeanFactoryUtils.beansOfTypeIncludingAncestors(applicationContext,
CommandMarker.class);
for (CommandMarker command : commands.values()) {
getSimpleParser().add(command);
}
Map converters = BeanFactoryUtils
- .beansOfTypeIncludingAncestors(applicationContext, Converter.class);
+ .beansOfTypeIncludingAncestors(applicationContext, Converter.class);
for (Converter> converter : converters.values()) {
getSimpleParser().add(converter);
}
@@ -169,7 +169,7 @@ public void customizePlugin() {
*/
protected String getHistoryFileName() {
HistoryFileNameProvider historyFileNameProvider = PluginUtils
- .getHighestPriorityProvider(this.applicationContext, HistoryFileNameProvider.class);
+ .getHighestPriorityProvider(this.applicationContext, HistoryFileNameProvider.class);
String providerHistoryFileName = historyFileNameProvider.getHistoryFileName();
if (providerHistoryFileName != null) {
return providerHistoryFileName;
@@ -186,7 +186,7 @@ protected String getHistoryFileName() {
*/
protected String getPromptText() {
PromptProvider promptProvider = PluginUtils
- .getHighestPriorityProvider(this.applicationContext, PromptProvider.class);
+ .getHighestPriorityProvider(this.applicationContext, PromptProvider.class);
String providerPromptText = promptProvider.getPrompt();
if (providerPromptText != null) {
return providerPromptText;
@@ -206,7 +206,7 @@ protected String getPromptText() {
private String[] getBannerText() {
String[] bannerText = new String[4];
BannerProvider provider = PluginUtils
- .getHighestPriorityProvider(this.applicationContext, BannerProvider.class);
+ .getHighestPriorityProvider(this.applicationContext, BannerProvider.class);
bannerText[0] = provider.getBanner();
bannerText[1] = provider.getWelcomeMessage();
bannerText[2] = provider.getVersion();
From 6f6a17d9814a42a63727b656ccedbed5c4e64298 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Mon, 28 Nov 2016 12:31:09 +0900
Subject: [PATCH 11/25] style: Fix indents in elasticsearch
[INFO] ------------------------------------------------------------------------
[INFO] Building Zeppelin: Elasticsearch interpreter 0.7.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-checkstyle-plugin:2.17:check (checkstyle-fail-build) @ zeppelin-elasticsearch ---
[INFO] There are 30 errors reported by Checkstyle 6.19 with _tools/checkstyle.xml ruleset.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[80] (indentation) Indentation: '+' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[81] (indentation) Indentation: '+' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[82] (indentation) Indentation: '+' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[83] (indentation) Indentation: '+' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[84] (indentation) Indentation: '+' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[85] (indentation) Indentation: '+' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[86] (indentation) Indentation: '+' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[87] (indentation) Indentation: '+' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[88] (indentation) Indentation: '+' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[89] (indentation) Indentation: '+' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[90] (indentation) Indentation: '+' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[91] (indentation) Indentation: '+' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[92] (indentation) Indentation: '+' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[93] (indentation) Indentation: '+' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[94] (indentation) Indentation: '+' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[95] (indentation) Indentation: '+' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[98] (indentation) Indentation: '"count"' have incorrect indentation level 4, expected level should be 6.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[125] (indentation) Indentation: 'property' have incorrect indentation level 8, expected level should be 10.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[134] (indentation) Indentation: '.' have incorrect indentation level 8, expected level should be 10.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[135] (indentation) Indentation: '.' have incorrect indentation level 8, expected level should be 10.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[136] (indentation) Indentation: '.' have incorrect indentation level 8, expected level should be 10.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[283] (indentation) Indentation: '.' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[284] (indentation) Indentation: '.' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[354] (indentation) Indentation: '.' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[355] (indentation) Indentation: '.' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[356] (indentation) Indentation: '.' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[381] (indentation) Indentation: '.' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[382] (indentation) Indentation: '.' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[397] (indentation) Indentation: 'client' have incorrect indentation level 6, expected level should be 8.
[ERROR] src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java:[513] (indentation) Indentation: 'flattenJsonMap' have incorrect indentation level 12, expected level should be 14.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Zeppelin ........................................... SUCCESS [ 3.534 s]
[INFO] Zeppelin: Interpreter .............................. SUCCESS [ 1.155 s]
[INFO] Zeppelin: Zengine .................................. SUCCESS [ 0.954 s]
[INFO] Zeppelin: Display system apis ...................... SUCCESS [ 0.185 s]
[INFO] Zeppelin: Spark dependencies ....................... SUCCESS [ 0.617 s]
[INFO] Zeppelin: Spark .................................... SUCCESS [ 0.410 s]
[INFO] Zeppelin: Markdown interpreter ..................... SUCCESS [ 0.168 s]
[INFO] Zeppelin: Angular interpreter ...................... SUCCESS [ 0.149 s]
[INFO] Zeppelin: Shell interpreter ........................ SUCCESS [ 0.154 s]
[INFO] Zeppelin: Livy interpreter ......................... SUCCESS [ 0.645 s]
[INFO] Zeppelin: HBase interpreter ........................ SUCCESS [ 0.258 s]
[INFO] Zeppelin: Apache Pig Interpreter ................... SUCCESS [ 0.211 s]
[INFO] Zeppelin: PostgreSQL interpreter ................... SUCCESS [ 0.174 s]
[INFO] Zeppelin: JDBC interpreter ......................... SUCCESS [ 0.211 s]
[INFO] Zeppelin: File System Interpreters ................. SUCCESS [ 0.176 s]
[INFO] Zeppelin: Flink .................................... SUCCESS [ 0.235 s]
[INFO] Zeppelin: Apache Ignite interpreter ................ SUCCESS [ 0.174 s]
[INFO] Zeppelin: Kylin interpreter ........................ SUCCESS [ 0.152 s]
[INFO] Zeppelin: Python interpreter ....................... SUCCESS [ 0.181 s]
[INFO] Zeppelin: Lens interpreter ......................... SUCCESS [ 0.319 s]
[INFO] Zeppelin: Apache Cassandra interpreter ............. SUCCESS [ 0.276 s]
[INFO] Zeppelin: Elasticsearch interpreter ................ FAILURE [ 0.236 s]
---
.../ElasticsearchInterpreter.java | 61 +++++++++----------
1 file changed, 30 insertions(+), 31 deletions(-)
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 549b5f25efd..5ea3265a4ca 100644
--- a/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java
+++ b/elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/ElasticsearchInterpreter.java
@@ -77,29 +77,28 @@ public class ElasticsearchInterpreter extends Interpreter {
private static Logger logger = LoggerFactory.getLogger(ElasticsearchInterpreter.class);
private static final String HELP = "Elasticsearch interpreter:\n"
- + "General format: ///
+
+ org.apache.maven.plugins
+ maven-checkstyle-plugin
+
+ org/apache/zeppelin/scio/avro/*
+
+
+
org.apache.maven.plugins
maven-shade-plugin
From dcbc8871310886550e47aec72a72eee477a7b313 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Thu, 1 Dec 2016 18:43:32 +0900
Subject: [PATCH 17/25] fix: Remove codehause repository errors
by replacing repository urls
see more: https://github.com/travis-ci/travis-ci/issues/4629
---
.travis.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.travis.yml b/.travis.yml
index acad5c92678..3fa4f5a52e3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -78,6 +78,7 @@ matrix:
before_install:
- echo "MAVEN_OPTS='-Xms1024M -Xmx2048M -XX:MaxPermSize=1024m -XX:-UseGCOverheadLimit -Dorg.slf4j.simpleLogger.defaultLogLevel=warn'" >> ~/.mavenrc
+ - sed -i.bak -e 's|https://nexus.codehaus.org/snapshots/|https://oss.sonatype.org/content/repositories/codehaus-snapshots/|g' ~/.m2/settings.xml # travis CI 4629
- ./testing/install_external_dependencies.sh
- ls -la .spark-dist ${HOME}/.m2/repository/.cache/maven-download-plugin || true
- ls .node_modules && cp -r .node_modules zeppelin-web/node_modules || echo "node_modules are not cached"
From 3931b2f13f10a5d7d0da0f55a8e718f1c76d7e52 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Thu, 1 Dec 2016 18:28:01 +0900
Subject: [PATCH 18/25] feat: Add profile for strict checkstyle
---
.travis.yml | 6 +++++-
pom.xml | 17 +++++++++++++++++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 3fa4f5a52e3..aade66ec9aa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -40,7 +40,11 @@ matrix:
- jdk: "oraclejdk7"
env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" PROFILE="-Prat" BUILD_FLAG="clean" TEST_FLAG="org.apache.rat:apache-rat-plugin:check" TEST_PROJECTS=""
- # Test all modules with spark 2.0.2 and scala 2.11
+ # Test checkstyle with spark 2.0.2 and scala 2.11
+ - jdk: "oraclejdk7"
+ env: CHECKSTYLE=1 SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.3" PROFILE="-Pspark-2.0 -Phadoop-2.3 -Ppyspark -Pscala-2.11 -Pscalding -Pbeam -Pgeode -Pexamples" BUILD_FLAG="install -DskipTests -DskipRat -Dcheckstyle.skip=true" TEST_FLAG="validate -Denforcer.skip=true -Pstrict-checkstyle" TEST_PROJECTS=""
+
+ # Test all modules with spark 2.0.1 and scala 2.11
- jdk: "oraclejdk7"
env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" PROFILE="-Pspark-2.0 -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
diff --git a/pom.xml b/pom.xml
index 26267e1eb9b..83b72998433 100644
--- a/pom.xml
+++ b/pom.xml
@@ -761,6 +761,23 @@
+
+ strict-checkstyle
+
+
+
+ org.apache.maven.plugins
+ maven-checkstyle-plugin
+
+ true
+
+
+
+
+
+
+
+
publish-distr
From ecbea0f8a271472552e154e4f18d94e021961fb7 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Fri, 2 Dec 2016 11:56:18 +0900
Subject: [PATCH 19/25] fix: Use package + verify
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index aade66ec9aa..b88c8484150 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,7 +42,7 @@ matrix:
# Test checkstyle with spark 2.0.2 and scala 2.11
- jdk: "oraclejdk7"
- env: CHECKSTYLE=1 SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.3" PROFILE="-Pspark-2.0 -Phadoop-2.3 -Ppyspark -Pscala-2.11 -Pscalding -Pbeam -Pgeode -Pexamples" BUILD_FLAG="install -DskipTests -DskipRat -Dcheckstyle.skip=true" TEST_FLAG="validate -Denforcer.skip=true -Pstrict-checkstyle" TEST_PROJECTS=""
+ env: CHECKSTYLE=1 SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.3" PROFILE="-Pspark-2.0 -Phadoop-2.3 -Ppyspark -Pscala-2.11 -Pscalding -Pbeam -Pgeode -Pexamples" BUILD_FLAG="package -DskipTests -DskipRat -Dcheckstyle.skip=true" TEST_FLAG="verify -DskipTests -Pstrict-checkstyle" TEST_PROJECTS=""
# Test all modules with spark 2.0.1 and scala 2.11
- jdk: "oraclejdk7"
From 28c86cc003f7534c1537882b650582f3e8446cd6 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Fri, 2 Dec 2016 12:13:14 +0900
Subject: [PATCH 20/25] fix: Use -Pstrict-checkstyle only in package
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index b88c8484150..4d4dc3a4204 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,7 +42,7 @@ matrix:
# Test checkstyle with spark 2.0.2 and scala 2.11
- jdk: "oraclejdk7"
- env: CHECKSTYLE=1 SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.3" PROFILE="-Pspark-2.0 -Phadoop-2.3 -Ppyspark -Pscala-2.11 -Pscalding -Pbeam -Pgeode -Pexamples" BUILD_FLAG="package -DskipTests -DskipRat -Dcheckstyle.skip=true" TEST_FLAG="verify -DskipTests -Pstrict-checkstyle" TEST_PROJECTS=""
+ env: CHECKSTYLE=1 SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.3" PROFILE="-Pspark-2.0 -Phadoop-2.3 -Ppyspark -Pscala-2.11 -Pscalding -Pbeam -Pexamples" BUILD_FLAG="package -DskipTests -DskipRat -Pstrict-checkstyle" TEST_FLAG="--version" TEST_PROJECTS=""
# Test all modules with spark 2.0.1 and scala 2.11
- jdk: "oraclejdk7"
From ea5f2592986cfbae388276cd128d408c9c777f99 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Fri, 2 Dec 2016 13:22:34 +0900
Subject: [PATCH 21/25] fix: Skip checkstyle in web, dist modules
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 4d4dc3a4204..88bc0a7462a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,7 +42,7 @@ matrix:
# Test checkstyle with spark 2.0.2 and scala 2.11
- jdk: "oraclejdk7"
- env: CHECKSTYLE=1 SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.3" PROFILE="-Pspark-2.0 -Phadoop-2.3 -Ppyspark -Pscala-2.11 -Pscalding -Pbeam -Pexamples" BUILD_FLAG="package -DskipTests -DskipRat -Pstrict-checkstyle" TEST_FLAG="--version" TEST_PROJECTS=""
+ env: CHECKSTYLE=1 SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.3" PROFILE="-Pspark-2.0 -Phadoop-2.3 -Ppyspark -Pscala-2.11 -Pscalding -Pbeam -Pexamples" BUILD_FLAG="package -pl !zeppelin-web,!zeppelin-distribution -DskipTests -DskipRat -Pstrict-checkstyle" TEST_FLAG="--version" TEST_PROJECTS=""
# Test all modules with spark 2.0.1 and scala 2.11
- jdk: "oraclejdk7"
From e02d29474b04a908cfb7669991d8de9c21be0097 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Fri, 2 Dec 2016 13:47:36 +0900
Subject: [PATCH 22/25] fix: Change maven log option
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 88bc0a7462a..be99f7ab19b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -81,7 +81,7 @@ matrix:
env: SCALA_VER="2.10" $LIVY_VER="0.2.0" SPARK_VER="1.5.2" HADOOP_VER="2.6" PROFILE="-Pspark-1.5 -Phadoop-2.6" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl zeppelin-interpreter,livy -DfailIfNoTests=false"
before_install:
- - echo "MAVEN_OPTS='-Xms1024M -Xmx2048M -XX:MaxPermSize=1024m -XX:-UseGCOverheadLimit -Dorg.slf4j.simpleLogger.defaultLogLevel=warn'" >> ~/.mavenrc
+ - echo "MAVEN_OPTS='-Xms1024M -Xmx2048M -XX:MaxPermSize=1024m -XX:-UseGCOverheadLimit -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'" >> ~/.mavenrc
- sed -i.bak -e 's|https://nexus.codehaus.org/snapshots/|https://oss.sonatype.org/content/repositories/codehaus-snapshots/|g' ~/.m2/settings.xml # travis CI 4629
- ./testing/install_external_dependencies.sh
- ls -la .spark-dist ${HOME}/.m2/repository/.cache/maven-download-plugin || true
From eee30fb47b7c88f7edc3affafbf7cf8b69b7864a Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Fri, 2 Dec 2016 14:18:02 +0900
Subject: [PATCH 23/25] fix: Print WARN log in tests
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index be99f7ab19b..a800aef0737 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,7 +42,7 @@ matrix:
# Test checkstyle with spark 2.0.2 and scala 2.11
- jdk: "oraclejdk7"
- env: CHECKSTYLE=1 SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.3" PROFILE="-Pspark-2.0 -Phadoop-2.3 -Ppyspark -Pscala-2.11 -Pscalding -Pbeam -Pexamples" BUILD_FLAG="package -pl !zeppelin-web,!zeppelin-distribution -DskipTests -DskipRat -Pstrict-checkstyle" TEST_FLAG="--version" TEST_PROJECTS=""
+ env: CHECKSTYLE=1 SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.3" PROFILE="-Pspark-2.0 -Phadoop-2.3 -Ppyspark -Pscala-2.11 -Pscalding -Pbeam -Pexamples" BUILD_FLAG="package -pl !zeppelin-web,!zeppelin-distribution -DskipTests -DskipRat -Pstrict-checkstyle" TEST_FLAG="verify -DskipTests -DskipRat -Pstrict-checkstyle" TEST_PROJECTS=""
# Test all modules with spark 2.0.1 and scala 2.11
- jdk: "oraclejdk7"
From b60f96efc916d1c76f0f67ff7bc3e9d434b60a55 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Sun, 4 Dec 2016 11:20:24 +0900
Subject: [PATCH 24/25] fix: Add loose-checkstyle profile
---
.travis.yml | 22 +++++++++++-----------
pom.xml | 9 +++++----
2 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index a800aef0737..a8002cd845e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,43 +42,43 @@ matrix:
# Test checkstyle with spark 2.0.2 and scala 2.11
- jdk: "oraclejdk7"
- env: CHECKSTYLE=1 SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.3" PROFILE="-Pspark-2.0 -Phadoop-2.3 -Ppyspark -Pscala-2.11 -Pscalding -Pbeam -Pexamples" BUILD_FLAG="package -pl !zeppelin-web,!zeppelin-distribution -DskipTests -DskipRat -Pstrict-checkstyle" TEST_FLAG="verify -DskipTests -DskipRat -Pstrict-checkstyle" TEST_PROJECTS=""
+ env: CHECKSTYLE=1 SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.3" PROFILE="-Pspark-2.0 -Phadoop-2.3 -Ppyspark -Pscala-2.11 -Pscalding -Pbeam -Pexamples" BUILD_FLAG="package -pl !zeppelin-web,!zeppelin-distribution -DskipTests -DskipRat" TEST_FLAG="verify -DskipTests -DskipRat" TEST_PROJECTS=""
- # Test all modules with spark 2.0.1 and scala 2.11
+ # Test all modules with spark 2.0.2 and scala 2.11
- jdk: "oraclejdk7"
- env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" PROFILE="-Pspark-2.0 -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
+ env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" PROFILE="-Pspark-2.0 -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat -Ploose-checkstyle" TEST_FLAG="verify -Pusing-packaged-distr -DskipRat -Ploose-checkstyle" TEST_PROJECTS=""
# Test all modules with scala 2.10
- jdk: "oraclejdk7"
- env: SCALA_VER="2.10" SPARK_VER="1.6.3" HADOOP_VER="2.6" PROFILE="-Pspark-1.6 -Pr -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Pbeam -Pexamples -Pscala-2.10" BUILD_FLAG="package -Pbuild-distr -DskipRat" TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
+ env: SCALA_VER="2.10" SPARK_VER="1.6.3" HADOOP_VER="2.6" PROFILE="-Pspark-1.6 -Pr -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Pbeam -Pexamples -Pscala-2.10" BUILD_FLAG="package -Pbuild-distr -DskipRat -Ploose-checkstyle" TEST_FLAG="verify -Pusing-packaged-distr -DskipRat -Ploose-checkstyle" TEST_PROJECTS=""
# Test all modules with scala 2.11
- jdk: "oraclejdk7"
- env: SCALA_VER="2.11" SPARK_VER="1.6.3" HADOOP_VER="2.6" PROFILE="-Pspark-1.6 -Pr -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
+ env: SCALA_VER="2.11" SPARK_VER="1.6.3" HADOOP_VER="2.6" PROFILE="-Pspark-1.6 -Pr -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat -Ploose-checkstyle" TEST_FLAG="verify -Pusing-packaged-distr -DskipRat -Ploose-checkstyle" TEST_PROJECTS=""
# Test spark module for 1.5.2
- jdk: "oraclejdk7"
- env: SCALA_VER="2.10" SPARK_VER="1.5.2" HADOOP_VER="2.6" PROFILE="-Pspark-1.5 -Pr -Phadoop-2.6 -Ppyspark -Psparkr" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark,r -Dtest=org.apache.zeppelin.rest.*Test,org.apache.zeppelin.spark.* -DfailIfNoTests=false"
+ env: SCALA_VER="2.10" SPARK_VER="1.5.2" HADOOP_VER="2.6" PROFILE="-Pspark-1.5 -Pr -Phadoop-2.6 -Ppyspark -Psparkr" BUILD_FLAG="package -DskipTests -DskipRat -Ploose-checkstyle" TEST_FLAG="verify -DskipRat -Ploose-checkstyle" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark,r -Dtest=org.apache.zeppelin.rest.*Test,org.apache.zeppelin.spark.* -DfailIfNoTests=false"
# Test spark module for 1.4.1
- jdk: "oraclejdk7"
- env: SCALA_VER="2.10" SPARK_VER="1.4.1" HADOOP_VER="2.6" PROFILE="-Pspark-1.4 -Pr -Phadoop-2.6 -Ppyspark -Psparkr" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark,r -Dtest=org.apache.zeppelin.rest.*Test,org.apache.zeppelin.spark.* -DfailIfNoTests=false"
+ env: SCALA_VER="2.10" SPARK_VER="1.4.1" HADOOP_VER="2.6" PROFILE="-Pspark-1.4 -Pr -Phadoop-2.6 -Ppyspark -Psparkr" BUILD_FLAG="package -DskipTests -DskipRat -Ploose-checkstyle" TEST_FLAG="verify -DskipRat -Ploose-checkstyle" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark,r -Dtest=org.apache.zeppelin.rest.*Test,org.apache.zeppelin.spark.* -DfailIfNoTests=false"
# Test selenium with spark module for 1.6.3
- jdk: "oraclejdk7"
- env: TEST_SELENIUM="true" SCALA_VER="2.10" SPARK_VER="1.6.3" HADOOP_VER="2.6" PROFILE="-Pspark-1.6 -Phadoop-2.6 -Ppyspark -Pexamples" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark -Dtest=org.apache.zeppelin.AbstractFunctionalSuite -DfailIfNoTests=false"
+ env: TEST_SELENIUM="true" SCALA_VER="2.10" SPARK_VER="1.6.3" HADOOP_VER="2.6" PROFILE="-Pspark-1.6 -Phadoop-2.6 -Ppyspark -Pexamples" BUILD_FLAG="package -DskipTests -DskipRat -Ploose-checkstyle" TEST_FLAG="verify -DskipRat -Ploose-checkstyle" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark -Dtest=org.apache.zeppelin.AbstractFunctionalSuite -DfailIfNoTests=false"
# Test python/pyspark with python 2
- jdk: "oraclejdk7"
- env: PYTHON="2" SCALA_VER="2.10" SPARK_VER="1.6.1" HADOOP_VER="2.6" PROFILE="-Pspark-1.6 -Phadoop-2.6 -Ppyspark" BUILD_FLAG="package -pl spark,python -am -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-display,spark-dependencies,spark,python -Dtest=org.apache.zeppelin.spark.PySpark*Test,org.apache.zeppelin.python.* -Dpyspark.test.exclude='' -DfailIfNoTests=false"
+ env: PYTHON="2" SCALA_VER="2.10" SPARK_VER="1.6.1" HADOOP_VER="2.6" PROFILE="-Pspark-1.6 -Phadoop-2.6 -Ppyspark" BUILD_FLAG="package -pl spark,python -am -DskipTests -DskipRat -Ploose-checkstyle" TEST_FLAG="verify -DskipRat -Ploose-checkstyle" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-display,spark-dependencies,spark,python -Dtest=org.apache.zeppelin.spark.PySpark*Test,org.apache.zeppelin.python.* -Dpyspark.test.exclude='' -DfailIfNoTests=false"
# Test python/pyspark with python 3
- jdk: "oraclejdk7"
- env: PYTHON="3" SCALA_VER="2.11" SPARK_VER="2.0.0" HADOOP_VER="2.6" PROFILE="-Pspark-2.0 -Phadoop-2.6 -Ppyspark -Pscala-2.11" BUILD_FLAG="package -pl spark,python -am -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-display,spark-dependencies,spark,python -Dtest=org.apache.zeppelin.spark.PySpark*Test,org.apache.zeppelin.python.* -Dpyspark.test.exclude='' -DfailIfNoTests=false"
+ env: PYTHON="3" SCALA_VER="2.11" SPARK_VER="2.0.0" HADOOP_VER="2.6" PROFILE="-Pspark-2.0 -Phadoop-2.6 -Ppyspark -Pscala-2.11" BUILD_FLAG="package -pl spark,python -am -DskipTests -DskipRat -Ploose-checkstyle" TEST_FLAG="verify -DskipRat -Ploose-checkstyle" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-display,spark-dependencies,spark,python -Dtest=org.apache.zeppelin.spark.PySpark*Test,org.apache.zeppelin.python.* -Dpyspark.test.exclude='' -DfailIfNoTests=false"
# Test livy with spark 1.5.2 and hadoop 2.6
- jdk: "oraclejdk7"
- env: SCALA_VER="2.10" $LIVY_VER="0.2.0" SPARK_VER="1.5.2" HADOOP_VER="2.6" PROFILE="-Pspark-1.5 -Phadoop-2.6" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl zeppelin-interpreter,livy -DfailIfNoTests=false"
+ env: SCALA_VER="2.10" $LIVY_VER="0.2.0" SPARK_VER="1.5.2" HADOOP_VER="2.6" PROFILE="-Pspark-1.5 -Phadoop-2.6" BUILD_FLAG="package -DskipTests -DskipRat -Ploose-checkstyle" TEST_FLAG="verify -DskipRat -Ploose-checkstyle" TEST_PROJECTS="-pl zeppelin-interpreter,livy -DfailIfNoTests=false"
before_install:
- echo "MAVEN_OPTS='-Xms1024M -Xmx2048M -XX:MaxPermSize=1024m -XX:-UseGCOverheadLimit -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'" >> ~/.mavenrc
diff --git a/pom.xml b/pom.xml
index 83b72998433..70626f14d6b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -487,6 +487,9 @@
_tools/checkstyle.xml
false
+ true
+
+
@@ -762,16 +765,14 @@
- strict-checkstyle
+ loose-checkstyle
org.apache.maven.plugins
maven-checkstyle-plugin
- true
-
-
+ false
From 66f30055b31c319021136111c3639d74cb4e62b4 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Tue, 13 Dec 2016 13:49:46 +0900
Subject: [PATCH 25/25] fix: Remove checkstyle profile
---
.travis.yml | 4 ----
1 file changed, 4 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index a8002cd845e..5df2369a38b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -40,10 +40,6 @@ matrix:
- jdk: "oraclejdk7"
env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" PROFILE="-Prat" BUILD_FLAG="clean" TEST_FLAG="org.apache.rat:apache-rat-plugin:check" TEST_PROJECTS=""
- # Test checkstyle with spark 2.0.2 and scala 2.11
- - jdk: "oraclejdk7"
- env: CHECKSTYLE=1 SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.3" PROFILE="-Pspark-2.0 -Phadoop-2.3 -Ppyspark -Pscala-2.11 -Pscalding -Pbeam -Pexamples" BUILD_FLAG="package -pl !zeppelin-web,!zeppelin-distribution -DskipTests -DskipRat" TEST_FLAG="verify -DskipTests -DskipRat" TEST_PROJECTS=""
-
# Test all modules with spark 2.0.2 and scala 2.11
- jdk: "oraclejdk7"
env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" PROFILE="-Pspark-2.0 -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat -Ploose-checkstyle" TEST_FLAG="verify -Pusing-packaged-distr -DskipRat -Ploose-checkstyle" TEST_PROJECTS=""