Search in sources :

Example 1 with BatchImporterFactory

use of org.neo4j.internal.batchimport.BatchImporterFactory in project neo4j by neo4j.

the class StoreUpgraderTest method newUpgrader.

private StoreUpgrader newUpgrader(StoreVersionCheck storeVersionCheck, PageCache pageCache, Config config, MigrationProgressMonitor progressMonitor, PageCacheTracer pageCacheTracer, boolean forceUpgrade) {
    NullLogService instance = NullLogService.getInstance();
    BatchImporterFactory batchImporterFactory = BatchImporterFactory.withHighestPriority();
    RecordStorageMigrator defaultMigrator = new RecordStorageMigrator(fileSystem, pageCache, getTuningConfig(), instance, jobScheduler, pageCacheTracer, batchImporterFactory, INSTANCE);
    StorageEngineFactory storageEngineFactory = StorageEngineFactory.defaultStorageEngine();
    SchemaIndexMigrator indexMigrator = new SchemaIndexMigrator("Indexes", fileSystem, pageCache, IndexProvider.EMPTY.directoryStructure(), storageEngineFactory, true);
    LegacyTransactionLogsLocator logsLocator = new LegacyTransactionLogsLocator(config, databaseLayout);
    DatabaseHealth databaseHealth = new DatabaseHealth(NO_OP, NullLog.getInstance());
    Dependencies dependencies = new Dependencies();
    dependencies.satisfyDependencies(new Monitors());
    LogsUpgrader logsUpgrader = new LogsUpgrader(fileSystem, storageEngineFactory, databaseLayout, pageCache, logsLocator, config, dependencies, pageCacheTracer, INSTANCE, databaseHealth, forceUpgrade);
    StoreUpgrader upgrader = new StoreUpgrader(storeVersionCheck, progressMonitor, config, fileSystem, NullLogProvider.getInstance(), logsUpgrader, pageCacheTracer);
    upgrader.addParticipant(indexMigrator);
    upgrader.addParticipant(NOT_PARTICIPATING);
    upgrader.addParticipant(NOT_PARTICIPATING);
    upgrader.addParticipant(NOT_PARTICIPATING);
    upgrader.addParticipant(NOT_PARTICIPATING);
    upgrader.addParticipant(defaultMigrator);
    return upgrader;
}
Also used : DatabaseHealth(org.neo4j.monitoring.DatabaseHealth) StorageEngineFactory(org.neo4j.storageengine.api.StorageEngineFactory) Monitors(org.neo4j.monitoring.Monitors) NullLogService(org.neo4j.logging.internal.NullLogService) BatchImporterFactory(org.neo4j.internal.batchimport.BatchImporterFactory) Dependencies(org.neo4j.collection.Dependencies) SchemaIndexMigrator(org.neo4j.storageengine.migration.SchemaIndexMigrator)

Example 2 with BatchImporterFactory

use of org.neo4j.internal.batchimport.BatchImporterFactory in project neo4j by neo4j.

the class RecordStorageEngineFactory method migrationParticipants.

@Override
public List<StoreMigrationParticipant> migrationParticipants(FileSystemAbstraction fs, Config config, PageCache pageCache, JobScheduler jobScheduler, LogService logService, PageCacheTracer cacheTracer, MemoryTracker memoryTracker) {
    BatchImporterFactory batchImporterFactory = BatchImporterFactory.withHighestPriority();
    RecordStorageMigrator recordStorageMigrator = new RecordStorageMigrator(fs, pageCache, config, logService, jobScheduler, cacheTracer, batchImporterFactory, memoryTracker);
    IdGeneratorMigrator idGeneratorMigrator = new IdGeneratorMigrator(fs, pageCache, config, cacheTracer);
    return List.of(recordStorageMigrator, idGeneratorMigrator);
}
Also used : RecordStorageMigrator(org.neo4j.kernel.impl.storemigration.RecordStorageMigrator) BatchImporterFactory(org.neo4j.internal.batchimport.BatchImporterFactory) IdGeneratorMigrator(org.neo4j.kernel.impl.storemigration.IdGeneratorMigrator)

Aggregations

BatchImporterFactory (org.neo4j.internal.batchimport.BatchImporterFactory)2 Dependencies (org.neo4j.collection.Dependencies)1 IdGeneratorMigrator (org.neo4j.kernel.impl.storemigration.IdGeneratorMigrator)1 RecordStorageMigrator (org.neo4j.kernel.impl.storemigration.RecordStorageMigrator)1 NullLogService (org.neo4j.logging.internal.NullLogService)1 DatabaseHealth (org.neo4j.monitoring.DatabaseHealth)1 Monitors (org.neo4j.monitoring.Monitors)1 StorageEngineFactory (org.neo4j.storageengine.api.StorageEngineFactory)1 SchemaIndexMigrator (org.neo4j.storageengine.migration.SchemaIndexMigrator)1