[
https://issues.apache.org/jira/browse/SOLR-11291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16176644#comment-16176644
]
Christine Poerschke commented on SOLR-11291:
--------------------------------------------
bq. ... Instead of having the {{SolrInfoBean.Group.shard}} enum choice (and a
potential additional {{SolrInfoBean.Group.replica}} enum choice) we should be
able to ... which then likely also should permit the removal altogether of the
{{SolrInfoBean.Group.shard}} enum choice.
[~omar_abdelnabi] and I looked into this further and it seems that removing of
the {{SolrInfoBean.Group.shard}} enum choice is not a possibility since
[SolrMetricManager.prepareCloudPlugins|https://github.com/apache/lucene-solr/blob/releases/lucene-solr/7.0.0/solr/core/src/java/org/apache/solr/metrics/SolrMetricManager.java#L1017]
uses the enum to decide about creating or not creating of a reporter object.
In other words, with the removal of that enum and that logic we would
unintentionally create extra SolrMetricReporter objects.
So, how could we proceed here then?
* In SOLR-11389 I delved into the code paths leading to the
{{Solr(Shard|Cluster)Reporter.setCore\[Container\]}} method calls.
* I propose to merge the two classes' {{setCore\[Container\]}} method logic
into {{init(PluginInfo,\[Solr\]Core\[Container\])}} method variants of the
existing {{init(PluginInfo)}} method.
* The SOLR-11389 change would subtly change existing behaviour, hence the
separation from the changes on this ticket here.
* After SOLR-11389 this ticket here would then add an abstract
{{SolrCoreReporter}} class _and_ an abstract {{SolrCoreContainerReporter}}
class; the {{SolrMetricManager.java}} change required would be very small:
{code}
- if (reporter instanceof SolrShardReporter) {
- ((SolrShardReporter)reporter).init(pluginInfo, solrCore);
+ if (reporter instanceof SolrCoreReporter) {
+ ((SolrCoreReporter)reporter).init(pluginInfo, solrCore);
- } else if (reporter instanceof SolrClusterReporter) {
- ((SolrClusterReporter)reporter).init(pluginInfo, coreContainer);
+ } else if (reporter instanceof SolrCoreContainerReporter) {
+ ((SolrCoreContainerReporter)reporter).init(pluginInfo, coreContainer);
} else {
reporter.init(pluginInfo);
}
{code}
How does that sound?
> Adding Solr Core Reporter
> -------------------------
>
> Key: SOLR-11291
> URL: https://issues.apache.org/jira/browse/SOLR-11291
> Project: Solr
> Issue Type: New Feature
> Components: metrics
> Reporter: Omar Abdelnabi
> Assignee: Christine Poerschke
> Priority: Minor
> Attachments: SOLR-11291.patch
>
>
> Adds a new reporter, SolrCoreReporter, which allows metrics to be reported on
> per-core basis.
> Also modifies the SolrMetricManager and SolrCoreMetricManager to take
> advantage of this new reporter.
> Adds a test/example that uses the SolrCoreReporter. Also adds randomization
> to SolrCloudReportersTest.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]