[ 
https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607189#action_12607189
 ] 

Shalin Shekhar Mangar commented on SOLR-256:
--------------------------------------------

I'm taking a look again at this feature. Hope to have a patch ready soon.

A few issues I found was that apart from SolrCore.registerRequestHandler, the 
SolrIndexSearcher is also dynamic and needs to be handled. I also found other 
issues like SolrIndexSearcher puts the cache objects into the InfoRegistry map 
but that they are never removed from the map. The SolrCore#closeSearcher calls:
{code}infoRegistry.remove("currentSearcher");{code} but the SolrIndexSearcher 
adds/removes itself using its name. I think we should use "currentSearcher" 
itself as the key instead of name because the name changes after commits and 
that would make it very difficult to setup monitoring for SolrIndexSearcher 
using JMX.

To handle dynamic registration and unregistration, I think we should use the 
approach that Sharad used in his original patch which was to create a class 
which extends Map and overrides the put and remove methods. That will make sure 
that SolrInfoMBeans are automatically registered and unregistered and will keep 
the JMX related code in one place.

> Stats via JMX
> -------------
>
>                 Key: SOLR-256
>                 URL: https://issues.apache.org/jira/browse/SOLR-256
>             Project: Solr
>          Issue Type: New Feature
>          Components: search, update
>            Reporter: Sharad Agarwal
>            Assignee: Hoss Man
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: jmx.patch, jmx.patch, jmx.patch, jmx.patch, jmx.patch, 
> SOLR-256.patch, SOLR-256.patch, SOLR-256.patch, SOLR-256.patch, SOLR-256.patch
>
>
> This patch adds JMX capability to get statistics from all the SolrInfoMBean.
> The implementation is done such a way to minimize code changes. 
> In SolrInfoRegistry, I have overloaded Map's  put and remove methods to 
> register and unregister SolrInfoMBean in MBeanServer. 
> Later on, I am planning to use register and unregister methods in 
> SolrInfoRegistry and removing getRegistry() method (Hiding the map instance 
> to other classes)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to