mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Meng Zhu <>
Subject Re: Review Request 70419: Refactor `Sorter::sorted()` to return a stream of clients.
Date Wed, 01 May 2019 01:17:09 GMT

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

(Updated April 30, 2019, 6:17 p.m.)

Review request for mesos and Benjamin Mahler.


Used PIMPL to return `SortedClients` by value.

Summary (updated)

Refactor `Sorter::sorted()` to return a stream of clients.

Bugs: MESOS-9722

Repository: mesos

Description (updated)

This patch refactors `Sorter::sorted` to return
`class SortedClients` instead of a whole vector<string>.
Callers can then use SortedClients::next() to get the
next sorted client. This paves the way for sort optimization
where sorting of the whole clients can be lazily done as callers
ask for the next client.

Diffs (updated)

  src/master/allocator/mesos/hierarchical.cpp 64a076ddd29711437d539a06bb0470755828cc87 
  src/master/allocator/sorter/drf/sorter.hpp 91a9d668b87079158f7072780dc86bb08865166e 
  src/master/allocator/sorter/drf/sorter.cpp 9367469132e426f0b4b66a80ad300c157fba6bf2 
  src/master/allocator/sorter/random/sorter.hpp 55e22d7705f163fe47d5aa47416ee0714c5a87c0 
  src/master/allocator/sorter/random/sorter.cpp 813f5b55d38dd9fa822de53ee944c3f72251a69d 
  src/master/allocator/sorter/sorter.hpp d56a1166a9e82b034564842ac071874ec2885004 
  src/tests/sorter_tests.cpp 9aee2b41b0d3c978bca6bd2d7ad28e32506a648a 



Testing (updated)

make check

See benchmark result in


Meng Zhu

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