----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28655/#review63916 -----------------------------------------------------------
Much better :-) Yes, let's rename and prepare for both task label and environment decorators. The test label and environment decorators should be straight forward, adding and removing labels in the module code and verify the effect in endpoints/at the executor end. src/Makefile.am <https://reviews.apache.org/r/28655/#comment106241> Fly by changes? src/hook/hook.hpp <https://reviews.apache.org/r/28655/#comment106527> Decorator or TaskDecorator or maybe put it in a namespace? src/hook/hook.hpp <https://reviews.apache.org/r/28655/#comment106531> Think a namespace reads better for task label vs environment decorator; that way we don't have to name it masterXXXXXXLabelDecorator vs masterXXXXXXEnvironmentDecorator What do you think? src/hook/manager.hpp <https://reviews.apache.org/r/28655/#comment106532> I don't understand this enum - can you expand on what you want to use it for? src/hook/manager.hpp <https://reviews.apache.org/r/28655/#comment106242> NUM_HOOKS? src/hook/manager.cpp <https://reviews.apache.org/r/28655/#comment106534> Use the Labels message and do ->MergeFrom. That should just append the labels. We have to think about what we do to *remove* labels (and we need a test for it). src/master/flags.hpp <https://reviews.apache.org/r/28655/#comment106243> Include example src/master/master.cpp <https://reviews.apache.org/r/28655/#comment106539> We should be able to call it just before send() right? We can't influence the call sequence anyway and should only be invoked with validation succeeded, right? src/master/master.cpp <https://reviews.apache.org/r/28655/#comment106536> MergeFrom should work on labels now - Niklas Nielsen On Dec. 3, 2014, 10:13 a.m., Kapil Arya wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28655/ > ----------------------------------------------------------- > > (Updated Dec. 3, 2014, 10:13 a.m.) > > > Review request for mesos and Niklas Nielsen. > > > Repository: mesos-git > > > Description > ------- > > This hook allows hook modules to add additional labels to the incoming > TaskInfo object. The labels are then read on the slave/executor side which > may then act upon them. > > TODOs before we commit: > 0. Split this RR to move Master specific code to a separate RR. > 1. Rename "hook" to "decorator" (?) > 2. Add a test hook module. > > > 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/28655/diff/ > > > Testing > ------- > > > Thanks, > > Kapil Arya > >
