From b6e0c7d660e8195808c04aaa8f5db65028e70ec4 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Wed, 19 Apr 2023 09:40:45 +0200 Subject: [PATCH] changed the interaction with Zenodo since the API chenaged --- dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/MakeTar.java | 2 +- .../java/eu/dnetlib/dhp/oa/graph/dump/SendToZenodoHDFS.java | 2 +- .../java/eu/dnetlib/dhp/oa/graph/dump/ZenodoUploadTest.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/MakeTar.java b/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/MakeTar.java index b56849a..cb2e29b 100644 --- a/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/MakeTar.java +++ b/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/MakeTar.java @@ -66,7 +66,7 @@ public class MakeTar implements Serializable { String pathString = p.toString(); String entity = pathString.substring(pathString.lastIndexOf("/") + 1); - MakeTarArchive.tarMaxSize(fileSystem, pathString, outputPath + "/" + entity, entity, gBperSplit); + MakeTarArchive.tarMaxSize(fileSystem, pathString, outputPath + "/" + entity, entity, gBperSplit, true); } } diff --git a/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/SendToZenodoHDFS.java b/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/SendToZenodoHDFS.java index a19a3a5..685af91 100644 --- a/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/SendToZenodoHDFS.java +++ b/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/SendToZenodoHDFS.java @@ -83,7 +83,7 @@ public class SendToZenodoHDFS implements Serializable { String name = pString.substring(pString.lastIndexOf("/") + 1); FSDataInputStream inputStream = fileSystem.open(p); - zenodoApiClient.uploadIS(inputStream, name, fileStatus.getLen()); + zenodoApiClient.uploadIS(inputStream, name); } diff --git a/dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/ZenodoUploadTest.java b/dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/ZenodoUploadTest.java index 99f6219..ada6c83 100644 --- a/dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/ZenodoUploadTest.java +++ b/dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/ZenodoUploadTest.java @@ -73,7 +73,7 @@ public class ZenodoUploadTest { // File f = new File("/tmp/" + community_name); FSDataInputStream inputStream = fs.open(fileStatus.getPath()); - System.out.println(client.uploadIS(inputStream, community_name, fileStatus.getLen())); + System.out.println(client.uploadIS(inputStream, community_name)); } @@ -128,7 +128,7 @@ public class ZenodoUploadTest { // File f = new File("/tmp/" + community_name); FSDataInputStream inputStream = fs.open(fileStatus.getPath()); - System.out.println(client.uploadIS(inputStream, community_name, fileStatus.getLen())); + System.out.println(client.uploadIS(inputStream, community_name)); }