Search in sources :

Example 1 with LegacyIndexMigrator

use of org.neo4j.kernel.impl.storemigration.participant.LegacyIndexMigrator in project neo4j by neo4j.

the class DatabaseMigrator method migrate.

/**
     * Performs construction of {@link StoreUpgrader} and all of the necessary participants and performs store
     * migration if that is required.
     * @param storeDir store to migrate
     */
public void migrate(File storeDir) {
    LogProvider logProvider = logService.getInternalLogProvider();
    UpgradableDatabase upgradableDatabase = new UpgradableDatabase(fs, new StoreVersionCheck(pageCache), new LegacyStoreVersionCheck(fs), format);
    StoreUpgrader storeUpgrader = new StoreUpgrader(upgradableDatabase, progressMonitor, config, fs, pageCache, logProvider);
    StoreMigrationParticipant schemaMigrator = schemaIndexProvider.storeMigrationParticipant(fs, pageCache, labelScanStoreProvider);
    LegacyIndexMigrator legacyIndexMigrator = new LegacyIndexMigrator(fs, indexProviders, logProvider);
    StoreMigrator storeMigrator = new StoreMigrator(fs, pageCache, config, logService, schemaIndexProvider);
    storeUpgrader.addParticipant(schemaMigrator);
    storeUpgrader.addParticipant(legacyIndexMigrator);
    storeUpgrader.addParticipant(storeMigrator);
    storeUpgrader.migrateIfNeeded(storeDir);
}
Also used : LogProvider(org.neo4j.logging.LogProvider) LegacyStoreVersionCheck(org.neo4j.kernel.impl.storemigration.legacystore.LegacyStoreVersionCheck) LegacyIndexMigrator(org.neo4j.kernel.impl.storemigration.participant.LegacyIndexMigrator) StoreMigrator(org.neo4j.kernel.impl.storemigration.participant.StoreMigrator) LegacyStoreVersionCheck(org.neo4j.kernel.impl.storemigration.legacystore.LegacyStoreVersionCheck)

Aggregations

LegacyStoreVersionCheck (org.neo4j.kernel.impl.storemigration.legacystore.LegacyStoreVersionCheck)1 LegacyIndexMigrator (org.neo4j.kernel.impl.storemigration.participant.LegacyIndexMigrator)1 StoreMigrator (org.neo4j.kernel.impl.storemigration.participant.StoreMigrator)1 LogProvider (org.neo4j.logging.LogProvider)1