accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joshelser <...@git.apache.org>
Subject [GitHub] accumulo pull request #133: ACCUMULO-4388: Move location to obtain zoo sessi...
Date Fri, 22 Jul 2016 17:53:33 GMT
Github user joshelser commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/133#discussion_r71918556
  
    --- Diff: fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java ---
    @@ -225,6 +223,9 @@ public T retry() {
               if (childrenCache.containsKey(zPath)) {
                 return childrenCache.get(zPath);
               }
    +
    +          final ZooKeeper zooKeeper = getZooKeeper();
    --- End diff --
    
    Pushing this down into the ZooRunnable does have the potential for future programming
errors. Implementations could try to "be efficient" and call `getZooKeeper()` once and store
it as a member variable to the `ZooRunnable` implementation. This would negate the reconstruction
of the `ZooKeeper` instance that the `retry()` loop is doing.
    
    I think some javadoc explaining that `getZooKeeper()` could be used by the implementations
on the `abstract T run()` definition for future Accumulo devs would be very worthwhile.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message