----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30952/#review72634 -----------------------------------------------------------
Looks nice! Do you want to remove these logics in the drivers (old and new)? src/master/master.cpp <https://reviews.apache.org/r/30952/#comment118679> Hum, why do you want to move the 'accept' invokation to the bottom? I would suggest keep this function the same as before. src/master/master.cpp <https://reviews.apache.org/r/30952/#comment118680> We usually avoid using non-const references because that makes the reasoning not local. See my comments below, this is not needed. src/master/master.cpp <https://reviews.apache.org/r/30952/#comment118681> I would suggest move this logic to `_accept`. See my comments below. src/master/master.cpp <https://reviews.apache.org/r/30952/#comment118682> 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); ... ``` src/master/validation.cpp <https://reviews.apache.org/r/30952/#comment118683> Do you want to add a test, or there is a test already? - Jie Yu On Feb. 16, 2015, 8:53 a.m., Isabel Jimenez wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30952/ > ----------------------------------------------------------- > > (Updated Feb. 16, 2015, 8:53 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.hpp 6a39df0 > src/master/master.cpp f10a3cf > src/master/validation.cpp acc35b2 > > 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 > >
