mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jie Yu" <yujie....@gmail.com>
Subject Re: Review Request 30131: Used persistent volumes consistently in the code base.
Date Fri, 23 Jan 2015 17:19:07 GMT


> On Jan. 23, 2015, 7:16 a.m., Michael Park wrote:
> > include/mesos/resources.hpp, lines 160-161
> > <https://reviews.apache.org/r/30131/diff/1/?file=828568#file828568line160>
> >
> >     Rather than taking a template type `F`, we can take a `bool (*predicate)(const
Resource&)` or `const lambda::function<bool(const Resource&)> &predicate`.
This would allow us to move the definition into the `cpp` file as well. Is there a reason
you chose `F` instead?

The reason I choose F is because it would allow us to use inline lambda in the future:
```
resources.filter([] (const Resource& resource) {
  return resource.has_disk() && resource.disk().has_persistence();
});
```


- Jie


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


On Jan. 21, 2015, 6:12 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30131/
> -----------------------------------------------------------
> 
> (Updated Jan. 21, 2015, 6:12 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Michael Park, and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Used persistent volumes consistently in the code base. (previously, we used persistent
disk).
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 7935e7f9bfe66d1900594dcdcb800c4593a3940f 
>   src/common/resources.cpp 214e441fb86aa0c094c28ed5801089051468137b 
>   src/master/drf_sorter.cpp 967c8aa00606445785836c3e3825a6f467746d33 
>   src/master/master.cpp e9dcca3c92c94f3123519855e238bcef47eeece9 
>   src/messages/messages.proto 5bd075e9bfe17be334294b5e4c573eb0233030be 
>   src/slave/containerizer/isolators/posix/disk.cpp bb1779fd644a33527068868a45cf9c19d7732727

>   src/tests/resource_offers_tests.cpp d098e7016ac0da7f1d629af099bb1b8fa66da839 
>   src/tests/resources_tests.cpp b7c1ddfda952f2d6b7f82e90cfe7b6b0aafbc36a 
>   src/tests/sorter_tests.cpp 56e5714c2ab97d0ac81d29e1acb1fbec15471489 
> 
> Diff: https://reviews.apache.org/r/30131/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message