fix serverTopologyNodes method - Fixes
@@ -181,7 +181,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
private static final int DISCOVERY_HISTORY_SIZE = getInteger(IGNITE_DISCOVERY_HISTORY_SIZE, 500);
/** Predicate filtering out daemon nodes. */
- private static final IgnitePredicate<ClusterNode> FILTER_DAEMON = new P1<ClusterNode>() {
+ private static final IgnitePredicate<ClusterNode> FILTER_NOT_DAEMON = new P1<ClusterNode>() {
@Override public boolean apply(ClusterNode n) {
return !n.isDaemon();
}
@@ -736,7 +736,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
discoEvt.eventNode(node);
discoEvt.type(EVT_NODE_JOINED);
- discoEvt.topologySnapshot(topVer, new ArrayList<>(F.view(topSnapshot, FILTER_DAEMON)));
+ discoEvt.topologySnapshot(topVer, new ArrayList<>(F.view(topSnapshot, FILTER_NOT_DAEMON)));
discoWrk.discoCache = discoCache;
@@ -2002,7 +2002,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
* @return Server topology nodes or {@code null} if there are no nodes for passed in version.
*/
@Nullable public Collection<ClusterNode> serverTopologyNodes(long topVer) {
- return F.view(topology(topVer), F.not(FILTER_CLI));
+ return F.view(topology(topVer), F.not(FILTER_CLI), FILTER_NOT_DAEMON);
}
/** @return All daemon nodes in topology. */
@@ -2456,7 +2456,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
evt.node(ctx.discovery().localNode());
evt.eventNode(node);
evt.type(type);
- evt.topologySnapshot(topVer, U.<ClusterNode, ClusterNode>arrayList(topSnapshot, FILTER_DAEMON));
+ evt.topologySnapshot(topVer, U.<ClusterNode, ClusterNode>arrayList(topSnapshot, FILTER_NOT_DAEMON));
if (type == EVT_NODE_METRICS_UPDATED)
evt.message("Metrics were updated: " + node);
