diff --git a/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/kvin/parquet/Compactor.java b/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/kvin/parquet/Compactor.java index 71358d32..c26c8334 100644 --- a/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/kvin/parquet/Compactor.java +++ b/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/kvin/parquet/Compactor.java @@ -68,7 +68,7 @@ public void execute() throws IOException { private void performMappingFileCompaction() throws IOException { Map>> mappingFiles = getMappingFiles(Paths.get(archiveLocation, "metadata")); - if (mappingFiles.get("itemMapping").size() >= mappingFileCompactionTrigger) { + if (mappingFiles.get("items").size() >= mappingFileCompactionTrigger) { kvinParquet.readLock.lock(); generateCompactedMappingFiles(mappingFiles, new File(compactionFolder, "metadata")); kvinParquet.readLock.unlock(); diff --git a/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/kvin/parquet/KvinParquet.java b/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/kvin/parquet/KvinParquet.java index f428b816..dbe1e35e 100644 --- a/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/kvin/parquet/KvinParquet.java +++ b/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/kvin/parquet/KvinParquet.java @@ -133,9 +133,9 @@ private void putInternal(Iterable tuples) throws IOException { java.nio.file.Path tempPath = Paths.get(archiveLocation, ".tmp"); Files.createDirectories(tempPath); - Path itemMappingFile = new Path(tempPath.toString(), "metadata/itemMapping__1.parquet"); - Path propertyMappingFile = new Path(tempPath.toString(), "metadata/propertyMapping__1.parquet"); - Path contextMappingFile = new Path(tempPath.toString(), "metadata/contextMapping__1.parquet"); + Path itemMappingFile = new Path(tempPath.toString(), "metadata/items__1.parquet"); + Path propertyMappingFile = new Path(tempPath.toString(), "metadata/properties__1.parquet"); + Path contextMappingFile = new Path(tempPath.toString(), "metadata/contexts__1.parquet"); ParquetWriter itemMappingWriter = getParquetMappingWriter(itemMappingFile); ParquetWriter propertyMappingWriter = getParquetMappingWriter(propertyMappingFile); @@ -394,18 +394,18 @@ private long getId(URI entity, IdType idType) { String name; switch (idType) { case ITEM_ID: - name = "item"; + name = "items"; break; case PROPERTY_ID: - name = "property"; + name = "properties"; break; default: //case CONTEXT_ID: - name = "context"; + name = "contexts"; break; } FilterPredicate filter = eq(FilterApi.binaryColumn("value"), Binary.fromString(entity.toString())); - File[] mappingFiles = new File(this.archiveLocation + "metadata/").listFiles((file, s) -> s.startsWith(name + "Mapping")); + File[] mappingFiles = new File(this.archiveLocation + "metadata/").listFiles((file, s) -> s.startsWith(name)); if (mappingFiles == null) { return 0L; } @@ -491,7 +491,7 @@ public String getProperty(KvinTupleInternal tuple) { try { FilterPredicate filter = eq(FilterApi.longColumn("id"), propertyId); Path metadataFolder = new Path(this.archiveLocation + "metadata/"); - File[] mappingFiles = new File(metadataFolder.toString()).listFiles((file, s) -> s.startsWith("propertyMapping")); + File[] mappingFiles = new File(metadataFolder.toString()).listFiles((file, s) -> s.startsWith("properties")); IdMapping propertyMapping = null; for (File mappingFile : mappingFiles) {