GitHub user cloverhearts reopened a pull request: https://github.com/apache/incubator-zeppelin/pull/908
ZEPPELIN-598 ] Dynamic loading for Interpreter and API ### What is this PR for? Use of external libraries that are included in the Roadmap, The interpreter needs related to dynamic loading capabilities. ### What type of PR is it? Feature ### Todos * [x] - Dynamic load * [x] - make api * [x] - Modified according to feedback (https://github.com/apache/incubator-zeppelin/pull/631) ### ScreenShots ![markdown_test](https://cloud.githubusercontent.com/assets/10525473/15452508/d786f276-202b-11e6-95e5-0e2b898cb6c7.gif) ### Is there a relevant Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-598 ### How should this be tested? By annotating the interpreter setting items below, try using the loadDynamicInterpreter method. Or create a new interpreter loads created in the local Maven repository. Step 1. markdown interpreter to local distribute ``` mvn install -pl '!spark-dependencies,!spark,!flink,!ignite,!lens,!hive,!phoenix,!postgresql,!tajo,!cassandra,!kylin,!elasticsearch,!zeppelin-distribution' -DskipTests ``` Step 2. Comment out the markdown incubator-zeppelin/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java ``` java ZEPPELIN_INTERPRETERS("zeppelin.interpreters", "org.apache.zeppelin.spark.SparkInterpreter," + "org.apache.zeppelin.spark.PySparkInterpreter," + "org.apache.zeppelin.spark.SparkSqlInterpreter," + "org.apache.zeppelin.spark.DepInterpreter," // + "org.apache.zeppelin.markdown.Markdown," ... ``` Step 3. and build. For example. ``` mvn clean package -Pspark-1.6 -Phadoop-2.4 -Pyarn -Ppyspark -DskipTests ``` Step 4. remove to interpreter/md ``` rm -rf interpreter/md ``` option. fixed conf/zeppelin-env.sh(cmd) download interpreter directory. ``` export ZEPPELIN_INTERPRETER_DOWNLOAD_DIR=MyZeppelinInterpreter ``` Step 5. and API Call (load interpreter) example load markdown ``` Content-Type: application/json ``` ``` POST http://127.0.0.1:8080/api/interpreter/load/md/markdown { "artifact": "org.apache.zeppelin:zeppelin-markdown:0.6.0-incubating-SNAPSHOT", "className": "org.apache.zeppelin.markdown.Markdown", "repository": { "url": "http://dl.bintray.com/spark-packages/maven", "snapshot" : true } } ``` Step 6. In interperter menu for zeppelin web, you can new setting information for md. ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? **no** You can merge this pull request into a Git repository by running: $ git pull https://github.com/cloverhearts/incubator-zeppelin feat/ZEPPELIN-598 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-zeppelin/pull/908.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #908 ---- commit 3d0a9d4c3781dce264b186aa862d8dddeb52518d Author: CloverHearts <cloverhearts...@gmail.com> Date: 2016-05-22T05:42:48Z Implement feat. dynamic load interpreter class commit 599639fb0ced60e26807e9f771fe8f127945596c Author: CloverHearts <cloverhearts...@gmail.com> Date: 2016-05-23T05:17:49Z fixed invalid result for dynamic interpreter ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---