-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ZEPPELIN-1046] bin/install-interpreter.sh for netinst package #1042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
38e2556
Initial implementation of install-interpreter.sh
Leemoonsoo 47f5706
Install multiple interpreters at once
Leemoonsoo 78a7c52
Refactor and add test
Leemoonsoo 2c81a3f
update
Leemoonsoo ec7d152
add tip
Leemoonsoo 1b558fd
update some text
Leemoonsoo 49f0568
Add conf/interpreter-list
Leemoonsoo 7b1b36a
update usage
Leemoonsoo 6ee06b8
Make DependencyResolver in zeppelin-interpreter module not aware of Z…
Leemoonsoo d547551
Remove test entries
Leemoonsoo aebca17
Add docs
Leemoonsoo 1077296
update test
Leemoonsoo 9079580
fix artifact name
Leemoonsoo 4c1f029
Proxy support
Leemoonsoo 13899fb
Reorganize interpreter installation docs
AhyoungRyu 5d0a971
Revert install.md to latest version
AhyoungRyu 03c664e
Add a new line
AhyoungRyu 13f2d04
generate netinst package
Leemoonsoo 0eedd2a
Address @minahlee feedback
AhyoungRyu 7e749ad
Address mina's comment
Leemoonsoo 7307c67
Merge remote-tracking branch 'AhyoungRyu/netinst-docs' into netinst
Leemoonsoo 049bc89
Update docs
Leemoonsoo f81d16e
address mina's comment
Leemoonsoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| #!/bin/bash | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # Run Zeppelin | ||
| # | ||
|
|
||
| bin=$(dirname "${BASH_SOURCE-$0}") | ||
| bin=$(cd "${bin}">/dev/null; pwd) | ||
|
|
||
| . "${bin}/common.sh" | ||
|
|
||
|
|
||
| ZEPPELIN_INSTALL_INTERPRETER_MAIN=org.apache.zeppelin.interpreter.install.InstallInterpreter | ||
| ZEPPELIN_LOGFILE="${ZEPPELIN_LOG_DIR}/install-interpreter.log" | ||
| JAVA_OPTS+=" -Dzeppelin.log.file=${ZEPPELIN_LOGFILE}" | ||
|
|
||
| if [[ -d "${ZEPPELIN_HOME}/zeppelin-zengine/target/classes" ]]; then | ||
| ZEPPELIN_CLASSPATH+=":${ZEPPELIN_HOME}/zeppelin-zengine/target/classes" | ||
| fi | ||
| addJarInDir "${ZEPPELIN_HOME}/zeppelin-server/target/lib" | ||
|
|
||
| if [[ -d "${ZEPPELIN_HOME}/zeppelin-interpreter/target/classes" ]]; then | ||
| ZEPPELIN_CLASSPATH+=":${ZEPPELIN_HOME}/zeppelin-interpreter/target/classes" | ||
| fi | ||
| addJarInDir "${ZEPPELIN_HOME}/zeppelin-interpreter/target/lib" | ||
|
|
||
| addJarInDir "${ZEPPELIN_HOME}/lib" | ||
|
|
||
| CLASSPATH+=":${ZEPPELIN_CLASSPATH}" | ||
| $ZEPPELIN_RUNNER $JAVA_OPTS -cp $CLASSPATH $ZEPPELIN_INSTALL_INTERPRETER_MAIN ${@} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # | ||
| # [name] [maven artifact] [description] | ||
|
|
||
| alluxio org.apache.zeppelin:zeppelin-alluxio:0.6.0 Alluxio interpreter | ||
| angular org.apache.zeppelin:zeppelin-angular:0.6.0 HTML and AngularJS view rendering | ||
| cassandra org.apache.zeppelin:zeppelin-cassandra:0.6.0 Cassandra interpreter | ||
| elasticsearch org.apache.zeppelin:zeppelin-elasticsearch:0.6.0 Elasticsearch interpreter | ||
| file org.apache.zeppelin:zeppelin-file:0.6.0 HDFS file interpreter | ||
| flink org.apache.zeppelin:zeppelin-flink:0.6.0 Flink interpreter | ||
| hbase org.apache.zeppelin:zeppelin-hbase:0.6.0 Hbase interpreter | ||
| ignite org.apache.zeppelin:zeppelin-ignite:0.6.0 Ignite interpreter | ||
| jdbc org.apache.zeppelin:zeppelin-jdbc:0.6.0 Jdbc interpreter | ||
| kylin org.apache.zeppelin:zeppelin-kylin:0.6.0 Kylin interpreter | ||
| lens org.apache.zeppelin:zeppelin-lens:0.6.0 Lens interpreter | ||
| livy org.apache.zeppelin:zeppelin-livy:0.6.0 Livy interpreter | ||
| md org.apache.zeppelin:zeppelin-markdown:0.6.0 Markdown support | ||
| postgresql org.apache.zeppelin:zeppelin-postgresql:0.6.0 Postgresql interpreter | ||
| python org.apache.zeppelin:zeppelin-python:0.6.0 Python interpreter | ||
| shell org.apache.zeppelin:zeppelin-shell:0.6.0 Shell command |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,164 @@ | ||
| --- | ||
| layout: page | ||
| title: "Interpreter Installation" | ||
| description: "" | ||
| group: manual | ||
| --- | ||
| <!-- | ||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| --> | ||
| {% include JB/setup %} | ||
|
|
||
| # Interpreter Installation | ||
|
|
||
| Apache Zeppelin provides **Interpreter Installation** mechanism for whom downloaded Zeppelin `netinst` binary package, or just want to install another 3rd party interpreters. | ||
|
|
||
| ## Community managed interpreters | ||
| Apache Zeppelin provides several interpreters as [community managed interpreters](#available-community-managed-interpreters). | ||
| If you downloaded `netinst` binary package, you need to install by using below commands. | ||
|
|
||
| #### Install all community managed interpreters | ||
|
|
||
| ``` | ||
| ./bin/install-interpreter.sh --all | ||
| ``` | ||
|
|
||
| #### Install specific interpreters | ||
|
|
||
| ``` | ||
| ./bin/install-interpreter.sh --name md,shell,jdbc,python | ||
| ``` | ||
|
|
||
| You can get full list of community managed interpreters by running | ||
|
|
||
| ``` | ||
| ./bin/install-interpreter.sh --list | ||
| ``` | ||
|
|
||
| Once you have installed interpreters, you need to restart Zeppelin. And then [create interpreter setting](../manual/interpreters.html#what-is-zeppelin-interpreter) and [bind it with your notebook](../manual/interpreters.html#what-is-zeppelin-interpreter-setting). | ||
|
|
||
|
|
||
| ## 3rd party interpreters | ||
|
|
||
| You can also install 3rd party interpreters located in the maven repository by using below commands. | ||
|
|
||
| #### Install 3rd party interpreters | ||
|
|
||
| ``` | ||
| ./bin/install-interpreter.sh --name interpreter1 --artifact groupId1:artifact1:version1 | ||
| ``` | ||
|
|
||
| The above command will download maven artifact `groupId1:artifact1:version1` and all of it's transitive dependencies into `interpreter/interpreter1` directory. | ||
|
|
||
| Once you have installed interpreters, you'll need to add interpreter class name into `zeppelin.interpreters` property in [configuration](../install/install.html#apache-zeppelin-configuration). | ||
| And then restart Zeppelin, [create interpreter setting](../manual/interpreters.html#what-is-zeppelin-interpreter) and [bind it with your notebook](../manual/interpreters.html#what-is-zeppelin-interpreter-setting). | ||
|
|
||
|
|
||
| #### Install multiple 3rd party interpreters at once | ||
|
|
||
| ``` | ||
| ./bin/install-interpreter.sh --name interpreter1,interpreter2 --artifact groupId1:artifact1:version1,groupId2:artifact2:version2 | ||
| ``` | ||
|
|
||
| `--name` and `--artifact` arguments will recieve comma separated list. | ||
|
|
||
| ## Available community managed interpreters | ||
|
|
||
| You can also find the below community managed interpreter list in `conf/interpreter-list` file. | ||
| <table class="table-configuration"> | ||
| <tr> | ||
| <th>Name</th> | ||
| <th>Maven Artifact</th> | ||
| <th>Description</th> | ||
| </tr> | ||
| <tr> | ||
| <td>alluxio</td> | ||
| <td>org.apache.zeppelin:zeppelin-alluxio:0.6.0</td> | ||
| <td>Alluxio interpreter</td> | ||
| </tr> | ||
| <tr> | ||
| <td>angular</td> | ||
| <td>org.apache.zeppelin:zeppelin-angular:0.6.0</td> | ||
| <td>HTML and AngularJS view rendering</td> | ||
| </tr> | ||
| <tr> | ||
| <td>cassandra</td> | ||
| <td>org.apache.zeppelin:zeppelin-cassandra:0.6.0</td> | ||
| <td>Cassandra interpreter</td> | ||
| </tr> | ||
| <tr> | ||
| <td>elasticsearch</td> | ||
| <td>org.apache.zeppelin:zeppelin-elasticsearch:0.6.0</td> | ||
| <td>Elasticsearch interpreter</td> | ||
| </tr> | ||
| <tr> | ||
| <td>file</td> | ||
| <td>org.apache.zeppelin:zeppelin-file:0.6.0</td> | ||
| <td>HDFS file interpreter</td> | ||
| </tr> | ||
| <tr> | ||
| <td>flink</td> | ||
| <td>org.apache.zeppelin:zeppelin-flink:0.6.0</td> | ||
| <td>Flink interpreter</td> | ||
| </tr> | ||
| <tr> | ||
| <td>hbase</td> | ||
| <td>org.apache.zeppelin:zeppelin-hbase:0.6.0</td> | ||
| <td>Hbase interpreter</td> | ||
| </tr> | ||
| <tr> | ||
| <td>ignite</td> | ||
| <td>org.apache.zeppelin:zeppelin-ignite:0.6.0</td> | ||
| <td>Ignite interpreter</td> | ||
| </tr> | ||
| <tr> | ||
| <td>jdbc</td> | ||
| <td>org.apache.zeppelin:zeppelin-jdbc:0.6.0</td> | ||
| <td>Jdbc interpreter</td> | ||
| </tr> | ||
| <tr> | ||
| <td>kylin</td> | ||
| <td>org.apache.zeppelin:zeppelin-kylin:0.6.0</td> | ||
| <td>Kylin interpreter</td> | ||
| </tr> | ||
| <tr> | ||
| <td>lens</td> | ||
| <td>org.apache.zeppelin:zeppelin-lens:0.6.0</td> | ||
| <td>Lens interpreter</td> | ||
| </tr> | ||
| <tr> | ||
| <td>livy</td> | ||
| <td>org.apache.zeppelin:zeppelin-livy:0.6.0</td> | ||
| <td>Livy interpreter</td> | ||
| </tr> | ||
| <tr> | ||
| <td>md</td> | ||
| <td>org.apache.zeppelin:zeppelin-markdown:0.6.0</td> | ||
| <td>Markdown support</td> | ||
| </tr> | ||
| <tr> | ||
| <td>postgresql</td> | ||
| <td>org.apache.zeppelin:zeppelin-postgresql:0.6.0</td> | ||
| <td>Postgresql interpreter</td> | ||
| </tr> | ||
| <tr> | ||
| <td>python</td> | ||
| <td>org.apache.zeppelin:zeppelin-python:0.6.0</td> | ||
| <td>Python interpreter</td> | ||
| </tr> | ||
| <tr> | ||
| <td>shell</td> | ||
| <td>org.apache.zeppelin:zeppelin-shell:0.6.0</td> | ||
| <td>Shell command</td> | ||
| </tr> | ||
| </table> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ | |
|
|
||
| import java.io.File; | ||
| import java.io.IOException; | ||
| import java.net.URL; | ||
| import java.util.Arrays; | ||
| import java.util.Collection; | ||
| import java.util.Iterator; | ||
|
|
@@ -63,11 +64,6 @@ public List<File> load(String artifact) | |
| return load(artifact, new LinkedList<String>()); | ||
| } | ||
|
|
||
| public List<File> load(String artifact, String destPath) | ||
| throws RepositoryException, IOException { | ||
| return load(artifact, new LinkedList<String>(), destPath); | ||
| } | ||
|
|
||
| public synchronized List<File> load(String artifact, Collection<String> excludes) | ||
| throws RepositoryException, IOException { | ||
| if (StringUtils.isBlank(artifact)) { | ||
|
|
@@ -85,25 +81,20 @@ public synchronized List<File> load(String artifact, Collection<String> excludes | |
| return libs; | ||
| } | ||
| } | ||
|
|
||
| public List<File> load(String artifact, Collection<String> excludes, String destPath) | ||
|
|
||
| public List<File> load(String artifact, File destPath) throws IOException, RepositoryException { | ||
| return load(artifact, new LinkedList<String>(), destPath); | ||
| } | ||
|
|
||
| public List<File> load(String artifact, Collection<String> excludes, File destPath) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
| throws RepositoryException, IOException { | ||
| List<File> libs = new LinkedList<File>(); | ||
|
|
||
| if (StringUtils.isNotBlank(artifact)) { | ||
| libs = load(artifact, excludes); | ||
|
|
||
| // find home dir | ||
| String home = System.getenv("ZEPPELIN_HOME"); | ||
| if (home == null) { | ||
| home = System.getProperty("zeppelin.home"); | ||
| } | ||
| if (home == null) { | ||
| home = ".."; | ||
| } | ||
|
|
||
| for (File srcFile : libs) { | ||
| File destFile = new File(home + "/" + destPath, srcFile.getName()); | ||
| File destFile = new File(destPath, srcFile.getName()); | ||
| if (!destFile.exists() || !FileUtils.contentEquals(srcFile, destFile)) { | ||
| FileUtils.copyFile(srcFile, destFile); | ||
| logger.info("copy {} to {}", srcFile.getAbsolutePath(), destPath); | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this method with same signature already exists above.