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

Ryan Josal commented on SOLR-3083:
----------------------------------

I applied this patch to Solr 3.6 - I noticed it missed the "hitratio" mbean 
attribute from [Fast]LRUCache.  Looks like that attribute is actually 
calculated into a String and so would have to be fixed by itself.  I'm not sure 
if this is still present in the latest builds though.
                
> all JMX Mbeans are identified as java.lang.String even if numeric
> -----------------------------------------------------------------
>
>                 Key: SOLR-3083
>                 URL: https://issues.apache.org/jira/browse/SOLR-3083
>             Project: Solr
>          Issue Type: Bug
>          Components: SearchComponents - other
>    Affects Versions: 4.0-ALPHA
>            Reporter: Tagged Siteops
>            Assignee: Ryan McKinley
>            Priority: Minor
>              Labels: interoperability,, jmx, monitoring, statistics
>             Fix For: 4.0-ALPHA
>
>         Attachments: Screen shot 2012-01-31 at 2.19.06 PM.png, 
> SOLR-3083-Made-JMX-Mbean-information-use-numeric-typ.patch
>
>
> When trying to monitor our Solr instances with JMXtrans 
> (https://github.com/lookfirst/jmxtrans), we discovered that all the Mbeans 
> were identifying themselves as java.lang.String.   This breaks the 
> GangliaWriter in JMXtrans because the software decides it's a string instead 
> of a numeric values and you can't graph a string.   Other software we are 
> monitoring with JMXtrans (e.g. Kafka) correctly identify their numeric values 
> as numbers (doubles in this case).
> For example, avgTimePerRequest in Solr is identified as a string which makes 
> no sense.  This behavior makes Solr less interoperable with the rest of the 
> Java ecosystem.
> The problem code is in JmxMonitoredMap.java
> NamedList dynamicStats = infoBean.getStatistics();
> if (dynamicStats != null) {
>   for (int i = 0; i < dynamicStats.size(); i++) {
>     String name = dynamicStats.getName(i);
>     if (!staticStats.contains(name))
>       attrInfoList.add(new MBeanAttributeInfo(dynamicStats.getName(i),
>               String.class.getName(), null, true, false, false));
>   }
> I will try to attach a screenshot. 
> Thanks for Solr!  We use the heck out of it, it's awesome.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to