Search in sources :

Example 1 with ActiveDeletedBlobCollectorImpl

use of org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory.ActiveDeletedBlobCollectorImpl in project jackrabbit-oak by apache.

the class ActiveDeletedBlobCollectionIT method createRepository.

@Override
protected ContentRepository createRepository() {
    adbc = new ActiveDeletedBlobCollectorImpl(clock, new File(blobCollectionRoot.getRoot(), "deleted-blobs"), executorService);
    IndexCopier copier = createIndexCopier();
    editorProvider = new LuceneIndexEditorProvider(copier, null, new ExtractedTextCache(10 * FileUtils.ONE_MB, 100), null, Mounts.defaultMountInfoProvider(), adbc);
    provider = new LuceneIndexProvider(copier);
    mongoConnection = connectionFactory.getConnection();
    MongoUtils.dropCollections(mongoConnection.getDB());
    if (dataStoreType == DataStoreType.WITHOUT_FDS) {
        MongoBlobStore blobStore = new MongoBlobStore(mongoConnection.getDB());
        blobStore.setBlockSize(128);
        blobStore.setBlockSizeMin(48);
        this.blobStore = new CountingBlobStore(blobStore);
    } else {
        FileDataStore fds = new FileDataStore();
        fds.init(fileDataStoreRoot.getRoot().getAbsolutePath());
        DataStoreBlobStore dsbs = new DataStoreBlobStore(fds);
        dsbs.setBlockSize(128);
        this.blobStore = new CountingBlobStore(dsbs);
    }
    nodeStore = new DocumentMK.Builder().setMongoDB(mongoConnection.getDB()).setBlobStore(this.blobStore).getNodeStore();
    asyncIndexUpdate = new AsyncIndexUpdate("async", nodeStore, editorProvider);
    return new Oak(nodeStore).with(new InitialContent()).with(new OpenSecurityProvider()).with((QueryIndexProvider) provider).with((Observer) provider).with(editorProvider).createContentRepository();
}
Also used : MongoBlobStore(org.apache.jackrabbit.oak.plugins.document.mongo.MongoBlobStore) ActiveDeletedBlobCollectorImpl(org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory.ActiveDeletedBlobCollectorImpl) AsyncIndexUpdate(org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate) OpenSecurityProvider(org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider) IndexCopier(org.apache.jackrabbit.oak.plugins.index.lucene.IndexCopier) QueryIndexProvider(org.apache.jackrabbit.oak.spi.query.QueryIndexProvider) ExtractedTextCache(org.apache.jackrabbit.oak.plugins.index.lucene.ExtractedTextCache) InitialContent(org.apache.jackrabbit.oak.InitialContent) LuceneIndexEditorProvider(org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditorProvider) Oak(org.apache.jackrabbit.oak.Oak) LuceneIndexProvider(org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProvider) File(java.io.File) FileDataStore(org.apache.jackrabbit.core.data.FileDataStore) DataStoreBlobStore(org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore)

Aggregations

File (java.io.File)1 FileDataStore (org.apache.jackrabbit.core.data.FileDataStore)1 InitialContent (org.apache.jackrabbit.oak.InitialContent)1 Oak (org.apache.jackrabbit.oak.Oak)1 DataStoreBlobStore (org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore)1 MongoBlobStore (org.apache.jackrabbit.oak.plugins.document.mongo.MongoBlobStore)1 AsyncIndexUpdate (org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate)1 ExtractedTextCache (org.apache.jackrabbit.oak.plugins.index.lucene.ExtractedTextCache)1 IndexCopier (org.apache.jackrabbit.oak.plugins.index.lucene.IndexCopier)1 LuceneIndexEditorProvider (org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditorProvider)1 LuceneIndexProvider (org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProvider)1 ActiveDeletedBlobCollectorImpl (org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory.ActiveDeletedBlobCollectorImpl)1 QueryIndexProvider (org.apache.jackrabbit.oak.spi.query.QueryIndexProvider)1 OpenSecurityProvider (org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider)1