----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/49849/#review143334 -----------------------------------------------------------
Fix it, then Ship it! src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp (line 39) <https://reviews.apache.org/r/49849/#comment209121> I would suggest to directly define this const string here rather than defining it in subsystem.cpp and declaring it as extern here. src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp (line 144) <https://reviews.apache.org/r/49849/#comment209151> s/check and prepare/checks and prepares/ src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp (line 39) <https://reviews.apache.org/r/49849/#comment209152> Suggest to move this to subsystem.hpp. src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp (lines 47 - 63) <https://reviews.apache.org/r/49849/#comment209122> I would suggest to slightly change these code to: ``` Subsystem* subsystem = nullptr; if (_name == CGROUP_SUBSYSTEM_CPU_NAME) { subsystem = new CpuSubsystem(_flags, _hierarchy); } else { return Error("Unknown subsystem"); } Try<Nothing> load = subsystem->load(); if (load.isError()) { return Error("Failed to load subsystem '" + _name + "': " + load.error()); } return Owned<Subsystem>(subsystem); ``` - Qian Zhang On July 22, 2016, 3:10 a.m., haosdent huang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/49849/ > ----------------------------------------------------------- > > (Updated July 22, 2016, 3:10 a.m.) > > > Review request for mesos, Gilbert Song, Jie Yu, Qian Zhang, and Zhengju Sha. > > > Bugs: MESOS-5042 > https://issues.apache.org/jira/browse/MESOS-5042 > > > Repository: mesos > > > Description > ------- > > Implemented `CpuSubsystem`. > > > Diffs > ----- > > src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp > 4a9f55bf3b217405bf90943f27a976422877a99e > src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp > 5f52a076a1fa3a21d886cb961ddeed5046a38d7c > src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp > a30ecafcbecc9d3b6eeea2b04dcb4d278750af41 > > Diff: https://reviews.apache.org/r/49849/diff/ > > > Testing > ------- > > > Thanks, > > haosdent huang > >