> On June 2, 2016, 10:58 p.m., Qian Zhang wrote:
> > src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp, lines 105-106
> > <https://reviews.apache.org/r/46158/diff/2/?file=1347650#file1347650line105>
> >
> >     Since this is a multiple lines code, I think you need to add a newline 
> > after that, please check the following code as a reference:
> >     
> > https://github.com/apache/mesos/blob/0.28.1/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp#L285;L288
> >     And you may need to do this change for all other places like this.
> >     
> >     And what about just name this variable as `subsystem`?
> 
> haosdent huang wrote:
>     For the style, I think both 
>     
>     ```
>         string subsystemName =
>           strings::remove(type, cgroupsPrefix, strings::Mode::ANY);
>     ```
>     ```
>         string subsystemName = strings::remove(
>             type, cgroupsPrefix, strings::Mode::ANY);
>     ```
>     
>     are match mesos style, refer to the mesos style document 
> https://github.com/apache/mesos/blob/master/docs/c%2B%2B-style-guide.md#continuation
>     
>     
>     I think use `subsystem` make bring confusing because it is the name of 
> subsystem, instead of an instance of `Subsystem`.

Sorry, I did not make it clear. My point is we need to change:
```
    string subsystemName =
      strings::remove(type, cgroupsPrefix, strings::Mode::ANY);
    if (hierarchies.contains(subsystemName)) {
      // Skip when the subsystem exists.
      continue;
    }
```
to:
```
    string subsystemName =
      strings::remove(type, cgroupsPrefix, strings::Mode::ANY);
    
    if (hierarchies.contains(subsystemName)) {
      // Skip when the subsystem exists.
      continue;
    }
```
You can refer to: 
https://github.com/apache/mesos/blob/master/docs/c%2B%2B-style-guide.md#empty-lines
 :-)


- Qian


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


On April 16, 2016, 6:14 p.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46158/
> -----------------------------------------------------------
> 
> (Updated April 16, 2016, 6:14 p.m.)
> 
> 
> Review request for mesos, Gilbert Song, Guangya Liu, Ian Downes, Jie Yu, and 
> Kevin Klues.
> 
> 
> Bugs: MESOS-5041
>     https://issues.apache.org/jira/browse/MESOS-5041
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Completed implementation of the cgroups unified isolator.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46158/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> haosdent huang
> 
>

Reply via email to