Search in sources :

Example 1 with NodeCountsStage

use of org.neo4j.unsafe.impl.batchimport.NodeCountsStage in project neo4j by neo4j.

the class CountsComputer method initialize.

@Override
public void initialize(CountsAccessor.Updater countsUpdater) {
    NodeLabelsCache cache = new NodeLabelsCache(NumberArrayFactory.AUTO, highLabelId);
    try {
        // Count nodes
        superviseDynamicExecution(new NodeCountsStage(Configuration.DEFAULT, cache, nodes, highLabelId, countsUpdater));
        // Count relationships
        superviseDynamicExecution(new RelationshipCountsStage(Configuration.DEFAULT, cache, relationships, highLabelId, highRelationshipTypeId, countsUpdater, AUTO));
    } finally {
        cache.close();
    }
}
Also used : RelationshipCountsStage(org.neo4j.unsafe.impl.batchimport.RelationshipCountsStage) NodeCountsStage(org.neo4j.unsafe.impl.batchimport.NodeCountsStage) NodeLabelsCache(org.neo4j.unsafe.impl.batchimport.cache.NodeLabelsCache)

Aggregations

NodeCountsStage (org.neo4j.unsafe.impl.batchimport.NodeCountsStage)1 RelationshipCountsStage (org.neo4j.unsafe.impl.batchimport.RelationshipCountsStage)1 NodeLabelsCache (org.neo4j.unsafe.impl.batchimport.cache.NodeLabelsCache)1