mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anand Mazumdar <mazumdar.an...@gmail.com>
Subject Re: Review Request 42587: Implemented the `NetClsHandleManager` class.
Date Wed, 03 Feb 2016 07:50:22 GMT

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



Primarily fly-by style comments.


src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (line 58)
<https://reviews.apache.org/r/42587/#comment178825>

    We generally leave a line before the comment and the TODO to correctly demarcate where
the comment ends and where the TODO begins.
    
    ```
    // comments
    //
    // TODO(asridharan): 
    //
    ```



src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (line 91)
<https://reviews.apache.org/r/42587/#comment178831>

    What does `handles.size()` returns. I am assuming its an `unsigned in`t and hence should
fail compilation with `-Wsign-compare` on GCC.
    
    Why don't we just do `size_t count = 1`?



src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (line 95)
<https://reviews.apache.org/r/42587/#comment178832>

    Should fit on one line?



src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (line 96)
<https://reviews.apache.org/r/42587/#comment178833>

    I see that we name `NetClsHandles` as `handles`.
    
    Why not name `NetClsHandle` as just `handle`?



src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (line 120)
<https://reviews.apache.org/r/42587/#comment178826>

    Remove period at the end.



src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (line 131)
<https://reviews.apache.org/r/42587/#comment178834>

    How about simplifying this to:
    
    ```
    if (condition) {
      return Nothing();
    }
    
    return Error(...);
    ```



src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (line 154)
<https://reviews.apache.org/r/42587/#comment178827>

    Remove period at the end.



src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (line 165)
<https://reviews.apache.org/r/42587/#comment178828>

    How about simplifying this to:
    
    ```
    if (condition) {
      return Nothing();
    }
    
    return Error(...);
    ```


- Anand Mazumdar


On Feb. 3, 2016, 6:46 a.m., Avinash sridharan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42587/
> -----------------------------------------------------------
> 
> (Updated Feb. 3, 2016, 6:46 a.m.)
> 
> 
> Review request for mesos and Jie Yu.
> 
> 
> Bugs: MESOS-4345
>     https://issues.apache.org/jira/browse/MESOS-4345
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Implemented the `NetClsHandleManager` class.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/cgroups/net_cls.hpp b4bc52114389d1c1efce2830f4292bd89bb0de7c

>   src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp ddc1bf0939e5e8995e6f34fe7b8509b51704f63e

> 
> Diff: https://reviews.apache.org/r/42587/diff/
> 
> 
> Testing
> -------
> 
> make
> 
> 
> Thanks,
> 
> Avinash sridharan
> 
>


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