You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Yifan Gu <yi...@mesosphere.io> on 2014/06/08 06:19:25 UTC
Review Request 22353: Refactored Master::launchTasks
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22353/
-----------------------------------------------------------
Review request for mesos, Adam B, Benjamin Hindman, Niklas Nielsen, and Vinod Kone.
Repository: mesos-git
Description
-------
Refactored on Master::launchTasks:
Extracted the offer validation and task validation logic, so that other modules can reuse the code.(e.g. resize tasks).
Put valid tasks in a ready queue after validation.
Modified on ExecutorInfoChecker to support above.
Changed Master::launchTask's interface from (const TaskInfo&, const Framework*, const Slave*)
to (const TaskInfo&, const FrameworkID&, const SlaveID&).
Diffs
-----
src/master/master.hpp e244831
src/master/master.cpp 89f426c
Diff: https://reviews.apache.org/r/22353/diff/
Testing
-------
make check
Thanks,
Yifan Gu
Re: Review Request 22353: Refactored Master::launchTasks
Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22353/#review45035
-----------------------------------------------------------
Bad patch!
Reviews applied: [22353]
Failed command: git apply --index 22353.patch
Error:
error: patch failed: src/master/master.cpp:1758
error: src/master/master.cpp: patch does not apply
- Mesos ReviewBot
On June 8, 2014, 4:29 a.m., Yifan Gu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22353/
> -----------------------------------------------------------
>
> (Updated June 8, 2014, 4:29 a.m.)
>
>
> Review request for mesos, Adam B, Benjamin Hindman, Niklas Nielsen, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Refactored on Master::launchTasks:
> Extracted the offer validation and task validation logic, so that other modules can reuse the code.(e.g. resize tasks).
> Put valid tasks in a ready queue after validation.
> Modified on ExecutorInfoChecker to support above.
> Changed Master::launchTask's interface from (const TaskInfo&, const Framework*, const Slave*)
> to (const TaskInfo&, const FrameworkID&, const SlaveID&).
>
>
> Diffs
> -----
>
> src/master/master.hpp e244831
> src/master/master.cpp 89f426c
>
> Diff: https://reviews.apache.org/r/22353/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Yifan Gu
>
>
Re: Review Request 22353: Refactored Master::launchTasks
Posted by Yifan Gu <yi...@mesosphere.io>.
> On June 9, 2014, 5:53 p.m., Vinod Kone wrote:
> > Lets hold off on this refactor. This code is currently under refactor per my earlier review: https://reviews.apache.org/r/22151/
Oh cool! Sorry I didn't notice that. Let's hold off this.
- Yifan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22353/#review45097
-----------------------------------------------------------
On June 8, 2014, 4:29 a.m., Yifan Gu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22353/
> -----------------------------------------------------------
>
> (Updated June 8, 2014, 4:29 a.m.)
>
>
> Review request for mesos, Adam B, Benjamin Hindman, Niklas Nielsen, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Refactored on Master::launchTasks:
> Extracted the offer validation and task validation logic, so that other modules can reuse the code.(e.g. resize tasks).
> Put valid tasks in a ready queue after validation.
> Modified on ExecutorInfoChecker to support above.
> Changed Master::launchTask's interface from (const TaskInfo&, const Framework*, const Slave*)
> to (const TaskInfo&, const FrameworkID&, const SlaveID&).
>
>
> Diffs
> -----
>
> src/master/master.hpp e244831
> src/master/master.cpp 89f426c
>
> Diff: https://reviews.apache.org/r/22353/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Yifan Gu
>
>
Re: Review Request 22353: Refactored Master::launchTasks
Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22353/#review45097
-----------------------------------------------------------
Lets hold off on this refactor. This code is currently under refactor per my earlier review: https://reviews.apache.org/r/22151/
- Vinod Kone
On June 8, 2014, 4:29 a.m., Yifan Gu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22353/
> -----------------------------------------------------------
>
> (Updated June 8, 2014, 4:29 a.m.)
>
>
> Review request for mesos, Adam B, Benjamin Hindman, Niklas Nielsen, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Refactored on Master::launchTasks:
> Extracted the offer validation and task validation logic, so that other modules can reuse the code.(e.g. resize tasks).
> Put valid tasks in a ready queue after validation.
> Modified on ExecutorInfoChecker to support above.
> Changed Master::launchTask's interface from (const TaskInfo&, const Framework*, const Slave*)
> to (const TaskInfo&, const FrameworkID&, const SlaveID&).
>
>
> Diffs
> -----
>
> src/master/master.hpp e244831
> src/master/master.cpp 89f426c
>
> Diff: https://reviews.apache.org/r/22353/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Yifan Gu
>
>
Re: Review Request 22353: Refactored Master::launchTasks
Posted by Yifan Gu <yi...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22353/
-----------------------------------------------------------
(Updated June 8, 2014, 4:29 a.m.)
Review request for mesos, Adam B, Benjamin Hindman, Niklas Nielsen, and Vinod Kone.
Changes
-------
Deleted a blank line.
Repository: mesos-git
Description
-------
Refactored on Master::launchTasks:
Extracted the offer validation and task validation logic, so that other modules can reuse the code.(e.g. resize tasks).
Put valid tasks in a ready queue after validation.
Modified on ExecutorInfoChecker to support above.
Changed Master::launchTask's interface from (const TaskInfo&, const Framework*, const Slave*)
to (const TaskInfo&, const FrameworkID&, const SlaveID&).
Diffs (updated)
-----
src/master/master.hpp e244831
src/master/master.cpp 89f426c
Diff: https://reviews.apache.org/r/22353/diff/
Testing
-------
make check
Thanks,
Yifan Gu
Re: Review Request 22353: Refactored Master::launchTasks
Posted by Yifan Gu <yi...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22353/#review45028
-----------------------------------------------------------
src/master/master.hpp
<https://reviews.apache.org/r/22353/#comment79668>
I'm not sure if everybody likes this..
- Yifan Gu
On June 8, 2014, 4:19 a.m., Yifan Gu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22353/
> -----------------------------------------------------------
>
> (Updated June 8, 2014, 4:19 a.m.)
>
>
> Review request for mesos, Adam B, Benjamin Hindman, Niklas Nielsen, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Refactored on Master::launchTasks:
> Extracted the offer validation and task validation logic, so that other modules can reuse the code.(e.g. resize tasks).
> Put valid tasks in a ready queue after validation.
> Modified on ExecutorInfoChecker to support above.
> Changed Master::launchTask's interface from (const TaskInfo&, const Framework*, const Slave*)
> to (const TaskInfo&, const FrameworkID&, const SlaveID&).
>
>
> Diffs
> -----
>
> src/master/master.hpp e244831
> src/master/master.cpp 89f426c
>
> Diff: https://reviews.apache.org/r/22353/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Yifan Gu
>
>
Re: Review Request 22353: Refactored Master::launchTasks
Posted by Yifan Gu <yi...@mesosphere.io>.
> On June 8, 2014, 4:27 a.m., Yifan Gu wrote:
> > I did this because I found that if those offervalidation and taskvalidation part can be reused in other stuffs like resizeTasks.
> > And I hope this can make the launchTasks more readable.
> > This is just my first trial to refactor this part. I am not sure if it's consistent to the project's style, so I really need some help.
> > Any feedback is highly welcome! Thank you!
>
> Dominic Hamon wrote:
> See also https://reviews.apache.org/r/20423/ which takes the *Visitor classes out of master and into their own files for easier testing/reuse.
Cool stuff! I think @vinod maybe want to take a look at this.
- Yifan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22353/#review45029
-----------------------------------------------------------
On June 8, 2014, 4:29 a.m., Yifan Gu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22353/
> -----------------------------------------------------------
>
> (Updated June 8, 2014, 4:29 a.m.)
>
>
> Review request for mesos, Adam B, Benjamin Hindman, Niklas Nielsen, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Refactored on Master::launchTasks:
> Extracted the offer validation and task validation logic, so that other modules can reuse the code.(e.g. resize tasks).
> Put valid tasks in a ready queue after validation.
> Modified on ExecutorInfoChecker to support above.
> Changed Master::launchTask's interface from (const TaskInfo&, const Framework*, const Slave*)
> to (const TaskInfo&, const FrameworkID&, const SlaveID&).
>
>
> Diffs
> -----
>
> src/master/master.hpp e244831
> src/master/master.cpp 89f426c
>
> Diff: https://reviews.apache.org/r/22353/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Yifan Gu
>
>
Re: Review Request 22353: Refactored Master::launchTasks
Posted by Dominic Hamon <dh...@twopensource.com>.
> On June 7, 2014, 9:27 p.m., Yifan Gu wrote:
> > I did this because I found that if those offervalidation and taskvalidation part can be reused in other stuffs like resizeTasks.
> > And I hope this can make the launchTasks more readable.
> > This is just my first trial to refactor this part. I am not sure if it's consistent to the project's style, so I really need some help.
> > Any feedback is highly welcome! Thank you!
See also https://reviews.apache.org/r/20423/ which takes the *Visitor classes out of master and into their own files for easier testing/reuse.
- Dominic
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22353/#review45029
-----------------------------------------------------------
On June 7, 2014, 9:29 p.m., Yifan Gu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22353/
> -----------------------------------------------------------
>
> (Updated June 7, 2014, 9:29 p.m.)
>
>
> Review request for mesos, Adam B, Benjamin Hindman, Niklas Nielsen, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Refactored on Master::launchTasks:
> Extracted the offer validation and task validation logic, so that other modules can reuse the code.(e.g. resize tasks).
> Put valid tasks in a ready queue after validation.
> Modified on ExecutorInfoChecker to support above.
> Changed Master::launchTask's interface from (const TaskInfo&, const Framework*, const Slave*)
> to (const TaskInfo&, const FrameworkID&, const SlaveID&).
>
>
> Diffs
> -----
>
> src/master/master.hpp e244831
> src/master/master.cpp 89f426c
>
> Diff: https://reviews.apache.org/r/22353/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Yifan Gu
>
>
Re: Review Request 22353: Refactored Master::launchTasks
Posted by Yifan Gu <yi...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22353/#review45029
-----------------------------------------------------------
I did this because I found that if those offervalidation and taskvalidation part can be reused in other stuffs like resizeTasks.
And I hope this can make the launchTasks more readable.
This is just my first trial to refactor this part. I am not sure if it's consistent to the project's style, so I really need some help.
Any feedback is highly welcome! Thank you!
- Yifan Gu
On June 8, 2014, 4:19 a.m., Yifan Gu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22353/
> -----------------------------------------------------------
>
> (Updated June 8, 2014, 4:19 a.m.)
>
>
> Review request for mesos, Adam B, Benjamin Hindman, Niklas Nielsen, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Refactored on Master::launchTasks:
> Extracted the offer validation and task validation logic, so that other modules can reuse the code.(e.g. resize tasks).
> Put valid tasks in a ready queue after validation.
> Modified on ExecutorInfoChecker to support above.
> Changed Master::launchTask's interface from (const TaskInfo&, const Framework*, const Slave*)
> to (const TaskInfo&, const FrameworkID&, const SlaveID&).
>
>
> Diffs
> -----
>
> src/master/master.hpp e244831
> src/master/master.cpp 89f426c
>
> Diff: https://reviews.apache.org/r/22353/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Yifan Gu
>
>