forked from D-Net/dnet-hadoop
[graph provision] person serialisation, limit the number of authorships and coauthorships before expanding the payloads
This commit is contained in:
parent
d1cadc77c9
commit
4f0463d779
|
@ -160,12 +160,12 @@ public class PayloadConverterJob {
|
|||
je.getLinks().forEach(link -> {
|
||||
final String relClass = link.getRelation().getRelClass();
|
||||
|
||||
final Long count = freqs.getOrDefault(relClass, Long.MAX_VALUE);
|
||||
final Long count = freqs.getOrDefault(relClass, 0L);
|
||||
final Long max = MAX_RELATIONS_BY_RELCLASS.getOrDefault(relClass, Long.MAX_VALUE);
|
||||
|
||||
if (count <= max) {
|
||||
rew.add(link);
|
||||
freqs.put(relClass, freqs.get(relClass) + 1);
|
||||
freqs.put(relClass, freqs.getOrDefault(relClass, 0L) + 1);
|
||||
}
|
||||
});
|
||||
je.setLinks(rew);
|
||||
|
|
Loading…
Reference in New Issue