Search in sources :

Example 1 with PropertyDeduplicator

use of org.neo4j.kernel.impl.storemigration.legacystore.v21.propertydeduplication.PropertyDeduplicator in project neo4j by neo4j.

the class StoreMigrator method removeDuplicateEntityProperties.

private void removeDuplicateEntityProperties(File storeDir, File migrationDir, PageCache pageCache, SchemaIndexProvider schemaIndexProvider, RecordFormats oldFormat) throws IOException {
    StoreFile.fileOperation(COPY, fileSystem, storeDir, migrationDir, Iterables.iterable(StoreFile.PROPERTY_STORE, StoreFile.PROPERTY_KEY_TOKEN_NAMES_STORE, StoreFile.PROPERTY_KEY_TOKEN_STORE, StoreFile.PROPERTY_ARRAY_STORE, StoreFile.PROPERTY_STRING_STORE, StoreFile.NODE_STORE, StoreFile.NODE_LABEL_STORE, StoreFile.SCHEMA_STORE), false, ExistingTargetStrategy.SKIP, StoreFileType.STORE);
    // copy ids only if present
    StoreFile.fileOperation(COPY, fileSystem, storeDir, migrationDir, Iterables.iterable(StoreFile.PROPERTY_STORE, StoreFile.PROPERTY_KEY_TOKEN_NAMES_STORE, StoreFile.PROPERTY_KEY_TOKEN_STORE, StoreFile.NODE_STORE), true, ExistingTargetStrategy.SKIP, StoreFileType.ID);
    // let's remove trailers here on the copied files since the new code doesn't remove them since in 2.3
    // there are no store trailers
    StoreFile.removeTrailers(oldFormat.storeVersion(), fileSystem, migrationDir, pageCache.pageSize());
    new PropertyDeduplicator(fileSystem, migrationDir, pageCache, schemaIndexProvider).deduplicateProperties();
}
Also used : PropertyDeduplicator(org.neo4j.kernel.impl.storemigration.legacystore.v21.propertydeduplication.PropertyDeduplicator)

Aggregations

PropertyDeduplicator (org.neo4j.kernel.impl.storemigration.legacystore.v21.propertydeduplication.PropertyDeduplicator)1