Search in sources :

Example 1 with TrackingCorruptIndexHandler

use of org.apache.jackrabbit.oak.plugins.index.TrackingCorruptIndexHandler in project jackrabbit-oak by apache.

the class IndexlaneRepositoryTraversalTest method createRepository.

protected ContentRepository createRepository() {
    nodeStore = new MemoryNodeStore();
    blobStore = new MemoryBlobStore();
    // make it as small as possible
    blobStore.setBlockSizeMin(48);
    LuceneIndexEditorProvider luceneIndexEditorProvider = new LuceneIndexEditorProvider();
    LuceneIndexProvider provider = new LuceneIndexProvider();
    luceneIndexEditorProvider.setBlobStore(blobStore);
    asyncIndexUpdate = new AsyncIndexUpdate("async", nodeStore, compose(newArrayList(luceneIndexEditorProvider, new NodeCounterEditorProvider())));
    asyncIndexUpdateFulltext = new AsyncIndexUpdate("fulltext-async", nodeStore, compose(newArrayList(luceneIndexEditorProvider, new NodeCounterEditorProvider())));
    TrackingCorruptIndexHandler trackingCorruptIndexHandler = new TrackingCorruptIndexHandler();
    trackingCorruptIndexHandler.setCorruptInterval(INDEX_CORRUPT_INTERVAL_IN_MILLIS, TimeUnit.MILLISECONDS);
    asyncIndexUpdate.setCorruptIndexHandler(trackingCorruptIndexHandler);
    return new Oak(nodeStore).with(new InitialContent()).with(new OpenSecurityProvider()).with((QueryIndexProvider) provider).with((Observer) provider).with(luceneIndexEditorProvider).with(new PropertyIndexEditorProvider()).with(new NodeTypeIndexProvider()).with(new PropertyIndexProvider()).with(new PropertyIndexEditorProvider()).createContentRepository();
}
Also used : NodeTypeIndexProvider(org.apache.jackrabbit.oak.plugins.index.nodetype.NodeTypeIndexProvider) AsyncIndexUpdate(org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate) OpenSecurityProvider(org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider) PropertyIndexEditorProvider(org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider) TrackingCorruptIndexHandler(org.apache.jackrabbit.oak.plugins.index.TrackingCorruptIndexHandler) QueryIndexProvider(org.apache.jackrabbit.oak.spi.query.QueryIndexProvider) InitialContent(org.apache.jackrabbit.oak.InitialContent) PropertyIndexProvider(org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexProvider) MemoryNodeStore(org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore) Oak(org.apache.jackrabbit.oak.Oak) MemoryBlobStore(org.apache.jackrabbit.oak.spi.blob.MemoryBlobStore) NodeCounterEditorProvider(org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditorProvider)

Example 2 with TrackingCorruptIndexHandler

use of org.apache.jackrabbit.oak.plugins.index.TrackingCorruptIndexHandler in project jackrabbit-oak by apache.

the class ElasticAbstractQueryTest method createRepository.

@Override
protected ContentRepository createRepository() {
    esConnection = getElasticConnection();
    ElasticIndexTracker indexTracker = new ElasticIndexTracker(esConnection, getMetricHandler());
    ElasticIndexEditorProvider editorProvider = new ElasticIndexEditorProvider(indexTracker, esConnection, new ExtractedTextCache(10 * FileUtils.ONE_MB, 100));
    ElasticIndexProvider indexProvider = new ElasticIndexProvider(indexTracker);
    nodeStore = getNodeStore();
    asyncIndexUpdate = getAsyncIndexUpdate("async", nodeStore, compose(newArrayList(editorProvider, new NodeCounterEditorProvider())));
    TrackingCorruptIndexHandler trackingCorruptIndexHandler = new TrackingCorruptIndexHandler();
    trackingCorruptIndexHandler.setCorruptInterval(INDEX_CORRUPT_INTERVAL_IN_MILLIS, TimeUnit.MILLISECONDS);
    asyncIndexUpdate.setCorruptIndexHandler(trackingCorruptIndexHandler);
    Oak oak = new Oak(nodeStore).with(getInitialContent()).with(new OpenSecurityProvider()).with(editorProvider).with(indexTracker).with(indexProvider).with(new PropertyIndexEditorProvider()).with(new NodeTypeIndexProvider());
    if (useAsyncIndexing()) {
        oak = addAsyncIndexingLanesToOak(oak);
    }
    return oak.createContentRepository();
}
Also used : ExtractedTextCache(org.apache.jackrabbit.oak.plugins.index.search.ExtractedTextCache) NodeTypeIndexProvider(org.apache.jackrabbit.oak.plugins.index.nodetype.NodeTypeIndexProvider) Oak(org.apache.jackrabbit.oak.Oak) OpenSecurityProvider(org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider) PropertyIndexEditorProvider(org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider) ElasticIndexProvider(org.apache.jackrabbit.oak.plugins.index.elastic.query.ElasticIndexProvider) ElasticIndexEditorProvider(org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticIndexEditorProvider) TrackingCorruptIndexHandler(org.apache.jackrabbit.oak.plugins.index.TrackingCorruptIndexHandler) NodeCounterEditorProvider(org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditorProvider)

Example 3 with TrackingCorruptIndexHandler

use of org.apache.jackrabbit.oak.plugins.index.TrackingCorruptIndexHandler in project jackrabbit-oak by apache.

the class AsyncIndexUpdateCorruptMarkingTest method createRepository.

protected ContentRepository createRepository() {
    NodeStore nodeStore = new MemoryNodeStore();
    blobStore = new MemoryBlobStore();
    // make it as small as possible
    blobStore.setBlockSizeMin(48);
    LuceneIndexEditorProvider luceneIndexEditorProvider = new LuceneIndexEditorProvider();
    LuceneIndexProvider provider = new LuceneIndexProvider();
    luceneIndexEditorProvider.setBlobStore(blobStore);
    asyncIndexUpdate = new AsyncIndexUpdate("async", nodeStore, compose(newArrayList(luceneIndexEditorProvider, new NodeCounterEditorProvider())));
    TrackingCorruptIndexHandler trackingCorruptIndexHandler = new TrackingCorruptIndexHandler();
    trackingCorruptIndexHandler.setCorruptInterval(INDEX_CORRUPT_INTERVAL_IN_MILLIS, TimeUnit.MILLISECONDS);
    asyncIndexUpdate.setCorruptIndexHandler(trackingCorruptIndexHandler);
    return new Oak(nodeStore).with(new InitialContent()).with(new OpenSecurityProvider()).with((QueryIndexProvider) provider).with((Observer) provider).with(luceneIndexEditorProvider).with(new PropertyIndexEditorProvider()).with(new NodeTypeIndexProvider()).createContentRepository();
}
Also used : NodeTypeIndexProvider(org.apache.jackrabbit.oak.plugins.index.nodetype.NodeTypeIndexProvider) AsyncIndexUpdate(org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate) OpenSecurityProvider(org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider) PropertyIndexEditorProvider(org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider) TrackingCorruptIndexHandler(org.apache.jackrabbit.oak.plugins.index.TrackingCorruptIndexHandler) QueryIndexProvider(org.apache.jackrabbit.oak.spi.query.QueryIndexProvider) InitialContent(org.apache.jackrabbit.oak.InitialContent) NodeStore(org.apache.jackrabbit.oak.spi.state.NodeStore) MemoryNodeStore(org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore) MemoryNodeStore(org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore) Oak(org.apache.jackrabbit.oak.Oak) MemoryBlobStore(org.apache.jackrabbit.oak.spi.blob.MemoryBlobStore) NodeCounterEditorProvider(org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditorProvider)

Example 4 with TrackingCorruptIndexHandler

use of org.apache.jackrabbit.oak.plugins.index.TrackingCorruptIndexHandler in project jackrabbit-oak by apache.

the class InvalidIndexTest method createRepository.

private ContentRepository createRepository() {
    nodeStore = new MemoryNodeStore();
    blobStore = new MemoryBlobStore();
    // make it as small as possible
    blobStore.setBlockSizeMin(48);
    LuceneIndexEditorProvider luceneIndexEditorProvider = new LuceneIndexEditorProvider();
    LuceneIndexProvider provider = new LuceneIndexProvider();
    luceneIndexEditorProvider.setBlobStore(blobStore);
    asyncIndexUpdate = new AsyncIndexUpdate("async", nodeStore, compose(newArrayList(luceneIndexEditorProvider, new NodeCounterEditorProvider())));
    TrackingCorruptIndexHandler trackingCorruptIndexHandler = new TrackingCorruptIndexHandler();
    trackingCorruptIndexHandler.setCorruptInterval(INDEX_CORRUPT_INTERVAL_IN_MILLIS, TimeUnit.MILLISECONDS);
    asyncIndexUpdate.setCorruptIndexHandler(trackingCorruptIndexHandler);
    return new Oak(nodeStore).with(new InitialContent()).with(new OpenSecurityProvider()).with((QueryIndexProvider) provider).with((Observer) provider).with(luceneIndexEditorProvider).with(new PropertyIndexEditorProvider()).with(new NodeTypeIndexProvider()).with(new PropertyIndexProvider()).with(new PropertyIndexEditorProvider()).createContentRepository();
}
Also used : NodeTypeIndexProvider(org.apache.jackrabbit.oak.plugins.index.nodetype.NodeTypeIndexProvider) AsyncIndexUpdate(org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate) OpenSecurityProvider(org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider) PropertyIndexEditorProvider(org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider) TrackingCorruptIndexHandler(org.apache.jackrabbit.oak.plugins.index.TrackingCorruptIndexHandler) QueryIndexProvider(org.apache.jackrabbit.oak.spi.query.QueryIndexProvider) InitialContent(org.apache.jackrabbit.oak.InitialContent) PropertyIndexProvider(org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexProvider) MemoryNodeStore(org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore) Oak(org.apache.jackrabbit.oak.Oak) MemoryBlobStore(org.apache.jackrabbit.oak.spi.blob.MemoryBlobStore) NodeCounterEditorProvider(org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditorProvider)

Aggregations

Oak (org.apache.jackrabbit.oak.Oak)4 TrackingCorruptIndexHandler (org.apache.jackrabbit.oak.plugins.index.TrackingCorruptIndexHandler)4 NodeCounterEditorProvider (org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditorProvider)4 NodeTypeIndexProvider (org.apache.jackrabbit.oak.plugins.index.nodetype.NodeTypeIndexProvider)4 PropertyIndexEditorProvider (org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider)4 OpenSecurityProvider (org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider)4 InitialContent (org.apache.jackrabbit.oak.InitialContent)3 AsyncIndexUpdate (org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate)3 MemoryNodeStore (org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore)3 MemoryBlobStore (org.apache.jackrabbit.oak.spi.blob.MemoryBlobStore)3 QueryIndexProvider (org.apache.jackrabbit.oak.spi.query.QueryIndexProvider)3 PropertyIndexProvider (org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexProvider)2 ElasticIndexEditorProvider (org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticIndexEditorProvider)1 ElasticIndexProvider (org.apache.jackrabbit.oak.plugins.index.elastic.query.ElasticIndexProvider)1 ExtractedTextCache (org.apache.jackrabbit.oak.plugins.index.search.ExtractedTextCache)1 NodeStore (org.apache.jackrabbit.oak.spi.state.NodeStore)1