forked from D-Net/dnet-hadoop
[Bypass Action Set] modification for comment D-Net/dnet-hadoop#157 (comment)
This commit is contained in:
parent
ffb0ce1d59
commit
47ccb53c4f
|
@ -10,6 +10,7 @@ import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import eu.dnetlib.dhp.utils.DHPUtils;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.hadoop.hdfs.client.HdfsUtils;
|
import org.apache.hadoop.hdfs.client.HdfsUtils;
|
||||||
import org.apache.spark.SparkConf;
|
import org.apache.spark.SparkConf;
|
||||||
|
@ -93,7 +94,7 @@ public class PrepareBipFinder implements Serializable {
|
||||||
.map((MapFunction<BipScore, Result>) v -> {
|
.map((MapFunction<BipScore, Result>) v -> {
|
||||||
Result r = new Result();
|
Result r = new Result();
|
||||||
|
|
||||||
r.setId(getUnresolvedDoiIndentifier(v.getId()));
|
r.setId(DHPUtils.generateUnresolvedIdentifier(v.getId(), "doi"));
|
||||||
r.setMeasures(getMeasure(v));
|
r.setMeasures(getMeasure(v));
|
||||||
return r;
|
return r;
|
||||||
}, Encoders.bean(Result.class))
|
}, Encoders.bean(Result.class))
|
||||||
|
|
|
@ -8,6 +8,7 @@ import java.io.Serializable;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import eu.dnetlib.dhp.utils.DHPUtils;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.spark.SparkConf;
|
import org.apache.spark.SparkConf;
|
||||||
import org.apache.spark.api.java.function.FlatMapFunction;
|
import org.apache.spark.api.java.function.FlatMapFunction;
|
||||||
|
@ -78,7 +79,7 @@ public class PrepareFOSSparkJob implements Serializable {
|
||||||
}, Encoders.bean(FOSDataModel.class))
|
}, Encoders.bean(FOSDataModel.class))
|
||||||
.map((MapFunction<FOSDataModel, Result>) value -> {
|
.map((MapFunction<FOSDataModel, Result>) value -> {
|
||||||
Result r = new Result();
|
Result r = new Result();
|
||||||
r.setId(getUnresolvedDoiIndentifier(value.getDoi()));
|
r.setId(DHPUtils.generateUnresolvedIdentifier(value.getDoi(), "doi"));
|
||||||
r.setSubject(getSubjects(value));
|
r.setSubject(getSubjects(value));
|
||||||
return r;
|
return r;
|
||||||
}, Encoders.bean(Result.class))
|
}, Encoders.bean(Result.class))
|
||||||
|
|
Loading…
Reference in New Issue