private static InputIterator legacyNodesAsInput( NeoStores legacyStore, boolean requiresPropertyMigration ) { return new StoreScanAsInputIterator<NodeRecord>( legacyStore.getNodeStore() ) { @Override public InputChunk newChunk() { return new NodeRecordChunk( new RecordStorageReader( legacyStore ), requiresPropertyMigration ); } }; }
RelationshipCounts( StoreAccess storeAccess, MutableObjectLongMap<CountsKey> counts, Predicate<RelationshipRecord> countUpdateCondition, OwningRecordCheck<RelationshipRecord,RelationshipConsistencyReport> inner ) { this.nodeStore = storeAccess.getRawNeoStores().getNodeStore(); this.counts = counts; this.countUpdateCondition = countUpdateCondition; this.inner = inner; }
PropertyReader( StoreAccess storeAccess ) { this.propertyStore = storeAccess.getRawNeoStores().getPropertyStore(); this.nodeStore = storeAccess.getRawNeoStores().getNodeStore(); }
CountsBuilderDecorator( StoreAccess storeAccess ) { this.storeAccess = storeAccess; this.nodeStore = storeAccess.getRawNeoStores().getNodeStore(); this.nodeCountBuildCondition = new MultiPassAvoidanceCondition<>( 0 ); this.relationshipCountBuildCondition = new MultiPassAvoidanceCondition<>( 1 ); }
public NeoStoreIndexStoreView( LockService locks, NeoStores neoStores ) { this.locks = locks; this.neoStores = neoStores; this.propertyStore = neoStores.getPropertyStore(); this.nodeStore = neoStores.getNodeStore(); this.relationshipStore = neoStores.getRelationshipStore(); this.counts = neoStores.getCounts(); }
@Before public void before() { when( neoStores.getNodeStore() ).thenReturn( nodeStore ); when( neoStores.getPropertyStore() ).thenReturn( propertyStore ); }
@Before public void setUp() { when( labelScanStore.newReader() ).thenReturn( labelScanReader ); when( neoStores.getNodeStore() ).thenReturn( nodeStore ); }
private static ExecutionMonitor migrationBatchImporterMonitor( NeoStores legacyStore, final ProgressReporter progressReporter, Configuration config ) { return new BatchImporterProgressMonitor( legacyStore.getNodeStore().getHighId(), legacyStore.getRelationshipStore().getHighId(), config, progressReporter ); }
@Override public boolean visitNodeCommand( Command.NodeCommand command ) { // acquire lock lockGroup.add( lockService.acquireNodeLock( command.getKey(), LockService.LockType.WRITE_LOCK ) ); // update store updateStore( neoStores.getNodeStore(), command ); return false; }
@Override public boolean visitNodeCommand( NodeCommand command ) { NodeStore nodeStore = neoStores.getNodeStore(); track( nodeStore, command ); track( nodeStore.getDynamicLabelStore(), command.getAfter().getDynamicLabelRecords() ); return false; }
Worker( int id, AtomicBoolean end, RecordStorageEngine storageEngine, int batchSize, IndexProxy index ) { this.id = id; this.end = end; this.storageEngine = storageEngine; this.batchSize = batchSize; this.index = index; NeoStores neoStores = this.storageEngine.testAccessNeoStores(); this.nodeIds = neoStores.getNodeStore(); this.commandCreationContext = storageEngine.allocateCommandCreationContext(); }
public Loaders( NeoStores neoStores ) { this( neoStores.getNodeStore(), neoStores.getPropertyStore(), neoStores.getRelationshipStore(), neoStores.getRelationshipGroupStore(), neoStores.getPropertyKeyTokenStore(), neoStores.getRelationshipTypeTokenStore(), neoStores.getLabelTokenStore(), neoStores.getSchemaStore() ); }
public TransactionRepresentation representation( IdGenerator idGenerator, int masterId, int authorId, long lastCommittedTx, NeoStores neoStores ) { TransactionWriter writer = new TransactionWriter( neoStores ); transactionData( new TransactionDataBuilder( writer, neoStores.getNodeStore() ), idGenerator ); idGenerator.updateCorrespondingIdGenerators( neoStores ); return writer.representation( new byte[0], masterId, authorId, startTimestamp, lastCommittedTx, currentTimeMillis() ); } }
CountsComputer( NeoStores stores, PageCache pageCache, DatabaseLayout databaseLayout ) { this( stores.getMetaDataStore().getLastCommittedTransactionId(), stores.getNodeStore(), stores.getRelationshipStore(), (int) stores.getLabelTokenStore().getHighId(), (int) stores.getRelationshipTypeTokenStore().getHighId(), NumberArrayFactory.auto( pageCache, databaseLayout.databaseDirectory(), true, NumberArrayFactory.NO_MONITOR ) ); }
private void assertDynamicLabelRecordInUse( NeoStores store, long id, boolean inUse ) { DynamicArrayStore dynamicLabelStore = store.getNodeStore().getDynamicLabelStore(); DynamicRecord record = dynamicLabelStore.getRecord( id, dynamicLabelStore.nextRecord(), FORCE ); assertEquals( inUse, record.inUse() ); }
void updateCorrespondingIdGenerators( NeoStores neoStores ) { neoStores.getNodeStore().setHighestPossibleIdInUse( nodeId ); neoStores.getRelationshipStore().setHighestPossibleIdInUse( relId ); neoStores.getRelationshipGroupStore().setHighestPossibleIdInUse( relGroupId ); } }
@Before public void startUp() { Config config = Config.defaults( GraphDatabaseSettings.label_block_size, "60" ); StoreFactory storeFactory = new StoreFactory( testDirectory.databaseLayout(), config, new DefaultIdGeneratorFactory( fs.get() ), pageCacheRule.getPageCache( fs.get() ), fs.get(), NullLogProvider.getInstance(), EmptyVersionContextSupplier.EMPTY ); neoStores = storeFactory.openAllNeoStores( true ); nodeStore = neoStores.getNodeStore(); }
@Before public void before() { StoreFactory storeFactory = new StoreFactory( testDirectory.databaseLayout(), Config.defaults(), new DefaultIdGeneratorFactory( fs.get() ), pageCacheRule.getPageCache( fs.get() ), fs.get(), NullLogProvider.getInstance(), EmptyVersionContextSupplier.EMPTY ); neoStores = storeFactory.openAllNeoStores( true ); nodeStore = neoStores.getNodeStore(); }
private Iterable<EntityUpdates> indexUpdatesOf( NeoStores neoStores, TransactionRepresentation transaction ) throws IOException { PropertyCommandsExtractor extractor = new PropertyCommandsExtractor(); transaction.accept( extractor ); CollectingIndexingUpdateService indexingUpdateService = new CollectingIndexingUpdateService(); OnlineIndexUpdates onlineIndexUpdates = new OnlineIndexUpdates( neoStores.getNodeStore(), neoStores.getRelationshipStore(), indexingUpdateService, new PropertyPhysicalToLogicalConverter( neoStores.getPropertyStore() ) ); onlineIndexUpdates.feed( extractor.propertyCommandsByNodeIds(), extractor.propertyCommandsByRelationshipIds(), extractor.nodeCommandsById(), extractor.relationshipCommandsById() ); return indexingUpdateService.entityUpdatesList; }
@Before public void setup() { neoStores = new StoreFactory( storage.directory().databaseLayout(), Config.defaults(), new DefaultIdGeneratorFactory( storage.fileSystem() ), storage.pageCache(), storage.fileSystem(), NullLogProvider.getInstance(), EmptyVersionContextSupplier.EMPTY ).openAllNeoStores( true ); creator = new PropertyCreator( neoStores.getPropertyStore(), new PropertyTraverser() ); owner = neoStores.getNodeStore().newRecord(); }