vyatkinv commented on code in PR #4320:
URL: https://github.com/apache/solr/pull/4320#discussion_r3177653216


##########
solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/graph/ShortestPathStream.java:
##########
@@ -70,7 +71,7 @@ public class ShortestPathStream extends TupleStream 
implements Expressible {
   private String toField;
   private int joinBatchSize;
   private int maxDepth;
-  private String solrCloud;
+  private CloudSolrClient.CloudSolrClientConnection solrConnection;

Review Comment:
   Have we already published and released something with 
`CloudSolrClientConnection`? If not, we'll change it.



##########
solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/SolrClientCache.java:
##########
@@ -76,36 +76,35 @@ public void setDefaultZKHost(String zkHost) {
     }
   }
 
-  public synchronized CloudSolrClient getCloudSolrClient(String 
connectionString) {
+  public synchronized CloudSolrClient getCloudSolrClient(
+      CloudSolrClient.CloudSolrClientConnection solrConnection) {
     ensureOpen();
-    Objects.requireNonNull(connectionString, "Connection string cannot be 
null!");
-    if (solrClients.containsKey(connectionString)) {
-      return (CloudSolrClient) solrClients.get(connectionString);
+    Objects.requireNonNull(solrConnection, "'solrConnection' cannot be null!");
+    String cacheKey = solrConnection.toString();
+    if (solrClients.containsKey(cacheKey)) {
+      return (CloudSolrClient) solrClients.get(cacheKey);
     }
     // Can only use ZK ACLs if there is a default ZK Host, and the given ZK 
host contains that
     // default.
     // Basically the ZK ACLs are assumed to be only used for the default ZK 
host,
     // thus we should only provide the ACLs to that Zookeeper instance.
     boolean canUseACLs = false;
-    var cloudClientConnection = 
CloudSolrClient.CloudSolrClientConnection.parse(connectionString);
-    if (cloudClientConnection.isZk()) {
-      String chroot = cloudClientConnection.zkChroot();
-      String zkHostNoChroot =
-          chroot != null && connectionString.endsWith(chroot)
-              ? connectionString.substring(0, connectionString.length() - 
chroot.length())
-              : connectionString;
+    if (solrConnection.isZk()) {

Review Comment:
   Have we already published and released something with 
`CloudSolrClientConnection`? If not, we'll change it.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to