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



src/common/resources.cpp
<https://reviews.apache.org/r/32140/#comment124414>

    Why these operatos (also those that were here before) are defined here and 
not in `include/mesos/type_utils.{hpp|cpp}`?



src/common/resources.cpp
<https://reviews.apache.org/r/32140/#comment124420>

    Not yours, but resently, Vinod did a cleanup in equivalence operators for 
our proto messages in `type_utils.{hpp|cpp}`: 
https://reviews.apache.org/r/31904/. I think we should do the same here for 
consistency (most probably in a separate RR). Also, one more point to extract 
these out to `type_utils`.



src/common/resources.cpp
<https://reviews.apache.org/r/32140/#comment124423>

    Can we subtract resources reserved for different frameworks?



src/common/resources.cpp
<https://reviews.apache.org/r/32140/#comment124487>

    I would put accent on reservation: "Invalid reservation ..."



src/common/resources.cpp
<https://reviews.apache.org/r/32140/#comment124488>

    This checks whether a resource is reserved for a role. Do we need to have 
an overload for framework reservations? Or add optional `FrameworkID` arg?


- Alexander Rukletsov


On March 17, 2015, 4:06 a.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32140/
> -----------------------------------------------------------
> 
> (Updated March 17, 2015, 4:06 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Ben Mahler, and Jie Yu.
> 
> 
> Bugs: MESOS-2476
>     https://issues.apache.org/jira/browse/MESOS-2476
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> `Resource::ReservationInfo` was introduced in 
> [r32139](https://reviews.apache.org/r/32139). We need to consider it in our 
> `Resources` class implementation.
> 
> ### `Resources::flatten`
> 
> `flatten` is used as the utility function to cross reservation boundaries 
> without affecting the given resources. Since the reservation is now specified 
> by the (`role`, `reservation`) pair, `flatten` needs to consider 
> `ReservationInfo` as well.
> 
> ### `Resources::validate`
> 
> If `role == "*"`, then `reservation` field must not be set.
> 
> ### `Resources` comparators
> 
> `operator==`, `addable` and `substractable` need to test for 
> `ReservationInfo` as well.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp da6d48871a0061d8bbf5e681dd6e7edac659d812 
>   src/common/resources.cpp 2c99b6884d7296099e19e2e3182cbe11b5e1e059 
> 
> Diff: https://reviews.apache.org/r/32140/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Michael Park
> 
>

Reply via email to