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




src/slave/containerizer/mesos/isolators/windows/cpu.hpp
Lines 66-67 (patched)
<https://reviews.apache.org/r/63276/#comment270549>

    I'd prefer we define an `Info` struct that has both pid and cpuLimit so 
that we know the lifecycle of these two fields are tied together. THis is the 
conversion we've been following in other isolators.
    ```
    struct Info'
    {
      Option<pid_t> pid;
      Option<double> cpuLimit;
    };
    
    hashmap<ContainerID, Info> infos;
    ```



src/slave/containerizer/mesos/isolators/windows/cpu.cpp
Lines 53 (patched)
<https://reviews.apache.org/r/63276/#comment270531>

    We typically do not use namespace prefix like `std::` or `mesos::slave::` 
in the cpp file. We use `using` clause on the top of the source file to make 
the code more concise.
    
    Please fix all in this patch.



src/slave/containerizer/mesos/isolators/windows/cpu.cpp
Lines 75 (patched)
<https://reviews.apache.org/r/63276/#comment270558>

    So someone can call `prepare` multiple times if they don't set cpu limits? 
This should be addressed if you use the Info suggestion above.



src/slave/containerizer/mesos/isolators/windows/cpu.cpp
Lines 79 (patched)
<https://reviews.apache.org/r/63276/#comment270535>

    I'd use
    ```
    const Resources resources = containerConfig.resources();
    ```
    
    Using `{...}` is fragile if we add more fields to `Resources` object.



src/slave/containerizer/mesos/isolators/windows/mem.hpp
Lines 67-68 (patched)
<https://reviews.apache.org/r/63276/#comment270560>

    Ditto.


- Jie Yu


On Nov. 30, 2017, 11:34 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63276/
> -----------------------------------------------------------
> 
> (Updated Nov. 30, 2017, 11:34 p.m.)
> 
> 
> Review request for mesos, Aaron Wood, Akash Gupta, Jeff Coffler, Jie Yu, John 
> Kordich, Joseph Wu, Li Li, and Michael Park.
> 
> 
> Bugs: MESOS-5462 and MESOS-6690
>     https://issues.apache.org/jira/browse/MESOS-5462
>     https://issues.apache.org/jira/browse/MESOS-6690
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Instead of deriving from the POSIX isolators, we now have two real
> Windows isolators that can be used together or separately. The `Cpu`
> isolator enables a hard-cap CPU limit, and the `Mem` isolator enables a
> hard-cap memory limit on the job object for the container.
> 
> These classes are separate derivations of `MesosIsolatorProcess`,
> because introducing a `WindowsIsolatorProcess` base class would be
> abstraction for the sole purpose of code deduplication.
> 
> Note that these isolators support nesting, and so must support empty
> `cpu` or `mem` resources. When these are not provided, the corresponding
> code to set the limits is simply not called.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt 76ef6cac925e36a31e4f6c347271955411284056 
>   src/Makefile.am 4a3b728dc2cbfaf4b10068562778a87a6b331238 
>   src/slave/containerizer/mesos/containerizer.cpp 
> 7f3b86d87cf82429c2627d4a32eb0d5adbcc3f29 
>   src/slave/containerizer/mesos/isolators/windows.hpp 
> b0621a5fc411b8812722f7fcf6580ed64dac5382 
>   src/slave/containerizer/mesos/isolators/windows/cpu.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/windows/cpu.cpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/windows/mem.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/windows/mem.cpp PRE-CREATION 
>   src/slave/flags.cpp 7998d9bb66995ad0d1285fcb1042321afdf917a9 
> 
> 
> Diff: https://reviews.apache.org/r/63276/diff/4/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>

Reply via email to