Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ED60C17B24 for ; Mon, 1 Jun 2015 11:45:21 +0000 (UTC) Received: (qmail 64816 invoked by uid 500); 1 Jun 2015 11:45:21 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 64779 invoked by uid 500); 1 Jun 2015 11:45:21 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 64766 invoked by uid 99); 1 Jun 2015 11:45:21 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2015 11:45:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 6284BCA5F3 for ; Mon, 1 Jun 2015 11:45:21 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.791 X-Spam-Level: * X-Spam-Status: No, score=1.791 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id yISZo-bJlzPq for ; Mon, 1 Jun 2015 11:45:07 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with SMTP id E5F0047C2E for ; Mon, 1 Jun 2015 11:44:55 +0000 (UTC) Received: (qmail 60817 invoked by uid 99); 1 Jun 2015 11:44:54 -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; Mon, 01 Jun 2015 11:44:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 59995E0509; Mon, 1 Jun 2015 11:44:54 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sevdokimov@apache.org To: commits@ignite.incubator.apache.org Date: Mon, 01 Jun 2015 11:45:25 -0000 Message-Id: <080d5b2ee1834c869152330e8b5aa644@git.apache.org> In-Reply-To: <79a37b0eafb644bc9db80065f03fc61a@git.apache.org> References: <79a37b0eafb644bc9db80065f03fc61a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [33/53] [abbrv] incubator-ignite git commit: # ignite-857 review # ignite-857 review Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9cddb6fe Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9cddb6fe Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9cddb6fe Branch: refs/heads/ignite-sprint-5 Commit: 9cddb6fe669ef9f4ac6792a306a665fa2037f773 Parents: 3dea5f1 Author: Yakov Zhdanov Authored: Thu May 28 17:58:49 2015 +0300 Committer: Yakov Zhdanov Committed: Thu May 28 17:58:49 2015 +0300 ---------------------------------------------------------------------- .../managers/discovery/GridDiscoveryManager.java | 3 ++- .../apache/ignite/spi/discovery/DiscoverySpi.java | 3 ++- .../ignite/spi/discovery/tcp/TcpDiscoverySpi.java | 18 ++++++++++++------ .../spi/discovery/tcp/TcpDiscoverySpiMBean.java | 2 +- ...itionedClientOnlyNoPrimaryFullApiSelfTest.java | 3 ++- 5 files changed, 19 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9cddb6fe/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 a910950..4ef602e 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 @@ -285,7 +285,8 @@ public class GridDiscoveryManager extends GridManagerAdapter { /** {@inheritDoc} */ @Override protected void onKernalStart0() throws IgniteCheckedException { if (Boolean.TRUE.equals(ctx.config().isClientMode()) && !getSpi().isClientMode()) - ctx.performance().add("Enable client mode for TcpDiscoverySpi (set TcpDiscoverySpi.forceServerMode to true)"); + ctx.performance().add("Enable client mode for TcpDiscoverySpi " + + "(set TcpDiscoverySpi.forceServerMode to false)"); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9cddb6fe/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpi.java index e7fbadc..b952087 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpi.java @@ -78,7 +78,8 @@ public interface DiscoverySpi extends IgniteSpi { /** * Sets node attributes and node version which will be distributed in grid during * join process. Note that these attributes cannot be changed and set only once. - * @param attrs Map of node attributes. + * + * @param attrs Map of node attributes. * @param ver Product version. */ public void setNodeAttributes(Map attrs, IgniteProductVersion ver); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9cddb6fe/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java index 52ea78c..64e6001 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java @@ -54,10 +54,12 @@ import java.util.concurrent.atomic.*; * done across it. *

* If node is configured as client node (see {@link IgniteConfiguration#clientMode}) - * TcpDiscoverySpi starts in client mode too. In this case node does not insert to the ring, - * it connects to any node in the ring router and communicated with that node only. - * Thereby slowing or shutdown of client node will not affect whole cluster. If you want to start TcpDiscoverySpi in - * server mode regardless {@link IgniteConfiguration#clientMode} you can set {@link #forceSrvMode} to true. + * TcpDiscoverySpi starts in client mode as well. In this case node does not take its place in the ring, + * but it connects to random node in the ring (IP taken from IP finder configured) and + * use it as a router for discovery traffic. + * Therefore slow client node or its shutdown will not affect whole cluster. If TcpDiscoverySpi + * needs to be started in server mode regardless of {@link IgniteConfiguration#clientMode}, + * {@link #forceSrvMode} should be set to true. *

* At startup SPI tries to send messages to random IP taken from * {@link TcpDiscoveryIpFinder} about self start (stops when send succeeds) @@ -388,11 +390,15 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi, T } /** - * If {@code true} TcpDiscoverySpi will started in server mode regardless - * of {@link IgniteConfiguration#isClientMode()} + * Sets force server mode flag. + *

+ * If {@code true} TcpDiscoverySpi is started in server mode regardless + * of {@link IgniteConfiguration#isClientMode()}. * * @param forceSrvMode forceServerMode flag. + * @return {@code this} for chaining. */ + @IgniteSpiConfiguration(optional = true) public TcpDiscoverySpi setForceServerMode(boolean forceSrvMode) { this.forceSrvMode = forceSrvMode; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9cddb6fe/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBean.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBean.java index 6f2ea6f..f338fab 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBean.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBean.java @@ -277,7 +277,7 @@ public interface TcpDiscoverySpiMBean extends IgniteSpiManagementMBean { * Whether or not discovery is started in client mode. * * @return {@code true} if node is in client mode. - * @throws IllegalStateException If discovery SPI has not started. + * @throws IllegalStateException If discovery SPI is not started. */ @MXBeanDescription("Client mode.") public boolean isClientMode() throws IllegalStateException; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9cddb6fe/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java index 931e347..6b7d1ad 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java @@ -65,7 +65,8 @@ public class GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest extends Grid @Override protected IgniteClosure errorHandler() { return new IgniteClosure() { @Override public Throwable apply(Throwable e) { - if (e instanceof IgniteException || e instanceof IgniteCheckedException || X.hasCause(e, ClusterTopologyCheckedException.class)) { + if (e instanceof IgniteException || e instanceof IgniteCheckedException || + X.hasCause(e, ClusterTopologyCheckedException.class)) { info("Discarding exception: " + e); return null;