You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Neil Conway <ne...@gmail.com> on 2017/05/23 06:27:48 UTC

Review Request 59483: Replaced the sorter's notion of "activation" with a three-valued enum.

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

Review request for mesos, Benjamin Mahler, James Peach, Michael Park, and Jiang Yan Xu.


Repository: mesos


Description
-------

Conceptually, a node in the sorter tree can either be an internal node
or a leaf node. Furthermore, leaf nodes can either be active or inactive
(internal nodes do not have a concept of "activation").

We previously represented this situation with a single boolean,
`active`. The boolean was true for active leaves, and false for inactive
leaves and internal nodes. Whether a node was an internal node was
determined by checking the number of children it has.

This commit replaces `active` with a three-valued enum named `kind`,
which can take on the values `ACTIVE_LEAF`, `INACTIVE_LEAF`, or
`INTERNAL`. This enforces the idea that internal nodes do not have a
notion of "activation", and more explicitly distinguishes between leaf
and internal nodes.


Diffs
-----

  src/master/allocator/sorter/drf/sorter.hpp fee58d6d1f08163e2a06a4a20c891fe535c3dcff 
  src/master/allocator/sorter/drf/sorter.cpp 26b77f578f3235a8792c72d4575d607cdb2c7de7 


Diff: https://reviews.apache.org/r/59483/diff/1/


Testing
-------

`make check`


Thanks,

Neil Conway


Re: Review Request 59483: Replaced the sorter's notion of "activation" with a three-valued enum.

Posted by Michael Park <mp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59483/#review175905
-----------------------------------------------------------


Ship it!




Ship It!

- Michael Park


On May 22, 2017, 11:27 p.m., Neil Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59483/
> -----------------------------------------------------------
> 
> (Updated May 22, 2017, 11:27 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, James Peach, Michael Park, and Jiang Yan Xu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Conceptually, a node in the sorter tree can either be an internal node
> or a leaf node. Furthermore, leaf nodes can either be active or inactive
> (internal nodes do not have a concept of "activation").
> 
> We previously represented this situation with a single boolean,
> `active`. The boolean was true for active leaves, and false for inactive
> leaves and internal nodes. Whether a node was an internal node was
> determined by checking the number of children it has.
> 
> This commit replaces `active` with a three-valued enum named `kind`,
> which can take on the values `ACTIVE_LEAF`, `INACTIVE_LEAF`, or
> `INTERNAL`. This enforces the idea that internal nodes do not have a
> notion of "activation", and more explicitly distinguishes between leaf
> and internal nodes.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/sorter/drf/sorter.hpp fee58d6d1f08163e2a06a4a20c891fe535c3dcff 
>   src/master/allocator/sorter/drf/sorter.cpp 26b77f578f3235a8792c72d4575d607cdb2c7de7 
> 
> 
> Diff: https://reviews.apache.org/r/59483/diff/1/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Neil Conway
> 
>