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();
}
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();
}
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();
}
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();
}
Aggregations