You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@giraph.apache.org by Maja Kabiljo <ma...@fb.com> on 2013/09/14 00:11:15 UTC

Review Request 14139: Provide a way to halt running application

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14139/
-----------------------------------------------------------

Review request for giraph.


Bugs: GIRAPH-756
    https://issues.apache.org/jira/browse/GIRAPH-756


Repository: giraph-git


Description
-------

It would be good to have a way to tell a running application to halt after current superstep is done instead of just killing it. For example, it would be useful when we have a long running application, but we need resources for another job, or we see that the result is good enough, we can just halt it and still get the output.

There is a special zk node which master checks for and which should be created in order to halt. Created a short script which can be used to create a zk node. After running the application instructions on how to halt will be printed to terminal.


Diffs
-----

  bin/giraph-env 9aa78bb 
  bin/halt-application PRE-CREATION 
  giraph-core/src/main/java/org/apache/giraph/bsp/BspService.java aae01da 
  giraph-core/src/main/java/org/apache/giraph/conf/GiraphConstants.java 7c9b19a 
  giraph-core/src/main/java/org/apache/giraph/graph/GraphTaskManager.java 704fb9e 
  giraph-core/src/main/java/org/apache/giraph/job/DefaultJobObserver.java 2e703ca 
  giraph-core/src/main/java/org/apache/giraph/job/GiraphJob.java 05b07a5 
  giraph-core/src/main/java/org/apache/giraph/job/GiraphJobObserver.java fbcc4f1 
  giraph-core/src/main/java/org/apache/giraph/job/HaltApplicationUtils.java PRE-CREATION 
  giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java 454c934 
  giraph-core/src/main/java/org/apache/giraph/zk/ZooKeeperNodeCreator.java PRE-CREATION 

Diff: https://reviews.apache.org/r/14139/diff/


Testing
-------

mvn clean verify
Verified that application halts when the zk node is created


Thanks,

Maja Kabiljo


Re: Review Request 14139: Provide a way to halt running application

Posted by Maja Kabiljo <ma...@fb.com>.

> On Sept. 13, 2013, 11:20 p.m., Avery Ching wrote:
> > +1, this looks great.

Thanks for the quick review Avery, committed!


- Maja


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14139/#review26112
-----------------------------------------------------------


On Sept. 13, 2013, 10:11 p.m., Maja Kabiljo wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14139/
> -----------------------------------------------------------
> 
> (Updated Sept. 13, 2013, 10:11 p.m.)
> 
> 
> Review request for giraph.
> 
> 
> Bugs: GIRAPH-756
>     https://issues.apache.org/jira/browse/GIRAPH-756
> 
> 
> Repository: giraph-git
> 
> 
> Description
> -------
> 
> It would be good to have a way to tell a running application to halt after current superstep is done instead of just killing it. For example, it would be useful when we have a long running application, but we need resources for another job, or we see that the result is good enough, we can just halt it and still get the output.
> 
> There is a special zk node which master checks for and which should be created in order to halt. Created a short script which can be used to create a zk node. After running the application instructions on how to halt will be printed to terminal.
> 
> 
> Diffs
> -----
> 
>   bin/giraph-env 9aa78bb 
>   bin/halt-application PRE-CREATION 
>   giraph-core/src/main/java/org/apache/giraph/bsp/BspService.java aae01da 
>   giraph-core/src/main/java/org/apache/giraph/conf/GiraphConstants.java 7c9b19a 
>   giraph-core/src/main/java/org/apache/giraph/graph/GraphTaskManager.java 704fb9e 
>   giraph-core/src/main/java/org/apache/giraph/job/DefaultJobObserver.java 2e703ca 
>   giraph-core/src/main/java/org/apache/giraph/job/GiraphJob.java 05b07a5 
>   giraph-core/src/main/java/org/apache/giraph/job/GiraphJobObserver.java fbcc4f1 
>   giraph-core/src/main/java/org/apache/giraph/job/HaltApplicationUtils.java PRE-CREATION 
>   giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java 454c934 
>   giraph-core/src/main/java/org/apache/giraph/zk/ZooKeeperNodeCreator.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/14139/diff/
> 
> 
> Testing
> -------
> 
> mvn clean verify
> Verified that application halts when the zk node is created
> 
> 
> Thanks,
> 
> Maja Kabiljo
> 
>


Re: Review Request 14139: Provide a way to halt running application

Posted by Avery Ching <av...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14139/#review26112
-----------------------------------------------------------

Ship it!


+1, this looks great.


giraph-core/src/main/java/org/apache/giraph/job/HaltApplicationUtils.java
<https://reviews.apache.org/r/14139/#comment50964>

    Please define as a constant.



giraph-core/src/main/java/org/apache/giraph/job/HaltApplicationUtils.java
<https://reviews.apache.org/r/14139/#comment50965>

    Please define as a constant.


- Avery Ching


On Sept. 13, 2013, 10:11 p.m., Maja Kabiljo wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14139/
> -----------------------------------------------------------
> 
> (Updated Sept. 13, 2013, 10:11 p.m.)
> 
> 
> Review request for giraph.
> 
> 
> Bugs: GIRAPH-756
>     https://issues.apache.org/jira/browse/GIRAPH-756
> 
> 
> Repository: giraph-git
> 
> 
> Description
> -------
> 
> It would be good to have a way to tell a running application to halt after current superstep is done instead of just killing it. For example, it would be useful when we have a long running application, but we need resources for another job, or we see that the result is good enough, we can just halt it and still get the output.
> 
> There is a special zk node which master checks for and which should be created in order to halt. Created a short script which can be used to create a zk node. After running the application instructions on how to halt will be printed to terminal.
> 
> 
> Diffs
> -----
> 
>   bin/giraph-env 9aa78bb 
>   bin/halt-application PRE-CREATION 
>   giraph-core/src/main/java/org/apache/giraph/bsp/BspService.java aae01da 
>   giraph-core/src/main/java/org/apache/giraph/conf/GiraphConstants.java 7c9b19a 
>   giraph-core/src/main/java/org/apache/giraph/graph/GraphTaskManager.java 704fb9e 
>   giraph-core/src/main/java/org/apache/giraph/job/DefaultJobObserver.java 2e703ca 
>   giraph-core/src/main/java/org/apache/giraph/job/GiraphJob.java 05b07a5 
>   giraph-core/src/main/java/org/apache/giraph/job/GiraphJobObserver.java fbcc4f1 
>   giraph-core/src/main/java/org/apache/giraph/job/HaltApplicationUtils.java PRE-CREATION 
>   giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java 454c934 
>   giraph-core/src/main/java/org/apache/giraph/zk/ZooKeeperNodeCreator.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/14139/diff/
> 
> 
> Testing
> -------
> 
> mvn clean verify
> Verified that application halts when the zk node is created
> 
> 
> Thanks,
> 
> Maja Kabiljo
> 
>