> On Jan. 17, 2015, 1:10 a.m., Ben Mahler wrote: > > src/master/master.cpp, line 1335 > > <https://reviews.apache.org/r/29973/diff/1/?file=823616#file823616line1335> > > > > Where is the FrameworkInfo going to get validated in the future? Could > > we leverage `drop` here rather than validating it in each call handler? > > > > I think for now, we'll want to keep FrameworkInfo here, ideally > > consolidating the duplicate framework lookup / drop into one place: > > > > ``` > > const FrameworkInfo& frameworkInfo = call.framework_info(); > > > > switch (call.type()) { > > case scheduler::Call::REGISTER: > > ...; > > break; > > case scheduler::Call::REREGISTER: > > ...; > > break; > > default: > > } > > > > Framework* framework = getFramework(frameworkInfo.id()); > > > > if (framework == NULL) { > > // drop() > > return; > > } > > > > // TODO: validate frameworkInfo. > > > > // Rest of the calls. > > switch (call.type()) { > > // ... > > } > > ``` > > > > This should help us prune down the handlers (move framework lookup + > > pid validation), thoughts?
Good idea. DOne! - Jie ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/29973/#review68521 ----------------------------------------------------------- On Jan. 16, 2015, 7:23 p.m., Jie Yu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/29973/ > ----------------------------------------------------------- > > (Updated Jan. 16, 2015, 7:23 p.m.) > > > Review request for mesos, Ben Mahler, Michael Park, and Vinod Kone. > > > Repository: mesos-git > > > Description > ------- > > Passed framework ID instead framework info to Master::receive. > > > Diffs > ----- > > src/master/master.hpp a8ce4d023ddea36cb83a2dc7b95abd12342f345a > src/master/master.cpp e9dcca3c92c94f3123519855e238bcef47eeece9 > > Diff: https://reviews.apache.org/r/29973/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Jie Yu > >
