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

Ship it!


Minor nits, otherwise looks good to me!


src/master/http.cpp
<https://reviews.apache.org/r/31665/#comment128602>

    This comment should go down, `Resources::sum()` is problematic, not 
`operator +` for hashmap, right?



src/master/http.cpp
<https://reviews.apache.org/r/31665/#comment128603>

    Same here. It's about deprecating the JSON entry, not the intermediate 
variable.



src/master/http.cpp
<https://reviews.apache.org/r/31665/#comment128604>

    Not sure what you mean here. Is it worth creating a JIRA ticket?


- Alexander Rukletsov


On March 7, 2015, 10:02 a.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31665/
> -----------------------------------------------------------
> 
> (Updated March 7, 2015, 10:02 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Ben Mahler.
> 
> 
> 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
> -----
> 
>   src/master/http.cpp b8eef69505b147d4c8a0e005dff545b9fc12a220 
>   src/master/master.hpp 3c957abcb54a0c23b8549c1d21d2d9277791938d 
>   src/master/master.cpp 68ca19a9ae680e3ae5bd433a9842baf69f2360ec 
> 
> Diff: https://reviews.apache.org/r/31665/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Michael Park
> 
>

Reply via email to