1
0
Fork 0

[Bypass Action Set] modification for comment D-Net/dnet-hadoop#157 (comment)

This commit is contained in:
Miriam Baglioni 2021-11-12 10:54:09 +01:00
parent ffb0ce1d59
commit 47ccb53c4f
2 changed files with 4 additions and 2 deletions

View File

@ -10,6 +10,7 @@ import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import eu.dnetlib.dhp.utils.DHPUtils;
import org.apache.commons.io.IOUtils;
import org.apache.hadoop.hdfs.client.HdfsUtils;
import org.apache.spark.SparkConf;
@ -93,7 +94,7 @@ public class PrepareBipFinder implements Serializable {
.map((MapFunction<BipScore, Result>) v -> {
Result r = new Result();
r.setId(getUnresolvedDoiIndentifier(v.getId()));
r.setId(DHPUtils.generateUnresolvedIdentifier(v.getId(), "doi"));
r.setMeasures(getMeasure(v));
return r;
}, Encoders.bean(Result.class))

View File

@ -8,6 +8,7 @@ import java.io.Serializable;
import java.util.*;
import java.util.stream.Collectors;
import eu.dnetlib.dhp.utils.DHPUtils;
import org.apache.commons.io.IOUtils;
import org.apache.spark.SparkConf;
import org.apache.spark.api.java.function.FlatMapFunction;
@ -78,7 +79,7 @@ public class PrepareFOSSparkJob implements Serializable {
}, Encoders.bean(FOSDataModel.class))
.map((MapFunction<FOSDataModel, Result>) value -> {
Result r = new Result();
r.setId(getUnresolvedDoiIndentifier(value.getDoi()));
r.setId(DHPUtils.generateUnresolvedIdentifier(value.getDoi(), "doi"));
r.setSubject(getSubjects(value));
return r;
}, Encoders.bean(Result.class))