GitHub user cloverhearts reopened a pull request: https://github.com/apache/zeppelin/pull/1242
[ZEPPELIN-960] When there is no interpreter, paragraph runJobapi modified. ### 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 ![notebind](https://cloud.githubusercontent.com/assets/10525473/17242167/a2db8ba8-55b0-11e6-89ec-aca49fefbfde.png) ``` { "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 <cloverheartsdev+git...@gmail.com> Date: 2016-07-29T07:45:27Z fixed api method for runNoteJob in notebook rest api commit 844651317dd5a771578c4df2bd0abac9b65f7d72 Author: CloverHearts <cloverheartsdev+git...@gmail.com> Date: 2016-07-29T08:11:20Z add docs for runNoteJobs restful api commit ff0f21337b652c04d3c9ad6eb840b2547f6bfa86 Author: CloverHearts <cloverhearts...@gmail.com> Date: 2016-08-08T02:22:37Z Merge branch 'master' into ZEPPELIN-960 commit 7b71ced96c5f21b30d0daffe6ed7617780bd748d Author: CloverHearts <cloverhearts...@gmail.com> Date: 2016-08-16T08:00:00Z Merge branch 'master' into ZEPPELIN-960 # Conflicts: # zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRestApi.java commit 1428795f800e2ea57fafdf0aa331f1052b3eaf43 Author: CloverHearts <cloverhearts...@gmail.com> Date: 2016-08-17T02:16:36Z Merge branch 'master' into ZEPPELIN-960 commit a672cf38d15c260444410615539c9cc4a8a87422 Author: CloverHearts <cloverhearts...@gmail.com> Date: 2016-08-17T06:58:07Z reimplement run.eachParagraph to run.all method ---- --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---