> On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/main/java/org/apache/aurora/scheduler/storage/db/DbLockStore.java, line > > 54 > > <https://reviews.apache.org/r/21132/diff/2/?file=577925#file577925line54> > > > > Formatting nit: > > > > TODO(davmclau) > > > > as opposed to: > > > > TODO (davmclau) > > > > Not a big deal, but makes grepping easier
ack. > On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/main/java/org/apache/aurora/scheduler/storage/db/DbLockStore.java, line > > 59 > > <https://reviews.apache.org/r/21132/diff/2/?file=577925#file577925line59> > > > > period at the end to make it clear that your thought wasn't cut off. ack. > On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/main/java/org/apache/aurora/scheduler/storage/db/DbLockStore.java, line > > 77 > > <https://reviews.apache.org/r/21132/diff/2/?file=577925#file577925line77> > > > > This is just as readable if named TO_ROW, and as a bonus the signature > > fits on one line. done. > On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java, line 96 > > <https://reviews.apache.org/r/21132/diff/2/?file=577926#file577926line96> > > > > s/TODO /TODO/ ack. > On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/main/java/org/apache/aurora/scheduler/storage/db/JobKeyMapper.java, > > line 29 > > <https://reviews.apache.org/r/21132/diff/2/?file=577928#file577928line29> > > > > Please punctuate sentences to make it clear words weren't accidentally > > lopped off. > > > > Here and elsewhere in this diff. ack. > On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/main/java/org/apache/aurora/scheduler/storage/db/MigrationModule.java, > > line 34 > > <https://reviews.apache.org/r/21132/diff/2/?file=577930#file577930line34> > > > > s/ / / ack. > On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/main/java/org/apache/aurora/scheduler/storage/db/views/LockRow.java, > > line 23 > > <https://reviews.apache.org/r/21132/diff/2/?file=577931#file577931line23> > > > > s/This class represents the/The/ ack. > On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/main/java/org/apache/aurora/scheduler/storage/db/views/LockRow.java, > > line 27 > > <https://reviews.apache.org/r/21132/diff/2/?file=577931#file577931line27> > > > > + Note that this must be reworked if other fields are introduced into > > LockKey. ack. > On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/main/resources/org/apache/aurora/scheduler/storage/db/JobKeyMapper.xml, > > line 19 > > <https://reviews.apache.org/r/21132/diff/2/?file=577937#file577937line19> > > > > Consider extracting a fragment for the WHERE clause (used 2x). ack. > On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/main/resources/org/apache/aurora/scheduler/storage/db/LockMapper.xml, > > line 8 > > <https://reviews.apache.org/r/21132/diff/2/?file=577938#file577938line8> > > > > +2 indent ack. > On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/main/resources/org/apache/aurora/scheduler/storage/db/LockMapper.xml, > > line 21 > > <https://reviews.apache.org/r/21132/diff/2/?file=577938#file577938line21> > > > > +2 indent ack. > On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/test/java/org/apache/aurora/scheduler/storage/db/DbLockStoreTest.java, > > line 63 > > <https://reviews.apache.org/r/21132/diff/2/?file=577940#file577940line63> > > > > s/throws RuntimeException // ack. > On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/test/java/org/apache/aurora/scheduler/storage/db/DbLockStoreTest.java, > > line 70 > > <https://reviews.apache.org/r/21132/diff/2/?file=577940#file577940line70> > > > > MutateWork.Quiet allows you to remove the Exception from your > > signature. Here and below. ack. > On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/test/java/org/apache/aurora/scheduler/storage/db/DbLockStoreTest.java, > > line 73 > > <https://reviews.apache.org/r/21132/diff/2/?file=577940#file577940line73> > > > > colon should be space-padded: > > > > for (ILock lock : locks) { > > > > here and below ack. > On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/test/java/org/apache/aurora/scheduler/storage/db/DbLockStoreTest.java, > > line 104 > > <https://reviews.apache.org/r/21132/diff/2/?file=577940#file577940line104> > > > > s/final //, applies to ~all test cases So the rule here is you don't bother applying final to variables that are only visible inside the method? > On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/test/java/org/apache/aurora/scheduler/storage/db/DbLockStoreTest.java, > > line 108 > > <https://reviews.apache.org/r/21132/diff/2/?file=577940#file577940line108> > > > > this function would help cut down a bunch of redundancy in this class: > > > > private static ILock makeLock(JobKey job) { > > ... > > } ack. Since it is useful to be able to differentiate between two locks (and we do this in at least one test), I'm going to add two methods. One which returns a Lock and one which returns an ILock. > On May 12, 2014, 8:16 p.m., Bill Farner wrote: > > src/test/java/org/apache/aurora/scheduler/storage/db/DbLockStoreTest.java, > > line 147 > > <https://reviews.apache.org/r/21132/diff/2/?file=577940#file577940line147> > > > > This points out a leaky abstraction. It's probably good to adhere to > > the existing expectations that StorageException is thrown. Simplest place > > to do this is a catch/throw in DbStorage. ack. - David ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/21132/#review42729 ----------------------------------------------------------- On May 9, 2014, 11:47 p.m., David McLaughlin wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/21132/ > ----------------------------------------------------------- > > (Updated May 9, 2014, 11:47 p.m.) > > > Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, and Bill Farner. > > > Bugs: AURORA-335 > https://issues.apache.org/jira/browse/AURORA-335 > > > Repository: aurora > > > Description > ------- > > Initial attempt at h2/DB storage implementation (LockStore only) > > > Diffs > ----- > > build.gradle 6c758f690b87eede3ae3a7c54fabac20db543840 > src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java > bf3d7a36a575bb9d64f4dd851c63fbebda1e61b8 > src/main/java/org/apache/aurora/scheduler/base/JobKeys.java > db1bec4f508c8908f212aa541fb86e041a8c471c > src/main/java/org/apache/aurora/scheduler/storage/Storage.java > 4b33fe5dd8223ff04060de0fe16b1c0759ead956 > src/main/java/org/apache/aurora/scheduler/storage/db/DbLockStore.java > PRE-CREATION > src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java > PRE-CREATION > src/main/java/org/apache/aurora/scheduler/storage/db/DbStorage.java > PRE-CREATION > src/main/java/org/apache/aurora/scheduler/storage/db/JobKeyMapper.java > PRE-CREATION > src/main/java/org/apache/aurora/scheduler/storage/db/LockMapper.java > PRE-CREATION > src/main/java/org/apache/aurora/scheduler/storage/db/MigrationModule.java > PRE-CREATION > src/main/java/org/apache/aurora/scheduler/storage/db/views/LockRow.java > PRE-CREATION > src/main/java/org/apache/aurora/scheduler/storage/log/LogStorage.java > c851eeb412b17097ff42abce2b7a42fc1c249013 > src/main/java/org/apache/aurora/scheduler/storage/log/LogStorageModule.java > 4d43f47de75a8bef06f106f563cc071df4cdf093 > src/main/java/org/apache/aurora/scheduler/storage/mem/MemLockStore.java > a6319f65bff07db66197e6476647117df6be5c9d > src/main/java/org/apache/aurora/scheduler/storage/mem/MemStorage.java > 283976ab0554dbe6700bb0d2a1b7702c969227e8 > src/main/java/org/apache/aurora/scheduler/storage/mem/MemStorageModule.java > 53923627c827131ee4bd93e5c4865d042aee501b > src/main/resources/org/apache/aurora/scheduler/storage/db/JobKeyMapper.xml > PRE-CREATION > src/main/resources/org/apache/aurora/scheduler/storage/db/LockMapper.xml > PRE-CREATION > src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql > PRE-CREATION > src/test/java/org/apache/aurora/scheduler/storage/db/DbLockStoreTest.java > PRE-CREATION > src/test/java/org/apache/aurora/scheduler/storage/log/LogStorageTest.java > 34377430268002e8e8e5bc803b409e092bb86720 > src/test/java/org/apache/aurora/scheduler/storage/mem/MemLockStoreTest.java > a5191500b2958253e14843089a15a1ffd58e6846 > > Diff: https://reviews.apache.org/r/21132/diff/ > > > Testing > ------- > > > Thanks, > > David McLaughlin > >