GitHub user jongyoul reopened a pull request: https://github.com/apache/incubator-zeppelin/pull/835
ZEPPELIN-804 Refactoring registration mechanism on Interpreters ### What is this PR for? This PR enable Zeppelin server register Interpreters without any dependencies of their own. For instance, we should build `spark` with `spark-dependencies` even we use our own Spark cluster because current initialisation mechanism needs to all of its dependencies. ### What type of PR is it? [Improvement] ### Todos * [x] - Add RegisteredInterpreter from interpreter-setting.json in a jar or interpreter/{interpreter}/interpreter-setting.json * [x] - Adjust it to Spark*Interpreter ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-804 ### How should this be tested? 1. Prepare your own spark cluster - e.g. standalone, Yarn, Mesos - 1. rm -rf interpreter 1. mvn clean package -DskipTests -pl 'zeppelin-display,zeppelin-interpreter,zeppelin-server,zeppelin-web,zeppelin-zengine,angular,jdbc,spark' 1. bin/zeppelin-daemon.sh start 1. Check error in log 1. apply patch 1. mvn clean package -DskipTests -pl 'zeppelin-display,zeppelin-interpreter,zeppelin-server,zeppelin-web,zeppelin-zengine,angular,jdbc,spark' 1. bin/zeppelin-daemon.sh start 1. run some paragraph with simple command like `sc.version` ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No ### Description #### This PR introduce three initialisation mechanism including current one. * {interpreter_dir}/{interpreter_group}/interpreter-setting.json * interpreter-settings.json in your interpreter jar * Current static initialization #### Initialization step 1. Get {interpreter_dir} from Configuration 1. Get the list of {interpreter_dir}/[{interpreter_group1},{interpreter_group2}...] 1. Find {interpreter_dir}/{interpreter_group1}/interpreter-setting.json 1. Find interpreter-setting.json in the resources of {interpreter_dir}/{interpreter_group1}/**/*.jar 1. Adopt static init 1. Repeat them from the second step with {interpreter_group2} You can merge this pull request into a Git repository by running: $ git pull https://github.com/jongyoul/incubator-zeppelin ZEPPELIN-804 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-zeppelin/pull/835.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 #835 ---- commit ca7b96c4c48bbfe551db20d6e53eba1f69fedf3a Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-04-14T03:03:26Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Added a new initialization mechanism to use interpreter-setting.json - Adjusted new mechanism to SparkInterpreter for verification commit 48ac41d20181d99858a19a7ba5f133b546c3adee Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-04-14T03:27:07Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Fixed the style commit d54f98e0ee39124dcc4e7fd74e25e7368e34be43 Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-04-14T04:04:50Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Changed Spark*Interpreter to use interpreter-setting.json commit 8a90fe439a3ca92228d913f9442a6c6a39528ff1 Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-04-14T06:11:46Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Fixed test environments commit 1fa2e522bd78843e81e7b5dca379739a85cf8650 Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-04-14T06:43:59Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Fixed test environments commit 00f55a8f5e222951bb8e0f4573625d1c40d03f27 Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-04-14T07:07:48Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Excluded interpreter-setting.json from rat check commit 519f05794cf5c8c238dd81d202cd5eaaba54307c Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-04-14T07:29:28Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Excluded interpreter-setting.json from rat check commit d3436369a72bf1f7e370c5054037b328220a7c16 Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-04-14T13:48:56Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Excluded SparkRInterpreter from interpreter-setting.json commit 0d720c02b7f5df51ef0d8541e07c7a6093cc7d5d Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-04-15T01:13:51Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Removed a interpreter which fails to initialize commit 5d63d91505204a59ae3ec3d87ffbc86315a0261e Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-04-15T06:12:44Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Removed static initialisation of Spark*Interpreter commit c5b7d545daf8271cdc5f62b64f1672db9dc4eb8a Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-04-22T07:44:27Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Extracted new initialization logic into another methods commit 844dccb59157eb694acc47ed9411cc30f9a37090 Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-05-20T02:30:50Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Fixed logic to check for supporting legacy mechanism commit 1b3cd0ca2e837930df9a6e1fbc32ef871d94cd38 Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-05-20T03:42:47Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Checked if path exists or not commit 3ad41bb3d3092de1ed7f2b173dd66bb09d0e49e4 Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-05-20T03:46:44Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Checked if path exists or not commit e8f990f2d614fd776779d06bb7bd45cbe348f788 Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-05-24T13:49:51Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Fixed some unicode characters in interpreter-setting.json commit 81ab36175e2df29a4edde5288cf6d233587f1de4 Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-05-24T15:38:41Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Changed logger setting only for test. This will be reverted after test commit 312dd77b1818892f7946789be0c2f81771728551 Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-05-26T09:18:46Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Reverted log4j setting commit 25bc501e6f0ae52752d6fdb72c507d37e153e61a Author: Jongyoul Lee <jongy...@gmail.com> Date: 2016-05-26T09:19:46Z ZEPPELIN-804 Refactoring registration mechanism on Interpreters - Ignored while registering a new interpreter with existing interpreter key ---- --- 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. ---