diff --git a/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/collector/SolrCollector.java b/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/collector/SolrCollector.java index 8a64b24bfc5..3d3bc98163a 100644 --- a/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/collector/SolrCollector.java +++ b/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/collector/SolrCollector.java @@ -18,7 +18,7 @@ package org.apache.solr.prometheus.collector; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.solr.core.Config; +import org.apache.solr.core.XmlConfigFile; import org.apache.solr.prometheus.scraper.SolrScraper; import io.prometheus.client.Collector; import org.apache.solr.client.solrj.SolrClient; @@ -57,7 +57,7 @@ public class SolrCollector extends Collector implements Collector.Describable { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); private SolrClient solrClient; - private Config config; + private XmlConfigFile config; private int numThreads; private ExecutorService executorService; private static ObjectMapper om = new ObjectMapper(); @@ -65,7 +65,7 @@ public class SolrCollector extends Collector implements Collector.Describable { /** * Constructor. */ - public SolrCollector(SolrClient solrClient, Config config, int numThreads) { + public SolrCollector(SolrClient solrClient, XmlConfigFile config, int numThreads) { this.solrClient = solrClient; this.config = config; this.numThreads = numThreads; diff --git a/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/SolrExporter.java b/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/SolrExporter.java index 6eae66c5b60..764942739a0 100644 --- a/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/SolrExporter.java +++ b/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/SolrExporter.java @@ -29,7 +29,7 @@ import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.client.solrj.impl.CloudSolrClient; import org.apache.solr.client.solrj.impl.HttpSolrClient; import org.apache.solr.client.solrj.impl.NoOpResponseParser; -import org.apache.solr.core.Config; +import org.apache.solr.core.XmlConfigFile; import org.apache.solr.core.SolrResourceLoader; import org.apache.solr.prometheus.collector.SolrCollector; import org.slf4j.Logger; @@ -84,7 +84,7 @@ public class SolrExporter { private int port; private SolrClient solrClient; - private Config config; + private XmlConfigFile config; private int numThreads; CollectorRegistry registry = new CollectorRegistry(); @@ -115,7 +115,7 @@ public class SolrExporter { this.port = port; this.solrClient = solrClient; - this.config = new Config(this.loader, configPath.getFileName().toString()); + this.config = new XmlConfigFile(this.loader, configPath.getFileName().toString()); this.numThreads = numThreads; } diff --git a/solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/collector/SolrCollectorTest.java b/solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/collector/SolrCollectorTest.java index 676f8abac9a..b69a8a10d22 100644 --- a/solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/collector/SolrCollectorTest.java +++ b/solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/collector/SolrCollectorTest.java @@ -16,8 +16,8 @@ */ package org.apache.solr.prometheus.collector; -import org.apache.solr.core.Config; import org.apache.solr.core.SolrResourceLoader; +import org.apache.solr.core.XmlConfigFile; import org.apache.solr.prometheus.exporter.SolrExporter; import org.apache.solr.prometheus.exporter.SolrExporterTestBase; import io.prometheus.client.CollectorRegistry; @@ -52,7 +52,7 @@ public class SolrCollectorTest extends SolrExporterTestBase { public void testSolrCollector() throws Exception { String name = "solr-exporter-config.xml"; SolrResourceLoader loader = new SolrResourceLoader(getFile("conf/").toPath()); - Config config = new Config(loader, name); + XmlConfigFile config = new XmlConfigFile(loader, name); CloudSolrClient cloudSolrClient = cluster.getSolrClient(); @@ -65,7 +65,7 @@ public class SolrCollectorTest extends SolrExporterTestBase { public void testCollect() throws Exception { String name = "solr-exporter-config.xml"; SolrResourceLoader loader = new SolrResourceLoader(getFile("conf/").toPath()); - Config config = new Config(loader, name); + XmlConfigFile config = new XmlConfigFile(loader, name); CloudSolrClient cloudSolrClient = cluster.getSolrClient();