Apply auto TOC to all of docs under docs/manual/

This commit is contained in:
AhyoungRyu 2016-06-16 19:42:46 -07:00
parent bef398e225
commit 163691ce51
5 changed files with 109 additions and 106 deletions

View file

@ -19,16 +19,18 @@ limitations under the License.
-->
{% include JB/setup %}
## Dynamic Form
# Dynamic Form
Zeppelin dynamically creates input forms. Depending on language backend, there're two different ways to create dynamic form.
<div id="toc"></div>
Apache Zeppelin dynamically creates input forms. Depending on language backend, there're two different ways to create dynamic form.
Custom language backend can select which type of form creation it wants to use.
### Using form Templates
## Using form Templates
This mode creates form using simple template language. It's simple and easy to use. For example Markdown, Shell, SparkSql language backend uses it.
#### Text input form
### Text input form
To create text input form, use `${formName}` templates.
@ -42,7 +44,7 @@ Also you can provide default value, using `${formName=defaultValue}`.
<img src="../assets/themes/zeppelin/img/screenshots/form_input_default.png" />
#### Select form
### Select form
To create select form, use `${formName=defaultValue,option1|option2...}`
@ -54,7 +56,7 @@ Also you can separate option's display name and value, using `${formName=default
<img src="../assets/themes/zeppelin/img/screenshots/form_select_displayname.png" />
#### Checkbox form
### Checkbox form
For multi-selection, you can create a checkbox form using `${checkbox:formName=defaultValue1|defaultValue2...,option1|option2...}`. The variable will be substituted by a comma-separated string based on the selected items. For example:
@ -64,13 +66,13 @@ Besides, you can specify the delimiter using `${checkbox(delimiter):formName=...
<img src="../assets/themes/zeppelin/img/screenshots/form_checkbox_delimiter.png">
### Creates Programmatically
## Creates Programmatically
Some language backend uses programmatic way to create form. For example [ZeppelinContext](../interpreter/spark.html#zeppelincontext) provides form creation API
Here're some examples.
####Text input form
### Text input form
<div class="codetabs">
<div data-lang="scala" markdown="1">
@ -91,7 +93,7 @@ print("Hello "+z.input("name"))
</div>
<img src="../assets/themes/zeppelin/img/screenshots/form_input_prog.png" />
####Text input form with default value
### Text input form with default value
<div class="codetabs">
<div data-lang="scala" markdown="1">
@ -112,7 +114,7 @@ print("Hello "+z.input("name", "sun"))
</div>
<img src="../assets/themes/zeppelin/img/screenshots/form_input_default_prog.png" />
####Select form
### Select form
<div class="codetabs">
<div data-lang="scala" markdown="1">

View file

@ -19,12 +19,13 @@ limitations under the License.
-->
{% include JB/setup %}
## Dynamic Interpreter Loading using REST API
# Dynamic Interpreter Loading using REST API
<div id="toc"></div>
Zeppelin provides pluggable interpreter architecture which results in a wide and variety of the supported backend system. In this section, we will introduce **Dynamic interpreter loading** using **REST API**. This concept actually comes from [Zeppelin Helium Proposal](https://cwiki.apache.org/confluence/display/ZEPPELIN/Helium+proposal).
Before we start, if you are not familiar with the concept of **Zeppelin interpreter**, you can check out [Overview of Zeppelin interpreter](../manual/interpreters.html) first.
<br/>
## Overview
In the past, Zeppelin was loading interpreter binaries from `/interpreter/[interpreter_name]` directory. They were configured by `zeppelin.interpreters` property in `conf/zeppelin-site.xml` or `ZEPPELIN_INTERPRETERS` env variables in `conf/zeppelin-env.sh`. They were loaded on Zeppelin server startup and stayed alive until the server was stopped.
In order to simplify using 3rd party interpreters, we changed this way to **dynamically** load interpreters from **Maven Repository** using **REST API**. Hopefully, the picture below will help you to understand the process.
@ -32,7 +33,7 @@ In order to simplify using 3rd party interpreters, we changed this way to **dyna
## Load & Unload Interpreters Using REST API
### 1. Load
### Load
You can **load** interpreters located in Maven repository using REST API, like this:
( Maybe, you are unfamiliar with `[interpreter_group_name]` or `[interpreter_name]`. If so, please checkout [Interpreters in Zeppelin](../manual/interpreter.html) again. )
@ -69,21 +70,21 @@ http://127.0.0.1:8080/api/interpreter/load/md/markdown
The meaning of each parameters is:
1. **Artifact**
- groupId: org.apache.zeppelin
- artifactId: zeppelin-markdown
- version: 0.6.0-SNAPSHOT
- groupId: org.apache.zeppelin
- artifactId: zeppelin-markdown
- version: 0.6.0-SNAPSHOT
2. **Class Name**
- Package Name: org.apache.zeppelin
- Interpreter Class Name: markdown.Markdown
- Package Name: org.apache.zeppelin
- Interpreter Class Name: markdown.Markdown
3. **Repository ( optional )**
- Url: http://dl.bintray.com/spark-packages/maven
- Snapshot: false
- Url: http://dl.bintray.com/spark-packages/maven
- Snapshot: false
> <b>Please note: </b>The interpreters you downloaded need to be **reload**, when your Zeppelin server is down.
### 2. Unload
### Unload
If you want to **unload** the interpreters using REST API,
```
@ -95,7 +96,7 @@ In this case, the Restful method will be <code>**DELETE**</code>.
## What is the next step after Loading ?
### Q1. Where is the location of interpreters you downloaded ?
Actually, the answer about this question is in the above picture. Once the REST API is called, the `.jar` files of interpreters you get are saved under `ZEPPELIN_HOME/local-repo` first. Then, they will be copied to `ZEPPELIN_HOME/interpreter` directory. So, please checkout your `ZEPPELIN_HOME/interpreter`.
### Q2. Then, how can I use this interpreter ?

View file

@ -19,7 +19,12 @@ limitations under the License.
-->
{% include JB/setup %}
## Interpreters in Zeppelin
# Interpreters in Apache Zeppelin
<div id="toc"></div>
## Overview
In this section, we will explain about the role of interpreters, interpreters group and interpreter settings in Zeppelin.
The concept of Zeppelin interpreter allows any language/data-processing-backend to be plugged into Zeppelin.
Currently, Zeppelin supports many interpreters such as Scala ( with Apache Spark ), Python ( with Apache Spark ), SparkSQL, JDBC, Markdown, Shell and so on.
@ -29,12 +34,12 @@ Zeppelin Interpreter is a plug-in which enables Zeppelin users to use a specific
When you click the ```+Create``` button in the interpreter page, the interpreter drop-down list box will show all the available interpreters on your server.
<img src="../assets/themes/zeppelin/img/screenshots/interpreter_create.png">
<img src="../assets/themes/zeppelin/img/screenshots/interpreter_create.png" width="280px">
## What is Zeppelin Interpreter Setting?
## What is interpreter setting?
Zeppelin interpreter setting is the configuration of a given interpreter on Zeppelin server. For example, the properties are required for hive JDBC interpreter to connect to the Hive server.
<img src="../assets/themes/zeppelin/img/screenshots/interpreter_setting.png">
<img src="../assets/themes/zeppelin/img/screenshots/interpreter_setting.png" width="500px">
Properties are exported as environment variable when property name is consisted of upper characters, numbers and underscore ([A-Z_0-9]). Otherwise set properties as JVM property.
@ -44,14 +49,15 @@ Each notebook can be bound to multiple Interpreter Settings using setting icon o
## What is Zeppelin Interpreter Group?
## What is interpreter group?
Every Interpreter is belonged to an **Interpreter Group**. Interpreter Group is a unit of start/stop interpreter.
By default, every interpreter is belonged to a single group, but the group might contain more interpreters. For example, Spark interpreter group is including Spark support, pySpark, SparkSQL and the dependency loader.
Technically, Zeppelin interpreters from the same group are running in the same JVM. For more information about this, please checkout [here](../development/writingzeppelininterpreter.html).
Each interpreters is belonged to a single group and registered together. All of their properties are listed in the interpreter setting like below image.
<img src="../assets/themes/zeppelin/img/screenshots/interpreter_setting_spark.png">
<img src="../assets/themes/zeppelin/img/screenshots/interpreter_setting_spark.png" width="500px">
## Interpreter binding mode
@ -62,7 +68,7 @@ In 'shared' mode, every notebook bound to the Interpreter Setting will share the
<img src="../assets/themes/zeppelin/img/screenshots/interpreter_persession.png" width="400px">
## Connecting to the Existing Remote Interpreter
## Connecting to the existing remote interpreter
Zeppelin users can start interpreter thread embedded in their service. This will provide flexibility to user to start interpreter on remote host. To start interpreter along with your service you have to create an instance of ``RemoteInterpreterServer`` and start it as follows:
@ -75,4 +81,4 @@ interpreter.start()
The above code will start interpreter thread inside your process. Once the interpreter is started you can configure zeppelin to connect to RemoteInterpreter by checking **Connect to existing process** checkbox and then provide **Host** and **Port** on which interpreter porocess is listening as shown in the image below:
<img src="../assets/themes/zeppelin/img/screenshots/existing_interpreter.png" width="400px">
<img src="../assets/themes/zeppelin/img/screenshots/existing_interpreter.png" width="450px">

View file

@ -19,91 +19,84 @@ limitations under the License.
-->
{% include JB/setup %}
## Customize your zeppelin homepage
Zeppelin allows you to use one of the notebooks you create as your zeppelin Homepage.
With that you can brand your zeppelin installation,
adjust the instruction to your users needs and even translate to other languages.
# Customize Apache Zeppelin homepage
<br />
### How to set a notebook as your zeppelin homepage
<div id="toc"></div>
Apache Zeppelin allows you to use one of the notebooks you create as your Zeppelin Homepage.
With that you can brand your Zeppelin installation, adjust the instruction to your users needs and even translate to other languages.
## How to set a notebook as your Zeppelin homepage
The process for creating your homepage is very simple as shown below:
1. Create a notebook using zeppelin
2. Set the notebook id in the config file
3. Restart zeppelin
1. Create a notebook using Zeppelin
2. Set the notebook id in the config file
3. Restart Zeppelin
<br />
#### Create a notebook using zeppelin
Create a new notebook using zeppelin,
you can use ```%md``` interpreter for markdown content or any other interpreter you like.
### Create a notebook using Zeppelin
Create a new notebook using Zeppelin,
you can use ```%md``` interpreter for markdown content or any other interpreter you like.
You can also use the display system to generate [text](../displaysystem/basicdisplaysystem.html#text), [html](../displaysystem/basicdisplaysystem.html#html), [table](../displaysystem/basicdisplaysystem.html#table) or
Angular ([backend API](../displaysystem/back-end-angular.html), [frontend API](../displaysystem/front-end-angular.html)).
You can also use the display system to generate [text](../displaysystem/display.html),
[html](../displaysystem/display.html#html),[table](../displaysystem/table.html) or
[angular](../displaysystem/angular.html)
Run (shift+Enter) the notebook and see the output. Optionally, change the notebook view to report to hide
the code sections.
Run (shift+Enter) the notebook and see the output. Optionally, change the notebook view to report to hide
the code sections.
### Set the notebook id in the config file
To set the notebook id in the config file, you should copy it from the last word in the notebook url.
For example,
<br />
#### Set the notebook id in the config file
To set the notebook id in the config file you should copy it from the last word in the notebook url
<img src="/assets/themes/zeppelin/img/screenshots/homepage_notebook_id.png" />
for example
Set the notebook id to the ```ZEPPELIN_NOTEBOOK_HOMESCREEN``` environment variable
or ```zeppelin.notebook.homescreen``` property.
<img src="/assets/themes/zeppelin/img/screenshots/homepage_notebook_id.png" />
You can also set the ```ZEPPELIN_NOTEBOOK_HOMESCREEN_HIDE``` environment variable
or ```zeppelin.notebook.homescreen.hide``` property to hide the new notebook from the notebook list.
Set the notebook id to the ```ZEPPELIN_NOTEBOOK_HOMESCREEN``` environment variable
or ```zeppelin.notebook.homescreen``` property.
You can also set the ```ZEPPELIN_NOTEBOOK_HOMESCREEN_HIDE``` environment variable
or ```zeppelin.notebook.homescreen.hide``` property to hide the new notebook from the notebook list.
<br />
#### Restart zeppelin
Restart your zeppelin server
```
./bin/zeppelin-deamon stop
./bin/zeppelin-deamon start
```
####That's it! Open your browser and navigate to zeppelin and see your customized homepage...
### Restart Zeppelin
Restart your Zeppelin server
```
./bin/zeppelin-deamon stop
./bin/zeppelin-deamon start
```
That's it! Open your browser and navigate to Zeppelin and see your customized homepage.
<br />
### Show notebooks list in your custom homepage
If you want to display the list of notebooks on your custom zeppelin homepage all
## Show notebooks list in your custom homepage
If you want to display the list of notebooks on your custom Zeppelin homepage all
you need to do is use our %angular support.
<br />
Add the following code to a paragraph in you home page and run it... walla! you have your notebooks list.
Add the following code to a paragraph in you home page and run it... walla! you have your notebooks list.
```javascript
println(
"""%angular
<div class="col-md-4" ng-controller="HomeCtrl as home">
<h4>Notebooks</h4>
<div>
<h5><a href="" data-toggle="modal" data-target="#noteNameModal" style="text-decoration: none;">
<i style="font-size: 15px;" class="icon-notebook"></i> Create new note</a></h5>
<ul style="list-style-type: none;">
<li ng-repeat="note in home.notes.list track by $index"><i style="font-size: 10px;" class="icon-doc"></i>
<a style="text-decoration: none;" href="#/notebook/{{note.id}}">{{noteName(note)}}</a>
</li>
</ul>
</div>
</div>
""")
```
After running the notebook you will see output similar to this one:
<img src="/assets/themes/zeppelin/img/screenshots/homepage_notebook_list.png" />
The main trick here relays in linking the ```<div>``` to the controller:
```javascript
```javascript
println(
"""%angular
<div class="col-md-4" ng-controller="HomeCtrl as home">
```
<h4>Notebooks</h4>
<div>
<h5><a href="" data-toggle="modal" data-target="#noteNameModal" style="text-decoration: none;">
<i style="font-size: 15px;" class="icon-notebook"></i> Create new note</a></h5>
<ul style="list-style-type: none;">
<li ng-repeat="note in home.notes.list track by $index"><i style="font-size: 10px;" class="icon-doc"></i>
<a style="text-decoration: none;" href="#/notebook/{{note.id}}">{{noteName(note)}}</a>
</li>
</ul>
</div>
</div>
""")
```
Once we have ```home``` as our controller variable in our ```<div></div>```
we can use ```home.notes.list``` to get access to the notebook list.
After running the notebook you will see output similar to this one:
<img src="/assets/themes/zeppelin/img/screenshots/homepage_notebook_list.png" />
The main trick here relays in linking the ```<div>``` to the controller:
```javascript
<div class="col-md-4" ng-controller="HomeCtrl as home">
```
Once we have ```home``` as our controller variable in our ```<div></div>```
we can use ```home.notes.list``` to get access to the notebook list.

View file

@ -19,13 +19,14 @@ limitations under the License.
-->
{% include JB/setup %}
## How can you publish your paragraph ?
Zeppelin provides a feature for publishing your notebook paragraph results. Using this feature, you can show Zeppelin notebook paragraph results in your own website.
# How can you publish your paragraph ?
<div id="toc"></div>
Apache Zeppelin provides a feature for publishing your notebook paragraph results. Using this feature, you can show Zeppelin notebook paragraph results in your own website.
It's very straightforward. Just use `<iframe>` tag in your page.
> **Warning**: Please use this feature with caution and in a trusted environment only, as Zeppelin entire Webapp could be accessible for whoever visits your website.
### Copy a Paragraph Link
## Copy a Paragraph Link
A first step to publish your paragraph result is **Copy a Paragraph Link**.
* After running a paragraph in your Zeppelin notebook, click a gear button located on the right side. Then, click **Link this Paragraph** menu like below image.
@ -34,7 +35,7 @@ A first step to publish your paragraph result is **Copy a Paragraph Link**.
* Just copy the provided link.
<center><img src="../assets/themes/zeppelin/img/docs-img/copy-the-link.png" height="100%" width="100%"></center>
### Embed the Paragraph to Your Website
## Embed the Paragraph to Your Website
For publishing the copied paragraph, you may use `<iframe>` tag in your website page.
For example,
@ -45,4 +46,4 @@ For example,
Finally, you can show off your beautiful visualization results in your website.
<center><img src="../assets/themes/zeppelin/img/docs-img/your-website.png" height="90%" width="90%"></center>
> **Note**: To embed the paragraph in a website, Zeppelin needs to be reachable by that website.
> **Note**: To embed the paragraph in a website, Apache Zeppelin needs to be reachable by that website. And please use this feature with caution and in a trusted environment only, as Zeppelin entire Webapp could be accessible for whoever visits your website.