should have fixed for real now

This commit is contained in:
Miriam Baglioni 2021-02-24 11:51:20 +01:00
parent 5d92df0627
commit 871e5bea29
1 changed files with 5 additions and 5 deletions

View File

@ -108,7 +108,7 @@ public class SparkDumpFunderResults implements Serializable {
}
private static void dumpResults(String nsp, Dataset<CommunityResult> results, String outputPath,
String funderName, String funderDump) {
String funderName) {
results.map((MapFunction<CommunityResult, CommunityResult>) r -> {
if (!Optional.ofNullable(r.getProjects()).isPresent()) {
@ -131,17 +131,17 @@ public class SparkDumpFunderResults implements Serializable {
.write()
.mode(SaveMode.Overwrite)
.option("compression", "gzip")
.json(outputPath + "/" + funderDump);
.json(outputPath + "/" + funderName);
}
private static void writeFunderResult(String funder, Dataset<CommunityResult> results, String outputPath,
String funderDump) {
if (funder.startsWith("40|irb")) {
dumpResults(funder, results, outputPath, "CSF", "HRZZ");
dumpResults(funder, results, outputPath, "MSES", "MZOS");
dumpResults(funder, results, outputPath, "HRZZ");
dumpResults(funder, results, outputPath, "MZOS");
} else
dumpResults(funder, results, outputPath, funderDump, funderDump);
dumpResults(funder, results, outputPath, funderDump);
}