jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan Mehrotra (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OAK-1502) Make DataStores available to NodeStores
Date Thu, 13 Mar 2014 12:17:44 GMT

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

Chetan Mehrotra updated OAK-1502:

    Attachment: OAK-1502.patch

BlobStore can now be configured via OSGi Configurations. The default for current NodeStore
* SegementNodeStore - Blobs are stored as part of content. So no default usage of BlobStore
* DocumentNodeStore - It defaults to MongoBlobStore 

Now these services can use a different BlobStore if they are configured to do that (steps
required explained later).

Key points
* Introduced DS Components to configure BlobStore
*# org.apache.jackrabbit.oak.spi.blob.FileBlobStore
*#* PID - org.apache.jackrabbit.oak.spi.blob.FileBlobStore
*# org.apache.jackrabbit.core.data.FileDataStore (from JR2)
*#* PID - org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore
*# org.apache.jackrabbit.aws.ext.ds.S3DataStore
*#* PID - org.apache.jackrabbit.oak.plugins.blob.datastore.S3DataStore
*# org.apache.jackrabbit.core.data.db.DbDataStore
*#* PID - org.apache.jackrabbit.core.data.db.DbDataStore
* To create any specific BlobStore just provision the OSGi config with required PID
* Removed the classes related to BlobStoreConfiguration as for OSGi env we rely on OSGi configuration

*Configuration Steps*
_Step 1_ - Create config for required store. For example to use FileDataStore create a config
file with name {{org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.cfg}} with
following content


The config property name should match the name of setters in [FileDataStore|http://jackrabbit.apache.org/api/2.4/org/apache/jackrabbit/core/data/FileDataStore.html]

_Step 2_
Configure the NodeStore to use the blobStore. So for DocumentNodeStore create a config file
like {{org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.cfg}} with {{customBlobStore}}
set to true


*Using BlobStore in NodeStore Impls*
As BlobStore is an optional service for default setup it poses some problem around NodeStore
activation. So now NodeSTore would read value of {{customBlobStore}} upon activation. if set
to true then creation of actual NodeStore would be delayed untill BlobStore service is registered.
Hence the usage of ServiceTracker

This would have been simplified with usage of  new <refname>.cardinality.minimum support
added as part of FELIX-4391. However currently we do not have a released version of SCR so
cannot be used. In that case we would had to just set blobStore.cardinality.minimum to 1 and
DS would have ensured that blobStore reference is not considered as optional!

*Pending Work*
* S3DataStore - It requires some change in JR2 code and also a release of jackrabbit-aws-ext
* DbDataStore - Handling of Connectionfactory reference

See on github [here|https://github.com/chetanmeh/jackrabbit-oak/commit/da8bbbd4ff0f834edcfacf90d928d130cd3ed0e4]

> Make DataStores available to NodeStores
> ---------------------------------------
>                 Key: OAK-1502
>                 URL: https://issues.apache.org/jira/browse/OAK-1502
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>          Components: core
>            Reporter: Jukka Zitting
>            Assignee: Chetan Mehrotra
>             Fix For: 0.19
>         Attachments: OAK-1502.patch
> For OAK-805 and related issues we need a mechanism for making Jackrabbit DataStores instances
available to NodeStore implementations so that they can look up references to binaries stored
in such datastores.
> In an OSGi environment the best approach is probably to have DataStores as OSGi services
that the NodeStore can look up dynamically through the Whiteboard mechanism. In plain old
Java we can just pass a DataStore reference to a NodeStore during initialization.

This message was sent by Atlassian JIRA

View raw message