You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Michael Park <mp...@apache.org> on 2017/06/13 08:36:49 UTC
Re: Review Request 60020: Added pushReservation and popReservation.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60020/
-----------------------------------------------------------
(Updated June 13, 2017, 1:36 a.m.)
Review request for mesos and Benjamin Mahler.
Changes
-------
Rebased.
Summary (updated)
-----------------
Added pushReservation and popReservation.
Bugs: MESOS-7655
https://issues.apache.org/jira/browse/MESOS-7655
Repository: mesos
Description (updated)
-------
Added pushReservation and popReservation.
Diffs (updated)
-----
include/mesos/resources.hpp 451b0cef6f84743e3d630104ba6f55665793f2bc
include/mesos/v1/resources.hpp c790927353122a4eb2bbbee31c6df57d97f3994b
src/common/resources.cpp f89f1aae7845f1e93dd5947de2e7a8e2bfce8bc4
src/v1/resources.cpp 24240eedc4b2747ca02998534437318c3396db4d
Diff: https://reviews.apache.org/r/60020/diff/2/
Changes: https://reviews.apache.org/r/60020/diff/1-2/
Testing
-------
Thanks,
Michael Park
Re: Review Request 60020: Resources: Added utilities `toUnreserved()`
and `(push|pop)Reservation`.
Posted by Michael Park <mp...@apache.org>.
> On June 13, 2017, 6:03 p.m., Benjamin Mahler wrote:
> > src/common/resources.cpp
> > Lines 1368 (patched)
> > <https://reviews.apache.org/r/60020/diff/2/?file=1749638#file1749638line1368>
> >
> > Is this hard to do? Any reason it was left out?
Was just left out temporarily. Just called `Resources::validate` for now.
- Michael
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60020/#review177849
-----------------------------------------------------------
On June 15, 2017, 12:40 a.m., Michael Park wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60020/
> -----------------------------------------------------------
>
> (Updated June 15, 2017, 12:40 a.m.)
>
>
> Review request for mesos and Benjamin Mahler.
>
>
> Bugs: MESOS-7655
> https://issues.apache.org/jira/browse/MESOS-7655
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This patches introduces utilities `toUnreserved`, `pushReservation` and
> `popReservation`. They are intended to replace the current `flatten`.
> We'll switch over to use them once the 'post-reservation-refinement'
> format is used for `Resources`.
>
>
> Diffs
> -----
>
> include/mesos/resources.hpp 2b55847be79c7930b598ef31c932e8aca0fa73db
> include/mesos/v1/resources.hpp 7c6e8569b990ad34fd6c449b31140f844dae222f
> src/common/resources.cpp 7b3fae1a34150964ba3831a3aef2f868e338aef8
> src/v1/resources.cpp 236fe17730918479a33314e51d14f3cc1679d432
>
>
> Diff: https://reviews.apache.org/r/60020/diff/4/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Michael Park
>
>
Re: Review Request 60020: Added pushReservation and popReservation.
Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60020/#review177849
-----------------------------------------------------------
Fix it, then Ship it!
include/mesos/resources.hpp
Lines 433-434 (patched)
<https://reviews.apache.org/r/60020/#comment251563>
Should these return `Try`s? Or is the caller responsible for calling these with a valid reservation and only when there is a reservation to pop, respectively? (If not we crash)
Would be great to add documentation so it's clear to the caller.
src/common/resources.cpp
Lines 1368 (patched)
<https://reviews.apache.org/r/60020/#comment251562>
Is this hard to do? Any reason it was left out?
- Benjamin Mahler
On June 13, 2017, 8:36 a.m., Michael Park wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60020/
> -----------------------------------------------------------
>
> (Updated June 13, 2017, 8:36 a.m.)
>
>
> Review request for mesos and Benjamin Mahler.
>
>
> Bugs: MESOS-7655
> https://issues.apache.org/jira/browse/MESOS-7655
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Added pushReservation and popReservation.
>
>
> Diffs
> -----
>
> include/mesos/resources.hpp 451b0cef6f84743e3d630104ba6f55665793f2bc
> include/mesos/v1/resources.hpp c790927353122a4eb2bbbee31c6df57d97f3994b
> src/common/resources.cpp f89f1aae7845f1e93dd5947de2e7a8e2bfce8bc4
> src/v1/resources.cpp 24240eedc4b2747ca02998534437318c3396db4d
>
>
> Diff: https://reviews.apache.org/r/60020/diff/2/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Michael Park
>
>
Re: Review Request 60020: Resources: Added `toUnreserved()` and
`(push|pop)Reservation`.
Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60020/#review178052
-----------------------------------------------------------
Fix it, then Ship it!
Modulo comments, be sure to replicate the changes in v1.
include/mesos/resources.hpp
Lines 428-429 (patched)
<https://reviews.apache.org/r/60020/#comment251845>
Can you put a newline between the comment paragraphs? Ditto on the other TODOs.
include/mesos/resources.hpp
Lines 444-446 (patched)
<https://reviews.apache.org/r/60020/#comment251883>
Should we CHECK that all of the last reservations we're popping here are to the same role? That seems to be the only sane use of this function?
include/mesos/resources.hpp
Lines 448-449 (patched)
<https://reviews.apache.org/r/60020/#comment251884>
All of the reservations removed?
- Benjamin Mahler
On June 15, 2017, 7:40 a.m., Michael Park wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60020/
> -----------------------------------------------------------
>
> (Updated June 15, 2017, 7:40 a.m.)
>
>
> Review request for mesos and Benjamin Mahler.
>
>
> Bugs: MESOS-7655
> https://issues.apache.org/jira/browse/MESOS-7655
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This patches introduces utilities `toUnreserved`, `pushReservation` and
> `popReservation`. They are intended to replace the current `flatten`.
> We'll switch over to use them once the 'post-reservation-refinement'
> format is used for `Resources`.
>
>
> Diffs
> -----
>
> include/mesos/resources.hpp 2b55847be79c7930b598ef31c932e8aca0fa73db
> include/mesos/v1/resources.hpp 7c6e8569b990ad34fd6c449b31140f844dae222f
> src/common/resources.cpp 7b3fae1a34150964ba3831a3aef2f868e338aef8
> src/v1/resources.cpp 236fe17730918479a33314e51d14f3cc1679d432
>
>
> Diff: https://reviews.apache.org/r/60020/diff/5/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Michael Park
>
>
Re: Review Request 60020: Resources: Added utilities `toUnreserved()`
and `(push|pop)Reservation`.
Posted by Neil Conway <ne...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60020/#review178014
-----------------------------------------------------------
`apply-reviews.py` fails for me on this patch:
```
2017-06-15 09:44:00 URL:https://reviews.apache.org/r/60020/diff/raw/ [6066/6066] -> "60020.patch" [1]
Checking 4 C++ files
Total errors found: 0
No Python files to lint
Error: No line in the commit message summary may exceed 72 characters.
```
- Neil Conway
On June 15, 2017, 7:40 a.m., Michael Park wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60020/
> -----------------------------------------------------------
>
> (Updated June 15, 2017, 7:40 a.m.)
>
>
> Review request for mesos and Benjamin Mahler.
>
>
> Bugs: MESOS-7655
> https://issues.apache.org/jira/browse/MESOS-7655
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This patches introduces utilities `toUnreserved`, `pushReservation` and
> `popReservation`. They are intended to replace the current `flatten`.
> We'll switch over to use them once the 'post-reservation-refinement'
> format is used for `Resources`.
>
>
> Diffs
> -----
>
> include/mesos/resources.hpp 2b55847be79c7930b598ef31c932e8aca0fa73db
> include/mesos/v1/resources.hpp 7c6e8569b990ad34fd6c449b31140f844dae222f
> src/common/resources.cpp 7b3fae1a34150964ba3831a3aef2f868e338aef8
> src/v1/resources.cpp 236fe17730918479a33314e51d14f3cc1679d432
>
>
> Diff: https://reviews.apache.org/r/60020/diff/5/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Michael Park
>
>
Re: Review Request 60020: Resources: Added utilities `toUnreserved()`
and `(push|pop)Reservation`.
Posted by Michael Park <mp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60020/
-----------------------------------------------------------
(Updated June 15, 2017, 12:40 a.m.)
Review request for mesos and Benjamin Mahler.
Summary (updated)
-----------------
Resources: Added utilities `toUnreserved()` and `(push|pop)Reservation`.
Bugs: MESOS-7655
https://issues.apache.org/jira/browse/MESOS-7655
Repository: mesos
Description (updated)
-------
This patches introduces utilities `toUnreserved`, `pushReservation` and
`popReservation`. They are intended to replace the current `flatten`.
We'll switch over to use them once the 'post-reservation-refinement'
format is used for `Resources`.
Diffs (updated)
-----
include/mesos/resources.hpp 2b55847be79c7930b598ef31c932e8aca0fa73db
include/mesos/v1/resources.hpp 7c6e8569b990ad34fd6c449b31140f844dae222f
src/common/resources.cpp 7b3fae1a34150964ba3831a3aef2f868e338aef8
src/v1/resources.cpp 236fe17730918479a33314e51d14f3cc1679d432
Diff: https://reviews.apache.org/r/60020/diff/4/
Changes: https://reviews.apache.org/r/60020/diff/3-4/
Testing
-------
Thanks,
Michael Park