lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (SOLR-1101) expose extra statistics like slow queries
Date Wed, 08 Apr 2009 00:48:13 GMT

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

Hoss Man edited comment on SOLR-1101 at 4/7/09 5:47 PM:
--------------------------------------------------------

Noble: I presume by "There is a new interface which can be implemented by components" you're
suggesting that this StatsDetails could be a marker interface implemented by things that already
implement SolrInfoMBean, and if stats.jsp noticed something implementing this interface, then
it would call getDetailsInfo() and for each name returned include a link to a future call
of something like "stats.jsp?obj=foo&detail=name" which would call getDetails(name)

is that what you had in mind?

Another thing to consider is that stats has always displayed the toString() of the values
in the getStatistics() NamedList ... perhaps a marker interface could be added to those objects,
indicating when the toString behavior should be overridden and replaced with the ability to
drill down...

{code}
public interface DetailedStats {
   public String getSummary();
   public NamedList getDetails();
}
public class DetailedStatsNamedList extends NamedList implements DetailedStats {
   public DetailedStatsNamedList(String summary) { this.summary = summary; }
   public NamedList getDetails() return this;
   // ... hashCode & equals & toString
}
...
// stats.jsp would print getSummary() as a link to unwrapping getDetails()
...
{code}

This would have the advantage of allowing deeper and deeper levels of details to be exposed
if the stats.jsp code was written generally enough.


      was (Author: hossman):
    Noble: I presume by "There is a new interface which can be implemented by components"
you're suggesting that this StatsDetails could be a marker interface implemented by things
that already implement SolrInfoMBean, and if stats.jsp noticed something implementing this
interface, then it would call getDetailsInfo() and for each name returned include a link to
a future call of something like "stats.jsp?obj=foo&detail=name" which would call getDetails(name)

is that what you had in mind?

Another thing to consider is that stats has always displayed the toString() of the values
in the getStatistics() NamedList ... perhaps a marker interface could be added to those objects,
indicating when the toString behavior should be overridden and replaced with the ability to
drill down...

{code}
public interface DetailedStats {
   public String getSummary();
   public NamedList getDetails();
}
public class DetailedStatsNamedList extends NamedList implements DetailedStats {
   public DetailedStatsNamedList(String summary) { this.summary = summary; }
   public NamedList getDetails() return this;
   // ... hashCode & equals & toString
}
...
// stats.jsp



{code}
  
> expose extra statistics like slow queries 
> ------------------------------------------
>
>                 Key: SOLR-1101
>                 URL: https://issues.apache.org/jira/browse/SOLR-1101
>             Project: Solr
>          Issue Type: New Feature
>          Components: web gui
>            Reporter: Noble Paul
>             Fix For: 1.5
>
>
> Solr Objects may want to expose extra information for diagnostics etc. These information
can be large and we may not wish to show it in the stats page which can make it unwieldly.
I propose an extension of the stats itself which can be shown separately. 
> I wish to implement slow queries as a part of this.  There is a new interface which can
be implemented by components
> {code:java}
> public interface StatsDetails {
> public interface StatsDetails {
>   /**The details info is a Map of details name versus description. The details name must
>    * return the details when the getDetails() method is invoked on the same object.
>    * @return a map of details name vs the description. the description may be used in
a link text
>    */
>   public Map<String ,String> getDetailsInfo();
>   /**The details key should be known for this Object . 
>    * This key will may be obj=tained by invoking getDetailsInfo() 
>    * 
>    * @param detailsCommand
>    * @return
>    */
>   public NamedList getDetails(String detailsCommand);
> }
> {code}
> The stats.jsp can be enhanced to show these extra links .

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


Mime
View raw message