use of org.neo4j.kernel.impl.store.StoreFactory in project neo4j by neo4j.
the class RecordStorageEngineFactory method schemaRuleMigrationAccess.
@Override
public SchemaRuleMigrationAccess schemaRuleMigrationAccess(FileSystemAbstraction fs, PageCache pageCache, Config config, DatabaseLayout databaseLayout, LogService logService, String recordFormats, PageCacheTracer cacheTracer, CursorContext cursorContext, MemoryTracker memoryTracker) {
RecordFormats formats = selectForVersion(recordFormats);
StoreFactory factory = new StoreFactory(databaseLayout, config, new DefaultIdGeneratorFactory(fs, immediate(), databaseLayout.getDatabaseName()), pageCache, fs, formats, logService.getInternalLogProvider(), cacheTracer, writable(), immutable.empty());
NeoStores stores = factory.openNeoStores(true, StoreType.SCHEMA, StoreType.PROPERTY_KEY_TOKEN, StoreType.PROPERTY);
try {
stores.start(cursorContext);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
return createMigrationTargetSchemaRuleAccess(stores, cursorContext, memoryTracker);
}
use of org.neo4j.kernel.impl.store.StoreFactory in project neo4j by neo4j.
the class DumpStore method main.
public static void main(String... args) throws Exception {
if (args == null || args.length == 0) {
System.err.println("SYNTAX: [file[:id[,id]*]]+");
return;
}
try (DefaultFileSystemAbstraction fs = new DefaultFileSystemAbstraction();
PageCache pageCache = createPageCache(fs)) {
final DefaultIdGeneratorFactory idGeneratorFactory = new DefaultIdGeneratorFactory(fs);
Function<File, StoreFactory> createStoreFactory = file -> new StoreFactory(file.getParentFile(), Config.defaults(), idGeneratorFactory, pageCache, fs, logProvider());
for (String arg : args) {
dumpFile(createStoreFactory, arg);
}
}
}
use of org.neo4j.kernel.impl.store.StoreFactory in project neo4j by neo4j.
the class RsdrMain method openStore.
private static StoreFactory openStore(FileSystemAbstraction fileSystem, File storeDir, Config config, PageCache pageCache) {
IdGeneratorFactory idGeneratorFactory = new DefaultIdGeneratorFactory(fileSystem);
NullLogProvider logProvider = NullLogProvider.getInstance();
return new StoreFactory(storeDir, config, idGeneratorFactory, pageCache, fileSystem, logProvider);
}
use of org.neo4j.kernel.impl.store.StoreFactory in project neo4j by neo4j.
the class PropertyDeduplicator method deduplicateProperties.
public void deduplicateProperties() throws IOException {
StoreFactory factory = new StoreFactory(workingDir, pageCache, fileSystem, NullLogProvider.getInstance());
try (NeoStores neoStores = factory.openNeoStores(StoreType.PROPERTY, StoreType.NODE, StoreType.SCHEMA)) {
PropertyStore propertyStore = neoStores.getPropertyStore();
NodeStore nodeStore = neoStores.getNodeStore();
SchemaStore schemaStore = neoStores.getSchemaStore();
PrimitiveLongObjectMap<List<DuplicateCluster>> duplicateClusters = collectConflictingProperties(propertyStore);
resolveConflicts(duplicateClusters, propertyStore, nodeStore, schemaStore, neoStores.getStoreDir());
}
}
use of org.neo4j.kernel.impl.store.StoreFactory in project neo4j by neo4j.
the class ResponsePackerIT method createNeoStore.
private NeoStores createNeoStore(FileSystemAbstraction fs, PageCache pageCache) throws IOException {
File storeDir = new File("/store/");
fs.mkdirs(storeDir);
StoreFactory storeFactory = new StoreFactory(storeDir, pageCache, fs, NullLogProvider.getInstance());
return storeFactory.openAllNeoStores(true);
}
Aggregations