jkosh44 commented on a change in pull request #1087: Add Oracle count 
functionality
URL: https://github.com/apache/fluo/pull/1087#discussion_r387850508
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/fluo/core/client/FluoAdminImpl.java
 ##########
 @@ -516,6 +517,20 @@ public boolean oracleExists() {
     return oracleExists(getAppCurator());
   }
 
+  public int numOracles() {
 
 Review comment:
   @keith-turner looking at the `oracleExists` method I wonder if we should 
switch `!curator.getChildren().forPath(ZookeeperPath.ORACLE_SERVER).isEmpty()` 
with something like 
   `(new LeaderLatch(curator, 
ZookeeperPath.ORACLE_SERVER)).getParticipants().size() > 0`. 
   The current implementation is probably right but it does rely on the 
LeaderLatch implementation and uses the LeaderLatch's path which Curator 
advises against (https://cwiki.apache.org/confluence/display/CURATOR/TN7). 
They're probably more concerned about creating and deleting nodes so it's 
probably not a big deal, but may be slightly safer.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to