dsmiley commented on a change in pull request #1972:
URL: https://github.com/apache/lucene-solr/pull/1972#discussion_r528452221



##########
File path: 
solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/MetricsConfiguration.java
##########
@@ -66,13 +81,36 @@ public PrometheusExporterSettings getSettings() {
     return searchConfiguration;
   }
 
-  public static MetricsConfiguration from(XmlConfigFile config) throws 
Exception {
-    Node settings = config.getNode("/config/settings", false);
+  public static MetricsConfiguration from(String path) throws Exception {
+    // See solr-core XmlConfigFile
+    final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+    try {
+      dbf.setXIncludeAware(true);
+      dbf.setNamespaceAware(true);
+    } catch (UnsupportedOperationException e) {
+      log.warn("{} XML parser doesn't support XInclude option", path);
+    }
+
+    Document document;
+    File file = new File(path);

Review comment:
       Not a problem as the config can only be specified by an admin on the 
local machine.




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to