dsmiley commented on a change in pull request #1384: Remove 
CurrentCoreDescriptorProvider
URL: https://github.com/apache/lucene-solr/pull/1384#discussion_r399365014
 
 

 ##########
 File path: solr/core/src/java/org/apache/solr/core/ZkContainer.java
 ##########
 @@ -112,20 +111,14 @@ public void initZooKeeper(final CoreContainer cc, 
CloudConfig config) {
           throw new ZooKeeperException(SolrException.ErrorCode.SERVER_ERROR,
               "A chroot was specified in ZkHost but the znode doesn't exist. " 
+ zookeeperHost);
         }
-        ZkController zkController = new ZkController(cc, zookeeperHost, 
zkClientConnectTimeout, config,
-            new CurrentCoreDescriptorProvider() {
-
-              @Override
-              public List<CoreDescriptor> getCurrentDescriptors() {
-                List<CoreDescriptor> descriptors = new ArrayList<>(
-                    cc.getLoadedCoreNames().size());
-                Collection<SolrCore> cores = cc.getCores();
-                for (SolrCore core : cores) {
-                  descriptors.add(core.getCoreDescriptor());
-                }
-                return descriptors;
-              }
-            });
+        ZkController zkController = new ZkController(cc, zookeeperHost, 
zkClientConnectTimeout, config, () -> {
 
 Review comment:
   I'd prefer that you declare that last parameter as a local typed variable 
and then pass it in.  This makes it clearer what it is that is being passed to 
ZkController's c'tor.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to