From 7dc0b9547a9158747854d2a3fc3748ff7e15f213 Mon Sep 17 00:00:00 2001 From: AhyoungRyu Date: Tue, 5 Jul 2016 17:33:03 +0900 Subject: [PATCH 1/3] Add writingzeppelinapplication.md to index.md --- docs/_includes/themes/zeppelin/_navigation.html | 2 +- docs/index.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/_includes/themes/zeppelin/_navigation.html b/docs/_includes/themes/zeppelin/_navigation.html index 8a99c840cf6..c0f32b6a282 100644 --- a/docs/_includes/themes/zeppelin/_navigation.html +++ b/docs/_includes/themes/zeppelin/_navigation.html @@ -104,7 +104,7 @@
  • Contibute
  • Writing Zeppelin Interpreter
  • -
  • Writing Zeppelin Application
  • +
  • Writing Zeppelin Application (Experimental)
  • How to contribute (code)
  • How to contribute (website)
  • diff --git a/docs/index.md b/docs/index.md index 10fc7e1588e..e120e7ae1ee 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) From e144e0d6ffdc578509ab35c6f03a4c35f21a51d3 Mon Sep 17 00:00:00 2001 From: AhyoungRyu Date: Tue, 5 Jul 2016 17:33:29 +0900 Subject: [PATCH 2/3] Apply toc to writingzeppelinapplication.md --- .../development/writingzeppelinapplication.md | 56 ++++++++++--------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/docs/development/writingzeppelinapplication.md b/docs/development/writingzeppelinapplication.md index 1256d1be4a0..013bca37ceb 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. +
    + +## 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 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. From 9fc746fc4b1981648f40c13126c3ab07893b6135 Mon Sep 17 00:00:00 2001 From: AhyoungRyu Date: Tue, 5 Jul 2016 17:36:32 +0900 Subject: [PATCH 3/3] Fix a grammar error --- docs/development/writingzeppelinapplication.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/writingzeppelinapplication.md b/docs/development/writingzeppelinapplication.md index 013bca37ceb..c00aabe563f 100644 --- a/docs/development/writingzeppelinapplication.md +++ b/docs/development/writingzeppelinapplication.md @@ -110,7 +110,7 @@ Json file contains the following information Name is a string in `[group].[name]` format. `[group]` and `[name]` allow only `[A-Za-z0-9_]`. -Group is normally the name of organization who creates this application. +Group is normally the name of an organization who creates this application. #### description