Repository: zeppelin Updated Branches: refs/heads/master 076a2aae9 -> 3ad809f6b
[DOC][ZEPPELIN-732] Helium Application ### What is this PR for? After #836 and #1031 merged into master branch, I also applied TOC(table of contents) to newly added `writingzeppelinapplication.md`. And also added this docs link under `index.md`'s docs list. ### What type of PR is it? Documentation ### Todos * [x] - Apply TOC(table of contents) to `writingzeppelinapplication.md` and add this docs to `index.md` ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: AhyoungRyu <fbdkdu...@hanmail.net> Closes #1133 from AhyoungRyu/docs/ZEPPELIN-732 and squashes the following commits: 9fc746f [AhyoungRyu] Fix a grammar error e144e0d [AhyoungRyu] Apply toc to writingzeppelinapplication.md 7dc0b95 [AhyoungRyu] Add writingzeppelinapplication.md to index.md Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/3ad809f6 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/3ad809f6 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/3ad809f6 Branch: refs/heads/master Commit: 3ad809f6b5b9ed5602b3b2158a271fa417a290e5 Parents: 076a2aa Author: AhyoungRyu <fbdkdu...@hanmail.net> Authored: Tue Jul 5 17:36:32 2016 +0900 Committer: Lee moon soo <m...@apache.org> Committed: Thu Jul 7 07:39:51 2016 -0700 ---------------------------------------------------------------------- docs/_includes/themes/zeppelin/_navigation.html | 2 +- docs/development/writingzeppelinapplication.md | 56 ++++++++++---------- docs/index.md | 3 +- 3 files changed, 32 insertions(+), 29 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/3ad809f6/docs/_includes/themes/zeppelin/_navigation.html ---------------------------------------------------------------------- diff --git a/docs/_includes/themes/zeppelin/_navigation.html b/docs/_includes/themes/zeppelin/_navigation.html index 8a99c84..c0f32b6 100644 --- a/docs/_includes/themes/zeppelin/_navigation.html +++ b/docs/_includes/themes/zeppelin/_navigation.html @@ -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> http://git-wip-us.apache.org/repos/asf/zeppelin/blob/3ad809f6/docs/development/writingzeppelinapplication.md ---------------------------------------------------------------------- diff --git a/docs/development/writingzeppelinapplication.md b/docs/development/writingzeppelinapplication.md index 1256d1b..c00aabe 100644 --- a/docs/development/writingzeppelinapplication.md +++ b/docs/development/writingzeppelinapplication.md @@ -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 @@ -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 @@ -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(); @@ -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 ``` { @@ -108,43 +108,45 @@ 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: [ @@ -152,7 +154,7 @@ resources: [ ] ``` -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: [ @@ -162,7 +164,7 @@ resources: [ ] ``` -Easier way of understanding this scheme is +Easier way to understand this scheme is ``` resources: [ @@ -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. http://git-wip-us.apache.org/repos/asf/zeppelin/blob/3ad809f6/docs/index.md ---------------------------------------------------------------------- diff --git a/docs/index.md b/docs/index.md index 10fc7e1..e120e7a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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)