You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Meng Zhu <mz...@mesosphere.io> on 2019/06/21 02:32:46 UTC

Review Request 70919: Replaced the old `struct Quota`.

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

Review request for mesos and Benjamin Mahler.


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


Repository: mesos


Description
-------

The new `struct Quota` is consistent with the proto `QuotaConfig`
where guarantees and limits are decoupled and uses more proper
abstractions: `ResourceQuantities` and `ResourceLimits`.


Diffs
-----

  include/mesos/allocator/allocator.hpp 0aef0030e78514bef731b80de5b4bb3a567811e4 
  include/mesos/quota/quota.hpp edfd1c0b1e63b1aab66beb23c6dd8abc7432bab0 
  src/common/http.hpp b8c71ec3cf94b607ded689cafb91ab11308a1369 
  src/common/http.cpp 6962959326e8844a463eb8d63be04e5dfcc6bc6e 
  src/master/allocator/mesos/allocator.hpp 0ae7e3697327832a0f95e2cd7339d8876e815be8 
  src/master/allocator/mesos/hierarchical.hpp 25472eb7f5cb8342d2c88449c9c4145d816fb718 
  src/master/allocator/mesos/hierarchical.cpp c9ed094fcd67c1d8896fe380274ef8e08d5af892 
  src/master/allocator/mesos/metrics.hpp a0953b0cf716489ab94ae54026e8328830ea719e 
  src/master/allocator/mesos/metrics.cpp b61a39b1cd8e15043a68337b20b057c70903115f 
  src/master/constants.hpp 850224064cfba4859275d2d5bc44248e053b85e5 
  src/master/master.hpp 7acaa8264eb7a37e17394bc4940971f872ab2de3 
  src/master/master.cpp 8a238aa1d5592f91d8c3b3c443aa30acd3a0cfd0 
  src/master/quota.cpp 4f2a59c234308be8a5ba16cb1f32e6729b79343d 
  src/master/quota_handler.cpp 854189cd052cc88b4dc0ade72c63ac9a1b0bcbb5 
  src/tests/allocator.hpp 765968d5bf9846324d8d7f1d3f6687155c9ea2b5 
  src/tests/allocator.cpp 553418778350d921f4f1bcec50cd7eeb3a74cc28 
  src/tests/hierarchical_allocator_tests.cpp 7dc3dc1392b120e2798dcd68f7290cae4afa890d 
  src/tests/master_quota_tests.cpp 9b4cde1c154613f6af50ddc3484f689a9fe836c0 


Diff: https://reviews.apache.org/r/70919/diff/1/


Testing
-------


Thanks,

Meng Zhu


Re: Review Request 70919: Replaced the old `struct Quota`.

Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70919/#review216103
-----------------------------------------------------------


Fix it, then Ship it!





src/common/http.cpp
Lines 880-884 (patched)
<https://reviews.apache.org/r/70919/#comment303097>

    Hm.. is this getting used now as a result of this refactor? Is it changing the format of something? 
    
    E.g. the /roles endpoint doesn't use this particular format, and probably needs a comment in the previous review?



src/tests/allocator.cpp
Lines 27-36 (original), 27-36 (patched)
<https://reviews.apache.org/r/70919/#comment303095>

    Why does this need to use QuotaInfo? Can't it just set the guarantee and limits fields? (which seems more readable than having to know about the QuotaInfo conversion?)


- Benjamin Mahler


On June 21, 2019, 2:32 a.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70919/
> -----------------------------------------------------------
> 
> (Updated June 21, 2019, 2:32 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-9807
>     https://issues.apache.org/jira/browse/MESOS-9807
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The new `struct Quota` is consistent with the proto `QuotaConfig`
> where guarantees and limits are decoupled and uses more proper
> abstractions: `ResourceQuantities` and `ResourceLimits`.
> 
> 
> Diffs
> -----
> 
>   include/mesos/allocator/allocator.hpp 0aef0030e78514bef731b80de5b4bb3a567811e4 
>   include/mesos/quota/quota.hpp edfd1c0b1e63b1aab66beb23c6dd8abc7432bab0 
>   src/common/http.cpp 6962959326e8844a463eb8d63be04e5dfcc6bc6e 
>   src/master/allocator/mesos/allocator.hpp 0ae7e3697327832a0f95e2cd7339d8876e815be8 
>   src/master/allocator/mesos/hierarchical.hpp 25472eb7f5cb8342d2c88449c9c4145d816fb718 
>   src/master/allocator/mesos/hierarchical.cpp c9ed094fcd67c1d8896fe380274ef8e08d5af892 
>   src/master/allocator/mesos/metrics.hpp a0953b0cf716489ab94ae54026e8328830ea719e 
>   src/master/allocator/mesos/metrics.cpp b61a39b1cd8e15043a68337b20b057c70903115f 
>   src/master/constants.hpp 850224064cfba4859275d2d5bc44248e053b85e5 
>   src/master/master.hpp 7acaa8264eb7a37e17394bc4940971f872ab2de3 
>   src/master/master.cpp d15b2d9dbc79e95c15b689f29f88cebb76f94dd8 
>   src/master/quota.cpp 4f2a59c234308be8a5ba16cb1f32e6729b79343d 
>   src/master/quota_handler.cpp 854189cd052cc88b4dc0ade72c63ac9a1b0bcbb5 
>   src/tests/allocator.hpp 765968d5bf9846324d8d7f1d3f6687155c9ea2b5 
>   src/tests/allocator.cpp 553418778350d921f4f1bcec50cd7eeb3a74cc28 
>   src/tests/hierarchical_allocator_tests.cpp 7dc3dc1392b120e2798dcd68f7290cae4afa890d 
>   src/tests/master_quota_tests.cpp 9b4cde1c154613f6af50ddc3484f689a9fe836c0 
> 
> 
> Diff: https://reviews.apache.org/r/70919/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


Re: Review Request 70919: Replaced the old `struct Quota`.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70919/#review216036
-----------------------------------------------------------



Patch looks great!

Reviews applied: [70914, 70915, 70916, 70917, 70918, 70919]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers --disable-parallel-test-execution' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On June 21, 2019, 2:32 a.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70919/
> -----------------------------------------------------------
> 
> (Updated June 21, 2019, 2:32 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-9807
>     https://issues.apache.org/jira/browse/MESOS-9807
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The new `struct Quota` is consistent with the proto `QuotaConfig`
> where guarantees and limits are decoupled and uses more proper
> abstractions: `ResourceQuantities` and `ResourceLimits`.
> 
> 
> Diffs
> -----
> 
>   include/mesos/allocator/allocator.hpp 0aef0030e78514bef731b80de5b4bb3a567811e4 
>   include/mesos/quota/quota.hpp edfd1c0b1e63b1aab66beb23c6dd8abc7432bab0 
>   src/common/http.hpp b8c71ec3cf94b607ded689cafb91ab11308a1369 
>   src/common/http.cpp 6962959326e8844a463eb8d63be04e5dfcc6bc6e 
>   src/master/allocator/mesos/allocator.hpp 0ae7e3697327832a0f95e2cd7339d8876e815be8 
>   src/master/allocator/mesos/hierarchical.hpp 25472eb7f5cb8342d2c88449c9c4145d816fb718 
>   src/master/allocator/mesos/hierarchical.cpp c9ed094fcd67c1d8896fe380274ef8e08d5af892 
>   src/master/allocator/mesos/metrics.hpp a0953b0cf716489ab94ae54026e8328830ea719e 
>   src/master/allocator/mesos/metrics.cpp b61a39b1cd8e15043a68337b20b057c70903115f 
>   src/master/constants.hpp 850224064cfba4859275d2d5bc44248e053b85e5 
>   src/master/master.hpp 7acaa8264eb7a37e17394bc4940971f872ab2de3 
>   src/master/master.cpp 8a238aa1d5592f91d8c3b3c443aa30acd3a0cfd0 
>   src/master/quota.cpp 4f2a59c234308be8a5ba16cb1f32e6729b79343d 
>   src/master/quota_handler.cpp 854189cd052cc88b4dc0ade72c63ac9a1b0bcbb5 
>   src/tests/allocator.hpp 765968d5bf9846324d8d7f1d3f6687155c9ea2b5 
>   src/tests/allocator.cpp 553418778350d921f4f1bcec50cd7eeb3a74cc28 
>   src/tests/hierarchical_allocator_tests.cpp 7dc3dc1392b120e2798dcd68f7290cae4afa890d 
>   src/tests/master_quota_tests.cpp 9b4cde1c154613f6af50ddc3484f689a9fe836c0 
> 
> 
> Diff: https://reviews.apache.org/r/70919/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>