Search in sources :

Example 16 with IndexSamplingConfig

use of org.neo4j.kernel.impl.api.index.sampling.IndexSamplingConfig in project neo4j by neo4j.

the class SimpleIndexPopulatorCompatibility method shouldBeAbleToDropAClosedIndexPopulator.

@Test
public void shouldBeAbleToDropAClosedIndexPopulator() throws Exception {
    // GIVEN
    IndexSamplingConfig indexSamplingConfig = new IndexSamplingConfig(Config.empty());
    IndexPopulator populator = indexProvider.getPopulator(17, descriptor, indexSamplingConfig);
    populator.close(false);
    // WHEN
    populator.drop();
// THEN - no exception should be thrown (it's been known to!)
}
Also used : IndexSamplingConfig(org.neo4j.kernel.impl.api.index.sampling.IndexSamplingConfig) Test(org.junit.Test)

Example 17 with IndexSamplingConfig

use of org.neo4j.kernel.impl.api.index.sampling.IndexSamplingConfig in project neo4j by neo4j.

the class IndexPopulationJobTest method inMemoryPopulator.

private IndexPopulator inMemoryPopulator(boolean constraint) throws TransactionFailureException {
    IndexSamplingConfig samplingConfig = new IndexSamplingConfig(Config.empty());
    NewIndexDescriptor descriptor = indexDescriptor(FIRST, name, constraint);
    return new InMemoryIndexProvider().getPopulator(21, descriptor, samplingConfig);
}
Also used : IndexSamplingConfig(org.neo4j.kernel.impl.api.index.sampling.IndexSamplingConfig) NewIndexDescriptor(org.neo4j.kernel.api.schema_new.index.NewIndexDescriptor) InMemoryIndexProvider(org.neo4j.kernel.impl.api.index.inmemory.InMemoryIndexProvider)

Aggregations

IndexSamplingConfig (org.neo4j.kernel.impl.api.index.sampling.IndexSamplingConfig)17 Test (org.junit.Test)9 Config (org.neo4j.kernel.configuration.Config)5 IndexRule (org.neo4j.kernel.impl.store.record.IndexRule)4 Before (org.junit.Before)3 SchemaRuleUtil.constraintIndexRule (org.neo4j.consistency.checking.SchemaRuleUtil.constraintIndexRule)3 ConsistencySummaryStatistics (org.neo4j.consistency.report.ConsistencySummaryStatistics)3 IndexAccessor (org.neo4j.kernel.api.index.IndexAccessor)3 SchemaIndexProvider (org.neo4j.kernel.api.index.SchemaIndexProvider)3 NewIndexDescriptor (org.neo4j.kernel.api.schema_new.index.NewIndexDescriptor)3 SchemaStorage (org.neo4j.kernel.impl.store.SchemaStorage)3 File (java.io.File)2 Arrays (java.util.Arrays)2 RAMDirectory (org.apache.lucene.store.RAMDirectory)2 PrimitiveLongCollections (org.neo4j.collection.primitive.PrimitiveLongCollections)2 IndexPopulator (org.neo4j.kernel.api.index.IndexPopulator)2 NodeRecord (org.neo4j.kernel.impl.store.record.NodeRecord)2 IOException (java.io.IOException)1 PrintStream (java.io.PrintStream)1 Boolean.parseBoolean (java.lang.Boolean.parseBoolean)1