use of org.neo4j.logging.LogProvider in project neo4j by neo4j.
the class MetaDataStoreTest method newMetaDataStore.
private MetaDataStore newMetaDataStore() throws IOException {
LogProvider logProvider = NullLogProvider.getInstance();
StoreFactory storeFactory = new StoreFactory(STORE_DIR, pageCacheWithFakeOverflow, fs, logProvider);
return storeFactory.openNeoStores(true, StoreType.META_DATA).getMetaDataStore();
}
use of org.neo4j.logging.LogProvider in project neo4j by neo4j.
the class StoreFactoryTest method storeFactory.
private StoreFactory storeFactory(Config config, OpenOption... openOptions) {
LogProvider logProvider = NullLogProvider.getInstance();
RecordFormats recordFormats = selectForStoreOrConfig(config, storeDir, fsRule.get(), pageCache, logProvider);
return new StoreFactory(storeDir, DEFAULT_NAME, config, idGeneratorFactory, pageCache, fsRule.get(), recordFormats, logProvider, openOptions);
}
use of org.neo4j.logging.LogProvider in project neo4j by neo4j.
the class ConsistencyCheckTool method run.
ConsistencyCheckService.Result run(String... args) throws ToolFailureException, IOException {
Args arguments = Args.withFlags(VERBOSE).parse(args);
File storeDir = determineStoreDirectory(arguments);
Config tuningConfiguration = readConfiguration(arguments);
boolean verbose = isVerbose(arguments);
checkDbState(storeDir, tuningConfiguration);
LogProvider logProvider = FormattedLogProvider.toOutputStream(System.out);
try {
return consistencyCheckService.runFullConsistencyCheck(storeDir, tuningConfiguration, ProgressMonitorFactory.textual(System.err), logProvider, fs, verbose, new CheckConsistencyConfig(tuningConfiguration));
} catch (ConsistencyCheckIncompleteException e) {
throw new ToolFailureException("Check aborted due to exception", e);
}
}
use of org.neo4j.logging.LogProvider 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);
}
use of org.neo4j.logging.LogProvider in project neo4j by neo4j.
the class LuceneSchemaIndexProviderFactory method newInstance.
@Override
public LuceneSchemaIndexProvider newInstance(KernelContext context, Dependencies dependencies) throws Throwable {
Config config = dependencies.getConfig();
LogProvider logging = dependencies.getLogging().getInternalLogProvider();
boolean ephemeral = config.get(GraphDatabaseFacadeFactory.Configuration.ephemeral);
FileSystemAbstraction fileSystem = dependencies.fileSystem();
DirectoryFactory directoryFactory = directoryFactory(ephemeral, fileSystem);
return new LuceneSchemaIndexProvider(fileSystem, directoryFactory, context.storeDir(), logging, config, context.databaseInfo().operationalMode);
}
Aggregations