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/07/18 01:54:10 UTC
Review Request 71110: Refactored `struct ResourceBreakdown`.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71110/
-----------------------------------------------------------
Review request for mesos, Andrei Sekretenko and Benjamin Mahler.
Repository: mesos
Description
-------
This breaks the computation of offered, allocated, reserved
and consumedQuota into separate getter functions which are
lazily calculated upon invoked. The struct is renamed to
`RoleResourceBreakdown`.
Diffs
-----
src/master/master.hpp ffa7423ba533725f7c1123d9aa507b1348e7f281
src/master/master.cpp f1ca637b4cb0382caec53b5a81f6a4eb46f4dd2d
src/master/readonly_handler.cpp 60dac9ae48e1e84380c7c499a367797069ca64bd
Diff: https://reviews.apache.org/r/71110/diff/1/
Testing
-------
make check
Thanks,
Meng Zhu
Re: Review Request 71110: Refactored `struct ResourceBreakdown`.
Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71110/#review216734
-----------------------------------------------------------
Fix it, then Ship it!
How about 'Refactored master's role ResourceBreakdown to compute results lazily.'?
src/master/readonly_handler.cpp
Line 742 (original), 740 (patched)
<https://reviews.apache.org/r/71110/#comment303915>
Why use the implicit initializer list constructor rather than the one explicitly defined?
i.e. s/{/( s/}/)
src/master/readonly_handler.cpp
Lines 771-774 (original), 766-769 (patched)
<https://reviews.apache.org/r/71110/#comment303916>
Since these are pretty expensive calls, can you avoid recomputing allocated() and offered() here?
- Benjamin Mahler
On July 18, 2019, 1:54 a.m., Meng Zhu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71110/
> -----------------------------------------------------------
>
> (Updated July 18, 2019, 1:54 a.m.)
>
>
> Review request for mesos, Andrei Sekretenko and Benjamin Mahler.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This breaks the computation of offered, allocated, reserved
> and consumedQuota into separate getter functions which are
> lazily calculated upon invoked. The struct is renamed to
> `RoleResourceBreakdown`.
>
>
> Diffs
> -----
>
> src/master/master.hpp ffa7423ba533725f7c1123d9aa507b1348e7f281
> src/master/master.cpp f1ca637b4cb0382caec53b5a81f6a4eb46f4dd2d
> src/master/readonly_handler.cpp 60dac9ae48e1e84380c7c499a367797069ca64bd
>
>
> Diff: https://reviews.apache.org/r/71110/diff/1/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Meng Zhu
>
>