mkazia 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_r397384797
##########
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:
@bbende thanks for the review. Yes you are right we should move it to else
statement in 274. You can make the change as part of the merge. Thanks!
----------------------------------------------------------------
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