Re: Review Request 63997: Added a new allocator method to add resources to agents.

2017-11-29 Thread Jie Yu

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63997/#review192229
---


Ship it!




Ship It!

- Jie Yu


On Nov. 29, 2017, 4:27 p.m., Benjamin Bannier wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63997/
> ---
> 
> (Updated Nov. 29, 2017, 4:27 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The added method complements 'Allocator::addSlave'. While in
> 'addSlave' the total agent resources and used resources are passed,
> the method 'addResourceProvider' added here allows to add additional,
> potentially used resources to an existing agent.
> 
> 
> Diffs
> -
> 
>   include/mesos/allocator/allocator.hpp 
> ae122003487ca8956573e993cd3993aa8cc286f1 
>   src/master/allocator/mesos/allocator.hpp 
> 8fa4fdeec4ec64bcd49fc442c230d8684a11cfd9 
>   src/master/allocator/mesos/hierarchical.hpp 
> 2c4832b29842330fa57756cd3d4202f265a820f3 
>   src/master/allocator/mesos/hierarchical.cpp 
> 5ce9ceaa3a5f84a1e076d45448863c418531cc2b 
>   src/tests/allocator.hpp 6a84f1beb86dceb5a5e9bf4615c13a216f3d0905 
>   src/tests/hierarchical_allocator_tests.cpp 
> f0f95ba4f667bf8ea54e985d8cde913a4170d8ff 
> 
> 
> Diff: https://reviews.apache.org/r/63997/diff/5/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>



Re: Review Request 63997: Added a new allocator method to add resources to agents.

2017-11-29 Thread Benjamin Bannier

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63997/
---

(Updated Nov. 29, 2017, 5:27 p.m.)


Review request for mesos, Benjamin Mahler and Jie Yu.


Changes
---

Rebased.


Repository: mesos


Description
---

The added method complements 'Allocator::addSlave'. While in
'addSlave' the total agent resources and used resources are passed,
the method 'addResourceProvider' added here allows to add additional,
potentially used resources to an existing agent.


Diffs (updated)
-

  include/mesos/allocator/allocator.hpp 
ae122003487ca8956573e993cd3993aa8cc286f1 
  src/master/allocator/mesos/allocator.hpp 
8fa4fdeec4ec64bcd49fc442c230d8684a11cfd9 
  src/master/allocator/mesos/hierarchical.hpp 
2c4832b29842330fa57756cd3d4202f265a820f3 
  src/master/allocator/mesos/hierarchical.cpp 
5ce9ceaa3a5f84a1e076d45448863c418531cc2b 
  src/tests/allocator.hpp 6a84f1beb86dceb5a5e9bf4615c13a216f3d0905 
  src/tests/hierarchical_allocator_tests.cpp 
f0f95ba4f667bf8ea54e985d8cde913a4170d8ff 


Diff: https://reviews.apache.org/r/63997/diff/5/

Changes: https://reviews.apache.org/r/63997/diff/4-5/


Testing
---

`make check`


Thanks,

Benjamin Bannier



Re: Review Request 63997: Added a new allocator method to add resources to agents.

2017-11-28 Thread Benjamin Bannier


> On Nov. 28, 2017, 12:26 a.m., Benjamin Mahler wrote:
> > include/mesos/allocator/allocator.hpp
> > Lines 220 (patched)
> > 
> >
> > Hm.. why is this called out? I don't think a caller could depend on 
> > this for correctness, so it seems better not to put this in the interface 
> > documentation?

I removed it here. I agree this promise here is neither useful nor needed.


> On Nov. 28, 2017, 12:26 a.m., Benjamin Mahler wrote:
> > src/master/allocator/mesos/hierarchical.cpp
> > Lines 689-718 (patched)
> > 
> >
> > Is this copied from elsewhere? If so, can you guys think about how to 
> > pull it out like we did for `updateSlaveTotal`? Is this 
> > `trackAllocatedResources`?

This code was copied from `addSlave`. In a preceeding patch I now introduce a 
dedicated helper function to track these allocated resources and simplified the 
code here.


- Benjamin


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63997/#review191947
---


On Nov. 28, 2017, 10:32 p.m., Benjamin Bannier wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63997/
> ---
> 
> (Updated Nov. 28, 2017, 10:32 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The added method complements 'Allocator::addSlave'. While in
> 'addSlave' the total agent resources and used resources are passed,
> the method 'addResourceProvider' added here allows to add additional,
> potentially used resources to an existing agent.
> 
> 
> Diffs
> -
> 
>   include/mesos/allocator/allocator.hpp 
> ae122003487ca8956573e993cd3993aa8cc286f1 
>   src/master/allocator/mesos/allocator.hpp 
> 8fa4fdeec4ec64bcd49fc442c230d8684a11cfd9 
>   src/master/allocator/mesos/hierarchical.hpp 
> 2c4832b29842330fa57756cd3d4202f265a820f3 
>   src/master/allocator/mesos/hierarchical.cpp 
> 5ce9ceaa3a5f84a1e076d45448863c418531cc2b 
>   src/tests/allocator.hpp 6a84f1beb86dceb5a5e9bf4615c13a216f3d0905 
>   src/tests/hierarchical_allocator_tests.cpp 
> f0f95ba4f667bf8ea54e985d8cde913a4170d8ff 
> 
> 
> Diff: https://reviews.apache.org/r/63997/diff/4/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>



Re: Review Request 63997: Added a new allocator method to add resources to agents.

2017-11-28 Thread Benjamin Bannier

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63997/
---

(Updated Nov. 28, 2017, 10:32 p.m.)


Review request for mesos, Benjamin Mahler and Jie Yu.


Changes
---

Addressed comments from bmahler.


Repository: mesos


Description
---

The added method complements 'Allocator::addSlave'. While in
'addSlave' the total agent resources and used resources are passed,
the method 'addResourceProvider' added here allows to add additional,
potentially used resources to an existing agent.


Diffs (updated)
-

  include/mesos/allocator/allocator.hpp 
ae122003487ca8956573e993cd3993aa8cc286f1 
  src/master/allocator/mesos/allocator.hpp 
8fa4fdeec4ec64bcd49fc442c230d8684a11cfd9 
  src/master/allocator/mesos/hierarchical.hpp 
2c4832b29842330fa57756cd3d4202f265a820f3 
  src/master/allocator/mesos/hierarchical.cpp 
5ce9ceaa3a5f84a1e076d45448863c418531cc2b 
  src/tests/allocator.hpp 6a84f1beb86dceb5a5e9bf4615c13a216f3d0905 
  src/tests/hierarchical_allocator_tests.cpp 
f0f95ba4f667bf8ea54e985d8cde913a4170d8ff 


Diff: https://reviews.apache.org/r/63997/diff/4/

Changes: https://reviews.apache.org/r/63997/diff/3-4/


Testing
---

`make check`


Thanks,

Benjamin Bannier



Re: Review Request 63997: Added a new allocator method to add resources to agents.

2017-11-27 Thread Benjamin Mahler

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63997/#review191947
---




include/mesos/allocator/allocator.hpp
Lines 220 (patched)


Hm.. why is this called out? I don't think a caller could depend on this 
for correctness, so it seems better not to put this in the interface 
documentation?



src/master/allocator/mesos/hierarchical.cpp
Lines 689-718 (patched)


Is this copied from elsewhere? If so, can you guys think about how to pull 
it out like we did for `updateSlaveTotal`? Is this `trackAllocatedResources`?


- Benjamin Mahler


On Nov. 27, 2017, 2:55 p.m., Benjamin Bannier wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63997/
> ---
> 
> (Updated Nov. 27, 2017, 2:55 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The added method complements 'Allocator::addSlave'. While in
> 'addSlave' the total agent resources and used resources are passed,
> the method 'addResourceProvider' added here allows to add additional,
> potentially used resources to an existing agent.
> 
> 
> Diffs
> -
> 
>   include/mesos/allocator/allocator.hpp 
> ae122003487ca8956573e993cd3993aa8cc286f1 
>   src/master/allocator/mesos/allocator.hpp 
> 8fa4fdeec4ec64bcd49fc442c230d8684a11cfd9 
>   src/master/allocator/mesos/hierarchical.hpp 
> 2c4832b29842330fa57756cd3d4202f265a820f3 
>   src/master/allocator/mesos/hierarchical.cpp 
> 5ce9ceaa3a5f84a1e076d45448863c418531cc2b 
>   src/tests/allocator.hpp 6a84f1beb86dceb5a5e9bf4615c13a216f3d0905 
>   src/tests/hierarchical_allocator_tests.cpp 
> f0f95ba4f667bf8ea54e985d8cde913a4170d8ff 
> 
> 
> Diff: https://reviews.apache.org/r/63997/diff/3/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>



Re: Review Request 63997: Added a new allocator method to add resources to agents.

2017-11-27 Thread Benjamin Bannier

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63997/
---

(Updated Nov. 27, 2017, 3:55 p.m.)


Review request for mesos, Benjamin Mahler and Jie Yu.


Changes
---

Rebased.


Repository: mesos


Description
---

The added method complements 'Allocator::addSlave'. While in
'addSlave' the total agent resources and used resources are passed,
the method 'addResourceProvider' added here allows to add additional,
potentially used resources to an existing agent.


Diffs (updated)
-

  include/mesos/allocator/allocator.hpp 
ae122003487ca8956573e993cd3993aa8cc286f1 
  src/master/allocator/mesos/allocator.hpp 
8fa4fdeec4ec64bcd49fc442c230d8684a11cfd9 
  src/master/allocator/mesos/hierarchical.hpp 
2c4832b29842330fa57756cd3d4202f265a820f3 
  src/master/allocator/mesos/hierarchical.cpp 
5ce9ceaa3a5f84a1e076d45448863c418531cc2b 
  src/tests/allocator.hpp 6a84f1beb86dceb5a5e9bf4615c13a216f3d0905 
  src/tests/hierarchical_allocator_tests.cpp 
f0f95ba4f667bf8ea54e985d8cde913a4170d8ff 


Diff: https://reviews.apache.org/r/63997/diff/3/

Changes: https://reviews.apache.org/r/63997/diff/2-3/


Testing
---

`make check`


Thanks,

Benjamin Bannier



Re: Review Request 63997: Added a new allocator method to add resources to agents.

2017-11-24 Thread Benjamin Bannier

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63997/
---

(Updated Nov. 24, 2017, 3:06 p.m.)


Review request for mesos, Benjamin Mahler and Jie Yu.


Changes
---

Renamed added method.


Summary (updated)
-

Added a new allocator method to add resources to agents.


Repository: mesos


Description (updated)
---

The added method complements 'Allocator::addSlave'. While in
'addSlave' the total agent resources and used resources are passed,
the method 'addResourceProvider' added here allows to add additional,
potentially used resources to an existing agent.


Diffs (updated)
-

  include/mesos/allocator/allocator.hpp 
ae122003487ca8956573e993cd3993aa8cc286f1 
  src/master/allocator/mesos/allocator.hpp 
8fa4fdeec4ec64bcd49fc442c230d8684a11cfd9 
  src/master/allocator/mesos/hierarchical.hpp 
2c4832b29842330fa57756cd3d4202f265a820f3 
  src/master/allocator/mesos/hierarchical.cpp 
cfeeb3bfa3ad7d78ff6e22cfc4adb1f0efa05629 
  src/tests/allocator.hpp 6a84f1beb86dceb5a5e9bf4615c13a216f3d0905 
  src/tests/hierarchical_allocator_tests.cpp 
f0f95ba4f667bf8ea54e985d8cde913a4170d8ff 


Diff: https://reviews.apache.org/r/63997/diff/2/

Changes: https://reviews.apache.org/r/63997/diff/1-2/


Testing
---

`make check`


Thanks,

Benjamin Bannier