[
https://issues.apache.org/jira/browse/SOLR-17136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18044517#comment-18044517
]
Isabelle Giguere edited comment on SOLR-17136 at 12/11/25 8:57 PM:
-------------------------------------------------------------------
These uses of GenericSolrRequest all call "/admin/info/system", and could be
replaced by a "SystemInfoRequest/SystemInfoResponse" implementation:
* org.apache.solr.cli.CLIUtils.getZkHost(CommandLine)
* org.apache.solr.cli.CLIUtils.isCloudMode(SolrClient)
* org.apache.solr.cli.CreateTool.createCore(CommandLine, SolrClient)
* org.apache.solr.cli.HealthcheckTool.runCloudTool(CloudSolrClient, CommandLine)
* org.apache.solr.cli.StatusTool.getStatus(SolrClient)
* org.apache.solr.cli.RepositoryManager.addKey(byte[], String)
*
org.apache.solr.client.solrj.io.sql.DatabaseMetaDataImpl.getDatabaseProductVersion()
These 3 methods call "/admin/metrics", so maybe a
"MetricsRequest/MetricsResponse" implementation:
* org.apache.solr.cloud.api.collections.SplitShardCmd.checkDiskSpace(String,
String, Replica, SplitMethod, SolrCloudManager)
*
org.apache.solr.client.solrj.impl.NodeValueFetcher.getRemoteMetricsFromTags(Set<String>,
RemoteCallCtx)
*
org.apache.solr.client.solrj.impl.SolrClientNodeStateProvider.processMetricStream(String,
RemoteCallCtx, Set<String>, Consumer<String>)
Otherwise, each use of GenericSolrRequest calls a different path, therefore
receives a different response. So GenericSolrRequest is probably the best
solution in these cases.
was (Author: igiguere):
These uses of GenericSolrRequest all call "/admin/info/system", and could be
replaced by a "SystemInfoRequest<SystemInfoResponse>" implementation:
* org.apache.solr.cli.CLIUtils.getZkHost(CommandLine)
* org.apache.solr.cli.CLIUtils.isCloudMode(SolrClient)
* org.apache.solr.cli.CreateTool.createCore(CommandLine, SolrClient)
* org.apache.solr.cli.HealthcheckTool.runCloudTool(CloudSolrClient, CommandLine)
* org.apache.solr.cli.StatusTool.getStatus(SolrClient)
* org.apache.solr.cli.RepositoryManager.addKey(byte[], String)
*
org.apache.solr.client.solrj.io.sql.DatabaseMetaDataImpl.getDatabaseProductVersion()
These 3 methods call "/admin/metrics", so maybe a
"MetricsRequest<MetricsResponse>" implementation:
* org.apache.solr.cloud.api.collections.SplitShardCmd.checkDiskSpace(String,
String, Replica, SplitMethod, SolrCloudManager)
*
org.apache.solr.client.solrj.impl.NodeValueFetcher.getRemoteMetricsFromTags(Set<String>,
RemoteCallCtx)
*
org.apache.solr.client.solrj.impl.SolrClientNodeStateProvider.processMetricStream(String,
RemoteCallCtx, Set<String>, Consumer<String>)
Otherwise, each use of GenericSolrRequest calls a different path, therefore
receives a different response. So GenericSolrRequest is probably the best
solution in these cases.
> Replace most uses of GenericSolrRequest in Solr code
> ----------------------------------------------------
>
> Key: SOLR-17136
> URL: https://issues.apache.org/jira/browse/SOLR-17136
> Project: Solr
> Issue Type: Improvement
> Components: SolrJ
> Affects Versions: 10.0
> Reporter: Jason Gerlowski
> Priority: Major
> Labels: newdev
>
> GenericSolrRequest, a SolrRequest implementation that can be used to make
> requests to arbitrary endpoints via a specified HTTP method and path, is used
> in 50-60 places through Solr's codebase.
> In most of these places, it's used as a "last resort" because SolrJ doesn't
> offer a more specific SolrRequest implementation that covers the API the
> developer wanted to use.
> Where this is the case, we should fill these gaps in SolrJ with new
> SolrRequest implementations and remove the usage of GSR.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]