Fix some typos and grammars in writingzeppelininterpreter.md

This commit is contained in:
Ryu Ah young 2015-12-28 21:48:32 -08:00
parent d277c510f4
commit 466f82c849

View file

@ -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 {
@ -44,12 +42,11 @@ 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
@ -63,12 +60,12 @@ 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
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
2. 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].
For example,
```
<property>
@ -76,20 +73,20 @@ for example,
<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```
3. Start zeppelin by running `./bin/zeppelin-daemon start`.
4. in the interpreter page, click the +Create button and configure your interpreter properties.
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
@ -100,16 +97,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
@ -125,7 +120,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