Search in sources :

Example 16 with RelationshipStore

use of org.neo4j.kernel.impl.store.RelationshipStore in project neo4j by neo4j.

the class CountsComputerTest method rebuildCounts.

private void rebuildCounts(long lastCommittedTransactionId) throws IOException {
    cleanupCountsForRebuilding();
    StoreFactory storeFactory = new StoreFactory(dir, pageCache, fs, NullLogProvider.getInstance());
    try (Lifespan life = new Lifespan();
        NeoStores neoStores = storeFactory.openAllNeoStores()) {
        NodeStore nodeStore = neoStores.getNodeStore();
        RelationshipStore relationshipStore = neoStores.getRelationshipStore();
        int highLabelId = (int) neoStores.getLabelTokenStore().getHighId();
        int highRelationshipTypeId = (int) neoStores.getRelationshipTypeTokenStore().getHighId();
        CountsComputer countsComputer = new CountsComputer(lastCommittedTransactionId, nodeStore, relationshipStore, highLabelId, highRelationshipTypeId);
        CountsTracker countsTracker = createCountsTracker();
        life.add(countsTracker.setInitializer(countsComputer));
    }
}
Also used : NodeStore(org.neo4j.kernel.impl.store.NodeStore) CountsComputer(org.neo4j.kernel.impl.store.CountsComputer) NeoStores(org.neo4j.kernel.impl.store.NeoStores) RelationshipStore(org.neo4j.kernel.impl.store.RelationshipStore) StoreFactory(org.neo4j.kernel.impl.store.StoreFactory) Lifespan(org.neo4j.kernel.lifecycle.Lifespan)

Aggregations

RelationshipStore (org.neo4j.kernel.impl.store.RelationshipStore)16 Test (org.junit.Test)6 RelationshipRecord (org.neo4j.kernel.impl.store.record.RelationshipRecord)6 NeoStores (org.neo4j.kernel.impl.store.NeoStores)5 NodeStore (org.neo4j.kernel.impl.store.NodeStore)3 RecordCursor (org.neo4j.kernel.impl.store.RecordCursor)3 StoreFactory (org.neo4j.kernel.impl.store.StoreFactory)3 Node (org.neo4j.graphdb.Node)2 Transaction (org.neo4j.graphdb.Transaction)2 CountsComputer (org.neo4j.kernel.impl.store.CountsComputer)2 RelationshipGroupRecord (org.neo4j.kernel.impl.store.record.RelationshipGroupRecord)2 GraphDatabaseAPI (org.neo4j.kernel.internal.GraphDatabaseAPI)2 Lifespan (org.neo4j.kernel.lifecycle.Lifespan)2 InputRelationship (org.neo4j.unsafe.impl.batchimport.input.InputRelationship)2 File (java.io.File)1 IOException (java.io.IOException)1 PrimitiveLongIterator (org.neo4j.collection.primitive.PrimitiveLongIterator)1 ConsistencySummaryStatistics (org.neo4j.consistency.report.ConsistencySummaryStatistics)1 DependencyResolver (org.neo4j.graphdb.DependencyResolver)1 Relationship (org.neo4j.graphdb.Relationship)1