> On Dec. 2, 2014, 11:30 a.m., Kevin Sweeney wrote:
> > src/main/java/org/apache/aurora/scheduler/async/preemptor/LiveClusterState.java,
> >  line 67
> > <https://reviews.apache.org/r/28572/diff/2/?file=780331#file780331line67>
> >
> >     Citation needed? Iterables.transform generates a lazy view.
> >     
> >     From 
> > http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/collect/Iterables.html:
> >     
> >     Performance notes: Unless otherwise noted, all of the iterables 
> > produced in this class are lazy, which means that their iterators only 
> > advance the backing iteration when absolutely necessary.
> 
> Bill Farner wrote:
>     Intermediate _map_, not intermediate _iterable_.  We have 
> `Iterable<IAssignedTask>` and we want `Multimap<String, PreemptionVictim>`.  
> To make that happen, we'd `Multimaps.index(activeTasks, TASK_TO_SLAVE_ID)`, 
> then `Multimaps.transform(tasksBySlave, TASK_TO_VICTIM)`.  The result of 
> `Multimaps.index` is what i'm referring to.
>     
>     Would you prefer i remove the justification comment altogether?  I'm 
> doubtful a paragraph comment illustrating this would be helpful.

Ah I see - PreemptionVictim lacks a slaveId field. The comment is useful then, 
calling out a performance optimization.


- Kevin


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


On Dec. 2, 2014, 11:04 a.m., Bill Farner wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28572/
> -----------------------------------------------------------
> 
> (Updated Dec. 2, 2014, 11:04 a.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Zameer Manji.
> 
> 
> Bugs: AURORA-121
>     https://issues.apache.org/jira/browse/AURORA-121
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This should be the last step before creating a caching `ClusterState` 
> implementation.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/async/preemptor/ClusterState.java 
> 4f0019a1a1272e27e600c47641bbbba05d320035 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/LiveClusterState.java
>  9d83acc4177076411c5ce6c8304fcf75cb029597 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptionVictim.java
>  PRE-CREATION 
>   
> src/main/java/org/apache/aurora/scheduler/async/preemptor/PreemptorImpl.java 
> f013383b095968b0de6e917d2311c85d6afe53f7 
>   
> src/test/java/org/apache/aurora/scheduler/async/preemptor/LiveClusterStateTest.java
>  8f91ff684dddc0591e71503afc0f999e508b7dbe 
> 
> Diff: https://reviews.apache.org/r/28572/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Bill Farner
> 
>

Reply via email to