You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by James Peach <jp...@apache.org> on 2015/09/02 18:07:08 UTC

Re: Review Request 37873: Add quiesce logic in allocator

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


Using a ```RefusedFilter``` for this is not the right solution. The point of the suppress call is to have a cheap way to disable offers at a framework granularity. Adding a ```RefusedFilter``` for the total is not cheap. Filters are not ordered and a framework might have already accumulated a lot of filters by declining offers. All that is needed is a boolean flag on the framework.

- James Peach


On Aug. 31, 2015, 5:49 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37873/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2015, 5:49 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Jie Yu, and Vinod Kone.
> 
> 
> Bugs: MESOS-3037
>     https://issues.apache.org/jira/browse/MESOS-3037
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add quiesce logic in allocator
> 
> 
> Diffs
> -----
> 
>   include/mesos/master/allocator.hpp 659f37b3f9d9fa02da9bdb6c85cd3c180a24b73a 
>   src/master/allocator/mesos/allocator.hpp aa55755a9c3250579e9366bdbc17a2449e95d659 
>   src/master/allocator/mesos/hierarchical.hpp 38f8fd2c84314bb3731684d0e9795cb4f50a227e 
>   src/master/master.cpp 95207d24db0aa052eb70c4cc7eb75d0611c365cf 
>   src/tests/mesos.hpp b2160f50db3e0b0d04b0625e7589004016c0f746 
> 
> Diff: https://reviews.apache.org/r/37873/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 37873: Add quiesce logic in allocator

Posted by James Peach <jp...@apache.org>.

> On Sept. 2, 2015, 4:07 p.m., James Peach wrote:
> > Using a ```RefusedFilter``` for this is not the right solution. The point of the suppress call is to have a cheap way to disable offers at a framework granularity. Adding a ```RefusedFilter``` for the total is not cheap. Filters are not ordered and a framework might have already accumulated a lot of filters by declining offers. All that is needed is a boolean flag on the framework.
> 
> Guangya Liu wrote:
>     Thanks James, but the problem is that we also want to add some logic of disabling quiesce offer after a specified time out so there is no need to involve operator to disable the quiesce offer. It is good to add a boolean value to framework to quiesce offer, but the problem is how to disable quiesce offer automatically? Adding a filter can enable disable a quiesce offer automatically, do you have any other solutions for this?

I think you can solve this by using a pointer instead of a boolean flag. Add a new ```SuppressedFilter``` class that just represents a suppression request. When you receive a suppression, stash the pointer in the framework. Now you can tell that the framework is suppressed because the pointer is non-null. On suppression timeout, you can clear the framework pointer if it is the same as the filter you are clearing. Since you never dereference the framework's copy of the pointer, the whole scheme is safe.


- James


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


On Aug. 31, 2015, 5:49 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37873/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2015, 5:49 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Jie Yu, and Vinod Kone.
> 
> 
> Bugs: MESOS-3037
>     https://issues.apache.org/jira/browse/MESOS-3037
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add quiesce logic in allocator
> 
> 
> Diffs
> -----
> 
>   include/mesos/master/allocator.hpp 659f37b3f9d9fa02da9bdb6c85cd3c180a24b73a 
>   src/master/allocator/mesos/allocator.hpp aa55755a9c3250579e9366bdbc17a2449e95d659 
>   src/master/allocator/mesos/hierarchical.hpp 38f8fd2c84314bb3731684d0e9795cb4f50a227e 
>   src/master/master.cpp 95207d24db0aa052eb70c4cc7eb75d0611c365cf 
>   src/tests/mesos.hpp b2160f50db3e0b0d04b0625e7589004016c0f746 
> 
> Diff: https://reviews.apache.org/r/37873/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 37873: Add quiesce logic in allocator

Posted by Guangya Liu <gy...@gmail.com>.

> On 九月 2, 2015, 4:07 p.m., James Peach wrote:
> > Using a ```RefusedFilter``` for this is not the right solution. The point of the suppress call is to have a cheap way to disable offers at a framework granularity. Adding a ```RefusedFilter``` for the total is not cheap. Filters are not ordered and a framework might have already accumulated a lot of filters by declining offers. All that is needed is a boolean flag on the framework.

Thanks James, but the problem is that we also want to add some logic of disabling quiesce offer after a specified time out so there is no need to involve operator to disable the quiesce offer. It is good to add a boolean value to framework to quiesce offer, but the problem is how to disable quiesce offer automatically? Adding a filter can enable disable a quiesce offer automatically, do you have any other solutions for this?


- Guangya


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


On 八月 31, 2015, 5:49 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37873/
> -----------------------------------------------------------
> 
> (Updated 八月 31, 2015, 5:49 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Jie Yu, and Vinod Kone.
> 
> 
> Bugs: MESOS-3037
>     https://issues.apache.org/jira/browse/MESOS-3037
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add quiesce logic in allocator
> 
> 
> Diffs
> -----
> 
>   include/mesos/master/allocator.hpp 659f37b3f9d9fa02da9bdb6c85cd3c180a24b73a 
>   src/master/allocator/mesos/allocator.hpp aa55755a9c3250579e9366bdbc17a2449e95d659 
>   src/master/allocator/mesos/hierarchical.hpp 38f8fd2c84314bb3731684d0e9795cb4f50a227e 
>   src/master/master.cpp 95207d24db0aa052eb70c4cc7eb75d0611c365cf 
>   src/tests/mesos.hpp b2160f50db3e0b0d04b0625e7589004016c0f746 
> 
> Diff: https://reviews.apache.org/r/37873/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>