You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Rupert Westenthaler (Created) (JIRA)" <ji...@apache.org> on 2011/11/07 11:37:51 UTC

[jira] [Created] (STANBOL-375) Add support for update and removals of SolrCores for Solr servers managed by Stanbol

Add support for update and removals of SolrCores for Solr servers managed by Stanbol
------------------------------------------------------------------------------------

                 Key: STANBOL-375
                 URL: https://issues.apache.org/jira/browse/STANBOL-375
             Project: Stanbol
          Issue Type: New Feature
            Reporter: Rupert Westenthaler
            Assignee: Rupert Westenthaler


Currently the SolrDirectoryManager [1] allows only to create new Solr indexes. Updates and removals are not supported. This shortcoming also limits the functionality of the Solr extension to the Sling Installer framework [2] so that the IndexRemoveTask can not be implemented.

This limitation was mainly because of the fact that changes to CoreContainers and SolrCores could not be notified to other Components, but with the completion of STANBOL-354 this is no longer a problem.

Additional Notes:

* The SolrDirectoryManager is currently also useable outside an OSGI environment. However the here requested functionality heavily depends on OSGI services. Therefore the solution will be to require OSGI for the new Implementation and provides a additional implementation that can run outside OSGI with limited functionality. 

* This functionality will me moved from the commons.solr.core bundle to an own artifact with the name "org.apache.stanbol.commons.solr.managed" and the new Service will be called ManagedSolrServer. The current component [3] with that name will be renamed to SolrServerAdapter - because it does not really manage a SolrServer, but merely adapts the Solr Components to OSGI Components as descibed by STANBOL-354


[1] http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/SolrDirectoryManager.java?revision=1186726&view=markup
[2] http://svn.apache.org/repos/asf/incubator/stanbol/trunk/commons/solr/install/
[3] http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/ManagedSolrServer.java?revision=1195450&view=markup

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (STANBOL-375) Add support for update and removals of SolrCores for Solr servers managed by Stanbol

Posted by "Rupert Westenthaler (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STANBOL-375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rupert Westenthaler resolved STANBOL-375.
-----------------------------------------

    Resolution: Fixed

fixed with revision #1205331 and #1205334 (missed some files in the first commit)

Short overview about the new ManagedSolrServer component (mainly taken from the commit statement of #1205331)

Added support for multiple managed Solr server. This Component replaces the SolrDirectoryManager and also includes some functionalities formally part of the EmbeddedSolrServerProvider.

* Identified by name. If multiple Servers share the same name service rankings are used. This allows to configure fallback servers. Names are shared between Managed- and Referenced- SolrServer instances.
* The ManagedSolrServer with the highest service ranking is used as default. It is best practice to configure an default instance with service ranking Integer.MAX_VALUE.
* Full CRUD operation on managed indexes (SolrCores). The state of the managed indexes are saved within the data directory of the Bundle. This allows also to manage indexes with missing data (Solr index archives).
* The CoreContainer (the managed Solr server) and all SolrCores (Solr indexes) are registered as OSGI services.
* Support for loading and tracking SolrIndexArchives via the DataFileProvider and DataFileTracker services (fixes STANBOL-380)
* A boolean switch for the ManagedSolrServer allows to specify of indexes of this server are published via the Stanbol RESTful interface under /solr/{server-name}/{index-name}
* ManagedSolrServer instances can be specified by providing configurations via the Sling installer framework (e.g. by the launcher or within a bundle). However it is also possible to create them by directly adding a new configuration the the OSGI ConfigurationAdmin service. In addition Users may provide configurations by using the Configuration tab of the Apache Felix Web Console.
* SolrCore directory names now include the date of the creation as an suffix. If a directory with that name already exists (e.g. because the same index was already updated on the very same day) than an additional "-{count}" suffix will be added to the end.
* The Managed SolrServer stores its configuration within the persistent space of the Bundle provided by the OSGI environment. When using one of the default Stanbol launchers this is within "{sling.home}/felix/bundle{bundle-id}/data". The "{bundle-id}" of the "org.apache.stanbol.commons.solr.managed" bundle can be looked up the the [Bundle tab](http://localhost:8080/system/console/bundles) of the Apache Felix Webconsole. The actual configuration of a ManagedSolrServer is than in ".config/index-config/{service.pid}". The "{service.pid}" can be also looked up via the Apache Felix Web-console in the [Configuration Status tab](http://localhost:8080/system/console/config). Within this folder the Solr index reference files (normal java properties files) with all the information about the current state of the managed indexes are present. 
* Errors that occur during the asynchronous initialization of SolrCores are stored within the IndexingProperties. They can therefore be requested via the API of the ManagedSolrServer but also be looked up within the persistent state of the ManagedSolrServer (see above where such files are located).

This also adds two implementations that can be used outside of an OSGI.
The first uses an constructor to parse the necessary information. The second warps the first implementation, but provides an empty constructor that creates an instance for the "DEFAULT" ManagedSolrServer. This allows to initialize the default  ManagedSolrServer instance by using the java.util.ServiceLoader. 

                
> Add support for update and removals of SolrCores for Solr servers managed by Stanbol
> ------------------------------------------------------------------------------------
>
>                 Key: STANBOL-375
>                 URL: https://issues.apache.org/jira/browse/STANBOL-375
>             Project: Stanbol
>          Issue Type: New Feature
>            Reporter: Rupert Westenthaler
>            Assignee: Rupert Westenthaler
>
> Currently the SolrDirectoryManager [1] allows only to create new Solr indexes. Updates and removals are not supported. This shortcoming also limits the functionality of the Solr extension to the Sling Installer framework [2] so that the IndexRemoveTask can not be implemented.
> This limitation was mainly because of the fact that changes to CoreContainers and SolrCores could not be notified to other Components, but with the completion of STANBOL-354 this is no longer a problem.
> Additional Notes:
> * The SolrDirectoryManager is currently also useable outside an OSGI environment. However the here requested functionality heavily depends on OSGI services. Therefore the solution will be to require OSGI for the new Implementation and provides a additional implementation that can run outside OSGI with limited functionality. 
> * This functionality will me moved from the commons.solr.core bundle to an own artifact with the name "org.apache.stanbol.commons.solr.managed" and the new Service will be called ManagedSolrServer. The current component [3] with that name will be renamed to SolrServerAdapter - because it does not really manage a SolrServer, but merely adapts the Solr Components to OSGI Components as descibed by STANBOL-354
> [1] http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/SolrDirectoryManager.java?revision=1186726&view=markup
> [2] http://svn.apache.org/repos/asf/incubator/stanbol/trunk/commons/solr/install/
> [3] http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/ManagedSolrServer.java?revision=1195450&view=markup

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira