Revision 57655
Added by Michele De Bonis over 4 years ago
PropagationCommunityThroughOrganizationFileReducer.java | ||
---|---|---|
58 | 58 |
|
59 | 59 |
if(communities.size() > 0){ |
60 | 60 |
final ResultProtos.Result.Metadata.Builder metadata = ResultProtos.Result.Metadata.newBuilder(); |
61 |
communities.stream().forEach(community->metadata.addContext(Utils.getContext(community, ORGANIZATION_COMMUNITY_TRUST, CLASS_ORGANIZATION_ID, DATA_INFO_TYPE,CLASS_ORGANIZATION_NAME))); |
|
61 |
communities.stream().forEach(community-> |
|
62 |
{metadata.addContext(Utils.getContext(community, ORGANIZATION_COMMUNITY_TRUST, CLASS_ORGANIZATION_ID, DATA_INFO_TYPE,CLASS_ORGANIZATION_NAME)); |
|
63 |
context.getCounter(COUNTER_PROPAGATION, "added result to community " + community).increment(resultIds.size());}); |
|
64 |
|
|
62 | 65 |
for(String result: resultIds){ |
63 | 66 |
keyOut.set(result); |
64 | 67 |
outValue.set(JsonFormat.printToString(Utils.getUpdate(metadata, result)).getBytes()); |
... | ... | |
66 | 69 |
context.getCounter(COUNTER_PROPAGATION, "added community to result").increment(communities.size()); |
67 | 70 |
} |
68 | 71 |
|
72 |
|
|
73 |
|
|
69 | 74 |
} |
70 | 75 |
|
71 | 76 |
|
Also available in: Unified diff
modification to fit with the tree-dedup