> On June 17, 2016, 6:07 a.m., haosdent huang wrote: > > src/master/http.cpp, line 1447 > > <https://reviews.apache.org/r/48046/diff/6/?file=1422048#file1422048line1447> > > > > How about change > > ``` > > message GetTasks { > > optional string limit = 1; > > optional uint32 offset = 2; > > optional string order = 3; > > } > > ``` > > > > to > > > > ``` > > message GetTasks { > > optional uint32 limit = 1; > > optional uint32 offset = 2; > > optional string order = 3; > > } > > ``` > > > > And I not sure if change `optional string order = 3;` to enum would be > > better?
Thanks for your review!! This change is already made in https://reviews.apache.org/r/48401/ For order, I feel enum may overkill since it's essentially a bool. But I guess I could do another patch to refactor this and old impl, if you guys think it makes more sense. > On June 17, 2016, 6:07 a.m., haosdent huang wrote: > > src/master/http.cpp, line 1445 > > <https://reviews.apache.org/r/48046/diff/6/?file=1422048#file1422048line1445> > > > > I suggest to add > > ``` > > CHECK(call.has_get_tasks()); > > ``` It is already checked here: https://github.com/apache/mesos/blob/master/src/master/validation.cpp#L121 > On June 17, 2016, 6:07 a.m., haosdent huang wrote: > > src/master/http.cpp, line 1457 > > <https://reviews.apache.org/r/48046/diff/6/?file=1422048#file1422048line1457> > > > > I suggest to change > > ``` > > .then([=](const vector<const Task*>& tasks) -> Response { > > ``` > > to > > ``` > > .then([contentTyle](const vector<const Task*>& tasks) -> Response { > > ``` > > > > Refer to recent problems > > https://issues.apache.org/jira/browse/MESOS-5587 > > and > > https://issues.apache.org/jira/browse/MESOS-5629 OK - Jay ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/48046/#review138165 ----------------------------------------------------------- On June 17, 2016, 5:47 a.m., Jay Guo wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/48046/ > ----------------------------------------------------------- > > (Updated June 17, 2016, 5:47 a.m.) > > > Review request for mesos, Anand Mazumdar and Vinod Kone. > > > Bugs: MESOS-5493 > https://issues.apache.org/jira/browse/MESOS-5493 > > > Repository: mesos > > > Description > ------- > > Implement v1::master::Call::GET_TASKS. > > > Diffs > ----- > > include/mesos/v1/master/master.proto > 5a6bbeb0f9b57d03803e366df32e04e9598e00ed > src/internal/evolve.hpp 5f3e267fa3a0420fcbed7be6f13ee76bf85cb182 > src/internal/evolve.cpp 93719127e75b4ba299f8d0a7fdeb4681818d30db > src/master/http.cpp 1b74211acafc15cc0bcb24545ca4c2bacd79cb2d > src/master/master.hpp 72c60ef74ce57119a97cf8305182340a13c58c42 > src/tests/api_tests.cpp 03e46cc5e0af8250ba36281e1293a1dc89f8e266 > > Diff: https://reviews.apache.org/r/48046/diff/ > > > Testing > ------- > > make check on ubuntu 14.04 > > > Thanks, > > Jay Guo > >
