Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-12-17 Thread Adam B


> On Dec. 10, 2015, 2:40 a.m., Adam B wrote:
> > include/mesos/master/allocator.proto, line 19
> > 
> >
> > Shouldn't this file have `java_package` and `java_outer_classname` just 
> > like the other protos?
> > Looks like isolator.proto and oversubscription.proto are missing it 
> > too. Would you mind creating a separate patch to fix that?
> 
> Yongqiao Wang wrote:
> I am not sure if we need to add java_package and java_outer_classname in 
> those proto files, can you please clarify a little more about why we need to 
> do this?
> 
> Adam B wrote:
> Nevermind. That's only necessary for the scheduler/executor API 
> protobufs, since they may need to be consumed by Java processes.
> https://developers.google.com/protocol-buffers/docs/javatutorial
> Dropping the issue.
> 
> Yongqiao Wang wrote:
> So can I log another JIRA ticket to fix this issue?

Not necessary. RoleInfo, isolator.proto, and oversubscription.proto are not a 
part of the scheduler/executor APIs, which are the only Mesos APIs that have 
Java bindings and would want/need to generate Java classes from the protos. So, 
since these protos are only used by C++, they don't need the java options. 
Doesn't hurt to add them, but they won't be used.


- Adam


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


On Dec. 7, 2015, 9:20 p.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40431/
> ---
> 
> (Updated Dec. 7, 2015, 9:20 p.m.)
> 
> 
> Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.
> 
> 
> Bugs: MESOS-3944
> https://issues.apache.org/jira/browse/MESOS-3944
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Currently role protobuf is defined in allocator.proto due to only the 
> traditional DRF allocator uses roles as it’s first level of hierarchy, I 
> think we should move it out and define it in a separated file as quota had in 
> dynamic roles project, because role protobuf will also be used by master to 
> persist.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
>   include/mesos/master/allocator.proto 
> 702f56f56c3b1331613cecf26522986f6b572f8c 
>   include/mesos/role/role.hpp PRE-CREATION 
>   include/mesos/role/role.proto PRE-CREATION 
>   src/CMakeLists.txt c0d77c745eb5b12dd6d9d7afaba7e820f8d848ef 
>   src/Makefile.am e96e0ec41e11acff00fbfb3e86427b48a0625bd2 
>   src/master/allocator/mesos/allocator.hpp 
> 97ee80726ad155917811265a983258b0165d3451 
>   src/master/allocator/mesos/hierarchical.hpp 
> 99c742906874c30c39c159e58a65277ade3c07fd 
>   src/master/allocator/mesos/hierarchical.cpp 
> 5da825a1d578a9ee40b4985378fddb3c5fb3b416 
>   src/master/master.hpp 4683fa542a740f9a0b80fff7fbe0e63ec66266f2 
>   src/master/master.cpp 953fa4f14929581b226a7e27d30aea7a5aa1fd7c 
>   src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
>   src/tests/hierarchical_allocator_tests.cpp 
> fb214a829a57529d3f5c49730ae9733f53e622ca 
> 
> Diff: https://reviews.apache.org/r/40431/diff/
> 
> 
> Testing
> ---
> 
> 1. Make Check successfully;
> 
> 2. $ curl http://9.110.48.168:5050/roles
> {"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-12-16 Thread Adam B


> On Nov. 24, 2015, 6:48 p.m., Klaus Ma wrote:
> > include/mesos/role/role.proto, line 38
> > 
> >
> > I'm thinke whether we need to enhance weight to `int`. Any case that we 
> > has to use `double` as weight? If we want to control the scope, TODO is OK.
> 
> Yongqiao Wang wrote:
> In mesos, weight can be any value greater than -1, I think it's make 
> sence. It does not need to change it's type to int if there is no specified 
> requirement.

Current share is divided by weight, then compared against other roles' share, 
so we're already going to be comparing floating point numbers. We don't 
directly compare weights or generate units based on these values, so I don't 
think floating point imprecision is a concern.
Besides, since the default weight is 1.0, adding a new low-priority role with 
lower-than-average weight is impossible without using floating point or 
simultaneously increasing all other weights proportionately. It's valuable to 
be able to set a 0.5 weight.


- Adam


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


On Dec. 7, 2015, 9:20 p.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40431/
> ---
> 
> (Updated Dec. 7, 2015, 9:20 p.m.)
> 
> 
> Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.
> 
> 
> Bugs: MESOS-3944
> https://issues.apache.org/jira/browse/MESOS-3944
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Currently role protobuf is defined in allocator.proto due to only the 
> traditional DRF allocator uses roles as it’s first level of hierarchy, I 
> think we should move it out and define it in a separated file as quota had in 
> dynamic roles project, because role protobuf will also be used by master to 
> persist.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
>   include/mesos/master/allocator.proto 
> 702f56f56c3b1331613cecf26522986f6b572f8c 
>   include/mesos/role/role.hpp PRE-CREATION 
>   include/mesos/role/role.proto PRE-CREATION 
>   src/CMakeLists.txt c0d77c745eb5b12dd6d9d7afaba7e820f8d848ef 
>   src/Makefile.am e96e0ec41e11acff00fbfb3e86427b48a0625bd2 
>   src/master/allocator/mesos/allocator.hpp 
> 97ee80726ad155917811265a983258b0165d3451 
>   src/master/allocator/mesos/hierarchical.hpp 
> 99c742906874c30c39c159e58a65277ade3c07fd 
>   src/master/allocator/mesos/hierarchical.cpp 
> 5da825a1d578a9ee40b4985378fddb3c5fb3b416 
>   src/master/master.hpp 4683fa542a740f9a0b80fff7fbe0e63ec66266f2 
>   src/master/master.cpp 953fa4f14929581b226a7e27d30aea7a5aa1fd7c 
>   src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
>   src/tests/hierarchical_allocator_tests.cpp 
> fb214a829a57529d3f5c49730ae9733f53e622ca 
> 
> Diff: https://reviews.apache.org/r/40431/diff/
> 
> 
> Testing
> ---
> 
> 1. Make Check successfully;
> 
> 2. $ curl http://9.110.48.168:5050/roles
> {"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-12-16 Thread Adam B


> On Dec. 10, 2015, 2:40 a.m., Adam B wrote:
> > include/mesos/master/allocator.proto, line 19
> > 
> >
> > Shouldn't this file have `java_package` and `java_outer_classname` just 
> > like the other protos?
> > Looks like isolator.proto and oversubscription.proto are missing it 
> > too. Would you mind creating a separate patch to fix that?
> 
> Yongqiao Wang wrote:
> I am not sure if we need to add java_package and java_outer_classname in 
> those proto files, can you please clarify a little more about why we need to 
> do this?

Nevermind. That's only necessary for the scheduler/executor API protobufs, 
since they may need to be consumed by Java processes.
https://developers.google.com/protocol-buffers/docs/javatutorial
Dropping the issue.


> On Dec. 10, 2015, 2:40 a.m., Adam B wrote:
> > include/mesos/role/role.proto, line 21
> > 
> >
> > Why change the package? Couldn't this still be in `mesos.master`? Then 
> > you wouldn't have to change all the other files.
> 
> Yongqiao Wang wrote:
> Like other feature(such as quota), I also think role manamgnet is a 
> seprated function, so I define role protobuf in a separated package rather 
> than define it in mesos.proto.

Ok, I just thought you could reduce code churn by keeping the package name the 
same, even if you create a new proto file.
This 'role' proto package is still only useful on the master, right? 
mesos.scheduler.role and mesos.agent.role would have different messages/fields.
But this is moot after the implicit roles changes in 
https://reviews.apache.org/r/41075/ which removes the original RoleInfo.


- Adam


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


On Dec. 7, 2015, 9:20 p.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40431/
> ---
> 
> (Updated Dec. 7, 2015, 9:20 p.m.)
> 
> 
> Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.
> 
> 
> Bugs: MESOS-3944
> https://issues.apache.org/jira/browse/MESOS-3944
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Currently role protobuf is defined in allocator.proto due to only the 
> traditional DRF allocator uses roles as it’s first level of hierarchy, I 
> think we should move it out and define it in a separated file as quota had in 
> dynamic roles project, because role protobuf will also be used by master to 
> persist.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
>   include/mesos/master/allocator.proto 
> 702f56f56c3b1331613cecf26522986f6b572f8c 
>   include/mesos/role/role.hpp PRE-CREATION 
>   include/mesos/role/role.proto PRE-CREATION 
>   src/CMakeLists.txt c0d77c745eb5b12dd6d9d7afaba7e820f8d848ef 
>   src/Makefile.am e96e0ec41e11acff00fbfb3e86427b48a0625bd2 
>   src/master/allocator/mesos/allocator.hpp 
> 97ee80726ad155917811265a983258b0165d3451 
>   src/master/allocator/mesos/hierarchical.hpp 
> 99c742906874c30c39c159e58a65277ade3c07fd 
>   src/master/allocator/mesos/hierarchical.cpp 
> 5da825a1d578a9ee40b4985378fddb3c5fb3b416 
>   src/master/master.hpp 4683fa542a740f9a0b80fff7fbe0e63ec66266f2 
>   src/master/master.cpp 953fa4f14929581b226a7e27d30aea7a5aa1fd7c 
>   src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
>   src/tests/hierarchical_allocator_tests.cpp 
> fb214a829a57529d3f5c49730ae9733f53e622ca 
> 
> Diff: https://reviews.apache.org/r/40431/diff/
> 
> 
> Testing
> ---
> 
> 1. Make Check successfully;
> 
> 2. $ curl http://9.110.48.168:5050/roles
> {"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-12-16 Thread Yongqiao Wang


> On Dec. 10, 2015, 10:40 a.m., Adam B wrote:
> > include/mesos/master/allocator.proto, line 19
> > 
> >
> > Shouldn't this file have `java_package` and `java_outer_classname` just 
> > like the other protos?
> > Looks like isolator.proto and oversubscription.proto are missing it 
> > too. Would you mind creating a separate patch to fix that?
> 
> Yongqiao Wang wrote:
> I am not sure if we need to add java_package and java_outer_classname in 
> those proto files, can you please clarify a little more about why we need to 
> do this?
> 
> Adam B wrote:
> Nevermind. That's only necessary for the scheduler/executor API 
> protobufs, since they may need to be consumed by Java processes.
> https://developers.google.com/protocol-buffers/docs/javatutorial
> Dropping the issue.

So can I log another JIRA ticket to fix this issue?


> On Dec. 10, 2015, 10:40 a.m., Adam B wrote:
> > include/mesos/role/role.proto, line 21
> > 
> >
> > Why change the package? Couldn't this still be in `mesos.master`? Then 
> > you wouldn't have to change all the other files.
> 
> Yongqiao Wang wrote:
> Like other feature(such as quota), I also think role manamgnet is a 
> seprated function, so I define role protobuf in a separated package rather 
> than define it in mesos.proto.
> 
> Adam B wrote:
> Ok, I just thought you could reduce code churn by keeping the package 
> name the same, even if you create a new proto file.
> This 'role' proto package is still only useful on the master, right? 
> mesos.scheduler.role and mesos.agent.role would have different 
> messages/fields.
> But this is moot after the implicit roles changes in 
> https://reviews.apache.org/r/41075/ which removes the original RoleInfo.

OK, we can defer this patch until implicit roles chagnes finalize.


- Yongqiao


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


On Dec. 8, 2015, 5:20 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40431/
> ---
> 
> (Updated Dec. 8, 2015, 5:20 a.m.)
> 
> 
> Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.
> 
> 
> Bugs: MESOS-3944
> https://issues.apache.org/jira/browse/MESOS-3944
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Currently role protobuf is defined in allocator.proto due to only the 
> traditional DRF allocator uses roles as it’s first level of hierarchy, I 
> think we should move it out and define it in a separated file as quota had in 
> dynamic roles project, because role protobuf will also be used by master to 
> persist.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
>   include/mesos/master/allocator.proto 
> 702f56f56c3b1331613cecf26522986f6b572f8c 
>   include/mesos/role/role.hpp PRE-CREATION 
>   include/mesos/role/role.proto PRE-CREATION 
>   src/CMakeLists.txt c0d77c745eb5b12dd6d9d7afaba7e820f8d848ef 
>   src/Makefile.am e96e0ec41e11acff00fbfb3e86427b48a0625bd2 
>   src/master/allocator/mesos/allocator.hpp 
> 97ee80726ad155917811265a983258b0165d3451 
>   src/master/allocator/mesos/hierarchical.hpp 
> 99c742906874c30c39c159e58a65277ade3c07fd 
>   src/master/allocator/mesos/hierarchical.cpp 
> 5da825a1d578a9ee40b4985378fddb3c5fb3b416 
>   src/master/master.hpp 4683fa542a740f9a0b80fff7fbe0e63ec66266f2 
>   src/master/master.cpp 953fa4f14929581b226a7e27d30aea7a5aa1fd7c 
>   src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
>   src/tests/hierarchical_allocator_tests.cpp 
> fb214a829a57529d3f5c49730ae9733f53e622ca 
> 
> Diff: https://reviews.apache.org/r/40431/diff/
> 
> 
> Testing
> ---
> 
> 1. Make Check successfully;
> 
> 2. $ curl http://9.110.48.168:5050/roles
> {"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-12-10 Thread Adam B

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


I'm not sure exactly why you needed to move RoleInfo out of allocator.proto. 
The RoleInfo we use for the allocator module API doesn't need to be (and 
perhaps shouldn't be) the same class that we use to display role information 
like weights in the HTTP endpoint, or even the same class that we persist in 
the registry. There may be some future role metadata we want to set in the HTTP 
endpoint that doesn't need to be passed on to the allocator (e.g. 
Role.description), and maybe even something we set that doesn't need to be 
persisted. I don't actually think we need 3 or 4 separate RoleInfo-like 
protobufs, but I want us to think about how each of these APIs could grow apart 
in their notion of "important role metadata". Is there a real need to move the 
RoleInfo protobuf?


include/mesos/master/allocator.proto (line 19)


Shouldn't this file have `java_package` and `java_outer_classname` just 
like the other protos?
Looks like isolator.proto and oversubscription.proto are missing it too. 
Would you mind creating a separate patch to fix that?



include/mesos/role/role.proto (line 21)


Why change the package? Couldn't this still be in `mesos.master`? Then you 
wouldn't have to change all the other files.


- Adam B


On Dec. 7, 2015, 9:20 p.m., Yong Qiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40431/
> ---
> 
> (Updated Dec. 7, 2015, 9:20 p.m.)
> 
> 
> Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.
> 
> 
> Bugs: MESOS-3944
> https://issues.apache.org/jira/browse/MESOS-3944
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Currently role protobuf is defined in allocator.proto due to only the 
> traditional DRF allocator uses roles as it’s first level of hierarchy, I 
> think we should move it out and define it in a separated file as quota had in 
> dynamic roles project, because role protobuf will also be used by master to 
> persist.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
>   include/mesos/master/allocator.proto 
> 702f56f56c3b1331613cecf26522986f6b572f8c 
>   include/mesos/role/role.hpp PRE-CREATION 
>   include/mesos/role/role.proto PRE-CREATION 
>   src/CMakeLists.txt c0d77c745eb5b12dd6d9d7afaba7e820f8d848ef 
>   src/Makefile.am e96e0ec41e11acff00fbfb3e86427b48a0625bd2 
>   src/master/allocator/mesos/allocator.hpp 
> 97ee80726ad155917811265a983258b0165d3451 
>   src/master/allocator/mesos/hierarchical.hpp 
> 99c742906874c30c39c159e58a65277ade3c07fd 
>   src/master/allocator/mesos/hierarchical.cpp 
> 5da825a1d578a9ee40b4985378fddb3c5fb3b416 
>   src/master/master.hpp 4683fa542a740f9a0b80fff7fbe0e63ec66266f2 
>   src/master/master.cpp 953fa4f14929581b226a7e27d30aea7a5aa1fd7c 
>   src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
>   src/tests/hierarchical_allocator_tests.cpp 
> fb214a829a57529d3f5c49730ae9733f53e622ca 
> 
> Diff: https://reviews.apache.org/r/40431/diff/
> 
> 
> Testing
> ---
> 
> 1. Make Check successfully;
> 
> 2. $ curl http://9.110.48.168:5050/roles
> {"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}
> 
> 
> Thanks,
> 
> Yong Qiao Wang
> 
>



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-12-10 Thread Yongqiao Wang


> On Dec. 10, 2015, 10:40 a.m., Adam B wrote:
> > include/mesos/master/allocator.proto, line 19
> > 
> >
> > Shouldn't this file have `java_package` and `java_outer_classname` just 
> > like the other protos?
> > Looks like isolator.proto and oversubscription.proto are missing it 
> > too. Would you mind creating a separate patch to fix that?

I am not sure if we need to add java_package and java_outer_classname in those 
proto files, can you please clarify a little more about why we need to do this?


> On Dec. 10, 2015, 10:40 a.m., Adam B wrote:
> > include/mesos/role/role.proto, line 21
> > 
> >
> > Why change the package? Couldn't this still be in `mesos.master`? Then 
> > you wouldn't have to change all the other files.

Like other feature(such as quota), I also think role manamgnet is a seprated 
function, so I define role protobuf in a separated package rather than define 
it in mesos.proto.


- Yongqiao


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


On Dec. 8, 2015, 5:20 a.m., Yongqiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40431/
> ---
> 
> (Updated Dec. 8, 2015, 5:20 a.m.)
> 
> 
> Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.
> 
> 
> Bugs: MESOS-3944
> https://issues.apache.org/jira/browse/MESOS-3944
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Currently role protobuf is defined in allocator.proto due to only the 
> traditional DRF allocator uses roles as it’s first level of hierarchy, I 
> think we should move it out and define it in a separated file as quota had in 
> dynamic roles project, because role protobuf will also be used by master to 
> persist.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
>   include/mesos/master/allocator.proto 
> 702f56f56c3b1331613cecf26522986f6b572f8c 
>   include/mesos/role/role.hpp PRE-CREATION 
>   include/mesos/role/role.proto PRE-CREATION 
>   src/CMakeLists.txt c0d77c745eb5b12dd6d9d7afaba7e820f8d848ef 
>   src/Makefile.am e96e0ec41e11acff00fbfb3e86427b48a0625bd2 
>   src/master/allocator/mesos/allocator.hpp 
> 97ee80726ad155917811265a983258b0165d3451 
>   src/master/allocator/mesos/hierarchical.hpp 
> 99c742906874c30c39c159e58a65277ade3c07fd 
>   src/master/allocator/mesos/hierarchical.cpp 
> 5da825a1d578a9ee40b4985378fddb3c5fb3b416 
>   src/master/master.hpp 4683fa542a740f9a0b80fff7fbe0e63ec66266f2 
>   src/master/master.cpp 953fa4f14929581b226a7e27d30aea7a5aa1fd7c 
>   src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
>   src/tests/hierarchical_allocator_tests.cpp 
> fb214a829a57529d3f5c49730ae9733f53e622ca 
> 
> Diff: https://reviews.apache.org/r/40431/diff/
> 
> 
> Testing
> ---
> 
> 1. Make Check successfully;
> 
> 2. $ curl http://9.110.48.168:5050/roles
> {"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-12-10 Thread Yong Qiao Wang


> On Dec. 10, 2015, 10:40 a.m., Adam B wrote:
> > I'm not sure exactly why you needed to move RoleInfo out of 
> > allocator.proto. The RoleInfo we use for the allocator module API doesn't 
> > need to be (and perhaps shouldn't be) the same class that we use to display 
> > role information like weights in the HTTP endpoint, or even the same class 
> > that we persist in the registry. There may be some future role metadata we 
> > want to set in the HTTP endpoint that doesn't need to be passed on to the 
> > allocator (e.g. Role.description), and maybe even something we set that 
> > doesn't need to be persisted. I don't actually think we need 3 or 4 
> > separate RoleInfo-like protobufs, but I want us to think about how each of 
> > these APIs could grow apart in their notion of "important role metadata". 
> > Is there a real need to move the RoleInfo protobuf?

Currently, RoleInfo protobuf never be used for serialization, so I think we can 
remove it from allocator.proto, and define a struct in mesos.hpp to communicate 
between the allocator and master. Then for role information display, then 
current serialization way(call modle(role*) in http.cpp) is not better, and we 
should get RoleInfo protobuf back for serialization. Refer to other 
components(such as quota), I propose to define role protobuf in a separated 
package rather than define it in mesos.proto. And for persist, we should define 
proto message in registry.proto which only contians the metadata should be 
persisted.


- Yong Qiao


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


On Dec. 8, 2015, 5:20 a.m., Yong Qiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40431/
> ---
> 
> (Updated Dec. 8, 2015, 5:20 a.m.)
> 
> 
> Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.
> 
> 
> Bugs: MESOS-3944
> https://issues.apache.org/jira/browse/MESOS-3944
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Currently role protobuf is defined in allocator.proto due to only the 
> traditional DRF allocator uses roles as it’s first level of hierarchy, I 
> think we should move it out and define it in a separated file as quota had in 
> dynamic roles project, because role protobuf will also be used by master to 
> persist.
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
>   include/mesos/master/allocator.proto 
> 702f56f56c3b1331613cecf26522986f6b572f8c 
>   include/mesos/role/role.hpp PRE-CREATION 
>   include/mesos/role/role.proto PRE-CREATION 
>   src/CMakeLists.txt c0d77c745eb5b12dd6d9d7afaba7e820f8d848ef 
>   src/Makefile.am e96e0ec41e11acff00fbfb3e86427b48a0625bd2 
>   src/master/allocator/mesos/allocator.hpp 
> 97ee80726ad155917811265a983258b0165d3451 
>   src/master/allocator/mesos/hierarchical.hpp 
> 99c742906874c30c39c159e58a65277ade3c07fd 
>   src/master/allocator/mesos/hierarchical.cpp 
> 5da825a1d578a9ee40b4985378fddb3c5fb3b416 
>   src/master/master.hpp 4683fa542a740f9a0b80fff7fbe0e63ec66266f2 
>   src/master/master.cpp 953fa4f14929581b226a7e27d30aea7a5aa1fd7c 
>   src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
>   src/tests/hierarchical_allocator_tests.cpp 
> fb214a829a57529d3f5c49730ae9733f53e622ca 
> 
> Diff: https://reviews.apache.org/r/40431/diff/
> 
> 
> Testing
> ---
> 
> 1. Make Check successfully;
> 
> 2. $ curl http://9.110.48.168:5050/roles
> {"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}
> 
> 
> Thanks,
> 
> Yong Qiao Wang
> 
>



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-12-07 Thread Yong Qiao Wang

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

(Updated Dec. 7, 2015, 8:41 a.m.)


Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.


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


Repository: mesos


Description
---

Currently role protobuf is defined in allocator.proto due to only the 
traditional DRF allocator uses roles as it’s first level of hierarchy, I think 
we should move it out and define it in a separated file as quota had in dynamic 
roles project, because role protobuf will also be used by master to persist.


Diffs (updated)
-

  include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
  include/mesos/master/allocator.proto 702f56f56c3b1331613cecf26522986f6b572f8c 
  include/mesos/role/role.hpp PRE-CREATION 
  include/mesos/role/role.proto PRE-CREATION 
  src/CMakeLists.txt c0d77c745eb5b12dd6d9d7afaba7e820f8d848ef 
  src/Makefile.am e96e0ec41e11acff00fbfb3e86427b48a0625bd2 
  src/master/allocator/mesos/allocator.hpp 
97ee80726ad155917811265a983258b0165d3451 
  src/master/allocator/mesos/hierarchical.hpp 
99c742906874c30c39c159e58a65277ade3c07fd 
  src/master/allocator/mesos/hierarchical.cpp 
5da825a1d578a9ee40b4985378fddb3c5fb3b416 
  src/master/master.hpp 4683fa542a740f9a0b80fff7fbe0e63ec66266f2 
  src/master/master.cpp 953fa4f14929581b226a7e27d30aea7a5aa1fd7c 
  src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
  src/tests/hierarchical_allocator_tests.cpp 
fb214a829a57529d3f5c49730ae9733f53e622ca 

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


Testing
---

1. Make Check successfully;

2. $ curl http://9.110.48.168:5050/roles
{"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}


Thanks,

Yong Qiao Wang



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-12-07 Thread Yong Qiao Wang

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

(Updated Dec. 7, 2015, 10:12 a.m.)


Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.


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


Repository: mesos


Description
---

Currently role protobuf is defined in allocator.proto due to only the 
traditional DRF allocator uses roles as it’s first level of hierarchy, I think 
we should move it out and define it in a separated file as quota had in dynamic 
roles project, because role protobuf will also be used by master to persist.


Diffs (updated)
-

  include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
  include/mesos/master/allocator.proto 702f56f56c3b1331613cecf26522986f6b572f8c 
  include/mesos/role/role.hpp PRE-CREATION 
  include/mesos/role/role.proto PRE-CREATION 
  src/CMakeLists.txt c0d77c745eb5b12dd6d9d7afaba7e820f8d848ef 
  src/Makefile.am e96e0ec41e11acff00fbfb3e86427b48a0625bd2 
  src/master/allocator/mesos/allocator.hpp 
97ee80726ad155917811265a983258b0165d3451 
  src/master/allocator/mesos/hierarchical.hpp 
99c742906874c30c39c159e58a65277ade3c07fd 
  src/master/allocator/mesos/hierarchical.cpp 
5da825a1d578a9ee40b4985378fddb3c5fb3b416 
  src/master/master.hpp 4683fa542a740f9a0b80fff7fbe0e63ec66266f2 
  src/master/master.cpp 953fa4f14929581b226a7e27d30aea7a5aa1fd7c 
  src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
  src/tests/hierarchical_allocator_tests.cpp 
fb214a829a57529d3f5c49730ae9733f53e622ca 

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


Testing
---

1. Make Check successfully;

2. $ curl http://9.110.48.168:5050/roles
{"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}


Thanks,

Yong Qiao Wang



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-12-07 Thread Yong Qiao Wang

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

(Updated Dec. 8, 2015, 5:15 a.m.)


Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.


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


Repository: mesos


Description
---

Currently role protobuf is defined in allocator.proto due to only the 
traditional DRF allocator uses roles as it’s first level of hierarchy, I think 
we should move it out and define it in a separated file as quota had in dynamic 
roles project, because role protobuf will also be used by master to persist.


Diffs (updated)
-

  include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
  include/mesos/master/allocator.proto 702f56f56c3b1331613cecf26522986f6b572f8c 
  include/mesos/role/role.hpp PRE-CREATION 
  include/mesos/role/role.proto PRE-CREATION 
  src/CMakeLists.txt c0d77c745eb5b12dd6d9d7afaba7e820f8d848ef 
  src/Makefile.am e96e0ec41e11acff00fbfb3e86427b48a0625bd2 
  src/master/allocator/mesos/allocator.hpp 
97ee80726ad155917811265a983258b0165d3451 
  src/master/allocator/mesos/hierarchical.hpp 
99c742906874c30c39c159e58a65277ade3c07fd 
  src/master/allocator/mesos/hierarchical.cpp 
5da825a1d578a9ee40b4985378fddb3c5fb3b416 
  src/master/master.hpp 4683fa542a740f9a0b80fff7fbe0e63ec66266f2 
  src/master/master.cpp 953fa4f14929581b226a7e27d30aea7a5aa1fd7c 
  src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
  src/tests/hierarchical_allocator_tests.cpp 
fb214a829a57529d3f5c49730ae9733f53e622ca 

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


Testing
---

1. Make Check successfully;

2. $ curl http://9.110.48.168:5050/roles
{"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}


Thanks,

Yong Qiao Wang



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-12-07 Thread Yong Qiao Wang

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

(Updated Dec. 8, 2015, 5:20 a.m.)


Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.


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


Repository: mesos


Description
---

Currently role protobuf is defined in allocator.proto due to only the 
traditional DRF allocator uses roles as it’s first level of hierarchy, I think 
we should move it out and define it in a separated file as quota had in dynamic 
roles project, because role protobuf will also be used by master to persist.


Diffs (updated)
-

  include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
  include/mesos/master/allocator.proto 702f56f56c3b1331613cecf26522986f6b572f8c 
  include/mesos/role/role.hpp PRE-CREATION 
  include/mesos/role/role.proto PRE-CREATION 
  src/CMakeLists.txt c0d77c745eb5b12dd6d9d7afaba7e820f8d848ef 
  src/Makefile.am e96e0ec41e11acff00fbfb3e86427b48a0625bd2 
  src/master/allocator/mesos/allocator.hpp 
97ee80726ad155917811265a983258b0165d3451 
  src/master/allocator/mesos/hierarchical.hpp 
99c742906874c30c39c159e58a65277ade3c07fd 
  src/master/allocator/mesos/hierarchical.cpp 
5da825a1d578a9ee40b4985378fddb3c5fb3b416 
  src/master/master.hpp 4683fa542a740f9a0b80fff7fbe0e63ec66266f2 
  src/master/master.cpp 953fa4f14929581b226a7e27d30aea7a5aa1fd7c 
  src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
  src/tests/hierarchical_allocator_tests.cpp 
fb214a829a57529d3f5c49730ae9733f53e622ca 

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


Testing
---

1. Make Check successfully;

2. $ curl http://9.110.48.168:5050/roles
{"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}


Thanks,

Yong Qiao Wang



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-11-29 Thread Yong Qiao Wang

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

(Updated Nov. 30, 2015, 3:09 a.m.)


Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.


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


Repository: mesos


Description
---

Move RoleInfo message out of allocator.proto


Diffs (updated)
-

  include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
  include/mesos/master/allocator.proto 702f56f56c3b1331613cecf26522986f6b572f8c 
  include/mesos/role/role.hpp PRE-CREATION 
  include/mesos/role/role.proto PRE-CREATION 
  src/CMakeLists.txt cfe9d26c45ba42852fd1af958549954e7b04d448 
  src/Makefile.am fd38cfa73d81a98c819378f99a766e2ddb7e1a04 
  src/master/allocator/mesos/allocator.hpp 
97ee80726ad155917811265a983258b0165d3451 
  src/master/allocator/mesos/hierarchical.hpp 
1cd8d16661568010901e74705375e7719cdfb8a0 
  src/master/allocator/mesos/hierarchical.cpp 
31ed62efb5b1a2edb567f43d37559c5914e0665e 
  src/master/master.hpp 96951e766de32842197506504e5ac67a2caa3efe 
  src/master/master.cpp b918ae4a0e7dc3cd41165fc4b683ae7b6f031821 
  src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
  src/tests/hierarchical_allocator_tests.cpp 
a45b3dd0a8237fdd080536cb9ab600e71ad939d3 

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


Testing
---

1. Make Check successfully;

2. $ curl http://9.110.48.168:5050/roles
{"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}


Thanks,

Yong Qiao Wang



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-11-29 Thread Yong Qiao Wang

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

(Updated Nov. 30, 2015, 3:11 a.m.)


Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.


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


Repository: mesos


Description (updated)
---

Currently role protobuf is defined in allocator.proto due to only the 
traditional DRF allocator uses roles as it’s first level of hierarchy, I think 
we should move it out and define it in a separated file as quota had in dynamic 
roles project, because role protobuf will also be used by master to persist.


Diffs
-

  include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
  include/mesos/master/allocator.proto 702f56f56c3b1331613cecf26522986f6b572f8c 
  include/mesos/role/role.hpp PRE-CREATION 
  include/mesos/role/role.proto PRE-CREATION 
  src/CMakeLists.txt cfe9d26c45ba42852fd1af958549954e7b04d448 
  src/Makefile.am fd38cfa73d81a98c819378f99a766e2ddb7e1a04 
  src/master/allocator/mesos/allocator.hpp 
97ee80726ad155917811265a983258b0165d3451 
  src/master/allocator/mesos/hierarchical.hpp 
1cd8d16661568010901e74705375e7719cdfb8a0 
  src/master/allocator/mesos/hierarchical.cpp 
31ed62efb5b1a2edb567f43d37559c5914e0665e 
  src/master/master.hpp 96951e766de32842197506504e5ac67a2caa3efe 
  src/master/master.cpp b918ae4a0e7dc3cd41165fc4b683ae7b6f031821 
  src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
  src/tests/hierarchical_allocator_tests.cpp 
a45b3dd0a8237fdd080536cb9ab600e71ad939d3 

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


Testing
---

1. Make Check successfully;

2. $ curl http://9.110.48.168:5050/roles
{"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}


Thanks,

Yong Qiao Wang



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-11-29 Thread Yong Qiao Wang

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

(Updated Nov. 30, 2015, 7:06 a.m.)


Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.


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


Repository: mesos


Description
---

Currently role protobuf is defined in allocator.proto due to only the 
traditional DRF allocator uses roles as it’s first level of hierarchy, I think 
we should move it out and define it in a separated file as quota had in dynamic 
roles project, because role protobuf will also be used by master to persist.


Diffs (updated)
-

  include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
  include/mesos/master/allocator.proto 702f56f56c3b1331613cecf26522986f6b572f8c 
  include/mesos/role/role.hpp PRE-CREATION 
  include/mesos/role/role.proto PRE-CREATION 
  src/CMakeLists.txt cfe9d26c45ba42852fd1af958549954e7b04d448 
  src/Makefile.am fd38cfa73d81a98c819378f99a766e2ddb7e1a04 
  src/master/allocator/mesos/allocator.hpp 
97ee80726ad155917811265a983258b0165d3451 
  src/master/allocator/mesos/hierarchical.hpp 
1cd8d16661568010901e74705375e7719cdfb8a0 
  src/master/allocator/mesos/hierarchical.cpp 
31ed62efb5b1a2edb567f43d37559c5914e0665e 
  src/master/master.hpp 96951e766de32842197506504e5ac67a2caa3efe 
  src/master/master.cpp b918ae4a0e7dc3cd41165fc4b683ae7b6f031821 
  src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
  src/tests/hierarchical_allocator_tests.cpp 
a45b3dd0a8237fdd080536cb9ab600e71ad939d3 

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


Testing
---

1. Make Check successfully;

2. $ curl http://9.110.48.168:5050/roles
{"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}


Thanks,

Yong Qiao Wang



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-11-26 Thread Yong Qiao Wang

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

(Updated Nov. 26, 2015, 2:01 p.m.)


Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.


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


Repository: mesos


Description
---

Move RoleInfo message out of allocator.proto


Diffs (updated)
-

  include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
  include/mesos/master/allocator.proto 702f56f56c3b1331613cecf26522986f6b572f8c 
  include/mesos/role/role.hpp PRE-CREATION 
  include/mesos/role/role.proto PRE-CREATION 
  src/CMakeLists.txt cfe9d26c45ba42852fd1af958549954e7b04d448 
  src/Makefile.am de68e24fb2ad4c6e4175fbf8658b23bc6434a356 
  src/master/allocator/mesos/allocator.hpp 
97ee80726ad155917811265a983258b0165d3451 
  src/master/allocator/mesos/hierarchical.hpp 
1cd8d16661568010901e74705375e7719cdfb8a0 
  src/master/allocator/mesos/hierarchical.cpp 
31ed62efb5b1a2edb567f43d37559c5914e0665e 
  src/master/master.hpp 0bb315a16801de9e7014ca0a83c5152faa75eb38 
  src/master/master.cpp 92380952277ae3fe0b535718b6b1b8732e960745 
  src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
  src/tests/hierarchical_allocator_tests.cpp 
a45b3dd0a8237fdd080536cb9ab600e71ad939d3 

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


Testing
---

1. Make Check successfully;

2. $ curl http://9.110.48.168:5050/roles
{"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}


Thanks,

Yong Qiao Wang



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-11-25 Thread Yong Qiao Wang

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

(Updated Nov. 25, 2015, 8:38 a.m.)


Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.


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


Repository: mesos


Description
---

Move RoleInfo message out of allocator.proto


Diffs (updated)
-

  include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
  include/mesos/master/allocator.proto 702f56f56c3b1331613cecf26522986f6b572f8c 
  include/mesos/role/role.hpp PRE-CREATION 
  include/mesos/role/role.proto PRE-CREATION 
  src/CMakeLists.txt cfe9d26c45ba42852fd1af958549954e7b04d448 
  src/Makefile.am a57e46d06c8c26a32a9444be4f0e1269d775f8b0 
  src/master/allocator/mesos/allocator.hpp 
97ee80726ad155917811265a983258b0165d3451 
  src/master/allocator/mesos/hierarchical.hpp 
2a21364fdcaa4ec5e5567b9f367c14a1579b9a49 
  src/master/allocator/mesos/hierarchical.cpp 
aee8ced1fbfec8cf30cb939ff67fadfc6b08f37a 
  src/master/master.hpp e5e0ed01a56d869cc535687c8dbb6b99f6295b66 
  src/master/master.cpp 370980edfc80d1e52134fdaf3ce49177b6528b02 
  src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
  src/tests/hierarchical_allocator_tests.cpp 
a45b3dd0a8237fdd080536cb9ab600e71ad939d3 

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


Testing
---

1. Make Check successfully;

2. $ curl http://9.110.48.168:5050/roles
{"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}


Thanks,

Yong Qiao Wang



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-11-25 Thread Yong Qiao Wang

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

(Updated Nov. 25, 2015, 8:20 a.m.)


Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.


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


Repository: mesos


Description
---

Move RoleInfo message out of allocator.proto


Diffs (updated)
-

  include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
  include/mesos/master/allocator.proto 702f56f56c3b1331613cecf26522986f6b572f8c 
  include/mesos/role/role.hpp PRE-CREATION 
  include/mesos/role/role.proto PRE-CREATION 
  src/CMakeLists.txt cfe9d26c45ba42852fd1af958549954e7b04d448 
  src/Makefile.am a57e46d06c8c26a32a9444be4f0e1269d775f8b0 
  src/master/allocator/mesos/allocator.hpp 
97ee80726ad155917811265a983258b0165d3451 
  src/master/allocator/mesos/hierarchical.hpp 
2a21364fdcaa4ec5e5567b9f367c14a1579b9a49 
  src/master/allocator/mesos/hierarchical.cpp 
aee8ced1fbfec8cf30cb939ff67fadfc6b08f37a 
  src/master/master.hpp e5e0ed01a56d869cc535687c8dbb6b99f6295b66 
  src/master/master.cpp 370980edfc80d1e52134fdaf3ce49177b6528b02 
  src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
  src/tests/hierarchical_allocator_tests.cpp 
a45b3dd0a8237fdd080536cb9ab600e71ad939d3 

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


Testing
---

1. Make Check successfully;

2. $ curl http://9.110.48.168:5050/roles
{"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}


Thanks,

Yong Qiao Wang



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-11-25 Thread Yong Qiao Wang


> On Nov. 25, 2015, 2:48 a.m., Klaus Ma wrote:
> > include/mesos/role/role.proto, line 38
> > 
> >
> > I'm thinke whether we need to enhance weight to `int`. Any case that we 
> > has to use `double` as weight? If we want to control the scope, TODO is OK.

In mesos, weight can be any value greater than -1, I think it's make sence. It 
does not need to change it's type to int if there is no specified requirement.


- Yong Qiao


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


On Nov. 25, 2015, 8:38 a.m., Yong Qiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40431/
> ---
> 
> (Updated Nov. 25, 2015, 8:38 a.m.)
> 
> 
> Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.
> 
> 
> Bugs: MESOS-3944
> https://issues.apache.org/jira/browse/MESOS-3944
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Move RoleInfo message out of allocator.proto
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
>   include/mesos/master/allocator.proto 
> 702f56f56c3b1331613cecf26522986f6b572f8c 
>   include/mesos/role/role.hpp PRE-CREATION 
>   include/mesos/role/role.proto PRE-CREATION 
>   src/CMakeLists.txt cfe9d26c45ba42852fd1af958549954e7b04d448 
>   src/Makefile.am a57e46d06c8c26a32a9444be4f0e1269d775f8b0 
>   src/master/allocator/mesos/allocator.hpp 
> 97ee80726ad155917811265a983258b0165d3451 
>   src/master/allocator/mesos/hierarchical.hpp 
> 2a21364fdcaa4ec5e5567b9f367c14a1579b9a49 
>   src/master/allocator/mesos/hierarchical.cpp 
> aee8ced1fbfec8cf30cb939ff67fadfc6b08f37a 
>   src/master/master.hpp e5e0ed01a56d869cc535687c8dbb6b99f6295b66 
>   src/master/master.cpp 370980edfc80d1e52134fdaf3ce49177b6528b02 
>   src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
>   src/tests/hierarchical_allocator_tests.cpp 
> a45b3dd0a8237fdd080536cb9ab600e71ad939d3 
> 
> Diff: https://reviews.apache.org/r/40431/diff/
> 
> 
> Testing
> ---
> 
> 1. Make Check successfully;
> 
> 2. $ curl http://9.110.48.168:5050/roles
> {"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}
> 
> 
> Thanks,
> 
> Yong Qiao Wang
> 
>



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-11-24 Thread Yong Qiao Wang

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

(Updated Nov. 25, 2015, 1:57 a.m.)


Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.


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


Repository: mesos


Description
---

Move RoleInfo message out of allocator.proto


Diffs (updated)
-

  include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
  include/mesos/master/allocator.proto 702f56f56c3b1331613cecf26522986f6b572f8c 
  include/mesos/role/role.hpp PRE-CREATION 
  include/mesos/role/role.proto PRE-CREATION 
  src/CMakeLists.txt cfe9d26c45ba42852fd1af958549954e7b04d448 
  src/Makefile.am a57e46d06c8c26a32a9444be4f0e1269d775f8b0 
  src/master/allocator/mesos/allocator.hpp 
97ee80726ad155917811265a983258b0165d3451 
  src/master/allocator/mesos/hierarchical.hpp 
2a21364fdcaa4ec5e5567b9f367c14a1579b9a49 
  src/master/allocator/mesos/hierarchical.cpp 
aee8ced1fbfec8cf30cb939ff67fadfc6b08f37a 
  src/master/master.hpp e5e0ed01a56d869cc535687c8dbb6b99f6295b66 
  src/master/master.cpp 370980edfc80d1e52134fdaf3ce49177b6528b02 
  src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
  src/tests/hierarchical_allocator_tests.cpp 
a45b3dd0a8237fdd080536cb9ab600e71ad939d3 

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


Testing
---

1. Make Check successfully;

2. $ curl http://9.110.48.168:5050/roles
{"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}


Thanks,

Yong Qiao Wang



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-11-23 Thread Yong Qiao Wang

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

(Updated Nov. 24, 2015, 7:25 a.m.)


Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.


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


Repository: mesos


Description
---

Move RoleInfo message out of allocator.proto


Diffs (updated)
-

  include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 
  include/mesos/master/allocator.proto 702f56f56c3b1331613cecf26522986f6b572f8c 
  include/mesos/role/role.hpp PRE-CREATION 
  include/mesos/role/role.proto PRE-CREATION 
  src/CMakeLists.txt cfe9d26c45ba42852fd1af958549954e7b04d448 
  src/Makefile.am a57e46d06c8c26a32a9444be4f0e1269d775f8b0 
  src/master/allocator/mesos/allocator.hpp 
97ee80726ad155917811265a983258b0165d3451 
  src/master/allocator/mesos/hierarchical.hpp 
2a21364fdcaa4ec5e5567b9f367c14a1579b9a49 
  src/master/allocator/mesos/hierarchical.cpp 
aee8ced1fbfec8cf30cb939ff67fadfc6b08f37a 
  src/master/master.hpp e5e0ed01a56d869cc535687c8dbb6b99f6295b66 
  src/master/master.cpp 370980edfc80d1e52134fdaf3ce49177b6528b02 
  src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 
  src/tests/hierarchical_allocator_tests.cpp 
a45b3dd0a8237fdd080536cb9ab600e71ad939d3 

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


Testing
---

1. Make Check successfully;

2. $ curl http://9.110.48.168:5050/roles
{"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}


Thanks,

Yong Qiao Wang



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-11-19 Thread Yong Qiao Wang

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

(Updated Nov. 20, 2015, 2:01 a.m.)


Review request for mesos, Adam B, Guangya Liu, and Qian Zhang.


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


Repository: mesos


Description
---

Move RoleInfo message out of allocator.proto


Diffs (updated)
-

  include/mesos/master/allocator.hpp f76118bbf028610c330cebe937d81457fc67a6f3 
  include/mesos/master/allocator.proto 224da71e9f34d2ea11a6e6e235d0f8196abaeb90 
  include/mesos/role/role.hpp PRE-CREATION 
  include/mesos/role/role.proto PRE-CREATION 
  src/Makefile.am 5aac0ee8657dfca17a232438fd561cb00fd5e752 
  src/master/allocator/mesos/allocator.hpp 
d2d32af227d66c4030becd4cd64b907a70d25f49 
  src/master/allocator/mesos/hierarchical.hpp 
64ccf4164197e59d93d739fa2afbdee2cc2a1d23 
  src/master/allocator/mesos/hierarchical.cpp 
f2e3b639f210eb06c70584ee7294609d9fd978ad 
  src/master/master.hpp 5e5a575dc7dd49324f3c837028df8a7f75cd1f80 
  src/master/master.cpp 39a0e730b230cee73e30d831ee67d9207359ae28 
  src/tests/allocator.hpp e0cb2e75e6cac41ae8d8ed1608f1d64e7c533e34 
  src/tests/hierarchical_allocator_tests.cpp 
740cfa801ee90417c038308192d1f4f2416f8315 

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


Testing
---

1. Make Check successfully;

2. $ curl http://9.110.48.168:5050/roles
{"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}


Thanks,

Yong Qiao Wang



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-11-19 Thread Qian Zhang

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



src/Makefile.am (line 955)


Indent


- Qian Zhang


On Nov. 20, 2015, 10:01 a.m., Yong Qiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40431/
> ---
> 
> (Updated Nov. 20, 2015, 10:01 a.m.)
> 
> 
> Review request for mesos, Adam B, Guangya Liu, and Qian Zhang.
> 
> 
> Bugs: MESOS-3944
> https://issues.apache.org/jira/browse/MESOS-3944
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Move RoleInfo message out of allocator.proto
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp f76118bbf028610c330cebe937d81457fc67a6f3 
>   include/mesos/master/allocator.proto 
> 224da71e9f34d2ea11a6e6e235d0f8196abaeb90 
>   include/mesos/role/role.hpp PRE-CREATION 
>   include/mesos/role/role.proto PRE-CREATION 
>   src/Makefile.am 5aac0ee8657dfca17a232438fd561cb00fd5e752 
>   src/master/allocator/mesos/allocator.hpp 
> d2d32af227d66c4030becd4cd64b907a70d25f49 
>   src/master/allocator/mesos/hierarchical.hpp 
> 64ccf4164197e59d93d739fa2afbdee2cc2a1d23 
>   src/master/allocator/mesos/hierarchical.cpp 
> f2e3b639f210eb06c70584ee7294609d9fd978ad 
>   src/master/master.hpp 5e5a575dc7dd49324f3c837028df8a7f75cd1f80 
>   src/master/master.cpp 39a0e730b230cee73e30d831ee67d9207359ae28 
>   src/tests/allocator.hpp e0cb2e75e6cac41ae8d8ed1608f1d64e7c533e34 
>   src/tests/hierarchical_allocator_tests.cpp 
> 740cfa801ee90417c038308192d1f4f2416f8315 
> 
> Diff: https://reviews.apache.org/r/40431/diff/
> 
> 
> Testing
> ---
> 
> 1. Make Check successfully;
> 
> 2. $ curl http://9.110.48.168:5050/roles
> {"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}
> 
> 
> Thanks,
> 
> Yong Qiao Wang
> 
>



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-11-19 Thread Yong Qiao Wang

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

(Updated Nov. 20, 2015, 6:42 a.m.)


Review request for mesos, Adam B, Guangya Liu, and Qian Zhang.


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


Repository: mesos


Description
---

Move RoleInfo message out of allocator.proto


Diffs (updated)
-

  include/mesos/master/allocator.hpp f76118bbf028610c330cebe937d81457fc67a6f3 
  include/mesos/master/allocator.proto 224da71e9f34d2ea11a6e6e235d0f8196abaeb90 
  include/mesos/role/role.hpp PRE-CREATION 
  include/mesos/role/role.proto PRE-CREATION 
  src/Makefile.am 5aac0ee8657dfca17a232438fd561cb00fd5e752 
  src/master/allocator/mesos/allocator.hpp 
d2d32af227d66c4030becd4cd64b907a70d25f49 
  src/master/allocator/mesos/hierarchical.hpp 
64ccf4164197e59d93d739fa2afbdee2cc2a1d23 
  src/master/allocator/mesos/hierarchical.cpp 
f2e3b639f210eb06c70584ee7294609d9fd978ad 
  src/master/master.hpp 5e5a575dc7dd49324f3c837028df8a7f75cd1f80 
  src/master/master.cpp 39a0e730b230cee73e30d831ee67d9207359ae28 
  src/tests/allocator.hpp e0cb2e75e6cac41ae8d8ed1608f1d64e7c533e34 
  src/tests/hierarchical_allocator_tests.cpp 
740cfa801ee90417c038308192d1f4f2416f8315 

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


Testing
---

1. Make Check successfully;

2. $ curl http://9.110.48.168:5050/roles
{"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}


Thanks,

Yong Qiao Wang



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-11-18 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [40431]

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

- Mesos ReviewBot


On Nov. 18, 2015, 8:19 a.m., Yong Qiao Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40431/
> ---
> 
> (Updated Nov. 18, 2015, 8:19 a.m.)
> 
> 
> Review request for mesos, Adam B and Qian Zhang.
> 
> 
> Bugs: MESOS-3944
> https://issues.apache.org/jira/browse/MESOS-3944
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Move RoleInfo message out of allocator.proto
> 
> 
> Diffs
> -
> 
>   include/mesos/master/allocator.hpp f76118bbf028610c330cebe937d81457fc67a6f3 
>   include/mesos/master/allocator.proto 
> 224da71e9f34d2ea11a6e6e235d0f8196abaeb90 
>   include/mesos/role/role.hpp PRE-CREATION 
>   include/mesos/role/role.proto PRE-CREATION 
>   src/Makefile.am 5aac0ee8657dfca17a232438fd561cb00fd5e752 
>   src/master/allocator/mesos/allocator.hpp 
> d2d32af227d66c4030becd4cd64b907a70d25f49 
>   src/master/allocator/mesos/hierarchical.hpp 
> 64ccf4164197e59d93d739fa2afbdee2cc2a1d23 
>   src/master/allocator/mesos/hierarchical.cpp 
> f2e3b639f210eb06c70584ee7294609d9fd978ad 
>   src/master/master.hpp 5e5a575dc7dd49324f3c837028df8a7f75cd1f80 
>   src/master/master.cpp 39a0e730b230cee73e30d831ee67d9207359ae28 
>   src/tests/allocator.hpp e0cb2e75e6cac41ae8d8ed1608f1d64e7c533e34 
>   src/tests/hierarchical_allocator_tests.cpp 
> 740cfa801ee90417c038308192d1f4f2416f8315 
> 
> Diff: https://reviews.apache.org/r/40431/diff/
> 
> 
> Testing
> ---
> 
> 1. Make Check successfully;
> 
> 2. $ curl http://9.110.48.168:5050/roles
> {"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}
> 
> 
> Thanks,
> 
> Yong Qiao Wang
> 
>



Re: Review Request 40431: Move RoleInfo message out of allocator.proto

2015-11-18 Thread Yong Qiao Wang

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

(Updated Nov. 19, 2015, 6:46 a.m.)


Review request for mesos, Adam B and Qian Zhang.


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


Repository: mesos


Description
---

Move RoleInfo message out of allocator.proto


Diffs (updated)
-

  include/mesos/master/allocator.hpp f76118bbf028610c330cebe937d81457fc67a6f3 
  include/mesos/master/allocator.proto 224da71e9f34d2ea11a6e6e235d0f8196abaeb90 
  include/mesos/role/role.hpp PRE-CREATION 
  include/mesos/role/role.proto PRE-CREATION 
  src/Makefile.am 5aac0ee8657dfca17a232438fd561cb00fd5e752 
  src/master/allocator/mesos/allocator.hpp 
d2d32af227d66c4030becd4cd64b907a70d25f49 
  src/master/allocator/mesos/hierarchical.hpp 
64ccf4164197e59d93d739fa2afbdee2cc2a1d23 
  src/master/allocator/mesos/hierarchical.cpp 
f2e3b639f210eb06c70584ee7294609d9fd978ad 
  src/master/master.hpp 5e5a575dc7dd49324f3c837028df8a7f75cd1f80 
  src/master/master.cpp 39a0e730b230cee73e30d831ee67d9207359ae28 
  src/tests/allocator.hpp e0cb2e75e6cac41ae8d8ed1608f1d64e7c533e34 
  src/tests/hierarchical_allocator_tests.cpp 
740cfa801ee90417c038308192d1f4f2416f8315 

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


Testing
---

1. Make Check successfully;

2. $ curl http://9.110.48.168:5050/roles
{"roles":[{"frameworks":[],"name":"*","resources":{"cpus":0,"disk":0,"mem":0},"weight":1.0}]}


Thanks,

Yong Qiao Wang