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

(Updated March 3, 2015, 8:28 p.m.)


Review request for mesos, Alexander Rukletsov and Ben Mahler.


Changes
-------

Moved `sum` into `Resources`.


Bugs: MESOS-2373
    https://issues.apache.org/jira/browse/MESOS-2373


Repository: mesos


Description
-------

`master::Framework` holds 2 member variables of type `Resources`: 
`usedResources` and `offerResources`. Both of these are aggregates of resources 
from multiple slaves and therefore are updated to be `hashmap<SlaveID, 
Resources>` instead.

There are 3 places where these variables get propagated:

(1) `allocator->addFramework(framework->id, framework->info, 
framework->usedResources)`
(2) `src/master/http.cpp`: exposes them to `state.json`.
(3) `master::Role::resources()`: needs to return `hashmap<SlaveID, Resources>` 
instead.

For (3) we can simply change the function signature since we only use it once 
in `http.cpp` and nowhere else.
For (1) and (2), we use the `sum(resources.values())` pattern to match the 
existing API in the other components.


Diffs (updated)
-----

  src/master/http.cpp 117c0ee720a60a1d8a25359028bad803f1fc2b07 
  src/master/master.hpp ce0e0b3645b099d29c6d59312a91241379d5e80c 
  src/master/master.cpp dae0955d4ab29ea74ea5ab9dd6e19b028c58c6fd 

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


Testing
-------

make check


Thanks,

Michael Park

Reply via email to