mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Conway <>
Subject Re: Review Request 58110: Removed `allocations` map from DRFSorter.
Date Fri, 31 Mar 2017 21:33:46 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated March 31, 2017, 9:33 p.m.)

Review request for mesos, Benjamin Bannier, Benjamin Mahler, and Michael Park.



Repository: mesos


The sorter previously managed three collections: a set of active
clients, a map from client names to allocations, and a map from client
names to weights. Since the set previously contained only active
clients, each client's allocation needed to be stored separately, since
the sorter needed to remember the allocation made to inactive clients.

Now that the set of clients includes both active and inactive clients,
we can dispense with the additional `allocations` map and store a
client's allocation as a nested struct in the `Client` struct. This
avoids the need to keep the two collections synchronized; the logic for
manipulating allocations is also more properly written as a member
function of the Client::Allocation struct, rather than inline in a
member function of DRFSorter.

Diffs (updated)

  src/master/allocator/sorter/drf/metrics.cpp 15aab32db5ca1a7a14080e9bbb7c65283be3ec20 
  src/master/allocator/sorter/drf/sorter.hpp 76329220e1115c1de7810fb69b943c78c078be59 
  src/master/allocator/sorter/drf/sorter.cpp ed54680cecb637931fc344fbcf8fd3b14cc24295 




`make check`


Neil Conway

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message