igiguere commented on code in PR #4057:
URL: https://github.com/apache/solr/pull/4057#discussion_r2747488035
##########
solr/solrj/src/java/org/apache/solr/client/solrj/request/MetricsRequest.java:
##########
@@ -36,12 +37,37 @@ public MetricsRequest() {
this(new ModifiableSolrParams());
}
+ /**
+ * @param path the HTTP path to use for this request. Supports V1
"/admin/metrics" (default) or V2
+ * "/metrics"
+ */
+ public MetricsRequest(String path) {
+ this(path, new ModifiableSolrParams());
+ }
+
/**
* @param params the Solr parameters to use for this request.
*/
public MetricsRequest(SolrParams params) {
- super(METHOD.GET, CommonParams.METRICS_PATH, SolrRequestType.ADMIN);
+ this(CommonParams.METRICS_PATH, params);
+ }
+
+ /**
+ * @param params the Solr parameters to use for this request.
+ */
+ public MetricsRequest(String path, SolrParams params) {
+ super(METHOD.GET, path, SolrRequestType.ADMIN);
+ if (!path.endsWith("/metrics")) {
+ throw new SolrException(
+ SolrException.ErrorCode.INVALID_STATE, "Request path not supported:
" + path);
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]