Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion docs/_includes/themes/zeppelin/_navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<li role="separator" class="divider"></li>
<li class="title"><span><b>Contibute</b><span></li>
<li><a href="{{BASE_PATH}}/development/writingzeppelininterpreter.html">Writing Zeppelin Interpreter</a></li>
<li><a href="{{BASE_PATH}}/development/writingzeppelinapplication.html">Writing Zeppelin Application</a></li>
<li><a href="{{BASE_PATH}}/development/writingzeppelinapplication.html">Writing Zeppelin Application (Experimental)</a></li>
<li><a href="{{BASE_PATH}}/development/howtocontribute.html">How to contribute (code)</a></li>
<li><a href="{{BASE_PATH}}/development/howtocontributewebsite.html">How to contribute (website)</a></li>
</ul>
Expand Down
56 changes: 29 additions & 27 deletions docs/development/writingzeppelinapplication.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ limitations under the License.
-->
{% include JB/setup %}

# What is Zeppelin Application (Experimental)
# Writing a new Application (Experimental)

Apache Zeppelin Application is a package that runs on Interpreter process and displays it's output inside of the notebook. While application runs on Interpreter process, it's able to access resources provided by Interpreter through ResourcePool. Output is always rendered by AngularDisplaySystem. Therefore application provides all the possiblities of making interactive graphical application that uses data and processing power of any Interpreter.
<div id="toc"></div>

## What is Apache Zeppelin Application

Apache Zeppelin Application is a package that runs on Interpreter process and displays it's output inside of the notebook. While application runs on Interpreter process, it's able to access resources provided by Interpreter through ResourcePool. Output is always rendered by AngularDisplaySystem. Therefore application provides all the possiblities of making interactive graphical application that uses data and processing power of any Interpreter.


## Writing your own Application
## Make your own Application

Writing Application means extending `org.apache.zeppelin.helium.Application`. You can use your favorite IDE and language while Java class files are packaged into jar. `Application` class looks like

Expand Down Expand Up @@ -57,7 +60,7 @@ You can check example applications under [./zeppelin-examples](https://github.co

In the development mode, you can run your Application in your IDE as a normal java application and see the result inside of Zeppelin notebook.

org.apache.zeppelin.interpreter.dev.ZeppelinApplicationDevServer can run Zeppelin Application in development mode.
`org.apache.zeppelin.interpreter.dev.ZeppelinApplicationDevServer` can run Zeppelin Application in development mode.

```java

Expand All @@ -68,11 +71,10 @@ public static void main(String[] args) throws Exception {
LocalResourcePool pool = new LocalResourcePool("dev");
pool.put("date", new Date());

// run application in devlopment mode with give resource
// run application in devlopment mode with given resource
// in this case, Clock.class.getName() will be the application class name
ZeppelinApplicationDevServer devServer = new ZeppelinApplicationDevServer(
Clock.class.getName(),
pool.getAll());
Clock.class.getName(), pool.getAll());

// start development mode
devServer.start();
Expand All @@ -84,12 +86,10 @@ public static void main(String[] args) throws Exception {
In the Zeppelin notebook, run `%dev run` will connect to application running in development mode.




## Package file

Package file is a json file that provides information about the application.
Json file contains following informations
Json file contains the following information

```
{
Expand All @@ -108,51 +108,53 @@ Json file contains following informations

#### name

Name is a string in '[group].[name]' format.
[group] and [name] allows only [A-Za-z0-9_].
Group is normally organization name who creates this application.
Name is a string in `[group].[name]` format.
`[group]` and `[name]` allow only `[A-Za-z0-9_]`.
Group is normally the name of an organization who creates this application.

#### description

Short description. about application
A short description about the application

#### artifact

Location of the jar artifact.
"groupId:artifactId:version" will make load artifact from maven repository.
If jar is in local filesystem, absolute/relative can be used.
`"groupId:artifactId:version"` will load artifact from maven repository.
If jar exists in the local filesystem, absolute/relative can be used.

e.g.

When artifact exists in Maven repository

`artifact: "org.apache.zeppelin:zeppelin-examples:0.6.0"`

When artifact exists in local filesystem
```
artifact: "org.apache.zeppelin:zeppelin-examples:0.6.0"
```

`artifact: "zeppelin-example/target/zeppelin-example-0.6.0.jar"`
When artifact exists in the local filesystem

```
artifact: "zeppelin-example/target/zeppelin-example-0.6.0.jar"
```

#### className

Entry point. Class that extends `org.apache.zeppelin.helium.Application`


#### resources

Two dimensional array that defines required resources by name or by className. Helium Application launcher will compare resources in the ResourcePool with informations in this field and suggest application only when all required resources are available in the ResourcePool.
Two dimensional array that defines required resources by name or by className. Helium Application launcher will compare resources in the ResourcePool with the information in this field and suggest application only when all required resources are available in the ResourcePool.

Resouce name is a string which will be compared with name of objects in the ResourcePool. className is a string with ":" prepended, which will be compared with className of the objects in the ResourcePool.
Resouce name is a string which will be compared with the name of objects in the ResourcePool. className is a string with ":" prepended, which will be compared with className of the objects in the ResourcePool.

Application may require two or more resources. Required resource can be listed inside of json array. For example, if application requires object "name1", "name2" and "className1" type of object to run, resources field can be
Application may require two or more resources. Required resources can be listed inside of the json array. For example, if the application requires object "name1", "name2" and "className1" type of object to run, resources field can be

```
resources: [
[ "name1", "name2", ":className1", ...]
]
```

If Application can handle alternative combination of required resource, alternative set can be listed as below.
If Application can handle alternative combination of required resources, alternative set can be listed as below.

```
resources: [
Expand All @@ -162,7 +164,7 @@ resources: [
]
```

Easier way of understanding this scheme is
Easier way to understand this scheme is

```
resources: [
Expand All @@ -175,7 +177,7 @@ resources: [

#### icon

Icon to be used on the application button. String in this field will be rendered as a html.
Icon to be used on the application button. String in this field will be rendered as a HTML tag.

e.g.

Expand Down
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ Join to our [Mailing list](https://zeppelin.apache.org/community.html) and repor
* [Notebook Authorization](./security/notebook_authorization.html)
* [Interpreter & Data Resource Authorization](./security/interpreter_authorization.html)
* Contribute
* [Writing a new Interpreter](./development/writingzeppelininterpreter.html)
* [Writing Zeppelin Interpreter](./development/writingzeppelininterpreter.html)
* [Writing Zeppelin Application (Experimental)](./development/writingzeppelinapplication.html)
* [How to contribute (code)](./development/howtocontribute.html)
* [How to contribute (documentation website)](./development/howtocontributewebsite.html)

Expand Down