You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by GitBox <gi...@apache.org> on 2021/07/09 12:29:29 UTC

[GitHub] [curator] Randgalt commented on a change in pull request #391: CURATOR-599 Configurable ZookeeperFactory by ZKClientConfig

Randgalt commented on a change in pull request #391:
URL: https://github.com/apache/curator/pull/391#discussion_r666912121



##########
File path: curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
##########
@@ -200,23 +232,39 @@ public QuorumVerifier getCurrentConfig()
         return (ensembleTracker != null) ? ensembleTracker.getCurrentConfig() : null;
     }
 
-    private ZookeeperFactory makeZookeeperFactory(final ZookeeperFactory actualZookeeperFactory)
+    private ZookeeperFactory makeZookeeperFactory(final ZookeeperFactory actualZookeeperFactory, ZKClientConfig zkClientConfig)
     {
+    	if (actualZookeeperFactory instanceof ConfigurableZookeeperFactory) {

Review comment:
       I'm -1 on using `instanceof`. Wouldn't it be better to add a `default` method to `ZookeeperFactory` that takes the `ZKClientConfig`? It could be optional and forward to the older versions when not present. The default version in `DefaultZookeeperFactory` would throw an exception.




-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@curator.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org