You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@metron.apache.org by ni...@apache.org on 2019/08/23 17:38:15 UTC
[metron] branch feature/METRON-2088-support-hdp-3.1 updated:
METRON-2224 Upgrade to Zeppelin 0.8.0 (merrimanr via nickwallen) closes
apache/metron#1491
This is an automated email from the ASF dual-hosted git repository.
nickallen pushed a commit to branch feature/METRON-2088-support-hdp-3.1
in repository https://gitbox.apache.org/repos/asf/metron.git
The following commit(s) were added to refs/heads/feature/METRON-2088-support-hdp-3.1 by this push:
new 1a41a2c METRON-2224 Upgrade to Zeppelin 0.8.0 (merrimanr via nickwallen) closes apache/metron#1491
1a41a2c is described below
commit 1a41a2cf1bd394cdf15eb83e3a182b4e1addaff5
Author: merrimanr <me...@gmail.com>
AuthorDate: Fri Aug 23 13:37:21 2019 -0400
METRON-2224 Upgrade to Zeppelin 0.8.0 (merrimanr via nickwallen) closes apache/metron#1491
---
dependencies_with_url.csv | 5 +++++
metron-stellar/stellar-zeppelin/README.md | 7 ++++---
metron-stellar/stellar-zeppelin/pom.xml | 2 +-
.../apache/metron/stellar/zeppelin/StellarInterpreter.java | 11 +++++++----
.../metron/stellar/zeppelin/StellarInterpreterTest.java | 9 +++++----
pom.xml | 3 +++
6 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/dependencies_with_url.csv b/dependencies_with_url.csv
index 04f7935..0065f9b 100644
--- a/dependencies_with_url.csv
+++ b/dependencies_with_url.csv
@@ -50,6 +50,7 @@ javax.xml.bind:jaxb-api:jar:2.2.2:compile,CDDL,https://jaxb.dev.java.net/
javax.xml.bind:jaxb-api:jar:2.3.0:compile,CDDL,https://jaxb.dev.java.net/
javax.xml.stream:stax-api:jar:1.0-2:compile,COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0,https://docs.oracle.com/javase/7/docs/api/javax/xml/stream/package-summary.html
jline:jline:jar:0.9.94:compile,BSD,http://jline.sourceforge.net
+jline:jline:jar:2.12.1:compile,BSD,http://jline.sourceforge.net
junit:junit:jar:4.12:compile,Eclipse Public License 1.0,http://junit.org
junit:junit:jar:4.4:compile,Common Public License Version 1.0,http://junit.org
net.razorvine:pyrolite:jar:4.13:compile,MIT,https://github.com/irmen/Pyrolite
@@ -61,6 +62,7 @@ org.abego.treelayout:org.abego.treelayout.core:jar:1.0.1:compile,BSD 3-Clause "N
org.adrianwalker:multiline-string:jar:0.1.2:compile,Common Public License Version 1.0,https://github.com/benelog/multiline
org.antlr:antlr4-runtime:jar:4.5:compile,BSD 3-Clause License,http://www.antlr.org
org.bouncycastle:bcprov-jdk15on:jar:1.52:compile,MIT,https://www.bouncycastle.org/license.html
+org.bouncycastle:bcpkix-jdk15on:jar:1.52:compile,MIT,https://www.bouncycastle.org/license.html
org.clojure:clojure:jar:1.6.0:compile,Eclipse Public License 1.0,http://clojure.org/
org.clojure:clojure:jar:1.7.0:compile,Eclipse Public License 1.0,http://clojure.org/
org.codehaus.jackson:jackson-jaxrs:jar:1.8.3:compile,Apache v2,http://jackson.codehaus.org
@@ -185,6 +187,7 @@ com.fasterxml:classmate:jar:1.3.4:compile,ASLv2,http://github.com/cowtowncoder/j
com.google.code.gson:gson:jar:2.2.2:compile,The Apache Software License, Version 2.0,http://code.google.com/p/google-gson/
com.google.code.gson:gson:jar:2.2.4:compile,The Apache Software License, Version 2.0,http://code.google.com/p/google-gson/
com.google.code.gson:gson:jar:2.7:compile,The Apache Software License, Version 2.0,http://code.google.com/p/google-gson/
+com.google.code.gson:gson:jar:2.8.5:compile,The Apache Software License, Version 2.0,http://code.google.com/p/google-gson/
com.google.guava:guava:jar:11.0.2:compile,ASLv2,
com.google.guava:guava:jar:12.0.1:compile,ASLv2,
com.google.guava:guava:jar:12.0:compile,ASLv2,
@@ -224,6 +227,7 @@ commons-collections:commons-collections:jar:3.2.1:compile,ASLv2,http://commons.a
commons-collections:commons-collections:jar:3.2.2:compile,ASLv2,http://commons.apache.org/collections/
commons-configuration:commons-configuration:jar:1.10:compile,ASLv2,http://commons.apache.org/configuration/
commons-configuration:commons-configuration:jar:1.6:compile,The Apache Software License, Version 2.0,http://commons.apache.org/${pom.artifactId.substring(8)}/
+commons-configuration:commons-configuration:jar:1.9:compile,The Apache Software License, Version 2.0,http://commons.apache.org/${pom.artifactId.substring(8)}/
commons-daemon:commons-daemon:jar:1.0.13:compile,ASLv2,http://commons.apache.org/daemon/
commons-digester:commons-digester:jar:1.8.1:compile,ASLv2,http://commons.apache.org/digester/
commons-digester:commons-digester:jar:1.8:compile,The Apache Software License, Version 2.0,http://jakarta.apache.org/commons/digester/
@@ -504,3 +508,4 @@ org.elasticsearch:securesm:jar:1.2:compile
com.github.stephenc.jcip:jcip-annotations:jar:1.0-1:compile,ASLv2,http://stephenc.github.io/jcip-annotations/
com.nimbusds:nimbus-jose-jwt:jar:4.41.2:compile,ASLv2,https://bitbucket.org/connect2id/nimbus-jose-jwt/wiki/Home
tomcat:jasper-compiler:jar:5.5.23:compile,ASLv2,https://tomcat.apache.org/
+org.danilopianini:gson-extras:jar:0.2.1:compile,ASLv2,https://github.com/DanySK/gson-extras
diff --git a/metron-stellar/stellar-zeppelin/README.md b/metron-stellar/stellar-zeppelin/README.md
index 63a8a5f..9656af5 100644
--- a/metron-stellar/stellar-zeppelin/README.md
+++ b/metron-stellar/stellar-zeppelin/README.md
@@ -29,9 +29,9 @@ Stellar Interpreter for Apache Zeppelin
Prerequisites
-------------
-* [Apache Zeppelin](https://zeppelin.apache.org/) 0.7.3
+* [Apache Zeppelin](https://zeppelin.apache.org/) 0.8.0
- This is tested with version 0.7.3. Other versions may work, but are not supported.
+ This is tested with version 0.8.0. Other versions may work, but are not supported.
Installation
@@ -64,7 +64,8 @@ To install the Stellar Interpreter in your Apache Zeppelin installation, follow
**Note:** The above command will download maven artifact groupId1:artifact1:version1 (org.apache.metron:stellar-zeppelin:0.7.2) and all of its transitive dependencies into the $ZEPPELIN_HOME/interpreter/stellar directory. `stellar-common`, which contains many of the [Stellar Core Functions](../stellar-common#stellar-core-functions), will be included transitively because `stellar-zeppelin` declares it as a direct dependency in its Maven pom.xml.
- * [3rd Party Zeppelin Interpreter Installation Documentation](https://zeppelin.apache.org/docs/0.7.3/manual/interpreterinstallation.html#3rd-party-interpreters)
+ * [3rd Party Zeppelin Interpreter Installation Documentation](http://zeppelin.apache.org/docs/0.8.0/usage/interpreter/installation.html#3rd-party-interpreters)
+ * Apache Zeppelin provides Interpreter Installation mechanism for whom downloaded Zeppelin netinst binary package, or just want to install another 3rd party interpreters.
1. Start Zeppelin.
diff --git a/metron-stellar/stellar-zeppelin/pom.xml b/metron-stellar/stellar-zeppelin/pom.xml
index e9731b5..6ce6804 100644
--- a/metron-stellar/stellar-zeppelin/pom.xml
+++ b/metron-stellar/stellar-zeppelin/pom.xml
@@ -27,7 +27,7 @@
<dependency>
<groupId>org.apache.zeppelin</groupId>
<artifactId>zeppelin-interpreter</artifactId>
- <version>0.7.3</version>
+ <version>${global_zeppelin_version}</version>
</dependency>
<dependency>
<groupId>org.apache.metron</groupId>
diff --git a/metron-stellar/stellar-zeppelin/src/main/java/org/apache/metron/stellar/zeppelin/StellarInterpreter.java b/metron-stellar/stellar-zeppelin/src/main/java/org/apache/metron/stellar/zeppelin/StellarInterpreter.java
index 5a7a175..00bca04 100644
--- a/metron-stellar/stellar-zeppelin/src/main/java/org/apache/metron/stellar/zeppelin/StellarInterpreter.java
+++ b/metron-stellar/stellar-zeppelin/src/main/java/org/apache/metron/stellar/zeppelin/StellarInterpreter.java
@@ -26,6 +26,7 @@ import org.apache.metron.stellar.common.shell.StellarResult;
import org.apache.metron.stellar.common.shell.StellarShellExecutor;
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;
import org.slf4j.Logger;
@@ -74,7 +75,7 @@ public class StellarInterpreter extends Interpreter {
this.autoCompleter = new DefaultStellarAutoCompleter();
// create the stellar executor
- Properties props = getProperty();
+ Properties props = getProperties();
this.executor = createExecutor(props);
} catch (Exception e) {
@@ -161,12 +162,14 @@ public class StellarInterpreter extends Interpreter {
}
@Override
- public List<InterpreterCompletion> completion(String buf, int cursor) {
-
+ public List<InterpreterCompletion> completion(String buf, int cursor, InterpreterContext interpreterContext) throws InterpreterException {
// use the autoCompleter to return a list of completes to Zeppelin
List<InterpreterCompletion> completes = new ArrayList<>();
for(String candidate : autoCompleter.autoComplete(buf)) {
- completes.add(new InterpreterCompletion(candidate, candidate));
+ InterpreterCompletion interpreterCompletion = new InterpreterCompletion();
+ interpreterCompletion.setName(candidate);
+ interpreterCompletion.setValue(candidate);
+ completes.add(interpreterCompletion);
}
return completes;
diff --git a/metron-stellar/stellar-zeppelin/src/test/java/org/apache/metron/stellar/zeppelin/StellarInterpreterTest.java b/metron-stellar/stellar-zeppelin/src/test/java/org/apache/metron/stellar/zeppelin/StellarInterpreterTest.java
index c817747..24c7900 100644
--- a/metron-stellar/stellar-zeppelin/src/test/java/org/apache/metron/stellar/zeppelin/StellarInterpreterTest.java
+++ b/metron-stellar/stellar-zeppelin/src/test/java/org/apache/metron/stellar/zeppelin/StellarInterpreterTest.java
@@ -22,6 +22,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.metron.stellar.common.shell.VariableResult;
import org.apache.metron.stellar.dsl.Context;
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.thrift.InterpreterCompletion;
@@ -151,7 +152,7 @@ public class StellarInterpreterTest {
* The interpreter should support auto-completion.
*/
@Test
- public void testAutoCompletion() {
+ public void testAutoCompletion() throws InterpreterException {
// the user's input that needs auto-completed
final String buffer = "TO_";
@@ -159,7 +160,7 @@ public class StellarInterpreterTest {
// the cursor is at the end of the buffer
int cursor = buffer.length();
- List<InterpreterCompletion> completions = interpreter.completion(buffer, cursor);
+ List<InterpreterCompletion> completions = interpreter.completion(buffer, cursor, context);
// expect some completions to be offered
assertTrue(completions.size() > 0);
@@ -182,7 +183,7 @@ public class StellarInterpreterTest {
* What happens when we have nothing useful to auto-complete?
*/
@Test
- public void testAutoCompletionWithNoCompletions() {
+ public void testAutoCompletionWithNoCompletions() throws InterpreterException {
// the user's input that needs auto-completed
final String buffer = "NOTHING_AUTOCOMPLETES_THIS_";
@@ -191,7 +192,7 @@ public class StellarInterpreterTest {
int cursor = buffer.length();
// perform auto-completion
- List<InterpreterCompletion> completions = interpreter.completion(buffer, cursor);
+ List<InterpreterCompletion> completions = interpreter.completion(buffer, cursor, context);
// expect no completions
assertEquals(0, completions.size());
diff --git a/pom.xml b/pom.xml
index f8c56ac..f4e8856 100644
--- a/pom.xml
+++ b/pom.xml
@@ -143,6 +143,7 @@
<hdp_version>3.1.0.0</hdp_version>
<global_hbase_version>2.0.2</global_hbase_version>
<global_hbase_guava_version>17.0</global_hbase_guava_version>
+ <global_zeppelin_version>0.8.0</global_zeppelin_version>
</properties>
</profile>
<profile>
@@ -154,6 +155,7 @@
<hdp_version>2.6.5.0</hdp_version>
<global_hbase_version>1.1.1</global_hbase_version>
<global_hbase_guava_version>12.0</global_hbase_guava_version>
+ <global_zeppelin_version>0.8.0</global_zeppelin_version>
</properties>
</profile>
<profile>
@@ -166,6 +168,7 @@
<global_kafka_version>${base_kafka_version}.${hdp_version}-${build_number}</global_kafka_version>
<global_hbase_version>1.1.1</global_hbase_version>
<global_hbase_guava_version>12.0</global_hbase_guava_version>
+ <global_zeppelin_version>0.8.0</global_zeppelin_version>
</properties>
</profile>
</profiles>