You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/03/24 18:38:42 UTC

[GitHub] [nifi] bbende commented on a change in pull request #4152: NIFI-7269 Upgrade solrj version to 8 in nifi-solr-processors

bbende commented on a change in pull request #4152: NIFI-7269 Upgrade solrj version to 8 in nifi-solr-processors
URL: https://github.com/apache/nifi/pull/4152#discussion_r397379074
 
 

 ##########
 File path: nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/main/java/org/apache/nifi/processors/solr/SolrUtils.java
 ##########
 @@ -244,9 +246,17 @@ public static SolrClient createSolrClient(final PropertyContext context, final S
         params.set(HttpClientUtil.PROP_MAX_CONNECTIONS, maxConnections);
         params.set(HttpClientUtil.PROP_MAX_CONNECTIONS_PER_HOST, maxConnectionsPerHost);
 
+        // CloudSolrClient.Builder now requires a List of ZK addresses and znode for solr as separate parameters
+        String zk[] = solrLocation.split("/");
+        final List zkList = Arrays.asList(zk[0].split(","));
+        String zkRoot = "/";
+        if (zk.length > 1 && ! zk[1].isEmpty()) {
+            zkRoot += zk[1];
+        }
+
 
 Review comment:
   I think we should move this ZK parsing block inside the else statement on line 274 where we know the Solr Type is CLOUD, just to be on the safer side since we wouldn't need to do this parsing when the type is STANDARD.
   
   If you agree I can make this change as part of the merge.

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


With regards,
Apache Git Services