GitHub user cloverhearts opened a pull request:

    https://github.com/apache/zeppelin/pull/1930

    [ZEPPELIN-1886] implementation z.getZeppelinJobStatus 

    ### What is this PR for?
    You can get the state of a paragraph through ZeppelinContext.
    This allows you to implement code according to the paragraph condition.
    
    related
    https://github.com/apache/zeppelin/pull/1799
    
    ### What type of PR is it?
    Feature
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-1886
    
    ### How should this be tested?
    
    1. run paragraph.
    2. Record the noteid and paragraph id of the paragraph you have run.
    3. You can use the following code:
    for example
    ```
    z.getZeppelinJobStatus("notid", "paragraphid").getStatus()
    z.getZeppelinJobStatus("2C8D89Y9N", 
"20170121-042805_156018837").isFinished()
    z.getZeppelinJobStatus("2C8D89Y9N", "20170121-042805_156018837").isAbort()
    z.getZeppelinJobStatus("2C8D89Y9N", "20170121-042805_156018837").isError()
    z.getZeppelinJobStatus("2C8D89Y9N", "20170121-042805_156018837").isPending()
    z.getZeppelinJobStatus("2C8D89Y9N", "20170121-042805_156018837").isRunning()
    ```
    
    ### Screenshots (if appropriate)
    
![zeppelinstatus](https://cloud.githubusercontent.com/assets/10525473/22175433/770168b2-dfa9-11e6-8471-5dfa92e56eaa.png)
    
    ### 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-GET-PARAGRAPH-STATUS

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/1930.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 #1930
    
----
commit 08f5120bc3ff7c1bc7c32d694e6f9da8185aeb8e
Author: cloverhearts <cloverhearts...@gmail.com>
Date:   2016-12-30T22:29:38Z

    extends z.status on RemoteWorks

commit a522bafcad446fafea590d09ecce4a00edf4065a
Author: cloverhearts <cloverhearts...@gmail.com>
Date:   2017-01-01T05:53:09Z

    implement check status logic in workflow

commit bb7308d39c3eeed2162d6fd851b3b63c82247742
Author: cloverhearts <cloverhearts...@gmail.com>
Date:   2017-01-21T15:10:10Z

    add status getter

----


---
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.
---

Reply via email to