forked from D-Net/dnet-hadoop
None
This commit is contained in:
parent
b098ee0bae
commit
550cb21c23
|
@ -48,11 +48,7 @@ public class SparkResultToProjectThroughSemRelJob {
|
|||
JavaRDD<Relation> relations = sc.sequenceFile(inputPath + "/relation", Text.class, Text.class)
|
||||
.map(item -> new ObjectMapper().readValue(item._2().toString(), Relation.class)).cache();
|
||||
|
||||
JavaPairRDD<String, TypedRow> result_result = relations
|
||||
.filter(r -> !r.getDataInfo().getDeletedbyinference())
|
||||
.filter(r -> allowedsemrel.contains(r.getRelClass()) && RELATION_RESULTRESULT_REL_TYPE.equals(r.getRelType()))
|
||||
.map(r -> new TypedRow().setSourceId(r.getSource()).setTargetId(r.getTarget()))
|
||||
.mapToPair(toPair());
|
||||
JavaPairRDD<String, TypedRow> result_result = getResultResultSemRel(allowedsemrel, relations);
|
||||
|
||||
JavaPairRDD<String, TypedRow> result_project = relations
|
||||
.filter(r -> !r.getDataInfo().getDeletedbyinference())
|
||||
|
@ -117,4 +113,6 @@ public class SparkResultToProjectThroughSemRelJob {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue