Exemplo n.º 1
0
        public RelationshipCountsStage(Configuration config, NodeLabelsCache cache, RelationshipStore relationshipStore, int highLabelId, int highRelationshipTypeId, Org.Neo4j.Kernel.Impl.Api.CountsAccessor_Updater countsUpdater, NumberArrayFactory cacheFactory, ProgressReporter progressReporter) : base(NAME, null, config, RECYCLE_BATCHES)
        {
            Add(new BatchFeedStep(Control(), config, allIn(relationshipStore, config), relationshipStore.RecordSize));
//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
//ORIGINAL LINE: add(new org.neo4j.unsafe.impl.batchimport.staging.ReadRecordsStep<>(control(), config, false, relationshipStore));
            Add(new ReadRecordsStep <object>(Control(), config, false, relationshipStore));
            Add(new ProcessRelationshipCountsDataStep(Control(), cache, config, highLabelId, highRelationshipTypeId, countsUpdater, cacheFactory, progressReporter));
        }
Exemplo n.º 2
0
 private void PopulateCountStore(Org.Neo4j.Kernel.Impl.Api.CountsAccessor_Updater countsUpdater)
 {
     using (NodeLabelsCache cache = new NodeLabelsCache(_numberArrayFactory, _highLabelId))
     {
         // Count nodes
         superviseDynamicExecution(new NodeCountsStage(Configuration.DEFAULT, cache, _nodes, _highLabelId, countsUpdater, _progressMonitor));
         // Count relationships
         superviseDynamicExecution(new RelationshipCountsStage(Configuration.DEFAULT, cache, _relationships, _highLabelId, _highRelationshipTypeId, countsUpdater, _numberArrayFactory, _progressMonitor));
     }
 }
Exemplo n.º 3
0
        public NodeCountsStage(Configuration config, NodeLabelsCache cache, NodeStore nodeStore, int highLabelId, Org.Neo4j.Kernel.Impl.Api.CountsAccessor_Updater countsUpdater, ProgressReporter progressReporter, params StatsProvider[] additionalStatsProviders) : base(NAME, null, config, RECYCLE_BATCHES)
        {
            Add(new BatchFeedStep(Control(), config, allIn(nodeStore, config), nodeStore.RecordSize));
//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
//ORIGINAL LINE: add(new org.neo4j.unsafe.impl.batchimport.staging.ReadRecordsStep<>(control(), config, false, nodeStore));
            Add(new ReadRecordsStep <object>(Control(), config, false, nodeStore));
//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
//ORIGINAL LINE: add(new RecordProcessorStep<>(control(), "COUNT", config, new NodeCountsProcessor(nodeStore, cache, highLabelId, countsUpdater, progressReporter), true, additionalStatsProviders));
            Add(new RecordProcessorStep <object>(Control(), "COUNT", config, new NodeCountsProcessor(nodeStore, cache, highLabelId, countsUpdater, progressReporter), true, additionalStatsProviders));
        }
Exemplo n.º 4
0
 internal NodeCountsProcessor(NodeStore nodeStore, NodeLabelsCache cache, int highLabelId, Org.Neo4j.Kernel.Impl.Api.CountsAccessor_Updater counts, ProgressReporter progressReporter)
 {
     this._nodeStore = nodeStore;
     this._cache     = cache;
     this._anyLabel  = highLabelId;
     this._counts    = counts;
     // Instantiate with high id + 1 since we need that extra slot for the ANY count
     this._labelCounts      = new long[highLabelId + 1];
     this._progressReporter = progressReporter;
 }
        public RelationshipCountsProcessor(NodeLabelsCache nodeLabelCache, int highLabelId, int highRelationshipTypeId, Org.Neo4j.Kernel.Impl.Api.CountsAccessor_Updater countsUpdater, NumberArrayFactory cacheFactory)
        {
            this._nodeLabelCache = nodeLabelCache;
            this._client         = nodeLabelCache.NewClient();
            this._countsUpdater  = countsUpdater;

            // Make room for high id + 1 since we need that extra slot for the ANY counts
            this._anyLabel            = highLabelId;
            this._anyRelationshipType = highRelationshipTypeId;
            this._itemsPerType        = _anyLabel + 1;
            this._itemsPerLabel       = _anyRelationshipType + 1;
            this._labelsCounts        = cacheFactory.NewLongArray(SideSize() * SIDES, 0);
            this._wildcardCounts      = cacheFactory.NewLongArray(_anyRelationshipType + 1, 0);
        }