> On Feb. 20, 2015, 6:30 p.m., Jie Yu wrote:
> > include/mesos/resources.hpp, lines 148-150
> > <https://reviews.apache.org/r/30911/diff/3/?file=868705#file868705line148>
> >
> >     We don't use snake_case for function names. Please
> >     ```
> >     s/persitent_volumes/persistentVolumes
> >     ```

I am a little hesitate if we want to introduce this helper or not. In many 
cases, the code is much simpler if we do
```
foreach (const Resource& resource, task.resources()) {
  if (!resource.isPersistentVolume()) {
    continue;
  }
  ...
}
```

Also, looks like the following code is not too bad as well.
```
resources.filter(Resources::isPersistentVolume)
```

What do you think?


- Jie


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


On Feb. 19, 2015, 2:54 a.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30911/
> -----------------------------------------------------------
> 
> (Updated Feb. 19, 2015, 2:54 a.m.)
> 
> 
> Review request for mesos, Adam B, Benjamin Hindman, Ben Mahler, Jie Yu, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-2348
>     https://issues.apache.org/jira/browse/MESOS-2348
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See [JIRA Ticket](https://issues.apache.org/jira/browse/MESOS-2348).
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp c7cc46e0183ea97013dd088a717da6c0e6ed5cf0 
>   src/common/resources.cpp 98371f6873482d0cdbefeb279b58ae6cc680a88f 
>   src/master/allocator/mesos/hierarchical.hpp 
> 2680d6231927867d5a8d75cbc42b81d6c75fc7f2 
>   src/master/master.hpp 6a39df04514c756415354fae66c5835ada191c52 
>   src/master/validation.cpp acc35b25c93f2d3900d79c3070b1d681416ed66b 
>   src/slave/slave.cpp ec7ec1356e745bb07484ae1755c9183b038043b3 
>   src/tests/hierarchical_allocator_tests.cpp 
> eeecfb64540b16666915074aaffaa5d506b203bc 
>   src/tests/resources_tests.cpp 3f98782fd437dba808d720bf8e9b94b8fa7e0feb 
> 
> Diff: https://reviews.apache.org/r/30911/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Michael Park
> 
>

Reply via email to