You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Guangya Liu <gy...@gmail.com> on 2015/12/14 06:23:37 UTC

Review Request 41333: Added helper functions to filter usage slack resources.

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

Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.


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


Repository: mesos


Description
-------

Added helper functions to filter usage slack resources.


Diffs
-----

  include/mesos/resources.hpp 9c8bfb0e7e1e40ca99b4cc75079e5b950630243d 
  include/mesos/v1/resources.hpp db87c992e2ec466cb1d4d17775bf6423a2fb15aa 
  src/common/resources.cpp 5a7981744726a0544435cbbd5007487a43a01211 
  src/tests/resources_tests.cpp ce47bac73937a6a608016f46121137d6116c1399 
  src/v1/resources.cpp d300842576b2fb8fe75f5b18699f23c1fd324717 

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


Testing
-------

make
make check


Thanks,

Guangya Liu


Re: Review Request 41333: Added helper functions to filter usage slack resources.

Posted by Jian Qiu <qi...@cn.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41333/#review110171
-----------------------------------------------------------



src/v1/resources.cpp (line 696)
<https://reviews.apache.org/r/41333/#comment169943>

    two lines


- Jian Qiu


On Dec. 14, 2015, 5:23 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41333/
> -----------------------------------------------------------
> 
> (Updated Dec. 14, 2015, 5:23 a.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.
> 
> 
> Bugs: MESOS-4146
>     https://issues.apache.org/jira/browse/MESOS-4146
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added helper functions to filter usage slack resources.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 9c8bfb0e7e1e40ca99b4cc75079e5b950630243d 
>   include/mesos/v1/resources.hpp db87c992e2ec466cb1d4d17775bf6423a2fb15aa 
>   src/common/resources.cpp 5a7981744726a0544435cbbd5007487a43a01211 
>   src/tests/resources_tests.cpp ce47bac73937a6a608016f46121137d6116c1399 
>   src/v1/resources.cpp d300842576b2fb8fe75f5b18699f23c1fd324717 
> 
> Diff: https://reviews.apache.org/r/41333/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 41333: Added helper functions to filter usage slack resources.

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




include/mesos/resources.hpp (line 174)
<https://reviews.apache.org/r/41333/#comment186112>

    `isThrottleable`?


- Klaus Ma


On March 15, 2016, 10:33 p.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41333/
> -----------------------------------------------------------
> 
> (Updated March 15, 2016, 10:33 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.
> 
> 
> Bugs: MESOS-4146
>     https://issues.apache.org/jira/browse/MESOS-4146
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added helper functions to filter usage slack resources.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp bb343ad852576a75615a93ef850b413bf77698e0 
>   include/mesos/v1/resources.hpp 719110fbbf39f1755460ac0b32e3893656054a4e 
>   src/common/resources.cpp 1f23dc83f7330c305a836d698f114b7eaf3d7ba1 
>   src/tests/resources_tests.cpp 6b004d64bb25112b19fc5d98b5bca874c5329e8c 
>   src/v1/resources.cpp c6f125ec317e2da537a6456f5cff2da0a48701d8 
> 
> Diff: https://reviews.apache.org/r/41333/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 41333: Added helper functions to filter usage slack resources.

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

(Updated 三月 15, 2016, 2:33 p.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.


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


Repository: mesos


Description
-------

Added helper functions to filter usage slack resources.


Diffs (updated)
-----

  include/mesos/resources.hpp bb343ad852576a75615a93ef850b413bf77698e0 
  include/mesos/v1/resources.hpp 719110fbbf39f1755460ac0b32e3893656054a4e 
  src/common/resources.cpp 1f23dc83f7330c305a836d698f114b7eaf3d7ba1 
  src/tests/resources_tests.cpp 6b004d64bb25112b19fc5d98b5bca874c5329e8c 
  src/v1/resources.cpp c6f125ec317e2da537a6456f5cff2da0a48701d8 

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


Testing
-------

make
make check


Thanks,

Guangya Liu


Re: Review Request 41333: Added helper functions to filter usage slack resources.

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

(Updated 三月 11, 2016, 9:06 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.


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


Repository: mesos


Description
-------

Added helper functions to filter usage slack resources.


Diffs (updated)
-----

  include/mesos/resources.hpp 388c4f383b77be490cb2debb64a734c6d6e4a176 
  include/mesos/v1/resources.hpp 64ad8bf08230aeaa173325364c91b765f091210e 
  src/common/resources.cpp cf0707209143084d86aff5e4427846f461479c54 
  src/tests/resources_tests.cpp 5357275833383bbff055689c8c1d0fa59791f2d0 
  src/v1/resources.cpp 296c4c2392384a2fcc4f2c1843980ff97e71114d 

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


Testing
-------

make
make check


Thanks,

Guangya Liu


Re: Review Request 41333: Added helper functions to filter usage slack resources.

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

(Updated 一月 20, 2016, 2:55 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.


Changes
-------

Rebase


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


Repository: mesos


Description
-------

Added helper functions to filter usage slack resources.


Diffs (updated)
-----

  include/mesos/resources.hpp cc8fef9470d779078aa408ed03e747e5a492deaa 
  include/mesos/v1/resources.hpp f4892977f8d7b0439db6e9cf7921334f606a496c 
  src/common/resources.cpp 575d6651185d8431f01d589f4afc255cb751181a 
  src/tests/resources_tests.cpp b42610f1bf8eacfd7bf388d351f8745f1d96f666 
  src/v1/resources.cpp 8de6672ba9b34947db81c74b8e03e8965e8af5fc 

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


Testing
-------

make
make check


Thanks,

Guangya Liu


Re: Review Request 41333: Added helper functions to filter usage slack resources.

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

(Updated 一月 16, 2016, 4:12 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.


Changes
-------

Update comments for usage slack helper.


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


Repository: mesos


Description (updated)
-------

Added helper functions to filter usage slack resources.


Diffs (updated)
-----

  include/mesos/resources.hpp cc8fef9470d779078aa408ed03e747e5a492deaa 
  include/mesos/v1/resources.hpp f4892977f8d7b0439db6e9cf7921334f606a496c 
  src/common/resources.cpp 575d6651185d8431f01d589f4afc255cb751181a 
  src/tests/resources_tests.cpp b42610f1bf8eacfd7bf388d351f8745f1d96f666 
  src/v1/resources.cpp 8de6672ba9b34947db81c74b8e03e8965e8af5fc 

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


Testing
-------

make
make check


Thanks,

Guangya Liu


Re: Review Request 41333: Added helper functions to filter usage slack resources.

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

> On 一月 15, 2016, 2:36 a.m., Joseph Wu wrote:
> > include/mesos/resources.hpp, line 174
> > <https://reviews.apache.org/r/41333/diff/7/?file=1187159#file1187159line174>
> >
> >     You should briefly define usage slack here.
> >     
> >     Suggestion: s/revocable/, revocable resources that are allocated but under-utilized/
> >     
> >     Ditto below.

Thanks Jospeh, will update this if we reach some agreement on its parenent patch for allocation slack ;-)


- Guangya


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


On 一月 8, 2016, 6:03 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41333/
> -----------------------------------------------------------
> 
> (Updated 一月 8, 2016, 6:03 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.
> 
> 
> Bugs: MESOS-4146
>     https://issues.apache.org/jira/browse/MESOS-4146
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added helper functions to filter usage slack resources. This helper function will be used to validate if the task is using usage slack resource or not so as to make sure that one task or executor can only use same kind of resources.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp cc8fef9470d779078aa408ed03e747e5a492deaa 
>   include/mesos/v1/resources.hpp f4892977f8d7b0439db6e9cf7921334f606a496c 
>   src/common/resources.cpp 6afd2dfd81adecf7bdb3e523bc840efb62b79ef4 
>   src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
>   src/v1/resources.cpp 8de6672ba9b34947db81c74b8e03e8965e8af5fc 
> 
> Diff: https://reviews.apache.org/r/41333/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 41333: Added helper functions to filter usage slack resources.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41333/#review114640
-----------------------------------------------------------

Ship it!


Nice and simple :)


include/mesos/resources.hpp (line 174)
<https://reviews.apache.org/r/41333/#comment175499>

    You should briefly define usage slack here.
    
    Suggestion: s/revocable/, revocable resources that are allocated but under-utilized/
    
    Ditto below.


- Joseph Wu


On Jan. 7, 2016, 10:03 p.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41333/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2016, 10:03 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.
> 
> 
> Bugs: MESOS-4146
>     https://issues.apache.org/jira/browse/MESOS-4146
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added helper functions to filter usage slack resources. This helper function will be used to validate if the task is using usage slack resource or not so as to make sure that one task or executor can only use same kind of resources.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp cc8fef9470d779078aa408ed03e747e5a492deaa 
>   include/mesos/v1/resources.hpp f4892977f8d7b0439db6e9cf7921334f606a496c 
>   src/common/resources.cpp 6afd2dfd81adecf7bdb3e523bc840efb62b79ef4 
>   src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
>   src/v1/resources.cpp 8de6672ba9b34947db81c74b8e03e8965e8af5fc 
> 
> Diff: https://reviews.apache.org/r/41333/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 41333: Added helper functions to filter usage slack resources.

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

(Updated 一月 8, 2016, 6:03 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.


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


Repository: mesos


Description
-------

Added helper functions to filter usage slack resources. This helper function will be used to validate if the task is using usage slack resource or not so as to make sure that one task or executor can only use same kind of resources.


Diffs (updated)
-----

  include/mesos/resources.hpp cc8fef9470d779078aa408ed03e747e5a492deaa 
  include/mesos/v1/resources.hpp f4892977f8d7b0439db6e9cf7921334f606a496c 
  src/common/resources.cpp 6afd2dfd81adecf7bdb3e523bc840efb62b79ef4 
  src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
  src/v1/resources.cpp 8de6672ba9b34947db81c74b8e03e8965e8af5fc 

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


Testing
-------

make
make check


Thanks,

Guangya Liu


Re: Review Request 41333: Added helper functions to filter usage slack resources.

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

(Updated 一月 8, 2016, 1:22 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.


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


Repository: mesos


Description
-------

Added helper functions to filter usage slack resources. This helper function will be used to validate if the task is using usage slack resource or not so as to make sure that one task or executor can only use same kind of resources.


Diffs (updated)
-----

  include/mesos/resources.hpp cc8fef9470d779078aa408ed03e747e5a492deaa 
  include/mesos/v1/resources.hpp f4892977f8d7b0439db6e9cf7921334f606a496c 
  src/common/resources.cpp 6afd2dfd81adecf7bdb3e523bc840efb62b79ef4 
  src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
  src/v1/resources.cpp 8de6672ba9b34947db81c74b8e03e8965e8af5fc 

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


Testing
-------

make
make check


Thanks,

Guangya Liu


Re: Review Request 41333: Added helper functions to filter usage slack resources.

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

(Updated 一月 7, 2016, 7:40 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.


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


Repository: mesos


Description
-------

Added helper functions to filter usage slack resources. This helper function will be used to validate if the task is using usage slack resource or not so as to make sure that one task or executor can only use same kind of resources.


Diffs (updated)
-----

  include/mesos/resources.hpp cc8fef9470d779078aa408ed03e747e5a492deaa 
  include/mesos/v1/resources.hpp f4892977f8d7b0439db6e9cf7921334f606a496c 
  src/common/resources.cpp 6afd2dfd81adecf7bdb3e523bc840efb62b79ef4 
  src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
  src/v1/resources.cpp 8de6672ba9b34947db81c74b8e03e8965e8af5fc 

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


Testing
-------

make
make check


Thanks,

Guangya Liu


Re: Review Request 41333: Added helper functions to filter usage slack resources.

Posted by Joseph Wu <jo...@mesosphere.io>.

> On Jan. 6, 2016, 4:01 a.m., Klaus Ma wrote:
> > Overall comments is that: is this code called by any others? If not, why should we add that? I'd suggest to add this on demand.
> 
> Joseph Wu wrote:
>     I agree.  If this is not used, we should not add it.
> 
> Guangya Liu wrote:
>     It is needed as the master need to make sure task and its executor do not run on different resources. They must run on same kind of resources, either non-revocable resources, usage slack resources or allocation slack resources.

Do we need that restriction?

Tasks can currently run on normal resources + usage slack.  In this case, the `QoSController` will kill both resource types if the usage slack is "corrected".  We decided on analogous behavior for allocation slack.


- Joseph


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


On Jan. 6, 2016, 11:40 p.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41333/
> -----------------------------------------------------------
> 
> (Updated Jan. 6, 2016, 11:40 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.
> 
> 
> Bugs: MESOS-4146
>     https://issues.apache.org/jira/browse/MESOS-4146
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added helper functions to filter usage slack resources. This helper function will be used to validate if the task is using usage slack resource or not so as to make sure that one task or executor can only use same kind of resources.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp cc8fef9470d779078aa408ed03e747e5a492deaa 
>   include/mesos/v1/resources.hpp f4892977f8d7b0439db6e9cf7921334f606a496c 
>   src/common/resources.cpp 6afd2dfd81adecf7bdb3e523bc840efb62b79ef4 
>   src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
>   src/v1/resources.cpp 8de6672ba9b34947db81c74b8e03e8965e8af5fc 
> 
> Diff: https://reviews.apache.org/r/41333/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 41333: Added helper functions to filter usage slack resources.

Posted by Joseph Wu <jo...@mesosphere.io>.

> On Jan. 6, 2016, 4:01 a.m., Klaus Ma wrote:
> > Overall comments is that: is this code called by any others? If not, why should we add that? I'd suggest to add this on demand.

I agree.  If this is not used, we should not add it.


- Joseph


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


On Jan. 1, 2016, 5:15 p.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41333/
> -----------------------------------------------------------
> 
> (Updated Jan. 1, 2016, 5:15 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.
> 
> 
> Bugs: MESOS-4146
>     https://issues.apache.org/jira/browse/MESOS-4146
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added helper functions to filter usage slack resources. This helper function will be used to validate if the task is using usage slack resource or not so as to make sure that one task or executor can only use same kind of resources.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 9c8bfb0e7e1e40ca99b4cc75079e5b950630243d 
>   include/mesos/v1/resources.hpp db87c992e2ec466cb1d4d17775bf6423a2fb15aa 
>   src/common/resources.cpp b9d31aef8babee212374e352c57fadbff02167f3 
>   src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
>   src/v1/resources.cpp 0c0eee6b3b7ae3254d7dc7b06187855c9b873764 
> 
> Diff: https://reviews.apache.org/r/41333/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 41333: Added helper functions to filter usage slack resources.

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

> On 一月 6, 2016, 12:01 p.m., Klaus Ma wrote:
> > Overall comments is that: is this code called by any others? If not, why should we add that? I'd suggest to add this on demand.
> 
> Joseph Wu wrote:
>     I agree.  If this is not used, we should not add it.
> 
> Guangya Liu wrote:
>     It is needed as the master need to make sure task and its executor do not run on different resources. They must run on same kind of resources, either non-revocable resources, usage slack resources or allocation slack resources.
> 
> Joseph Wu wrote:
>     Do we need that restriction?
>     
>     Tasks can currently run on normal resources + usage slack.  In this case, the `QoSController` will kill both resource types if the usage slack is "corrected".  We decided on analogous behavior for allocation slack.

The current implementation do not allow a task use both revocable and non-revocable resources for a specified resource. i.e. a task can only use revocable or non-revocable cpu resources but cannot both; A task can use revocable cpu and non-revocable memory resources. 

I udpated the validation here https://reviews.apache.org/r/41848/ by enhancing a task resource cannot use non-revocable, usage slack and allocation slack resources.


- Guangya


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


On 一月 7, 2016, 7:40 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41333/
> -----------------------------------------------------------
> 
> (Updated 一月 7, 2016, 7:40 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.
> 
> 
> Bugs: MESOS-4146
>     https://issues.apache.org/jira/browse/MESOS-4146
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added helper functions to filter usage slack resources. This helper function will be used to validate if the task is using usage slack resource or not so as to make sure that one task or executor can only use same kind of resources.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp cc8fef9470d779078aa408ed03e747e5a492deaa 
>   include/mesos/v1/resources.hpp f4892977f8d7b0439db6e9cf7921334f606a496c 
>   src/common/resources.cpp 6afd2dfd81adecf7bdb3e523bc840efb62b79ef4 
>   src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
>   src/v1/resources.cpp 8de6672ba9b34947db81c74b8e03e8965e8af5fc 
> 
> Diff: https://reviews.apache.org/r/41333/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 41333: Added helper functions to filter usage slack resources.

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

> On 一月 6, 2016, 12:01 p.m., Klaus Ma wrote:
> > Overall comments is that: is this code called by any others? If not, why should we add that? I'd suggest to add this on demand.
> 
> Joseph Wu wrote:
>     I agree.  If this is not used, we should not add it.

It is needed as the master need to make sure task and its executor do not run on different resources. They must run on same kind of resources, either non-revocable resources, usage slack resources or allocation slack resources.


- Guangya


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


On 一月 2, 2016, 1:15 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41333/
> -----------------------------------------------------------
> 
> (Updated 一月 2, 2016, 1:15 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.
> 
> 
> Bugs: MESOS-4146
>     https://issues.apache.org/jira/browse/MESOS-4146
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added helper functions to filter usage slack resources. This helper function will be used to validate if the task is using usage slack resource or not so as to make sure that one task or executor can only use same kind of resources.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 9c8bfb0e7e1e40ca99b4cc75079e5b950630243d 
>   include/mesos/v1/resources.hpp db87c992e2ec466cb1d4d17775bf6423a2fb15aa 
>   src/common/resources.cpp b9d31aef8babee212374e352c57fadbff02167f3 
>   src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
>   src/v1/resources.cpp 0c0eee6b3b7ae3254d7dc7b06187855c9b873764 
> 
> Diff: https://reviews.apache.org/r/41333/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 41333: Added helper functions to filter usage slack resources.

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


Overall comments is that: is this code called by any others? If not, why should we add that? I'd suggest to add this on demand.

- Klaus Ma


On Jan. 2, 2016, 9:15 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41333/
> -----------------------------------------------------------
> 
> (Updated Jan. 2, 2016, 9:15 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.
> 
> 
> Bugs: MESOS-4146
>     https://issues.apache.org/jira/browse/MESOS-4146
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added helper functions to filter usage slack resources. This helper function will be used to validate if the task is using usage slack resource or not so as to make sure that one task or executor can only use same kind of resources.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 9c8bfb0e7e1e40ca99b4cc75079e5b950630243d 
>   include/mesos/v1/resources.hpp db87c992e2ec466cb1d4d17775bf6423a2fb15aa 
>   src/common/resources.cpp b9d31aef8babee212374e352c57fadbff02167f3 
>   src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
>   src/v1/resources.cpp 0c0eee6b3b7ae3254d7dc7b06187855c9b873764 
> 
> Diff: https://reviews.apache.org/r/41333/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 41333: Added helper functions to filter usage slack resources.

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



src/common/resources.cpp (line 733)
<https://reviews.apache.org/r/41333/#comment173564>

    This's not necessary; the default value of `RevocableInfo::type` is `USAGE_SLACK`, so return `type() == USAGE_SLACK` is OK.


- Klaus Ma


On Jan. 2, 2016, 9:15 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41333/
> -----------------------------------------------------------
> 
> (Updated Jan. 2, 2016, 9:15 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.
> 
> 
> Bugs: MESOS-4146
>     https://issues.apache.org/jira/browse/MESOS-4146
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added helper functions to filter usage slack resources. This helper function will be used to validate if the task is using usage slack resource or not so as to make sure that one task or executor can only use same kind of resources.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 9c8bfb0e7e1e40ca99b4cc75079e5b950630243d 
>   include/mesos/v1/resources.hpp db87c992e2ec466cb1d4d17775bf6423a2fb15aa 
>   src/common/resources.cpp b9d31aef8babee212374e352c57fadbff02167f3 
>   src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
>   src/v1/resources.cpp 0c0eee6b3b7ae3254d7dc7b06187855c9b873764 
> 
> Diff: https://reviews.apache.org/r/41333/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 41333: Added helper functions to filter usage slack resources.

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

(Updated 一月 2, 2016, 1:15 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.


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


Repository: mesos


Description (updated)
-------

Added helper functions to filter usage slack resources. This helper function will be used to validate if the task is using usage slack resource or not so as to make sure that one task or executor can only use same kind of resources.


Diffs (updated)
-----

  include/mesos/resources.hpp 9c8bfb0e7e1e40ca99b4cc75079e5b950630243d 
  include/mesos/v1/resources.hpp db87c992e2ec466cb1d4d17775bf6423a2fb15aa 
  src/common/resources.cpp b9d31aef8babee212374e352c57fadbff02167f3 
  src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
  src/v1/resources.cpp 0c0eee6b3b7ae3254d7dc7b06187855c9b873764 

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


Testing
-------

make
make check


Thanks,

Guangya Liu


Re: Review Request 41333: Added helper functions to filter usage slack resources.

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

(Updated Dec. 17, 2015, 9:37 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.


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


Repository: mesos


Description
-------

Added helper functions to filter usage slack resources.


Diffs (updated)
-----

  include/mesos/resources.hpp 9c8bfb0e7e1e40ca99b4cc75079e5b950630243d 
  include/mesos/v1/resources.hpp db87c992e2ec466cb1d4d17775bf6423a2fb15aa 
  src/common/resources.cpp 5a7981744726a0544435cbbd5007487a43a01211 
  src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
  src/v1/resources.cpp d300842576b2fb8fe75f5b18699f23c1fd324717 

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


Testing
-------

make
make check


Thanks,

Guangya Liu


Re: Review Request 41333: Added helper functions to filter usage slack resources.

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

(Updated Dec. 16, 2015, 2:30 p.m.)


Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, and Klaus Ma.


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


Repository: mesos


Description
-------

Added helper functions to filter usage slack resources.


Diffs (updated)
-----

  include/mesos/resources.hpp 9c8bfb0e7e1e40ca99b4cc75079e5b950630243d 
  include/mesos/v1/resources.hpp db87c992e2ec466cb1d4d17775bf6423a2fb15aa 
  src/common/resources.cpp 5a7981744726a0544435cbbd5007487a43a01211 
  src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
  src/v1/resources.cpp d300842576b2fb8fe75f5b18699f23c1fd324717 

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


Testing
-------

make
make check


Thanks,

Guangya Liu