Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
466f82c
Fix some typos and grammars in writingzeppelininterpreter.md
AhyoungRyu Dec 29, 2015
f72b1cb
Add .sh next to .bin/zeppein-daemon
AhyoungRyu Dec 29, 2015
e867df3
Increase readability and delete useless <br>, <hr> tag spark.md
AhyoungRyu Dec 29, 2015
c63e59f
Increase readability and delete useless <br> tag tutorial.md
AhyoungRyu Dec 29, 2015
99b1e9e
Remove unnecessary space in writingzeppelininterpreter.md
AhyoungRyu Dec 30, 2015
3041b95
Change rebuild -> rebuilding in spark.md
AhyoungRyu Dec 30, 2015
9c008cf
Increase readability and Remove useless <br>, <hr> tag cassandra.md
AhyoungRyu Jan 1, 2016
8690e02
Increase readability and remove useless <hr> tag elasticsearch.md
AhyoungRyu Jan 1, 2016
d08092a
Add highlight for scala code and Increase readability flink.md
AhyoungRyu Jan 1, 2016
aac2e01
Add short description about Apache hive and Increase readability hive.md
AhyoungRyu Jan 1, 2016
3eec4cf
Remove numbering flink.md
AhyoungRyu Jan 1, 2016
11b32db
Remove useless 'to' in lens.md
AhyoungRyu Jan 1, 2016
fe4dfff
Fix image size unit px -> % and Increase readability markdown.md
AhyoungRyu Jan 1, 2016
f3d0173
Add numbering for dividing the table list and Fix grammar error rest-…
AhyoungRyu Jan 2, 2016
0918f79
Fix grammar error and Increase readability interpreters.md
AhyoungRyu Jan 2, 2016
ef77027
Fix Upper case -> Lower case in cassandra.md
AhyoungRyu Jan 11, 2016
a5d26d7
Fix version 1.5.1 -> 1.5.2 in spark.md
AhyoungRyu Jan 11, 2016
785dcbb
Fix odd space in spark.md
AhyoungRyu Jan 11, 2016
9b768e9
Change .md -> .html in interpreter.md
AhyoungRyu Jan 11, 2016
925f30e
Fix the list of 'Configure your Interpreter'
AhyoungRyu Jan 13, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 21 additions & 25 deletions docs/development/writingzeppelininterpreter.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ All Interpreters in the same interpreter group are launched in a single, separat
### Make your own Interpreter

Creating a new interpreter is quite simple. Just extend [org.apache.zeppelin.interpreter](https://github.com/apache/incubator-zeppelin/blob/master/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java) abstract class and implement some methods.

You can include org.apache.zeppelin:zeppelin-interpreter:[VERSION] artifact in your build system.

Your interpreter name is derived from the static register method
You can include `org.apache.zeppelin:zeppelin-interpreter:[VERSION]` artifact in your build system.
Your interpreter name is derived from the static register method.

```
static {
Expand All @@ -44,16 +42,15 @@ static {
```

The name will appear later in the interpreter name option box during the interpreter configuration process.

The name of the interpreter is what you later write to identify a paragraph which should be interpreted using this interpreter.

```
%MyInterpreterName
some interpreter spesific code...
some interpreter specific code...
```
### Install your interpreter binary

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you have build....
-> Once you have built your interpreter, you can place it under the interpreter directory with all its dependencies.

Once you have build your interpreter, you can place your interpreter under directory with all the dependencies.
Once you have built your interpreter, you can place it under the interpreter directory with all its dependencies.

```
[ZEPPELIN_HOME]/interpreter/[INTERPRETER_NAME]/
Expand All @@ -63,33 +60,34 @@ Once you have build your interpreter, you can place your interpreter under direc

To configure your interpreter you need to follow these steps:

1. create conf/zeppelin-site.xml by copying conf/zeppelin-site.xml.template to conf/zeppelin-site.xml

2. Add your interpreter class name to the zeppelin.interpreters property in conf/zeppelin-site.xml
1. Add your interpreter class name to the zeppelin.interpreters property in `conf/zeppelin-site.xml`.

Property value is comma separated [INTERPRETER_CLASS_NAME]
for example,
Property value is comma separated [INTERPRETER\_CLASS\_NAME].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: We can remove escaping character and write [INTERPRETER_CLASS_NAME]. But it is a kind of preference so it's up to you.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There're similar kind of expression, and it may not need to emphasize. Sorry to disturb, you can ignore my previous comment.

For example,

```
```
<property>
<name>zeppelin.interpreters</name>
<value>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,org.apache.zeppelin.shell.ShellInterpreter,org.apache.zeppelin.hive.HiveInterpreter,com.me.MyNewInterpreter</value>
</property>
```
3. start zeppelin by running ```./bin/zeppelin-deamon start```

4. in the interpreter page, click the +Create button and configure your interpreter properties.
2. Add your interpreter to the [default configuration](https://github.com/apache/incubator-zeppelin/blob/master/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java#L397) which is used when there is no `zeppelin-site.xml`.

3. Start Zeppelin by running `./bin/zeppelin-daemon.sh start`.

4. In the interpreter page, click the `+Create` button and configure your interpreter properties.
Now you are done and ready to use your interpreter.

Note that the interpreters shipped with zeppelin have a [default configuration](https://github.com/apache/incubator-zeppelin/blob/master/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java#L397) which is used when there is no zeppelin-site.xml.
Note that the interpreters shipped with zeppelin have a [default configuration](https://github.com/apache/incubator-zeppelin/blob/master/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java#L397) which is used when there is no `conf/zeppelin-site.xml`.

### Use your interpreter

#### 0.5.0
Inside of a notebook, %[INTERPRETER_NAME] directive will call your interpreter.
Inside of a notebook, `%[INTERPRETER_NAME]` directive will call your interpreter.
Note that the first interpreter configuration in zeppelin.interpreters will be the default one.

for example
For example,

```
%myintp
Expand All @@ -100,16 +98,14 @@ println(a)

<br />
#### 0.6.0 and later
Inside of a notebook, %[INTERPRETER\_GROUP].[INTERPRETER\_NAME] directive will call your interpreter.
Inside of a notebook, `%[INTERPRETER_GROUP].[INTERPRETER_NAME]` directive will call your interpreter.
Note that the first interpreter configuration in zeppelin.interpreters will be the default one.

You can omit either [INTERPRETER\_GROUP] or [INTERPRETER\_NAME]. Omit [INTERPRETER\_NAME] selects first available interpreter in the [INTERPRETER\_GROUP].
Omit '[INTERPRETER\_GROUP]' will selects [INTERPRETER\_NAME] from default interpreter group.

You can omit either [INTERPRETER\_GROUP] or [INTERPRETER\_NAME]. If you omit [INTERPRETER\_NAME], then first available interpreter will be selected in the [INTERPRETER\_GROUP].
Likewise, if you skip [INTERPRETER\_GROUP], then [INTERPRETER\_NAME] will be chosen from default interpreter group.

For example, if you have two interpreter myintp1 and myintp2 in group mygrp,

you can call myintp1 like
For example, if you have two interpreter myintp1 and myintp2 in group mygrp, you can call myintp1 like

```
%mygrp.myintp1
Expand All @@ -125,7 +121,7 @@ and you can call myintp2 like
codes for myintp2
```

If you omit your interpreter name, it'll selects first available interpreter in the group (myintp1)
If you omit your interpreter name, it'll select first available interpreter in the group ( myintp1 ).

```
%mygrp
Expand Down
Loading