You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2009/09/26 22:20:12 UTC

Re: svn commit: r818816 - /lucene/solr/trunk/src/java/org/apache/solr/search/SolrFieldCacheMBean.java

: Fixed typos and added a little whitespace in the key name

FWIW: adding the whitespaces makes these key names inconcsistant with 
every other stat name in solr ... none of them use whitespace 

In cases where the lack of spaces makes things hard to read other mbeans 
use "_" (ie "cumulative_deletesById" in DirectUpdateHandler2)  I used that 
same convention in FieldCacheMBean (see "entires_count") but it didn't 
really seems like a good idea for "entry_#0")

I'm not saying the whitespace is bad ... just pointing out that it's 
inconsistent, and there was a reason i didn't have it in before.

: Modified:
:     lucene/solr/trunk/src/java/org/apache/solr/search/SolrFieldCacheMBean.java
: 
: Modified: lucene/solr/trunk/src/java/org/apache/solr/search/SolrFieldCacheMBean.java
: URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/search/SolrFieldCacheMBean.java?rev=818816&r1=818815&r2=818816&view=diff
: ==============================================================================
: --- lucene/solr/trunk/src/java/org/apache/solr/search/SolrFieldCacheMBean.java (original)
: +++ lucene/solr/trunk/src/java/org/apache/solr/search/SolrFieldCacheMBean.java Fri Sep 25 11:00:15 2009
: @@ -42,8 +42,8 @@
:    public String getName() { return this.getClass().getName(); }
:    public String getVersion() { return SolrCore.version; }
:    public String getDescription() {
: -    return "Provides introspection of the Lucene FiledCache, "
: -      +    "this is **NOT** a cache that is manged by Solr.";
: +    return "Provides introspection of the Lucene FieldCache, "
: +      +    "this is **NOT** a cache that is managed by Solr.";
:    }
:    public Category getCategory() { return Category.CACHE; } 
:    public String getSourceId() { 
: @@ -62,14 +62,14 @@
:      for (int i = 0; i < entries.length; i++) {
:        CacheEntry e = entries[i];
:        e.estimateSize();
: -      stats.add("entry#" + i, e.toString());
: +      stats.add("entry #" + i, e.toString());
:      }
:  
:      Insanity[] insanity = checker.checkSanity(entries);
:  
:      stats.add("insanity_count", insanity.length);
:      for (int i = 0; i < insanity.length; i++) {
: -      stats.add("insanity#" + i, insanity[i].toString());
: +      stats.add("insanity #" + i, insanity[i].toString());
:      }
:      return stats;
:    }
: 
: 



-Hoss


Re: svn commit: r818816 - /lucene/solr/trunk/src/java/org/apache/solr/search/SolrFieldCacheMBean.java

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Sun, Sep 27, 2009 at 1:50 AM, Chris Hostetter
<ho...@fucit.org>wrote:

>
> FWIW: adding the whitespaces makes these key names inconcsistant with
> every other stat name in solr ... none of them use whitespace
>
> In cases where the lack of spaces makes things hard to read other mbeans
> use "_" (ie "cumulative_deletesById" in DirectUpdateHandler2)  I used that
> same convention in FieldCacheMBean (see "entires_count") but it didn't
> really seems like a good idea for "entry_#0")
>
> I'm not saying the whitespace is bad ... just pointing out that it's
> inconsistent, and there was a reason i didn't have it in before.
>
>
Whatever makes you happy Hoss :)

I have reverted that change.

-- 
Regards,
Shalin Shekhar Mangar.