diff --git a/assets/themes/zeppelin/img/interpreter.png b/assets/themes/zeppelin/img/interpreter.png new file mode 100644 index 00000000..28d92f67 Binary files /dev/null and b/assets/themes/zeppelin/img/interpreter.png differ diff --git a/docs/development/howtocontribute.md b/docs/development/howtocontribute.md index 3959aba7..417eb5ab 100644 --- a/docs/development/howtocontribute.md +++ b/docs/development/howtocontribute.md @@ -86,6 +86,19 @@ bin/zeppelin-daemon start Server will be run on http://localhost:8080 + +### Generating Thrift Code + +Some portions of the Zeppelin code are generated by [Thrift](http://thrift.apache.org). For most Zeppelin changes, you don't need to worry about this, but if you modify any of the Thrift IDL files (e.g. zeppelin-interpreter/src/main/thrift/*.thrift), then you also need to regenerate these files and submit their updated version as part of your patch. + +To regenerate the code, install thrift-0.9.0 and change directory into Zeppelin source directory. and then run following command + + +``` +thrift -out zeppelin-interpreter/src/main/java/ --gen java zeppelin-interpreter/src/main/thrift/RemoteInterpreterService.thrift +``` + + ### JIRA Zeppelin manages it's issues in Jira. [https://issues.apache.org/jira/browse/ZEPPELIN](https://issues.apache.org/jira/browse/ZEPPELIN) diff --git a/docs/development/writingzeppelininterpreter.md b/docs/development/writingzeppelininterpreter.md index d427edb1..c4d718be 100644 --- a/docs/development/writingzeppelininterpreter.md +++ b/docs/development/writingzeppelininterpreter.md @@ -9,13 +9,18 @@ group: development ### What is Zeppelin Interpreter Zeppelin Interpreter is language backend. For example to use scala code in Zeppelin, you need scala interpreter. +Every Interpreter's are belongs to InterpreterGroup. InterpreterGroup is unit of start/stop interpreter. +Interpreters in the same InterpreterGroup can reference each other. For example, SparkSqlInterpreter can refernece SparkInterpreter to get SparkContext from it while they're in the same group. + + +Interpreter can be launched either using separate classloader or separate JVM process. Sometimes separate classloader cause problem especially when your interpreter uses reflections or trying to grab standard out/err. In this case, separate JVM process is the option you can select. (by checking 'fork' in Interpreter menu, which is default value) When Interpreter is running in separate JVM process, it's communicating with Zeppelin via thrift. ### Make your own Interpreter -Creating a new interpreter is quite simple. Just implementing [com.nflabs.zeppelin.interpreter](https://github.com/NFLabs/zeppelin/blob/master/zeppelin-zengine/src/main/java/com/nflabs/zeppelin/interpreter/Interpreter.java) interface. +Creating a new interpreter is quite simple. Just extends [com.nflabs.zeppelin.interpreter](https://github.com/NFLabs/zeppelin/blob/master/zeppelin-interpreter/src/main/java/com/nflabs/zeppelin/interpreter/Interpreter.java) abstract class and implement some methods. -You can include com.nflabs.zeppelin:zeppelin-zengine:[VERSION] artifact in your build system. +You can include com.nflabs.zeppelin:zeppelin-interpreter:[VERSION] artifact in your build system. ### Install your interpreter binary