[person] -

This commit is contained in:
Miriam Baglioni 2024-10-24 16:15:12 +02:00
parent 01679c935a
commit a7699558ed
2 changed files with 3 additions and 0 deletions

View File

@ -140,6 +140,8 @@ public class SparkExtractPersonRelations {
.flatMap(
(FlatMapFunction<Result, Relation>) r -> getAuthorshipRelations(r),
Encoders.bean(Relation.class))
// .groupByKey((MapFunction<Relation, String>) r-> r.getSource()+r.getTarget(), Encoders.STRING() )
// .mapGroups((MapGroupsFunction<String, Relation, Relation>) (k,it) -> it.next(), Encoders.bean(Relation.class) )
.map(
(MapFunction<Relation, Tuple2<String, Relation>>) r -> new Tuple2<>(
r.getSource() + r.getRelClass() + r.getTarget(), r),