aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sweeney" <kevi...@apache.org>
Subject Re: Review Request 22489: Short-circuit preemptor on min-priority non-prod tasks.
Date Fri, 13 Jun 2014 01:29:49 GMT


> On June 12, 2014, 6:07 p.m., Maxim Khutornenko wrote:
> > src/main/java/org/apache/aurora/scheduler/async/Preemptor.java, line 114
> > <https://reviews.apache.org/r/22489/diff/1-2/?file=607874#file607874line114>
> >
> >     There is quite a bit of redundancy here. Why not follow the LoadingCache approach
(e.g. the one in TaskVars)? It would be much more compact without the drawback of increased
visibility.
> 
> Kevin Sweeney wrote:
>     Considered that approach, but this way was easier to test. The LoadingCache approach
makes it difficult to assert that counters were not incremented, which is a regression I want
to protect against here.
> 
> Maxim Khutornenko wrote:
>     Not sure I buy that argument. There is a tried out and proved method of expecting
stat exports: https://github.com/apache/incubator-aurora/blob/master/src/test/java/org/apache/aurora/scheduler/TaskVarsTest.java#L77-L87
as well as asserting counter results: https://github.com/apache/incubator-aurora/blob/master/src/test/java/org/apache/aurora/scheduler/TaskVarsTest.java#L151-L153

Ah, I see there is. Would you accept a TODO to factor that code into a common stats testing
library and switch to that approach?


- Kevin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22489/#review45566
-----------------------------------------------------------


On June 12, 2014, 5:34 p.m., Kevin Sweeney wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22489/
> -----------------------------------------------------------
> 
> (Updated June 12, 2014, 5:34 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Maxim Khutornenko.
> 
> 
> Bugs: AURORA-524
>     https://issues.apache.org/jira/browse/AURORA-524
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Short-circuit preemptor on min-priority non-prod tasks.
> 
> Refactor the Preemptor to short-circuit when there's no hope a task could be preempted.
This will prevent hopeless preemption attempts from being included in the count, making the
ratio of (preemptor_no_slots_found / preemptor_attempts) a meaningful indicator of cluster
health. There may also be a small performance improvement, but that's not the goal of this
change.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/async/AsyncModule.java 5a38a1f69ac5dbe68af3bfe175899ddee392880b

>   src/main/java/org/apache/aurora/scheduler/async/Preemptor.java f29ad7fe1a0d388b6d9558df7b9b01accd433fe5

>   src/main/java/org/apache/aurora/scheduler/base/Tasks.java 1be16374aeebaee59063aec982690ffa1fbdcf0f

>   src/main/java/org/apache/aurora/scheduler/configuration/ConfigurationManager.java 47cb70bb092a20971e81c867218836d8bd9fbdef

>   src/main/python/apache/thermos/observer/http/templates/rawtask.tpl c4b7f5283d06fe523ac7bf6ea268179df2a3a2c3

>   src/test/java/org/apache/aurora/scheduler/async/PreemptorImplTest.java 3578bb35aa642b0679ee017b79dbcf6591235d94

> 
> Diff: https://reviews.apache.org/r/22489/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew -Pq build
> 
> 
> Thanks,
> 
> Kevin Sweeney
> 
>


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