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

Ship it!



src/slave/containerizer/composing.cpp
<https://reviews.apache.org/r/23462/#comment84132>

    Can you use the following here:
    
    foreach (Containerizer* containerizer, containerizers_) {
      ...
    }
    
    This reads better.



src/slave/containerizer/composing.cpp
<https://reviews.apache.org/r/23462/#comment84142>

    Now I see why you are doing this. It's a little hard to follow. And you are 
relying on the fact that 'containers' and '_containers' are in _sync_ (implicit 
assumption). How about the following:
    
    Future<Nothing> _recover(const Option<state::SlaveState>& state)
    {
      list<Future<Nothing> > futures;
      foreach (Containerizer* containerizer, containerizers_) {
        futures.push_back(
            containerizer->containers()
              .then(defer(self(), &Self::__recover, lambda::_1, 
containerizer)));
      }
    
      return collect(futures)
        .then(lambda::bind(&_nothing));
    }
    
    Future<Nothing> __recover(const hashset<ContainerID>& containers, 
Containerizer* containerizer)
    {
      containers_[containerizer] = containers;
      return Nothing();
    }
    



src/slave/containerizer/composing.cpp
<https://reviews.apache.org/r/23462/#comment84133>

    Ditto.



src/slave/containerizer/composing.cpp
<https://reviews.apache.org/r/23462/#comment84143>

    Kill white space.


- Jie Yu


On July 14, 2014, 10:30 p.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23462/
> -----------------------------------------------------------
> 
> (Updated July 14, 2014, 10:30 p.m.)
> 
> 
> Review request for mesos, Ian Downes and Jie Yu.
> 
> 
> Bugs: MESOS-1527
>     https://issues.apache.org/jira/browse/MESOS-1527
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Next part of MESOS-1527, see dependent review 23461 for the first phase.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 2c7bfc57103c47523466c297f2596eaf4eb55c3c 
>   src/slave/containerizer/composing.hpp PRE-CREATION 
>   src/slave/containerizer/composing.cpp PRE-CREATION 
>   src/slave/containerizer/containerizer.cpp 
> 1b71f33b430645300d171eadc9f7de96d28adf60 
>   src/slave/flags.hpp 1fe7b7da5aaa221ed6b94203b1189a80b14edd25 
> 
> Diff: https://reviews.apache.org/r/23462/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>

Reply via email to