This is an automated email from the ASF dual-hosted git repository.
epugh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new c3922dc4835 SOLR-18375: remove the deprecated zkHost-based
StreamFactory connection API (#4755)
c3922dc4835 is described below
commit c3922dc483575384ded4a6366120862d4d8a1796
Author: Serhiy Bzhezytskyy <[email protected]>
AuthorDate: Wed Aug 19 22:25:45 2026 +0300
SOLR-18375: remove the deprecated zkHost-based StreamFactory connection API
(#4755)
---
...8375-remove-zkhost-streaming-connection-api.yml | 8 ++++
.../client/solrj/io/stream/expr/StreamFactory.java | 45 ----------------------
2 files changed, 8 insertions(+), 45 deletions(-)
diff --git
a/changelog/unreleased/SOLR-18375-remove-zkhost-streaming-connection-api.yml
b/changelog/unreleased/SOLR-18375-remove-zkhost-streaming-connection-api.yml
new file mode 100644
index 00000000000..83a9b52cc29
--- /dev/null
+++ b/changelog/unreleased/SOLR-18375-remove-zkhost-streaming-connection-api.yml
@@ -0,0 +1,8 @@
+# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc
+title: Removed the deprecated zkHost-based StreamFactory connection API
(withCollectionZkHost, withDefaultZkHost, getDefaultZkHost,
getCollectionZkHost); use the CloudSolrClientConnection-based
withCollectionUseThisConnection, withDefaultSolrConnection,
getDefaultSolrConnection and buildSolrConnection instead.
+type: removed
+authors:
+ - name: Serhiy Bzhezytskyy
+links:
+ - name: SOLR-18375
+ url: https://issues.apache.org/jira/browse/SOLR-18375
diff --git
a/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamFactory.java
b/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamFactory.java
index c1b349f5f99..d3b6d3a5f2e 100644
---
a/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamFactory.java
+++
b/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamFactory.java
@@ -60,16 +60,6 @@ public class StreamFactory implements Serializable {
collectionSolrConnection = new HashMap<>();
}
- /**
- * @deprecated use {@link #withCollectionUseThisConnection(String,
- * CloudSolrClient.CloudSolrClientConnection)}
- */
- @Deprecated
- public StreamFactory withCollectionZkHost(String collectionName, String
zkHost) {
- var solrConnection = zkHostToSolrConnection(zkHost);
- return withCollectionUseThisConnection(collectionName, solrConnection);
- }
-
/** If an expressions references this collection, then use the specified
Solr connection. */
public StreamFactory withCollectionUseThisConnection(
String collectionName, CloudSolrClient.CloudSolrClientConnection
solrConnection) {
@@ -82,15 +72,6 @@ public class StreamFactory implements Serializable {
return defaultCollection;
}
- /**
- * @deprecated use {@link
#withDefaultSolrConnection(CloudSolrClient.CloudSolrClientConnection)}
- */
- @Deprecated
- public StreamFactory withDefaultZkHost(String zkHost) {
- var solrConnection = zkHostToSolrConnection(zkHost);
- return withDefaultSolrConnection(solrConnection);
- }
-
public StreamFactory withDefaultSolrConnection(
CloudSolrClient.CloudSolrClientConnection solrConnection) {
this.defaultSolrConnection = solrConnection;
@@ -135,16 +116,6 @@ public class StreamFactory implements Serializable {
return solrConnection;
}
- private static CloudSolrClient.CloudSolrClientConnection
zkHostToSolrConnection(String zkHost) {
- var solrConnection =
CloudSolrClient.CloudSolrClientConnection.parse(zkHost);
- if (!solrConnection.isZookeeper()) {
- throw new IllegalArgumentException(
- String.format(
- Locale.ROOT, "Expected ZooKeeper connection string, but got:
'%s'.", zkHost));
- }
- return solrConnection;
- }
-
@Override
public Object clone() {
// Shallow copy
@@ -163,26 +134,10 @@ public class StreamFactory implements Serializable {
return this.defaultSort;
}
- /**
- * @deprecated use {@link #buildSolrConnection(StreamExpression, String)} ()}
- */
- @Deprecated
- public String getDefaultZkHost() {
- return getDefaultSolrConnection().toString();
- }
-
public CloudSolrClient.CloudSolrClientConnection getDefaultSolrConnection() {
return this.defaultSolrConnection;
}
- /**
- * @deprecated use {@link #buildSolrConnection(StreamExpression, String)}
- */
- @Deprecated
- public String getCollectionZkHost(String collectionName) {
- return getConnectionForCollection(collectionName).toString();
- }
-
/**
* Gets a SolrConnection using collection-to-connection configuration.
Defaults to {@link
* #getDefaultSolrConnection()}