> On Jan. 20, 2016, 4:26 p.m., John Sirois wrote:
> > src/main/java/org/apache/aurora/scheduler/pruning/TaskHistoryPruner.java,
> > line 154
> > <https://reviews.apache.org/r/42332/diff/3/?file=1203998#file1203998line154>
> >
> > I think this same concept can be cleaned up usefully by:
> > 1. wrap the executor in an `ExecutorCompletionService` up in the
> > constructor.
> > 2. submit void work to the `CompletionService` 2x in
> > `registerInactiveTask`
> > 3. in this run loop `take` void futures from it and `get` their void
> > result - the exceptions will propagate naturally, 1st come, 1st serve, no
> > trampling.
>
> Zameer Manji wrote:
> `ExecutorCompletionService` doesn't allow for submission of delayed tasks
> and line 186 is submitting a task with a delay so I don't think this is
> possible.
Hrm, yup. Could construct `new FutureTask<Void>(() -> {...}, null);` to use as
the runnables and add them to your won queue for the same benefits, up to you.
- John
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42332/#review115517
-----------------------------------------------------------
On Jan. 20, 2016, 3:39 p.m., Zameer Manji wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42332/
> -----------------------------------------------------------
>
> (Updated Jan. 20, 2016, 3:39 p.m.)
>
>
> Review request for Aurora, John Sirois and Maxim Khutornenko.
>
>
> Bugs: AURORA-1582
> https://issues.apache.org/jira/browse/AURORA-1582
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Task pruning is key to operating a large cluster and failure to prune should
> trigger shutdown to prevent unbounded growth of storage. This patch turns
> `TaskHistoryPruner` into a service which propagates failure from failed
> pruning attempts towards the `ServiceManager`. Also completing a TODO which
> removes a test for behaviour that is very awkward to test for.
>
>
> Diffs
> -----
>
> src/main/java/org/apache/aurora/scheduler/pruning/PruningModule.java
> 735199ac1ccccab343c24471890aa330d6635c26
> src/main/java/org/apache/aurora/scheduler/pruning/TaskHistoryPruner.java
> 2064089937f5178b1413d386a312f4173a0e35fb
>
> src/test/java/org/apache/aurora/scheduler/pruning/TaskHistoryPrunerTest.java
> 295960f13693c6ba0d7075a8ef7f9680a91ae69d
>
> Diff: https://reviews.apache.org/r/42332/diff/
>
>
> Testing
> -------
>
> ./gradlew build -Pq
> e2e tests
>
>
> Thanks,
>
> Zameer Manji
>
>