> On Dec. 10, 2015, 10:46 a.m., Adam B wrote: > > This looks like just the interface change; where's the (default/reference) > > implementation? > > Justify/delete the removeRole call. > > Consider (the lack of) backwards-compatibility for your allocator module > > API change.
Refer to some other Epic(such as quota), they always split the changes into some smaller bits, so I also follow up them and want to implement these functions in another sepratated JIRA MESOS-3943, I think it is easier to reivew. I will post another patch for the implementation, is it OK? For backwards-compatibility, I have considered this issue before, but I think Mesos does not reach to 1.0 so interfaces changes is resonable, and also refer to the quota implementation, the functions setQuota()/removeQuota() also be defined to pure virtual functions. I think we should keep consistence. > On Dec. 10, 2015, 10:46 a.m., Adam B wrote: > > include/mesos/master/allocator.hpp, line 409 > > <https://reviews.apache.org/r/40469/diff/4/?file=1155784#file1155784line409> > > > > When is removeRole necessary? There aren't likely to be so many roles > > that we need to worry about saving memory by clearing out inactive roles. > > If there are no frameworks registered with this role, it is inactive > > and won't affect allocator decisions. > > If an admin wants to unspecify a weight for this user, they could just > > set it back to the default '1.0' For Dynamic Roles, I think it is make sence to provide a way to let cluster operator to remove a role due to the corresponding way is provided to add a role by /roles endpoint. But for Implicit Roles, this is non-necessary, I will update this patch to remove this function. > On Dec. 10, 2015, 10:46 a.m., Adam B wrote: > > include/mesos/master/allocator.hpp, lines 412-418 > > <https://reviews.apache.org/r/40469/diff/4/?file=1155784#file1155784line412> > > > > This is a breaking API change for the allocator, and any implementers > > of allocator modules will not only have to recompile their modules against > > the newer version, but will also have to implement this new function. > > > > I wonder if it would be better to not make this a pure virtual function > > and instead have a default noop implementation, so module authors can > > recompile without error, and add dynamic role support to their own > > allocator at their leisure. > > > > Either way, we'll need to make an announcement to the dev@ list and put > > a note in the upgrades doc. I suggest to make this funciton as a pure virtual function and let some other allocator to implement it, my reasons as below: 1. Mesos does not reach to 1.0, so the interface changes are resonable. 2. Like quota configuration(those functions are also be defined as pure virtual funcs in allocator.hpp), Weight dynamic update also is an important functions, I think it should be required for any mesos cluster. Of couse, It is great to define this function with a default noop implementation for backwards-compatibility, I just confused for the consistence like quota done(setQuota()/removeQuota()). OK, let me know your further comment. > On Dec. 10, 2015, 10:46 a.m., Adam B wrote: > > src/master/allocator/mesos/hierarchical.cpp, lines 1057-1058 > > <https://reviews.apache.org/r/40469/diff/4/?file=1155787#file1155787line1057> > > > > Seems like there's a lot more missing here. Which subsequent review > > actually implements the new functions? Perhaps that patch should be merged > > into this one so we have a functional patch to commit at once. I plan to implement these functions in JIRA MESOS-3943, If you think we should merge them together, I am happy to do that. - Yongqiao ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/40469/#review109706 ----------------------------------------------------------- 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/40469/ > ----------------------------------------------------------- > > (Updated Dec. 8, 2015, 5:20 a.m.) > > > Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu. > > > Bugs: MESOS-3956 > https://issues.apache.org/jira/browse/MESOS-3956 > > > Repository: mesos > > > Description > ------- > > Update Allocator interface to support dynamic roles > > > Diffs > ----- > > include/mesos/master/allocator.hpp 619ef01c3a7d640560653cfc1838dd09046d1da0 > src/master/allocator/mesos/allocator.hpp > 97ee80726ad155917811265a983258b0165d3451 > src/master/allocator/mesos/hierarchical.hpp > 99c742906874c30c39c159e58a65277ade3c07fd > src/master/allocator/mesos/hierarchical.cpp > 5da825a1d578a9ee40b4985378fddb3c5fb3b416 > src/tests/allocator.hpp c7670525765491fe931a4ee38446fa7e9d79af42 > > Diff: https://reviews.apache.org/r/40469/diff/ > > > Testing > ------- > > Make check successfully. > > > Thanks, > > Yongqiao Wang > >