From a5517eee358029d301f82eb7b892dbba398f1277 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Mon, 17 Feb 2020 14:20:42 +0100 Subject: [PATCH] adding the mkdirs for creation of propagation folder under provision on tmp --- .../countrypropagation/SparkCountryPropagationJob.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dhp-workflows/dhp-propagation/src/main/java/eu/dnetlib/dhp/countrypropagation/SparkCountryPropagationJob.java b/dhp-workflows/dhp-propagation/src/main/java/eu/dnetlib/dhp/countrypropagation/SparkCountryPropagationJob.java index abcec9dbb..919c69015 100644 --- a/dhp-workflows/dhp-propagation/src/main/java/eu/dnetlib/dhp/countrypropagation/SparkCountryPropagationJob.java +++ b/dhp-workflows/dhp-propagation/src/main/java/eu/dnetlib/dhp/countrypropagation/SparkCountryPropagationJob.java @@ -16,6 +16,7 @@ import org.apache.spark.rdd.RDD; import org.apache.spark.sql.*; import scala.Tuple2; +import java.io.File; import java.util.*; import java.util.stream.Stream; @@ -33,8 +34,13 @@ public class SparkCountryPropagationJob { final JavaSparkContext sc = new JavaSparkContext(spark.sparkContext()); final String inputPath = parser.get("sourcePath"); - final String outputPath = parser.get("outputPath"); + final String outputPath = "/tmp/provision/propagation/countrytoresultfrominstitutionalrepositories"; + File directory = new File(outputPath); + + if(!directory.exists()){ + directory.mkdirs(); + } List whitelist = new ArrayList<>(); List allowedtypes = new ArrayList<>();