use of org.neo4j.kernel.api.impl.index.storage.PartitionedIndexStorage in project neo4j by neo4j.
the class ReadOnlyLuceneLabelScanIndexTest method setUp.
@Before
public void setUp() {
PartitionedIndexStorage indexStorage = new PartitionedIndexStorage(DirectoryFactory.PERSISTENT, fileSystemRule.get(), testDirectory.directory(), "1", false);
luceneLabelScanIndex = new ReadOnlyDatabaseLabelScanIndex(BitmapDocumentFormat._32, indexStorage);
}
use of org.neo4j.kernel.api.impl.index.storage.PartitionedIndexStorage in project neo4j by neo4j.
the class ReadOnlyLuceneSchemaIndexTest method setUp.
@Before
public void setUp() {
PartitionedIndexStorage indexStorage = new PartitionedIndexStorage(DirectoryFactory.PERSISTENT, fileSystemRule.get(), testDirectory.directory(), "1", false);
Config config = Config.empty();
IndexSamplingConfig samplingConfig = new IndexSamplingConfig(config);
luceneSchemaIndex = new ReadOnlyDatabaseSchemaIndex(indexStorage, NewIndexDescriptorFactory.forLabel(0, 0), samplingConfig, new ReadOnlyIndexPartitionFactory());
}
use of org.neo4j.kernel.api.impl.index.storage.PartitionedIndexStorage in project neo4j by neo4j.
the class NonUniqueDatabaseIndexPopulatorTest method setUp.
@BeforeEach
void setUp() {
Path folder = testDir.directory("folder");
PartitionedIndexStorage indexStorage = new PartitionedIndexStorage(dirFactory, fileSystem, folder);
IndexDescriptor descriptor = IndexPrototype.forSchema(labelSchemaDescriptor).withName("index").materialise(13);
index = LuceneSchemaIndexBuilder.create(descriptor, writable(), Config.defaults()).withIndexStorage(indexStorage).build();
}
use of org.neo4j.kernel.api.impl.index.storage.PartitionedIndexStorage in project neo4j by neo4j.
the class LuceneIndexProvider method getInitialState.
@Override
public InternalIndexState getInitialState(IndexDescriptor descriptor, CursorContext cursorContext) {
PartitionedIndexStorage indexStorage = getIndexStorage(descriptor.getId());
String failure = indexStorage.getStoredIndexFailure();
if (failure != null) {
return InternalIndexState.FAILED;
}
try {
return indexIsOnline(indexStorage, descriptor) ? InternalIndexState.ONLINE : InternalIndexState.POPULATING;
} catch (IOException e) {
monitor.failedToOpenIndex(descriptor, "Requesting re-population.", e);
return InternalIndexState.POPULATING;
}
}
use of org.neo4j.kernel.api.impl.index.storage.PartitionedIndexStorage in project neo4j by neo4j.
the class LuceneIndexStorageBuilder method build.
/**
* Build lucene index storage with specified configuration
*
* @return lucene index storage
*/
public PartitionedIndexStorage build() {
if (indexStorage == null) {
Objects.requireNonNull(directoryFactory);
Objects.requireNonNull(fileSystem);
Objects.requireNonNull(indexRootFolder);
indexStorage = new PartitionedIndexStorage(directoryFactory, fileSystem, indexRootFolder);
}
return indexStorage;
}
Aggregations