mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 70273: Refactored the quota capcity heuristic check to be a static function.
Date Mon, 25 Mar 2019 21:25:16 GMT


> On March 25, 2019, midnight, Meng Zhu wrote:
> > src/master/quota_handler.cpp
> > Lines 226-247 (original), 222-243 (patched)
> > <https://reviews.apache.org/r/70273/diff/1/?file=2133511#file2133511line233>
> >
> >     We should be able to avoid the copies of agent resources and contains checks
here by doing subtraction.
> >     
> >     ```
> >     Resources quota = ... // total quota resources
> >     
> >     foreach (const Resources& agent, agents) {
> >       if (quota.empty()) {
> >         return None();
> >       }
> >     
> >       quota -= agent;
> >     }
> >     
> >     if (!quota.empty()) {
> >       return Error.. // Consider add more specific error messages regarding missing
resources.
> >     }
> >     ```
> >     
> >     I see that you added more specifc error messages later where total resources
need to be computed, I will leave this up to you.

Since this is only an intermediate state to get to the use of ResourceQuantities (where performance
will be significantly better), I'll leave as is here


- Benjamin


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


On March 22, 2019, 3:54 p.m., Benjamin Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70273/
> -----------------------------------------------------------
> 
> (Updated March 22, 2019, 3:54 p.m.)
> 
> 
> Review request for mesos and Meng Zhu.
> 
> 
> Bugs: MESOS-6840
>     https://issues.apache.org/jira/browse/MESOS-6840
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This allows the capacity heuristic code to be moved up and unit tested.
> 
> 
> Diffs
> -----
> 
>   src/master/master.hpp 77be494d1ca2d3cd79ab033e41a5ff66c0225f79 
>   src/master/quota_handler.cpp 2dcfdcaf836f21d7d39b5ef5c36de0db25ca7517 
> 
> 
> Diff: https://reviews.apache.org/r/70273/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Mahler
> 
>


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