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



src/master/quota_handler.cpp (line 114)
<https://reviews.apache.org/r/39285/#comment164922>

    Missing a negation



src/master/quota_handler.cpp (line 125)
<https://reviews.apache.org/r/39285/#comment164927>

    trim the extra `to`



src/master/quota_handler.cpp (line 126)
<https://reviews.apache.org/r/39285/#comment164923>

    we can still rename `extract` to `create`



src/master/quota_handler.cpp (line 155)
<https://reviews.apache.org/r/39285/#comment164924>

    Can not set quota for a role that already has quota



src/master/quota.cpp (line 45)
<https://reviews.apache.org/r/39285/#comment165002>

    how about `.empty()`?



src/master/quota_handler.cpp (line 53)
<https://reviews.apache.org/r/39285/#comment165000>

    Let's rename this to `request`



src/master/quota_handler.cpp (lines 67 - 86)
<https://reviews.apache.org/r/39285/#comment165001>

    After discussing this more, I'd really love to clean this up and leverage 
the validation routine above (which we do in set).
    Let's do something like:
    ```
    QuotaInfo quota;
    quota.mutable_guarantee()->CopyFrom(resources.get());
    if (!resources.get().empty()) {
      quota.set_role(resources.get().begin()->role());
    }
    ```


- Joris Van Remoortere


On Nov. 12, 2015, 10:26 a.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39285/
> -----------------------------------------------------------
> 
> (Updated Nov. 12, 2015, 10:26 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Bernd Mathiske, and Joris Van 
> Remoortere.
> 
> 
> Bugs: MESOS-3199
>     https://issues.apache.org/jira/browse/MESOS-3199
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added Quota Request Validation.
> 
> 
> Diffs
> -----
> 
>   src/master/master.hpp ead8520b7108a0f2c3a0bb11ae7b543897d111a2 
>   src/master/quota.hpp PRE-CREATION 
>   src/master/quota.cpp PRE-CREATION 
>   src/master/quota_handler.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/39285/diff/
> 
> 
> Testing
> -------
> 
> make test
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>

Reply via email to