[
https://issues.apache.org/jira/browse/SOLR-6766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14219623#comment-14219623
]
Mike Drob commented on SOLR-6766:
---------------------------------
[[email protected]] - Continuing discussion from SOLR-6752...
{quote}
I fired up Solr on HDFS with JMX enabled and took a look at the exported mbeans
with JConsole. I did not see anything for the block cache.
I'd look at how SolrResourceLoader adds the plugins that it loads to the
JmxMonitoredMap.
{quote}
Been digging deeper into this... metrics are tracked on a per-core basis. Each
core has an {{infoRegistry}} that is populated in the constructor either
directly or from beans that the SolrResourceLoader had previously created. So
instead of creating a new Metrics object directly, we will need to create one
through the {{SolrResourceLoader.newInstance()}}, which is I think what you
were suggesting.
The trick here is that we need to create the bean before the {{SolrCore}}
finishes constructing, but after the {{HdfsDirectoryFactory}} (HDF) exists to
make sure that it gets registered in time. So basically, in the no-arg HDF
constructor is our only option. The problem is that HDF (or any implementation
of {{DirectoryFactory}}) is not aware of the resource loader or even a
{{SolrConfig}} to be able to acquire a reference to the resource loader. I'm
hesitant to add a {{setResourceLoader}} method or similar on
{{DirectoryFactory}} because that is starting to feel very intrusive, but I
also don't see another way to plumb this through.
> Switch o.a.s.store.blockcache.Metrics to use JMX
> ------------------------------------------------
>
> Key: SOLR-6766
> URL: https://issues.apache.org/jira/browse/SOLR-6766
> Project: Solr
> Issue Type: Bug
> Reporter: Mike Drob
> Labels: metrics
>
> The Metrics class currently reports to hadoop metrics, but it would be better
> to report to JMX.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]