You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Alexander Rukletsov <ru...@gmail.com> on 2015/11/26 18:37:40 UTC

Review Request 40755: Introduced filter for non-revocable resources.

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

Review request for mesos and Michael Park.


Bugs: MESOS-4020
    https://issues.apache.org/jira/browse/MESOS-4020


Repository: mesos


Description
-------

See summary.


Diffs
-----

  include/mesos/resources.hpp 51c63f8305f6c0313e0b34f912f5e53396a1591d 
  src/common/resources.cpp b4abf5405039d7d0a5028ccf034ad2e9623d064c 

Diff: https://reviews.apache.org/r/40755/diff/


Testing
-------

make check (Mac OS X 10.10.4)


Thanks,

Alexander Rukletsov


Re: Review Request 40755: Introduced filter for non-revocable resources.

Posted by Alexander Rukletsov <ru...@gmail.com>.

> On Nov. 27, 2015, 12:34 a.m., Klaus Ma wrote:
> > src/common/resources.cpp, line 775
> > <https://reviews.apache.org/r/40755/diff/1/?file=1147692#file1147692line775>
> >
> >     Any UT cases for it?
> 
> Alexander Rukletsov wrote:
>     What is a UT case? google points me to https://en.wikipedia.org/wiki/Fisher_v._University_of_Texas
> 
> Klaus Ma wrote:
>     sorry; I mean unit test :).

Sure, good idea.


- Alexander


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


On Nov. 26, 2015, 5:37 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40755/
> -----------------------------------------------------------
> 
> (Updated Nov. 26, 2015, 5:37 p.m.)
> 
> 
> Review request for mesos and Michael Park.
> 
> 
> Bugs: MESOS-4020
>     https://issues.apache.org/jira/browse/MESOS-4020
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 51c63f8305f6c0313e0b34f912f5e53396a1591d 
>   src/common/resources.cpp b4abf5405039d7d0a5028ccf034ad2e9623d064c 
> 
> Diff: https://reviews.apache.org/r/40755/diff/
> 
> 
> Testing
> -------
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


Re: Review Request 40755: Introduced filter for non-revocable resources.

Posted by Alexander Rukletsov <ru...@gmail.com>.

> On Nov. 27, 2015, 12:34 a.m., Klaus Ma wrote:
> > src/common/resources.cpp, line 775
> > <https://reviews.apache.org/r/40755/diff/1/?file=1147692#file1147692line775>
> >
> >     Any UT cases for it?

What is a UT case? google points me to https://en.wikipedia.org/wiki/Fisher_v._University_of_Texas


- Alexander


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


On Nov. 26, 2015, 5:37 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40755/
> -----------------------------------------------------------
> 
> (Updated Nov. 26, 2015, 5:37 p.m.)
> 
> 
> Review request for mesos and Michael Park.
> 
> 
> Bugs: MESOS-4020
>     https://issues.apache.org/jira/browse/MESOS-4020
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 51c63f8305f6c0313e0b34f912f5e53396a1591d 
>   src/common/resources.cpp b4abf5405039d7d0a5028ccf034ad2e9623d064c 
> 
> Diff: https://reviews.apache.org/r/40755/diff/
> 
> 
> Testing
> -------
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


Re: Review Request 40755: Introduced filter for non-revocable resources.

Posted by Klaus Ma <kl...@gmail.com>.

> On Nov. 27, 2015, 8:34 a.m., Klaus Ma wrote:
> > src/common/resources.cpp, line 775
> > <https://reviews.apache.org/r/40755/diff/1/?file=1147692#file1147692line775>
> >
> >     Any UT cases for it?
> 
> Alexander Rukletsov wrote:
>     What is a UT case? google points me to https://en.wikipedia.org/wiki/Fisher_v._University_of_Texas

sorry; I mean unit test :).


- Klaus


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


On Nov. 27, 2015, 1:37 a.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40755/
> -----------------------------------------------------------
> 
> (Updated Nov. 27, 2015, 1:37 a.m.)
> 
> 
> Review request for mesos and Michael Park.
> 
> 
> Bugs: MESOS-4020
>     https://issues.apache.org/jira/browse/MESOS-4020
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 51c63f8305f6c0313e0b34f912f5e53396a1591d 
>   src/common/resources.cpp b4abf5405039d7d0a5028ccf034ad2e9623d064c 
> 
> Diff: https://reviews.apache.org/r/40755/diff/
> 
> 
> Testing
> -------
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


Re: Review Request 40755: Introduced filter for non-revocable resources.

Posted by Klaus Ma <kl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40755/#review108174
-----------------------------------------------------------



src/common/resources.cpp (line 775)
<https://reviews.apache.org/r/40755/#comment167507>

    Any UT cases for it?


- Klaus Ma


On Nov. 27, 2015, 1:37 a.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40755/
> -----------------------------------------------------------
> 
> (Updated Nov. 27, 2015, 1:37 a.m.)
> 
> 
> Review request for mesos and Michael Park.
> 
> 
> Bugs: MESOS-4020
>     https://issues.apache.org/jira/browse/MESOS-4020
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 51c63f8305f6c0313e0b34f912f5e53396a1591d 
>   src/common/resources.cpp b4abf5405039d7d0a5028ccf034ad2e9623d064c 
> 
> Diff: https://reviews.apache.org/r/40755/diff/
> 
> 
> Testing
> -------
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


Re: Review Request 40755: Introduced filter for non-revocable resources.

Posted by Alexander Rukletsov <ru...@gmail.com>.

> On Nov. 27, 2015, 2:32 a.m., Michael Park wrote:
> > src/common/resources.cpp, lines 777-778
> > <https://reviews.apache.org/r/40755/diff/1/?file=1147692#file1147692line777>
> >
> >     I think it would be simpler if we were to just use  a lambda here, what do you think?
> >     
> >     ```cpp
> >     return filter(
> >         [](const Resource& resource) { return !resource.isRevocable(); });
> >     ```

I think performance-wise both approaches are comparable, but your suggestion is more verbose. I'll update the patch.


- Alexander


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


On Nov. 26, 2015, 5:37 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40755/
> -----------------------------------------------------------
> 
> (Updated Nov. 26, 2015, 5:37 p.m.)
> 
> 
> Review request for mesos and Michael Park.
> 
> 
> Bugs: MESOS-4020
>     https://issues.apache.org/jira/browse/MESOS-4020
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 51c63f8305f6c0313e0b34f912f5e53396a1591d 
>   src/common/resources.cpp b4abf5405039d7d0a5028ccf034ad2e9623d064c 
> 
> Diff: https://reviews.apache.org/r/40755/diff/
> 
> 
> Testing
> -------
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


Re: Review Request 40755: Introduced filter for non-revocable resources.

Posted by Michael Park <mc...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40755/#review108182
-----------------------------------------------------------



src/common/resources.cpp (lines 777 - 778)
<https://reviews.apache.org/r/40755/#comment167512>

    I think it would be simpler if we were to just use  a lambda here, what do you think?
    
    ```cpp
    return filter(
        [](const Resource& resource) { return !resource.isRevocable(); });
    ```


- Michael Park


On Nov. 26, 2015, 5:37 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40755/
> -----------------------------------------------------------
> 
> (Updated Nov. 26, 2015, 5:37 p.m.)
> 
> 
> Review request for mesos and Michael Park.
> 
> 
> Bugs: MESOS-4020
>     https://issues.apache.org/jira/browse/MESOS-4020
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 51c63f8305f6c0313e0b34f912f5e53396a1591d 
>   src/common/resources.cpp b4abf5405039d7d0a5028ccf034ad2e9623d064c 
> 
> Diff: https://reviews.apache.org/r/40755/diff/
> 
> 
> Testing
> -------
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


Re: Review Request 40755: Introduced filter for non-revocable resources.

Posted by Guangya Liu <gy...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40755/#review108249
-----------------------------------------------------------

Ship it!


Ship It!

- Guangya Liu


On 十一月 27, 2015, 2:46 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40755/
> -----------------------------------------------------------
> 
> (Updated 十一月 27, 2015, 2:46 p.m.)
> 
> 
> Review request for mesos, Ian Downes and Michael Park.
> 
> 
> Bugs: MESOS-4020
>     https://issues.apache.org/jira/browse/MESOS-4020
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 51c63f8305f6c0313e0b34f912f5e53396a1591d 
>   include/mesos/v1/resources.hpp b481a9e0177b5253acc2585d5dfc6228ab63876c 
>   src/common/resources.cpp b4abf5405039d7d0a5028ccf034ad2e9623d064c 
>   src/tests/resources_tests.cpp dbd39cd5a6786682a7b528b6fea37ab78904cf12 
>   src/v1/resources.cpp 8488c318a987a150fc5fde26b54246e8effb0428 
> 
> Diff: https://reviews.apache.org/r/40755/diff/
> 
> 
> Testing
> -------
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


Re: Review Request 40755: Introduced filter for non-revocable resources.

Posted by Klaus Ma <kl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40755/#review108248
-----------------------------------------------------------

Ship it!


Ship It!

- Klaus Ma


On Nov. 27, 2015, 10:46 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40755/
> -----------------------------------------------------------
> 
> (Updated Nov. 27, 2015, 10:46 p.m.)
> 
> 
> Review request for mesos, Ian Downes and Michael Park.
> 
> 
> Bugs: MESOS-4020
>     https://issues.apache.org/jira/browse/MESOS-4020
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 51c63f8305f6c0313e0b34f912f5e53396a1591d 
>   include/mesos/v1/resources.hpp b481a9e0177b5253acc2585d5dfc6228ab63876c 
>   src/common/resources.cpp b4abf5405039d7d0a5028ccf034ad2e9623d064c 
>   src/tests/resources_tests.cpp dbd39cd5a6786682a7b528b6fea37ab78904cf12 
>   src/v1/resources.cpp 8488c318a987a150fc5fde26b54246e8effb0428 
> 
> Diff: https://reviews.apache.org/r/40755/diff/
> 
> 
> Testing
> -------
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


Re: Review Request 40755: Introduced filter for non-revocable resources.

Posted by Michael Park <mc...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40755/#review108269
-----------------------------------------------------------

Ship it!


Ship It!

- Michael Park


On Nov. 27, 2015, 2:46 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40755/
> -----------------------------------------------------------
> 
> (Updated Nov. 27, 2015, 2:46 p.m.)
> 
> 
> Review request for mesos, Ian Downes and Michael Park.
> 
> 
> Bugs: MESOS-4020
>     https://issues.apache.org/jira/browse/MESOS-4020
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 51c63f8305f6c0313e0b34f912f5e53396a1591d 
>   include/mesos/v1/resources.hpp b481a9e0177b5253acc2585d5dfc6228ab63876c 
>   src/common/resources.cpp b4abf5405039d7d0a5028ccf034ad2e9623d064c 
>   src/tests/resources_tests.cpp dbd39cd5a6786682a7b528b6fea37ab78904cf12 
>   src/v1/resources.cpp 8488c318a987a150fc5fde26b54246e8effb0428 
> 
> Diff: https://reviews.apache.org/r/40755/diff/
> 
> 
> Testing
> -------
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


Re: Review Request 40755: Introduced filter for non-revocable resources.

Posted by Alexander Rukletsov <ru...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40755/
-----------------------------------------------------------

(Updated Nov. 27, 2015, 2:46 p.m.)


Review request for mesos, Ian Downes and Michael Park.


Changes
-------

Comments and issues, +Ian Downes


Bugs: MESOS-4020
    https://issues.apache.org/jira/browse/MESOS-4020


Repository: mesos


Description
-------

See summary.


Diffs (updated)
-----

  include/mesos/resources.hpp 51c63f8305f6c0313e0b34f912f5e53396a1591d 
  include/mesos/v1/resources.hpp b481a9e0177b5253acc2585d5dfc6228ab63876c 
  src/common/resources.cpp b4abf5405039d7d0a5028ccf034ad2e9623d064c 
  src/tests/resources_tests.cpp dbd39cd5a6786682a7b528b6fea37ab78904cf12 
  src/v1/resources.cpp 8488c318a987a150fc5fde26b54246e8effb0428 

Diff: https://reviews.apache.org/r/40755/diff/


Testing
-------

make check (Mac OS X 10.10.4)


Thanks,

Alexander Rukletsov


Re: Review Request 40755: Introduced filter for non-revocable resources.

Posted by Alexander Rukletsov <ru...@gmail.com>.

> On Nov. 27, 2015, 12:54 a.m., Guangya Liu wrote:
> > src/common/resources.cpp, line 779
> > <https://reviews.apache.org/r/40755/diff/1/?file=1147692#file1147692line779>
> >
> >     1) v1 should also be updated
> >     2) Add a unit test for this new type?

Good catch, thanks! Do we have a doc which says when we should update /v1?


- Alexander


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


On Nov. 26, 2015, 5:37 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40755/
> -----------------------------------------------------------
> 
> (Updated Nov. 26, 2015, 5:37 p.m.)
> 
> 
> Review request for mesos and Michael Park.
> 
> 
> Bugs: MESOS-4020
>     https://issues.apache.org/jira/browse/MESOS-4020
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 51c63f8305f6c0313e0b34f912f5e53396a1591d 
>   src/common/resources.cpp b4abf5405039d7d0a5028ccf034ad2e9623d064c 
> 
> Diff: https://reviews.apache.org/r/40755/diff/
> 
> 
> Testing
> -------
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


Re: Review Request 40755: Introduced filter for non-revocable resources.

Posted by Guangya Liu <gy...@gmail.com>.

> On 十一月 27, 2015, 12:54 a.m., Guangya Liu wrote:
> > src/common/resources.cpp, line 779
> > <https://reviews.apache.org/r/40755/diff/1/?file=1147692#file1147692line779>
> >
> >     1) v1 should also be updated
> >     2) Add a unit test for this new type?
> 
> Alexander Rukletsov wrote:
>     Good catch, thanks! Do we have a doc which says when we should update /v1?

Not yet, but I see that the current default policy is always keep v1 and pre-v1 synced. https://issues.apache.org/jira/browse/MESOS-3510


- Guangya


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


On 十一月 27, 2015, 2:46 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40755/
> -----------------------------------------------------------
> 
> (Updated 十一月 27, 2015, 2:46 p.m.)
> 
> 
> Review request for mesos, Ian Downes and Michael Park.
> 
> 
> Bugs: MESOS-4020
>     https://issues.apache.org/jira/browse/MESOS-4020
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 51c63f8305f6c0313e0b34f912f5e53396a1591d 
>   include/mesos/v1/resources.hpp b481a9e0177b5253acc2585d5dfc6228ab63876c 
>   src/common/resources.cpp b4abf5405039d7d0a5028ccf034ad2e9623d064c 
>   src/tests/resources_tests.cpp dbd39cd5a6786682a7b528b6fea37ab78904cf12 
>   src/v1/resources.cpp 8488c318a987a150fc5fde26b54246e8effb0428 
> 
> Diff: https://reviews.apache.org/r/40755/diff/
> 
> 
> Testing
> -------
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


Re: Review Request 40755: Introduced filter for non-revocable resources.

Posted by Guangya Liu <gy...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40755/#review108176
-----------------------------------------------------------



src/common/resources.cpp (line 779)
<https://reviews.apache.org/r/40755/#comment167508>

    1) v1 should also be updated
    2) Add a unit test for this new type?


- Guangya Liu


On 十一月 26, 2015, 5:37 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40755/
> -----------------------------------------------------------
> 
> (Updated 十一月 26, 2015, 5:37 p.m.)
> 
> 
> Review request for mesos and Michael Park.
> 
> 
> Bugs: MESOS-4020
>     https://issues.apache.org/jira/browse/MESOS-4020
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 51c63f8305f6c0313e0b34f912f5e53396a1591d 
>   src/common/resources.cpp b4abf5405039d7d0a5028ccf034ad2e9623d064c 
> 
> Diff: https://reviews.apache.org/r/40755/diff/
> 
> 
> Testing
> -------
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>