Give a base path to FileSystem.get to resolve s3 file system
This commit is contained in:
parent
4e97c96252
commit
1706e964f0
|
@ -2,6 +2,7 @@
|
||||||
package eu.dnetlib.dhp.oa.dedup;
|
package eu.dnetlib.dhp.oa.dedup;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URI;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
|
@ -132,7 +133,7 @@ public class SparkUpdateEntity extends AbstractSparkAction {
|
||||||
|
|
||||||
boolean result = false;
|
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));
|
FileStatus[] fileStatuses = fileSystem.listStatus(new Path(basePath));
|
||||||
|
|
||||||
for (FileStatus fs : fileStatuses) {
|
for (FileStatus fs : fileStatuses) {
|
||||||
|
|
Loading…
Reference in New Issue