mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <bbann...@apache.org>
Subject Re: Review Request 63414: Added a helper to get the resoruce provider ID from an offer operation.
Date Mon, 30 Oct 2017 15:44:59 GMT

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


Fix it, then Ship it!





src/common/resources_utils.hpp
Lines 51-53 (patched)
<https://reviews.apache.org/r/63414/#comment266747>

    Maybe reword this, e.g.,
    
        Therefore, the specified operation should not contain resources from more than one
resource provider.



src/common/resources_utils.cpp
Lines 97 (patched)
<https://reviews.apache.org/r/63414/#comment266745>

    We should try to prevent the initialization and copy assignement of `resource`, e.g.,
    
        Resource* resource = nullptr;
        
        switch (operation.type()) {
          // Possibly assign to `resource`.
        }
        
        CHECK_NOT_NULL(resource);
        
        if (resource->has_provider_id()) {
          return resource->provider_id();
        }
        
        return None();



src/common/resources_utils.cpp
Lines 104-121 (patched)
<https://reviews.apache.org/r/63414/#comment266746>

    It would be great if we could explicitly `break` for any case not containing an explicit
`return`.


- Benjamin Bannier


On Oct. 30, 2017, 4:33 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63414/
> -----------------------------------------------------------
> 
> (Updated Oct. 30, 2017, 4:33 p.m.)
> 
> 
> Review request for mesos and Benjamin Bannier.
> 
> 
> Bugs: MESOS-7235
>     https://issues.apache.org/jira/browse/MESOS-7235
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a helper to get the resoruce provider ID from an offer operation.
> 
> 
> Diffs
> -----
> 
>   src/common/resources_utils.hpp 18e3d9d4baad23669d00542594f5c15a989b7b9e 
>   src/common/resources_utils.cpp e34cd8a3c9046a6f12c12a275a7b3a852b492f4c 
> 
> 
> Diff: https://reviews.apache.org/r/63414/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


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