mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Park" <>
Subject Re: Review Request 32140: Enabled 'Resources' to handle 'Resource::ReservationInfo'.
Date Mon, 27 Apr 2015 17:28:09 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated April 27, 2015, 5:28 p.m.)

Review request for mesos, Alexander Rukletsov, Ben Mahler, and Jie Yu.


Added the valid states of (role, reservation) pair of Resource objects to improve documentation
on what the Resource predicates represent.

Bugs: MESOS-2476

Repository: mesos


`Resource::ReservationInfo` was introduced in [r32139](
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 (updated)

  include/mesos/resources.hpp 56affd45e1e71e96ff5778b43271f81b9b9a9e4d 
  src/common/resources.cpp 2c99b6884d7296099e19e2e3182cbe11b5e1e059 
  src/tests/mesos.hpp 19db71217f0a3f1ab17a6fd4408f8251410d731d 
  src/tests/resources_tests.cpp 7e0ad98c3366f647f190363a0e6b576dbfc7d415 



make check


Michael Park

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message