> On máj. 10, 2017, 10:37 de, András Piros wrote: > > core/src/main/java/org/apache/oozie/executor/jpa/QueryExecutor.java > > Lines 57 (patched) > > <https://reviews.apache.org/r/59134/diff/1/?file=1713613#file1713613line58> > > > > `Retryer` is [thread > > safe](https://github.com/rholder/guava-retrying/issues/35), so `retryer` > > could be `private static final`. > > > > Also, `RetryerFactory.create()` could be called for more clarity, and > > less code duplication.
Unfortunately the call() method inside Retryer cannot be parameterized with a type. You have to instantiate Retryer if you want to call it with different types (eg Retryer<String> or Retryer<Integer>). We can use a raw-type then cast it, but that's ugly and I don't like it. Since it's a small, lightweight object, I'm not concerned about creating it every time. > On máj. 10, 2017, 10:37 de, András Piros wrote: > > core/src/main/java/org/apache/oozie/util/db/RetryHandlerFactory.java > > Lines 39 (patched) > > <https://reviews.apache.org/r/59134/diff/1/?file=1713615#file1713615line39> > > > > I'd have a `TRACE` level log also for any case, not just when an > > `Exception` happens. > > > > And I'd also log how many attempts yet to retry, and how many seconds > > till next attempt, as follows: > > ``` > > Attempt #4 of 10 failed, retrying in 15 seconds. > > ``` Logging extra stuff makes sense. Displaying how much the method blocks before retrying again is not that straightforward because it's calculated by the wait strategy and that's not accessible at this point. - Peter ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/59134/#review174437 ----------------------------------------------------------- On máj. 10, 2017, 9:23 de, Peter Bacsko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/59134/ > ----------------------------------------------------------- > > (Updated máj. 10, 2017, 9:23 de) > > > Review request for oozie, András Piros and Robert Kanter. > > > Repository: oozie-git > > > Description > ------- > > https://issues.apache.org/jira/browse/OOZIE-2854 > > > Diffs > ----- > > core/pom.xml 14aa034 > core/src/main/java/org/apache/oozie/executor/jpa/QueryExecutor.java 8d94c23 > core/src/main/java/org/apache/oozie/service/JPAService.java 028381d > core/src/main/java/org/apache/oozie/util/db/RetryHandlerFactory.java > PRE-CREATION > core/src/main/resources/oozie-default.xml e7a48a0 > > > Diff: https://reviews.apache.org/r/59134/diff/1/ > > > Testing > ------- > > Tested on a 3-node cluster. MySQL was killed/restared. The workflow execution > was not disrupted. > > > Thanks, > > Peter Bacsko > >
