> On May 25, 2016, 6:50 p.m., Jie Yu wrote: > > include/mesos/hook.hpp, lines 108-116 > > <https://reviews.apache.org/r/47150/diff/2/?file=1392865#file1392865line108> > > > > Any reason why all the fields here are needed? For instance, > > 'containerInfo' is part of either taskInfo or executorInfo, why bother > > passing this duplicated information? Similarily, 'resources' can be derived > > as well. > > Joseph Wu wrote: > I haven't dug too deeply into what each value could be in the various > DockerContainerizer paths, but the interface is meant to be almost identical > to `slavePreLaunchDockerHook`, except for the return type.
Removed these arguments because they can be derived from the other fields: const ContainerInfo& containerInfo, const CommandInfo& commandInfo, const Option<Resources>& resources, - Joseph ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/47150/#review134900 ----------------------------------------------------------- On May 27, 2016, 3:07 p.m., Joseph Wu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/47150/ > ----------------------------------------------------------- > > (Updated May 27, 2016, 3:07 p.m.) > > > Review request for mesos, Adam B, Artem Harutyunyan, Jie Yu, and Kapil Arya. > > > Bugs: MESOS-5350 > https://issues.apache.org/jira/browse/MESOS-5350 > > > Repository: mesos > > > Description > ------- > > Introduces, but does not fully wire up a new hook. > > The new hook, "slavePreLaunchDockerEnvironmentDecorator", > has divergent semantics compared with existing hooks: > > * The hook is asynchronous, > * can prevent a task from launching if it errors, > * can overwrite environment variables. > > The new hook is intended to be a strictly-superior > replacement for the existing hook "slavePreLaunchDockerHook". > > > Diffs > ----- > > include/mesos/hook.hpp 210ffba09f5acae34ca49b888a781f683777f9ca > src/examples/test_hook_module.cpp 4b97f84204934d0e678786fd6cde38b89a6f8f48 > src/hook/manager.hpp 528674e36639fe78137ba0a4bb004c99730e7a22 > src/hook/manager.cpp 381807d582998043d73e9b8c9d3c1fddbcf73cf1 > src/tests/hook_tests.cpp c6b4e8a50534e455cf44f427b09f74eef71177b2 > > Diff: https://reviews.apache.org/r/47150/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Joseph Wu > >