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



Unit test?


src/slave/paths.hpp (lines 97 - 103)
<https://reviews.apache.org/r/52007/#comment216984>

    Should we rename this to SandboxPath?



src/slave/paths.cpp (line 106)
<https://reviews.apache.org/r/52007/#comment216985>

    I suggest we make `.containers` a constant. I imagine many places in the 
code will use that. FOr instance, we might want to make sure there is no 
`container_path` equals to `.containers`.
    
    I suggest we rename the exiting `CONTAINERS_DIR` to `EXECUTOR_RUNS_DIR` and 
make this `CONTAINERS_DIR`



src/slave/paths.cpp (lines 106 - 122)
<https://reviews.apache.org/r/52007/#comment216986>

    Do you also want to update the comments about the layout in paths.hpp?



src/slave/paths.cpp (line 106)
<https://reviews.apache.org/r/52007/#comment216987>

    I'd add a comment here, explaining the layout:
    ```
    For a nested container x.y.z, the sandbox layout is the following:
    .../runs/x/.containers/y/.containers/z
    ```



src/slave/paths.cpp (line 107)
<https://reviews.apache.org/r/52007/#comment216988>

    Instead of using this variable, I'd prefer using mod operator:
    ```
    if (tokens.size() > 8 && tokens[8] == CONTAINERS_DIR) {
      for (...) {
        if (i % 2 == 0) {
          if (tokens[i] != CONTAINERS_DIR) {
            break;
          }
        } else {
          ContainerID id;
          id.set_value(tokens[i]);
          is.mutable_parent()->CopyFrom(path.containerId);
          path.containerId = id;
        }
      }
    }
    ```


- Jie Yu


On Sept. 18, 2016, 5:31 p.m., Gilbert Song wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52007/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2016, 5:31 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Jie Yu, Joseph 
> Wu, Kevin Klues, and Vinod Kone.
> 
> 
> Bugs: MESOS-6191
>     https://issues.apache.org/jira/browse/MESOS-6191
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Updated 'parseExecutorRunPath()' for nested sandbox support.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/filesystem/linux.cpp 
> ea418252956c8089acc5a491888ed7f6df6cafcd 
>   src/slave/paths.hpp ebff3a9fab3f4a8d38502fe02bd5a34cf95c1830 
>   src/slave/paths.cpp eb414caae5847949854743d4e3c603217a897898 
>   src/tests/paths_tests.cpp 0671ee25b484cacf08c9a20ee6eba88e6f14fa97 
> 
> Diff: https://reviews.apache.org/r/52007/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Gilbert Song
> 
>

Reply via email to