You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vk...@apache.org on 2015/07/26 03:43:45 UTC
[01/10] incubator-ignite git commit: review
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-1.3.3-x86 58c5a1222 -> 6f48d4a97
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/e22f030e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e22f030e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e22f030e
Branch: refs/heads/ignite-1.3.3-x86
Commit: e22f030e20521c3c05c9d1be2bde5c366f4bf7d4
Parents: 58c5a12
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Fri Jul 24 10:06:22 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Fri Jul 24 10:06:22 2015 +0300
----------------------------------------------------------------------
.../apache/ignite/internal/util/nio/ssl/GridNioSslFilter.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e22f030e/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslFilter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslFilter.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslFilter.java
index a05135f..596344b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslFilter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslFilter.java
@@ -182,7 +182,8 @@ public class GridNioSslFilter extends GridNioFilterAdapter {
}
/** {@inheritDoc} */
- @Override public void onExceptionCaught(GridNioSession ses, IgniteCheckedException ex) throws IgniteCheckedException {
+ @Override public void onExceptionCaught(GridNioSession ses, IgniteCheckedException ex)
+ throws IgniteCheckedException {
proceedExceptionCaught(ses, ex);
}
@@ -327,7 +328,8 @@ public class GridNioSslFilter extends GridNioFilterAdapter {
* @throws GridNioException If failed to forward requests to filter chain.
* @return Close future.
*/
- private GridNioFuture<Boolean> shutdownSession(GridNioSession ses, GridNioSslHandler hnd) throws IgniteCheckedException {
+ private GridNioFuture<Boolean> shutdownSession(GridNioSession ses, GridNioSslHandler hnd)
+ throws IgniteCheckedException {
try {
hnd.closeOutbound();
[06/10] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-1.3.3' into ignite-1.3.3
Posted by vk...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.3.3' into ignite-1.3.3
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/eccaa47f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/eccaa47f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/eccaa47f
Branch: refs/heads/ignite-1.3.3-x86
Commit: eccaa47f4c74c5fa6f506684b82da4cd0f7664ba
Parents: 1770f3c 5082d63
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Fri Jul 24 16:28:10 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Fri Jul 24 16:28:10 2015 +0300
----------------------------------------------------------------------
.../GridClientConnectionManagerAdapter.java | 2 +-
.../client/router/impl/GridTcpRouterImpl.java | 2 +-
.../rest/protocols/tcp/GridTcpRestProtocol.java | 3 +-
.../util/nio/ssl/BlockingSslHandler.java | 37 ++++++++++-
.../internal/util/nio/ssl/GridNioSslFilter.java | 49 ++++----------
.../util/nio/ssl/GridNioSslHandler.java | 69 ++++++++++++++++++--
.../communication/tcp/TcpCommunicationSpi.java | 3 +-
.../internal/util/nio/GridNioSslSelfTest.java | 2 +-
8 files changed, 117 insertions(+), 50 deletions(-)
----------------------------------------------------------------------
[05/10] incubator-ignite git commit: wider exception
Posted by vk...@apache.org.
wider exception
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/1770f3c7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1770f3c7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1770f3c7
Branch: refs/heads/ignite-1.3.3-x86
Commit: 1770f3c79cdcb54608e7a01677b0c7ed680976c8
Parents: ccebd43
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Fri Jul 24 16:27:57 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Fri Jul 24 16:27:57 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/processors/cache/GridCacheSwapManager.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1770f3c7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
index 9e9c958..e95378b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
@@ -1971,7 +1971,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
}
}
}
- catch (IgniteCheckedException ex) {
+ catch (Exception ex) {
U.error(log, "Failed to process swap entry.", ex);
}
}
[04/10] incubator-ignite git commit: Added byteOrder and directBuffer
flag to GridNioSslHandler.
Posted by vk...@apache.org.
Added byteOrder and directBuffer flag to GridNioSslHandler.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5082d63a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5082d63a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5082d63a
Branch: refs/heads/ignite-1.3.3-x86
Commit: 5082d63a3fbdc1a4ba8da38bb5d10c27a629aebc
Parents: ccebd43
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Fri Jul 24 15:18:29 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Fri Jul 24 15:18:29 2015 +0300
----------------------------------------------------------------------
.../GridClientConnectionManagerAdapter.java | 2 +-
.../client/router/impl/GridTcpRouterImpl.java | 2 +-
.../rest/protocols/tcp/GridTcpRestProtocol.java | 3 +-
.../util/nio/ssl/BlockingSslHandler.java | 37 ++++++++++-
.../internal/util/nio/ssl/GridNioSslFilter.java | 49 ++++----------
.../util/nio/ssl/GridNioSslHandler.java | 69 ++++++++++++++++++--
.../communication/tcp/TcpCommunicationSpi.java | 3 +-
.../internal/util/nio/GridNioSslSelfTest.java | 2 +-
8 files changed, 117 insertions(+), 50 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5082d63a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnectionManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnectionManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnectionManagerAdapter.java
index 166eed5..e8d29b4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnectionManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnectionManagerAdapter.java
@@ -146,7 +146,7 @@ public abstract class GridClientConnectionManagerAdapter implements GridClientCo
GridNioFilter codecFilter = new GridNioCodecFilter(new GridTcpRestParser(routerClient), gridLog, false);
if (sslCtx != null) {
- GridNioSslFilter sslFilter = new GridNioSslFilter(sslCtx, gridLog);
+ GridNioSslFilter sslFilter = new GridNioSslFilter(sslCtx, true, ByteOrder.nativeOrder(), gridLog);
sslFilter.directMode(false);
sslFilter.clientMode(true);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5082d63a/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridTcpRouterImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridTcpRouterImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridTcpRouterImpl.java
index cd4c607..7b1cd8b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridTcpRouterImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridTcpRouterImpl.java
@@ -228,7 +228,7 @@ public class GridTcpRouterImpl implements GridTcpRouter, GridTcpRouterMBean, Lif
GridNioFilter[] filters;
if (sslCtx != null) {
- GridNioSslFilter sslFilter = new GridNioSslFilter(sslCtx, log);
+ GridNioSslFilter sslFilter = new GridNioSslFilter(sslCtx, false, ByteOrder.nativeOrder(), log);
sslFilter.wantClientAuth(wantClientAuth);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5082d63a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestProtocol.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
index c37c17d..689e050 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
@@ -215,7 +215,8 @@ public class GridTcpRestProtocol extends GridRestProtocolAdapter {
GridNioFilter[] filters;
if (sslCtx != null) {
- GridNioSslFilter sslFilter = new GridNioSslFilter(sslCtx, log);
+ GridNioSslFilter sslFilter = new GridNioSslFilter(sslCtx,
+ cfg.isDirectBuffer(), ByteOrder.nativeOrder(), log);
sslFilter.directMode(false);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5082d63a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
index 9890efe..ee95308 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
@@ -18,7 +18,6 @@
package org.apache.ignite.internal.util.nio.ssl;
import org.apache.ignite.*;
-import org.apache.ignite.internal.util.future.*;
import org.apache.ignite.internal.util.nio.*;
import org.apache.ignite.internal.util.typedef.internal.*;
@@ -30,7 +29,6 @@ import java.nio.channels.*;
import static javax.net.ssl.SSLEngineResult.HandshakeStatus.*;
import static javax.net.ssl.SSLEngineResult.Status.*;
-import static org.apache.ignite.internal.util.nio.ssl.GridNioSslFilter.*;
/**
*
@@ -483,4 +481,39 @@ public class BlockingSslHandler {
throw new IgniteCheckedException("Failed to write byte to socket.", e);
}
}
+
+ /**
+ * Expands the given byte buffer to the requested capacity.
+ *
+ * @param original Original byte buffer.
+ * @param cap Requested capacity.
+ * @return Expanded byte buffer.
+ */
+ private ByteBuffer expandBuffer(ByteBuffer original, int cap) {
+ ByteBuffer res = ByteBuffer.allocate(cap);
+
+ res.order(ByteOrder.nativeOrder());
+
+ original.flip();
+
+ res.put(original);
+
+ return res;
+ }
+
+ /**
+ * Copies the given byte buffer.
+ *
+ * @param original Byte buffer to copy.
+ * @return Copy of the original byte buffer.
+ */
+ private ByteBuffer copy(ByteBuffer original) {
+ ByteBuffer cp = ByteBuffer.allocate(original.remaining());
+
+ cp.put(original);
+
+ cp.flip();
+
+ return cp;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5082d63a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslFilter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslFilter.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslFilter.java
index 596344b..c3cb084 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslFilter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslFilter.java
@@ -52,6 +52,12 @@ public class GridNioSslFilter extends GridNioFilterAdapter {
/** SSL context to use. */
private SSLContext sslCtx;
+ /** Order. */
+ private ByteOrder order;
+
+ /** Allocate direct buffer or heap buffer. */
+ private boolean directBuf;
+
/** Whether SSLEngine should use client mode. */
private boolean clientMode;
@@ -62,13 +68,17 @@ public class GridNioSslFilter extends GridNioFilterAdapter {
* Creates SSL filter.
*
* @param sslCtx SSL context.
+ * @param directBuf Direct buffer flag.
+ * @param order Byte order.
* @param log Logger to use.
*/
- public GridNioSslFilter(SSLContext sslCtx, IgniteLogger log) {
+ public GridNioSslFilter(SSLContext sslCtx, boolean directBuf, ByteOrder order, IgniteLogger log) {
super("SSL filter");
this.log = log;
this.sslCtx = sslCtx;
+ this.directBuf = directBuf;
+ this.order = order;
}
/**
@@ -151,7 +161,7 @@ public class GridNioSslFilter extends GridNioFilterAdapter {
engine.setEnabledProtocols(enabledProtos);
try {
- GridNioSslHandler hnd = new GridNioSslHandler(this, ses, engine, log);
+ GridNioSslHandler hnd = new GridNioSslHandler(this, ses, engine, directBuf, order, log);
ses.addMeta(SSL_HANDLER.ordinal(), hnd);
@@ -384,39 +394,4 @@ public class GridNioSslFilter extends GridNioFilterAdapter {
return (ByteBuffer)msg;
}
-
- /**
- * Expands the given byte buffer to the requested capacity.
- *
- * @param original Original byte buffer.
- * @param cap Requested capacity.
- * @return Expanded byte buffer.
- */
- public static ByteBuffer expandBuffer(ByteBuffer original, int cap) {
- ByteBuffer res = ByteBuffer.allocate(cap);
-
- res.order(ByteOrder.nativeOrder());
-
- original.flip();
-
- res.put(original);
-
- return res;
- }
-
- /**
- * Copies the given byte buffer.
- *
- * @param original Byte buffer to copy.
- * @return Copy of the original byte buffer.
- */
- public static ByteBuffer copy(ByteBuffer original) {
- ByteBuffer cp = ByteBuffer.allocate(original.remaining());
-
- cp.put(original);
-
- cp.flip();
-
- return cp;
- }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5082d63a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslHandler.java
index dc3d870..8c1ac5a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslHandler.java
@@ -45,6 +45,12 @@ class GridNioSslHandler extends ReentrantLock {
/** SSL engine. */
private SSLEngine sslEngine;
+ /** Order. */
+ private ByteOrder order;
+
+ /** Allocate direct buffer or heap buffer. */
+ private boolean directBuf;
+
/** Session of this handler. */
private GridNioSession ses;
@@ -82,10 +88,16 @@ class GridNioSslHandler extends ReentrantLock {
* @param ses Session for which this handler was created.
* @param engine SSL engine instance for this handler.
* @param log Logger to use.
+ * @param directBuf Direct buffer flag.
+ * @param order Byte order.
* @throws SSLException If exception occurred when starting SSL handshake.
*/
- GridNioSslHandler(GridNioSslFilter parent, GridNioSession ses, SSLEngine engine, IgniteLogger log)
- throws SSLException {
+ GridNioSslHandler(GridNioSslFilter parent,
+ GridNioSession ses,
+ SSLEngine engine,
+ boolean directBuf,
+ ByteOrder order,
+ IgniteLogger log) throws SSLException {
assert parent != null;
assert ses != null;
assert engine != null;
@@ -93,6 +105,8 @@ class GridNioSslHandler extends ReentrantLock {
this.parent = parent;
this.ses = ses;
+ this.order = order;
+ this.directBuf = directBuf;
this.log = log;
sslEngine = engine;
@@ -111,8 +125,13 @@ class GridNioSslHandler extends ReentrantLock {
// Allocate a little bit more so SSL engine would not return buffer overflow status.
int netBufSize = sslEngine.getSession().getPacketBufferSize() + 50;
- outNetBuf = ByteBuffer.allocate(netBufSize);
- inNetBuf = ByteBuffer.allocate(netBufSize);
+ outNetBuf = directBuf ? ByteBuffer.allocateDirect(netBufSize) : ByteBuffer.allocate(netBufSize);
+
+ outNetBuf.order(order);
+
+ inNetBuf = directBuf ? ByteBuffer.allocateDirect(netBufSize) : ByteBuffer.allocate(netBufSize);
+
+ inNetBuf.order(order);
// Initially buffer is empty.
outNetBuf.position(0);
@@ -120,9 +139,9 @@ class GridNioSslHandler extends ReentrantLock {
int appBufSize = Math.max(sslEngine.getSession().getApplicationBufferSize() + 50, netBufSize * 2);
- appBuf = ByteBuffer.allocate(appBufSize);
+ appBuf = directBuf ? ByteBuffer.allocateDirect(appBufSize) : ByteBuffer.allocate(appBufSize);
- appBuf.order(ByteOrder.nativeOrder());
+ appBuf.order(order);
if (log.isDebugEnabled())
log.debug("Started SSL session [netBufSize=" + netBufSize + ", appBufSize=" + appBufSize + ']');
@@ -588,6 +607,44 @@ class GridNioSslHandler extends ReentrantLock {
}
/**
+ * Expands the given byte buffer to the requested capacity.
+ *
+ * @param original Original byte buffer.
+ * @param cap Requested capacity.
+ * @return Expanded byte buffer.
+ */
+ private ByteBuffer expandBuffer(ByteBuffer original, int cap) {
+ ByteBuffer res = directBuf ? ByteBuffer.allocateDirect(cap) : ByteBuffer.allocate(cap);
+
+ res.order(order);
+
+ original.flip();
+
+ res.put(original);
+
+ return res;
+ }
+
+ /**
+ * Copies the given byte buffer.
+ *
+ * @param original Byte buffer to copy.
+ * @return Copy of the original byte buffer.
+ */
+ private ByteBuffer copy(ByteBuffer original) {
+ ByteBuffer cp = directBuf ? ByteBuffer.allocateDirect(original.remaining()) :
+ ByteBuffer.allocate(original.remaining());
+
+ cp.order(order);
+
+ cp.put(original);
+
+ cp.flip();
+
+ return cp;
+ }
+
+ /**
* Write request for cases while handshake is not finished yet.
*/
private static class WriteRequest {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5082d63a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index a665a3a..a0acb5c 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -1478,7 +1478,8 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
if (isSslEnabled()) {
GridNioSslFilter sslFilter =
- new GridNioSslFilter(ignite.configuration().getSslContextFactory().create(), log);
+ new GridNioSslFilter(ignite.configuration().getSslContextFactory().create(),
+ true, ByteOrder.nativeOrder(), log);
sslFilter.directMode(true);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5082d63a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java
index 930b5d1..ba22395 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java
@@ -69,7 +69,7 @@ public class GridNioSslSelfTest extends GridNioSelfTest {
.sendQueueLimit(0)
.filters(
new GridNioCodecFilter(parser, log, false),
- new GridNioSslFilter(sslCtx, log))
+ new GridNioSslFilter(sslCtx, true, ByteOrder.nativeOrder(), log))
.build();
srvr.start();
[07/10] incubator-ignite git commit: Changed from "communication
encrypted" to "communication encryption".
Posted by vk...@apache.org.
Changed from "communication encrypted" to "communication encryption".
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b288e829
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b288e829
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b288e829
Branch: refs/heads/ignite-1.3.3-x86
Commit: b288e82968bafe4c59735d2a8f8f3b30958b520d
Parents: eccaa47f
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Fri Jul 24 17:28:38 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Fri Jul 24 17:28:55 2015 +0300
----------------------------------------------------------------------
.../src/main/java/org/apache/ignite/internal/IgniteKernal.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b288e829/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index b746261..4ae14b9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -2065,7 +2065,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
assert log != null;
U.quietAndInfo(log, "Security status [authentication=" + onOff(ctx.security().enabled())
- + ", communication encrypted=" + onOff(ctx.config().getSslContextFactory() != null) + ']');
+ + ", communication encryption=" + onOff(ctx.config().getSslContextFactory() != null) + ']');
}
/**
[10/10] incubator-ignite git commit: added turbo debug mode to
communication
Posted by vk...@apache.org.
added turbo debug mode to communication
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6f48d4a9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6f48d4a9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6f48d4a9
Branch: refs/heads/ignite-1.3.3-x86
Commit: 6f48d4a978036f571ca37a5388d9da6449f01114
Parents: 32f84c1
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Fri Jul 24 19:50:28 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Fri Jul 24 19:50:28 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/internal/IgnitionEx.java | 26 ++++++
.../managers/communication/GridIoManager.java | 84 +++++++++++++++++++-
.../src/test/config/io-manager-benchmark.xml | 3 +-
3 files changed, 110 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6f48d4a9/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 5cbe377..73de99a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -1087,6 +1087,32 @@ public class IgnitionEx {
}
/**
+ * Gets grid instance without waiting its initialization and not throwing any exception.
+ *
+ * @param locNodeId ID of local node the requested grid instance is managing.
+ * @return Grid instance or {@code null}.
+ */
+ public static IgniteKernal gridxx(UUID locNodeId) {
+ IgniteNamedInstance dfltGrid0 = dfltGrid;
+
+ if (dfltGrid0 != null) {
+ IgniteKernal g = dfltGrid0.grid();
+
+ if (g != null && g.getLocalNodeId().equals(locNodeId))
+ return g;
+ }
+
+ for (IgniteNamedInstance grid : grids.values()) {
+ IgniteKernal g = grid.grid();
+
+ if (g != null && g.getLocalNodeId().equals(locNodeId))
+ return g;
+ }
+
+ return null;
+ }
+
+ /**
* Gets an named grid instance. If grid name is {@code null} or empty string,
* then default no-name grid will be returned. Note that caller of this method
* should not assume that it will return the same instance every time.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6f48d4a9/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index c1fb79a..65b6fad 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@ -57,6 +57,9 @@ import static org.jsr166.ConcurrentLinkedHashMap.QueuePolicy.*;
* Grid communication manager.
*/
public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializable>> {
+ /** */
+ public static volatile boolean TURBO_DEBUG_MODE;
+
/** Empty array of message factories. */
public static final MessageFactory[] EMPTY = {};
@@ -894,7 +897,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
if (msgC == null) {
// Message from local node can be processed in sync manner.
- assert locNodeId.equals(nodeId);
+ assert locNodeId.equals(nodeId) || TURBO_DEBUG_MODE;
unwindMessageSet(set, lsnr);
@@ -1019,6 +1022,85 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
}
/**
+ * This method can be used for debugging tricky concurrency issues
+ * with multi-nodes in single JVM.
+ * <p>
+ * This method eliminates network between nodes started in single JVM
+ * when {@link #TURBO_DEBUG_MODE} is set to {@code true}.
+ * <p>
+ * How to use it:
+ * <ol>
+ * <li>Replace {@link #send(ClusterNode, Object, int, Message, byte, boolean, long, boolean)}
+ * with this method.</li>
+ * <li>Start all grids for your test, then set {@link #TURBO_DEBUG_MODE} to {@code true}.</li>
+ * <li>Perform test operations on the topology. No network will be there.</li>
+ * <li>DO NOT turn on turbo debug before all grids started. This will cause deadlocks.</li>
+ * </ol>
+ *
+ * @param node Destination node.
+ * @param topic Topic to send the message to.
+ * @param topicOrd GridTopic enumeration ordinal.
+ * @param msg Message to send.
+ * @param plc Type of processing.
+ * @param ordered Ordered flag.
+ * @param timeout Timeout.
+ * @param skipOnTimeout Whether message can be skipped on timeout.
+ * @throws IgniteCheckedException Thrown in case of any errors.
+ */
+ private void sendTurboDebug(
+ ClusterNode node,
+ Object topic,
+ int topicOrd,
+ Message msg,
+ byte plc,
+ boolean ordered,
+ long timeout,
+ boolean skipOnTimeout
+ ) throws IgniteCheckedException {
+ assert node != null;
+ assert topic != null;
+ assert msg != null;
+
+ GridIoMessage ioMsg = new GridIoMessage(plc, topic, topicOrd, msg, ordered, timeout, skipOnTimeout);
+
+ IgniteKernal rmt;
+
+ if (locNodeId.equals(node.id())) {
+ assert plc != P2P_POOL;
+
+ CommunicationListener commLsnr = this.commLsnr;
+
+ if (commLsnr == null)
+ throw new IgniteCheckedException("Trying to send message when grid is not fully started.");
+
+ if (ordered)
+ processOrderedMessage(locNodeId, ioMsg, plc, null);
+ else
+ processRegularMessage0(ioMsg, locNodeId);
+ }
+ else if (TURBO_DEBUG_MODE && (rmt = IgnitionEx.gridxx(locNodeId)) != null) {
+ if (ioMsg.isOrdered())
+ rmt.context().io().processOrderedMessage(locNodeId, ioMsg, ioMsg.policy(), null);
+ else
+ rmt.context().io().processRegularMessage0(ioMsg, locNodeId);
+ }
+ else {
+ if (topicOrd < 0)
+ ioMsg.topicBytes(marsh.marshal(topic));
+
+ try {
+ getSpi().sendMessage(node, ioMsg);
+ }
+ catch (IgniteSpiException e) {
+ throw new IgniteCheckedException("Failed to send message (node may have left the grid or " +
+ "TCP connection cannot be established due to firewall issues) " +
+ "[node=" + node + ", topic=" + topic +
+ ", msg=" + msg + ", policy=" + plc + ']', e);
+ }
+ }
+ }
+
+ /**
* @param nodeId Id of destination node.
* @param topic Topic to send the message to.
* @param msg Message to send.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6f48d4a9/modules/core/src/test/config/io-manager-benchmark.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/io-manager-benchmark.xml b/modules/core/src/test/config/io-manager-benchmark.xml
index 9b97407..4f481ec 100644
--- a/modules/core/src/test/config/io-manager-benchmark.xml
+++ b/modules/core/src/test/config/io-manager-benchmark.xml
@@ -27,8 +27,7 @@
<property name="communicationSpi">
<bean class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
- <property name="asyncSend" value="true"/>
- <property name="tcpNoDelay" value="false"/>
+ <property name="sharedMemoryPort" value="-1"/>
</bean>
</property>
[09/10] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-1.3.3' into ignite-1.3.3
Posted by vk...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.3.3' into ignite-1.3.3
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/32f84c12
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/32f84c12
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/32f84c12
Branch: refs/heads/ignite-1.3.3-x86
Commit: 32f84c121d0ea6b2c4704bd41c716e0681949940
Parents: b0da1dd b288e82
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Fri Jul 24 17:33:07 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Fri Jul 24 17:33:07 2015 +0300
----------------------------------------------------------------------
.../src/main/java/org/apache/ignite/internal/IgniteKernal.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
[08/10] incubator-ignite git commit: minor
Posted by vk...@apache.org.
minor
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b0da1dd0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b0da1dd0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b0da1dd0
Branch: refs/heads/ignite-1.3.3-x86
Commit: b0da1dd0e294d87c133fd8a10ad47e2a8408fb9f
Parents: eccaa47f
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Fri Jul 24 17:32:42 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Fri Jul 24 17:32:42 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b0da1dd0/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
index 3f05f59..f9c4a4d 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -434,7 +434,7 @@ class ClientImpl extends TcpDiscoveryImpl {
if (timeout > 0 && (U.currentTimeMillis() - startTime) > timeout)
return null;
- U.warn(log, "Failed to connect to any address from IP finder (will retry to join topology " +
+ LT.warn(log, null, "Failed to connect to any address from IP finder (will retry to join topology " +
"in 2000ms): " + addrs0);
Thread.sleep(2000);
[02/10] incubator-ignite git commit: Fixed basic suite.
Posted by vk...@apache.org.
Fixed basic suite.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/fc1fb7a0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/fc1fb7a0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/fc1fb7a0
Branch: refs/heads/ignite-1.3.3-x86
Commit: fc1fb7a06a912326aeda59a05511ee5150b19a9e
Parents: e22f030
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Fri Jul 24 10:12:16 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Fri Jul 24 10:14:25 2015 +0300
----------------------------------------------------------------------
.../discovery/IgniteTopologyPrintFormatSelfTest.java | 6 +++---
.../cmdline/GridCommandLineTransformerSelfTest.java | 12 ++++++------
2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc1fb7a0/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
index 2a71f28..2ec4dec 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
@@ -124,7 +124,7 @@ public class IgniteTopologyPrintFormatSelfTest extends GridCommonAbstractTest {
assertTrue(F.forAny(log.logs(), new IgnitePredicate<String>() {
@Override public boolean apply(String s) {
- return s.contains("Topology snapshot [ver=2, server nodes=2, client nodes=0,")
+ return s.contains("Topology snapshot [ver=2, servers=2, clients=0,")
|| (s.contains(">>> Number of server nodes: 2") && s.contains(">>> Number of client nodes: 0"));
}
}));
@@ -174,7 +174,7 @@ public class IgniteTopologyPrintFormatSelfTest extends GridCommonAbstractTest {
assertTrue(F.forAny(log.logs(), new IgnitePredicate<String>() {
@Override public boolean apply(String s) {
- return s.contains("Topology snapshot [ver=4, server nodes=2, client nodes=2,")
+ return s.contains("Topology snapshot [ver=4, servers=2, clients=2,")
|| (s.contains(">>> Number of server nodes: 2") && s.contains(">>> Number of client nodes: 2"));
}
}));
@@ -225,7 +225,7 @@ public class IgniteTopologyPrintFormatSelfTest extends GridCommonAbstractTest {
assertTrue(F.forAny(log.logs(), new IgnitePredicate<String>() {
@Override public boolean apply(String s) {
- return s.contains("Topology snapshot [ver=5, server nodes=2, client nodes=3,")
+ return s.contains("Topology snapshot [ver=5, servers=2, clients=3,")
|| (s.contains(">>> Number of server nodes: 2") && s.contains(">>> Number of client nodes: 3"));
}
}));
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc1fb7a0/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java
index ec85532..dafc649 100644
--- a/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java
@@ -32,7 +32,7 @@ public class GridCommandLineTransformerSelfTest extends GridCommonAbstractTest {
public void testTransformIfNoArguments() throws Exception {
assertEquals(
"\"INTERACTIVE=0\" \"QUIET=-DIGNITE_QUIET=true\" \"NO_PAUSE=0\" " +
- "\"JVM_XOPTS=\" \"CONFIG=\"",
+ "\"NO_JMX=0\" \"JVM_XOPTS=\" \"CONFIG=\"",
CommandLineTransformer.transform());
}
@@ -101,7 +101,7 @@ public class GridCommandLineTransformerSelfTest extends GridCommonAbstractTest {
*/
public void testTransformIfOnlyPathToConfigSpecified() throws Exception {
assertEquals(
- "\"INTERACTIVE=0\" \"QUIET=-DIGNITE_QUIET=true\" \"NO_PAUSE=0\" " +
+ "\"INTERACTIVE=0\" \"QUIET=-DIGNITE_QUIET=true\" \"NO_PAUSE=0\" \"NO_JMX=0\" " +
"\"JVM_XOPTS=\" \"CONFIG=c:\\qw.xml\"",
CommandLineTransformer.transform("c:\\qw.xml"));
}
@@ -111,10 +111,10 @@ public class GridCommandLineTransformerSelfTest extends GridCommonAbstractTest {
*/
public void testTransformIfAllSupportedArguments() throws Exception {
assertEquals(
- "\"INTERACTIVE=1\" \"QUIET=-DIGNITE_QUIET=false\" \"NO_PAUSE=1\" " +
- "\"JVM_XOPTS=-Xmx1g -Xms1m\" " +
- "\"CONFIG=\"c:\\path to\\русский каталог\"\"",
- CommandLineTransformer.transform("-i", "-np", "-v", "-J-Xmx1g", "-J-Xms1m",
+ "\"INTERACTIVE=1\" \"QUIET=-DIGNITE_QUIET=false\" \"NO_PAUSE=1\" \"NO_JMX=1\" " +
+ "\"JVM_XOPTS=-Xmx1g -Xms1m\" " +
+ "\"CONFIG=\"c:\\path to\\русский каталог\"\"",
+ CommandLineTransformer.transform("-i", "-np", "-v", "-J-Xmx1g", "-J-Xms1m", "-nojmx",
"\"c:\\path to\\русский каталог\""));
}
}
[03/10] incubator-ignite git commit: Moved changes from mater for
test with 150 clients.
Posted by vk...@apache.org.
Moved changes from mater for test with 150 clients.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ccebd43a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ccebd43a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ccebd43a
Branch: refs/heads/ignite-1.3.3-x86
Commit: ccebd43af56950b11644cb778572c9c10fd56a2a
Parents: fc1fb7a
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Fri Jul 24 10:45:02 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Fri Jul 24 10:45:02 2015 +0300
----------------------------------------------------------------------
.../processors/cache/distributed/IgniteCache150ClientsTest.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ccebd43a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java
index 282c7c8..3fc44c0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java
@@ -51,6 +51,7 @@ public class IgniteCache150ClientsTest extends GridCommonAbstractTest {
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
+ cfg.setLocalHost("127.0.0.1");
cfg.setNetworkTimeout(30_000);
cfg.setConnectorConfiguration(null);
cfg.setPeerClassLoadingEnabled(false);