----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65225/ -----------------------------------------------------------
Review request for Aurora, David McLaughlin and Bill Farner. Repository: aurora Description ------- Following along with the custom OfferOrder work done in https://reviews.apache.org/r/59480/ and https://reviews.apache.org/r/59698/, as well as the custom selector work in https://reviews.apache.org/r/63973/. It would be helpful to be able to inject a custom data structure to hold offers that takes advantage of different orderings. For example: if we used a bin-packing ordering and we wanted to select an empty host quickly for certain jobs, we could inject a data structure that also holds all empty slots for quick retrieval as opposed to iterating through the whole list as we are currently required to do. I've created a `FilterableCollection` in order to generalize the idea that we have a collection that has filters applied at different levels (in our case, we apply filters in `HostOffers` and in `TaskAssignerImpl` before we iterate for selection. I've also created a thin `FilterableCollectionImpl` that mimics the current functionality in master (a wrapper around `ConcurrentSkipListSet` with filters applied for the necessary functions. Additionally, I've added the `offer_collection_modules` so cluster operators can inject their own custom data structures. Diffs ----- src/main/java/org/apache/aurora/scheduler/offers/FilterableCollection.java PRE-CREATION src/main/java/org/apache/aurora/scheduler/offers/FilterableCollectionImpl.java PRE-CREATION src/main/java/org/apache/aurora/scheduler/offers/HostOffers.java 2ea7a01085b87c8ed6765537a8005e2349784ab0 src/main/java/org/apache/aurora/scheduler/offers/OfferManager.java 8f9e33d81be9087821784a8a08079a1736d9cb63 src/main/java/org/apache/aurora/scheduler/offers/OfferManagerImpl.java 084b48c6b77bb38cf0ed2709cc8a4bffec68597a src/main/java/org/apache/aurora/scheduler/offers/OfferManagerModule.java de16c14c887d4225e0629b1580eb5e740798f1f7 src/main/java/org/apache/aurora/scheduler/offers/OfferOrderBuilder.java 1260ef19506acb8e8a937d4fd7b7152361bd3c40 src/main/java/org/apache/aurora/scheduler/offers/OfferSettings.java 1e36b2c3094e99f05aa4a4f098a48df2293b4320 Diff: https://reviews.apache.org/r/65225/diff/1/ Testing ------- TODO: I am planning on adding tests for `FilterableCollection`, just wanted to put this out there for quick comments. I've done some ad-hoc testing of injecting custom collection types. Thanks, Jordan Ly
