From 10696f2a442d8dd62ac32464b2d6853ea5fd31f8 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Tue, 1 Oct 2024 15:54:13 +0200 Subject: [PATCH] reverted procedure for creating the UsageCounts actionset --- .../actionmanager/usagestats/SparkAtomicActionUsageJob.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/actionmanager/usagestats/SparkAtomicActionUsageJob.java b/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/actionmanager/usagestats/SparkAtomicActionUsageJob.java index 8971537626..d6b52ad9be 100644 --- a/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/actionmanager/usagestats/SparkAtomicActionUsageJob.java +++ b/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/actionmanager/usagestats/SparkAtomicActionUsageJob.java @@ -112,10 +112,7 @@ public class SparkAtomicActionUsageJob implements Serializable { .joinWith(datasource, resultModel.col("datasourceId").equalTo(datasource.col("id")), "left") .map((MapFunction, UsageStatsResultModel>) t2 -> { UsageStatsResultModel usrm = t2._1(); - if (Optional.ofNullable(t2._2()).isPresent()) - usrm.setDatasourceId(usrm.getDatasourceId() + "||" + t2._2().getOfficialname().getValue()); - else - usrm.setDatasourceId(usrm.getDatasourceId() + "||NO_MATCH_FOUND"); + usrm.setDatasourceId(usrm.getDatasourceId() + "||" + t2._2().getOfficialname().getValue()); return usrm; }, Encoders.bean(UsageStatsResultModel.class)) .write()