[
https://issues.apache.org/jira/browse/NIFI-3695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15971549#comment-15971549
]
ASF GitHub Bot commented on NIFI-3695:
--------------------------------------
Github user brosander commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1669#discussion_r111806379
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/BulletinMerger.java
---
@@ -71,7 +74,12 @@ public int compare(BulletinEntity o1, BulletinEntity o2)
{
}
}
- Collections.sort(bulletinEntities, (BulletinEntity o1,
BulletinEntity o2) -> {
+ final List<BulletinEntity> entities = Lists.newArrayList();
+
+ final Map<String,List<BulletinEntity>> groupingEntities =
bulletinEntities.stream().collect(Collectors.groupingBy(b ->
b.getBulletin().getMessage()));
+ groupingEntities.keySet().stream().forEach(m ->
entities.add(groupingEntities.get(m).get(0)));
--- End diff --
Would streaming values make this operation a little easier?
Something like:
```
groupingEntities.values().stream().map(e ->
e.get(0)).forEach(entities::add);
```
> Create Node Manager & Notification Utilities
> --------------------------------------------
>
> Key: NIFI-3695
> URL: https://issues.apache.org/jira/browse/NIFI-3695
> Project: Apache NiFi
> Issue Type: Sub-task
> Components: Tools and Build
> Reporter: Yolanda M. Davis
> Assignee: Yolanda M. Davis
>
> The node manager utility should allow system administrators to connect,
> disconnect or remove a node from a cluster on the command line. If a node is
> not part of a cluster an error message should display if node is not part of
> a cluster. If a node is disconnected from a cluster and needs to be
> connected or removed from that cluster the tool should support receiving a
> list of urls to connected nodes which can be used to send the required
> command to the active cluster.
> The notification utility should allow administrators to send messages as
> bulletins to the NiFi with levels of INFO, WARN or ERROR.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)