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

Ship it!


Sweet!


src/common/resources.hpp
<https://reviews.apache.org/r/12343/#comment47269>

    Just like having a "primitive" for flattening Resources, I think we should 
have a primitive for this too. Maybe s/getRole/extract/?



src/common/resources.hpp
<https://reviews.apache.org/r/12343/#comment47277>

    Awesome!



src/master/hierarchical_allocator_process.hpp
<https://reviews.apache.org/r/12343/#comment47270>

    s/undedicated/unreserved/



src/master/hierarchical_allocator_process.hpp
<https://reviews.apache.org/r/12343/#comment47271>

    s/dedicated/reserved/



src/master/hierarchical_allocator_process.hpp
<https://reviews.apache.org/r/12343/#comment47276>

    Can you just do:
    
    resources += slaves[slaveId].available.extract(role);
    
    Or at the very least move the variable into the if block since it's not 
being used outside (and you don't need to set it to 'Resources()' to start):
    
    Resources reserved = slaves[slaveId].available.extract(role);
    resources += reserved;
    
    And even above you could just do:
    
    Resources resources = slaves[slaveId].available.extract("*");



src/slave/slave.cpp
<https://reviews.apache.org/r/12343/#comment47275>

    Please wrap these (here and below):
    
    Resource r = Resources::parse(
        "mem",
        stringify(mem.megabytes()),
        flags.default_role).get();


- Benjamin Hindman


On July 17, 2013, 3:39 a.m., Thomas Marshall wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12343/
> -----------------------------------------------------------
> 
> (Updated July 17, 2013, 3:39 a.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Bugs: MESOS-505
>     https://issues.apache.org/jira/browse/MESOS-505
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add reservations to slaves, including a command line flag and field in 
> SlaveInfo. Also update HierarchicalAllocatorProcess to consider reservations 
> when making allocations.
> 
> 
> Diffs
> -----
> 
>   src/common/resources.hpp 42dfb6a 
>   src/common/resources.cpp 8bc1057 
>   src/master/hierarchical_allocator_process.hpp c959c3f 
>   src/slave/flags.hpp 94c393e 
>   src/slave/slave.cpp 9a2c671 
> 
> Diff: https://reviews.apache.org/r/12343/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Thomas Marshall
> 
>

Reply via email to