mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
2 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
e0f77d68e8 |
Bump up version to 0.7.0-SNAPSHOT
### What is this PR for? Bump up version to 0.7.0-SNAPSHOT Author: Mina Lee <minalee@apache.org> Closes #1016 from minahlee/0.7.0-SNAPSHOT and squashes the following commits: |
||
|
|
9463fb8547 |
[ZEPPELIN-732] Helium Application
### What is this PR for?
This PR implements pluggable Application Framework.
Here's summary of the change.
**Applicaiton**
Base class of user application. User application should extends `org.apache.zeppelin.helium.Application`.
It looks like
```java
public abstract class Application {
/**
* When application loaded
* params context Application context
*/
public Application(ApplicationContext context) {
this.context = context;
}
/**
* This method can be invoked multiple times before unload(),
* Invoked just after application loaded or when paragraph output is updated
* param args Required resources from paragraph
*/
public abstract void run(ResourceSet args)
throws ApplicationException, IOException;
/**
* this method is invoked just before application is removed
*/
public abstract void unload() throws ApplicationException;
}
```
**HeliumPackage**
`org.apache.zeppelin.helium.HeliumPackage` keeps information of application package.
Package informations includes
```
{
type : "APPLICATION", // type of this package
name : "zeppelin.app", // application name. [organizationName].[appName] format
description : "App description", // description
artifact : "groupId:artifactId:version", // artifact name for maven repository
className : "org.apache.zeppelin.helium.MyApp", // application class that extends org.apache.zeppelin.helium.Application
resources : [[]], // required resource
icon : '<i class="fa fa-clock-o"></i>' // icon
}
```
`resources` field defines what kind of data this application requires, from ResourcePool.
"resourceName" and ":className" works in the array.
inner array combines each resourceName, :className with 'AND'
outer array combines inner array with 'OR'.
For example,
```
resources : [
[ "name1", ":java.util.Date"],
[ "name1", "name2"]
]
```
Then Zeppelin searches ResourcePool, first for resource name "name1" and resource type "java.util.Date" from resourcePool then resource name "name1" and "name2".
Once resources are found, they'll be passed to `Application.run()` method
**Package Registry**
`org.apache.zeppelin.helium.HeliumRegistry` provides list of available HeliumPackages.
Currently `HeliumLocalRegistry` is implemented and it provides list by reading HeliumPackage json files under ./helium directory in the file system. Later there will be some class like `HeliumOnlineRegistry' which reads available package from a community managed online central registry.
**Development mode**
`org.apache.zeppelin.interpreter.dev.*` package is provided for development support.
Developer can run their app inside of their IDE, that connects to running Zeppelin instance and display output.
**Application Suggestion**
Once paragraph becomes FINISHED status after run, Zeppelin searches resources from ResourcesPool that belongs to current paragraph. And compare all HeliumPackage if these resources satisfies their requirements ('resources' field). If there're available app, Helium button will be displayed.

User can see and select available application for this paragraph.

**Application selection**
After application is loaded, application icon will be displayed. So user can select and switch between apps.

if built-in visualization is available, application icon will be displayed next to built-in visualizations

**Experimental**
While this is new feature and API and specification may change, i'd suggest mark this feature as a experimental for a while.
### What type of PR is it?
Feature
### Todos
* [x] - Helium Application framework
* [x] - App launcher
* [x] - App display and selectors
* [x] - Package registry
* [x] - Development mode
* [x] - Make CI green
* [x] - Improve comment in source codes
* [x] - Documentation
* [x] - Examples
* [x] - Mark experimental
* [ ] - Review
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-732
### How should this be tested?
Will be updated with examples
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? yes
Author: Lee moon soo <moon@apache.org>
Closes #836 from Leemoonsoo/ZEPPELIN-732-up and squashes the following commits:
|