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 "Hoss Man (JIRA)" <ji...@apache.org> on 2007/03/06 21:24:24 UTC

[jira] Commented: (SOLR-182) register SolrRequestHandlers at runtime / lazy loading

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

Hoss Man commented on SOLR-182:
-------------------------------

two outstanding questions from the email discussion...

1) yonik seemed to be concerned about synchronization issues involved with geting a request handler by name now that they can be registered dynamicly on the fly ... flarify that.

2) if we want request handlers to be able to find out what nam(es) they are registered with (now that anyone can call core.registerRequestHandler I might give the exact same identicle instance multiple names) they should be able to do that from the init method ... since we aren't changing the API of the init method, we should probably make sure that registering a handler causes...
      handler = clazz.newInstance();
      this.register( name, handler );
      handler.init( args );
...to happen in that order.

i would even argue that when registering multiple handlers (ie: from the config) we may want the psuedocode to be...

    foreach (handlerconfig) {
         handler = clazz.newInstance();
         this.register( name, handler );
    }
    foreach (key in registry) {
         lookup(key).init( args );
    }

...so that all handlernames are defined before any init methods are called.




> register SolrRequestHandlers at runtime / lazy loading
> ------------------------------------------------------
>
>                 Key: SOLR-182
>                 URL: https://issues.apache.org/jira/browse/SOLR-182
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Ryan McKinley
>             Fix For: 1.2
>
>         Attachments: SOLR-182-RuntimeRequestHandlers.patch, SOLR-182-RuntimeRequestHandlers.patch, SOLR-182-RuntimeRequestHandlers.patch
>
>
> It would be useful to be able to register handlers after SolrCore has been initialized initialized.  It is also useful to be able to ask what handlers are registered and to where.  This patch adds the following functions to SolrCore:
> SolrRequestHandler registerRequestHandler(String handlerName, SolrRequestHandler handler);
> Collection<SolrRequestHandler> getRequestHandlers(Class<? extends SolrRequestHandler> clazz);
> It also guarantees that request handlers will be initialized with an argument saying what path it is registered to.  RequestHandlerBase gets a bean for the registered path.
> While discussing this, Yonik suggested making it possible to defer initialization of some handlers that will be infrequently used.  I added the 'LazyRequestHandlerWrapper'  (if taking this out makes the patch any easier to commit - it can get its own issue)
> check:
> http://www.nabble.com/Dynamic-RequestHandler-loading-tf3351707.html

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