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

Ship it!



src/slave/slave.cpp (line 364)
<https://reviews.apache.org/r/42474/#comment176936>

    I would still prefer to capture the reference 'const 
Resource::DiskInfo::Source& source' first to avoid calling 
`resource.disk().source()` all the time:
    ```
    const Resource::DiskInfo::Source& source = resource.disk.source();
    if (source.type() == PATH) {
      CHECK(source.has_path());
      
      Try<Nothing> mkdir = os::mkdir(source.path().root());
      ...
    }
    ```



src/slave/slave.cpp (lines 365 - 368)
<https://reviews.apache.org/r/42474/#comment176935>

    We should validate the Resources (i.e., call `Resources::validate` in 
`Containerizer::resources(flag)`), and this should a CHECK instead.
    
    Also, can you add a TODO to move 
`internal::validateCommandLineResources(result);` in Resources::parse to top 
level (e.g., in `Containerizer::resources`). I don't think that function 
belongs to the parse function.


- Jie Yu


On Jan. 22, 2016, 9:30 a.m., Joris Van Remoortere wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42474/
> -----------------------------------------------------------
> 
> (Updated Jan. 22, 2016, 9:30 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Michael Park.
> 
> 
> Bugs: MESOS-4403
>     https://issues.apache.org/jira/browse/MESOS-4403
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Create disk paths based on 'DiskInfo.Source' if the type is 'PATH'
> and the directory does not yet exist.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp e23c3295c8ebed580751a5aabaf26e1773c54859 
> 
> Diff: https://reviews.apache.org/r/42474/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joris Van Remoortere
> 
>

Reply via email to