You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alan Woodward (JIRA)" <ji...@apache.org> on 2013/06/21 17:32:20 UTC

[jira] [Updated] (SOLR-4948) Tidy up CoreContainer construction logic

     [ https://issues.apache.org/jira/browse/SOLR-4948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Woodward updated SOLR-4948:
--------------------------------

    Attachment: SOLR-4948.patch

Patch that does said tidying.

1) Rationalizes the constructor to just taking a SolrResourceLoader and ConfigSolr object (plus various defaults).  None of the constructors load the cores.

2) Remove the arguments to load() - everything necessary for loading has already been passed to the constructor.

3) Add a convenience createAndLoad() static method.

4) Adds some convenience methods for creating ConfigSolr objects.

5) Removes the Initializer object entirely

6) Refactors TestHarness to create its own ConfigSolr instance, rather than doing any funky subclassing and initializing.

There are a couple of test fails (both ZK tests) which I will get on with fixing.
                
> Tidy up CoreContainer construction logic
> ----------------------------------------
>
>                 Key: SOLR-4948
>                 URL: https://issues.apache.org/jira/browse/SOLR-4948
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Alan Woodward
>            Assignee: Alan Woodward
>            Priority: Minor
>         Attachments: SOLR-4948.patch
>
>
> While writing tests for SOLR-4914, I discovered that it's *really difficult* to create a CoreContainer.  There are a bunch of constructors which initialise different things, one (but only one!) of which also loads all the cores.  Then you have the Initializer object, which basically does the same thing.  Sort of.  And then the TestHarness doesn't actually use CoreContainer, but an anonymous subclass of CoreContainer which has it's own initialisation logic.  It would be nice to clean this up!

--
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org