doidoost_dismiss #418
|
@ -97,9 +97,9 @@ public class PrepareAffiliationRelations implements Serializable {
|
||||||
spark, openapcInputPath, collectedFromOpenAPC);
|
spark, openapcInputPath, collectedFromOpenAPC);
|
||||||
|
|
||||||
List<KeyValue> collectedFromDatacite = OafMapperUtils
|
List<KeyValue> collectedFromDatacite = OafMapperUtils
|
||||||
.listKeyValues(ModelConstants.DATACITE_ID, "Datacite");
|
.listKeyValues(ModelConstants.DATACITE_ID, "Datacite");
|
||||||
JavaPairRDD<Text, Text> dataciteRelations = prepareAffiliationRelations(
|
JavaPairRDD<Text, Text> dataciteRelations = prepareAffiliationRelations(
|
||||||
spark, dataciteInputPath, collectedFromDatacite);
|
spark, dataciteInputPath, collectedFromDatacite);
|
||||||
|
|
||||||
crossrefRelations
|
crossrefRelations
|
||||||
.union(pubmedRelations)
|
.union(pubmedRelations)
|
||||||
|
|
|
@ -112,7 +112,7 @@ public class SparkAtomicActionUsageJob implements Serializable {
|
||||||
.joinWith(datasource, resultModel.col("datasourceId").equalTo(datasource.col("id")), "left")
|
.joinWith(datasource, resultModel.col("datasourceId").equalTo(datasource.col("id")), "left")
|
||||||
.map((MapFunction<Tuple2<UsageStatsResultModel, Datasource>, UsageStatsResultModel>) t2 -> {
|
.map((MapFunction<Tuple2<UsageStatsResultModel, Datasource>, UsageStatsResultModel>) t2 -> {
|
||||||
UsageStatsResultModel usrm = t2._1();
|
UsageStatsResultModel usrm = t2._1();
|
||||||
if(Optional.ofNullable(t2._2()).isPresent())
|
if (Optional.ofNullable(t2._2()).isPresent())
|
||||||
usrm.setDatasourceId(usrm.getDatasourceId() + "||" + t2._2().getOfficialname().getValue());
|
usrm.setDatasourceId(usrm.getDatasourceId() + "||" + t2._2().getOfficialname().getValue());
|
||||||
else
|
else
|
||||||
usrm.setDatasourceId(usrm.getDatasourceId() + "||NO_MATCH_FOUND");
|
usrm.setDatasourceId(usrm.getDatasourceId() + "||NO_MATCH_FOUND");
|
||||||
|
|
Loading…
Reference in New Issue