> On June 24, 2015, 3:15 p.m., Zameer Manji wrote: > > src/main/java/org/apache/aurora/util/GuavaCollectors.java, line 36 > > <https://reviews.apache.org/r/35842/diff/2/?file=991612#file991612line36> > > > > I think this collector needs to be given the unordered characteristic > > because it is building a set where the order will be lost: > > https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.Characteristics.html#UNORDERED
Added. > On June 24, 2015, 3:15 p.m., Zameer Manji wrote: > > src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java, > > line 263 > > <https://reviews.apache.org/r/35842/diff/2/?file=991611#file991611line263> > > > > I think we should be importing java.util.Optional at the top of the > > file and inlining use of com.google.common.base.Optional as necessary. > > > > Now that we are on JDK 8 we should be prefering use of > > java.util.Optional. If that change is very noisey, can you check how > > difficult it would be to remove guava's Optional in these files? This is the lower blast-radius change - this file is almost 1400 lines, and many of the APIs it calls are still written in terms of guava Optional. - Kevin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35842/#review89257 ----------------------------------------------------------- On June 24, 2015, 2:52 p.m., Kevin Sweeney wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/35842/ > ----------------------------------------------------------- > > (Updated June 24, 2015, 2:52 p.m.) > > > Review request for Aurora, Bill Farner and Zameer Manji. > > > Repository: aurora > > > Description > ------- > > Use java.util.Optional and streams in Lock*. > > Taking advantage of some Java 8 features along the way, and introduced > GuavaCollectors.toImmutableSet for compatibility with the streams API > > > Diffs > ----- > > src/main/java/org/apache/aurora/scheduler/state/LockManager.java > e8303f914466ebe93518ec2970e1173dc39d9adb > src/main/java/org/apache/aurora/scheduler/state/LockManagerImpl.java > 6aa281cb7b07e3e82c578c553eee8c7066cf2761 > src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java > 2be3eb0e9405e3d34533520095423429fe00a2ca > src/main/java/org/apache/aurora/scheduler/storage/LockStore.java > 596a3787369616d30a2763a37bcb7b7cc39ad386 > src/main/java/org/apache/aurora/scheduler/storage/db/DbLockStore.java > 335d7a95e797fe940e71b10da44cbd97edea69ac > > src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java > 0670b2b4c3817becefb38f0294f111768386817b > src/main/java/org/apache/aurora/util/GuavaCollectors.java PRE-CREATION > src/test/java/org/apache/aurora/scheduler/state/LockManagerImplTest.java > 9c9cf1b45506a2c0e1a15e3e92f1bee83778a12a > src/test/java/org/apache/aurora/scheduler/storage/db/DbLockStoreTest.java > ecbe1dd1eb1f0de07bea490b076c7a920f08bccb > > src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java > 38ef412a6d29dfef7b305e00cf44522818303965 > src/test/java/org/apache/aurora/util/GuavaCollectorsTest.java PRE-CREATION > > Diff: https://reviews.apache.org/r/35842/diff/ > > > Testing > ------- > > ./gradlew -Pq build > > > Thanks, > > Kevin Sweeney > >