Re: Review Request 32164: Moving pending task search into PreemptorImpl

2015-03-17 Thread Bill Farner

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

Ship it!


Ship It!

- Bill Farner


On March 17, 2015, 5:19 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32164/
> ---
> 
> (Updated March 17, 2015, 5:19 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Addressing a TODO left after refactoring in step 1.
> 
> 
> Diffs
> -
> 
>   src/jmh/java/org/apache/aurora/benchmark/SchedulingBenchmarks.java 
> 9b7a3f16ad489c296d5e3513a74264a0620942a6 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptionSlotFinder.java
>  e5cc48625cf019f1b6bb85749711528bf5dee4cd 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptorImpl.java 
> e11db4e0e04fe3ca089defc0304333cbb8bf7624 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptorModule.java
>  93cab3414e3cd76e02b34c439413e625037bf90c 
>   
> src/test/java/org/apache/aurora/scheduler/async/preemptor/PreemptorImplTest.java
>  f27ca62397e60b114f0c570cdfe9323a6c825645 
>   
> src/test/java/org/apache/aurora/scheduler/async/preemptor/PreemptorSlotFinderTest.java
>  9a6e94dc941025fd272495de0c46f77b793e867c 
> 
> Diff: https://reviews.apache.org/r/32164/diff/
> 
> 
> Testing
> ---
> 
> ./gradlew -Pq build
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 32164: Moving pending task search into PreemptorImpl

2015-03-17 Thread Bill Farner


> On March 17, 2015, 6:05 p.m., Bill Farner wrote:
> > I actually meant this should be outside the preemptor altogether.  The 
> > preemptor is being called, and then internally deciding the caller should 
> > have not called in the first place.  I claim this is odd behavior.
> > 
> > I think it would make sense, instead, if the caller opened a transaction, 
> > and continued that transaction into the preemptor once it has deemed the 
> > task is `PENDING` and has been in that state long enough to warrant a 
> > preemption search.
> 
> Maxim Khutornenko wrote:
> After the final refactoring step is implemented, the preemptor will be 
> guided by a scheduled background worker most likely residing within the 
> PreemptorImpl itself. So, it will be the only caller and consumer of pending 
> tasks. I don't think it's worth purging pending task search out at this stage 
> just to return it back shortly after.

That makes sense, thanks for adding context.


- Bill


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


On March 17, 2015, 5:19 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32164/
> ---
> 
> (Updated March 17, 2015, 5:19 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Addressing a TODO left after refactoring in step 1.
> 
> 
> Diffs
> -
> 
>   src/jmh/java/org/apache/aurora/benchmark/SchedulingBenchmarks.java 
> 9b7a3f16ad489c296d5e3513a74264a0620942a6 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptionSlotFinder.java
>  e5cc48625cf019f1b6bb85749711528bf5dee4cd 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptorImpl.java 
> e11db4e0e04fe3ca089defc0304333cbb8bf7624 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptorModule.java
>  93cab3414e3cd76e02b34c439413e625037bf90c 
>   
> src/test/java/org/apache/aurora/scheduler/async/preemptor/PreemptorImplTest.java
>  f27ca62397e60b114f0c570cdfe9323a6c825645 
>   
> src/test/java/org/apache/aurora/scheduler/async/preemptor/PreemptorSlotFinderTest.java
>  9a6e94dc941025fd272495de0c46f77b793e867c 
> 
> Diff: https://reviews.apache.org/r/32164/diff/
> 
> 
> Testing
> ---
> 
> ./gradlew -Pq build
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 32164: Moving pending task search into PreemptorImpl

2015-03-17 Thread Maxim Khutornenko


> On March 17, 2015, 6:05 p.m., Bill Farner wrote:
> > I actually meant this should be outside the preemptor altogether.  The 
> > preemptor is being called, and then internally deciding the caller should 
> > have not called in the first place.  I claim this is odd behavior.
> > 
> > I think it would make sense, instead, if the caller opened a transaction, 
> > and continued that transaction into the preemptor once it has deemed the 
> > task is `PENDING` and has been in that state long enough to warrant a 
> > preemption search.

After the final refactoring step is implemented, the preemptor will be guided 
by a scheduled background worker most likely residing within the PreemptorImpl 
itself. So, it will be the only caller and consumer of pending tasks. I don't 
think it's worth purging pending task search out at this stage just to return 
it back shortly after.


- Maxim


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


On March 17, 2015, 5:19 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32164/
> ---
> 
> (Updated March 17, 2015, 5:19 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Addressing a TODO left after refactoring in step 1.
> 
> 
> Diffs
> -
> 
>   src/jmh/java/org/apache/aurora/benchmark/SchedulingBenchmarks.java 
> 9b7a3f16ad489c296d5e3513a74264a0620942a6 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptionSlotFinder.java
>  e5cc48625cf019f1b6bb85749711528bf5dee4cd 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptorImpl.java 
> e11db4e0e04fe3ca089defc0304333cbb8bf7624 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptorModule.java
>  93cab3414e3cd76e02b34c439413e625037bf90c 
>   
> src/test/java/org/apache/aurora/scheduler/async/preemptor/PreemptorImplTest.java
>  f27ca62397e60b114f0c570cdfe9323a6c825645 
>   
> src/test/java/org/apache/aurora/scheduler/async/preemptor/PreemptorSlotFinderTest.java
>  9a6e94dc941025fd272495de0c46f77b793e867c 
> 
> Diff: https://reviews.apache.org/r/32164/diff/
> 
> 
> Testing
> ---
> 
> ./gradlew -Pq build
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 32164: Moving pending task search into PreemptorImpl

2015-03-17 Thread Bill Farner

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


I actually meant this should be outside the preemptor altogether.  The 
preemptor is being called, and then internally deciding the caller should have 
not called in the first place.  I claim this is odd behavior.

I think it would make sense, instead, if the caller opened a transaction, and 
continued that transaction into the preemptor once it has deemed the task is 
`PENDING` and has been in that state long enough to warrant a preemption search.

- Bill Farner


On March 17, 2015, 5:19 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32164/
> ---
> 
> (Updated March 17, 2015, 5:19 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Addressing a TODO left after refactoring in step 1.
> 
> 
> Diffs
> -
> 
>   src/jmh/java/org/apache/aurora/benchmark/SchedulingBenchmarks.java 
> 9b7a3f16ad489c296d5e3513a74264a0620942a6 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptionSlotFinder.java
>  e5cc48625cf019f1b6bb85749711528bf5dee4cd 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptorImpl.java 
> e11db4e0e04fe3ca089defc0304333cbb8bf7624 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptorModule.java
>  93cab3414e3cd76e02b34c439413e625037bf90c 
>   
> src/test/java/org/apache/aurora/scheduler/async/preemptor/PreemptorImplTest.java
>  f27ca62397e60b114f0c570cdfe9323a6c825645 
>   
> src/test/java/org/apache/aurora/scheduler/async/preemptor/PreemptorSlotFinderTest.java
>  9a6e94dc941025fd272495de0c46f77b793e867c 
> 
> Diff: https://reviews.apache.org/r/32164/diff/
> 
> 
> Testing
> ---
> 
> ./gradlew -Pq build
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 32164: Moving pending task search into PreemptorImpl

2015-03-17 Thread Aurora ReviewBot

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

Ship it!


Master (b847bbf) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing "@ReviewBot 
retry"

- Aurora ReviewBot


On March 17, 2015, 5:19 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32164/
> ---
> 
> (Updated March 17, 2015, 5:19 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Addressing a TODO left after refactoring in step 1.
> 
> 
> Diffs
> -
> 
>   src/jmh/java/org/apache/aurora/benchmark/SchedulingBenchmarks.java 
> 9b7a3f16ad489c296d5e3513a74264a0620942a6 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptionSlotFinder.java
>  e5cc48625cf019f1b6bb85749711528bf5dee4cd 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptorImpl.java 
> e11db4e0e04fe3ca089defc0304333cbb8bf7624 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptorModule.java
>  93cab3414e3cd76e02b34c439413e625037bf90c 
>   
> src/test/java/org/apache/aurora/scheduler/async/preemptor/PreemptorImplTest.java
>  f27ca62397e60b114f0c570cdfe9323a6c825645 
>   
> src/test/java/org/apache/aurora/scheduler/async/preemptor/PreemptorSlotFinderTest.java
>  9a6e94dc941025fd272495de0c46f77b793e867c 
> 
> Diff: https://reviews.apache.org/r/32164/diff/
> 
> 
> Testing
> ---
> 
> ./gradlew -Pq build
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Review Request 32164: Moving pending task search into PreemptorImpl

2015-03-17 Thread Maxim Khutornenko

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

Review request for Aurora and Bill Farner.


Repository: aurora


Description
---

Addressing a TODO left after refactoring in step 1.


Diffs
-

  src/jmh/java/org/apache/aurora/benchmark/SchedulingBenchmarks.java 
9b7a3f16ad489c296d5e3513a74264a0620942a6 
  
src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptionSlotFinder.java
 e5cc48625cf019f1b6bb85749711528bf5dee4cd 
  src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptorImpl.java 
e11db4e0e04fe3ca089defc0304333cbb8bf7624 
  
src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptorModule.java 
93cab3414e3cd76e02b34c439413e625037bf90c 
  
src/test/java/org/apache/aurora/scheduler/async/preemptor/PreemptorImplTest.java
 f27ca62397e60b114f0c570cdfe9323a6c825645 
  
src/test/java/org/apache/aurora/scheduler/async/preemptor/PreemptorSlotFinderTest.java
 9a6e94dc941025fd272495de0c46f77b793e867c 

Diff: https://reviews.apache.org/r/32164/diff/


Testing
---

./gradlew -Pq build


Thanks,

Maxim Khutornenko