private void migrateToIsolatedDirectory( DatabaseLayout directoryLayout, DatabaseLayout migrationLayout, String versionToMigrateFrom ) { try { for ( StoreMigrationParticipant participant : participants ) { ProgressReporter progressReporter = progressMonitor.startSection( participant.getName() ); participant.migrate( directoryLayout, migrationLayout, progressReporter, versionToMigrateFrom, upgradableDatabase.currentVersion() ); progressReporter.completed(); } } catch ( IOException | UncheckedIOException e ) { throw new UnableToUpgradeException( "Failure doing migration", e ); } }
/** * Builds the counts store. Requires that {@link #importNodes()} and {@link #importRelationships()} has run. */ public void buildCountsStore() { // Count nodes per label and labels per node try ( CountsAccessor.Updater countsUpdater = neoStore.getCountsStore().reset( neoStore.getLastCommittedTransactionId() ) ) { MigrationProgressMonitor progressMonitor = new SilentMigrationProgressMonitor(); nodeLabelsCache = new NodeLabelsCache( numberArrayFactory, neoStore.getLabelRepository().getHighId() ); MemoryUsageStatsProvider memoryUsageStats = new MemoryUsageStatsProvider( neoStore, nodeLabelsCache ); executeStage( new NodeCountsAndLabelIndexBuildStage( config, nodeLabelsCache, neoStore.getNodeStore(), neoStore.getLabelRepository().getHighId(), countsUpdater, progressMonitor.startSection( "Nodes" ), neoStore.getLabelScanStore(), memoryUsageStats ) ); // Count label-[type]->label executeStage( new RelationshipCountsStage( config, nodeLabelsCache, neoStore.getRelationshipStore(), neoStore.getLabelRepository().getHighId(), neoStore.getRelationshipTypeRepository().getHighId(), countsUpdater, numberArrayFactory, progressMonitor.startSection( "Relationships" ) ) ); } }
private void migrateToIsolatedDirectory( DatabaseLayout directoryLayout, DatabaseLayout migrationLayout, String versionToMigrateFrom ) { try { for ( StoreMigrationParticipant participant : participants ) { ProgressReporter progressReporter = progressMonitor.startSection( participant.getName() ); participant.migrate( directoryLayout, migrationLayout, progressReporter, versionToMigrateFrom, upgradableDatabase.currentVersion() ); progressReporter.completed(); } } catch ( IOException | UncheckedIOException e ) { throw new UnableToUpgradeException( "Failure doing migration", e ); } }
/** * Builds the counts store. Requires that {@link #importNodes()} and {@link #importRelationships()} has run. */ public void buildCountsStore() { // Count nodes per label and labels per node try ( CountsAccessor.Updater countsUpdater = neoStore.getCountsStore().reset( neoStore.getLastCommittedTransactionId() ) ) { MigrationProgressMonitor progressMonitor = new SilentMigrationProgressMonitor(); nodeLabelsCache = new NodeLabelsCache( numberArrayFactory, neoStore.getLabelRepository().getHighId() ); MemoryUsageStatsProvider memoryUsageStats = new MemoryUsageStatsProvider( neoStore, nodeLabelsCache ); executeStage( new NodeCountsAndLabelIndexBuildStage( config, nodeLabelsCache, neoStore.getNodeStore(), neoStore.getLabelRepository().getHighId(), countsUpdater, progressMonitor.startSection( "Nodes" ), neoStore.getLabelScanStore(), memoryUsageStats ) ); // Count label-[type]->label executeStage( new RelationshipCountsStage( config, nodeLabelsCache, neoStore.getRelationshipStore(), neoStore.getLabelRepository().getHighId(), neoStore.getRelationshipTypeRepository().getHighId(), countsUpdater, numberArrayFactory, progressMonitor.startSection( "Relationships" ) ) ); } }