----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32907/#review79470 -----------------------------------------------------------
Ship it! src/main/java/org/apache/aurora/scheduler/async/TaskScheduler.java <https://reviews.apache.org/r/32907/#comment128869> Does this fail if the pending task was deleted? It's probably fine to let expiration handle invalidation in that case, but just check that this doesn't NPE or similar. src/main/java/org/apache/aurora/scheduler/async/preemptor/BiCache.java <https://reviews.apache.org/r/32907/#comment128870> "A bi-directional cache of items. Entries are..." src/main/java/org/apache/aurora/scheduler/async/preemptor/BiCache.java <https://reviews.apache.org/r/32907/#comment128871> Consider exposing a `size()` function on `BiCache` and pushing the stat up to alleaviate the need to plumb the stat name through. At that point i think you can reasonably remove `BiCacheSettings` and inject just the expiry time. src/main/java/org/apache/aurora/scheduler/async/preemptor/BiCache.java <https://reviews.apache.org/r/32907/#comment128872> Consider s/Iterable/Set/, or at least Collection here so you don't need to do Iterables.isEmpty at the call site. src/main/java/org/apache/aurora/scheduler/async/preemptor/Preemptor.java <https://reviews.apache.org/r/32907/#comment128873> Please document the justification for getting the last element. src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerImplTest.java <https://reviews.apache.org/r/32907/#comment128876> Since the BiCache is completely controlled by TaskScheduler, consider using a real instance rather than a mock. If this makes tests harder to write or read, though, don't bother. src/test/java/org/apache/aurora/scheduler/async/preemptor/BiCacheTest.java <https://reviews.apache.org/r/32907/#comment128878> One more test case: key collision behavior with identical and different values src/test/java/org/apache/aurora/scheduler/async/preemptor/BiCacheTest.java <https://reviews.apache.org/r/32907/#comment128877> Is there not a compiler warning on the lack of type witness on ImmutableSet.of()? - Bill Farner On April 6, 2015, 11:51 p.m., Maxim Khutornenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/32907/ > ----------------------------------------------------------- > > (Updated April 6, 2015, 11:51 p.m.) > > > Review request for Aurora, Bill Farner and Zameer Manji. > > > Bugs: AURORA-1219 > https://issues.apache.org/jira/browse/AURORA-1219 > > > Repository: aurora > > > Description > ------- > > Current preemption model assumes tracking preemption slots/reservations by > taskId. This reduces preemption efficiency as it only takes a specific taskId > scheduling round to claim the PreemptionSlot and then subsequently make a > slave reservation. > > This diff generalizes the preemption pool by TaskGroupKey. Preemption slots > are now created and cached by TaskGroupKey and are available to _any_ task > from the same TaskGroup. > > This change should also simplify the algorithm in > https://reviews.apache.org/r/32597/. > > > Diffs > ----- > > src/main/java/org/apache/aurora/scheduler/async/AsyncModule.java > e87dda47a355654c66f6f54fb25a4d9a7f68422d > src/main/java/org/apache/aurora/scheduler/async/TaskScheduler.java > ebc520ebb4dddbc69b2b4a6f9174c1451d61887a > src/main/java/org/apache/aurora/scheduler/async/preemptor/BiCache.java > PRE-CREATION > > src/main/java/org/apache/aurora/scheduler/async/preemptor/PendingTaskProcessor.java > 67ad5d7f9909bc892301c19586561b6cdbfe79e6 > > src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptionSlotCache.java > b5a42a0a0498f06a382576e2c3a839bbb7f1d2b1 > src/main/java/org/apache/aurora/scheduler/async/preemptor/Preemptor.java > 77617ec11119a2bcd062d5b80cd2b4c58dc80514 > > src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptorModule.java > 1092c055588363794b37a965fb2f17a6e50d92d7 > src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerImplTest.java > c5643d9d99fc46d55fd6c48161230139fb7f12b8 > src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerTest.java > 88c0163170ebc25995d9ef8b1543335a4322bb8e > src/test/java/org/apache/aurora/scheduler/async/preemptor/BiCacheTest.java > PRE-CREATION > > src/test/java/org/apache/aurora/scheduler/async/preemptor/PendingTaskProcessorTest.java > bcd1b4e854f5ea227268c73156bc97c7c937c1de > > src/test/java/org/apache/aurora/scheduler/async/preemptor/PreemptionSlotCacheTest.java > 80bd13a192bda64759b5a93749ec47ddfeae504a > > src/test/java/org/apache/aurora/scheduler/async/preemptor/PreemptorImplTest.java > 281f4e02650727aa5d0a35a09dcf0eb823ad1b50 > > Diff: https://reviews.apache.org/r/32907/diff/ > > > Testing > ------- > > ./gradlew -Pq build > Manual testing in vagrant. > > > Thanks, > > Maxim Khutornenko > >