Apache Solr open-source search software
Switch to CloudSolrClient builder
Kevin Risden983ebba65d04
diff --git a/solr/core/src/java/org/apache/solr/handler/sql/SolrSchema.java b/solr/core/src/java/org/apache/solr/handler/sql/SolrSchema.javaindex 892e93f1bbd..1b94e4ce62d 100644--- a/solr/core/src/java/org/apache/solr/handler/sql/SolrSchema.java+++ b/solr/core/src/java/org/apache/solr/handler/sql/SolrSchema.java@@ -44,7 +44,7 @@ class SolrSchema extends AbstractSchema {@Overrideprotected Map<String, Table> getTableMap() {String zk = this.properties.getProperty("zk");- try(CloudSolrClient cloudSolrClient = new CloudSolrClient(zk)) {+ try(CloudSolrClient cloudSolrClient = new CloudSolrClient.Builder().withZkHost(zk).build()) {cloudSolrClient.connect();Set<String> collections = cloudSolrClient.getZkStateReader().getClusterState().getCollections();@@ -60,7 +60,7 @@ class SolrSchema extends AbstractSchema {private Map<String, LukeResponse.FieldInfo> getFieldInfo(String collection) {String zk = this.properties.getProperty("zk");- try(CloudSolrClient cloudSolrClient = new CloudSolrClient(zk)) {+ try(CloudSolrClient cloudSolrClient = new CloudSolrClient.Builder().withZkHost(zk).build()) {cloudSolrClient.connect();LukeRequest lukeRequest = new LukeRequest();lukeRequest.setNumTerms(0);