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 70707: Refactored role quota info into `Struct Role`.
Date Wed, 29 May 2019 18:52:10 GMT

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


Ship it!





src/master/allocator/mesos/hierarchical.hpp
Lines 120-122 (patched)
<https://reviews.apache.org/r/70707/#comment302319>

    See the struct suggestion below



src/master/allocator/mesos/hierarchical.hpp
Lines 620-627 (patched)
<https://reviews.apache.org/r/70707/#comment302318>

    Should this be a constant in constants.hpp?
    
    E.g. DEFAULT_QUOTA_GUARANTEES



src/master/allocator/mesos/hierarchical.hpp
Lines 634 (patched)
<https://reviews.apache.org/r/70707/#comment302317>

    struct Quota
    {
      ResourceQuantities guarantees;
      ResourceLimits limits;
    }
    
    Quota getQuota(role);
    
    Can we add a struct to group the C++ types together in general for the master and allocator?



src/master/allocator/mesos/hierarchical.cpp
Line 1412 (original), 1412 (patched)
<https://reviews.apache.org/r/70707/#comment302320>

    Maybe check it's the default?
    
    CHECK_EQ(defaultQuota, getQuota(role));



src/master/allocator/mesos/hierarchical.cpp
Line 1440 (original), 1440 (patched)
<https://reviews.apache.org/r/70707/#comment302321>

    Ditto here



src/master/allocator/mesos/hierarchical.cpp
Lines 1443-1444 (original), 1445-1446 (patched)
<https://reviews.apache.org/r/70707/#comment302322>

    Not yours but for readability:
    
    ```
      LOG(INFO) << "Removed quota " << r.quotaGuarantee <<
                << " for role '" << role << "'";
    ```



src/master/allocator/mesos/hierarchical.cpp
Line 1674 (original), 1686 (patched)
<https://reviews.apache.org/r/70707/#comment302323>

    r.quota.guarantees.empty() ?



src/master/allocator/mesos/hierarchical.cpp
Line 1690 (original), 1703 (patched)
<https://reviews.apache.org/r/70707/#comment302324>

    Same here? Can use the role struct we already have in hand?


- Benjamin Mahler


On May 29, 2019, 3:22 p.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70707/
> -----------------------------------------------------------
> 
> (Updated May 29, 2019, 3:22 p.m.)
> 
> 
> Review request for mesos, Andrei Sekretenko and Benjamin Mahler.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This avoids an extra map of tracking role quota info.
> Also added a helper `getGuarantees()` to look up quota guarantees
> of a given role.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.hpp 71a9656fb934bf9ac58e3165254ea49cb09efa8b

>   src/master/allocator/mesos/hierarchical.cpp 40c8363afddccdd5275ca06318a8cc2cc6fa21af

> 
> 
> Diff: https://reviews.apache.org/r/70707/diff/4/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


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