Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-02-20 Thread Yongqiao Wang


> On Feb. 19, 2016, 9:36 a.m., Alexander Rukletsov wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1068-1070
> > 
> >
> > Why don't we need to set `rebalance` here?
> 
> Yongqiao Wang wrote:
> According to my understanding, A role appears in `quotaRoleSorter` if it 
> has a quota but it does not means it has one or more registered frameworks, 
> so if there is no framework register to this role, it does not need to 
> trigger the allocation immediately after changing it's weight.
> 
> Alexander Rukletsov wrote:
> This is correct, there may be no frameworks in a quota'd role. However, 
> there may also be some. Currently they are also added to `roleSorter`, but it 
> may change in the future. Can we at least add a comment explaining why we are 
> not rebalancing for the quota sorter?

OK, I have posted a new patch for adding this comments:  
https://reviews.apache.org/r/43806/


- Yongqiao


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


On Feb. 14, 2016, 11:37 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Feb. 14, 2016, 11:37 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Extending allocator interface to support dynamic weights.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp e163669c9c4e4c98572968f18987704b60722a79 
>   include/mesos/mesos.proto 0bd5abadb5abe052161963ca995c396f1ed832f2 
>   include/mesos/v1/mesos.proto 38e04cb19e303d1c71d2afad6ea73137aaa7403a 
>   src/master/allocator/mesos/allocator.hpp 
> 581eaad376e7b2febe0b6359014617b935a677a3 
>   src/master/allocator/mesos/hierarchical.hpp 
> 20d7ceb1a75ea5cb9efb1fc7fb085265b32864fe 
>   src/master/allocator/mesos/hierarchical.cpp 
> a9d2c23162892e0f97d89a076d2311091d91 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 4669149b81de39b4bb921ef7cd6787aa583f6e40 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 18797e42a9c2bd20392020237cfae600a5ffe12c 
>   src/master/allocator/sorter/sorter.hpp 
> a0a779b81f6d048271f15256b38ff907ae144b83 
>   src/tests/allocator.hpp 206e9ac3a83038a691f7929bdd627042b0f363b0 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-02-19 Thread Alexander Rukletsov


> On Feb. 19, 2016, 9:36 a.m., Alexander Rukletsov wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1068-1070
> > 
> >
> > Why don't we need to set `rebalance` here?
> 
> Yongqiao Wang wrote:
> According to my understanding, A role appears in `quotaRoleSorter` if it 
> has a quota but it does not means it has one or more registered frameworks, 
> so if there is no framework register to this role, it does not need to 
> trigger the allocation immediately after changing it's weight.

This is correct, there may be no frameworks in a quota'd role. However, there 
may also be some. Currently they are also added to `roleSorter`, but it may 
change in the future. Can we at least add a comment explaining why we are not 
rebalancing for the quota sorter?


- Alexander


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


On Feb. 14, 2016, 11:37 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Feb. 14, 2016, 11:37 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Extending allocator interface to support dynamic weights.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp e163669c9c4e4c98572968f18987704b60722a79 
>   include/mesos/mesos.proto 0bd5abadb5abe052161963ca995c396f1ed832f2 
>   include/mesos/v1/mesos.proto 38e04cb19e303d1c71d2afad6ea73137aaa7403a 
>   src/master/allocator/mesos/allocator.hpp 
> 581eaad376e7b2febe0b6359014617b935a677a3 
>   src/master/allocator/mesos/hierarchical.hpp 
> 20d7ceb1a75ea5cb9efb1fc7fb085265b32864fe 
>   src/master/allocator/mesos/hierarchical.cpp 
> a9d2c23162892e0f97d89a076d2311091d91 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 4669149b81de39b4bb921ef7cd6787aa583f6e40 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 18797e42a9c2bd20392020237cfae600a5ffe12c 
>   src/master/allocator/sorter/sorter.hpp 
> a0a779b81f6d048271f15256b38ff907ae144b83 
>   src/tests/allocator.hpp 206e9ac3a83038a691f7929bdd627042b0f363b0 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-02-19 Thread Yongqiao Wang


> On Feb. 19, 2016, 9:36 a.m., Alexander Rukletsov wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1068-1070
> > 
> >
> > Why don't we need to set `rebalance` here?

According to my understanding, A role appears in `quotaRoleSorter` if it has a 
quota but it does not means it has one or more registered frameworks, so if 
there is no framework register to this role, it does not need to trigger the 
allocation immediately after changing it's weight.


- Yongqiao


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


On Feb. 14, 2016, 11:37 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Feb. 14, 2016, 11:37 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Extending allocator interface to support dynamic weights.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp e163669c9c4e4c98572968f18987704b60722a79 
>   include/mesos/mesos.proto 0bd5abadb5abe052161963ca995c396f1ed832f2 
>   include/mesos/v1/mesos.proto 38e04cb19e303d1c71d2afad6ea73137aaa7403a 
>   src/master/allocator/mesos/allocator.hpp 
> 581eaad376e7b2febe0b6359014617b935a677a3 
>   src/master/allocator/mesos/hierarchical.hpp 
> 20d7ceb1a75ea5cb9efb1fc7fb085265b32864fe 
>   src/master/allocator/mesos/hierarchical.cpp 
> a9d2c23162892e0f97d89a076d2311091d91 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 4669149b81de39b4bb921ef7cd6787aa583f6e40 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 18797e42a9c2bd20392020237cfae600a5ffe12c 
>   src/master/allocator/sorter/sorter.hpp 
> a0a779b81f6d048271f15256b38ff907ae144b83 
>   src/tests/allocator.hpp 206e9ac3a83038a691f7929bdd627042b0f363b0 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-02-19 Thread Alexander Rukletsov

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




src/master/allocator/mesos/hierarchical.cpp (lines 1068 - 1070)


Why don't we need to set `rebalance` here?


- Alexander Rukletsov


On Feb. 14, 2016, 11:37 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Feb. 14, 2016, 11:37 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Extending allocator interface to support dynamic weights.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp e163669c9c4e4c98572968f18987704b60722a79 
>   include/mesos/mesos.proto 0bd5abadb5abe052161963ca995c396f1ed832f2 
>   include/mesos/v1/mesos.proto 38e04cb19e303d1c71d2afad6ea73137aaa7403a 
>   src/master/allocator/mesos/allocator.hpp 
> 581eaad376e7b2febe0b6359014617b935a677a3 
>   src/master/allocator/mesos/hierarchical.hpp 
> 20d7ceb1a75ea5cb9efb1fc7fb085265b32864fe 
>   src/master/allocator/mesos/hierarchical.cpp 
> a9d2c23162892e0f97d89a076d2311091d91 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 4669149b81de39b4bb921ef7cd6787aa583f6e40 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 18797e42a9c2bd20392020237cfae600a5ffe12c 
>   src/master/allocator/sorter/sorter.hpp 
> a0a779b81f6d048271f15256b38ff907ae144b83 
>   src/tests/allocator.hpp 206e9ac3a83038a691f7929bdd627042b0f363b0 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-02-14 Thread Yongqiao Wang

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

(Updated Feb. 14, 2016, 11:37 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Resoved conflict.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Extending allocator interface to support dynamic weights.


Diffs (updated)
-

  include/mesos/master/allocator.hpp e163669c9c4e4c98572968f18987704b60722a79 
  include/mesos/mesos.proto 0bd5abadb5abe052161963ca995c396f1ed832f2 
  include/mesos/v1/mesos.proto 38e04cb19e303d1c71d2afad6ea73137aaa7403a 
  src/master/allocator/mesos/allocator.hpp 
581eaad376e7b2febe0b6359014617b935a677a3 
  src/master/allocator/mesos/hierarchical.hpp 
20d7ceb1a75ea5cb9efb1fc7fb085265b32864fe 
  src/master/allocator/mesos/hierarchical.cpp 
a9d2c23162892e0f97d89a076d2311091d91 
  src/master/allocator/sorter/drf/sorter.hpp 
4669149b81de39b4bb921ef7cd6787aa583f6e40 
  src/master/allocator/sorter/drf/sorter.cpp 
18797e42a9c2bd20392020237cfae600a5ffe12c 
  src/master/allocator/sorter/sorter.hpp 
a0a779b81f6d048271f15256b38ff907ae144b83 
  src/tests/allocator.hpp 206e9ac3a83038a691f7929bdd627042b0f363b0 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-25 Thread Yongqiao Wang

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

(Updated Jan. 25, 2016, 3:06 p.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase to fix the build error for patch #41790.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description (updated)
---

Extending allocator interface to support dynamic weights.


Diffs (updated)
-

  include/mesos/master/allocator.hpp e163669c9c4e4c98572968f18987704b60722a79 
  include/mesos/mesos.proto 96b911fb370223933df52f9370897871827d2247 
  include/mesos/v1/mesos.proto 0501dfa27ed610666226953591a902eac4c295f8 
  src/master/allocator/mesos/allocator.hpp 
581eaad376e7b2febe0b6359014617b935a677a3 
  src/master/allocator/mesos/hierarchical.hpp 
2d01034f43c3653f6233792ee6614fa311249e5c 
  src/master/allocator/mesos/hierarchical.cpp 
65c7e6b15c5308c0910667e1b12f39b21293a316 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 206e9ac3a83038a691f7929bdd627042b0f363b0 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-19 Thread Adam B

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

Ship it!


Looks great. Just a couple of nits after your recent changes.

By the way, the diff page is getting crowded with 51 different versions of the 
patch. You don't need to upload rebases after every potentially conflicting 
commit.  Most of the time it's a simple enough change that the committer could 
do a fuzzy patch apply to get it, or we're far enough away from actually 
committing that we don't need it rebased as frequently. But other than flooding 
my email inbox and crowding ReviewBoard, there aren't any negative effects, so 
upload rebases as often as you deem necessary. It just seems like you upload 
them more often than anybody else I've seen.


src/master/allocator/mesos/hierarchical.cpp (lines 1055 - 1056)


Comment no longer applies, remove it.



src/master/allocator/mesos/hierarchical.cpp (line 1057)


`CHECK(weightInfo.has_role());`


- Adam B


On Jan. 18, 2016, 12:53 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Jan. 18, 2016, 12:53 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp e163669c9c4e4c98572968f18987704b60722a79 
>   include/mesos/mesos.proto 0be4bed336e86a5c377e87ac6212c70ac3b4c66b 
>   include/mesos/v1/mesos.proto c3244e87f9351c71312d2eace7a49bcac926fafd 
>   src/master/allocator/mesos/allocator.hpp 
> 581eaad376e7b2febe0b6359014617b935a677a3 
>   src/master/allocator/mesos/hierarchical.hpp 
> 101482156ffc5a4fe3cd60be222bfe609330ec3c 
>   src/master/allocator/mesos/hierarchical.cpp 
> 48acde69b1a2f305b568a7e322a58708063dd30a 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 206e9ac3a83038a691f7929bdd627042b0f363b0 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-19 Thread Yongqiao Wang

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

(Updated Jan. 20, 2016, 6:21 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Addressed comments of Adam.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp e163669c9c4e4c98572968f18987704b60722a79 
  include/mesos/mesos.proto 0be4bed336e86a5c377e87ac6212c70ac3b4c66b 
  include/mesos/v1/mesos.proto c3244e87f9351c71312d2eace7a49bcac926fafd 
  src/master/allocator/mesos/allocator.hpp 
581eaad376e7b2febe0b6359014617b935a677a3 
  src/master/allocator/mesos/hierarchical.hpp 
101482156ffc5a4fe3cd60be222bfe609330ec3c 
  src/master/allocator/mesos/hierarchical.cpp 
e32ee4aa3ed9793bb5a99233e699e5cc2bdd796b 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 206e9ac3a83038a691f7929bdd627042b0f363b0 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-18 Thread Yongqiao Wang

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

(Updated Jan. 18, 2016, 8:20 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description (updated)
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp e163669c9c4e4c98572968f18987704b60722a79 
  include/mesos/mesos.proto 0be4bed336e86a5c377e87ac6212c70ac3b4c66b 
  include/mesos/v1/mesos.proto c3244e87f9351c71312d2eace7a49bcac926fafd 
  src/master/allocator/mesos/allocator.hpp 
581eaad376e7b2febe0b6359014617b935a677a3 
  src/master/allocator/mesos/hierarchical.hpp 
101482156ffc5a4fe3cd60be222bfe609330ec3c 
  src/master/allocator/mesos/hierarchical.cpp 
48acde69b1a2f305b568a7e322a58708063dd30a 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 206e9ac3a83038a691f7929bdd627042b0f363b0 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-18 Thread Yongqiao Wang

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

(Updated Jan. 18, 2016, 8:32 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Addressed the comment of Adam.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description (updated)
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.

Testing Done:
Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/

Bugs closed: MESOS-3943


Diffs (updated)
-

  include/mesos/master/allocator.hpp e163669c9c4e4c98572968f18987704b60722a79 
  include/mesos/mesos.proto 0be4bed336e86a5c377e87ac6212c70ac3b4c66b 
  include/mesos/v1/mesos.proto c3244e87f9351c71312d2eace7a49bcac926fafd 
  src/master/allocator/mesos/allocator.hpp 
581eaad376e7b2febe0b6359014617b935a677a3 
  src/master/allocator/mesos/hierarchical.hpp 
101482156ffc5a4fe3cd60be222bfe609330ec3c 
  src/master/allocator/mesos/hierarchical.cpp 
48acde69b1a2f305b568a7e322a58708063dd30a 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 206e9ac3a83038a691f7929bdd627042b0f363b0 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-18 Thread Yongqiao Wang

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

(Updated Jan. 18, 2016, 8:33 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description (updated)
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs
-

  include/mesos/master/allocator.hpp e163669c9c4e4c98572968f18987704b60722a79 
  include/mesos/mesos.proto 0be4bed336e86a5c377e87ac6212c70ac3b4c66b 
  include/mesos/v1/mesos.proto c3244e87f9351c71312d2eace7a49bcac926fafd 
  src/master/allocator/mesos/allocator.hpp 
581eaad376e7b2febe0b6359014617b935a677a3 
  src/master/allocator/mesos/hierarchical.hpp 
101482156ffc5a4fe3cd60be222bfe609330ec3c 
  src/master/allocator/mesos/hierarchical.cpp 
48acde69b1a2f305b568a7e322a58708063dd30a 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 206e9ac3a83038a691f7929bdd627042b0f363b0 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-18 Thread Yongqiao Wang


> On Jan. 6, 2016, 10:09 a.m., Adam B wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1048-1051
> > 
> >
> > Does anything rely on this behavior of erasing 1.0s from the hashmap? I 
> > know it'll (slightly) reduce the number of bits in memory and persisted in 
> > the registry, but is there any other reason to do this? Might be a 
> > premature optimization. Besides, the sorters still get updated for 1.0s.
> > Thoughts?
> 
> Yongqiao Wang wrote:
> There is no any other reasons for erasing the default weight frm the 
> hasmap. In HierarchicalAllocatorProcess::roleWeight method of allocator, if 
> the role's weight does not exist in weights hashmap, then it will return 1.0. 
> so it is make sence to the erase it.
> 
> In addition, we should keep the same behaviour to only save the 
> non-default weights in allocator, master and registry.
> 
> Adam B wrote:
> I'm all for consistency, but since this behavior doesn't exist anywhere 
> else (yet), and there's no strong need for it, I'm inclined to follow the 
> KISS principle and not treat 1.0 updates specially. Let's not erase the 1.0s, 
> and just update weights[role] just like with any other valid value.
> 
> If it seems like a reasonable speed/space optimization, we can consider 
> it later for allocator, master, and/or registry. I can't foresee any 
> backwards compatibility issues if we have to change it later.

OK, agree.


- Yongqiao


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


On Jan. 18, 2016, 8:20 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Jan. 18, 2016, 8:20 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp e163669c9c4e4c98572968f18987704b60722a79 
>   include/mesos/mesos.proto 0be4bed336e86a5c377e87ac6212c70ac3b4c66b 
>   include/mesos/v1/mesos.proto c3244e87f9351c71312d2eace7a49bcac926fafd 
>   src/master/allocator/mesos/allocator.hpp 
> 581eaad376e7b2febe0b6359014617b935a677a3 
>   src/master/allocator/mesos/hierarchical.hpp 
> 101482156ffc5a4fe3cd60be222bfe609330ec3c 
>   src/master/allocator/mesos/hierarchical.cpp 
> 48acde69b1a2f305b568a7e322a58708063dd30a 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 206e9ac3a83038a691f7929bdd627042b0f363b0 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-18 Thread Yongqiao Wang

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

(Updated Jan. 18, 2016, 8:53 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp e163669c9c4e4c98572968f18987704b60722a79 
  include/mesos/mesos.proto 0be4bed336e86a5c377e87ac6212c70ac3b4c66b 
  include/mesos/v1/mesos.proto c3244e87f9351c71312d2eace7a49bcac926fafd 
  src/master/allocator/mesos/allocator.hpp 
581eaad376e7b2febe0b6359014617b935a677a3 
  src/master/allocator/mesos/hierarchical.hpp 
101482156ffc5a4fe3cd60be222bfe609330ec3c 
  src/master/allocator/mesos/hierarchical.cpp 
48acde69b1a2f305b568a7e322a58708063dd30a 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 206e9ac3a83038a691f7929bdd627042b0f363b0 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-15 Thread Yongqiao Wang

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

(Updated Jan. 15, 2016, 10:46 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.

Testing Done:
Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/

Bugs closed: MESOS-3943


Diffs (updated)
-

  include/mesos/master/allocator.hpp fcebcab71c50a725ca4e635c03c29eed2a406bc3 
  include/mesos/mesos.proto b12e0f3eff44d90ec01360fc08bf9e597d7ed9dd 
  include/mesos/v1/mesos.proto fa7e82e03b11cf6619a4f16e8e0fbbf755bf210c 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
5f08b6e7d18766d7d0f8350a280ec577b4895fb9 
  src/master/allocator/mesos/hierarchical.cpp 
d541bfa3f4190865c65d35c9d1ffdb8a3f194056 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-15 Thread Yongqiao Wang

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

(Updated Jan. 15, 2016, 8:50 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Addressed the comments of Adam.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description (updated)
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.

Testing Done:
Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/

Bugs closed: MESOS-3943


Diffs (updated)
-

  include/mesos/master/allocator.hpp fcebcab71c50a725ca4e635c03c29eed2a406bc3 
  include/mesos/mesos.proto b12e0f3eff44d90ec01360fc08bf9e597d7ed9dd 
  include/mesos/v1/mesos.proto fa7e82e03b11cf6619a4f16e8e0fbbf755bf210c 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
5f08b6e7d18766d7d0f8350a280ec577b4895fb9 
  src/master/allocator/mesos/hierarchical.cpp 
d541bfa3f4190865c65d35c9d1ffdb8a3f194056 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-15 Thread Adam B


> On Jan. 6, 2016, 2:09 a.m., Adam B wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1048-1051
> > 
> >
> > Does anything rely on this behavior of erasing 1.0s from the hashmap? I 
> > know it'll (slightly) reduce the number of bits in memory and persisted in 
> > the registry, but is there any other reason to do this? Might be a 
> > premature optimization. Besides, the sorters still get updated for 1.0s.
> > Thoughts?
> 
> Yongqiao Wang wrote:
> There is no any other reasons for erasing the default weight frm the 
> hasmap. In HierarchicalAllocatorProcess::roleWeight method of allocator, if 
> the role's weight does not exist in weights hashmap, then it will return 1.0. 
> so it is make sence to the erase it.
> 
> In addition, we should keep the same behaviour to only save the 
> non-default weights in allocator, master and registry.

I'm all for consistency, but since this behavior doesn't exist anywhere else 
(yet), and there's no strong need for it, I'm inclined to follow the KISS 
principle and not treat 1.0 updates specially. Let's not erase the 1.0s, and 
just update weights[role] just like with any other valid value.

If it seems like a reasonable speed/space optimization, we can consider it 
later for allocator, master, and/or registry. I can't foresee any backwards 
compatibility issues if we have to change it later.


- Adam


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


On Jan. 12, 2016, 1:34 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Jan. 12, 2016, 1:34 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp fcebcab71c50a725ca4e635c03c29eed2a406bc3 
>   include/mesos/mesos.proto 74e9d00d6826adfb7fd2433c3deced6d2ca51e98 
>   include/mesos/v1/mesos.proto 879107d842fd0d008b93fa10db7da8572640ea43 
>   src/master/allocator/mesos/allocator.hpp 
> 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 
> 86ea5a402ed67f8f22f11d5730147cd907d66a08 
>   src/master/allocator/mesos/hierarchical.cpp 
> df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-15 Thread Adam B

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

Ship it!


You fix these last couple issues; Let me wrap up reviewing the tests and then 
we can commit these.


src/master/allocator/mesos/hierarchical.cpp (line 1044)


I'm falling out of love with `updatingActiveRole`, because it makes it 
sound like there's only 1 active role. And `updatingAnActiveRole` is too many 
words.
How about `impactsShares` or `rebalance` or `instantAllocation`?



src/master/allocator/mesos/hierarchical.cpp (line 1050)


Since WeightInfo.role is optional, you should `CHECK_SOME()` it, or at 
least do an `if()` check.


- Adam B


On Jan. 12, 2016, 1:34 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Jan. 12, 2016, 1:34 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp fcebcab71c50a725ca4e635c03c29eed2a406bc3 
>   include/mesos/mesos.proto 74e9d00d6826adfb7fd2433c3deced6d2ca51e98 
>   include/mesos/v1/mesos.proto 879107d842fd0d008b93fa10db7da8572640ea43 
>   src/master/allocator/mesos/allocator.hpp 
> 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 
> 86ea5a402ed67f8f22f11d5730147cd907d66a08 
>   src/master/allocator/mesos/hierarchical.cpp 
> df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-12 Thread Yongqiao Wang

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

(Updated Jan. 12, 2016, 9:34 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp fcebcab71c50a725ca4e635c03c29eed2a406bc3 
  include/mesos/mesos.proto 74e9d00d6826adfb7fd2433c3deced6d2ca51e98 
  include/mesos/v1/mesos.proto 879107d842fd0d008b93fa10db7da8572640ea43 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-11 Thread Yongqiao Wang

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

(Updated Jan. 12, 2016, 4:04 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp fcebcab71c50a725ca4e635c03c29eed2a406bc3 
  include/mesos/mesos.proto 74e9d00d6826adfb7fd2433c3deced6d2ca51e98 
  include/mesos/v1/mesos.proto 879107d842fd0d008b93fa10db7da8572640ea43 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-11 Thread Yongqiao Wang

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

(Updated Jan. 12, 2016, 7:29 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp fcebcab71c50a725ca4e635c03c29eed2a406bc3 
  include/mesos/mesos.proto 74e9d00d6826adfb7fd2433c3deced6d2ca51e98 
  include/mesos/v1/mesos.proto 879107d842fd0d008b93fa10db7da8572640ea43 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-11 Thread Yongqiao Wang

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

(Updated Jan. 11, 2016, 11:31 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp fcebcab71c50a725ca4e635c03c29eed2a406bc3 
  include/mesos/mesos.proto 74e9d00d6826adfb7fd2433c3deced6d2ca51e98 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-11 Thread Yongqiao Wang

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

(Updated Jan. 11, 2016, 2:48 p.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp fcebcab71c50a725ca4e635c03c29eed2a406bc3 
  include/mesos/mesos.proto 74e9d00d6826adfb7fd2433c3deced6d2ca51e98 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-09 Thread Yongqiao Wang

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

(Updated Jan. 9, 2016, 11:36 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp fcebcab71c50a725ca4e635c03c29eed2a406bc3 
  include/mesos/mesos.proto 74e9d00d6826adfb7fd2433c3deced6d2ca51e98 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-08 Thread Yongqiao Wang

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

(Updated Jan. 8, 2016, 12:40 p.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp fcebcab71c50a725ca4e635c03c29eed2a406bc3 
  include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-06 Thread Yongqiao Wang

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

(Updated Jan. 6, 2016, 11:01 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Addressed the comments of Adam.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
  include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-06 Thread Adam B

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


Nearly flawless, but I want to wait until I've gotten through a couple others 
before I commit them all as a group.


include/mesos/master/allocator.hpp (lines 402 - 406)


Remove the first "Updates weights." line, since that's no more helpful than 
the function name. The next sentence makes a better doxygen brief description 
anyway, maybe reworded something like: 
"Updates the weight of each provided role.
Subsequent allocation calculations will use these updated weights."



include/mesos/mesos.proto (line 1665)


Useless comment. Please remove.



src/master/allocator/mesos/hierarchical.cpp (lines 1048 - 1051)


Does anything rely on this behavior of erasing 1.0s from the hashmap? I 
know it'll (slightly) reduce the number of bits in memory and persisted in the 
registry, but is there any other reason to do this? Might be a premature 
optimization. Besides, the sorters still get updated for 1.0s.
Thoughts?


- Adam B


On Jan. 5, 2016, 6:14 p.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Jan. 5, 2016, 6:14 p.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
>   include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
>   include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
>   src/master/allocator/mesos/allocator.hpp 
> 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 
> 86ea5a402ed67f8f22f11d5730147cd907d66a08 
>   src/master/allocator/mesos/hierarchical.cpp 
> df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-06 Thread Yongqiao Wang


> On Jan. 6, 2016, 10:09 a.m., Adam B wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1048-1051
> > 
> >
> > Does anything rely on this behavior of erasing 1.0s from the hashmap? I 
> > know it'll (slightly) reduce the number of bits in memory and persisted in 
> > the registry, but is there any other reason to do this? Might be a 
> > premature optimization. Besides, the sorters still get updated for 1.0s.
> > Thoughts?

There is no any other reasons for erasing the default weight frm the hasmap. In 
HierarchicalAllocatorProcess::roleWeight method of allocator, if the role's 
weight does not exist in weights hashmap, then it will return 1.0. so it is 
make sence to the erase it.

In addition, we should keep the same behaviour to only save the non-default 
weights in allocator, master and registry.


- Yongqiao


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


On Jan. 6, 2016, 2:14 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Jan. 6, 2016, 2:14 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
>   include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
>   include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
>   src/master/allocator/mesos/allocator.hpp 
> 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 
> 86ea5a402ed67f8f22f11d5730147cd907d66a08 
>   src/master/allocator/mesos/hierarchical.cpp 
> df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-05 Thread Yongqiao Wang

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

(Updated Jan. 5, 2016, 11:38 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
  include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-05 Thread Yongqiao Wang

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

(Updated Jan. 5, 2016, 12:50 p.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
  include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-05 Thread Yongqiao Wang

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

(Updated Jan. 5, 2016, 12:54 p.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
  include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-05 Thread Yongqiao Wang

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

(Updated Jan. 6, 2016, 1:53 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
  include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-05 Thread Yongqiao Wang

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

(Updated Jan. 6, 2016, 2:06 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
  include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-05 Thread Yongqiao Wang

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

(Updated Jan. 6, 2016, 2:14 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
  include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2016-01-04 Thread Yongqiao Wang

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

(Updated Jan. 4, 2016, 11:55 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Adressed the comments of Adam.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
  include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2016-01-04 Thread Adam B

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


Looks good. Nice, simple, and clean. Just a few suggestions, and we'll get this 
in.


include/mesos/mesos.proto (line 1669)


Let's make it `optional`, in case we later want to add weights per 
principal, frameworkId, etc. Experienced protobuffers say "`required` is 
forever" and usually only recommend one required field per protobuf message. 
Since this is a WeightInfo, only `weight` needs to be required.



include/mesos/mesos.proto (lines 1676 - 1678)


Do we really need this message? Can't we just use `repeated WeightInfo 
weightInfos` in any other protobuf that needs this, or use `vector` 
in the allocator API?



src/master/allocator/mesos/hierarchical.cpp (line 1044)


How about `updatingActiveRole`?



src/master/allocator/mesos/hierarchical.cpp (lines 1061 - 1063)


Why not do this check up with line 1048 where you set the weight in the 
`weights[]` map? Doesn't make sense to update the entry in the map and then 
erase it.



src/master/allocator/mesos/hierarchical.cpp (line 1066)


"If at least one of the updated roles has registered frameworks, then 
trigger..."


- Adam B


On Jan. 4, 2016, 12:27 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Jan. 4, 2016, 12:27 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
>   include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
>   include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
>   src/master/allocator/mesos/allocator.hpp 
> 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 
> 86ea5a402ed67f8f22f11d5730147cd907d66a08 
>   src/master/allocator/mesos/hierarchical.cpp 
> 7f900c4e024485704d79e57ae22407557598fe6c 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2016-01-04 Thread Yongqiao Wang

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

(Updated Jan. 4, 2016, 11:21 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
  include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2016-01-04 Thread Yongqiao Wang


> On Jan. 4, 2016, 10:23 a.m., Adam B wrote:
> > include/mesos/mesos.proto, lines 1676-1678
> > 
> >
> > Do we really need this message? Can't we just use `repeated WeightInfo 
> > weightInfos` in any other protobuf that needs this, or use 
> > `vector` in the allocator API?

I refered the other message difination in mesos.proto, such as Labels, Ports, 
Credentials, Parameters, etc. in addition, this message is also used in weights 
persist and authrization interface (Refer patch #41681 for the details), and I 
think define this message is simple that vector.


> On Jan. 4, 2016, 10:23 a.m., Adam B wrote:
> > include/mesos/mesos.proto, line 1669
> > 
> >
> > Let's make it `optional`, in case we later want to add weights per 
> > principal, frameworkId, etc. Experienced protobuffers say "`required` is 
> > forever" and usually only recommend one required field per protobuf 
> > message. Since this is a WeightInfo, only `weight` needs to be required.

Agree. But how to handle the case that end user does not specify role (only 
specify weight) in the JSON when update weight? two proposal as below:
1. Return an error.
2. Update the weight of * role.

I prefer #1 due to it can avoid the careless of end user. @adam, what is your 
comments?


- Yongqiao


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


On Jan. 4, 2016, 11:21 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Jan. 4, 2016, 11:21 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
>   include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
>   include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
>   src/master/allocator/mesos/allocator.hpp 
> 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 
> 86ea5a402ed67f8f22f11d5730147cd907d66a08 
>   src/master/allocator/mesos/hierarchical.cpp 
> 7f900c4e024485704d79e57ae22407557598fe6c 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2016-01-04 Thread Yongqiao Wang

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

(Updated Jan. 4, 2016, 8:27 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
  include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-04 Thread Adam B


> On Jan. 4, 2016, 2:23 a.m., Adam B wrote:
> > include/mesos/mesos.proto, line 1669
> > 
> >
> > Let's make it `optional`, in case we later want to add weights per 
> > principal, frameworkId, etc. Experienced protobuffers say "`required` is 
> > forever" and usually only recommend one required field per protobuf 
> > message. Since this is a WeightInfo, only `weight` needs to be required.
> 
> Yongqiao Wang wrote:
> Agree. But how to handle the case that end user does not specify role 
> (only specify weight) in the JSON when update weight? two proposal as below:
> 1. Return an error.
> 2. Update the weight of * role.
> 
> I prefer #1 due to it can avoid the careless of end user. @adam, what is 
> your comments?

Agreed with #1. Updates must be explicit about what role they're updating, and 
a missing role is an error.


> On Jan. 4, 2016, 2:23 a.m., Adam B wrote:
> > include/mesos/mesos.proto, lines 1676-1678
> > 
> >
> > Do we really need this message? Can't we just use `repeated WeightInfo 
> > weightInfos` in any other protobuf that needs this, or use 
> > `vector` in the allocator API?
> 
> Yongqiao Wang wrote:
> I refered the other message difination in mesos.proto, such as Labels, 
> Ports, Credentials, Parameters, etc. in addition, this message is also used 
> in weights persist and authrization interface (Refer patch #41681 for the 
> details), and I think define this message is simple that vector.

We've started to realize that these collection wrapper messages make 
json/protobuf serialization unnecessarily more verbose, without adding any 
valuable flexibility for extending the WeightInfos message later.
Looking at patch #41681, you're actually persisting `repeated Weight weights;` 
(not sure why it isn't `repeated WeightInfo weights;`) in registry.proto. And 
the authorizer uses `ACL::UpdateWeights` instead, so neither registry nor 
authorizer use WeightInfos. I can't see any reason why you can't use 
`vector` or `RepeatedPtrField` instead.


- Adam


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


On Jan. 4, 2016, 5:52 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Jan. 4, 2016, 5:52 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
>   include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
>   include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
>   src/master/allocator/mesos/allocator.hpp 
> 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 
> 86ea5a402ed67f8f22f11d5730147cd907d66a08 
>   src/master/allocator/mesos/hierarchical.cpp 
> 7f900c4e024485704d79e57ae22407557598fe6c 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-04 Thread Yongqiao Wang

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

(Updated Jan. 4, 2016, 1:52 p.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
  include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-04 Thread Yongqiao Wang

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

(Updated Jan. 4, 2016, 1:44 p.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Summary (updated)
-

Extending allocator interface to support dynamic weights.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
  include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-04 Thread Yongqiao Wang

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

(Updated Jan. 5, 2016, 5:27 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Address the comments of Adam.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
  include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-04 Thread Yongqiao Wang

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

(Updated Jan. 5, 2016, 5:45 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
  include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights.

2016-01-04 Thread Yongqiao Wang

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

(Updated Jan. 5, 2016, 7:23 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 158e08774c4a4fa5ec667388c61e55dbdafc7f67 
  include/mesos/v1/mesos.proto c6c5a81eb9282d188d90fe395e1c16633a2a64cf 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-31 Thread Yongqiao Wang

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

(Updated Dec. 31, 2015, 12:07 p.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

If the weight is updated to the default value (1.0), then remove from weights 
hashmap.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-31 Thread Yongqiao Wang

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

(Updated Dec. 31, 2015, 11:53 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-30 Thread Yongqiao Wang

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

(Updated Dec. 30, 2015, 8:07 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-30 Thread Yongqiao Wang

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

(Updated Dec. 30, 2015, 11:54 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-30 Thread Yongqiao Wang

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

(Updated Dec. 30, 2015, 8:32 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-29 Thread Yongqiao Wang

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

(Updated Dec. 30, 2015, 2:32 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-29 Thread Yongqiao Wang

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

(Updated Dec. 29, 2015, 8:59 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-29 Thread Yongqiao Wang

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

(Updated Dec. 29, 2015, 9:02 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-29 Thread Yongqiao Wang

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

(Updated Dec. 29, 2015, 9:52 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-29 Thread Yongqiao Wang

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

(Updated Dec. 29, 2015, 12:49 p.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-28 Thread Yongqiao Wang

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

(Updated Dec. 29, 2015, 6:38 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
775182515dcb52bd873ecdf98c827320251a59c8 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-28 Thread Yongqiao Wang

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

(Updated Dec. 29, 2015, 7:03 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Update the parameter to WeightInfos protobuf rather than a hashmap.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-28 Thread Yongqiao Wang

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

(Updated Dec. 29, 2015, 7:20 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
7f900c4e024485704d79e57ae22407557598fe6c 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-25 Thread Yongqiao Wang

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

(Updated Dec. 26, 2015, 2:20 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
775182515dcb52bd873ecdf98c827320251a59c8 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Qian Zhang

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



src/master/allocator/mesos/hierarchical.cpp (line 1055)


I think we do not need to call activeRoles.contains(), instead, we can 
directly call roleSorter->contains(role) similar with what we did in 
HierarchicalAllocatorProcess::setQuota().


- Qian Zhang


On Dec. 24, 2015, 9:42 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Dec. 24, 2015, 9:42 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
>   src/master/allocator/mesos/allocator.hpp 
> 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 
> 86ea5a402ed67f8f22f11d5730147cd907d66a08 
>   src/master/allocator/mesos/hierarchical.cpp 
> 775182515dcb52bd873ecdf98c827320251a59c8 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Yongqiao Wang

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

(Updated Dec. 24, 2015, 2:46 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Addressed the comments of Qian.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
775182515dcb52bd873ecdf98c827320251a59c8 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Yongqiao Wang

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

(Updated Dec. 24, 2015, 2:41 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
775182515dcb52bd873ecdf98c827320251a59c8 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Qian Zhang

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

Ship it!


Ship It!

- Qian Zhang


On Dec. 24, 2015, 10:46 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Dec. 24, 2015, 10:46 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
>   src/master/allocator/mesos/allocator.hpp 
> 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 
> 86ea5a402ed67f8f22f11d5730147cd907d66a08 
>   src/master/allocator/mesos/hierarchical.cpp 
> 775182515dcb52bd873ecdf98c827320251a59c8 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Yongqiao Wang

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

(Updated Dec. 23, 2015, 9:05 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
775182515dcb52bd873ecdf98c827320251a59c8 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Yongqiao Wang

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

(Updated Dec. 23, 2015, 9:18 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
775182515dcb52bd873ecdf98c827320251a59c8 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Yongqiao Wang


> On Dec. 23, 2015, 8:22 a.m., Qian Zhang wrote:
> > src/master/allocator/mesos/hierarchical.cpp, line 1057
> > 
> >
> > Do we support updating weight for an inactive role? If yes, I think 
> > this `CHECK` will fail. So I think, here we should update weight in 
> > `roleSorter` only if `roleSorter` contains the `role`.

Before this check, it has been ensured that the specified role contains in 
activeRoles, so this check will always successful.


> On Dec. 23, 2015, 8:22 a.m., Qian Zhang wrote:
> > src/master/allocator/mesos/hierarchical.cpp, line 1060
> > 
> >
> > Should we use `quotas.contains(role)` instead?

Our target is to update quotaRoleSorter, so use quotaRoleSorter for checking is 
more clearer.


- Yongqiao


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


On Dec. 23, 2015, 9:05 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Dec. 23, 2015, 9:05 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
>   src/master/allocator/mesos/allocator.hpp 
> 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 
> 86ea5a402ed67f8f22f11d5730147cd907d66a08 
>   src/master/allocator/mesos/hierarchical.cpp 
> 775182515dcb52bd873ecdf98c827320251a59c8 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-23 Thread Qian Zhang

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



src/master/allocator/mesos/hierarchical.cpp (line 1051)


So if this is not an active role, then we will not update its weight in 
`quotaRoleSorter`, and its weight in `quotaRoleSorter` will always be 1.0 even 
it becomes active later? This seems not correct.



src/master/allocator/mesos/hierarchical.cpp (line 1057)


Do we support updating weight for an inactive role? If yes, I think this 
`CHECK` will fail. So I think, here we should update weight in `roleSorter` 
only if `roleSorter` contains the `role`.



src/master/allocator/mesos/hierarchical.cpp (line 1060)


Should we use `quotas.contains(role)` instead?


- Qian Zhang


On Dec. 23, 2015, 1:46 p.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Dec. 23, 2015, 1:46 p.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
>   src/master/allocator/mesos/allocator.hpp 
> 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 
> 86ea5a402ed67f8f22f11d5730147cd907d66a08 
>   src/master/allocator/mesos/hierarchical.cpp 
> 775182515dcb52bd873ecdf98c827320251a59c8 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-22 Thread Yongqiao Wang

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

(Updated Dec. 23, 2015, 5:46 a.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs (updated)
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
775182515dcb52bd873ecdf98c827320251a59c8 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing (updated)
---

Make & Make check successfully!

Test case: https://reviews.apache.org/r/41672/


Thanks,

Yongqiao Wang



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-21 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [41597]

Passed command: export OS=ubuntu:14.04;export CONFIGURATION="--verbose";export 
COMPILER=gcc; ./support/docker_build.sh

- Mesos ReviewBot


On Dec. 21, 2015, 6:47 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> ---
> 
> (Updated Dec. 21, 2015, 6:47 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
> https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
>   src/master/allocator/mesos/allocator.hpp 
> 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 
> 86ea5a402ed67f8f22f11d5730147cd907d66a08 
>   src/master/allocator/mesos/hierarchical.cpp 
> 775182515dcb52bd873ecdf98c827320251a59c8 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 050896e8b12cd4097ccd137d5284d6b39b0f06ab 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 3a442f121f3a1505513877a5c78458a4b8d0a824 
>   src/master/allocator/sorter/sorter.hpp 
> 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> ---
> 
> Make & Make check successfully!
> 
> (TODO): Add a test for dynamic weights + allocation behavior later.
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 41597: Extending allocator interface to support dynamic weights

2015-12-20 Thread Yongqiao Wang

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

(Updated Dec. 21, 2015, 6:39 a.m.)


Review request for mesos, Adam B and Qian Zhang.


Bugs: MESOS-3943
https://issues.apache.org/jira/browse/MESOS-3943


Repository: mesos


Description
---

Add the interface in allocator to support updating weight
at runtime, and the allocator is invoked to allocate the
resources based on the updated weights later.


Diffs
-

  include/mesos/master/allocator.hpp f7ada68d7111486d264284990996413bb3d6 
  src/master/allocator/mesos/allocator.hpp 
50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
  src/master/allocator/mesos/hierarchical.hpp 
86ea5a402ed67f8f22f11d5730147cd907d66a08 
  src/master/allocator/mesos/hierarchical.cpp 
775182515dcb52bd873ecdf98c827320251a59c8 
  src/master/allocator/sorter/drf/sorter.hpp 
050896e8b12cd4097ccd137d5284d6b39b0f06ab 
  src/master/allocator/sorter/drf/sorter.cpp 
3a442f121f3a1505513877a5c78458a4b8d0a824 
  src/master/allocator/sorter/sorter.hpp 
7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
  src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 

Diff: https://reviews.apache.org/r/41597/diff/


Testing
---

Make & Make check successfully!

(TODO): Add a test for dynamic weights + allocation behavior later.


Thanks,

Yongqiao Wang