GitHub user cloverhearts opened a pull request:
https://github.com/apache/zeppelin/pull/1242
[ZEPPELIN-960] runNoteJob for notebook rest api modified action when
interpreter not binding.
### What is this PR for?
Among Zeppelin API Fixed runNote.
According to whether the interpreter specified,
was added to an exception processing for a result and operation.
run success (HTTP STATUS : 200)
```
{
"status": "OK"
}
```
can't not found note id (HTTP STATUS : 404)
```
{
"status": "NOT_FOUND",
"message": "note not found."
}
```
interpter not found or not bind (HTTP STATUS : 412 - PRECONDITION FAILED)
```
{
"status": "PRECONDITION_FAILED",
"message": "paragraph_1469771130099_-278315611 Not selected or Invalid
Interpreter bind"
}
``
### What type of PR is it?
Bug Fix
### Todos
- [x] runNote api can apply by jdbc alias naming.
- [x] The results are recorded in the paragraph.
- [x] Binding fails when the interpreter 'HTTP STATUS CODE (412:
PRECONDITION FAILED) and returns a message.
- [x] modification docs.
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-960
### How should this be tested?
execute to curl command line.
1. curl -XPOST http://(your zeppelin ip):(port)/api/notebook/job/2A94M5J1Z
-H'Content-Type:application/json'
```
curl -XPOST http://127.0.0.1:8080/api/notebook/job/2A94M5J1Z
-H'Content-Type:application/json'
```
2.
if correct for execution then
```
{"status":"OK"}
```
if invalid notebook id then
```
{
"status": "NOT_FOUND",
"message": "note not found."
}
```
if not binding interpreters

```
{
"status": "PRECONDITION_FAILED",
"message": "paragraph_(paragraphid) Not selected or Invalid Interpreter
bind"
}
```
### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? yes
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloverhearts/zeppelin ZEPPELIN-960
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zeppelin/pull/1242.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1242
----
commit 251bb5246d173f3b9acf765bd9ee827a693052ae
Author: CloverHearts <[email protected]>
Date: 2016-07-29T07:45:27Z
fixed api method for runNoteJob in notebook rest api
commit 844651317dd5a771578c4df2bd0abac9b65f7d72
Author: CloverHearts <[email protected]>
Date: 2016-07-29T08:11:20Z
add docs for runNoteJobs restful api
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---