From 1eaad89a3c0f25756ea4e9b0d8fb1265f71f133e Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Thu, 10 Dec 2020 15:56:11 +0100 Subject: [PATCH] do not fail on uknown properties when grouping entities by ID --- .../java/eu/dnetlib/dhp/oa/dedup/GroupEntitiesSparkJob.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/GroupEntitiesSparkJob.java b/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/GroupEntitiesSparkJob.java index ec991cddc3..3f01db0fa0 100644 --- a/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/GroupEntitiesSparkJob.java +++ b/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/GroupEntitiesSparkJob.java @@ -10,6 +10,7 @@ import java.util.Objects; import java.util.Optional; import java.util.stream.Collectors; +import com.fasterxml.jackson.databind.DeserializationFeature; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.apache.spark.SparkConf; @@ -42,9 +43,8 @@ public class GroupEntitiesSparkJob { private final static String ID_JPATH = "$.id"; - private final static String SOURCE_JPATH = "$.source"; - - private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + private static ObjectMapper OBJECT_MAPPER = new ObjectMapper() + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); public static void main(String[] args) throws Exception {