----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28401/#review62879 -----------------------------------------------------------
I like the idea of hooks a lot. However, I would like that we guarantee that the computational overhead is 0 or close to 0 in case hooks are not used. Maybe we can introduce a compile flag for enabling / disabling them? src/hook/hook.hpp <https://reviews.apache.org/r/28401/#comment104991> I'm not sure we can use tuples. src/hook/manager.hpp <https://reviews.apache.org/r/28401/#comment104992> Does it make sense to move <pthread.h>, <vector> and "common/lock.hpp" into `.cpp`? src/hook/manager.cpp <https://reviews.apache.org/r/28401/#comment104993> This code loads hooks one by one and gives up once the next hook cannot be found, right? This looks a bit strange for me. I would propose one of the two alternatives: 1. Optimistic: load all loadable hooks and ignore those that cannot be found. 2. Pessimistic, but transactional: load hooks only if all given hooks can be found & loaded. src/hook/manager.cpp <https://reviews.apache.org/r/28401/#comment104997> Is my understanding correct, that if we have plenty of hook modules loaded, we will search through all of them each time a hook is invoked (e.g. authorizeTasks())? If yes, then together with the hook's payload it can lead to performance issues. src/master/main.cpp <https://reviews.apache.org/r/28401/#comment104994> See my comment above. The message is a bit misleading: there can be a situation, when this error is printed, but several hooks are loaded. - Alexander Rukletsov On Nov. 24, 2014, 8:07 p.m., Kapil Arya wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28401/ > ----------------------------------------------------------- > > (Updated Nov. 24, 2014, 8:07 p.m.) > > > Review request for mesos, Benjamin Hindman and Niklas Nielsen. > > > Bugs: MESOS-2060 > https://issues.apache.org/jira/browse/MESOS-2060 > > > Repository: mesos-git > > > Description > ------- > > Hooks can be specified on the command line by specifying the --hooks flags. > Hooks are implemented as Mesos modules that have to be specified via the > --modules flag which can also be used to specify any hook-specific command > line parameters. > > This is still a PoC based on the discussions on the dev mailing list. > > > Diffs > ----- > > src/Makefile.am 1d4ba1c8335eb8106cbccf903eaf3d9fdebdcda2 > src/hook/hook.hpp PRE-CREATION > src/hook/manager.hpp PRE-CREATION > src/hook/manager.cpp PRE-CREATION > src/master/flags.hpp 1cea50c02f3ad7de1e1ae91d65d1accdb9af7b03 > src/master/main.cpp 193d53f13d8b14638b311cc290b5a5802ea56299 > src/master/master.cpp de42f8eb7c3c4ed64fb7fea9f4977e276f4a9043 > src/module/hook.hpp PRE-CREATION > src/module/manager.cpp b15b0fc3f056fe29bd4d1acca508d75805ef2e0b > > Diff: https://reviews.apache.org/r/28401/diff/ > > > Testing > ------- > > > Thanks, > > Kapil Arya > >