From 1706e964f083245658750e48c6bd5870872e48cb Mon Sep 17 00:00:00 2001 From: Giambattista Bloisi Date: Mon, 21 Oct 2024 16:42:19 +0200 Subject: [PATCH] Give a base path to FileSystem.get to resolve s3 file system --- .../main/java/eu/dnetlib/dhp/oa/dedup/SparkUpdateEntity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/SparkUpdateEntity.java b/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/SparkUpdateEntity.java index 49021ab58..91795eb47 100644 --- a/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/SparkUpdateEntity.java +++ b/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/SparkUpdateEntity.java @@ -2,6 +2,7 @@ package eu.dnetlib.dhp.oa.dedup; import java.io.IOException; +import java.net.URI; import java.util.Map; import org.apache.commons.io.IOUtils; @@ -132,7 +133,7 @@ public class SparkUpdateEntity extends AbstractSparkAction { boolean result = false; - FileSystem fileSystem = FileSystem.get(new Configuration()); + FileSystem fileSystem = FileSystem.get(URI.create(basePath), new Configuration()); FileStatus[] fileStatuses = fileSystem.listStatus(new Path(basePath)); for (FileStatus fs : fileStatuses) {