> On May 30, 2016, 6:44 p.m., Vinod Kone wrote: > > src/master/http.cpp, lines 2420-2423 > > <https://reviews.apache.org/r/48046/diff/1/?file=1401245#file1401245line2420> > > > > this will have a performance regression for /tasks. > > > > I would say for now don't touch tasks(). Just implement getTasks() from > > scratch, i.e., don't bother getting JSON::Object from `_tasks()` and > > evolving it. > > > > Also v1::master::Response::GetTasks can just be > > > > ``` > > message GetTasks { > > repeated Task tasks; > > } > > > > ``` > > > > because v1::Task is public now. > > Vinod Kone wrote: > Another option suggested by @mcypark is > > ``` > if we have a vector<const Task*> getTasksHelper(...); > > Future<Response> tasks(...) { > vector<const Task *> tasks = getTasksHelper(...); > > auto tasksWriter = [&tasks, ](...) { ... }; > > return OK(jsonify(tasksWriter), ...); > } > > and have `getTasks` call `getTasksHelper` as well, except have it go > directly from `mesos::Task`s to `GetTasks::tasks` > > even the offset logic could go into getTasksHelper() > > ```
I don't see `message Task` in `mesos/include/mesos/v1/mesos.proto`... - Jay ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/48046/#review135531 ----------------------------------------------------------- On May 30, 2016, 4:23 p.m., Jay Guo wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/48046/ > ----------------------------------------------------------- > > (Updated May 30, 2016, 4:23 p.m.) > > > Review request for mesos and Vinod Kone. > > > Bugs: MESOS-5493 > https://issues.apache.org/jira/browse/MESOS-5493 > > > Repository: mesos > > > Description > ------- > > Implement v1::master::Call::GET_TASKS. > > > Diffs > ----- > > src/internal/evolve.hpp 0fdda31bb2bdda46d23663379116fb7cc567055a > src/internal/evolve.cpp 4f25f1a892b4834fc4d79b6fd1bd0edd458b7a58 > src/master/http.cpp c8d2f46d9e0ad8a99a6ebffc6a3d5d852cee0616 > src/master/master.hpp eeeccdfdfd296c2a484764e887564f2e065cfd14 > src/tests/api_tests.cpp 0b6bfadae3a969b3cd1a48e5095e64c953193543 > > Diff: https://reviews.apache.org/r/48046/diff/ > > > Testing > ------- > > make check > > Incomplete yet. A draft patch to show general idea how to refactor existing > endpoints that uses `jsonify` in OK(). > > > Thanks, > > Jay Guo > >
