> On Nov. 18, 2016, 3:28 p.m., Gastón Kleiman wrote:
> > src/slave/containerizer/mesos/io_switchboard/io_switchboard.cpp, line 38
> > <https://reviews.apache.org/r/53837/diff/2/?file=1566652#file1566652line38>
> >
> >     shouldn't this include be the first one in the file?

We typically don't do that.
We always put headers in the order:

1) C  headers like <signal.h>, <stdlib.h>, etc.
2) C++ library headers like <set>, <list>, <map>, etc.
3) Mesos external headers like <mesos/mesos.hpp>, <mesos/docker/v2.pb.h>, etc.
4) Mesos internal headers like the file above.

Within each category we group files at the same path depth alphabetically, and 
separate each group by a blank line.


> On Nov. 18, 2016, 3:28 p.m., Gastón Kleiman wrote:
> > src/slave/containerizer/mesos/io_switchboard/main.cpp, line 31
> > <https://reviews.apache.org/r/53837/diff/2/?file=1566654#file1566654line31>
> >
> >     Move this include to the top.

See above.


> On Nov. 18, 2016, 3:28 p.m., Gastón Kleiman wrote:
> > src/slave/containerizer/mesos/io_switchboard/main.cpp, line 66
> > <https://reviews.apache.org/r/53837/diff/2/?file=1566654#file1566654line66>
> >
> >     This struct is instantiated in line 80. Do we consider such a struct an 
> > `abstract class`?

Yeah the wording is a little weird, I agree. What I meant to say was that this 
class represents an "abstraction" of an FD that holds both an int for the fd 
itself as well as a promise to signal when we have detected it has become 
invalid.

That said, I am actually planning on doing a complete revamp of this file 
today, so this class will likely disappear :)


> On Nov. 18, 2016, 3:28 p.m., Gastón Kleiman wrote:
> > src/slave/containerizer/mesos/io_switchboard/io_switchboard.cpp, line 149
> > <https://reviews.apache.org/r/53837/diff/2/?file=1566652#file1566652line149>
> >
> >     s/spawened/spawned/

I am reworking this file today and if this comment stays around, I will make 
sure and fix it. Thanks.


> On Nov. 18, 2016, 3:28 p.m., Gastón Kleiman wrote:
> > src/slave/containerizer/mesos/io_switchboard/main.cpp, line 243
> > <https://reviews.apache.org/r/53837/diff/2/?file=1566654#file1566654line243>
> >
> >     I know that this is an internal binary, but we might want to print the 
> > usage and exit with a failure if `--help` is passed:
> >     
> >     ```
> >       if (flags.help) {
> >         EXIT(EXIT_FAILURE) << flags.usage();
> >       }
> >     ```

Maybe. The only usage of this file right has the stdout/stderr of the log files 
dup'd over the programs stdou/stderr, so writing to these would write this 
information directly to the logs. I agree though, as a general mechanism, I 
should probably include printing the usage semantics indepdendent of what 
happens to be dup'd over stdout.

I'll fix this in my next iteration.


- Kevin


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


On Nov. 18, 2016, 5:07 a.m., Kevin Klues wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53837/
> -----------------------------------------------------------
> 
> (Updated Nov. 18, 2016, 5:07 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Jie Yu, and Vinod Kone.
> 
> 
> Bugs: MESOS-6467
>     https://issues.apache.org/jira/browse/MESOS-6467
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Currently, this process simply intercepts the stdout/stderr of a
> container and writes it to the stdout/stderr FDs set up by the
> container logger. In future commits, this process will be expanded to
> allow dynamically attaching new input / output sources to a container
> to support `docker attach` like functionality for a running container.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 5a47c93388234a68c3c486a021ccdbe3213c5bac 
>   src/slave/containerizer/mesos/containerizer.cpp 
> ec4ae32485a7ab6c9f73c512004d1220482a188e 
>   src/slave/containerizer/mesos/io_switchboard/io_switchboard.hpp 
> PRE-CREATION 
>   src/slave/containerizer/mesos/io_switchboard/io_switchboard.cpp 
> PRE-CREATION 
>   src/slave/containerizer/mesos/io_switchboard/main.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/io_switchboard/main.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/53837/diff/
> 
> 
> Testing
> -------
> 
> GTEST_FILTER="" make -j check
> sudo src/mesos-tests
> 
> 
> Thanks,
> 
> Kevin Klues
> 
>

Reply via email to