----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52492/#review153821 -----------------------------------------------------------
samza-rest/src/main/java/org/apache/samza/monitor/LocalStoreMonitor.java (line 72) <https://reviews.apache.org/r/52492/#comment223302> nit. It is beeter to be more precise what the exception is thrown. samza-rest/src/main/java/org/apache/samza/monitor/LocalStoreMonitor.java (line 73) <https://reviews.apache.org/r/52492/#comment223293> I am not sure if we need guava for anything else, but is it worth bringing it in for this check ? IMHO, a regulare if() throw Exception, should suffice. samza-rest/src/main/java/org/apache/samza/monitor/LocalStoreMonitor.java (line 92) <https://reviews.apache.org/r/52492/#comment223304> nit. should we check the return value here? samza-rest/src/main/java/org/apache/samza/monitor/LocalStoreMonitor.java (line 95) <https://reviews.apache.org/r/52492/#comment223305> nit. I think we usually use name LOG. samza-rest/src/main/java/org/apache/samza/monitor/LocalStoreMonitor.java (line 97) <https://reviews.apache.org/r/52492/#comment223306> '.'->':' samza-rest/src/main/java/org/apache/samza/monitor/LocalStoreMonitor.java (line 104) <https://reviews.apache.org/r/52492/#comment223307> InetAddress.getLocalHost().getHostName() should be run outside of the loops. samza-rest/src/main/java/org/apache/samza/monitor/LocalStoreMonitor.java (line 107) <https://reviews.apache.org/r/52492/#comment223308> this should be INFO level. samza-rest/src/main/java/org/apache/samza/monitor/LocalStoreMonitor.java (line 118) <https://reviews.apache.org/r/52492/#comment223312> 'an' -> 'this' samza-rest/src/main/java/org/apache/samza/monitor/LocalStoreMonitor.java (line 124) <https://reviews.apache.org/r/52492/#comment223311> please add comment on the format of the name. samza-rest/src/main/java/org/apache/samza/monitor/LocalStoreMonitor.java (line 158) <https://reviews.apache.org/r/52492/#comment223690> nit. Do you need to handle any exceptions here? samza-rest/src/main/java/org/apache/samza/monitor/LocalStoreMonitor.java (line 166) <https://reviews.apache.org/r/52492/#comment223704> Seems like this class may be usefull elsewhere. Is it worth moving it to a top-level class? samza-rest/src/main/java/org/apache/samza/monitor/LocalStoreMonitorConfig.java (line 40) <https://reviews.apache.org/r/52492/#comment223697> can we add a check for it and give a warning? - Boris Shkolnik On Oct. 26, 2016, 12:41 a.m., Shanthoosh Venkataraman wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/52492/ > ----------------------------------------------------------- > > (Updated Oct. 26, 2016, 12:41 a.m.) > > > Review request for samza. > > > Repository: samza > > > Description > ------- > > This patch contains the samza-rest monitor that periodically cleans up the > stale local stores of dead jobs/tasks. It performs the store deletion in two > phases. Initially it deletes the offset file in the local task stores if the > following condition is true. ((jobIsNotRunning || preferedHost != nmHost) && > offsetFilelastModifiedTime is greater than deleteRetention). During the > subsequent run, it deletes the local task stores if it does not contain > offset file. Please refer to the design doc of SAMZA-656 > (https://issues.apache.org/jira/secure/attachment/12828083/DESIGN-SAMZA-656.pdf) > for more details. > > > Diffs > ----- > > build.gradle 2bea27b75288d3103178bc3762b9556f6e69cdd1 > samza-rest/src/main/java/org/apache/samza/monitor/LocalStoreMonitor.java > PRE-CREATION > > samza-rest/src/main/java/org/apache/samza/monitor/LocalStoreMonitorConfig.java > PRE-CREATION > > samza-rest/src/main/java/org/apache/samza/monitor/LocalStoreMonitorFactory.java > PRE-CREATION > > samza-rest/src/main/java/org/apache/samza/rest/resources/ResourceConstants.java > PRE-CREATION > > samza-rest/src/test/java/org/apache/samza/monitor/TestLocalStoreMonitor.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/52492/diff/ > > > Testing > ------- > > Unit testing and manual testing are done to verify the functionality. > > > Thanks, > > Shanthoosh Venkataraman > >