> On July 18, 2013, 5:28 p.m., Benjamin Hindman wrote:
> > src/master/hierarchical_allocator_process.hpp, lines 723-724
> > <https://reviews.apache.org/r/12343/diff/3/?file=322375#file322375line723>
> >
> >     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("*");

You're correct that the 'dedicated' variable is unnecessary, and I got rid of 
it, but we need the 'undedicated' variable in order to only count unreserved 
resources towards the framework's share that we give to the sorter (which I 
wasn't doing, and has been fixed now).


- Thomas


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


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