GitHub user zjffdu reopened a pull request:

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

    ZEPPELIN-2256. poll job progress is called twice

    ### What is this PR for?
    Minor change to only call getProgress one time. 
    
    
    ### What type of PR is it?
    [Improvement]
    
    ### Todos
    * [ ] - Task
    
    ### What is the Jira issue?
    * https://issues.apache.org/jira/browse/ZEPPELIN-2256
    
    ### How should this be tested?
    Before
    ```
    DEBUG [2017-03-14 10:03:44,376] ({pool-2-thread-6} 
BaseLivyInterprereter.java[callRestAPI]:441) - Get response, StatusCode: 200, 
responseBody: {"id":1,"state":"running","output":null,"progress":0.6}
     INFO [2017-03-14 10:03:44,777] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:181) - progress:60
     INFO [2017-03-14 10:03:44,778] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:181) - progress:60
     INFO [2017-03-14 10:03:45,284] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:181) - progress:60
     INFO [2017-03-14 10:03:45,284] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:181) - progress:60
    DEBUG [2017-03-14 10:03:45,378] ({pool-2-thread-6} 
BaseLivyInterprereter.java[callRestAPI]:407) - Call rest api in 
http://localhost:8999/sessions/11/statements/1, method: GET, jsonData:
    DEBUG [2017-03-14 10:03:45,387] ({pool-2-thread-6} 
BaseLivyInterprereter.java[callRestAPI]:441) - Get response, StatusCode: 200, 
responseBody: {"id":1,"state":"running","output":null,"progress":0.8}
     INFO [2017-03-14 10:03:45,786] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:181) - progress:80
     INFO [2017-03-14 10:03:45,786] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:181) - progress:80
     INFO [2017-03-14 10:03:46,291] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:181) - progress:80
     INFO [2017-03-14 10:03:46,292] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:181) - progress:80
    DEBUG [2017-03-14 10:03:46,392] ({pool-2-thread-6} 
BaseLivyInterprereter.java[callRestAPI]:407) - Call rest api in 
http://localhost:8999/sessions/11/statements/1, method: GET, jsonData:
    DEBUG [2017-03-14 10:03:46,422] ({pool-2-thread-6} 
BaseLivyInterprereter.java[callRestAPI]:441) - Get response, StatusCode: 200, 
responseBody: {"id":1,"state":"running","output":null,"progress":0.9}
     INFO [2017-03-14 10:03:46,795] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:181) - progress:90
     INFO [2017-03-14 10:03:46,796] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:181) - progress:90
     INFO [2017-03-14 10:03:47,297] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:181) - progress:90
     INFO [2017-03-14 10:03:47,297] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:181) - progress:90
    ```
    
    After
    ```
    DEBUG [2017-03-14 11:15:57,176] ({pool-2-thread-2} 
BaseLivyInterprereter.java[callRestAPI]:432) - Get response, StatusCode: 200, 
responseBody: {"id":0,"state":"running","output":null,"progress":0.6}
     INFO [2017-03-14 11:15:57,439] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:176) - getProcess:**********
     INFO [2017-03-14 11:15:57,942] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:176) - getProcess:**********
    DEBUG [2017-03-14 11:15:58,177] ({pool-2-thread-2} 
BaseLivyInterprereter.java[callRestAPI]:398) - Call rest api in 
http://localhost:8999/sessions/4/statements/0, method: GET, jsonData:
    DEBUG [2017-03-14 11:15:58,193] ({pool-2-thread-2} 
BaseLivyInterprereter.java[callRestAPI]:432) - Get response, StatusCode: 200, 
responseBody: {"id":0,"state":"running","output":null,"progress":0.8}
     INFO [2017-03-14 11:15:58,443] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:176) - getProcess:**********
     INFO [2017-03-14 11:15:58,947] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:176) - getProcess:**********
    DEBUG [2017-03-14 11:15:59,195] ({pool-2-thread-2} 
BaseLivyInterprereter.java[callRestAPI]:398) - Call rest api in 
http://localhost:8999/sessions/4/statements/0, method: GET, jsonData:
    DEBUG [2017-03-14 11:15:59,213] ({pool-2-thread-2} 
BaseLivyInterprereter.java[callRestAPI]:432) - Get response, StatusCode: 200, 
responseBody: {"id":0,"state":"running","output":null,"progress":0.9}
     INFO [2017-03-14 11:15:59,451] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:176) - getProcess:**********
     INFO [2017-03-14 11:15:59,957] ({pool-1-thread-3} 
BaseLivyInterprereter.java[getProgress]:176) - getProcess:**********
    ```
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? No


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zjffdu/zeppelin ZEPPELIN-2256

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

    https://github.com/apache/zeppelin/pull/2131.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 #2131
    
----
commit 1eed90744bb312b9af57b3c7871019acc77530b0
Author: Jeff Zhang <zjf...@apache.org>
Date:   2017-03-14T03:17:27Z

    ZEPPELIN-2256. poll job progress is called twice

----


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