> On Feb. 16, 2015, 6:06 p.m., Jie Yu wrote: > > src/master/master.cpp, line 2518 > > <https://reviews.apache.org/r/30952/diff/3/?file=864860#file864860line2518> > > > > You probably want to move the framework ID filling logic here right > > before the task validation. You need to make a copy of `task`: > > > > ``` > > // Make a copy of the original task so that we can > > // fill the missing `framework_id` in ExecutorInfo > > // if needed. This field was added to the API later > > // and thus was made optional. > > TaskInfo _task = task; > > if (task.has_executor() && !task.executor().has_framework_id()) { > > > > _task.mutable_executor()->mutable_framework_id()->CopyFrom(framework->id); > > } > > > > // Validate the task. > > const Option<Error>& validationError = validation::task::validate( > > _task, > > framework, > > slave, > > _offeredResources); > > ... > > ```
Thanks, this is a much better option. - Isabel ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30952/#review72634 ----------------------------------------------------------- On March 3, 2015, 6:32 a.m., Isabel Jimenez wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30952/ > ----------------------------------------------------------- > > (Updated March 3, 2015, 6:32 a.m.) > > > Review request for mesos, Jie Yu, Joris Van Remoortere, and Vinod Kone. > > > Bugs: MESOS-2290 > https://issues.apache.org/jira/browse/MESOS-2290 > > > Repository: mesos-incubating > > > Description > ------- > > There is a scheduler validation > (https://github.com/apache/mesos/blob/master/src/scheduler/scheduler.cpp#L275) > missing in master. See motivation on MESOS-2288. > > > Diffs > ----- > > src/master/master.cpp dae0955 > src/master/validation.cpp 2f2e4ea > > Diff: https://reviews.apache.org/r/30952/diff/ > > > Testing > ------- > > make check and distcheck. Tests will be added with new HTTP API endpoints > tests. > > > Thanks, > > Isabel Jimenez > >
