You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/01/20 13:33:07 UTC

[GitHub] [solr] janhoy opened a new pull request #547: SOLR-15922 SolrExporterIntegrationTest fails on Java 17

janhoy opened a new pull request #547:
URL: https://github.com/apache/solr/pull/547


   https://issues.apache.org/jira/browse/SOLR-15922
   


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] janhoy commented on a change in pull request #547: SOLR-15922 SolrExporterIntegrationTest fails on Java 17

Posted by GitBox <gi...@apache.org>.
janhoy commented on a change in pull request #547:
URL: https://github.com/apache/solr/pull/547#discussion_r788786659



##########
File path: solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/utils/Helpers.java
##########
@@ -44,4 +45,15 @@ public static void indexAllDocs(SolrClient client) throws IOException, SolrServe
     }
     client.commit(PrometheusExporterTestBase.COLLECTION);
   }
+
+  // Parses a prometheus line into key and value, e.g.
+  //   solr_exporter_duration_seconds_bucket{le="1.0",} 1.0
+  //   first="solr_exporter_duration_seconds_bucket{le="1.0",}," second=1.0
+  public static Pair<String, Double> parseMetricsLine(String line) {
+    int spaceIdx = line.lastIndexOf(" ");
+    if (spaceIdx == -1) {
+      throw new RuntimeException("Failed parsing metrics line, must contain a space");

Review comment:
       Fixed




-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] janhoy merged pull request #547: SOLR-15922 SolrExporterIntegrationTest fails on Java 17

Posted by GitBox <gi...@apache.org>.
janhoy merged pull request #547:
URL: https://github.com/apache/solr/pull/547


   


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] madrob commented on a change in pull request #547: SOLR-15922 SolrExporterIntegrationTest fails on Java 17

Posted by GitBox <gi...@apache.org>.
madrob commented on a change in pull request #547:
URL: https://github.com/apache/solr/pull/547#discussion_r788777295



##########
File path: solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/utils/Helpers.java
##########
@@ -44,4 +45,15 @@ public static void indexAllDocs(SolrClient client) throws IOException, SolrServe
     }
     client.commit(PrometheusExporterTestBase.COLLECTION);
   }
+
+  // Parses a prometheus line into key and value, e.g.
+  //   solr_exporter_duration_seconds_bucket{le="1.0",} 1.0
+  //   first="solr_exporter_duration_seconds_bucket{le="1.0",}," second=1.0
+  public static Pair<String, Double> parseMetricsLine(String line) {
+    int spaceIdx = line.lastIndexOf(" ");
+    if (spaceIdx == -1) {
+      throw new RuntimeException("Failed parsing metrics line, must contain a space");

Review comment:
       nit: I think this could be an illegal argument exception to be more specific and also include the line that we failed to parse.




-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org