Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3224F200D12 for ; Fri, 22 Sep 2017 13:19:37 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 303771609A7; Fri, 22 Sep 2017 11:19:37 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EB6A81609E9 for ; Fri, 22 Sep 2017 13:19:35 +0200 (CEST) Received: (qmail 59142 invoked by uid 500); 22 Sep 2017 11:19:35 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 58770 invoked by uid 99); 22 Sep 2017 11:19:34 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Sep 2017 11:19:34 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5B8FCF5AA3; Fri, 22 Sep 2017 11:19:33 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.apache.org Date: Fri, 22 Sep 2017 11:19:54 -0000 Message-Id: <757eb3b7ed09493b94accb9056f7e5fa@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [23/26] ignite git commit: IGNITE-6480 fix serverTopologyNodes method - Fixes #2726. archived-at: Fri, 22 Sep 2017 11:19:37 -0000 IGNITE-6480 fix serverTopologyNodes method - Fixes #2726. Signed-off-by: Alexey Goncharuk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/05eba9a2 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/05eba9a2 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/05eba9a2 Branch: refs/heads/ignite-3478 Commit: 05eba9a2e19614843157a04fe33c281be65c7d52 Parents: e3d448e Author: Dmitriy Govorukhin Authored: Fri Sep 22 13:14:57 2017 +0300 Committer: Alexey Goncharuk Committed: Fri Sep 22 13:14:57 2017 +0300 ---------------------------------------------------------------------- .../internal/managers/discovery/GridDiscoveryManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/05eba9a2/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java index 33350de..527399d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java @@ -181,7 +181,7 @@ public class GridDiscoveryManager extends GridManagerAdapter { private static final int DISCOVERY_HISTORY_SIZE = getInteger(IGNITE_DISCOVERY_HISTORY_SIZE, 500); /** Predicate filtering out daemon nodes. */ - private static final IgnitePredicate FILTER_DAEMON = new P1() { + private static final IgnitePredicate FILTER_NOT_DAEMON = new P1() { @Override public boolean apply(ClusterNode n) { return !n.isDaemon(); } @@ -736,7 +736,7 @@ public class GridDiscoveryManager extends GridManagerAdapter { 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 { * @return Server topology nodes or {@code null} if there are no nodes for passed in version. */ @Nullable public Collection 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 { evt.node(ctx.discovery().localNode()); evt.eventNode(node); evt.type(type); - evt.topologySnapshot(topVer, U.arrayList(topSnapshot, FILTER_DAEMON)); + evt.topologySnapshot(topVer, U.arrayList(topSnapshot, FILTER_NOT_DAEMON)); if (type == EVT_NODE_METRICS_UPDATED) evt.message("Metrics were updated: " + node);