[ https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shalin Shekhar Mangar updated SOLR-256: --------------------------------------- Attachment: SOLR-256.patch *Changes* * Renamed JmxManager to JmxMonitoredMap which extends a ConcurrentHashMap and overrides put, remove and clear methods * The JmxMonitoredMap is used to hold the infoRegistry (String->SolrInfoMBean) so that registration and unregistration is done automatically (which takes care of dynamic registration of request handlers, lazy loading, new SolrIndexSearchers etc.) * The SolrIndexSearcher is added with the name "searcher" to the map so that the name of the MBean doesn't change which helps setup monitoring * Instead of removing SolrIndexSearcher from the registry, it is simply replaced when SolrIndexSearcher#register method is called. This makes sure that the searcher registered with JMX is the current searcher (with a small margin of error) * Added two tests ** TestJmxMonitoredMap passes a service url syntax to JmxMonitoredMap and uses a mocked SolrInfoMBean to test the put, remove and clear methods. Note that this test uses a hard-coded port number -- unavailability of this port will fail the test. ** TestJmxIntegration uses the AbstractSolrTestCase with the platform MBeanServer to test availability of Solr MBeans and tests for its updation by adding a document. > 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, 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.