1
0
Fork 0

[BIP! Scores integration] Create updates as Result rather than subclasses; Result considers also metrics in the mergeFrom operation

This commit is contained in:
Claudio Atzori 2021-01-07 10:07:30 +01:00
parent 2e503ee101
commit 1361c9eb0c
2 changed files with 2 additions and 2 deletions

View File

@ -243,7 +243,7 @@ public class Result extends OafEntity implements Serializable {
Result r = (Result) e;
// TODO consider merging also Measures
measures = mergeLists(measures, r.getMeasures());
instance = mergeLists(instance, r.getInstance());

View File

@ -126,7 +126,7 @@ public class SparkAtomicActionScoreJob implements Serializable {
}, Encoders.bean(BipScore.class))
.groupByKey((MapFunction<BipScore, String>) value -> value.getId(), Encoders.STRING())
.mapGroups((MapGroupsFunction<String, BipScore, I>) (k, it) -> {
Result ret = inputClazz.newInstance();
Result ret = new Result();
BipScore first = it.next();
ret.setId(first.getId());