You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/06/29 21:46:46 UTC
[01/50] incubator-ignite git commit: Merge branches 'ignite-gg-10457'
and 'ignite-sprint-7' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10457
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-788-dev-review d5f93e2b9 -> bd46365d0
Merge branches 'ignite-gg-10457' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10457
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/60c4d651
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/60c4d651
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/60c4d651
Branch: refs/heads/ignite-788-dev-review
Commit: 60c4d651fb02b24d8f18b9ee85cae3735501bbb2
Parents: 12821b7 359b431
Author: AKuznetsov <ak...@gridgain.com>
Authored: Wed Jun 24 09:42:57 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Wed Jun 24 09:42:57 2015 +0700
----------------------------------------------------------------------
.../configuration/IgniteReflectionFactory.java | 81 ++++++-
.../distributed/dht/GridDhtLocalPartition.java | 3 +-
.../dht/atomic/GridDhtAtomicCache.java | 9 +-
.../processors/hadoop/HadoopJobInfo.java | 4 +-
.../hadoop/counter/HadoopCounterWriter.java | 5 +-
.../GridCacheReplicatedFailoverSelfTest.java | 5 +
.../testframework/junits/GridAbstractTest.java | 2 +-
modules/hadoop/pom.xml | 78 ------
.../fs/IgniteHadoopFileSystemCounterWriter.java | 9 +-
.../processors/hadoop/HadoopClassLoader.java | 29 +++
.../processors/hadoop/HadoopDefaultJobInfo.java | 27 +--
.../internal/processors/hadoop/HadoopUtils.java | 237 ------------------
.../hadoop/SecondaryFileSystemProvider.java | 3 +-
.../hadoop/fs/HadoopFileSystemCacheUtils.java | 241 +++++++++++++++++++
.../hadoop/fs/HadoopFileSystemsUtils.java | 11 +
.../hadoop/fs/HadoopLazyConcurrentMap.java | 5 +
.../hadoop/jobtracker/HadoopJobTracker.java | 25 +-
.../child/HadoopChildProcessRunner.java | 3 +-
.../processors/hadoop/v2/HadoopV2Job.java | 84 ++++++-
.../hadoop/v2/HadoopV2JobResourceManager.java | 22 +-
.../hadoop/v2/HadoopV2TaskContext.java | 37 ++-
.../apache/ignite/igfs/IgfsEventsTestSuite.java | 5 +-
.../processors/hadoop/HadoopMapReduceTest.java | 2 +-
.../processors/hadoop/HadoopTasksV1Test.java | 7 +-
.../processors/hadoop/HadoopTasksV2Test.java | 7 +-
.../processors/hadoop/HadoopV2JobSelfTest.java | 6 +-
.../collections/HadoopAbstractMapTest.java | 3 +-
.../testsuites/IgniteHadoopTestSuite.java | 2 +-
.../IgniteIgfsLinuxAndMacOSTestSuite.java | 3 +-
29 files changed, 566 insertions(+), 389 deletions(-)
----------------------------------------------------------------------
[26/50] incubator-ignite git commit: # ignite-883 issues with client
connect/reconnect
Posted by sb...@apache.org.
# ignite-883 issues with client connect/reconnect
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/efa92c54
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/efa92c54
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/efa92c54
Branch: refs/heads/ignite-788-dev-review
Commit: efa92c54ab07d7f72b9c83aa3a09e03627d72e4a
Parents: 3e8ddb4
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jun 26 11:06:41 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jun 26 11:06:41 2015 +0300
----------------------------------------------------------------------
.../GridCachePartitionExchangeManager.java | 6 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 151 ++++++-----
.../ignite/spi/discovery/tcp/ServerImpl.java | 103 +++++--
.../spi/discovery/tcp/TcpDiscoverySpi.java | 3 +-
.../tcp/TcpClientDiscoverySpiSelfTest.java | 265 ++++++++++++++++++-
5 files changed, 448 insertions(+), 80 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/efa92c54/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index edd0ad7..af87685 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -826,7 +826,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
updated |= top.update(null, entry.getValue()) != null;
}
- if (updated)
+ if (!cctx.kernalContext().clientNode() && updated)
refreshPartitions();
}
else
@@ -985,7 +985,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
// If not first preloading and no more topology events present,
// then we periodically refresh partition map.
- if (futQ.isEmpty() && preloadFinished) {
+ if (!cctx.kernalContext().clientNode() && futQ.isEmpty() && preloadFinished) {
refreshPartitions(timeout);
timeout = cctx.gridConfig().getNetworkTimeout();
@@ -1051,7 +1051,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
startEvtFired = true;
- if (changed && futQ.isEmpty())
+ if (!cctx.kernalContext().clientNode() && changed && futQ.isEmpty())
refreshPartitions();
}
else {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/efa92c54/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 0c2c059..04276d2 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
@@ -1123,7 +1123,7 @@ class ClientImpl extends TcpDiscoveryImpl {
if (joinLatch.getCount() > 0) {
joinError(new IgniteSpiException("Join process timed out, did not receive response for " +
"join request (consider increasing 'joinTimeout' configuration property) " +
- "[joinTimeout=" + spi.joinTimeout + ", sock=" + sock +']'));
+ "[joinTimeout=" + spi.joinTimeout + ", sock=" + sock + ']'));
break;
}
@@ -1282,17 +1282,21 @@ class ClientImpl extends TcpDiscoveryImpl {
"[msg=" + msg + ", locNode=" + locNode + ']');
}
else {
- boolean topChanged = rmtNodes.putIfAbsent(newNodeId, node) == null;
+ if (nodeAdded()) {
+ boolean topChanged = rmtNodes.putIfAbsent(newNodeId, node) == null;
- if (topChanged) {
- if (log.isDebugEnabled())
- log.debug("Added new node to topology: " + node);
+ if (topChanged) {
+ if (log.isDebugEnabled())
+ log.debug("Added new node to topology: " + node);
- Map<Integer, byte[]> data = msg.newNodeDiscoveryData();
+ Map<Integer, byte[]> data = msg.newNodeDiscoveryData();
- if (data != null)
- spi.onExchange(newNodeId, newNodeId, data, null);
+ if (data != null)
+ spi.onExchange(newNodeId, newNodeId, data, null);
+ }
}
+ else if (log.isDebugEnabled())
+ log.debug("Ignore topology message, local node not added to topology: " + msg);
}
}
@@ -1332,54 +1336,58 @@ class ClientImpl extends TcpDiscoveryImpl {
"[msg=" + msg + ", locNode=" + locNode + ']');
}
else {
- TcpDiscoveryNode node = rmtNodes.get(msg.nodeId());
+ if (nodeAdded()) {
+ TcpDiscoveryNode node = rmtNodes.get(msg.nodeId());
- if (node == null) {
- if (log.isDebugEnabled())
- log.debug("Discarding node add finished message since node is not found [msg=" + msg + ']');
+ if (node == null) {
+ if (log.isDebugEnabled())
+ log.debug("Discarding node add finished message since node is not found [msg=" + msg + ']');
- return;
- }
+ return;
+ }
- boolean evt = false;
+ boolean evt = false;
- long topVer = msg.topologyVersion();
+ long topVer = msg.topologyVersion();
- assert topVer > 0 : msg;
+ assert topVer > 0 : msg;
- if (!node.visible()) {
- node.order(topVer);
- node.visible(true);
+ if (!node.visible()) {
+ node.order(topVer);
+ node.visible(true);
- if (spi.locNodeVer.equals(node.version()))
- node.version(spi.locNodeVer);
+ if (spi.locNodeVer.equals(node.version()))
+ node.version(spi.locNodeVer);
- evt = true;
- }
- else {
- if (log.isDebugEnabled())
- log.debug("Skip node join event, node already joined [msg=" + msg + ", node=" + node + ']');
+ evt = true;
+ }
+ else {
+ if (log.isDebugEnabled())
+ log.debug("Skip node join event, node already joined [msg=" + msg + ", node=" + node + ']');
- assert node.order() == topVer : node;
- }
+ assert node.order() == topVer : node;
+ }
- Collection<ClusterNode> top = updateTopologyHistory(topVer, msg);
+ Collection<ClusterNode> top = updateTopologyHistory(topVer, msg);
- assert top != null && top.contains(node) : "Topology does not contain node [msg=" + msg +
- ", node=" + node + ", top=" + top + ']';
+ assert top != null && top.contains(node) : "Topology does not contain node [msg=" + msg +
+ ", node=" + node + ", top=" + top + ']';
- if (!pending && joinLatch.getCount() > 0) {
- if (log.isDebugEnabled())
- log.debug("Discarding node add finished message (join process is not finished): " + msg);
+ if (!pending && joinLatch.getCount() > 0) {
+ if (log.isDebugEnabled())
+ log.debug("Discarding node add finished message (join process is not finished): " + msg);
- return;
- }
+ return;
+ }
- if (evt) {
- notifyDiscovery(EVT_NODE_JOINED, topVer, node, top);
+ if (evt) {
+ notifyDiscovery(EVT_NODE_JOINED, topVer, node, top);
- spi.stats.onNodeJoined();
+ spi.stats.onNodeJoined();
+ }
}
+ else if (log.isDebugEnabled())
+ log.debug("Ignore topology message, local node not added to topology: " + msg);
}
}
@@ -1397,31 +1405,42 @@ class ClientImpl extends TcpDiscoveryImpl {
if (spi.getSpiContext().isStopping())
return;
- TcpDiscoveryNode node = rmtNodes.remove(msg.creatorNodeId());
+ if (nodeAdded()) {
+ TcpDiscoveryNode node = rmtNodes.remove(msg.creatorNodeId());
- if (node == null) {
- if (log.isDebugEnabled())
- log.debug("Discarding node left message since node is not found [msg=" + msg + ']');
+ if (node == null) {
+ if (log.isDebugEnabled())
+ log.debug("Discarding node left message since node is not found [msg=" + msg + ']');
- return;
- }
+ return;
+ }
- Collection<ClusterNode> top = updateTopologyHistory(msg.topologyVersion(), msg);
+ Collection<ClusterNode> top = updateTopologyHistory(msg.topologyVersion(), msg);
- if (!pending && joinLatch.getCount() > 0) {
- if (log.isDebugEnabled())
- log.debug("Discarding node left message (join process is not finished): " + msg);
+ if (!pending && joinLatch.getCount() > 0) {
+ if (log.isDebugEnabled())
+ log.debug("Discarding node left message (join process is not finished): " + msg);
- return;
- }
+ return;
+ }
- notifyDiscovery(EVT_NODE_LEFT, msg.topologyVersion(), node, top);
+ notifyDiscovery(EVT_NODE_LEFT, msg.topologyVersion(), node, top);
- spi.stats.onNodeLeft();
+ spi.stats.onNodeLeft();
+ }
+ else if (log.isDebugEnabled())
+ log.debug("Ignore topology message, local node not added to topology: " + msg);
}
}
/**
+ * @return {@code True} if received node added message for local node.
+ */
+ private boolean nodeAdded() {
+ return !topHist.isEmpty();
+ }
+
+ /**
* @param msg Message.
*/
private void processNodeFailedMessage(TcpDiscoveryNodeFailedMessage msg) {
@@ -1514,9 +1533,9 @@ class ClientImpl extends TcpDiscoveryImpl {
return;
if (getLocalNodeId().equals(msg.creatorNodeId())) {
- assert msg.success() : msg;
-
if (reconnector != null) {
+ assert msg.success() : msg;
+
currSock = reconnector.sock;
sockWriter.setSocket(currSock);
@@ -1529,7 +1548,7 @@ class ClientImpl extends TcpDiscoveryImpl {
try {
for (TcpDiscoveryAbstractMessage pendingMsg : msg.pendingMessages()) {
if (log.isDebugEnabled())
- log.debug("Process message on reconnect [msg=" + pendingMsg + ']');
+ log.debug("Process pending message on reconnect [msg=" + pendingMsg + ']');
processDiscoveryMessage(pendingMsg);
}
@@ -1538,8 +1557,22 @@ class ClientImpl extends TcpDiscoveryImpl {
pending = false;
}
}
- else if (log.isDebugEnabled())
- log.debug("Discarding reconnect message, reconnect is completed: " + msg);
+ else {
+ if (joinLatch.getCount() > 0) {
+ if (msg.success()) {
+ for (TcpDiscoveryAbstractMessage pendingMsg : msg.pendingMessages()) {
+ if (log.isDebugEnabled())
+ log.debug("Process pending message on connect [msg=" + pendingMsg + ']');
+
+ processDiscoveryMessage(pendingMsg);
+ }
+
+ assert joinLatch.getCount() == 0 : msg;
+ }
+ }
+ else if (log.isDebugEnabled())
+ log.debug("Discarding reconnect message, reconnect is completed: " + msg);
+ }
}
else if (log.isDebugEnabled())
log.debug("Discarding reconnect message for another client: " + msg);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/efa92c54/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index 2458f85..fa3e564 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -2452,7 +2452,40 @@ class ServerImpl extends TcpDiscoveryImpl {
return;
}
- if (log.isDebugEnabled())
+ if (msg.client()) {
+ TcpDiscoveryClientReconnectMessage reconMsg = new TcpDiscoveryClientReconnectMessage(node.id(),
+ node.clientRouterNodeId(),
+ null);
+
+ reconMsg.verify(getLocalNodeId());
+
+ Collection<TcpDiscoveryAbstractMessage> msgs = msgHist.messages(null, node);
+
+ if (msgs != null) {
+ reconMsg.pendingMessages(msgs);
+
+ reconMsg.success(true);
+ }
+
+ if (log.isDebugEnabled())
+ log.debug("Send reconnect message to already joined client " +
+ "[clientNode=" + existingNode + ", msg=" + reconMsg + ']');
+
+ if (getLocalNodeId().equals(node.clientRouterNodeId())) {
+ ClientMessageWorker wrk = clientMsgWorkers.get(node.id());
+
+ if (wrk != null)
+ wrk.addMessage(reconMsg);
+ else if (log.isDebugEnabled())
+ log.debug("Failed to find client message worker " +
+ "[clientNode=" + existingNode + ", msg=" + reconMsg + ']');
+ }
+ else {
+ if (ring.hasRemoteNodes())
+ sendMessageAcrossRing(reconMsg);
+ }
+ }
+ else if (log.isDebugEnabled())
log.debug("Ignoring join request message since node is already in topology: " + msg);
return;
@@ -4104,15 +4137,44 @@ class ServerImpl extends TcpDiscoveryImpl {
}
if (req.client()) {
+ ClientMessageWorker clientMsgWrk0 = new ClientMessageWorker(sock, nodeId);
+
+ while (true) {
+ ClientMessageWorker old = clientMsgWorkers.putIfAbsent(nodeId, clientMsgWrk0);
+
+ if (old == null)
+ break;
+
+ if (old.isInterrupted()) {
+ clientMsgWorkers.remove(nodeId, old);
+
+ continue;
+ }
+
+ old.join(500);
+
+ old = clientMsgWorkers.putIfAbsent(nodeId, clientMsgWrk0);
+
+ if (old == null)
+ break;
+
+ if (log.isDebugEnabled())
+ log.debug("Already have client message worker, closing connection " +
+ "[locNodeId=" + locNodeId +
+ ", rmtNodeId=" + nodeId +
+ ", workerSock=" + old.sock +
+ ", sock=" + sock + ']');
+
+ return;
+ }
+
if (log.isDebugEnabled())
log.debug("Created client message worker [locNodeId=" + locNodeId +
", rmtNodeId=" + nodeId + ", sock=" + sock + ']');
- clientMsgWrk = new ClientMessageWorker(sock, nodeId);
-
- clientMsgWrk.start();
+ assert clientMsgWrk0 == clientMsgWorkers.get(nodeId);
- clientMsgWorkers.put(nodeId, clientMsgWrk);
+ clientMsgWrk = clientMsgWrk0;
}
if (log.isDebugEnabled())
@@ -4188,7 +4250,7 @@ class ServerImpl extends TcpDiscoveryImpl {
TcpDiscoveryJoinRequestMessage req = (TcpDiscoveryJoinRequestMessage)msg;
if (!req.responded()) {
- boolean ok = processJoinRequestMessage(req);
+ boolean ok = processJoinRequestMessage(req, clientMsgWrk);
if (clientMsgWrk != null && ok)
continue;
@@ -4202,14 +4264,17 @@ class ServerImpl extends TcpDiscoveryImpl {
TcpDiscoverySpiState state = spiStateCopy();
if (state == CONNECTED) {
- spi.writeToSocket(sock, RES_OK);
+ spi.writeToSocket(msg, sock, RES_OK);
+
+ if (clientMsgWrk != null && clientMsgWrk.getState() == State.NEW)
+ clientMsgWrk.start();
msgWorker.addMessage(msg);
continue;
}
else {
- spi.writeToSocket(sock, RES_CONTINUE_JOIN);
+ spi.writeToSocket(msg, sock, RES_CONTINUE_JOIN);
break;
}
@@ -4217,7 +4282,7 @@ class ServerImpl extends TcpDiscoveryImpl {
}
else if (msg instanceof TcpDiscoveryDuplicateIdMessage) {
// Send receipt back.
- spi.writeToSocket(sock, RES_OK);
+ spi.writeToSocket(msg, sock, RES_OK);
boolean ignored = false;
@@ -4246,7 +4311,7 @@ class ServerImpl extends TcpDiscoveryImpl {
}
else if (msg instanceof TcpDiscoveryAuthFailedMessage) {
// Send receipt back.
- spi.writeToSocket(sock, RES_OK);
+ spi.writeToSocket(msg, sock, RES_OK);
boolean ignored = false;
@@ -4275,7 +4340,7 @@ class ServerImpl extends TcpDiscoveryImpl {
}
else if (msg instanceof TcpDiscoveryCheckFailedMessage) {
// Send receipt back.
- spi.writeToSocket(sock, RES_OK);
+ spi.writeToSocket(msg, sock, RES_OK);
boolean ignored = false;
@@ -4304,7 +4369,7 @@ class ServerImpl extends TcpDiscoveryImpl {
}
else if (msg instanceof TcpDiscoveryLoopbackProblemMessage) {
// Send receipt back.
- spi.writeToSocket(sock, RES_OK);
+ spi.writeToSocket(msg, sock, RES_OK);
boolean ignored = false;
@@ -4346,7 +4411,7 @@ class ServerImpl extends TcpDiscoveryImpl {
// Send receipt back.
if (clientMsgWrk == null)
- spi.writeToSocket(sock, RES_OK);
+ spi.writeToSocket(msg, sock, RES_OK);
}
catch (IgniteCheckedException e) {
if (log.isDebugEnabled())
@@ -4435,24 +4500,29 @@ class ServerImpl extends TcpDiscoveryImpl {
/**
* @param msg Join request message.
+ * @param clientMsgWrk Client message worker to start.
* @return Whether connection was successful.
* @throws IOException If IO failed.
*/
@SuppressWarnings({"IfMayBeConditional"})
- private boolean processJoinRequestMessage(TcpDiscoveryJoinRequestMessage msg) throws IOException {
+ private boolean processJoinRequestMessage(TcpDiscoveryJoinRequestMessage msg,
+ @Nullable ClientMessageWorker clientMsgWrk) throws IOException {
assert msg != null;
assert !msg.responded();
TcpDiscoverySpiState state = spiStateCopy();
if (state == CONNECTED) {
- spi.writeToSocket(sock, RES_OK);
+ spi.writeToSocket(msg, sock, RES_OK);
if (log.isDebugEnabled())
log.debug("Responded to join request message [msg=" + msg + ", res=" + RES_OK + ']');
msg.responded(true);
+ if (clientMsgWrk != null && clientMsgWrk.getState() == State.NEW)
+ clientMsgWrk.start();
+
msgWorker.addMessage(msg);
return true;
@@ -4477,7 +4547,7 @@ class ServerImpl extends TcpDiscoveryImpl {
// Local node is stopping. Remote node should try next one.
res = RES_CONTINUE_JOIN;
- spi.writeToSocket(sock, res);
+ spi.writeToSocket(msg, sock, res);
if (log.isDebugEnabled())
log.debug("Responded to join request message [msg=" + msg + ", res=" + res + ']');
@@ -4632,6 +4702,7 @@ class ServerImpl extends TcpDiscoveryImpl {
}
/**
+ * @return Ping result.
* @throws InterruptedException If interrupted.
*/
public boolean ping() throws InterruptedException {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/efa92c54/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 1d1916a..7663fe6 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
@@ -1227,12 +1227,13 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi, T
/**
* Writes response to the socket.
*
+ * @param msg Received message.
* @param sock Socket.
* @param res Integer response.
* @throws IOException If IO failed or write timed out.
*/
@SuppressWarnings("ThrowFromFinallyBlock")
- protected void writeToSocket(Socket sock, int res) throws IOException {
+ protected void writeToSocket(TcpDiscoveryAbstractMessage msg, Socket sock, int res) throws IOException {
assert sock != null;
SocketTimeoutObject obj = new SocketTimeoutObject(sock, U.currentTimeMillis() + sockTimeout);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/efa92c54/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
index 8147958..ec6a526 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
@@ -24,7 +24,9 @@ import org.apache.ignite.events.*;
import org.apache.ignite.internal.*;
import org.apache.ignite.internal.util.*;
import org.apache.ignite.internal.util.io.*;
+import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
import org.apache.ignite.spi.*;
@@ -106,11 +108,14 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
/** */
private int maxMissedClientHbs = TcpDiscoverySpi.DFLT_MAX_MISSED_CLIENT_HEARTBEATS;
+ /** */
+ private IgniteInClosure2X<TcpDiscoveryAbstractMessage, Socket> afterWrite;
+
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
- TcpDiscoverySpi disco = new TestTcpDiscoverySpi();
+ TestTcpDiscoverySpi disco = new TestTcpDiscoverySpi();
disco.setMaxMissedClientHeartbeats(maxMissedClientHbs);
@@ -154,6 +159,8 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
disco.setJoinTimeout(joinTimeout);
disco.setNetworkTimeout(netTimeout);
+ disco.afterWrite(afterWrite);
+
cfg.setDiscoverySpi(disco);
if (nodeId != null)
@@ -1016,6 +1023,189 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
}
/**
+ * @throws Exception If failed.
+ */
+ public void testJoinError3() throws Exception {
+ startServerNodes(1);
+
+ Ignite ignite = G.ignite("server-0");
+
+ TestTcpDiscoverySpi srvSpi = ((TestTcpDiscoverySpi)ignite.configuration().getDiscoverySpi());
+
+ srvSpi.failNodeAddFinishedMessage();
+
+ startClientNodes(1);
+
+ checkNodes(1, 1);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testJoinErrorMissedAddFinishedMessage1() throws Exception {
+ missedAddFinishedMessage(true);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testJoinErrorMissedAddFinishedMessage2() throws Exception {
+ missedAddFinishedMessage(false);
+ }
+
+ /**
+ * @param singleSrv If {@code true} starts one server node two otherwise.
+ * @throws Exception If failed.
+ */
+ private void missedAddFinishedMessage(boolean singleSrv) throws Exception {
+ int srvs = singleSrv ? 1 : 2;
+
+ startServerNodes(srvs);
+
+ afterWrite = new CIX2<TcpDiscoveryAbstractMessage, Socket>() {
+ private boolean first = true;
+
+ @Override public void applyx(TcpDiscoveryAbstractMessage msg, Socket sock) throws IgniteCheckedException {
+ if (first && (msg instanceof TcpDiscoveryJoinRequestMessage)) {
+ first = false;
+
+ log.info("Close socket after message write [msg=" + msg + "]");
+
+ try {
+ sock.close();
+ }
+ catch (IOException e) {
+ throw new IgniteCheckedException(e);
+ }
+
+ log.info("Delay after message write [msg=" + msg + "]");
+
+ U.sleep(5000); // Wait when server process join request.
+ }
+ }
+ };
+
+ Ignite srv = singleSrv ? G.ignite("server-0") : G.ignite("server-1");
+
+ TcpDiscoveryNode srvNode = (TcpDiscoveryNode)srv.cluster().localNode();
+
+ assertEquals(singleSrv ? 1 : 2, srvNode.order());
+
+ clientIpFinder = new TcpDiscoveryVmIpFinder();
+
+ clientIpFinder.setAddresses(Collections.singleton("localhost:" + srvNode.discoveryPort()));
+
+ startClientNodes(1);
+
+ TcpDiscoveryNode clientNode = (TcpDiscoveryNode)G.ignite("client-0").cluster().localNode();
+
+ assertEquals(srvNode.id(), clientNode.clientRouterNodeId());
+
+ checkNodes(srvs, 1);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientMessageWorkerStartSingleServer() throws Exception {
+ clientMessageWorkerStart(1, 1);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientMessageWorkerStartTwoServers1() throws Exception {
+ clientMessageWorkerStart(2, 1);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientMessageWorkerStartTwoServers2() throws Exception {
+ clientMessageWorkerStart(2, 2);
+ }
+
+ /**
+ * @param srvs Number of server nodes.
+ * @param connectTo What server connect to.
+ * @throws Exception If failed.
+ */
+ private void clientMessageWorkerStart(int srvs, int connectTo) throws Exception {
+ startServerNodes(srvs);
+
+ Ignite srv = G.ignite("server-" + (connectTo - 1));
+
+ final TcpDiscoveryNode srvNode = (TcpDiscoveryNode)srv.cluster().localNode();
+
+ assertEquals((long)connectTo, srvNode.order());
+
+ TestTcpDiscoverySpi srvSpi = ((TestTcpDiscoverySpi)srv.configuration().getDiscoverySpi());
+
+ final String client0 = "client-" + clientIdx.getAndIncrement();
+
+ srvSpi.delayJoinAckFor = client0;
+
+ IgniteInternalFuture<?> fut = GridTestUtils.runAsync(new Callable<Object>() {
+ @Override public Object call() throws Exception {
+ clientIpFinder = new TcpDiscoveryVmIpFinder();
+
+ clientIpFinder.setAddresses(Collections.singleton("localhost:" + srvNode.discoveryPort()));
+
+ Ignite client = startGrid(client0);
+
+ clientIpFinder = null;
+
+ clientNodeIds.add(client.cluster().localNode().id());
+
+ TestTcpDiscoverySpi clientSpi = ((TestTcpDiscoverySpi)client.configuration().getDiscoverySpi());
+
+ assertFalse(clientSpi.invalidResponse());
+
+ TcpDiscoveryNode clientNode = (TcpDiscoveryNode)client.cluster().localNode();
+
+ assertEquals(srvNode.id(), clientNode.clientRouterNodeId());
+
+ return null;
+ }
+ });
+
+ final String client1 = "client-" + clientIdx.getAndIncrement();
+
+ while (!fut.isDone()) {
+ startGrid(client1);
+
+ stopGrid(client1);
+ }
+
+ fut.get();
+
+ checkNodes(srvs, 1);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testJoinMutlithreaded() throws Exception {
+ startServerNodes(1);
+
+ final int CLIENTS = 30;
+
+ clientsPerSrv = CLIENTS;
+
+ GridTestUtils.runMultiThreaded(new Callable<Void>() {
+ @Override public Void call() throws Exception {
+ Ignite g = startGrid("client-" + clientIdx.getAndIncrement());
+
+ clientNodeIds.add(g.cluster().localNode().id());
+
+ return null;
+ }
+ }, CLIENTS, "start-client");
+
+ checkNodes(1, CLIENTS);
+ }
+
+ /**
* @param clientIdx Client index.
* @param srvIdx Server index.
* @throws Exception In case of error.
@@ -1267,8 +1457,20 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
private AtomicInteger failNodeAdded = new AtomicInteger();
/** */
+ private AtomicInteger failNodeAddFinished = new AtomicInteger();
+
+ /** */
private AtomicInteger failClientReconnect = new AtomicInteger();
+ /** */
+ private IgniteInClosure2X<TcpDiscoveryAbstractMessage, Socket> afterWrite;
+
+ /** */
+ private volatile boolean invalidRes;
+
+ /** */
+ private volatile String delayJoinAckFor;
+
/**
* @param lock Lock.
*/
@@ -1287,6 +1489,20 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
}
/**
+ * @param afterWrite After write callback.
+ */
+ void afterWrite(IgniteInClosure2X<TcpDiscoveryAbstractMessage, Socket> afterWrite) {
+ this.afterWrite = afterWrite;
+ }
+
+ /**
+ * @return {@code True} if received unexpected ack.
+ */
+ boolean invalidResponse() {
+ return invalidRes;
+ }
+
+ /**
*
*/
void failNodeAddedMessage() {
@@ -1296,6 +1512,13 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ void failNodeAddFinishedMessage() {
+ failNodeAddFinished.set(1);
+ }
+
+ /**
+ *
+ */
void failClientReconnectMessage() {
failClientReconnect.set(1);
}
@@ -1322,6 +1545,8 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
if (msg instanceof TcpDiscoveryNodeAddedMessage)
fail = failNodeAdded.getAndDecrement() > 0;
+ else if (msg instanceof TcpDiscoveryNodeAddFinishedMessage)
+ fail = failNodeAddFinished.getAndDecrement() > 0;
else if (msg instanceof TcpDiscoveryClientReconnectMessage)
fail = failClientReconnect.getAndDecrement() > 0;
@@ -1332,6 +1557,9 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
}
super.writeToSocket(sock, msg, bout);
+
+ if (afterWrite != null)
+ afterWrite.apply(msg, sock);
}
/** {@inheritDoc} */
@@ -1365,5 +1593,40 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
impl.workerThread().resume();
}
+
+ /** {@inheritDoc} */
+ @Override protected void writeToSocket(TcpDiscoveryAbstractMessage msg, Socket sock, int res) throws IOException {
+ if (delayJoinAckFor != null && msg instanceof TcpDiscoveryJoinRequestMessage) {
+ TcpDiscoveryJoinRequestMessage msg0 = (TcpDiscoveryJoinRequestMessage)msg;
+
+ if (delayJoinAckFor.equals(msg0.node().attribute(IgniteNodeAttributes.ATTR_GRID_NAME))) {
+ log.info("Delay response [sock=" + sock + ", msg=" + msg0 + ", res=" + res + ']');
+
+ delayJoinAckFor = null;
+
+ try {
+ Thread.sleep(2000);
+ }
+ catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+
+ super.writeToSocket(msg, sock, res);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected int readReceipt(Socket sock, long timeout) throws IOException {
+ int res = super.readReceipt(sock, timeout);
+
+ if (res != TcpDiscoveryImpl.RES_OK) {
+ invalidRes = true;
+
+ log.info("Received unexpected response: " + res);
+ }
+
+ return res;
+ }
}
}
[28/50] incubator-ignite git commit: # ignite-1017
Posted by sb...@apache.org.
# ignite-1017
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5b237e15
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5b237e15
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5b237e15
Branch: refs/heads/ignite-788-dev-review
Commit: 5b237e15ccab0e48b69045cd1c55698ac26b8cd0
Parents: 01d842a
Author: Atri <at...@gmail.com>
Authored: Tue Jun 23 19:02:23 2015 +0530
Committer: ashutak <as...@gridgain.com>
Committed: Fri Jun 26 14:11:35 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/cluster/ClusterGroup.java | 16 ++++++++++++++++
.../internal/cluster/ClusterGroupAdapter.java | 7 +++++++
.../internal/cluster/IgniteClusterAsyncImpl.java | 5 +++++
3 files changed, 28 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b237e15/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
index 2f43fc6..9627f76 100644
--- a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
+++ b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
@@ -131,10 +131,26 @@ public interface ClusterGroup {
* @param name Name of the attribute.
* @param val Optional attribute value to match.
* @return Cluster group for nodes containing specified attribute.
+ *
+ * @deprecated use {@link ClusterGroup#forAttribute(String name, @Nullable Object val}
*/
public ClusterGroup forAttribute(String name, @Nullable String val);
/**
+ * Creates a new cluster group for nodes containing given name and value
+ * specified in user attributes.
+ * <p>
+ * User attributes for every node are optional and can be specified in
+ * grid node configuration. See {@link IgniteConfiguration#getUserAttributes()}
+ * for more information.
+ *
+ * @param name Name of the attribute.
+ * @param val Optional attribute value to match.
+ * @return Cluster group for nodes containing specified attribute.
+ */
+ public ClusterGroup forAttribute(String name, @Nullable Object val);
+
+ /**
* Creates a cluster group of nodes started in server mode.
*
* @see Ignition#setClientMode(boolean)
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b237e15/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
index b940017..414f5ba 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
@@ -352,6 +352,13 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable {
}
/** {@inheritDoc} */
+ @Override public final ClusterGroup forAttribute(String name, @Nullable final Object val) {
+ A.notNull(name, "n");
+
+ return forPredicate(new AttributeFilter(name, val));
+ }
+
+ /** {@inheritDoc} */
@Override public ClusterGroup forServers() {
return forPredicate(new AttributeFilter(IgniteNodeAttributes.ATTR_CLIENT_MODE, false));
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b237e15/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
index 6e68527..f676261 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
@@ -197,6 +197,11 @@ public class IgniteClusterAsyncImpl extends AsyncSupportAdapter<IgniteCluster>
}
/** {@inheritDoc} */
+ @Override public ClusterGroup forAttribute(String name, @Nullable Object val) {
+ return cluster.forAttribute(name, val);
+ }
+
+ /** {@inheritDoc} */
@Override public ClusterGroup forServers() {
return cluster.forServers();
}
[31/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-883' into ignite-sprint-7
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-883' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6e23608f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6e23608f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6e23608f
Branch: refs/heads/ignite-788-dev-review
Commit: 6e23608fd0845fb30c470fbb2f0143c7d5d67f82
Parents: 847ddf5 efa92c5
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jun 26 16:21:22 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jun 26 16:21:22 2015 +0300
----------------------------------------------------------------------
.../GridCachePartitionExchangeManager.java | 6 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 151 ++++++-----
.../ignite/spi/discovery/tcp/ServerImpl.java | 103 +++++--
.../spi/discovery/tcp/TcpDiscoverySpi.java | 3 +-
.../tcp/TcpClientDiscoverySpiSelfTest.java | 265 ++++++++++++++++++-
5 files changed, 448 insertions(+), 80 deletions(-)
----------------------------------------------------------------------
[03/50] incubator-ignite git commit: # ignite-1022
Posted by sb...@apache.org.
# ignite-1022
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/de7dcfe4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/de7dcfe4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/de7dcfe4
Branch: refs/heads/ignite-788-dev-review
Commit: de7dcfe4e4a10e5b557bf7f6c1776026ed6a845e
Parents: 78a9e69
Author: sboikov <sb...@gridgain.com>
Authored: Wed Jun 24 09:29:56 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Jun 24 09:29:56 2015 +0300
----------------------------------------------------------------------
.../datastructures/GridCacheSetAbstractSelfTest.java | 14 ++++++++------
.../cache/distributed/IgniteCacheManyClientsTest.java | 1 +
2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de7dcfe4/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
index 74114d9..0494bcc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
@@ -26,7 +26,6 @@ import org.apache.ignite.internal.processors.cache.query.*;
import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
import org.apache.ignite.testframework.*;
import java.util.*;
@@ -556,6 +555,9 @@ public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstr
* @throws Exception If failed.
*/
public void testNodeJoinsAndLeaves() throws Exception {
+ if (collectionCacheMode() == LOCAL)
+ return;
+
fail("https://issues.apache.org/jira/browse/IGNITE-584");
testNodeJoinsAndLeaves(false);
@@ -565,6 +567,9 @@ public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstr
* @throws Exception If failed.
*/
public void testNodeJoinsAndLeavesCollocated() throws Exception {
+ if (collectionCacheMode() == LOCAL)
+ return;
+
fail("https://issues.apache.org/jira/browse/IGNITE-584");
testNodeJoinsAndLeaves(true);
@@ -575,9 +580,6 @@ public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstr
* @throws Exception If failed.
*/
private void testNodeJoinsAndLeaves(boolean collocated) throws Exception {
- if (collectionCacheMode() == LOCAL)
- return;
-
CollectionConfiguration colCfg = config(collocated);
Set<Integer> set0 = grid(0).set(SET_NAME, colCfg);
@@ -751,7 +753,7 @@ public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstr
IgniteInternalFuture<?> fut;
try {
- fut = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+ fut = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
try {
while (!stop.get()) {
@@ -781,7 +783,7 @@ public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstr
for (int i = 0; i < gridCount(); i++) {
Iterator<GridCacheEntryEx> entries =
- ((IgniteKernal)grid(i)).context().cache().internalCache(cctx.name()).map().allEntries0().iterator();
+ (grid(i)).context().cache().internalCache(cctx.name()).map().allEntries0().iterator();
while (entries.hasNext()) {
GridCacheEntryEx entry = entries.next();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de7dcfe4/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java
index 48884de..1991f01 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java
@@ -66,6 +66,7 @@ public class IgniteCacheManyClientsTest extends GridCommonAbstractTest {
((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
+ ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinderCleanFrequency(10 * 60_000);
((TcpDiscoverySpi)cfg.getDiscoverySpi()).setJoinTimeout(2 * 60_000);
if (!clientDiscovery)
[46/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-7' into ignite-sprint-7
Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-7' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5dff89c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5dff89c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5dff89c6
Branch: refs/heads/ignite-788-dev-review
Commit: 5dff89c650575b6fe92450492027e77ffce48186
Parents: a226666 15f3612
Author: avinogradov <av...@gridgain.com>
Authored: Mon Jun 29 15:56:02 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Mon Jun 29 15:56:02 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/GridKernalContextImpl.java | 2 +-
.../processors/cache/GridCacheProcessor.java | 62 ++++--
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 ------------
.../IgniteDaemonNodeMarshallerCacheTest.java | 192 +++++++++++++++++++
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
.../testsuites/IgniteCacheTestSuite3.java | 1 -
6 files changed, 245 insertions(+), 132 deletions(-)
----------------------------------------------------------------------
[06/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-1045' into ignite-sprint-7
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-1045' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c270bd81
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c270bd81
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c270bd81
Branch: refs/heads/ignite-788-dev-review
Commit: c270bd812df9cdf43d55ce0f546657e2f0e8d1da
Parents: bf1ea21 a2141c6
Author: sboikov <sb...@gridgain.com>
Authored: Wed Jun 24 12:17:57 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Jun 24 12:17:57 2015 +0300
----------------------------------------------------------------------
.../GridDhtPartitionsExchangeFuture.java | 46 +-
...eDynamicCacheStartNoExchangeTimeoutTest.java | 466 +++++++++++++++++++
.../distributed/IgniteCache150ClientsTest.java | 189 ++++++++
...teCacheClientNodePartitionsExchangeTest.java | 1 +
.../testsuites/IgniteCacheTestSuite4.java | 1 +
.../testsuites/IgniteClientTestSuite.java | 38 ++
6 files changed, 733 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c270bd81/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
----------------------------------------------------------------------
[02/50] incubator-ignite git commit: # ignite-733 Changed node print
in cache command.
Posted by sb...@apache.org.
# ignite-733 Changed node print in cache command.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/38f5e415
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/38f5e415
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/38f5e415
Branch: refs/heads/ignite-788-dev-review
Commit: 38f5e415362e8b7bbd520bdf6a19aebf3da61e75
Parents: 359b431
Author: Andrey <an...@gridgain.com>
Authored: Wed Jun 24 13:14:15 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Wed Jun 24 13:14:15 2015 +0700
----------------------------------------------------------------------
.../ignite/visor/commands/cache/VisorCacheCommand.scala | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/38f5e415/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
index 144779c..4c005af 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
@@ -328,7 +328,7 @@ class VisorCacheCommand {
sumT += (
mkCacheName(ad.name()),
ad.mode(),
- ad.nodes.map(nid8),
+ ad.nodes.size(),
(
"min: " + ad.minimumSize,
"avg: " + formatDouble(ad.averageSize),
@@ -619,9 +619,9 @@ class VisorCacheCommand {
val sumT = VisorTextTable()
- sumT #= ("#", "Name(@)", "Mode", "Nodes", "Size")
+ sumT #= ("#", "Name(@)", "Mode", "Size")
- (0 until sortedAggrData.size) foreach (i => {
+ sortedAggrData.indices.foreach(i => {
val ad = sortedAggrData(i)
// Add cache host as visor variable.
@@ -631,7 +631,6 @@ class VisorCacheCommand {
i,
mkCacheName(ad.name()),
ad.mode(),
- ad.nodes,
(
"min: " + ad.minimumSize,
"avg: " + formatDouble(ad.averageSize),
[07/50] incubator-ignite git commit: # ignite-sprint-7 added test
Posted by sb...@apache.org.
# ignite-sprint-7 added test
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b29ff1cb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b29ff1cb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b29ff1cb
Branch: refs/heads/ignite-788-dev-review
Commit: b29ff1cb24ff344fb624a803cf210cae9f9001d2
Parents: c270bd8
Author: sboikov <sb...@gridgain.com>
Authored: Wed Jun 24 15:40:56 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Jun 24 15:40:56 2015 +0300
----------------------------------------------------------------------
.../cache/IgniteDynamicCacheStartSelfTest.java | 37 ++++++++++++++++++++
1 file changed, 37 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b29ff1cb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
index 7905565..9c483ef 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
@@ -1105,4 +1105,41 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
fut.get();
}
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStartStopSameCacheMultinode() throws Exception {
+ fail("https://issues.apache.org/jira/browse/IGNITE-993");
+
+ final AtomicInteger idx = new AtomicInteger();
+
+ IgniteInternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+ @Override public Object call() throws Exception {
+ int node = idx.getAndIncrement();
+
+ Ignite ignite = ignite(node);
+
+ Thread.currentThread().setName("start-stop-" + ignite.name());
+
+ CacheConfiguration ccfg = new CacheConfiguration();
+
+ ccfg.setName("testStartStop");
+
+ for (int i = 0; i < 1000; i++) {
+ log.info("Start cache: " + i);
+
+ try (IgniteCache<Object, Object> cache = ignite.getOrCreateCache(ccfg)) {
+ // No-op.
+ }
+
+ log.info("Stopped cache: " + i);
+ }
+
+ return null;
+ }
+ }, nodeCount(), "start-stop-cache");
+
+ fut.get();
+ }
}
[11/50] incubator-ignite git commit: #IGNITE-GG-10440 Fixed review
notes.
Posted by sb...@apache.org.
#IGNITE-GG-10440 Fixed review notes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c5287050
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c5287050
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c5287050
Branch: refs/heads/ignite-788-dev-review
Commit: c5287050d47e97a8ae817879d7d7f2797f164348
Parents: b2e8fea
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Thu Jun 25 10:39:01 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Thu Jun 25 10:39:01 2015 +0300
----------------------------------------------------------------------
.../main/java/org/apache/ignite/internal/GridKernalContextImpl.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c5287050/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
index 737dbee..65107a7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
@@ -790,6 +790,7 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable
if (cls.equals(IgniteCacheObjectProcessor.class))
return (T)new IgniteCacheObjectProcessorImpl(this);
+
if (cls.equals(CacheConflictResolutionManager.class))
return null;
[20/50] incubator-ignite git commit: Merge branches 'ignite-733' and
'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
into ignite-733
Posted by sb...@apache.org.
Merge branches 'ignite-733' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-733
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e1c49b75
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e1c49b75
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e1c49b75
Branch: refs/heads/ignite-788-dev-review
Commit: e1c49b75fdfe86f34d2e44aa59aaa1851b03d778
Parents: 38f5e41 20a4537
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Jun 25 22:29:06 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Jun 25 22:29:06 2015 +0700
----------------------------------------------------------------------
.../ClientAbstractConnectivitySelfTest.java | 4 +-
.../org/apache/ignite/cluster/ClusterGroup.java | 9 +
.../org/apache/ignite/cluster/ClusterNode.java | 2 +
.../ignite/compute/ComputeTaskSplitAdapter.java | 2 +-
.../ignite/internal/GridKernalContextImpl.java | 3 +
.../internal/cluster/ClusterGroupAdapter.java | 38 +
.../cluster/IgniteClusterAsyncImpl.java | 5 +
.../processors/cache/GridCacheContext.java | 2 +-
.../distributed/dht/GridDhtLockFuture.java | 2 +-
.../GridDhtPartitionsExchangeFuture.java | 46 +-
.../datastructures/DataStructuresProcessor.java | 64 +-
.../processors/plugin/CachePluginManager.java | 10 +-
.../internal/util/GridConfigurationFinder.java | 55 +-
.../ignite/internal/util/IgniteUtils.java | 6 +-
.../internal/ClusterForHostsSelfTest.java | 113 +++
.../internal/ClusterGroupAbstractTest.java | 777 ++++++++++++++++++
.../ignite/internal/ClusterGroupSelfTest.java | 251 ++++++
.../internal/GridProjectionAbstractTest.java | 784 -------------------
.../ignite/internal/GridProjectionSelfTest.java | 251 ------
.../apache/ignite/internal/GridSelfTest.java | 2 +-
.../CacheReadThroughAtomicRestartSelfTest.java | 32 +
...heReadThroughLocalAtomicRestartSelfTest.java | 32 +
.../CacheReadThroughLocalRestartSelfTest.java | 32 +
...dThroughReplicatedAtomicRestartSelfTest.java | 32 +
...cheReadThroughReplicatedRestartSelfTest.java | 32 +
.../cache/CacheReadThroughRestartSelfTest.java | 133 ++++
.../cache/GridCacheAbstractSelfTest.java | 2 +-
...eDynamicCacheStartNoExchangeTimeoutTest.java | 466 +++++++++++
.../cache/IgniteDynamicCacheStartSelfTest.java | 37 +
...GridCacheQueueMultiNodeAbstractSelfTest.java | 4 +-
.../GridCacheSetAbstractSelfTest.java | 22 +-
.../IgniteDataStructureWithJobTest.java | 111 +++
.../distributed/IgniteCache150ClientsTest.java | 189 +++++
...teCacheClientNodePartitionsExchangeTest.java | 1 +
.../distributed/IgniteCacheManyClientsTest.java | 1 +
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 5 -
...achePartitionedMultiNodeFullApiSelfTest.java | 49 +-
.../IgniteCacheTxStoreSessionTest.java | 4 +
.../internal/util/IgniteUtilsSelfTest.java | 22 +
.../ignite/testsuites/IgniteBasicTestSuite.java | 6 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 1 +
.../testsuites/IgniteCacheTestSuite4.java | 8 +
.../testsuites/IgniteClientTestSuite.java | 38 +
.../p2p/GridP2PContinuousDeploymentTask1.java | 2 +-
44 files changed, 2532 insertions(+), 1155 deletions(-)
----------------------------------------------------------------------
[09/50] incubator-ignite git commit: # ignite-917: review
(ignite-1033 fixed).
Posted by sb...@apache.org.
# ignite-917: review (ignite-1033 fixed).
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/532a98f1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/532a98f1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/532a98f1
Branch: refs/heads/ignite-788-dev-review
Commit: 532a98f13933ce34168b64854a735f4f9ee4b8bd
Parents: 2ad4fe1
Author: ashutak <as...@gridgain.com>
Authored: Wed Jun 24 16:19:27 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Wed Jun 24 16:19:27 2015 +0300
----------------------------------------------------------------------
.../ClientAbstractConnectivitySelfTest.java | 4 +-
.../org/apache/ignite/cluster/ClusterNode.java | 2 +
.../internal/cluster/ClusterGroupAdapter.java | 30 +++--
.../cluster/IgniteClusterAsyncImpl.java | 2 +-
.../ignite/internal/util/IgniteUtils.java | 6 +-
.../internal/ClusterForHostsSelfTest.java | 113 +++++++++++++++++++
.../ignite/internal/GridProjectionSelfTest.java | 19 ----
.../internal/util/IgniteUtilsSelfTest.java | 22 ++++
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
9 files changed, 157 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/532a98f1/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java
index 5aec7e5..a2e7c38 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java
@@ -20,9 +20,9 @@ package org.apache.ignite.internal.client.integration;
import org.apache.ignite.*;
import org.apache.ignite.internal.client.*;
import org.apache.ignite.internal.util.*;
-import org.apache.ignite.lang.*;
import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
import org.apache.ignite.testframework.*;
import org.apache.ignite.testframework.junits.common.*;
import org.jetbrains.annotations.*;
@@ -146,7 +146,7 @@ public abstract class ClientAbstractConnectivitySelfTest extends GridCommonAbstr
startRestNode("grid1", LOOPBACK_IP, defaultRestPort());
checkConnectivityByIp(LOOPBACK_IP, F.t((Collection<String>)Collections.singleton(LOOPBACK_IP),
- (Collection<String>)Collections.singleton("")));
+ (Collection<String>)Collections.<String>emptySet()));
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/532a98f1/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java
index 85fd08a..bb792d5 100644
--- a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java
+++ b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java
@@ -188,6 +188,8 @@ public interface ClusterNode {
* <p>
* If {@link IgniteConfiguration#getLocalHost()} value is {@code null} then local wildcard address will be used,
* and this method returns host names of all addresses of that node.
+ * <p/
+ * Note: the loopback address will skipped from the results.
*
* @return Collection of host names.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/532a98f1/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
index 1831321..b940017 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
@@ -578,7 +578,9 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable {
/** {@inheritDoc} */
@Override public final ClusterGroup forHost(String host, String... hosts) {
- return forPredicate(new HostsFilter(host, hosts));
+ A.notNull(host, "host");
+
+ return forPredicate(new HostsFilter(host, hosts));
}
/** {@inheritDoc} */
@@ -772,30 +774,24 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable {
private static final long serialVersionUID = 0L;
/** Hosts Names. */
- private final HashSet hashInputHostNames;
+ private final Collection<String> validHostNames = new HashSet<>();
/**
- * @param name First host name.
- * @param names Host names
+ * @param name First host name.
+ * @param names Host names
*/
- private HostsFilter(String name, String[] names) {
- hashInputHostNames = new HashSet();
-
- if (name != null)
- hashInputHostNames.add(name);
+ private HostsFilter(String name, String... names) {
+ validHostNames.add(name);
- if (names != null && (names.length > 0)) {
- for (String currentInputHostName : names)
- hashInputHostNames.add(currentInputHostName);
- }
+ if (names != null && (names.length > 0))
+ Collections.addAll(validHostNames, names);
}
/** {@inheritDoc} */
@Override public boolean apply(ClusterNode n) {
- for (String currentHostName : n.hostNames()) {
- if (hashInputHostNames.contains(currentHostName)) {
- return true;
- }
+ for (String hostName : n.hostNames()) {
+ if (validHostNames.contains(hostName))
+ return true;
}
return false;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/532a98f1/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
index ca6cf32..6e68527 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
@@ -233,7 +233,7 @@ public class IgniteClusterAsyncImpl extends AsyncSupportAdapter<IgniteCluster>
/** {@inheritDoc} */
@Override public ClusterGroup forHost(String host, String... hosts) {
- return cluster.forHost(host, hosts);
+ return cluster.forHost(host, hosts);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/532a98f1/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 6623e85..f457d6c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -1658,10 +1658,10 @@ public abstract class IgniteUtils {
String ipAddr = addr.getHostAddress();
- hostName = F.isEmpty(hostName) || hostName.equals(ipAddr) || addr.isLoopbackAddress() ? "" : hostName;
-
addrs.add(ipAddr);
- hostNames.add(hostName);
+
+ if (!F.isEmpty(hostName) && !addr.isLoopbackAddress())
+ hostNames.add(hostName);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/532a98f1/modules/core/src/test/java/org/apache/ignite/internal/ClusterForHostsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterForHostsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterForHostsSelfTest.java
new file mode 100644
index 0000000..59c3db9
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterForHostsSelfTest.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.lang.reflect.*;
+import java.util.*;
+
+/**
+ * Test for {@link ClusterGroup#forHost(String, String...)}.
+ *
+ * @see GridProjectionSelfTest
+ */
+@GridCommonTest(group = "Kernal Self")
+public class ClusterForHostsSelfTest extends GridCommonAbstractTest {
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ Collection<String> hostNames = null;
+
+ if ("forHostTest".equals(gridName))
+ hostNames = Arrays.asList("h_1", "h_2", "h_3");
+
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ if (hostNames != null) {
+ TcpDiscoverySpi disco = (TcpDiscoverySpi)cfg.getDiscoverySpi();
+
+ cfg.setDiscoverySpi(new CustomHostsTcpDiscoverySpi(hostNames).setIpFinder(disco.getIpFinder()));
+ }
+
+ return cfg;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testForHosts() throws Exception {
+ Ignite ignite = startGrid("forHostTest");
+
+ assertEquals(1, ignite.cluster().forHost("h_1").nodes().size());
+ assertEquals(1, ignite.cluster().forHost("h_1", "h_3").nodes().size());
+ assertEquals(1, ignite.cluster().forHost("unknown_host", "h_2").nodes().size());
+ assertEquals(1, ignite.cluster().forHost("h_1", "h_3", "unknown_host", "h_2").nodes().size());
+
+ assertEquals(0, ignite.cluster().forHost("unknown_host").nodes().size());
+
+ boolean gotNpe = false;
+
+ try {
+ assertEquals(0, ignite.cluster().forHost(null, null, null).nodes().size());
+ }
+ catch (NullPointerException e) {
+ gotNpe = true;
+ }
+
+ assertTrue(gotNpe);
+ }
+
+ /**
+ * Tcp discovery spi that allow to customise hostNames of created local node.
+ */
+ private static class CustomHostsTcpDiscoverySpi extends TcpDiscoverySpi {
+ /** Hosts. */
+ private final Collection<String> hosts;
+
+ /**
+ * @param hosts Host names which will be retuned by {@link ClusterNode#hostNames()} of created local node.
+ */
+ CustomHostsTcpDiscoverySpi(Collection<String> hosts) {
+ this.hosts = hosts;
+ }
+
+ /**
+ * @param srvPort Server port.
+ */
+ @Override protected void initLocalNode(int srvPort, boolean addExtAddrAttr) {
+ super.initLocalNode(srvPort, addExtAddrAttr);
+
+ try {
+ Field hostNamesField = locNode.getClass().getDeclaredField("hostNames");
+
+ hostNamesField.setAccessible(true);
+
+ hostNamesField.set(locNode, hosts);
+ }
+ catch (IllegalAccessException | NoSuchFieldException e) {
+ U.error(log, "Looks like implementation of " + locNode.getClass()
+ + " class was changed. Need to update test.", e);
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/532a98f1/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
index bd625d9..9fbad80 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
@@ -248,23 +248,4 @@ public class GridProjectionSelfTest extends GridProjectionAbstractTest {
return even ? cnt - 1 : cnt - 2;
}
-
- /**
- * @throws Exception If failed.
- */
- public void testForHost() throws Exception {
- Collection<ClusterNode> allNodes = ignite.cluster().nodes();
- ClusterNode localNode = ignite.cluster().localNode();
- ArrayList<String> inputHostNames = new ArrayList<String> ();
-
- for (ClusterNode currentNode : allNodes)
- Collections.addAll(inputHostNames, currentNode.hostNames().toArray(new String[0]));
-
- String[] inputHostNamesArray = inputHostNames.toArray(new String[] {});
- ClusterGroup resultGroup = ignite.cluster().forHost(inputHostNamesArray[0], inputHostNamesArray);
- ClusterGroup nullTestGroup = ignite.cluster().forHost(null, null);
-
- assert((resultGroup.node(localNode.id())) != null);
- assert((nullTestGroup.node(localNode.id())) == null);
- }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/532a98f1/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java
index 6e3e0e2..4762001 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java
@@ -23,6 +23,7 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
import org.apache.ignite.testframework.*;
import org.apache.ignite.testframework.http.*;
import org.apache.ignite.testframework.junits.*;
@@ -698,6 +699,27 @@ public class IgniteUtilsSelfTest extends GridCommonAbstractTest {
}
/**
+ * @throws Exception If failed.
+ */
+ public void testResolveLocalAddresses() throws Exception {
+ InetAddress inetAddress = InetAddress.getByName("0.0.0.0");
+
+ IgniteBiTuple<Collection<String>, Collection<String>> addrs = U.resolveLocalAddresses(inetAddress);
+
+ Collection<String> hostNames = addrs.get2();
+
+ assertFalse(hostNames.contains(null));
+ assertFalse(hostNames.contains(""));
+ assertFalse(hostNames.contains("127.0.0.1"));
+
+ assertFalse(F.exist(hostNames, new IgnitePredicate<String>() {
+ @Override public boolean apply(String hostName) {
+ return hostName.contains("localhost") || hostName.contains("0:0:0:0:0:0:0:1");
+ }
+ }));
+ }
+
+ /**
* Test enum.
*/
private enum TestEnum {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/532a98f1/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index 2d14728..8be9f31 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@ -66,6 +66,7 @@ public class IgniteBasicTestSuite extends TestSuite {
suite.addTest(new TestSuite(GridSelfTest.class));
GridTestUtils.addTestIfNeeded(suite, GridProjectionSelfTest.class, ignoredTests);
+ suite.addTest(new TestSuite(ClusterForHostsSelfTest.class));
GridTestUtils.addTestIfNeeded(suite, GridMessagingSelfTest.class, ignoredTests);
suite.addTest(new TestSuite(IgniteMessagingWithClientTest.class));
GridTestUtils.addTestIfNeeded(suite, GridMessagingNoPeerClassLoadingSelfTest.class, ignoredTests);
[40/50] incubator-ignite git commit: Merge branch 'ignite-gg-10457'
into ignite-sprint-7
Posted by sb...@apache.org.
Merge branch 'ignite-gg-10457' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c6187a98
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c6187a98
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c6187a98
Branch: refs/heads/ignite-788-dev-review
Commit: c6187a984c6b4f2d78a95bad127a7685aa9baf95
Parents: 6996ea9 775edcb
Author: AKuznetsov <ak...@gridgain.com>
Authored: Mon Jun 29 10:46:30 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Mon Jun 29 10:46:30 2015 +0700
----------------------------------------------------------------------
.../ignite/internal/visor/node/VisorNodeDataCollectorJob.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
[38/50] incubator-ignite git commit: Merge branch 'ignite-1006' into
ignite-sprint-7
Posted by sb...@apache.org.
Merge branch 'ignite-1006' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2ee616de
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2ee616de
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2ee616de
Branch: refs/heads/ignite-788-dev-review
Commit: 2ee616def5f532b2a049f0ba3a1582cd0bbcbaa0
Parents: 70238a6 8fd909d
Author: ashutak <as...@gridgain.com>
Authored: Fri Jun 26 18:02:08 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Fri Jun 26 18:02:08 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/cluster/ClusterGroup.java | 7 +
.../internal/cluster/ClusterGroupAdapter.java | 10 ++
.../cluster/IgniteClusterAsyncImpl.java | 5 +
.../internal/ClusterForHostsSelfTest.java | 113 ---------------
.../internal/ClusterGroupHostsSelfTest.java | 141 +++++++++++++++++++
.../ignite/testsuites/IgniteBasicTestSuite.java | 2 +-
6 files changed, 164 insertions(+), 114 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2ee616de/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2ee616de/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2ee616de/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
----------------------------------------------------------------------
[24/50] incubator-ignite git commit: # ignite-1006
Posted by sb...@apache.org.
# ignite-1006
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c6f66c64
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c6f66c64
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c6f66c64
Branch: refs/heads/ignite-788-dev-review
Commit: c6f66c64becfda669e381aade63ae59d946962c2
Parents: addc91b
Author: Atri <at...@gmail.com>
Authored: Thu Jun 25 14:14:23 2015 +0530
Committer: ashutak <as...@gridgain.com>
Committed: Thu Jun 25 21:11:55 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/cluster/ClusterGroup.java | 7 +++++++
.../internal/cluster/ClusterGroupAdapter.java | 14 +++++++++++++
.../cluster/IgniteClusterAsyncImpl.java | 5 +++++
.../ignite/internal/GridProjectionSelfTest.java | 22 ++++++++++++++++++++
4 files changed, 48 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6f66c64/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
index 06854d4..e2831a7 100644
--- a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
+++ b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
@@ -261,6 +261,13 @@ public interface ClusterGroup {
public ClusterNode node();
/**
+ * Gets the read-only collection of hostnames in this cluster group.
+ *
+ * @return All hostnames in this cluster group.
+ */
+ public Collection<String> hostNames();
+
+ /**
* Gets predicate that defines a subset of nodes for this cluster group.
*
* @return Predicate that defines a subset of nodes for this cluster group.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6f66c64/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
index bb82c3b..8c2fece 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
@@ -295,6 +295,20 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable {
}
/** {@inheritDoc} */
+ @Override public Collection<String> hostNames() {
+ Collection<String> resultHostNames = new HashSet<String> ();
+ Collection<ClusterNode> allNodes = nodes();
+
+ if (!(allNodes.isEmpty()))
+ {
+ for (ClusterNode currentNode : allNodes)
+ Collections.addAll(resultHostNames, currentNode.hostNames().toArray(new String[0]));
+ }
+
+ return resultHostNames;
+ }
+
+ /** {@inheritDoc} */
@Override public final ClusterNode node(UUID id) {
A.notNull(id, "id");
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6f66c64/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
index 7f67b4f..8c6f4e0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
@@ -262,6 +262,11 @@ public class IgniteClusterAsyncImpl extends AsyncSupportAdapter<IgniteCluster>
}
/** {@inheritDoc} */
+ @Override public Collection<String> hostNames() {
+ return cluster.hostNames();
+ }
+
+ /** {@inheritDoc} */
@Nullable @Override public ClusterNode node() {
return cluster.node();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6f66c64/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
index 9fbad80..fc2c64d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
@@ -248,4 +248,26 @@ public class GridProjectionSelfTest extends GridProjectionAbstractTest {
return even ? cnt - 1 : cnt - 2;
}
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testHostNames() throws Exception {
+ Collection<String> inputHostNames = ignite.cluster().hostNames();
+ Collection<String> localNodeHostNames = ignite.cluster().localNode().hostNames();
+ Collection<String> randomNodeHostNames = ignite.cluster().forRandom().node().hostNames();
+ Collection<ClusterNode> allNodes = ignite.cluster().nodes();
+ Collection<String> checkHostNames = new HashSet<String> ();
+
+ for (ClusterNode currentNode : allNodes)
+ Collections.addAll(checkHostNames, currentNode.hostNames().toArray(new String[0]));
+
+ assert(checkHostNames.equals(inputHostNames));
+
+ if (!(localNodeHostNames.isEmpty()) && !(inputHostNames.isEmpty()))
+ assert((inputHostNames.containsAll(localNodeHostNames)) == true);
+
+ if (!(randomNodeHostNames.isEmpty()) && !(inputHostNames.isEmpty()))
+ assert((inputHostNames.containsAll(randomNodeHostNames)) == true);
+ }
}
[33/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-sprint-7' into ignite-gg-10453
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-7' into ignite-gg-10453
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d86882c3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d86882c3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d86882c3
Branch: refs/heads/ignite-788-dev-review
Commit: d86882c3597080c62877ba36b916dda29089b900
Parents: 3231f93 6e23608
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jun 26 16:55:32 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jun 26 16:55:32 2015 +0300
----------------------------------------------------------------------
.../GridCachePartitionExchangeManager.java | 6 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 151 ++++++-----
.../ignite/spi/discovery/tcp/ServerImpl.java | 103 +++++--
.../spi/discovery/tcp/TcpDiscoverySpi.java | 3 +-
...achePartitionedMultiNodeFullApiSelfTest.java | 4 +-
.../tcp/TcpClientDiscoverySpiSelfTest.java | 265 ++++++++++++++++++-
6 files changed, 451 insertions(+), 81 deletions(-)
----------------------------------------------------------------------
[42/50] incubator-ignite git commit: Fixed javadoc build.
Posted by sb...@apache.org.
Fixed javadoc build.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/1a214778
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1a214778
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1a214778
Branch: refs/heads/ignite-788-dev-review
Commit: 1a21477898fb69df09eafb0ec8bedec7e06ec462
Parents: c6187a9
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Jun 29 11:20:40 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Jun 29 11:20:40 2015 +0300
----------------------------------------------------------------------
.../internal/visor/util/VisorClusterGroupEmptyException.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1a214778/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorClusterGroupEmptyException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorClusterGroupEmptyException.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorClusterGroupEmptyException.java
index b969178..0cca514 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorClusterGroupEmptyException.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorClusterGroupEmptyException.java
@@ -26,7 +26,11 @@ public class VisorClusterGroupEmptyException extends ClusterGroupEmptyException
/** */
private static final long serialVersionUID = 0L;
- /** @inheritDoc */
+ /**
+ * Creates exception with given error message.
+ *
+ * @param msg Error message.
+ */
public VisorClusterGroupEmptyException(String msg) {
super(msg);
}
[43/50] incubator-ignite git commit: encoding fix
Posted by sb...@apache.org.
encoding fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f45f96d0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f45f96d0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f45f96d0
Branch: refs/heads/ignite-788-dev-review
Commit: f45f96d0cb6e4a71c75d5020b59e9d128e02acea
Parents: 1a21477
Author: avinogradov <av...@gridgain.com>
Authored: Mon Jun 29 14:18:23 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Mon Jun 29 14:18:23 2015 +0300
----------------------------------------------------------------------
pom.xml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f45f96d0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 44cb0ce..b935b2e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -604,12 +604,12 @@
</copy>
<!-- appending filename to md5 and sha1 files. to be improved. -->
- <concat destfile="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.md5" append="true">Â ${project.artifactId}-fabric-${project.version}-bin.zip</concat>
- <concat destfile="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.sha1" append="true">Â ${project.artifactId}-fabric-${project.version}-bin.zip</concat>
- <concat destfile="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.md5" append="true">Â ${project.artifactId}-hadoop-${project.version}-bin.zip</concat>
- <concat destfile="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.sha1" append="true">Â ${project.artifactId}-hadoop-${project.version}-bin.zip</concat>
- <concat destfile="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.md5" append="true">Â ${project.artifactId}-${project.version}-src.zip</concat>
- <concat destfile="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.sha1" append="true">Â ${project.artifactId}-${project.version}-src.zip</concat>
+ <concat destfile="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.md5" append="true"> ${project.artifactId}-fabric-${project.version}-bin.zip</concat>
+ <concat destfile="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.sha1" append="true"> ${project.artifactId}-fabric-${project.version}-bin.zip</concat>
+ <concat destfile="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.md5" append="true"> ${project.artifactId}-hadoop-${project.version}-bin.zip</concat>
+ <concat destfile="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.sha1" append="true"> ${project.artifactId}-hadoop-${project.version}-bin.zip</concat>
+ <concat destfile="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.md5" append="true"> ${project.artifactId}-${project.version}-src.zip</concat>
+ <concat destfile="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.sha1" append="true"> ${project.artifactId}-${project.version}-src.zip</concat>
<copy file="${basedir}/KEYS" todir="${basedir}/target/site" failonerror="false" />
</target>
[14/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-7' into ignite-sprint-7
Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-7' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/fc17f07b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/fc17f07b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/fc17f07b
Branch: refs/heads/ignite-788-dev-review
Commit: fc17f07be91fb7851bda8cf847b5a8c4194acffe
Parents: 8d8d291 7fc5595
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Jun 25 12:59:42 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Thu Jun 25 12:59:42 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/internal/GridKernalContextImpl.java | 3 +++
.../internal/processors/plugin/CachePluginManager.java | 10 ++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[05/50] incubator-ignite git commit: #ignite-1043: Add tests for read
through flag.
Posted by sb...@apache.org.
#ignite-1043: Add tests for read through flag.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/bf1ea21b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/bf1ea21b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/bf1ea21b
Branch: refs/heads/ignite-788-dev-review
Commit: bf1ea21b2f2ff6964b8e13e821b5194243855ff4
Parents: b3e2bd4
Author: ivasilinets <iv...@gridgain.com>
Authored: Wed Jun 24 11:30:15 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Wed Jun 24 11:30:15 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheContext.java | 2 +-
.../distributed/dht/GridDhtLockFuture.java | 2 +-
.../CacheReadThroughAtomicRestartSelfTest.java | 32 +++++
...heReadThroughLocalAtomicRestartSelfTest.java | 32 +++++
.../CacheReadThroughLocalRestartSelfTest.java | 32 +++++
...dThroughReplicatedAtomicRestartSelfTest.java | 32 +++++
...cheReadThroughReplicatedRestartSelfTest.java | 32 +++++
.../cache/CacheReadThroughRestartSelfTest.java | 133 +++++++++++++++++++
.../cache/GridCacheAbstractSelfTest.java | 2 +-
.../IgniteCacheTxStoreSessionTest.java | 4 +
.../testsuites/IgniteCacheTestSuite4.java | 7 +
11 files changed, 307 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf1ea21b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
index 8a4e3b9..9b7801c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
@@ -1377,7 +1377,7 @@ public class GridCacheContext<K, V> implements Externalizable {
}
/**
- * @return {@code True} if store read-through mode is enabled.
+ * @return {@code True} if {@link CacheConfiguration#isLoadPreviousValue()} flag is set.
*/
public boolean loadPreviousValue() {
return cacheCfg.isLoadPreviousValue();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf1ea21b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
index bdaa552..e160529 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
@@ -958,7 +958,7 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
*
*/
private void loadMissingFromStore() {
- if (!skipStore && cctx.loadPreviousValue() && cctx.readThrough() && (needReturnVal || read)) {
+ if (!skipStore && (read || cctx.loadPreviousValue()) && cctx.readThrough() && (needReturnVal || read)) {
final Map<KeyCacheObject, GridDhtCacheEntry> loadMap = new LinkedHashMap<>();
final GridCacheVersion ver = version();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf1ea21b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughAtomicRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughAtomicRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughAtomicRestartSelfTest.java
new file mode 100644
index 0000000..3ac7c3c
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughAtomicRestartSelfTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+
+/**
+ * Test for read through store.
+ */
+public class CacheReadThroughAtomicRestartSelfTest extends CacheReadThroughRestartSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicityMode atomicityMode() {
+ return ATOMIC;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf1ea21b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughLocalAtomicRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughLocalAtomicRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughLocalAtomicRestartSelfTest.java
new file mode 100644
index 0000000..f0892ef
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughLocalAtomicRestartSelfTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+
+/**
+ * Test for read through store.
+ */
+public class CacheReadThroughLocalAtomicRestartSelfTest extends CacheReadThroughLocalRestartSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicityMode atomicityMode() {
+ return ATOMIC;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf1ea21b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughLocalRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughLocalRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughLocalRestartSelfTest.java
new file mode 100644
index 0000000..7561edf
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughLocalRestartSelfTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMode.*;
+
+/**
+ * Test for read through store.
+ */
+public class CacheReadThroughLocalRestartSelfTest extends CacheReadThroughRestartSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMode cacheMode() {
+ return LOCAL;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf1ea21b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughReplicatedAtomicRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughReplicatedAtomicRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughReplicatedAtomicRestartSelfTest.java
new file mode 100644
index 0000000..0e179ff
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughReplicatedAtomicRestartSelfTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+
+/**
+ * Test for read through store.
+ */
+public class CacheReadThroughReplicatedAtomicRestartSelfTest extends CacheReadThroughReplicatedRestartSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicityMode atomicityMode() {
+ return ATOMIC;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf1ea21b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughReplicatedRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughReplicatedRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughReplicatedRestartSelfTest.java
new file mode 100644
index 0000000..5f1419c
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughReplicatedRestartSelfTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMode.*;
+
+/**
+ * Test for read through store.
+ */
+public class CacheReadThroughReplicatedRestartSelfTest extends CacheReadThroughRestartSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMode cacheMode() {
+ return REPLICATED;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf1ea21b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java
new file mode 100644
index 0000000..7d0cd4c
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.transactions.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+
+/**
+ * Test for read through store.
+ */
+public class CacheReadThroughRestartSelfTest extends GridCacheAbstractSelfTest {
+ /** */
+ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+ /** {@inheritDoc} */
+ @Override protected int gridCount() {
+ return 2;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ TransactionConfiguration txCfg = new TransactionConfiguration();
+
+ txCfg.setTxSerializableEnabled(true);
+
+ cfg.setTransactionConfiguration(txCfg);
+
+ CacheConfiguration cc = cacheConfiguration(gridName);
+
+ cc.setLoadPreviousValue(false);
+
+ cfg.setCacheConfiguration(cc);
+
+ TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+ disco.setIpFinder(IP_FINDER);
+
+ cfg.setDiscoverySpi(disco);
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicityMode atomicityMode() {
+ return TRANSACTIONAL;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected CacheMode cacheMode() {
+ return PARTITIONED;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testReadThroughInTx() throws Exception {
+ IgniteCache<String, Integer> cache = grid(1).cache(null);
+
+ for (int k = 0; k < 1000; k++)
+ cache.put("key" + k, k);
+
+ stopAllGrids();
+
+ startGrids(2);
+
+ Ignite ignite = grid(1);
+
+ cache = ignite.cache(null);
+
+ for (TransactionConcurrency txConcurrency : TransactionConcurrency.values()) {
+ for (TransactionIsolation txIsolation : TransactionIsolation.values()) {
+ try (Transaction tx = ignite.transactions().txStart(txConcurrency, txIsolation, 100000, 1000)) {
+ for (int k = 0; k < 1000; k++) {
+ String key = "key" + k;
+
+ assertNotNull("Null value for key: " + key, cache.get(key));
+ }
+
+ tx.commit();
+ }
+ }
+ }
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testReadThrough() throws Exception {
+ IgniteCache<String, Integer> cache = grid(1).cache(null);
+
+ for (int k = 0; k < 1000; k++)
+ cache.put("key" + k, k);
+
+ stopAllGrids();
+
+ startGrids(2);
+
+ Ignite ignite = grid(1);
+
+ cache = ignite.cache(null);
+
+ for (int k = 0; k < 1000; k++) {
+ String key = "key" + k;
+
+ assertNotNull("Null value for key: " + key, cache.get(key));
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf1ea21b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
index 3f14f49..468aec1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
@@ -531,7 +531,7 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
/**
* Serializable factory.
*/
- private static class TestStoreFactory implements Factory<CacheStore> {
+ protected static class TestStoreFactory implements Factory<CacheStore> {
@Override public CacheStore create() {
return cacheStore();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf1ea21b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java
index 269b9ae..c97fe29 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java
@@ -135,9 +135,13 @@ public class IgniteCacheTxStoreSessionTest extends IgniteCacheStoreSessionAbstra
try (Transaction tx = startTx(concurrency, isolation)) {
log.info("Do tx get.");
+ expData.add(new ExpectedData(false, "load", new HashMap(), cache.getName()));
+ expData.add(new ExpectedData(true, "sessionEnd", F.<Object, Object>asMap(0, "load"), cache.getName()));
cache.get(key1);
+ expData.clear();
+
log.info("Do tx put.");
cache.put(key1, key1);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf1ea21b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
index 6295a4d..682965a 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
@@ -145,6 +145,13 @@ public class IgniteCacheTestSuite4 extends TestSuite {
suite.addTestSuite(IgniteCacheManyClientsTest.class);
+ suite.addTestSuite(CacheReadThroughRestartSelfTest.class);
+ suite.addTestSuite(CacheReadThroughReplicatedRestartSelfTest.class);
+ suite.addTestSuite(CacheReadThroughReplicatedAtomicRestartSelfTest.class);
+ suite.addTestSuite(CacheReadThroughLocalRestartSelfTest.class);
+ suite.addTestSuite(CacheReadThroughLocalAtomicRestartSelfTest.class);
+ suite.addTestSuite(CacheReadThroughAtomicRestartSelfTest.class);
+
return suite;
}
}
[12/50] incubator-ignite git commit: Merge branch 'ignite-gg-10440'
into ignite-sprint-7
Posted by sb...@apache.org.
Merge branch 'ignite-gg-10440' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7fc5595a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7fc5595a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7fc5595a
Branch: refs/heads/ignite-788-dev-review
Commit: 7fc5595ac58bdd628a42cf870e59fc31e89e99af
Parents: b29ff1c c528705
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Thu Jun 25 10:41:55 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Thu Jun 25 10:41:55 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/internal/GridKernalContextImpl.java | 3 +++
.../internal/processors/plugin/CachePluginManager.java | 10 ++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[48/50] incubator-ignite git commit: # suppress undeployed message if
nothing has
Posted by sb...@apache.org.
# suppress undeployed message if nothing has
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6929a0cb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6929a0cb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6929a0cb
Branch: refs/heads/ignite-788-dev-review
Commit: 6929a0cbb382d4b924f127ed65b9fbbe4b232780
Parents: 1d5cfbc
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Jun 29 11:08:37 2015 -0700
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Jun 29 11:08:37 2015 -0700
----------------------------------------------------------------------
.../processors/cache/GridCacheDeploymentManager.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6929a0cb/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
index ff109ed..677377e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
@@ -255,17 +255,17 @@ public class GridCacheDeploymentManager<K, V> extends GridCacheSharedManagerAdap
cacheCtx.near().dht().context().swap().onUndeploy(ldr) :
cacheCtx.swap().onUndeploy(ldr);
- if (cacheCtx.userCache()) {
+ if (cacheCtx.userCache() && (!keys.isEmpty() || swapUndeployCnt != 0)) {
U.quietAndWarn(log, "");
U.quietAndWarn(
log,
- "Cleared all cache entries for undeployed class loader [[cacheName=" + cacheCtx.namexx() +
+ "Cleared all cache entries for undeployed class loader [cacheName=" + cacheCtx.namexx() +
", undeployCnt=" + keys.size() + ", swapUndeployCnt=" + swapUndeployCnt +
- ", clsLdr=" + ldr.getClass().getName() + ']',
- "Cleared all cache entries for undeployed class loader for cache: " + cacheCtx.namexx());
+ ", clsLdr=" + ldr.getClass().getName() + ']');
U.quietAndWarn(
log,
- " ^-- Cache auto-undeployment happens in SHARED deployment mode (to turn off, switch to CONTINUOUS mode)");
+ " ^-- Cache auto-undeployment happens in SHARED deployment mode " +
+ "(to turn off, switch to CONTINUOUS mode)");
U.quietAndWarn(log, "");
}
[37/50] incubator-ignite git commit: # ignite-1006: review
Posted by sb...@apache.org.
# ignite-1006: 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/8fd909d9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8fd909d9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8fd909d9
Branch: refs/heads/ignite-788-dev-review
Commit: 8fd909d98505fe3964bcf756e8bec42888c1164c
Parents: a8232be
Author: ashutak <as...@gridgain.com>
Authored: Fri Jun 26 18:01:53 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Fri Jun 26 18:01:53 2015 +0300
----------------------------------------------------------------------
.../internal/cluster/ClusterGroupAdapter.java | 12 +-
.../internal/ClusterForHostsSelfTest.java | 113 ---------------
.../internal/ClusterGroupHostsSelfTest.java | 141 +++++++++++++++++++
.../ignite/internal/ClusterGroupSelfTest.java | 22 ---
.../ignite/testsuites/IgniteBasicTestSuite.java | 2 +-
5 files changed, 146 insertions(+), 144 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8fd909d9/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
index b770d98..4b61116 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
@@ -296,16 +296,12 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable {
/** {@inheritDoc} */
@Override public Collection<String> hostNames() {
- Collection<String> resultHostNames = new HashSet<String> ();
- Collection<ClusterNode> allNodes = nodes();
+ Set<String> res = new HashSet<>();
- if (!(allNodes.isEmpty()))
- {
- for (ClusterNode currentNode : allNodes)
- Collections.addAll(resultHostNames, currentNode.hostNames().toArray(new String[0]));
- }
+ for (ClusterNode node : nodes())
+ res.addAll(node.hostNames());
- return resultHostNames;
+ return Collections.unmodifiableSet(res);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8fd909d9/modules/core/src/test/java/org/apache/ignite/internal/ClusterForHostsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterForHostsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterForHostsSelfTest.java
deleted file mode 100644
index 59c3db9..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterForHostsSelfTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * 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.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal;
-
-import org.apache.ignite.*;
-import org.apache.ignite.cluster.*;
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.spi.discovery.tcp.*;
-import org.apache.ignite.testframework.junits.common.*;
-
-import java.lang.reflect.*;
-import java.util.*;
-
-/**
- * Test for {@link ClusterGroup#forHost(String, String...)}.
- *
- * @see GridProjectionSelfTest
- */
-@GridCommonTest(group = "Kernal Self")
-public class ClusterForHostsSelfTest extends GridCommonAbstractTest {
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
- Collection<String> hostNames = null;
-
- if ("forHostTest".equals(gridName))
- hostNames = Arrays.asList("h_1", "h_2", "h_3");
-
- IgniteConfiguration cfg = super.getConfiguration(gridName);
-
- if (hostNames != null) {
- TcpDiscoverySpi disco = (TcpDiscoverySpi)cfg.getDiscoverySpi();
-
- cfg.setDiscoverySpi(new CustomHostsTcpDiscoverySpi(hostNames).setIpFinder(disco.getIpFinder()));
- }
-
- return cfg;
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testForHosts() throws Exception {
- Ignite ignite = startGrid("forHostTest");
-
- assertEquals(1, ignite.cluster().forHost("h_1").nodes().size());
- assertEquals(1, ignite.cluster().forHost("h_1", "h_3").nodes().size());
- assertEquals(1, ignite.cluster().forHost("unknown_host", "h_2").nodes().size());
- assertEquals(1, ignite.cluster().forHost("h_1", "h_3", "unknown_host", "h_2").nodes().size());
-
- assertEquals(0, ignite.cluster().forHost("unknown_host").nodes().size());
-
- boolean gotNpe = false;
-
- try {
- assertEquals(0, ignite.cluster().forHost(null, null, null).nodes().size());
- }
- catch (NullPointerException e) {
- gotNpe = true;
- }
-
- assertTrue(gotNpe);
- }
-
- /**
- * Tcp discovery spi that allow to customise hostNames of created local node.
- */
- private static class CustomHostsTcpDiscoverySpi extends TcpDiscoverySpi {
- /** Hosts. */
- private final Collection<String> hosts;
-
- /**
- * @param hosts Host names which will be retuned by {@link ClusterNode#hostNames()} of created local node.
- */
- CustomHostsTcpDiscoverySpi(Collection<String> hosts) {
- this.hosts = hosts;
- }
-
- /**
- * @param srvPort Server port.
- */
- @Override protected void initLocalNode(int srvPort, boolean addExtAddrAttr) {
- super.initLocalNode(srvPort, addExtAddrAttr);
-
- try {
- Field hostNamesField = locNode.getClass().getDeclaredField("hostNames");
-
- hostNamesField.setAccessible(true);
-
- hostNamesField.set(locNode, hosts);
- }
- catch (IllegalAccessException | NoSuchFieldException e) {
- U.error(log, "Looks like implementation of " + locNode.getClass()
- + " class was changed. Need to update test.", e);
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8fd909d9/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java
new file mode 100644
index 0000000..297a590
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java
@@ -0,0 +1,141 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.lang.reflect.*;
+import java.util.*;
+
+/**
+ * Test for {@link ClusterGroup#forHost(String, String...)}.
+ *
+ * @see ClusterGroupSelfTest
+ */
+@GridCommonTest(group = "Kernal Self")
+public class ClusterGroupHostsSelfTest extends GridCommonAbstractTest {
+ /** {@inheritDoc} */
+ @Override protected void beforeTestsStarted() throws Exception {
+ super.beforeTestsStarted();
+
+ startGrid();
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ Collection<String> hostNames = Arrays.asList("h_1", "h_2", "h_3");
+
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ TcpDiscoverySpi disco = (TcpDiscoverySpi)cfg.getDiscoverySpi();
+
+ cfg.setDiscoverySpi(new CustomHostsTcpDiscoverySpi(hostNames).setIpFinder(disco.getIpFinder()));
+
+ return cfg;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testForHosts() throws Exception {
+ Ignite ignite = grid();
+
+ assertEquals(1, ignite.cluster().forHost("h_1").nodes().size());
+ assertEquals(1, ignite.cluster().forHost("h_1", "h_3").nodes().size());
+ assertEquals(1, ignite.cluster().forHost("unknown_host", "h_2").nodes().size());
+ assertEquals(1, ignite.cluster().forHost("h_1", "h_3", "unknown_host", "h_2").nodes().size());
+
+ assertEquals(0, ignite.cluster().forHost("unknown_host").nodes().size());
+
+ boolean gotNpe = false;
+
+ try {
+ assertEquals(0, ignite.cluster().forHost(null, null, null).nodes().size());
+ }
+ catch (NullPointerException e) {
+ gotNpe = true;
+ }
+ finally {
+ assertTrue(gotNpe);
+ }
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testHostNames() throws Exception {
+ Ignite ignite = grid();
+
+ Collection<String> locNodeHosts = ignite.cluster().localNode().hostNames();
+ Collection<String> clusterHosts = ignite.cluster().hostNames();
+
+ assertTrue(F.eqNotOrdered(locNodeHosts, clusterHosts));
+
+ boolean gotNpe = false;
+
+ try {
+ clusterHosts.add("valueShouldNotToBeAdded");
+ }
+ catch (UnsupportedOperationException e) {
+ gotNpe = true;
+ }
+ finally {
+ assertTrue(gotNpe);
+ }
+ }
+
+ /**
+ * Tcp discovery spi that allow to customise hostNames of created local node.
+ */
+ private static class CustomHostsTcpDiscoverySpi extends TcpDiscoverySpi {
+ /** Hosts. */
+ private final Collection<String> hosts;
+
+ /**
+ * @param hosts Host names which will be retuned by {@link ClusterNode#hostNames()} of created local node.
+ */
+ CustomHostsTcpDiscoverySpi(Collection<String> hosts) {
+ this.hosts = hosts;
+ }
+
+ /**
+ * @param srvPort Server port.
+ */
+ @Override protected void initLocalNode(int srvPort, boolean addExtAddrAttr) {
+ super.initLocalNode(srvPort, addExtAddrAttr);
+
+ try {
+ Field hostNamesField = locNode.getClass().getDeclaredField("hostNames");
+
+ hostNamesField.setAccessible(true);
+
+ hostNamesField.set(locNode, hosts);
+ }
+ catch (IllegalAccessException | NoSuchFieldException e) {
+ U.error(log, "Looks like implementation of " + locNode.getClass()
+ + " class was changed. Need to update test.", e);
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8fd909d9/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java
index 37a6e72..ceb9bef 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java
@@ -248,26 +248,4 @@ public class ClusterGroupSelfTest extends ClusterGroupAbstractTest {
return even ? cnt - 1 : cnt - 2;
}
-
- /**
- * @throws Exception If failed.
- */
- public void testHostNames() throws Exception {
- Collection<String> inputHostNames = ignite.cluster().hostNames();
- Collection<String> localNodeHostNames = ignite.cluster().localNode().hostNames();
- Collection<String> randomNodeHostNames = ignite.cluster().forRandom().node().hostNames();
- Collection<ClusterNode> allNodes = ignite.cluster().nodes();
- Collection<String> checkHostNames = new HashSet<String> ();
-
- for (ClusterNode currentNode : allNodes)
- Collections.addAll(checkHostNames, currentNode.hostNames().toArray(new String[0]));
-
- assert(checkHostNames.equals(inputHostNames));
-
- if (!(localNodeHostNames.isEmpty()) && !(inputHostNames.isEmpty()))
- assert((inputHostNames.containsAll(localNodeHostNames)) == true);
-
- if (!(randomNodeHostNames.isEmpty()) && !(inputHostNames.isEmpty()))
- assert((inputHostNames.containsAll(randomNodeHostNames)) == true);
- }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8fd909d9/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index 6ff83e2..19c1932 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@ -65,7 +65,7 @@ public class IgniteBasicTestSuite extends TestSuite {
suite.addTest(IgniteStreamSelfTestSuite.suite());
suite.addTest(new TestSuite(GridSelfTest.class));
- suite.addTest(new TestSuite(ClusterForHostsSelfTest.class));
+ suite.addTest(new TestSuite(ClusterGroupHostsSelfTest.class));
suite.addTest(new TestSuite(IgniteMessagingWithClientTest.class));
GridTestUtils.addTestIfNeeded(suite, ClusterGroupSelfTest.class, ignoredTests);
[15/50] incubator-ignite git commit: # ignite-917: review 2.
Posted by sb...@apache.org.
# ignite-917: review 2.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/401aa122
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/401aa122
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/401aa122
Branch: refs/heads/ignite-788-dev-review
Commit: 401aa1223f99838bd8c841045f7c8614f4113c52
Parents: 532a98f
Author: ashutak <as...@gridgain.com>
Authored: Thu Jun 25 13:09:45 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Thu Jun 25 13:09:45 2015 +0300
----------------------------------------------------------------------
.../src/main/java/org/apache/ignite/cluster/ClusterNode.java | 4 ++--
.../java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/401aa122/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java
index bb792d5..62c1deb 100644
--- a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java
+++ b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java
@@ -188,8 +188,8 @@ public interface ClusterNode {
* <p>
* If {@link IgniteConfiguration#getLocalHost()} value is {@code null} then local wildcard address will be used,
* and this method returns host names of all addresses of that node.
- * <p/
- * Note: the loopback address will skipped from the results.
+ * <p>
+ * Note: the loopback address will be omitted in results.
*
* @return Collection of host names.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/401aa122/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index 8be9f31..9b7f392 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@ -65,10 +65,11 @@ public class IgniteBasicTestSuite extends TestSuite {
suite.addTest(IgniteStreamSelfTestSuite.suite());
suite.addTest(new TestSuite(GridSelfTest.class));
- GridTestUtils.addTestIfNeeded(suite, GridProjectionSelfTest.class, ignoredTests);
suite.addTest(new TestSuite(ClusterForHostsSelfTest.class));
- GridTestUtils.addTestIfNeeded(suite, GridMessagingSelfTest.class, ignoredTests);
suite.addTest(new TestSuite(IgniteMessagingWithClientTest.class));
+
+ GridTestUtils.addTestIfNeeded(suite, GridProjectionSelfTest.class, ignoredTests);
+ GridTestUtils.addTestIfNeeded(suite, GridMessagingSelfTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite, GridMessagingNoPeerClassLoadingSelfTest.class, ignoredTests);
if (U.isLinux() || U.isMacOs())
[22/50] incubator-ignite git commit: # GG-10457 Fixed collecting
cache data.
Posted by sb...@apache.org.
# GG-10457 Fixed collecting cache data.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/775edcb2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/775edcb2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/775edcb2
Branch: refs/heads/ignite-788-dev-review
Commit: 775edcb25354ca6f3682db67cca6ce0c312e4607
Parents: 3270622
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Jun 25 22:54:57 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Jun 25 22:54:57 2015 +0700
----------------------------------------------------------------------
.../ignite/internal/visor/node/VisorNodeDataCollectorJob.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/775edcb2/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
index 2ecba01..4d601d2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
@@ -130,7 +130,7 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
if (cache != null)
res.caches().add(cache);
}
- catch(IllegalStateException e) {
+ catch(IllegalStateException | IllegalArgumentException e) {
if (debug && ignite.log() != null)
ignite.log().error("Ignored cache: " + cacheName, e);
}
[17/50] incubator-ignite git commit: # minor (renaming)
Posted by sb...@apache.org.
# minor (renaming)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6c3d97f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6c3d97f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6c3d97f8
Branch: refs/heads/ignite-788-dev-review
Commit: 6c3d97f8069c2aec66195e03b7f1062ceb91e172
Parents: fc17f07
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Jun 25 17:18:33 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Thu Jun 25 17:18:33 2015 +0300
----------------------------------------------------------------------
.../internal/ClusterGroupAbstractTest.java | 777 ++++++++++++++++++
.../ignite/internal/ClusterGroupSelfTest.java | 251 ++++++
.../internal/GridProjectionAbstractTest.java | 784 -------------------
.../ignite/internal/GridProjectionSelfTest.java | 251 ------
.../apache/ignite/internal/GridSelfTest.java | 2 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 2 +-
6 files changed, 1030 insertions(+), 1037 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6c3d97f8/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java
new file mode 100644
index 0000000..0514ad9
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java
@@ -0,0 +1,777 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.compute.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.events.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.junits.common.*;
+import org.jetbrains.annotations.*;
+
+import java.io.*;
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.*;
+
+import static org.apache.ignite.events.EventType.*;
+
+/**
+ * Abstract test for {@link org.apache.ignite.cluster.ClusterGroup}
+ */
+@SuppressWarnings("deprecation")
+public abstract class ClusterGroupAbstractTest extends GridCommonAbstractTest implements Externalizable {
+ /** VM ip finder for TCP discovery. */
+ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+
+ /** Waiting timeout. */
+ private static final int WAIT_TIMEOUT = 30000;
+
+ /** Utility static variable. */
+ private static final AtomicInteger cnt = new AtomicInteger(0);
+
+ /** Mutex. */
+ private static final Object mux = new Object();
+
+ /** Projection. */
+ private ClusterGroup prj;
+
+ /** Runnable job. */
+ private IgniteRunnable runJob = new TestRunnable();
+
+ /** Callable job. */
+ private IgniteCallable<String> calJob = new TestCallable<>();
+
+ /** Closure job. */
+ private IgniteClosure<String, String> clrJob = new IgniteClosure<String, String>() {
+ @Override public String apply(String s) {
+ return s;
+ }
+
+ @Override public String toString() {
+ return "clrJob";
+ }
+ };
+
+ /** Reducer. */
+ private IgniteReducer<String, Object> rdc = new IgniteReducer<String, Object>() {
+ @Override public boolean collect(String e) {
+ return true;
+ }
+
+ @Nullable @Override public Object reduce() {
+ return null;
+ }
+
+ @Override public String toString() {
+ return "rdc";
+ }
+ };
+
+ /** */
+ protected ClusterGroupAbstractTest() {
+ // No-op.
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ cfg.setDiscoverySpi(new TcpDiscoverySpi().setForceServerMode(true).setIpFinder(ipFinder));
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ prj = projection();
+
+ cnt.set(0);
+ }
+
+ /**
+ * @return Projection.
+ */
+ protected abstract ClusterGroup projection();
+
+ /**
+ * @return Local node ID.
+ */
+ @Nullable protected abstract UUID localNodeId();
+
+ /**
+ * @return Remote nodes IDs.
+ */
+ protected Collection<UUID> remoteNodeIds() {
+ return F.nodeIds(projection().forRemotes().nodes());
+ }
+
+ /**
+ * @return Projection size.
+ */
+ private int projectionSize() {
+ int size = localNodeId() != null ? 1 : 0;
+
+ size += remoteNodeIds().size();
+
+ assert size > 0;
+
+ return size;
+ }
+
+ /**
+ * @return Collection of projection node IDs.
+ */
+ private Collection<UUID> projectionNodeIds() {
+ Collection<UUID> ids = new LinkedList<>();
+
+ UUID id = localNodeId();
+
+ if (id != null)
+ ids.add(id);
+
+ ids.addAll(remoteNodeIds());
+
+ assert !ids.isEmpty();
+
+ return ids;
+ }
+
+ /**
+ * Test for projection on not existing node IDs.
+ */
+ public void testInvalidProjection() {
+ Collection<UUID> ids = new HashSet<>();
+
+ ids.add(UUID.randomUUID());
+ ids.add(UUID.randomUUID());
+
+ ClusterGroup invalidPrj = prj.forNodeIds(ids);
+
+ assertEquals(0, invalidPrj.nodes().size());
+ }
+
+ /**
+ * @throws Exception If test failed.
+ */
+ public void testProjection() throws Exception {
+ assert prj != null;
+
+ assert prj.ignite() != null;
+ assert prj.predicate() != null;
+
+ int size = projectionSize();
+
+ assert prj.nodes().size() == size;
+
+ Collection<UUID> nodeIds = projectionNodeIds();
+
+ for (ClusterNode node : prj.nodes())
+ assert nodeIds.contains(node.id());
+ }
+
+ /**
+ * @throws Exception If test failed.
+ */
+ public void testRemoteNodes() throws Exception {
+ Collection<UUID> remoteNodeIds = remoteNodeIds();
+
+ UUID locNodeId = localNodeId();
+
+ int size = remoteNodeIds.size();
+
+ String name = "oneMoreGrid";
+
+ try {
+ Ignite g = startGrid(name);
+
+ UUID excludedId = g.cluster().localNode().id();
+
+ assertEquals(size, prj.forRemotes().nodes().size());
+
+ for (ClusterNode node : prj.forRemotes().nodes()) {
+ UUID id = node.id();
+
+ assert !id.equals(locNodeId) && remoteNodeIds.contains(id) && !excludedId.equals(id);
+ }
+ }
+ finally {
+ stopGrid(name);
+ }
+ }
+
+ /**
+ * @throws Exception If test failed.
+ */
+ public void testRemoteProjection() throws Exception {
+ Collection<UUID> remoteNodeIds = remoteNodeIds();
+
+ ClusterGroup remotePrj = projection().forRemotes();
+
+ Collection<UUID> prjNodeIds = F.nodeIds(remotePrj.nodes());
+
+ assert prjNodeIds.size() == remoteNodeIds.size();
+
+ assert prjNodeIds.containsAll(remoteNodeIds());
+
+ assert !prjNodeIds.contains(localNodeId());
+
+ String name = "oneMoreGrid";
+
+ try {
+ Ignite g = startGrid(name);
+
+ UUID excludedId = g.cluster().localNode().id();
+
+ assert !F.nodeIds(remotePrj.nodes()).contains(excludedId);
+ }
+ finally {
+ stopGrid(name);
+ }
+ }
+
+ /**
+ * @throws Exception If test failed.
+ */
+ public void testExecution() throws Exception {
+ String name = "oneMoreGrid";
+
+ Collection<IgniteBiTuple<Ignite, IgnitePredicate<Event>>> lsnrs = new LinkedList<>();
+
+ try {
+ final AtomicInteger cnt = new AtomicInteger();
+
+ Ignite g = startGrid(name);
+
+ IgnitePredicate<Event> lsnr;
+
+ if (!IgniteCluster.class.isAssignableFrom(projection().getClass())) {
+ g.events().localListen(lsnr = new IgnitePredicate<Event>() {
+ @Override public boolean apply(Event evt) {
+ assert evt.type() == EVT_JOB_STARTED;
+
+ assert false;
+
+ return true;
+ }
+ }, EVT_JOB_STARTED);
+
+ lsnrs.add(F.t(g, lsnr));
+ }
+
+ for (ClusterNode node : prj.nodes()) {
+ g = G.ignite(node.id());
+
+ g.events().localListen(lsnr = new IgnitePredicate<Event>() {
+ @Override public boolean apply(Event evt) {
+ assert evt.type() == EVT_JOB_STARTED;
+
+ synchronized (mux) {
+ cnt.incrementAndGet();
+
+ mux.notifyAll();
+ }
+
+ return true;
+ }
+ }, EVT_JOB_STARTED);
+
+ lsnrs.add(F.t(g, lsnr));
+ }
+
+ run1(cnt);
+ run2(cnt);
+
+ call1(cnt);
+ call2(cnt);
+ call3(cnt);
+ call4(cnt);
+ call5(cnt);
+
+ forkjoin1(cnt);
+ forkjoin2(cnt);
+
+ exec1(cnt);
+ exec2(cnt);
+
+ executorService(cnt);
+
+ checkActiveFutures();
+ }
+ finally {
+ for (IgniteBiTuple<Ignite, IgnitePredicate<Event>> t : lsnrs)
+ t.get1().events().stopLocalListen(t.get2(), EVT_JOB_STARTED);
+
+ stopGrid(name);
+ }
+ }
+
+ /**
+ * @param cnt Counter.
+ * @throws Exception If failed.
+ */
+ private void run1(AtomicInteger cnt) throws Exception {
+ IgniteCompute comp = compute(prj).withAsync();
+
+ comp.broadcast(runJob);
+
+ ComputeTaskFuture fut = comp.future();
+
+ waitForExecution(fut);
+
+ cnt.set(0);
+
+ compute(prj).broadcast(runJob);
+
+ waitForValue(cnt, projectionSize());
+ }
+
+ /**
+ * @param cnt Counter.
+ * @throws Exception If failed.
+ */
+ private void run2(AtomicInteger cnt) throws Exception {
+ Collection<IgniteRunnable> jobs = F.asList(runJob);
+
+ IgniteCompute comp = compute(prj).withAsync();
+
+ comp.run(jobs);
+
+ ComputeTaskFuture fut = comp.future();
+
+ waitForExecution(fut);
+
+ cnt.set(0);
+
+ compute(prj).run(jobs);
+
+ waitForValue(cnt, jobs.size());
+ }
+
+ /**
+ * @param cnt Counter.
+ * @throws Exception If failed.
+ */
+ private void call1(AtomicInteger cnt) throws Exception {
+ IgniteCompute comp = compute(prj).withAsync();
+
+ comp.broadcast(calJob);
+
+ ComputeTaskFuture fut = comp.future();
+
+ waitForExecution(fut);
+
+ cnt.set(0);
+
+ compute(prj).broadcast(calJob);
+
+ waitForValue(cnt, projectionSize());
+ }
+
+ /**
+ * @param cnt Counter.
+ * @throws Exception If failed.
+ */
+ private void call2(AtomicInteger cnt) throws Exception {
+ IgniteCompute comp = compute(prj).withAsync();
+
+ Collection<IgniteCallable<String>> jobs = F.asList(calJob);
+
+ comp.call(jobs);
+
+ ComputeTaskFuture fut = comp.future();
+
+ waitForExecution(fut);
+
+ cnt.set(0);
+
+ compute(prj).call(jobs);
+
+ waitForValue(cnt, jobs.size());
+ }
+
+ /**
+ * @param cnt Counter.
+ * @throws Exception If failed.
+ */
+ private void call3(AtomicInteger cnt) throws Exception {
+ IgniteCompute comp = compute(prj).withAsync();
+
+ comp.apply(clrJob, (String) null);
+
+ ComputeTaskFuture fut = comp.future();
+
+ waitForExecution(fut);
+
+ cnt.set(0);
+
+ compute(prj).apply(clrJob, (String) null);
+
+ waitForValue(cnt, 1);
+ }
+
+ /**
+ * @param cnt Counter.
+ * @throws Exception If failed.
+ */
+ private void call4(AtomicInteger cnt) throws Exception {
+ Collection<String> args = F.asList("a", "b", "c");
+
+ IgniteCompute comp = compute(prj).withAsync();
+
+ comp.apply(clrJob, args);
+
+ ComputeTaskFuture fut = comp.future();
+
+ waitForExecution(fut);
+
+ cnt.set(0);
+
+ compute(prj).apply(clrJob, args);
+
+ waitForValue(cnt, args.size());
+ }
+
+ /**
+ * @param cnt Counter.
+ * @throws Exception If failed.
+ */
+ private void call5(AtomicInteger cnt) throws Exception {
+ IgniteCompute comp = compute(prj).withAsync();
+
+ comp.broadcast(new TestClosure(), "arg");
+
+ ComputeTaskFuture<Collection<String>> fut = comp.future();
+
+ waitForExecution(fut);
+
+ cnt.set(0);
+
+ Collection<String> res = compute(prj).broadcast(new TestClosure(), "arg");
+
+ assertEquals(projectionSize(), res.size());
+
+ waitForValue(cnt, projectionSize());
+
+ for (String resStr : res)
+ assertEquals("arg", resStr);
+ }
+
+ /**
+ * @param cnt Counter.
+ * @throws Exception If failed.
+ */
+ private void forkjoin1(AtomicInteger cnt) throws Exception {
+ Collection<String> args = F.asList("a", "b", "c");
+
+ IgniteCompute comp = compute(prj).withAsync();
+
+ comp.apply(clrJob, args, rdc);
+
+ ComputeTaskFuture fut = comp.future();
+
+ waitForExecution(fut);
+
+ cnt.set(0);
+
+ compute(prj).apply(clrJob, args, rdc);
+
+ waitForValue(cnt, args.size());
+ }
+
+ /**
+ * @param cnt Counter.
+ * @throws Exception If failed.
+ */
+ private void forkjoin2(AtomicInteger cnt) throws Exception {
+ Collection<IgniteCallable<String>> jobs = F.asList(calJob);
+
+ IgniteCompute comp = compute(prj).withAsync();
+
+ comp.call(jobs, rdc);
+
+ ComputeTaskFuture fut = comp.future();
+
+ waitForExecution(fut);
+
+ cnt.set(0);
+
+ compute(prj).call(jobs, rdc);
+
+ waitForValue(cnt, jobs.size());
+ }
+
+ /**
+ * @param cnt Counter.
+ * @throws Exception If failed.
+ */
+ private void exec1(AtomicInteger cnt) throws Exception {
+ cnt.set(0);
+
+ compute(prj).execute(TestTask.class.getName(), null);
+
+ waitForValue(cnt, projectionSize());
+
+ cnt.set(0);
+
+ compute(prj).execute(new TestTask(), null);
+
+ waitForValue(cnt, projectionSize());
+
+ cnt.set(0);
+
+ compute(prj).execute(TestTask.class, null);
+
+ waitForValue(cnt, projectionSize());
+ }
+
+ /**
+ * @param cnt Counter.
+ * @throws Exception If failed.
+ */
+ private void exec2(AtomicInteger cnt) throws Exception {
+ cnt.set(0);
+
+ compute(prj).withTimeout(WAIT_TIMEOUT).execute(TestTask.class.getName(), null);
+
+ waitForValue(cnt, projectionSize());
+
+ cnt.set(0);
+
+ compute(prj).withTimeout(WAIT_TIMEOUT).execute(new TestTask(), null);
+
+ waitForValue(cnt, projectionSize());
+
+ cnt.set(0);
+
+ compute(prj).withTimeout(WAIT_TIMEOUT).execute(TestTask.class, null);
+
+ waitForValue(cnt, projectionSize());
+ }
+
+ /**
+ * @param cnt Counter.
+ * @throws Exception If failed.
+ */
+ private void executorService(AtomicInteger cnt) throws Exception {
+ cnt.set(0);
+
+ ExecutorService execSrvc = prj.ignite().executorService(prj);
+
+ Future<String> fut = execSrvc.submit(new TestCallable<String>() {
+ @Override public String call() throws Exception {
+ return "submit1";
+ }
+ });
+
+ waitForValue(cnt, 1);
+
+ assertEquals("submit1", fut.get());
+
+ cnt.set(0);
+
+ fut = execSrvc.submit(new TestRunnable(), "submit2");
+
+ waitForValue(cnt, 1);
+
+ assertEquals("submit2", fut.get());
+
+ cnt.set(0);
+
+ Future<?> runFut = execSrvc.submit(new TestRunnable());
+
+ waitForValue(cnt, 1);
+
+ runFut.get();
+ }
+
+ /**
+ * @param fut Execution future.
+ * @throws InterruptedException Thrown if wait was interrupted.
+ */
+ @SuppressWarnings({"UnconditionalWait"})
+ private void waitForExecution(IgniteFuture fut) throws InterruptedException {
+ long sleep = 250;
+
+ long threshold = System.currentTimeMillis() + WAIT_TIMEOUT;
+
+ do synchronized (mux) {
+ mux.wait(sleep);
+ }
+ while (fut != null && !fut.isDone() && !fut.isCancelled() && threshold > System.currentTimeMillis());
+
+ assert fut == null || fut.isDone();
+ }
+
+ /**
+ * @param cnt Counter to check.
+ * @param val Value to check.
+ * @throws InterruptedException Thrown if wait was interrupted.
+ */
+ private void waitForValue(AtomicInteger cnt, int val) throws InterruptedException {
+ assert cnt != null;
+ assert val > 0;
+
+ long threshold = System.currentTimeMillis() + WAIT_TIMEOUT;
+
+ long time;
+
+ while (threshold > (time = System.currentTimeMillis()))
+ synchronized (mux) {
+ if (cnt.get() == val)
+ break;
+
+ mux.wait(threshold - time);
+ }
+
+ assert cnt.get() == val;
+ }
+
+ /**
+ * @throws Exception If test failed.
+ */
+ private void checkActiveFutures() throws Exception {
+ IgniteCompute comp = compute(prj).withAsync();
+
+ assertEquals(0, comp.activeTaskFutures().size());
+
+ cnt.set(0);
+
+ Collection<ComputeTaskFuture<Object>> futsList = new ArrayList<>();
+
+ for (int i = 0; i < 10; i++) {
+ comp.call(new TestWaitCallable<>());
+
+ ComputeTaskFuture<Object> fut = comp.future();
+
+ assertFalse(fut.isDone());
+
+ Map<IgniteUuid, ComputeTaskFuture<Object>> futs = comp.activeTaskFutures();
+
+ assertEquals(i + 1, futs.size());
+
+ assertTrue(futs.containsKey(fut.getTaskSession().getId()));
+
+ futsList.add(fut);
+ }
+
+ synchronized (mux) {
+ cnt.incrementAndGet();
+
+ mux.notifyAll();
+ }
+
+ for (ComputeTaskFuture<Object> fut : futsList)
+ fut.get();
+
+ assertEquals(0, comp.activeTaskFutures().size());
+ }
+
+ /**
+ * Test closure.
+ */
+ private static class TestClosure implements IgniteClosure<String, String> {
+ /** {@inheritDoc} */
+ @Override public String apply(String s) {
+ return s;
+ }
+ }
+
+ /**
+ * Test runnable.
+ */
+ private static class TestRunnable implements IgniteRunnable {
+ /** {@inheritDoc} */
+ @Override public void run() {
+ // No-op.
+ }
+ }
+
+ /**
+ * Test callable.
+ */
+ private static class TestCallable<T> implements IgniteCallable<T> {
+ /** {@inheritDoc} */
+ @Nullable @Override public T call() throws Exception {
+ return null;
+ }
+ }
+
+ /**
+ * Test callable.
+ */
+ private static class TestWaitCallable<T> implements IgniteCallable<T> {
+ /** {@inheritDoc} */
+ @Nullable @Override public T call() throws Exception {
+ synchronized (mux) {
+ while (cnt.get() == 0)
+ mux.wait();
+ }
+
+ return null;
+ }
+ }
+
+ /**
+ * Test task.
+ */
+ @SuppressWarnings({"PublicInnerClass"})
+ public static class TestTask extends ComputeTaskSplitAdapter<String, Void> {
+ /** {@inheritDoc} */
+ @Override protected Collection<? extends ComputeJob> split(int gridSize, String arg) {
+ Collection<ComputeJob> jobs = new HashSet<>();
+
+ for (int i = 0; i < gridSize; i++)
+ jobs.add(new TestJob());
+
+ return jobs;
+ }
+
+ /** {@inheritDoc} */
+ @Nullable @Override public Void reduce(List<ComputeJobResult> results) {
+ return null;
+ }
+ }
+
+ /**
+ * Test job.
+ */
+ @SuppressWarnings({"PublicInnerClass"})
+ public static class TestJob extends ComputeJobAdapter {
+ /** {@inheritDoc} */
+ @Nullable @Override public Object execute() {
+ return null;
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public void writeExternal(ObjectOutput out) throws IOException {
+ // No-op.
+ }
+
+ /** {@inheritDoc} */
+ @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+ // No-op.
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6c3d97f8/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java
new file mode 100644
index 0000000..ceb9bef
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java
@@ -0,0 +1,251 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.marshaller.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.util.*;
+
+/**
+ * Test for {@link ClusterGroup}.
+ */
+@GridCommonTest(group = "Kernal Self")
+public class ClusterGroupSelfTest extends ClusterGroupAbstractTest {
+ /** Nodes count. */
+ private static final int NODES_CNT = 4;
+
+ /** Projection node IDs. */
+ private static Collection<UUID> ids;
+
+ /** */
+ private static Ignite ignite;
+
+ /** {@inheritDoc} */
+ @SuppressWarnings({"ConstantConditions"})
+ @Override protected void beforeTestsStarted() throws Exception {
+ assert NODES_CNT > 2;
+
+ ids = new LinkedList<>();
+
+ try {
+ for (int i = 0; i < NODES_CNT; i++) {
+ Ignition.setClientMode(i > 1);
+
+ Ignite g = startGrid(i);
+
+ ids.add(g.cluster().localNode().id());
+
+ if (i == 0)
+ ignite = g;
+ }
+ }
+ finally {
+ Ignition.setClientMode(false);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTestsStopped() throws Exception {
+ for (int i = 0; i < NODES_CNT; i++)
+ stopGrid(i);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected ClusterGroup projection() {
+ return grid(0).cluster().forPredicate(F.nodeForNodeIds(ids));
+ }
+
+ /** {@inheritDoc} */
+ @Override protected UUID localNodeId() {
+ return grid(0).localNode().id();
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testRandom() throws Exception {
+ assertTrue(ignite.cluster().nodes().contains(ignite.cluster().forRandom().node()));
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testOldest() throws Exception {
+ ClusterGroup oldest = ignite.cluster().forOldest();
+
+ ClusterNode node = null;
+
+ long minOrder = Long.MAX_VALUE;
+
+ for (ClusterNode n : ignite.cluster().nodes()) {
+ if (n.order() < minOrder) {
+ node = n;
+
+ minOrder = n.order();
+ }
+ }
+
+ assertEquals(oldest.node(), ignite.cluster().forNode(node).node());
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testYoungest() throws Exception {
+ ClusterGroup youngest = ignite.cluster().forYoungest();
+
+ ClusterNode node = null;
+
+ long maxOrder = Long.MIN_VALUE;
+
+ for (ClusterNode n : ignite.cluster().nodes()) {
+ if (n.order() > maxOrder) {
+ node = n;
+
+ maxOrder = n.order();
+ }
+ }
+
+ assertEquals(youngest.node(), ignite.cluster().forNode(node).node());
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testNewNodes() throws Exception {
+ ClusterGroup youngest = ignite.cluster().forYoungest();
+ ClusterGroup oldest = ignite.cluster().forOldest();
+
+ ClusterNode old = oldest.node();
+ ClusterNode last = youngest.node();
+
+ assertNotNull(last);
+
+ try (Ignite g = startGrid(NODES_CNT)) {
+ ClusterNode n = g.cluster().localNode();
+
+ ClusterNode latest = youngest.node();
+
+ assertNotNull(latest);
+ assertEquals(latest.id(), n.id());
+ assertEquals(oldest.node(), old);
+ }
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testForPredicate() throws Exception {
+ IgnitePredicate<ClusterNode> evenP = new IgnitePredicate<ClusterNode>() {
+ @Override public boolean apply(ClusterNode node) {
+ return node.order() % 2 == 0;
+ }
+ };
+
+ IgnitePredicate<ClusterNode> oddP = new IgnitePredicate<ClusterNode>() {
+ @Override public boolean apply(ClusterNode node) {
+ return node.order() % 2 == 1;
+ }
+ };
+
+ ClusterGroup remotes = ignite.cluster().forRemotes();
+
+ ClusterGroup evenYoungest = remotes.forPredicate(evenP).forYoungest();
+ ClusterGroup evenOldest = remotes.forPredicate(evenP).forOldest();
+
+ ClusterGroup oddYoungest = remotes.forPredicate(oddP).forYoungest();
+ ClusterGroup oddOldest = remotes.forPredicate(oddP).forOldest();
+
+ int clusterSize = ignite.cluster().nodes().size();
+
+ assertEquals(grid(gridMaxOrder(clusterSize, true)).localNode().id(), evenYoungest.node().id());
+ assertEquals(grid(1).localNode().id(), evenOldest.node().id());
+
+ assertEquals(grid(gridMaxOrder(clusterSize, false)).localNode().id(), oddYoungest.node().id());
+ assertEquals(grid(2).localNode().id(), oddOldest.node().id());
+
+ try (Ignite g4 = startGrid(NODES_CNT);
+ Ignite g5 = startGrid(NODES_CNT + 1))
+ {
+ clusterSize = g4.cluster().nodes().size();
+
+ assertEquals(grid(gridMaxOrder(clusterSize, true)).localNode().id(), evenYoungest.node().id());
+ assertEquals(grid(1).localNode().id(), evenOldest.node().id());
+
+ assertEquals(grid(gridMaxOrder(clusterSize, false)).localNode().id(), oddYoungest.node().id());
+ assertEquals(grid(2).localNode().id(), oddOldest.node().id());
+ }
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testAgeClusterGroupSerialization() throws Exception {
+ Marshaller marshaller = getConfiguration().getMarshaller();
+
+ ClusterGroup grp = ignite.cluster().forYoungest();
+ ClusterNode node = grp.node();
+
+ byte[] arr = marshaller.marshal(grp);
+
+ ClusterGroup obj = marshaller.unmarshal(arr, null);
+
+ assertEquals(node.id(), obj.node().id());
+
+ try (Ignite ignore = startGrid()) {
+ obj = marshaller.unmarshal(arr, null);
+
+ assertEquals(grp.node().id(), obj.node().id());
+ assertFalse(node.id().equals(obj.node().id()));
+ }
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientServer() throws Exception {
+ ClusterGroup srv = ignite.cluster().forServers();
+
+ assertEquals(2, srv.nodes().size());
+ assertTrue(srv.nodes().contains(ignite(0).cluster().localNode()));
+ assertTrue(srv.nodes().contains(ignite(1).cluster().localNode()));
+
+ ClusterGroup cli = ignite.cluster().forClients();
+
+ assertEquals(2, srv.nodes().size());
+ assertTrue(cli.nodes().contains(ignite(2).cluster().localNode()));
+ assertTrue(cli.nodes().contains(ignite(3).cluster().localNode()));
+ }
+
+ /**
+ * @param cnt Count.
+ * @param even Even.
+ */
+ private static int gridMaxOrder(int cnt, boolean even) {
+ assert cnt > 2;
+
+ cnt = cnt - (cnt % 2);
+
+ return even ? cnt - 1 : cnt - 2;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6c3d97f8/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionAbstractTest.java
deleted file mode 100644
index cb1341c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionAbstractTest.java
+++ /dev/null
@@ -1,784 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * 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.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal;
-
-import org.apache.ignite.*;
-import org.apache.ignite.cluster.*;
-import org.apache.ignite.compute.*;
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.events.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.lang.*;
-import org.apache.ignite.spi.discovery.tcp.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-import org.apache.ignite.testframework.junits.common.*;
-import org.jetbrains.annotations.*;
-
-import java.io.*;
-import java.util.*;
-import java.util.concurrent.*;
-import java.util.concurrent.atomic.*;
-
-import static org.apache.ignite.events.EventType.*;
-
-/**
- * Abstract test for {@link org.apache.ignite.cluster.ClusterGroup}
- */
-@SuppressWarnings("deprecation")
-public abstract class GridProjectionAbstractTest extends GridCommonAbstractTest implements Externalizable {
- /** VM ip finder for TCP discovery. */
- private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
- /** Waiting timeout. */
- private static final int WAIT_TIMEOUT = 30000;
-
- /** Utility static variable. */
- private static final AtomicInteger cnt = new AtomicInteger(0);
-
- /** Mutex. */
- private static final Object mux = new Object();
-
- /** Projection. */
- private ClusterGroup prj;
-
- /** Runnable job. */
- private IgniteRunnable runJob = new TestRunnable();
-
- /** Callable job. */
- private IgniteCallable<String> calJob = new TestCallable<>();
-
- /** Closure job. */
- private IgniteClosure<String, String> clrJob = new IgniteClosure<String, String>() {
- @Override public String apply(String s) {
- return s;
- }
-
- @Override public String toString() {
- return "clrJob";
- }
- };
-
- /** Reducer. */
- private IgniteReducer<String, Object> rdc = new IgniteReducer<String, Object>() {
- @Override public boolean collect(String e) {
- return true;
- }
-
- @Nullable @Override public Object reduce() {
- return null;
- }
-
- @Override public String toString() {
- return "rdc";
- }
- };
-
- /** */
- protected GridProjectionAbstractTest() {
- // No-op.
- }
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
- IgniteConfiguration cfg = super.getConfiguration(gridName);
-
- cfg.setDiscoverySpi(new TcpDiscoverySpi().setForceServerMode(true).setIpFinder(ipFinder));
-
- return cfg;
- }
-
- /**
- * @param startGrid Start grid flag.
- */
- protected GridProjectionAbstractTest(boolean startGrid) {
- super(startGrid);
- }
-
- /** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- prj = projection();
-
- cnt.set(0);
- }
-
- /**
- * @return Projection.
- */
- protected abstract ClusterGroup projection();
-
- /**
- * @return Local node ID.
- */
- @Nullable protected abstract UUID localNodeId();
-
- /**
- * @return Remote nodes IDs.
- */
- protected Collection<UUID> remoteNodeIds() {
- return F.nodeIds(projection().forRemotes().nodes());
- }
-
- /**
- * @return Projection size.
- */
- private int projectionSize() {
- int size = localNodeId() != null ? 1 : 0;
-
- size += remoteNodeIds().size();
-
- assert size > 0;
-
- return size;
- }
-
- /**
- * @return Collection of projection node IDs.
- */
- private Collection<UUID> projectionNodeIds() {
- Collection<UUID> ids = new LinkedList<>();
-
- UUID id = localNodeId();
-
- if (id != null)
- ids.add(id);
-
- ids.addAll(remoteNodeIds());
-
- assert !ids.isEmpty();
-
- return ids;
- }
-
- /**
- * Test for projection on not existing node IDs.
- */
- public void testInvalidProjection() {
- Collection<UUID> ids = new HashSet<>();
-
- ids.add(UUID.randomUUID());
- ids.add(UUID.randomUUID());
-
- ClusterGroup invalidPrj = prj.forNodeIds(ids);
-
- assertEquals(0, invalidPrj.nodes().size());
- }
-
- /**
- * @throws Exception If test failed.
- */
- public void testProjection() throws Exception {
- assert prj != null;
-
- assert prj.ignite() != null;
- assert prj.predicate() != null;
-
- int size = projectionSize();
-
- assert prj.nodes().size() == size;
-
- Collection<UUID> nodeIds = projectionNodeIds();
-
- for (ClusterNode node : prj.nodes())
- assert nodeIds.contains(node.id());
- }
-
- /**
- * @throws Exception If test failed.
- */
- public void testRemoteNodes() throws Exception {
- Collection<UUID> remoteNodeIds = remoteNodeIds();
-
- UUID locNodeId = localNodeId();
-
- int size = remoteNodeIds.size();
-
- String name = "oneMoreGrid";
-
- try {
- Ignite g = startGrid(name);
-
- UUID excludedId = g.cluster().localNode().id();
-
- assertEquals(size, prj.forRemotes().nodes().size());
-
- for (ClusterNode node : prj.forRemotes().nodes()) {
- UUID id = node.id();
-
- assert !id.equals(locNodeId) && remoteNodeIds.contains(id) && !excludedId.equals(id);
- }
- }
- finally {
- stopGrid(name);
- }
- }
-
- /**
- * @throws Exception If test failed.
- */
- public void testRemoteProjection() throws Exception {
- Collection<UUID> remoteNodeIds = remoteNodeIds();
-
- ClusterGroup remotePrj = projection().forRemotes();
-
- Collection<UUID> prjNodeIds = F.nodeIds(remotePrj.nodes());
-
- assert prjNodeIds.size() == remoteNodeIds.size();
-
- assert prjNodeIds.containsAll(remoteNodeIds());
-
- assert !prjNodeIds.contains(localNodeId());
-
- String name = "oneMoreGrid";
-
- try {
- Ignite g = startGrid(name);
-
- UUID excludedId = g.cluster().localNode().id();
-
- assert !F.nodeIds(remotePrj.nodes()).contains(excludedId);
- }
- finally {
- stopGrid(name);
- }
- }
-
- /**
- * @throws Exception If test failed.
- */
- public void testExecution() throws Exception {
- String name = "oneMoreGrid";
-
- Collection<IgniteBiTuple<Ignite, IgnitePredicate<Event>>> lsnrs = new LinkedList<>();
-
- try {
- final AtomicInteger cnt = new AtomicInteger();
-
- Ignite g = startGrid(name);
-
- IgnitePredicate<Event> lsnr;
-
- if (!IgniteCluster.class.isAssignableFrom(projection().getClass())) {
- g.events().localListen(lsnr = new IgnitePredicate<Event>() {
- @Override public boolean apply(Event evt) {
- assert evt.type() == EVT_JOB_STARTED;
-
- assert false;
-
- return true;
- }
- }, EVT_JOB_STARTED);
-
- lsnrs.add(F.t(g, lsnr));
- }
-
- for (ClusterNode node : prj.nodes()) {
- g = G.ignite(node.id());
-
- g.events().localListen(lsnr = new IgnitePredicate<Event>() {
- @Override public boolean apply(Event evt) {
- assert evt.type() == EVT_JOB_STARTED;
-
- synchronized (mux) {
- cnt.incrementAndGet();
-
- mux.notifyAll();
- }
-
- return true;
- }
- }, EVT_JOB_STARTED);
-
- lsnrs.add(F.t(g, lsnr));
- }
-
- run1(cnt);
- run2(cnt);
-
- call1(cnt);
- call2(cnt);
- call3(cnt);
- call4(cnt);
- call5(cnt);
-
- forkjoin1(cnt);
- forkjoin2(cnt);
-
- exec1(cnt);
- exec2(cnt);
-
- executorService(cnt);
-
- checkActiveFutures();
- }
- finally {
- for (IgniteBiTuple<Ignite, IgnitePredicate<Event>> t : lsnrs)
- t.get1().events().stopLocalListen(t.get2(), EVT_JOB_STARTED);
-
- stopGrid(name);
- }
- }
-
- /**
- * @param cnt Counter.
- * @throws Exception If failed.
- */
- private void run1(AtomicInteger cnt) throws Exception {
- IgniteCompute comp = compute(prj).withAsync();
-
- comp.broadcast(runJob);
-
- ComputeTaskFuture fut = comp.future();
-
- waitForExecution(fut);
-
- cnt.set(0);
-
- compute(prj).broadcast(runJob);
-
- waitForValue(cnt, projectionSize());
- }
-
- /**
- * @param cnt Counter.
- * @throws Exception If failed.
- */
- private void run2(AtomicInteger cnt) throws Exception {
- Collection<IgniteRunnable> jobs = F.asList(runJob);
-
- IgniteCompute comp = compute(prj).withAsync();
-
- comp.run(jobs);
-
- ComputeTaskFuture fut = comp.future();
-
- waitForExecution(fut);
-
- cnt.set(0);
-
- compute(prj).run(jobs);
-
- waitForValue(cnt, jobs.size());
- }
-
- /**
- * @param cnt Counter.
- * @throws Exception If failed.
- */
- private void call1(AtomicInteger cnt) throws Exception {
- IgniteCompute comp = compute(prj).withAsync();
-
- comp.broadcast(calJob);
-
- ComputeTaskFuture fut = comp.future();
-
- waitForExecution(fut);
-
- cnt.set(0);
-
- compute(prj).broadcast(calJob);
-
- waitForValue(cnt, projectionSize());
- }
-
- /**
- * @param cnt Counter.
- * @throws Exception If failed.
- */
- private void call2(AtomicInteger cnt) throws Exception {
- IgniteCompute comp = compute(prj).withAsync();
-
- Collection<IgniteCallable<String>> jobs = F.asList(calJob);
-
- comp.call(jobs);
-
- ComputeTaskFuture fut = comp.future();
-
- waitForExecution(fut);
-
- cnt.set(0);
-
- compute(prj).call(jobs);
-
- waitForValue(cnt, jobs.size());
- }
-
- /**
- * @param cnt Counter.
- * @throws Exception If failed.
- */
- private void call3(AtomicInteger cnt) throws Exception {
- IgniteCompute comp = compute(prj).withAsync();
-
- comp.apply(clrJob, (String) null);
-
- ComputeTaskFuture fut = comp.future();
-
- waitForExecution(fut);
-
- cnt.set(0);
-
- compute(prj).apply(clrJob, (String) null);
-
- waitForValue(cnt, 1);
- }
-
- /**
- * @param cnt Counter.
- * @throws Exception If failed.
- */
- private void call4(AtomicInteger cnt) throws Exception {
- Collection<String> args = F.asList("a", "b", "c");
-
- IgniteCompute comp = compute(prj).withAsync();
-
- comp.apply(clrJob, args);
-
- ComputeTaskFuture fut = comp.future();
-
- waitForExecution(fut);
-
- cnt.set(0);
-
- compute(prj).apply(clrJob, args);
-
- waitForValue(cnt, args.size());
- }
-
- /**
- * @param cnt Counter.
- * @throws Exception If failed.
- */
- private void call5(AtomicInteger cnt) throws Exception {
- IgniteCompute comp = compute(prj).withAsync();
-
- comp.broadcast(new TestClosure(), "arg");
-
- ComputeTaskFuture<Collection<String>> fut = comp.future();
-
- waitForExecution(fut);
-
- cnt.set(0);
-
- Collection<String> res = compute(prj).broadcast(new TestClosure(), "arg");
-
- assertEquals(projectionSize(), res.size());
-
- waitForValue(cnt, projectionSize());
-
- for (String resStr : res)
- assertEquals("arg", resStr);
- }
-
- /**
- * @param cnt Counter.
- * @throws Exception If failed.
- */
- private void forkjoin1(AtomicInteger cnt) throws Exception {
- Collection<String> args = F.asList("a", "b", "c");
-
- IgniteCompute comp = compute(prj).withAsync();
-
- comp.apply(clrJob, args, rdc);
-
- ComputeTaskFuture fut = comp.future();
-
- waitForExecution(fut);
-
- cnt.set(0);
-
- compute(prj).apply(clrJob, args, rdc);
-
- waitForValue(cnt, args.size());
- }
-
- /**
- * @param cnt Counter.
- * @throws Exception If failed.
- */
- private void forkjoin2(AtomicInteger cnt) throws Exception {
- Collection<IgniteCallable<String>> jobs = F.asList(calJob);
-
- IgniteCompute comp = compute(prj).withAsync();
-
- comp.call(jobs, rdc);
-
- ComputeTaskFuture fut = comp.future();
-
- waitForExecution(fut);
-
- cnt.set(0);
-
- compute(prj).call(jobs, rdc);
-
- waitForValue(cnt, jobs.size());
- }
-
- /**
- * @param cnt Counter.
- * @throws Exception If failed.
- */
- private void exec1(AtomicInteger cnt) throws Exception {
- cnt.set(0);
-
- compute(prj).execute(TestTask.class.getName(), null);
-
- waitForValue(cnt, projectionSize());
-
- cnt.set(0);
-
- compute(prj).execute(new TestTask(), null);
-
- waitForValue(cnt, projectionSize());
-
- cnt.set(0);
-
- compute(prj).execute(TestTask.class, null);
-
- waitForValue(cnt, projectionSize());
- }
-
- /**
- * @param cnt Counter.
- * @throws Exception If failed.
- */
- private void exec2(AtomicInteger cnt) throws Exception {
- cnt.set(0);
-
- compute(prj).withTimeout(WAIT_TIMEOUT).execute(TestTask.class.getName(), null);
-
- waitForValue(cnt, projectionSize());
-
- cnt.set(0);
-
- compute(prj).withTimeout(WAIT_TIMEOUT).execute(new TestTask(), null);
-
- waitForValue(cnt, projectionSize());
-
- cnt.set(0);
-
- compute(prj).withTimeout(WAIT_TIMEOUT).execute(TestTask.class, null);
-
- waitForValue(cnt, projectionSize());
- }
-
- /**
- * @param cnt Counter.
- * @throws Exception If failed.
- */
- private void executorService(AtomicInteger cnt) throws Exception {
- cnt.set(0);
-
- ExecutorService execSrvc = prj.ignite().executorService(prj);
-
- Future<String> fut = execSrvc.submit(new TestCallable<String>() {
- @Override public String call() throws Exception {
- return "submit1";
- }
- });
-
- waitForValue(cnt, 1);
-
- assertEquals("submit1", fut.get());
-
- cnt.set(0);
-
- fut = execSrvc.submit(new TestRunnable(), "submit2");
-
- waitForValue(cnt, 1);
-
- assertEquals("submit2", fut.get());
-
- cnt.set(0);
-
- Future<?> runFut = execSrvc.submit(new TestRunnable());
-
- waitForValue(cnt, 1);
-
- runFut.get();
- }
-
- /**
- * @param fut Execution future.
- * @throws InterruptedException Thrown if wait was interrupted.
- */
- @SuppressWarnings({"UnconditionalWait"})
- private void waitForExecution(IgniteFuture fut) throws InterruptedException {
- long sleep = 250;
-
- long threshold = System.currentTimeMillis() + WAIT_TIMEOUT;
-
- do synchronized (mux) {
- mux.wait(sleep);
- }
- while (fut != null && !fut.isDone() && !fut.isCancelled() && threshold > System.currentTimeMillis());
-
- assert fut == null || fut.isDone();
- }
-
- /**
- * @param cnt Counter to check.
- * @param val Value to check.
- * @throws InterruptedException Thrown if wait was interrupted.
- */
- private void waitForValue(AtomicInteger cnt, int val) throws InterruptedException {
- assert cnt != null;
- assert val > 0;
-
- long threshold = System.currentTimeMillis() + WAIT_TIMEOUT;
-
- long time;
-
- while (threshold > (time = System.currentTimeMillis()))
- synchronized (mux) {
- if (cnt.get() == val)
- break;
-
- mux.wait(threshold - time);
- }
-
- assert cnt.get() == val;
- }
-
- /**
- * @throws Exception If test failed.
- */
- private void checkActiveFutures() throws Exception {
- IgniteCompute comp = compute(prj).withAsync();
-
- assertEquals(0, comp.activeTaskFutures().size());
-
- cnt.set(0);
-
- Collection<ComputeTaskFuture<Object>> futsList = new ArrayList<>();
-
- for (int i = 0; i < 10; i++) {
- comp.call(new TestWaitCallable<>());
-
- ComputeTaskFuture<Object> fut = comp.future();
-
- assertFalse(fut.isDone());
-
- Map<IgniteUuid, ComputeTaskFuture<Object>> futs = comp.activeTaskFutures();
-
- assertEquals(i + 1, futs.size());
-
- assertTrue(futs.containsKey(fut.getTaskSession().getId()));
-
- futsList.add(fut);
- }
-
- synchronized (mux) {
- cnt.incrementAndGet();
-
- mux.notifyAll();
- }
-
- for (ComputeTaskFuture<Object> fut : futsList)
- fut.get();
-
- assertEquals(0, comp.activeTaskFutures().size());
- }
-
- /**
- * Test closure.
- */
- private static class TestClosure implements IgniteClosure<String, String> {
- /** {@inheritDoc} */
- @Override public String apply(String s) {
- return s;
- }
- }
-
- /**
- * Test runnable.
- */
- private static class TestRunnable implements IgniteRunnable {
- /** {@inheritDoc} */
- @Override public void run() {
- // No-op.
- }
- }
-
- /**
- * Test callable.
- */
- private static class TestCallable<T> implements IgniteCallable<T> {
- /** {@inheritDoc} */
- @Nullable @Override public T call() throws Exception {
- return null;
- }
- }
-
- /**
- * Test callable.
- */
- private static class TestWaitCallable<T> implements IgniteCallable<T> {
- /** {@inheritDoc} */
- @Nullable @Override public T call() throws Exception {
- synchronized (mux) {
- while (cnt.get() == 0)
- mux.wait();
- }
-
- return null;
- }
- }
-
- /**
- * Test task.
- */
- @SuppressWarnings({"PublicInnerClass"})
- public static class TestTask extends ComputeTaskSplitAdapter<String, Void> {
- /** {@inheritDoc} */
- @Override protected Collection<? extends ComputeJob> split(int gridSize, String arg) {
- Collection<ComputeJob> jobs = new HashSet<>();
-
- for (int i = 0; i < gridSize; i++)
- jobs.add(new TestJob());
-
- return jobs;
- }
-
- /** {@inheritDoc} */
- @Nullable @Override public Void reduce(List<ComputeJobResult> results) {
- return null;
- }
- }
-
- /**
- * Test job.
- */
- @SuppressWarnings({"PublicInnerClass"})
- public static class TestJob extends ComputeJobAdapter {
- /** {@inheritDoc} */
- @Nullable @Override public Object execute() {
- return null;
- }
- }
-
- /** {@inheritDoc} */
- @Override public void writeExternal(ObjectOutput out) throws IOException {
- // No-op.
- }
-
- /** {@inheritDoc} */
- @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
- // No-op.
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6c3d97f8/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
deleted file mode 100644
index 9fbad80..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * 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.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal;
-
-import org.apache.ignite.*;
-import org.apache.ignite.cluster.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.*;
-import org.apache.ignite.testframework.junits.common.*;
-
-import java.util.*;
-
-/**
- * Test for {@link ClusterGroup}.
- */
-@GridCommonTest(group = "Kernal Self")
-public class GridProjectionSelfTest extends GridProjectionAbstractTest {
- /** Nodes count. */
- private static final int NODES_CNT = 4;
-
- /** Projection node IDs. */
- private static Collection<UUID> ids;
-
- /** */
- private static Ignite ignite;
-
- /** {@inheritDoc} */
- @SuppressWarnings({"ConstantConditions"})
- @Override protected void beforeTestsStarted() throws Exception {
- assert NODES_CNT > 2;
-
- ids = new LinkedList<>();
-
- try {
- for (int i = 0; i < NODES_CNT; i++) {
- Ignition.setClientMode(i > 1);
-
- Ignite g = startGrid(i);
-
- ids.add(g.cluster().localNode().id());
-
- if (i == 0)
- ignite = g;
- }
- }
- finally {
- Ignition.setClientMode(false);
- }
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTestsStopped() throws Exception {
- for (int i = 0; i < NODES_CNT; i++)
- stopGrid(i);
- }
-
- /** {@inheritDoc} */
- @Override protected ClusterGroup projection() {
- return grid(0).cluster().forPredicate(F.nodeForNodeIds(ids));
- }
-
- /** {@inheritDoc} */
- @Override protected UUID localNodeId() {
- return grid(0).localNode().id();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testRandom() throws Exception {
- assertTrue(ignite.cluster().nodes().contains(ignite.cluster().forRandom().node()));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testOldest() throws Exception {
- ClusterGroup oldest = ignite.cluster().forOldest();
-
- ClusterNode node = null;
-
- long minOrder = Long.MAX_VALUE;
-
- for (ClusterNode n : ignite.cluster().nodes()) {
- if (n.order() < minOrder) {
- node = n;
-
- minOrder = n.order();
- }
- }
-
- assertEquals(oldest.node(), ignite.cluster().forNode(node).node());
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testYoungest() throws Exception {
- ClusterGroup youngest = ignite.cluster().forYoungest();
-
- ClusterNode node = null;
-
- long maxOrder = Long.MIN_VALUE;
-
- for (ClusterNode n : ignite.cluster().nodes()) {
- if (n.order() > maxOrder) {
- node = n;
-
- maxOrder = n.order();
- }
- }
-
- assertEquals(youngest.node(), ignite.cluster().forNode(node).node());
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testNewNodes() throws Exception {
- ClusterGroup youngest = ignite.cluster().forYoungest();
- ClusterGroup oldest = ignite.cluster().forOldest();
-
- ClusterNode old = oldest.node();
- ClusterNode last = youngest.node();
-
- assertNotNull(last);
-
- try (Ignite g = startGrid(NODES_CNT)) {
- ClusterNode n = g.cluster().localNode();
-
- ClusterNode latest = youngest.node();
-
- assertNotNull(latest);
- assertEquals(latest.id(), n.id());
- assertEquals(oldest.node(), old);
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testForPredicate() throws Exception {
- IgnitePredicate<ClusterNode> evenP = new IgnitePredicate<ClusterNode>() {
- @Override public boolean apply(ClusterNode node) {
- return node.order() % 2 == 0;
- }
- };
-
- IgnitePredicate<ClusterNode> oddP = new IgnitePredicate<ClusterNode>() {
- @Override public boolean apply(ClusterNode node) {
- return node.order() % 2 == 1;
- }
- };
-
- ClusterGroup remotes = ignite.cluster().forRemotes();
-
- ClusterGroup evenYoungest = remotes.forPredicate(evenP).forYoungest();
- ClusterGroup evenOldest = remotes.forPredicate(evenP).forOldest();
-
- ClusterGroup oddYoungest = remotes.forPredicate(oddP).forYoungest();
- ClusterGroup oddOldest = remotes.forPredicate(oddP).forOldest();
-
- int clusterSize = ignite.cluster().nodes().size();
-
- assertEquals(grid(gridMaxOrder(clusterSize, true)).localNode().id(), evenYoungest.node().id());
- assertEquals(grid(1).localNode().id(), evenOldest.node().id());
-
- assertEquals(grid(gridMaxOrder(clusterSize, false)).localNode().id(), oddYoungest.node().id());
- assertEquals(grid(2).localNode().id(), oddOldest.node().id());
-
- try (Ignite g4 = startGrid(NODES_CNT);
- Ignite g5 = startGrid(NODES_CNT + 1))
- {
- clusterSize = g4.cluster().nodes().size();
-
- assertEquals(grid(gridMaxOrder(clusterSize, true)).localNode().id(), evenYoungest.node().id());
- assertEquals(grid(1).localNode().id(), evenOldest.node().id());
-
- assertEquals(grid(gridMaxOrder(clusterSize, false)).localNode().id(), oddYoungest.node().id());
- assertEquals(grid(2).localNode().id(), oddOldest.node().id());
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAgeClusterGroupSerialization() throws Exception {
- Marshaller marshaller = getConfiguration().getMarshaller();
-
- ClusterGroup grp = ignite.cluster().forYoungest();
- ClusterNode node = grp.node();
-
- byte[] arr = marshaller.marshal(grp);
-
- ClusterGroup obj = marshaller.unmarshal(arr, null);
-
- assertEquals(node.id(), obj.node().id());
-
- try (Ignite ignore = startGrid()) {
- obj = marshaller.unmarshal(arr, null);
-
- assertEquals(grp.node().id(), obj.node().id());
- assertFalse(node.id().equals(obj.node().id()));
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClientServer() throws Exception {
- ClusterGroup srv = ignite.cluster().forServers();
-
- assertEquals(2, srv.nodes().size());
- assertTrue(srv.nodes().contains(ignite(0).cluster().localNode()));
- assertTrue(srv.nodes().contains(ignite(1).cluster().localNode()));
-
- ClusterGroup cli = ignite.cluster().forClients();
-
- assertEquals(2, srv.nodes().size());
- assertTrue(cli.nodes().contains(ignite(2).cluster().localNode()));
- assertTrue(cli.nodes().contains(ignite(3).cluster().localNode()));
- }
-
- /**
- * @param cnt Count.
- * @param even Even.
- */
- private static int gridMaxOrder(int cnt, boolean even) {
- assert cnt > 2;
-
- cnt = cnt - (cnt % 2);
-
- return even ? cnt - 1 : cnt - 2;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6c3d97f8/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java
index 2de04b0..3ec3278 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java
@@ -32,7 +32,7 @@ import java.util.concurrent.atomic.*;
* Test for {@link org.apache.ignite.IgniteCluster}.
*/
@GridCommonTest(group = "Kernal Self")
-public class GridSelfTest extends GridProjectionAbstractTest {
+public class GridSelfTest extends ClusterGroupAbstractTest {
/** Nodes count. */
private static final int NODES_CNT = 4;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6c3d97f8/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index 2d14728..3da198c 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@ -65,7 +65,7 @@ public class IgniteBasicTestSuite extends TestSuite {
suite.addTest(IgniteStreamSelfTestSuite.suite());
suite.addTest(new TestSuite(GridSelfTest.class));
- GridTestUtils.addTestIfNeeded(suite, GridProjectionSelfTest.class, ignoredTests);
+ GridTestUtils.addTestIfNeeded(suite, ClusterGroupSelfTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite, GridMessagingSelfTest.class, ignoredTests);
suite.addTest(new TestSuite(IgniteMessagingWithClientTest.class));
GridTestUtils.addTestIfNeeded(suite, GridMessagingNoPeerClassLoadingSelfTest.class, ignoredTests);
[39/50] incubator-ignite git commit: Merge branch 'ignite-gg-10457'
into ignite-sprint-7
Posted by sb...@apache.org.
Merge branch 'ignite-gg-10457' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6996ea9e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6996ea9e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6996ea9e
Branch: refs/heads/ignite-788-dev-review
Commit: 6996ea9ee6fadd076ad13a1fd9c03a5a52fc3b6b
Parents: 2ee616d 60c4d65
Author: AKuznetsov <ak...@gridgain.com>
Authored: Mon Jun 29 10:44:52 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Mon Jun 29 10:44:52 2015 +0700
----------------------------------------------------------------------
.../src/main/java/org/apache/ignite/internal/visor/VisorJob.java | 2 ++
.../org/apache/ignite/internal/visor/log/VisorLogSearchTask.java | 2 +-
.../ignite/internal/visor/node/VisorNodeDataCollectorJob.java | 4 ++++
3 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
[10/50] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
into ignite-gg-10440
Posted by sb...@apache.org.
Merge branch 'ignite-sprint-7' into ignite-gg-10440
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b2e8fea0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b2e8fea0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b2e8fea0
Branch: refs/heads/ignite-788-dev-review
Commit: b2e8fea0e9d3154f8cdde8ac4fed7d6ede1e7ace
Parents: 5b306e1 b29ff1c
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Thu Jun 25 10:13:10 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Thu Jun 25 10:13:10 2015 +0300
----------------------------------------------------------------------
.../configuration/IgniteReflectionFactory.java | 81 +++-
.../processors/cache/GridCacheContext.java | 2 +-
.../distributed/dht/GridDhtLocalPartition.java | 3 +-
.../distributed/dht/GridDhtLockFuture.java | 2 +-
.../dht/atomic/GridDhtAtomicCache.java | 9 +-
.../GridDhtPartitionsExchangeFuture.java | 95 +++-
.../datastructures/DataStructuresProcessor.java | 64 +--
.../processors/hadoop/HadoopJobInfo.java | 4 +-
.../hadoop/counter/HadoopCounterWriter.java | 5 +-
.../communication/tcp/TcpCommunicationSpi.java | 12 +
.../CacheReadThroughAtomicRestartSelfTest.java | 32 ++
...heReadThroughLocalAtomicRestartSelfTest.java | 32 ++
.../CacheReadThroughLocalRestartSelfTest.java | 32 ++
...dThroughReplicatedAtomicRestartSelfTest.java | 32 ++
...cheReadThroughReplicatedRestartSelfTest.java | 32 ++
.../cache/CacheReadThroughRestartSelfTest.java | 133 ++++++
.../cache/GridCacheAbstractSelfTest.java | 2 +-
...eDynamicCacheStartNoExchangeTimeoutTest.java | 466 +++++++++++++++++++
.../cache/IgniteDynamicCacheStartSelfTest.java | 37 ++
...GridCacheQueueMultiNodeAbstractSelfTest.java | 4 +-
.../GridCacheSetAbstractSelfTest.java | 22 +-
.../IgniteDataStructureWithJobTest.java | 111 +++++
.../distributed/IgniteCache150ClientsTest.java | 189 ++++++++
...teCacheClientNodePartitionsExchangeTest.java | 1 +
.../distributed/IgniteCacheManyClientsTest.java | 1 +
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 5 -
...achePartitionedMultiNodeFullApiSelfTest.java | 49 +-
.../GridCacheReplicatedFailoverSelfTest.java | 5 +
.../IgniteCacheTxStoreSessionTest.java | 4 +
.../GridTcpCommunicationSpiConfigSelfTest.java | 1 -
.../testframework/junits/GridAbstractTest.java | 2 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 1 +
.../testsuites/IgniteCacheTestSuite4.java | 8 +
.../testsuites/IgniteClientTestSuite.java | 38 ++
modules/hadoop/pom.xml | 78 ----
.../fs/IgniteHadoopFileSystemCounterWriter.java | 9 +-
.../processors/hadoop/HadoopClassLoader.java | 29 ++
.../processors/hadoop/HadoopDefaultJobInfo.java | 27 +-
.../internal/processors/hadoop/HadoopUtils.java | 237 ----------
.../hadoop/SecondaryFileSystemProvider.java | 3 +-
.../hadoop/fs/HadoopFileSystemCacheUtils.java | 241 ++++++++++
.../hadoop/fs/HadoopFileSystemsUtils.java | 11 +
.../hadoop/fs/HadoopLazyConcurrentMap.java | 5 +
.../hadoop/jobtracker/HadoopJobTracker.java | 25 +-
.../child/HadoopChildProcessRunner.java | 3 +-
.../processors/hadoop/v2/HadoopV2Job.java | 84 +++-
.../hadoop/v2/HadoopV2JobResourceManager.java | 22 +-
.../hadoop/v2/HadoopV2TaskContext.java | 37 +-
.../apache/ignite/igfs/IgfsEventsTestSuite.java | 5 +-
.../processors/hadoop/HadoopMapReduceTest.java | 2 +-
.../processors/hadoop/HadoopTasksV1Test.java | 7 +-
.../processors/hadoop/HadoopTasksV2Test.java | 7 +-
.../processors/hadoop/HadoopV2JobSelfTest.java | 6 +-
.../collections/HadoopAbstractMapTest.java | 3 +-
.../testsuites/IgniteHadoopTestSuite.java | 2 +-
.../IgniteIgfsLinuxAndMacOSTestSuite.java | 3 +-
56 files changed, 1878 insertions(+), 484 deletions(-)
----------------------------------------------------------------------
[21/50] incubator-ignite git commit: Merge branches 'ignite-gg-10457'
and 'ignite-sprint-7' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10457
Posted by sb...@apache.org.
Merge branches 'ignite-gg-10457' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10457
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/32706222
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/32706222
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/32706222
Branch: refs/heads/ignite-788-dev-review
Commit: 3270622211a78ae270971ab856f2eed4437c07ff
Parents: 60c4d65 e1c49b7
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Jun 25 22:51:31 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Jun 25 22:51:31 2015 +0700
----------------------------------------------------------------------
.../ClientAbstractConnectivitySelfTest.java | 4 +-
.../org/apache/ignite/cluster/ClusterGroup.java | 9 +
.../org/apache/ignite/cluster/ClusterNode.java | 2 +
.../ignite/compute/ComputeTaskSplitAdapter.java | 2 +-
.../ignite/internal/GridKernalContextImpl.java | 3 +
.../internal/cluster/ClusterGroupAdapter.java | 38 +
.../cluster/IgniteClusterAsyncImpl.java | 5 +
.../processors/cache/GridCacheContext.java | 2 +-
.../distributed/dht/GridDhtLockFuture.java | 2 +-
.../GridDhtPartitionsExchangeFuture.java | 46 +-
.../datastructures/DataStructuresProcessor.java | 64 +-
.../processors/plugin/CachePluginManager.java | 10 +-
.../internal/util/GridConfigurationFinder.java | 55 +-
.../ignite/internal/util/IgniteUtils.java | 6 +-
.../internal/ClusterForHostsSelfTest.java | 113 +++
.../internal/ClusterGroupAbstractTest.java | 777 ++++++++++++++++++
.../ignite/internal/ClusterGroupSelfTest.java | 251 ++++++
.../internal/GridProjectionAbstractTest.java | 784 -------------------
.../ignite/internal/GridProjectionSelfTest.java | 251 ------
.../apache/ignite/internal/GridSelfTest.java | 2 +-
.../CacheReadThroughAtomicRestartSelfTest.java | 32 +
...heReadThroughLocalAtomicRestartSelfTest.java | 32 +
.../CacheReadThroughLocalRestartSelfTest.java | 32 +
...dThroughReplicatedAtomicRestartSelfTest.java | 32 +
...cheReadThroughReplicatedRestartSelfTest.java | 32 +
.../cache/CacheReadThroughRestartSelfTest.java | 133 ++++
.../cache/GridCacheAbstractSelfTest.java | 2 +-
...eDynamicCacheStartNoExchangeTimeoutTest.java | 466 +++++++++++
.../cache/IgniteDynamicCacheStartSelfTest.java | 37 +
...GridCacheQueueMultiNodeAbstractSelfTest.java | 4 +-
.../GridCacheSetAbstractSelfTest.java | 22 +-
.../IgniteDataStructureWithJobTest.java | 111 +++
.../distributed/IgniteCache150ClientsTest.java | 189 +++++
...teCacheClientNodePartitionsExchangeTest.java | 1 +
.../distributed/IgniteCacheManyClientsTest.java | 1 +
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 5 -
...achePartitionedMultiNodeFullApiSelfTest.java | 49 +-
.../IgniteCacheTxStoreSessionTest.java | 4 +
.../internal/util/IgniteUtilsSelfTest.java | 22 +
.../ignite/testsuites/IgniteBasicTestSuite.java | 6 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 1 +
.../testsuites/IgniteCacheTestSuite4.java | 8 +
.../testsuites/IgniteClientTestSuite.java | 38 +
.../p2p/GridP2PContinuousDeploymentTask1.java | 2 +-
.../commands/cache/VisorCacheCommand.scala | 7 +-
45 files changed, 2535 insertions(+), 1159 deletions(-)
----------------------------------------------------------------------
[35/50] incubator-ignite git commit: Merge branch 'ignite-1017' into
ignite-sprint-7
Posted by sb...@apache.org.
Merge branch 'ignite-1017' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5fb9f2fc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5fb9f2fc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5fb9f2fc
Branch: refs/heads/ignite-788-dev-review
Commit: 5fb9f2fc14e51ce96bc884acf4e169d7dcc43fe8
Parents: 6e23608 5d09ed1
Author: ashutak <as...@gridgain.com>
Authored: Fri Jun 26 17:55:04 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Fri Jun 26 17:55:04 2015 +0300
----------------------------------------------------------------------
.../core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java | 2 +-
.../org/apache/ignite/internal/cluster/ClusterGroupAdapter.java | 2 +-
.../org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[44/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-gg-10453' into ignite-sprint-7
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-gg-10453' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/15f3612d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/15f3612d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/15f3612d
Branch: refs/heads/ignite-788-dev-review
Commit: 15f3612d31a1f39046d4bf5cc7be6e0aed7d02c8
Parents: f45f96d d51db29
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 29 15:25:53 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 29 15:25:53 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/GridKernalContextImpl.java | 2 +-
.../processors/cache/GridCacheProcessor.java | 62 ++++--
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 ------------
.../IgniteDaemonNodeMarshallerCacheTest.java | 192 +++++++++++++++++++
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
.../testsuites/IgniteCacheTestSuite3.java | 1 -
6 files changed, 245 insertions(+), 132 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15f3612d/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
[13/50] incubator-ignite git commit: # minor
Posted by sb...@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/8d8d2916
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8d8d2916
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8d8d2916
Branch: refs/heads/ignite-788-dev-review
Commit: 8d8d29160599e454d53244873ee67b61850fbbf2
Parents: b29ff1c
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Jun 25 12:59:24 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Thu Jun 25 12:59:24 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java | 2 +-
.../apache/ignite/tests/p2p/GridP2PContinuousDeploymentTask1.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8d8d2916/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java
index 7b3b0d6..bc4b3c2 100644
--- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java
@@ -73,7 +73,7 @@ public abstract class ComputeTaskSplitAdapter<T, R> extends ComputeTaskAdapter<T
/** Load balancer. */
@LoadBalancerResource
- private ComputeLoadBalancer balancer;
+ private transient ComputeLoadBalancer balancer;
/**
* This is a simplified version of {@link ComputeTask#map(List, Object)} method.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8d8d2916/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/GridP2PContinuousDeploymentTask1.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/GridP2PContinuousDeploymentTask1.java b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/GridP2PContinuousDeploymentTask1.java
index 725274b..e5c423c 100644
--- a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/GridP2PContinuousDeploymentTask1.java
+++ b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/GridP2PContinuousDeploymentTask1.java
@@ -33,7 +33,7 @@ public class GridP2PContinuousDeploymentTask1 extends ComputeTaskSplitAdapter<Ob
@Override protected Collection<? extends ComputeJob> split(int gridSize, Object arg) {
return Collections.singleton(new ComputeJobAdapter() {
@IgniteInstanceResource
- private Ignite ignite;
+ private transient Ignite ignite;
@Override public Object execute() {
X.println(">>> Executing GridP2PContinuousDeploymentTask1 job.");
[08/50] incubator-ignite git commit: # ignite-917
Posted by sb...@apache.org.
# ignite-917
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2ad4fe12
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2ad4fe12
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2ad4fe12
Branch: refs/heads/ignite-788-dev-review
Commit: 2ad4fe121184ce3bb38e899df826208da83c5b0d
Parents: b29ff1c
Author: Atri <at...@gmail.com>
Authored: Wed Jun 10 15:47:00 2015 +0530
Committer: ashutak <as...@gridgain.com>
Committed: Wed Jun 24 16:15:58 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/cluster/ClusterGroup.java | 9 +++++
.../internal/cluster/ClusterGroupAdapter.java | 42 ++++++++++++++++++++
.../cluster/IgniteClusterAsyncImpl.java | 5 +++
.../ignite/internal/GridProjectionSelfTest.java | 19 +++++++++
4 files changed, 75 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2ad4fe12/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
index 06854d4..2f43fc6 100644
--- a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
+++ b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
@@ -193,6 +193,15 @@ public interface ClusterGroup {
public ClusterGroup forHost(ClusterNode node);
/**
+ * Gets cluster group consisting from the nodes running on the hosts specified.
+ *
+ * @param host Host name to get nodes to put in cluster
+ * @param hosts Host names to get nodes to put in cluster.
+ * @return Cluster group for nodes residing on the hosts specified.
+ */
+ public ClusterGroup forHost(String host, String... hosts);
+
+ /**
* Gets a cluster group consisting from the daemon nodes.
* <p>
* Daemon nodes are the usual grid nodes that participate in topology but not
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2ad4fe12/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
index bb82c3b..1831321 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
@@ -577,6 +577,11 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable {
}
/** {@inheritDoc} */
+ @Override public final ClusterGroup forHost(String host, String... hosts) {
+ return forPredicate(new HostsFilter(host, hosts));
+ }
+
+ /** {@inheritDoc} */
@Override public final ClusterGroup forDaemons() {
return forPredicate(new DaemonFilter());
}
@@ -762,6 +767,43 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable {
/**
*/
+ private static class HostsFilter implements IgnitePredicate<ClusterNode> {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /** Hosts Names. */
+ private final HashSet hashInputHostNames;
+
+ /**
+ * @param name First host name.
+ * @param names Host names
+ */
+ private HostsFilter(String name, String[] names) {
+ hashInputHostNames = new HashSet();
+
+ if (name != null)
+ hashInputHostNames.add(name);
+
+ if (names != null && (names.length > 0)) {
+ for (String currentInputHostName : names)
+ hashInputHostNames.add(currentInputHostName);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean apply(ClusterNode n) {
+ for (String currentHostName : n.hostNames()) {
+ if (hashInputHostNames.contains(currentHostName)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+ }
+
+ /**
+ */
private static class DaemonFilter implements IgnitePredicate<ClusterNode> {
/** */
private static final long serialVersionUID = 0L;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2ad4fe12/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
index 7f67b4f..ca6cf32 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
@@ -232,6 +232,11 @@ public class IgniteClusterAsyncImpl extends AsyncSupportAdapter<IgniteCluster>
}
/** {@inheritDoc} */
+ @Override public ClusterGroup forHost(String host, String... hosts) {
+ return cluster.forHost(host, hosts);
+ }
+
+ /** {@inheritDoc} */
@Override public ClusterGroup forDaemons() {
return cluster.forDaemons();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2ad4fe12/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
index 9fbad80..bd625d9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
@@ -248,4 +248,23 @@ public class GridProjectionSelfTest extends GridProjectionAbstractTest {
return even ? cnt - 1 : cnt - 2;
}
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testForHost() throws Exception {
+ Collection<ClusterNode> allNodes = ignite.cluster().nodes();
+ ClusterNode localNode = ignite.cluster().localNode();
+ ArrayList<String> inputHostNames = new ArrayList<String> ();
+
+ for (ClusterNode currentNode : allNodes)
+ Collections.addAll(inputHostNames, currentNode.hostNames().toArray(new String[0]));
+
+ String[] inputHostNamesArray = inputHostNames.toArray(new String[] {});
+ ClusterGroup resultGroup = ignite.cluster().forHost(inputHostNamesArray[0], inputHostNamesArray);
+ ClusterGroup nullTestGroup = ignite.cluster().forHost(null, null);
+
+ assert((resultGroup.node(localNode.id())) != null);
+ assert((nullTestGroup.node(localNode.id())) == null);
+ }
}
[36/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-7' into ignite-sprint-7
Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-7' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/70238a62
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/70238a62
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/70238a62
Branch: refs/heads/ignite-788-dev-review
Commit: 70238a6254388fa3889d5cf31b5bda5dac11a100
Parents: 5fb9f2f 50a4626
Author: ashutak <as...@gridgain.com>
Authored: Fri Jun 26 17:55:31 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Fri Jun 26 17:55:31 2015 +0300
----------------------------------------------------------------------
.../processors/rest/GridRestProcessor.java | 4 ++-
.../handlers/task/GridTaskCommandHandler.java | 12 ++++---
.../processors/task/GridTaskWorker.java | 4 ++-
.../visor/query/VisorQueryCleanupTask.java | 14 +++++++++
.../util/VisorClusterGroupEmptyException.java | 33 ++++++++++++++++++++
5 files changed, 61 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
[16/50] incubator-ignite git commit: Merge branch 'ignite-917' into
ignite-sprint-7
Posted by sb...@apache.org.
Merge branch 'ignite-917' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9f74335e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9f74335e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9f74335e
Branch: refs/heads/ignite-788-dev-review
Commit: 9f74335e0793b35bdf3e171ed98a2d5734d493a3
Parents: fc17f07 401aa12
Author: ashutak <as...@gridgain.com>
Authored: Thu Jun 25 13:13:18 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Thu Jun 25 13:13:18 2015 +0300
----------------------------------------------------------------------
.../ClientAbstractConnectivitySelfTest.java | 4 +-
.../org/apache/ignite/cluster/ClusterGroup.java | 9 ++
.../org/apache/ignite/cluster/ClusterNode.java | 2 +
.../internal/cluster/ClusterGroupAdapter.java | 38 +++++++
.../cluster/IgniteClusterAsyncImpl.java | 5 +
.../ignite/internal/util/IgniteUtils.java | 6 +-
.../internal/ClusterForHostsSelfTest.java | 113 +++++++++++++++++++
.../internal/util/IgniteUtilsSelfTest.java | 22 ++++
.../ignite/testsuites/IgniteBasicTestSuite.java | 4 +-
9 files changed, 197 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
[04/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-1022' into ignite-sprint-7
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-1022' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b3e2bd48
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b3e2bd48
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b3e2bd48
Branch: refs/heads/ignite-788-dev-review
Commit: b3e2bd488e183adf0146f170df94eb762c3056da
Parents: 359b431 de7dcfe
Author: sboikov <sb...@gridgain.com>
Authored: Wed Jun 24 09:31:43 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Jun 24 09:31:43 2015 +0300
----------------------------------------------------------------------
.../datastructures/DataStructuresProcessor.java | 64 ++++-------
...GridCacheQueueMultiNodeAbstractSelfTest.java | 4 +-
.../GridCacheSetAbstractSelfTest.java | 22 ++--
.../IgniteDataStructureWithJobTest.java | 111 +++++++++++++++++++
.../distributed/IgniteCacheManyClientsTest.java | 1 +
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 5 -
...achePartitionedMultiNodeFullApiSelfTest.java | 49 ++++++--
.../IgniteCacheDataStructuresSelfTestSuite.java | 1 +
8 files changed, 186 insertions(+), 71 deletions(-)
----------------------------------------------------------------------
[49/50] incubator-ignite git commit: # fixed delays on node stop
Posted by sb...@apache.org.
# fixed delays on node stop
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/68c21ac4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/68c21ac4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/68c21ac4
Branch: refs/heads/ignite-788-dev-review
Commit: 68c21ac4c924caac6b6e4f7dd287ba1326f4fc11
Parents: 6929a0c
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Jun 29 11:44:17 2015 -0700
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Jun 29 11:44:17 2015 -0700
----------------------------------------------------------------------
.../util/ipc/shmem/IpcSharedMemoryServerEndpoint.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/68c21ac4/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
index 102c5b1..8c3f29e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
@@ -531,7 +531,9 @@ public class IpcSharedMemoryServerEndpoint implements IpcServerEndpoint {
while (true) {
try {
- Thread.sleep(GC_FREQ);
+ // Sleep only if not cancelled.
+ if (lastRunNeeded)
+ Thread.sleep(GC_FREQ);
}
catch (InterruptedException ignored) {
// No-op.
@@ -559,8 +561,12 @@ public class IpcSharedMemoryServerEndpoint implements IpcServerEndpoint {
}
if (isCancelled()) {
- if (lastRunNeeded)
+ if (lastRunNeeded) {
lastRunNeeded = false;
+
+ // Clear interrupted status.
+ Thread.interrupted();
+ }
else {
Thread.currentThread().interrupt();
[19/50] incubator-ignite git commit: Merge branches 'ignite-1037' and
'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
into ignite-1037
Posted by sb...@apache.org.
Merge branches 'ignite-1037' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-1037
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/20a45375
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/20a45375
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/20a45375
Branch: refs/heads/ignite-788-dev-review
Commit: 20a45375d115a38bbaa96206b689131551a15bb5
Parents: 65964e2 646c361
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Jun 25 22:26:32 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Jun 25 22:26:32 2015 +0700
----------------------------------------------------------------------
.../ClientAbstractConnectivitySelfTest.java | 4 +-
.../org/apache/ignite/cluster/ClusterGroup.java | 9 +
.../org/apache/ignite/cluster/ClusterNode.java | 2 +
.../ignite/compute/ComputeTaskSplitAdapter.java | 2 +-
.../configuration/IgniteReflectionFactory.java | 81 +-
.../ignite/internal/GridKernalContextImpl.java | 3 +
.../internal/cluster/ClusterGroupAdapter.java | 38 +
.../cluster/IgniteClusterAsyncImpl.java | 5 +
.../processors/cache/GridCacheContext.java | 2 +-
.../distributed/dht/GridDhtLocalPartition.java | 3 +-
.../distributed/dht/GridDhtLockFuture.java | 2 +-
.../dht/atomic/GridDhtAtomicCache.java | 9 +-
.../GridDhtPartitionsExchangeFuture.java | 46 +-
.../datastructures/DataStructuresProcessor.java | 64 +-
.../processors/hadoop/HadoopJobInfo.java | 4 +-
.../hadoop/counter/HadoopCounterWriter.java | 5 +-
.../processors/plugin/CachePluginManager.java | 10 +-
.../ignite/internal/util/IgniteUtils.java | 6 +-
.../internal/ClusterForHostsSelfTest.java | 113 +++
.../internal/ClusterGroupAbstractTest.java | 777 ++++++++++++++++++
.../ignite/internal/ClusterGroupSelfTest.java | 251 ++++++
.../internal/GridProjectionAbstractTest.java | 784 -------------------
.../ignite/internal/GridProjectionSelfTest.java | 251 ------
.../apache/ignite/internal/GridSelfTest.java | 2 +-
.../CacheReadThroughAtomicRestartSelfTest.java | 32 +
...heReadThroughLocalAtomicRestartSelfTest.java | 32 +
.../CacheReadThroughLocalRestartSelfTest.java | 32 +
...dThroughReplicatedAtomicRestartSelfTest.java | 32 +
...cheReadThroughReplicatedRestartSelfTest.java | 32 +
.../cache/CacheReadThroughRestartSelfTest.java | 133 ++++
.../cache/GridCacheAbstractSelfTest.java | 2 +-
...eDynamicCacheStartNoExchangeTimeoutTest.java | 466 +++++++++++
.../cache/IgniteDynamicCacheStartSelfTest.java | 37 +
...GridCacheQueueMultiNodeAbstractSelfTest.java | 4 +-
.../GridCacheSetAbstractSelfTest.java | 22 +-
.../IgniteDataStructureWithJobTest.java | 111 +++
.../distributed/IgniteCache150ClientsTest.java | 189 +++++
...teCacheClientNodePartitionsExchangeTest.java | 1 +
.../distributed/IgniteCacheManyClientsTest.java | 1 +
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 5 -
...achePartitionedMultiNodeFullApiSelfTest.java | 49 +-
.../GridCacheReplicatedFailoverSelfTest.java | 5 +
.../IgniteCacheTxStoreSessionTest.java | 4 +
.../internal/util/IgniteUtilsSelfTest.java | 22 +
.../testframework/junits/GridAbstractTest.java | 2 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 6 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 1 +
.../testsuites/IgniteCacheTestSuite4.java | 8 +
.../testsuites/IgniteClientTestSuite.java | 38 +
.../p2p/GridP2PContinuousDeploymentTask1.java | 2 +-
modules/hadoop/pom.xml | 78 --
.../fs/IgniteHadoopFileSystemCounterWriter.java | 9 +-
.../processors/hadoop/HadoopClassLoader.java | 29 +
.../processors/hadoop/HadoopDefaultJobInfo.java | 27 +-
.../internal/processors/hadoop/HadoopUtils.java | 237 ------
.../hadoop/SecondaryFileSystemProvider.java | 3 +-
.../hadoop/fs/HadoopFileSystemCacheUtils.java | 241 ++++++
.../hadoop/fs/HadoopFileSystemsUtils.java | 11 +
.../hadoop/fs/HadoopLazyConcurrentMap.java | 5 +
.../hadoop/jobtracker/HadoopJobTracker.java | 25 +-
.../child/HadoopChildProcessRunner.java | 3 +-
.../processors/hadoop/v2/HadoopV2Job.java | 84 +-
.../hadoop/v2/HadoopV2JobResourceManager.java | 22 +-
.../hadoop/v2/HadoopV2TaskContext.java | 37 +-
.../apache/ignite/igfs/IgfsEventsTestSuite.java | 5 +-
.../processors/hadoop/HadoopMapReduceTest.java | 2 +-
.../processors/hadoop/HadoopTasksV1Test.java | 7 +-
.../processors/hadoop/HadoopTasksV2Test.java | 7 +-
.../processors/hadoop/HadoopV2JobSelfTest.java | 6 +-
.../collections/HadoopAbstractMapTest.java | 3 +-
.../testsuites/IgniteHadoopTestSuite.java | 2 +-
.../IgniteIgfsLinuxAndMacOSTestSuite.java | 3 +-
72 files changed, 3069 insertions(+), 1518 deletions(-)
----------------------------------------------------------------------
[23/50] incubator-ignite git commit: # ignite-sprint-7: update sprint
version at git-patch-prop.sh
Posted by sb...@apache.org.
# ignite-sprint-7: update sprint version at git-patch-prop.sh
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3e8ddb47
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3e8ddb47
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3e8ddb47
Branch: refs/heads/ignite-788-dev-review
Commit: 3e8ddb47dcef245596e9b7028a3f37a43e568185
Parents: e1c49b7
Author: ashutak <as...@gridgain.com>
Authored: Thu Jun 25 21:04:11 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Thu Jun 25 21:04:11 2015 +0300
----------------------------------------------------------------------
scripts/git-patch-prop.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3e8ddb47/scripts/git-patch-prop.sh
----------------------------------------------------------------------
diff --git a/scripts/git-patch-prop.sh b/scripts/git-patch-prop.sh
index c856fb4..16f907e 100644
--- a/scripts/git-patch-prop.sh
+++ b/scripts/git-patch-prop.sh
@@ -19,6 +19,6 @@
#
# Git patch-file maker/applier properties.
#
-IGNITE_DEFAULT_BRANCH='ignite-sprint-5'
+IGNITE_DEFAULT_BRANCH='ignite-sprint-7'
PATCHES_HOME=${IGNITE_HOME}
[27/50] incubator-ignite git commit: # ignite-sprint-7 enabled test
Posted by sb...@apache.org.
# ignite-sprint-7 enabled test
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/01d842a5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/01d842a5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/01d842a5
Branch: refs/heads/ignite-788-dev-review
Commit: 01d842a5110587cf6df4a17217a0674e9bed391f
Parents: 3e8ddb4
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jun 26 12:29:17 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jun 26 12:29:17 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/GridDiscoveryEventSelfTest.java | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01d842a5/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java
index 3981b7f..d820dba 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java
@@ -98,7 +98,7 @@ public class GridDiscoveryEventSelfTest extends GridCommonAbstractTest {
private AtomicInteger cnt = new AtomicInteger();
@Override public boolean apply(Event evt) {
- assert evt.type() == EVT_NODE_JOINED;
+ assert evt.type() == EVT_NODE_JOINED : evt;
evts.put(cnt.getAndIncrement(), ((DiscoveryEvent)evt).topologyNodes());
@@ -147,8 +147,6 @@ public class GridDiscoveryEventSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testLeaveSequenceEvents() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-932");
-
try {
Ignite g0 = startGrid(0);
@@ -165,6 +163,8 @@ public class GridDiscoveryEventSelfTest extends GridCommonAbstractTest {
private AtomicInteger cnt = new AtomicInteger();
@Override public boolean apply(Event evt) {
+ assert evt.type() == EVT_NODE_LEFT || evt.type() == EVT_NODE_FAILED : evt;
+
evts.put(cnt.getAndIncrement(), ((DiscoveryEvent) evt).topologyNodes());
latch.countDown();
@@ -215,8 +215,6 @@ public class GridDiscoveryEventSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testMixedSequenceEvents() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-932");
-
try {
Ignite g0 = startGrid(0);
@@ -231,7 +229,7 @@ public class GridDiscoveryEventSelfTest extends GridCommonAbstractTest {
@Override public boolean apply(Event evt) {
assert evt.type() == EVT_NODE_JOINED
- || evt.type() == EVT_NODE_LEFT || evt.type() == EVT_NODE_FAILED;
+ || evt.type() == EVT_NODE_LEFT || evt.type() == EVT_NODE_FAILED : evt;
evts.put(cnt.getAndIncrement(), ((DiscoveryEvent) evt).topologyNodes());
@@ -347,7 +345,7 @@ public class GridDiscoveryEventSelfTest extends GridCommonAbstractTest {
private AtomicInteger cnt = new AtomicInteger();
@Override public boolean apply(Event evt) {
- assert evt.type() == EVT_NODE_JOINED;
+ assert evt.type() == EVT_NODE_JOINED : evt;
X.println(">>>>>>> Joined " + F.viewReadOnly(((DiscoveryEvent) evt).topologyNodes(),
NODE_2ID));
[25/50] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
into ignite-1006
Posted by sb...@apache.org.
Merge branch 'ignite-sprint-7' into ignite-1006
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a8232be6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a8232be6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a8232be6
Branch: refs/heads/ignite-788-dev-review
Commit: a8232be601851ca9658502de12f38ac86c1e6758
Parents: c6f66c6 3e8ddb4
Author: ashutak <as...@gridgain.com>
Authored: Thu Jun 25 21:12:09 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Thu Jun 25 21:12:09 2015 +0300
----------------------------------------------------------------------
DEVNOTES.txt | 21 +
RELEASE_NOTES.txt | 12 +
assembly/dependencies-fabric.xml | 1 +
examples/config/example-cache.xml | 2 +
examples/pom.xml | 36 +-
idea/ignite_codeStyle.xml | 147 ++++
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
.../s3/S3CheckpointManagerSelfTest.java | 2 +-
.../checkpoint/s3/S3CheckpointSpiSelfTest.java | 4 +-
.../s3/S3CheckpointSpiStartStopSelfTest.java | 2 +-
.../s3/S3SessionCheckpointSelfTest.java | 2 +-
.../s3/TcpDiscoveryS3IpFinderSelfTest.java | 2 +-
modules/clients/pom.xml | 2 +-
.../ClientAbstractConnectivitySelfTest.java | 4 +-
.../client/router/TcpSslRouterSelfTest.java | 5 +
.../client/suite/IgniteClientTestSuite.java | 3 +-
modules/cloud/pom.xml | 2 +-
.../cloud/TcpDiscoveryCloudIpFinder.java | 25 +-
.../TcpDiscoveryCloudIpFinderSelfTest.java | 3 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 3 +-
.../apache/ignite/IgniteSystemProperties.java | 6 +
.../apache/ignite/cache/query/ScanQuery.java | 48 +-
.../cache/store/jdbc/CacheJdbcBlobStore.java | 22 +-
.../store/jdbc/CacheJdbcBlobStoreFactory.java | 290 +++++++
.../cache/store/jdbc/CacheJdbcPojoStore.java | 6 +-
.../store/jdbc/CacheJdbcPojoStoreFactory.java | 148 ++++
.../org/apache/ignite/cluster/ClusterGroup.java | 9 +
.../org/apache/ignite/cluster/ClusterNode.java | 2 +
.../ignite/compute/ComputeTaskSplitAdapter.java | 2 +-
.../configuration/CacheConfiguration.java | 4 +-
.../configuration/IgniteReflectionFactory.java | 81 +-
.../ignite/internal/GridKernalContextImpl.java | 8 +-
.../ignite/internal/GridPluginContext.java | 6 +
.../apache/ignite/internal/IgniteKernal.java | 13 +-
.../internal/MarshallerContextAdapter.java | 48 +-
.../ignite/internal/MarshallerContextImpl.java | 36 +-
.../client/GridClientConfiguration.java | 2 +-
.../GridClientOptimizedMarshaller.java | 26 +
.../impl/GridTcpRouterNioListenerAdapter.java | 2 +-
.../internal/cluster/ClusterGroupAdapter.java | 38 +
.../cluster/IgniteClusterAsyncImpl.java | 5 +
.../internal/interop/InteropBootstrap.java | 3 +-
.../internal/interop/InteropIgnition.java | 57 +-
.../internal/interop/InteropProcessor.java | 8 +
.../internal/managers/GridManagerAdapter.java | 8 +-
.../discovery/GridDiscoveryManager.java | 39 +-
.../affinity/AffinityTopologyVersion.java | 7 -
.../affinity/GridAffinityAssignmentCache.java | 5 +-
.../processors/cache/GridCacheAdapter.java | 19 +-
.../processors/cache/GridCacheContext.java | 2 +-
.../processors/cache/GridCacheIoManager.java | 64 +-
.../processors/cache/GridCacheMessage.java | 51 --
.../GridCachePartitionExchangeManager.java | 73 +-
.../processors/cache/GridCacheProcessor.java | 91 ++-
.../processors/cache/GridCacheSwapManager.java | 67 +-
.../processors/cache/GridCacheUtils.java | 9 +
.../processors/cache/IgniteCacheProxy.java | 23 +-
.../processors/cache/KeyCacheObjectImpl.java | 11 +-
.../processors/cache/QueryCursorImpl.java | 23 +-
.../distributed/GridCacheTxRecoveryRequest.java | 26 +-
.../GridCacheTxRecoveryResponse.java | 14 +-
.../distributed/GridDistributedBaseMessage.java | 77 +-
.../distributed/GridDistributedLockRequest.java | 54 +-
.../GridDistributedLockResponse.java | 14 +-
.../GridDistributedTxFinishRequest.java | 46 +-
.../GridDistributedTxPrepareRequest.java | 62 +-
.../GridDistributedTxPrepareResponse.java | 64 +-
.../GridDistributedUnlockRequest.java | 6 +-
.../distributed/dht/GridDhtLocalPartition.java | 66 +-
.../distributed/dht/GridDhtLockFuture.java | 2 +-
.../distributed/dht/GridDhtLockRequest.java | 72 +-
.../distributed/dht/GridDhtLockResponse.java | 18 +-
.../dht/GridDhtPartitionTopologyImpl.java | 4 +-
.../dht/GridDhtPartitionsReservation.java | 292 +++++++
.../dht/GridDhtTransactionalCacheAdapter.java | 2 +-
.../distributed/dht/GridDhtTxFinishRequest.java | 38 +-
.../dht/GridDhtTxPrepareRequest.java | 54 +-
.../dht/GridDhtTxPrepareResponse.java | 22 +-
.../distributed/dht/GridDhtUnlockRequest.java | 6 +-
.../cache/distributed/dht/GridReservable.java | 35 +
.../dht/atomic/GridDhtAtomicCache.java | 9 +-
.../dht/preloader/GridDhtPartitionMap.java | 26 +-
.../GridDhtPartitionsExchangeFuture.java | 95 ++-
.../dht/preloader/GridDhtPreloader.java | 2 +-
.../distributed/near/GridNearLockRequest.java | 58 +-
.../distributed/near/GridNearLockResponse.java | 26 +-
.../near/GridNearTxFinishRequest.java | 26 +-
.../near/GridNearTxPrepareRequest.java | 50 +-
.../near/GridNearTxPrepareResponse.java | 46 +-
.../distributed/near/GridNearUnlockRequest.java | 2 +-
.../processors/cache/query/CacheQuery.java | 2 +-
.../query/GridCacheDistributedQueryManager.java | 3 +
.../cache/query/GridCacheQueryAdapter.java | 147 +++-
.../cache/query/GridCacheQueryManager.java | 243 +++---
.../cache/query/GridCacheQueryRequest.java | 47 +-
.../cache/query/GridCacheTwoStepQuery.java | 22 +-
.../processors/cache/query/QueryCursorEx.java | 8 +
.../continuous/CacheContinuousQueryHandler.java | 8 +
.../cache/transactions/IgniteTxHandler.java | 5 +-
.../transactions/IgniteTxLocalAdapter.java | 12 +-
.../cacheobject/IgniteCacheObjectProcessor.java | 9 +-
.../IgniteCacheObjectProcessorImpl.java | 12 +-
.../continuous/GridContinuousProcessor.java | 15 +-
.../datastreamer/DataStreamerCacheUpdaters.java | 2 +-
.../datastreamer/DataStreamerImpl.java | 8 +-
.../datastructures/DataStructuresProcessor.java | 129 +--
.../datastructures/GridCacheSetImpl.java | 4 +-
.../dr/IgniteDrDataStreamerCacheUpdater.java | 7 +-
.../processors/hadoop/HadoopJobInfo.java | 4 +-
.../hadoop/counter/HadoopCounterWriter.java | 5 +-
.../offheap/GridOffHeapProcessor.java | 19 +-
.../processors/plugin/CachePluginManager.java | 10 +-
.../plugin/IgnitePluginProcessor.java | 16 +-
.../portable/GridPortableInputStream.java | 10 +
.../processors/query/GridQueryIndexing.java | 18 +-
.../processors/query/GridQueryProcessor.java | 129 ++-
.../messages/GridQueryNextPageResponse.java | 35 +-
.../h2/twostep/messages/GridQueryRequest.java | 111 ++-
.../rest/client/message/GridRouterRequest.java | 18 +
.../rest/client/message/GridRouterResponse.java | 18 +
.../rest/protocols/tcp/GridTcpRestProtocol.java | 3 +-
.../service/GridServiceProcessor.java | 2 +-
.../processors/task/GridTaskProcessor.java | 23 +-
.../internal/util/GridConfigurationFinder.java | 55 +-
.../apache/ignite/internal/util/GridDebug.java | 48 +-
.../ignite/internal/util/GridJavaProcess.java | 2 +-
.../ignite/internal/util/IgniteUtils.java | 34 +-
.../shmem/IpcSharedMemoryClientEndpoint.java | 2 +-
.../ipc/shmem/IpcSharedMemoryNativeLoader.java | 151 +++-
.../shmem/IpcSharedMemoryServerEndpoint.java | 2 +-
.../util/ipc/shmem/IpcSharedMemoryUtils.java | 4 +-
.../ignite/internal/util/nio/GridNioServer.java | 64 +-
.../util/nio/GridShmemCommunicationClient.java | 146 ++++
.../util/spring/IgniteSpringHelper.java | 10 +
.../internal/visor/VisorMultiNodeTask.java | 2 +-
.../ignite/marshaller/MarshallerContext.java | 8 +
.../org/apache/ignite/plugin/PluginContext.java | 6 +
.../SpringApplicationContextResource.java | 4 +-
.../apache/ignite/resources/SpringResource.java | 6 +-
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 35 +-
.../org/apache/ignite/spi/IgniteSpiContext.java | 9 +-
.../communication/tcp/TcpCommunicationSpi.java | 561 +++++++++++--
.../tcp/TcpCommunicationSpiMBean.java | 27 +
.../ignite/spi/discovery/DiscoverySpi.java | 3 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 562 ++++++++-----
.../ignite/spi/discovery/tcp/ServerImpl.java | 275 ++++---
.../spi/discovery/tcp/TcpDiscoveryImpl.java | 69 +-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 48 +-
.../tcp/internal/TcpDiscoveryNode.java | 18 +
.../ipfinder/TcpDiscoveryIpFinderAdapter.java | 34 +-
.../TcpDiscoveryMulticastIpFinder.java | 19 +-
.../messages/TcpDiscoveryAbstractMessage.java | 10 +-
.../messages/TcpDiscoveryNodeFailedMessage.java | 18 +
.../java/org/jsr166/ConcurrentHashMap8.java | 8 +-
.../java/org/jsr166/ConcurrentLinkedDeque8.java | 586 +++++---------
.../src/main/java/org/jsr166/LongAdder8.java | 35 +-
.../core/src/main/java/org/jsr166/README.txt | 11 +
.../src/main/java/org/jsr166/Striped64_8.java | 22 +-
.../java/org/jsr166/ThreadLocalRandom8.java | 19 +-
.../src/main/java/org/jsr166/package-info.java | 12 +-
.../core/src/main/resources/ignite.properties | 2 +-
modules/core/src/test/config/tests.properties | 2 +-
.../ignite/GridSuppressedExceptionSelfTest.java | 4 +-
.../internal/ClusterForHostsSelfTest.java | 113 +++
.../internal/ClusterGroupAbstractTest.java | 777 ++++++++++++++++++
.../ignite/internal/ClusterGroupSelfTest.java | 273 +++++++
.../internal/GridDiscoveryEventSelfTest.java | 6 +-
...ridFailFastNodeFailureDetectionSelfTest.java | 15 +-
.../GridFailoverTaskWithPredicateSelfTest.java | 3 -
.../GridJobMasterLeaveAwareSelfTest.java | 2 -
.../internal/GridJobStealingSelfTest.java | 3 -
.../internal/GridProjectionAbstractTest.java | 784 -------------------
...ectionLocalJobMultipleArgumentsSelfTest.java | 2 -
.../ignite/internal/GridProjectionSelfTest.java | 273 -------
.../apache/ignite/internal/GridSelfTest.java | 30 +-
.../GridTaskExecutionContextSelfTest.java | 9 -
.../GridTaskFailoverAffinityRunTest.java | 170 ++++
.../IgniteComputeEmptyClusterGroupTest.java | 3 -
.../IgniteComputeTopologyExceptionTest.java | 9 -
.../IgniteSlowClientDetectionSelfTest.java | 187 +++++
.../GridDiscoveryManagerAliveCacheSelfTest.java | 22 +-
.../cache/CacheClientStoreSelfTest.java | 228 ++++++
...acheReadOnlyTransactionalClientSelfTest.java | 327 --------
.../CacheReadThroughAtomicRestartSelfTest.java | 32 +
...heReadThroughLocalAtomicRestartSelfTest.java | 32 +
.../CacheReadThroughLocalRestartSelfTest.java | 32 +
...dThroughReplicatedAtomicRestartSelfTest.java | 32 +
...cheReadThroughReplicatedRestartSelfTest.java | 32 +
.../cache/CacheReadThroughRestartSelfTest.java | 133 ++++
.../CacheStoreUsageMultinodeAbstractTest.java | 305 ++++++++
...eUsageMultinodeDynamicStartAbstractTest.java | 169 ++++
...oreUsageMultinodeDynamicStartAtomicTest.java | 32 +
...heStoreUsageMultinodeDynamicStartTxTest.java | 32 +
...reUsageMultinodeStaticStartAbstractTest.java | 158 ++++
...toreUsageMultinodeStaticStartAtomicTest.java | 32 +
...cheStoreUsageMultinodeStaticStartTxTest.java | 32 +
.../GridCacheAbstractFailoverSelfTest.java | 8 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 39 +-
.../cache/GridCacheAbstractSelfTest.java | 5 +-
.../cache/GridCacheAffinityRoutingSelfTest.java | 4 +-
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 +++
.../cache/GridCacheDeploymentSelfTest.java | 3 -
.../cache/GridCacheEntryMemorySizeSelfTest.java | 91 ++-
.../cache/GridCacheMemoryModeSelfTest.java | 2 -
...ridCacheMultinodeUpdateAbstractSelfTest.java | 9 +
...inodeUpdateNearEnabledNoBackupsSelfTest.java | 2 +-
...CacheMultinodeUpdateNearEnabledSelfTest.java | 2 +-
.../processors/cache/GridCacheOffHeapTest.java | 28 +-
.../GridCacheReferenceCleanupSelfTest.java | 3 -
.../processors/cache/GridCacheStopSelfTest.java | 5 +
.../cache/GridCacheVersionMultinodeTest.java | 6 +-
.../IgniteCacheAbstractStopBusySelfTest.java | 30 +-
.../cache/IgniteCacheAbstractTest.java | 3 -
.../IgniteCacheAtomicStopBusySelfTest.java | 8 +-
.../IgniteCacheEntryListenerAbstractTest.java | 14 +-
.../IgniteCacheInterceptorSelfTestSuite.java | 2 +-
.../cache/IgniteCacheInvokeReadThroughTest.java | 5 +
...CacheP2pUnmarshallingRebalanceErrorTest.java | 15 +-
.../IgniteCacheP2pUnmarshallingTxErrorTest.java | 25 +-
...gniteCacheTransactionalStopBusySelfTest.java | 13 +-
...eDynamicCacheStartNoExchangeTimeoutTest.java | 466 +++++++++++
.../cache/IgniteDynamicCacheStartSelfTest.java | 56 ++
...teStartCacheInTransactionAtomicSelfTest.java | 32 +
.../IgniteStartCacheInTransactionSelfTest.java | 254 ++++++
.../IgniteTxMultiThreadedAbstractTest.java | 4 +-
...cheAtomicReferenceMultiNodeAbstractTest.java | 11 -
...GridCacheQueueMultiNodeAbstractSelfTest.java | 6 +-
...dCacheQueueMultiNodeConsistencySelfTest.java | 5 +
...CacheQueueRotativeMultiNodeAbstractTest.java | 10 -
.../GridCacheSetAbstractSelfTest.java | 31 +-
.../IgniteDataStructureWithJobTest.java | 111 +++
...omicOffheapQueueCreateMultiNodeSelfTest.java | 5 +
...ionedAtomicQueueCreateMultiNodeSelfTest.java | 5 +
...rtitionedDataStructuresFailoverSelfTest.java | 5 +
...edOffheapDataStructuresFailoverSelfTest.java | 5 +
...PartitionedQueueCreateMultiNodeSelfTest.java | 5 +
...dCachePartitionedQueueEntryMoveSelfTest.java | 5 +
...nedQueueFailoverDataConsistencySelfTest.java | 5 +
...eplicatedDataStructuresFailoverSelfTest.java | 5 +
...CacheLoadingConcurrentGridStartSelfTest.java | 5 +
.../GridCacheAbstractJobExecutionTest.java | 3 -
...ridCachePartitionNotLoadedEventSelfTest.java | 82 ++
.../GridCachePreloadLifecycleAbstractTest.java | 2 -
.../distributed/IgniteCache150ClientsTest.java | 189 +++++
.../IgniteCacheClientNodeConcurrentStart.java | 14 +-
...teCacheClientNodePartitionsExchangeTest.java | 1 +
.../distributed/IgniteCacheManyClientsTest.java | 318 ++++++++
.../IgniteCacheMessageRecoveryAbstractTest.java | 1 +
.../IgniteCacheTxMessageRecoveryTest.java | 5 +
...heAbstractTransformWriteThroughSelfTest.java | 3 -
.../GridCacheColocatedTxExceptionSelfTest.java | 5 +
...ePartitionedNearDisabledMetricsSelfTest.java | 4 +-
...dCachePartitionedTopologyChangeSelfTest.java | 5 +
.../near/GridCacheNearEvictionSelfTest.java | 3 -
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 5 -
.../near/GridCacheNearTxExceptionSelfTest.java | 5 +
...PartitionedFullApiMultithreadedSelfTest.java | 5 +
...idCachePartitionedHitsAndMissesSelfTest.java | 3 -
...achePartitionedMultiNodeFullApiSelfTest.java | 49 +-
.../GridCachePartitionedNodeRestartTest.java | 5 +
...ePartitionedOptimisticTxNodeRestartTest.java | 5 +
...achePartitionedPreloadLifecycleSelfTest.java | 2 +-
...CachePartitionedTxMultiThreadedSelfTest.java | 5 +
.../GridCachePartitionedTxSalvageSelfTest.java | 37 +-
.../GridCacheReplicatedFailoverSelfTest.java | 5 +
...eReplicatedFullApiMultithreadedSelfTest.java | 5 +
.../GridCacheReplicatedInvalidateSelfTest.java | 4 +-
...ridCacheReplicatedMultiNodeLockSelfTest.java | 5 +
.../GridCacheReplicatedMultiNodeSelfTest.java | 5 +
.../GridCacheReplicatedNodeRestartSelfTest.java | 5 +
.../GridCacheReplicatedTxExceptionSelfTest.java | 5 +
.../replicated/GridReplicatedTxPreloadTest.java | 2 +
...acheAtomicReplicatedNodeRestartSelfTest.java | 5 +
...CacheReplicatedPreloadLifecycleSelfTest.java | 6 +-
.../GridCacheEvictionFilterSelfTest.java | 4 +-
...cheSynchronousEvictionsFailoverSelfTest.java | 5 +
.../IgniteCacheExpiryPolicyAbstractTest.java | 10 +-
...eCacheExpiryPolicyWithStoreAbstractTest.java | 4 +-
.../IgniteCacheTxStoreSessionTest.java | 4 +
...dCacheLocalFullApiMultithreadedSelfTest.java | 5 +
.../GridCacheLocalTxExceptionSelfTest.java | 5 +
.../GridCacheSwapScanQueryAbstractSelfTest.java | 115 ++-
...ridCacheContinuousQueryAbstractSelfTest.java | 2 -
...CacheClientWriteBehindStoreAbstractTest.java | 104 +++
...teCacheClientWriteBehindStoreAtomicTest.java | 38 +
.../IgnteCacheClientWriteBehindStoreTxTest.java | 32 +
.../closure/GridClosureProcessorSelfTest.java | 29 +-
.../continuous/GridEventConsumeSelfTest.java | 2 -
.../DataStreamProcessorSelfTest.java | 47 +-
.../DataStreamerMultiThreadedSelfTest.java | 3 +
.../processors/igfs/IgfsModesSelfTest.java | 4 +-
.../internal/util/IgniteUtilsSelfTest.java | 22 +
.../ipc/shmem/IgfsSharedMemoryTestServer.java | 2 +
.../IpcSharedMemoryCrashDetectionSelfTest.java | 2 +-
.../ipc/shmem/IpcSharedMemorySpaceSelfTest.java | 2 +-
.../ipc/shmem/IpcSharedMemoryUtilsSelfTest.java | 2 +-
.../LoadWithCorruptedLibFileTestRunner.java | 2 +-
.../IpcSharedMemoryBenchmarkReader.java | 2 +-
.../IpcSharedMemoryBenchmarkWriter.java | 2 +-
.../internal/util/nio/GridNioSelfTest.java | 13 +-
.../internal/util/nio/GridNioSslSelfTest.java | 2 +
.../unsafe/GridUnsafeMemorySelfTest.java | 4 +-
.../tostring/GridToStringBuilderSelfTest.java | 4 +-
.../communication/GridIoManagerBenchmark0.java | 1 +
.../marshaller/MarshallerContextTestImpl.java | 29 +-
.../ignite/messaging/GridMessagingSelfTest.java | 3 -
.../GridP2PContinuousDeploymentSelfTest.java | 2 +
.../p2p/GridP2PLocalDeploymentSelfTest.java | 6 +-
.../p2p/GridP2PRemoteClassLoadersSelfTest.java | 31 +-
.../spi/GridTcpSpiForwardingSelfTest.java | 4 +-
.../GridTcpCommunicationSpiAbstractTest.java | 13 +
...mmunicationSpiConcurrentConnectSelfTest.java | 4 +-
.../GridTcpCommunicationSpiConfigSelfTest.java | 1 -
...cpCommunicationSpiMultithreadedSelfTest.java | 21 +-
...pCommunicationSpiMultithreadedShmemTest.java | 28 +
...dTcpCommunicationSpiRecoveryAckSelfTest.java | 1 +
...GridTcpCommunicationSpiRecoverySelfTest.java | 1 +
.../GridTcpCommunicationSpiShmemSelfTest.java | 38 +
.../tcp/GridTcpCommunicationSpiTcpSelfTest.java | 7 +
.../tcp/TcpClientDiscoverySpiSelfTest.java | 183 ++++-
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 44 +-
.../testframework/GridSpiTestContext.java | 7 +-
.../ignite/testframework/GridTestUtils.java | 14 +
.../config/GridTestProperties.java | 14 +-
.../testframework/junits/GridAbstractTest.java | 2 +-
.../junits/GridTestKernalContext.java | 3 +-
.../junits/IgniteTestResources.java | 16 +-
.../junits/common/GridCommonAbstractTest.java | 15 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 32 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 25 +-
.../IgniteCacheEvictionSelfTestSuite.java | 3 +-
.../IgniteCacheFailoverTestSuite.java | 24 +-
.../IgniteCacheFailoverTestSuite2.java | 47 ++
.../IgniteCacheFullApiSelfTestSuite.java | 8 +-
...niteCacheP2pUnmarshallingErrorTestSuite.java | 20 +-
.../testsuites/IgniteCacheRestartTestSuite.java | 10 +-
.../ignite/testsuites/IgniteCacheTestSuite.java | 48 +-
.../testsuites/IgniteCacheTestSuite2.java | 4 +-
.../testsuites/IgniteCacheTestSuite3.java | 15 +-
.../testsuites/IgniteCacheTestSuite4.java | 29 +-
.../IgniteCacheWriteBehindTestSuite.java | 2 +
.../testsuites/IgniteClientTestSuite.java | 38 +
.../testsuites/IgniteComputeGridTestSuite.java | 1 +
.../testsuites/IgniteKernalSelfTestSuite.java | 16 +-
.../IgniteMarshallerSelfTestSuite.java | 28 +-
.../IgniteSpiCommunicationSelfTestSuite.java | 2 +
.../testsuites/IgniteUtilSelfTestSuite.java | 18 +-
.../apache/ignite/util/GridRandomSelfTest.java | 4 +-
.../ignite/util/TestTcpCommunicationSpi.java | 21 +
modules/extdata/p2p/pom.xml | 2 +-
.../p2p/GridP2PContinuousDeploymentTask1.java | 2 +-
.../tests/p2p/P2PTestTaskExternalPath1.java | 10 +-
.../tests/p2p/P2PTestTaskExternalPath2.java | 8 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 81 +-
.../fs/IgniteHadoopFileSystemCounterWriter.java | 9 +-
.../processors/hadoop/HadoopClassLoader.java | 29 +
.../processors/hadoop/HadoopDefaultJobInfo.java | 27 +-
.../internal/processors/hadoop/HadoopUtils.java | 237 ------
.../hadoop/SecondaryFileSystemProvider.java | 3 +-
.../hadoop/fs/HadoopFileSystemCacheUtils.java | 241 ++++++
.../hadoop/fs/HadoopFileSystemsUtils.java | 11 +
.../hadoop/fs/HadoopLazyConcurrentMap.java | 5 +
.../hadoop/jobtracker/HadoopJobTracker.java | 25 +-
.../child/HadoopChildProcessRunner.java | 3 +-
.../processors/hadoop/v2/HadoopV2Job.java | 84 +-
.../hadoop/v2/HadoopV2JobResourceManager.java | 22 +-
.../hadoop/v2/HadoopV2TaskContext.java | 37 +-
.../HadoopIgfs20FileSystemAbstractSelfTest.java | 17 +-
...oopSecondaryFileSystemConfigurationTest.java | 14 +
.../apache/ignite/igfs/IgfsEventsTestSuite.java | 5 +-
.../IgniteHadoopFileSystemAbstractSelfTest.java | 2 +-
...IgniteHadoopFileSystemHandshakeSelfTest.java | 7 +
.../IgniteHadoopFileSystemIpcCacheSelfTest.java | 7 +
.../hadoop/HadoopAbstractSelfTest.java | 7 +
.../processors/hadoop/HadoopMapReduceTest.java | 23 +-
.../processors/hadoop/HadoopTasksV1Test.java | 7 +-
.../processors/hadoop/HadoopTasksV2Test.java | 7 +-
.../processors/hadoop/HadoopV2JobSelfTest.java | 6 +-
.../collections/HadoopAbstractMapTest.java | 3 +-
.../collections/HadoopHashMapSelfTest.java | 4 +-
.../HadoopExternalTaskExecutionSelfTest.java | 2 +
.../HadoopExternalCommunicationSelfTest.java | 5 +
.../testsuites/IgniteHadoopTestSuite.java | 9 +-
.../IgniteIgfsLinuxAndMacOSTestSuite.java | 3 +-
modules/hibernate/pom.xml | 16 +-
.../hibernate/CacheHibernateBlobStore.java | 87 +-
.../CacheHibernateBlobStoreFactory.java | 235 ++++++
.../hibernate/src/test/config/factory-cache.xml | 59 ++
.../src/test/config/factory-cache1.xml | 61 ++
.../config/factory-incorrect-store-cache.xml | 56 ++
.../hibernate/HibernateL2CacheSelfTest.java | 5 +
.../HibernateL2CacheTransactionalSelfTest.java | 5 +
.../CacheHibernateStoreFactorySelfTest.java | 273 +++++++
.../testsuites/IgniteHibernateTestSuite.java | 6 +-
modules/indexing/pom.xml | 18 +-
.../processors/query/h2/IgniteH2Indexing.java | 125 ++-
.../query/h2/sql/GridSqlQuerySplitter.java | 49 +-
.../query/h2/twostep/GridMapQueryExecutor.java | 321 ++++++--
.../query/h2/twostep/GridMergeIndex.java | 17 +-
.../h2/twostep/GridMergeIndexUnsorted.java | 7 +-
.../h2/twostep/GridReduceQueryExecutor.java | 656 +++++++++++++---
.../query/h2/twostep/GridResultPage.java | 21 +-
.../CacheAbstractQueryMetricsSelfTest.java | 205 +++++
.../CachePartitionedQueryMetricsSelfTest.java | 32 +
.../CacheReplicatedQueryMetricsSelfTest.java | 32 +
...CacheScanPartitionQueryFallbackSelfTest.java | 408 ++++++++++
.../cache/GridCacheCrossCacheQuerySelfTest.java | 25 +-
.../cache/GridCacheOffHeapSelfTest.java | 1 -
.../cache/GridCacheQueryMetricsSelfTest.java | 206 -----
...idCacheReduceQueryMultithreadedSelfTest.java | 10 -
.../processors/cache/GridCacheSwapSelfTest.java | 3 -
.../IgniteCacheAbstractFieldsQuerySelfTest.java | 13 +-
.../cache/IgniteCacheAbstractQuerySelfTest.java | 79 +-
.../cache/IgniteCacheOffheapEvictQueryTest.java | 196 +++++
...hePartitionedQueryMultiThreadedSelfTest.java | 40 +-
.../IgniteCacheQueryMultiThreadedSelfTest.java | 2 -
...QueryOffheapEvictsMultiThreadedSelfTest.java | 5 +
...lientQueryReplicatedNodeRestartSelfTest.java | 419 ++++++++++
.../IgniteCacheQueryNodeRestartSelfTest.java | 41 +-
.../IgniteCacheQueryNodeRestartSelfTest2.java | 383 +++++++++
...dCacheAbstractReduceFieldsQuerySelfTest.java | 1 -
.../h2/GridIndexingSpiAbstractSelfTest.java | 4 +-
.../query/h2/sql/BaseH2CompareQueryTest.java | 6 +-
.../query/h2/sql/GridQueryParsingTest.java | 5 +-
.../IgniteCacheQuerySelfTestSuite.java | 13 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
.../cache/jta/GridCacheXAResource.java | 18 +-
.../processors/cache/GridCacheJtaSelfTest.java | 2 +-
modules/log4j/pom.xml | 2 +-
modules/mesos/README.txt | 2 +-
modules/mesos/pom.xml | 2 +-
.../apache/ignite/mesos/ClusterProperties.java | 15 +
.../apache/ignite/mesos/IgniteScheduler.java | 10 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar-2.10/README.txt | 4 +
modules/scalar-2.10/licenses/apache-2.0.txt | 202 +++++
.../scalar-2.10/licenses/scala-bsd-license.txt | 18 +
modules/scalar-2.10/pom.xml | 197 +++++
modules/scalar/pom.xml | 2 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spark-2.10/README.txt | 4 +
modules/spark-2.10/licenses/apache-2.0.txt | 202 +++++
.../spark-2.10/licenses/scala-bsd-license.txt | 18 +
modules/spark-2.10/pom.xml | 120 +++
modules/spark/README.txt | 8 +
modules/spark/licenses/apache-2.0.txt | 202 +++++
modules/spark/licenses/scala-bsd-license.txt | 18 +
modules/spark/pom.xml | 110 +++
.../org/apache/ignite/spark/IgniteContext.scala | 119 +++
.../org/apache/ignite/spark/IgniteRDD.scala | 244 ++++++
.../apache/ignite/spark/JavaIgniteContext.scala | 63 ++
.../org/apache/ignite/spark/JavaIgniteRDD.scala | 99 +++
.../ignite/spark/impl/IgniteAbstractRDD.scala | 39 +
.../ignite/spark/impl/IgnitePartition.scala | 24 +
.../ignite/spark/impl/IgniteQueryIterator.scala | 27 +
.../apache/ignite/spark/impl/IgniteSqlRDD.scala | 41 +
.../spark/impl/JavaIgniteAbstractRDD.scala | 34 +
.../ignite/spark/JavaIgniteRDDSelfTest.java | 298 +++++++
.../scala/org/apache/ignite/spark/Entity.scala | 28 +
.../org/apache/ignite/spark/IgniteRddSpec.scala | 231 ++++++
modules/spring/pom.xml | 9 +-
.../GridResourceSpringBeanInjector.java | 2 +-
.../util/spring/IgniteSpringHelperImpl.java | 17 +
.../src/test/config/incorrect-store-cache.xml | 57 ++
modules/spring/src/test/config/node.xml | 43 +
modules/spring/src/test/config/node1.xml | 45 ++
.../test/config/pojo-incorrect-store-cache.xml | 56 ++
modules/spring/src/test/config/store-cache.xml | 59 ++
modules/spring/src/test/config/store-cache1.xml | 62 ++
.../jdbc/CacheJdbcBlobStoreFactorySelfTest.java | 172 ++++
.../jdbc/CacheJdbcPojoStoreFactorySelfTest.java | 193 +++++
.../testsuites/IgniteSpringTestSuite.java | 5 +
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
.../ignite/tools/classgen/ClassesGenerator.java | 30 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console-2.10/README.txt | 4 +
modules/visor-console-2.10/pom.xml | 174 ++++
modules/visor-console/pom.xml | 2 +-
.../commands/cache/VisorCacheCommand.scala | 7 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
.../IgniteWebSessionSelfTestSuite.java | 2 +-
modules/yardstick/pom.xml | 2 +-
parent/pom.xml | 5 +
pom.xml | 22 +-
scripts/git-patch-prop.sh | 2 +-
495 files changed, 18532 insertions(+), 4895 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a8232be6/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a8232be6/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a8232be6/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a8232be6/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java
index 0000000,ceb9bef..37a6e72
mode 000000,100644..100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java
@@@ -1,0 -1,251 +1,273 @@@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+ package org.apache.ignite.internal;
+
+ import org.apache.ignite.*;
+ import org.apache.ignite.cluster.*;
+ import org.apache.ignite.internal.util.typedef.*;
+ import org.apache.ignite.lang.*;
+ import org.apache.ignite.marshaller.*;
+ import org.apache.ignite.testframework.junits.common.*;
+
+ import java.util.*;
+
+ /**
+ * Test for {@link ClusterGroup}.
+ */
+ @GridCommonTest(group = "Kernal Self")
+ public class ClusterGroupSelfTest extends ClusterGroupAbstractTest {
+ /** Nodes count. */
+ private static final int NODES_CNT = 4;
+
+ /** Projection node IDs. */
+ private static Collection<UUID> ids;
+
+ /** */
+ private static Ignite ignite;
+
+ /** {@inheritDoc} */
+ @SuppressWarnings({"ConstantConditions"})
+ @Override protected void beforeTestsStarted() throws Exception {
+ assert NODES_CNT > 2;
+
+ ids = new LinkedList<>();
+
+ try {
+ for (int i = 0; i < NODES_CNT; i++) {
+ Ignition.setClientMode(i > 1);
+
+ Ignite g = startGrid(i);
+
+ ids.add(g.cluster().localNode().id());
+
+ if (i == 0)
+ ignite = g;
+ }
+ }
+ finally {
+ Ignition.setClientMode(false);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTestsStopped() throws Exception {
+ for (int i = 0; i < NODES_CNT; i++)
+ stopGrid(i);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected ClusterGroup projection() {
+ return grid(0).cluster().forPredicate(F.nodeForNodeIds(ids));
+ }
+
+ /** {@inheritDoc} */
+ @Override protected UUID localNodeId() {
+ return grid(0).localNode().id();
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testRandom() throws Exception {
+ assertTrue(ignite.cluster().nodes().contains(ignite.cluster().forRandom().node()));
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testOldest() throws Exception {
+ ClusterGroup oldest = ignite.cluster().forOldest();
+
+ ClusterNode node = null;
+
+ long minOrder = Long.MAX_VALUE;
+
+ for (ClusterNode n : ignite.cluster().nodes()) {
+ if (n.order() < minOrder) {
+ node = n;
+
+ minOrder = n.order();
+ }
+ }
+
+ assertEquals(oldest.node(), ignite.cluster().forNode(node).node());
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testYoungest() throws Exception {
+ ClusterGroup youngest = ignite.cluster().forYoungest();
+
+ ClusterNode node = null;
+
+ long maxOrder = Long.MIN_VALUE;
+
+ for (ClusterNode n : ignite.cluster().nodes()) {
+ if (n.order() > maxOrder) {
+ node = n;
+
+ maxOrder = n.order();
+ }
+ }
+
+ assertEquals(youngest.node(), ignite.cluster().forNode(node).node());
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testNewNodes() throws Exception {
+ ClusterGroup youngest = ignite.cluster().forYoungest();
+ ClusterGroup oldest = ignite.cluster().forOldest();
+
+ ClusterNode old = oldest.node();
+ ClusterNode last = youngest.node();
+
+ assertNotNull(last);
+
+ try (Ignite g = startGrid(NODES_CNT)) {
+ ClusterNode n = g.cluster().localNode();
+
+ ClusterNode latest = youngest.node();
+
+ assertNotNull(latest);
+ assertEquals(latest.id(), n.id());
+ assertEquals(oldest.node(), old);
+ }
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testForPredicate() throws Exception {
+ IgnitePredicate<ClusterNode> evenP = new IgnitePredicate<ClusterNode>() {
+ @Override public boolean apply(ClusterNode node) {
+ return node.order() % 2 == 0;
+ }
+ };
+
+ IgnitePredicate<ClusterNode> oddP = new IgnitePredicate<ClusterNode>() {
+ @Override public boolean apply(ClusterNode node) {
+ return node.order() % 2 == 1;
+ }
+ };
+
+ ClusterGroup remotes = ignite.cluster().forRemotes();
+
+ ClusterGroup evenYoungest = remotes.forPredicate(evenP).forYoungest();
+ ClusterGroup evenOldest = remotes.forPredicate(evenP).forOldest();
+
+ ClusterGroup oddYoungest = remotes.forPredicate(oddP).forYoungest();
+ ClusterGroup oddOldest = remotes.forPredicate(oddP).forOldest();
+
+ int clusterSize = ignite.cluster().nodes().size();
+
+ assertEquals(grid(gridMaxOrder(clusterSize, true)).localNode().id(), evenYoungest.node().id());
+ assertEquals(grid(1).localNode().id(), evenOldest.node().id());
+
+ assertEquals(grid(gridMaxOrder(clusterSize, false)).localNode().id(), oddYoungest.node().id());
+ assertEquals(grid(2).localNode().id(), oddOldest.node().id());
+
+ try (Ignite g4 = startGrid(NODES_CNT);
+ Ignite g5 = startGrid(NODES_CNT + 1))
+ {
+ clusterSize = g4.cluster().nodes().size();
+
+ assertEquals(grid(gridMaxOrder(clusterSize, true)).localNode().id(), evenYoungest.node().id());
+ assertEquals(grid(1).localNode().id(), evenOldest.node().id());
+
+ assertEquals(grid(gridMaxOrder(clusterSize, false)).localNode().id(), oddYoungest.node().id());
+ assertEquals(grid(2).localNode().id(), oddOldest.node().id());
+ }
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testAgeClusterGroupSerialization() throws Exception {
+ Marshaller marshaller = getConfiguration().getMarshaller();
+
+ ClusterGroup grp = ignite.cluster().forYoungest();
+ ClusterNode node = grp.node();
+
+ byte[] arr = marshaller.marshal(grp);
+
+ ClusterGroup obj = marshaller.unmarshal(arr, null);
+
+ assertEquals(node.id(), obj.node().id());
+
+ try (Ignite ignore = startGrid()) {
+ obj = marshaller.unmarshal(arr, null);
+
+ assertEquals(grp.node().id(), obj.node().id());
+ assertFalse(node.id().equals(obj.node().id()));
+ }
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientServer() throws Exception {
+ ClusterGroup srv = ignite.cluster().forServers();
+
+ assertEquals(2, srv.nodes().size());
+ assertTrue(srv.nodes().contains(ignite(0).cluster().localNode()));
+ assertTrue(srv.nodes().contains(ignite(1).cluster().localNode()));
+
+ ClusterGroup cli = ignite.cluster().forClients();
+
+ assertEquals(2, srv.nodes().size());
+ assertTrue(cli.nodes().contains(ignite(2).cluster().localNode()));
+ assertTrue(cli.nodes().contains(ignite(3).cluster().localNode()));
+ }
+
+ /**
+ * @param cnt Count.
+ * @param even Even.
+ */
+ private static int gridMaxOrder(int cnt, boolean even) {
+ assert cnt > 2;
+
+ cnt = cnt - (cnt % 2);
+
+ return even ? cnt - 1 : cnt - 2;
+ }
++
++ /**
++ * @throws Exception If failed.
++ */
++ public void testHostNames() throws Exception {
++ Collection<String> inputHostNames = ignite.cluster().hostNames();
++ Collection<String> localNodeHostNames = ignite.cluster().localNode().hostNames();
++ Collection<String> randomNodeHostNames = ignite.cluster().forRandom().node().hostNames();
++ Collection<ClusterNode> allNodes = ignite.cluster().nodes();
++ Collection<String> checkHostNames = new HashSet<String> ();
++
++ for (ClusterNode currentNode : allNodes)
++ Collections.addAll(checkHostNames, currentNode.hostNames().toArray(new String[0]));
++
++ assert(checkHostNames.equals(inputHostNames));
++
++ if (!(localNodeHostNames.isEmpty()) && !(inputHostNames.isEmpty()))
++ assert((inputHostNames.containsAll(localNodeHostNames)) == true);
++
++ if (!(randomNodeHostNames.isEmpty()) && !(inputHostNames.isEmpty()))
++ assert((inputHostNames.containsAll(randomNodeHostNames)) == true);
++ }
+ }
[32/50] incubator-ignite git commit: Merge branches 'ignite-gg-10404'
and 'ignite-sprint-7' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10404
Posted by sb...@apache.org.
Merge branches 'ignite-gg-10404' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10404
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/50a46264
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/50a46264
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/50a46264
Branch: refs/heads/ignite-788-dev-review
Commit: 50a4626439afcf9c8113476da0a425d35409f153
Parents: c62c410 6e23608
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Jun 26 20:53:15 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Jun 26 20:53:15 2015 +0700
----------------------------------------------------------------------
RELEASE_NOTES.txt | 12 +
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
.../s3/S3CheckpointManagerSelfTest.java | 2 +-
.../checkpoint/s3/S3CheckpointSpiSelfTest.java | 4 +-
.../s3/S3CheckpointSpiStartStopSelfTest.java | 2 +-
.../s3/S3SessionCheckpointSelfTest.java | 2 +-
.../s3/TcpDiscoveryS3IpFinderSelfTest.java | 2 +-
modules/clients/pom.xml | 2 +-
.../ClientAbstractConnectivitySelfTest.java | 4 +-
modules/cloud/pom.xml | 2 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 2 +-
.../apache/ignite/IgniteSystemProperties.java | 3 +
.../apache/ignite/cache/query/ScanQuery.java | 23 +-
.../cache/store/jdbc/CacheJdbcBlobStore.java | 22 +-
.../store/jdbc/CacheJdbcBlobStoreFactory.java | 290 +++++++
.../cache/store/jdbc/CacheJdbcPojoStore.java | 6 +-
.../store/jdbc/CacheJdbcPojoStoreFactory.java | 148 ++++
.../org/apache/ignite/cluster/ClusterGroup.java | 9 +
.../org/apache/ignite/cluster/ClusterNode.java | 2 +
.../ignite/compute/ComputeTaskSplitAdapter.java | 2 +-
.../configuration/CacheConfiguration.java | 3 +-
.../configuration/IgniteReflectionFactory.java | 81 +-
.../ignite/internal/GridKernalContextImpl.java | 8 +-
.../apache/ignite/internal/IgniteKernal.java | 11 +-
.../internal/MarshallerContextAdapter.java | 18 +-
.../ignite/internal/MarshallerContextImpl.java | 26 +-
.../client/GridClientConfiguration.java | 2 +-
.../GridClientOptimizedMarshaller.java | 26 +
.../impl/GridTcpRouterNioListenerAdapter.java | 2 +-
.../internal/cluster/ClusterGroupAdapter.java | 38 +
.../cluster/IgniteClusterAsyncImpl.java | 5 +
.../internal/interop/InteropBootstrap.java | 3 +-
.../internal/interop/InteropIgnition.java | 5 +-
.../internal/managers/GridManagerAdapter.java | 8 +-
.../discovery/GridDiscoveryManager.java | 39 +-
.../affinity/AffinityTopologyVersion.java | 7 -
.../processors/cache/GridCacheAdapter.java | 4 +
.../processors/cache/GridCacheContext.java | 2 +-
.../processors/cache/GridCacheIoManager.java | 64 +-
.../GridCachePartitionExchangeManager.java | 77 +-
.../processors/cache/GridCacheProcessor.java | 34 +-
.../processors/cache/GridCacheSwapManager.java | 12 +-
.../processors/cache/GridCacheUtils.java | 9 +
.../processors/cache/IgniteCacheProxy.java | 12 +
.../distributed/GridCacheTxRecoveryRequest.java | 26 +-
.../GridCacheTxRecoveryResponse.java | 14 +-
.../distributed/GridDistributedBaseMessage.java | 77 +-
.../distributed/GridDistributedLockRequest.java | 54 +-
.../GridDistributedLockResponse.java | 14 +-
.../GridDistributedTxFinishRequest.java | 46 +-
.../GridDistributedTxPrepareRequest.java | 62 +-
.../GridDistributedTxPrepareResponse.java | 64 +-
.../GridDistributedUnlockRequest.java | 6 +-
.../distributed/dht/GridDhtLocalPartition.java | 59 +-
.../distributed/dht/GridDhtLockFuture.java | 2 +-
.../distributed/dht/GridDhtLockRequest.java | 72 +-
.../distributed/dht/GridDhtLockResponse.java | 18 +-
.../dht/GridDhtPartitionTopologyImpl.java | 4 +-
.../dht/GridDhtPartitionsReservation.java | 292 +++++++
.../dht/GridDhtTransactionalCacheAdapter.java | 2 +-
.../distributed/dht/GridDhtTxFinishRequest.java | 38 +-
.../dht/GridDhtTxPrepareRequest.java | 54 +-
.../dht/GridDhtTxPrepareResponse.java | 22 +-
.../distributed/dht/GridDhtUnlockRequest.java | 6 +-
.../cache/distributed/dht/GridReservable.java | 35 +
.../dht/atomic/GridDhtAtomicCache.java | 9 +-
.../dht/preloader/GridDhtPartitionMap.java | 26 +-
.../GridDhtPartitionsExchangeFuture.java | 95 ++-
.../dht/preloader/GridDhtPreloader.java | 2 +-
.../distributed/near/GridNearLockRequest.java | 58 +-
.../distributed/near/GridNearLockResponse.java | 26 +-
.../near/GridNearTxFinishRequest.java | 26 +-
.../near/GridNearTxPrepareRequest.java | 50 +-
.../near/GridNearTxPrepareResponse.java | 46 +-
.../distributed/near/GridNearUnlockRequest.java | 2 +-
.../cache/query/GridCacheQueryManager.java | 33 -
.../cache/query/GridCacheTwoStepQuery.java | 22 +-
.../continuous/CacheContinuousQueryHandler.java | 8 +
.../cache/transactions/IgniteTxHandler.java | 5 +-
.../transactions/IgniteTxLocalAdapter.java | 12 +-
.../datastructures/DataStructuresProcessor.java | 129 +--
.../dr/IgniteDrDataStreamerCacheUpdater.java | 7 +-
.../processors/hadoop/HadoopJobInfo.java | 4 +-
.../hadoop/counter/HadoopCounterWriter.java | 5 +-
.../offheap/GridOffHeapProcessor.java | 19 +-
.../processors/plugin/CachePluginManager.java | 10 +-
.../plugin/IgnitePluginProcessor.java | 16 +-
.../processors/query/GridQueryIndexing.java | 14 +-
.../processors/query/GridQueryProcessor.java | 123 ++-
.../messages/GridQueryNextPageResponse.java | 35 +-
.../h2/twostep/messages/GridQueryRequest.java | 111 ++-
.../rest/client/message/GridRouterRequest.java | 18 +
.../rest/client/message/GridRouterResponse.java | 18 +
.../rest/protocols/tcp/GridTcpRestProtocol.java | 3 +-
.../processors/task/GridTaskProcessor.java | 23 +-
.../internal/util/GridConfigurationFinder.java | 55 +-
.../apache/ignite/internal/util/GridDebug.java | 48 +-
.../ignite/internal/util/IgniteUtils.java | 27 +-
.../ignite/internal/util/nio/GridNioServer.java | 64 +-
.../util/spring/IgniteSpringHelper.java | 10 +
.../SpringApplicationContextResource.java | 4 +-
.../apache/ignite/resources/SpringResource.java | 6 +-
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 35 +-
.../org/apache/ignite/spi/IgniteSpiContext.java | 9 +-
.../communication/tcp/TcpCommunicationSpi.java | 148 +++-
.../tcp/TcpCommunicationSpiMBean.java | 19 +
.../ignite/spi/discovery/DiscoverySpi.java | 3 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 657 +++++++++++-----
.../ignite/spi/discovery/tcp/ServerImpl.java | 376 ++++++---
.../spi/discovery/tcp/TcpDiscoveryImpl.java | 69 +-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 51 +-
.../tcp/internal/TcpDiscoveryNode.java | 18 +
.../ipfinder/TcpDiscoveryIpFinderAdapter.java | 34 +-
.../TcpDiscoveryMulticastIpFinder.java | 19 +-
.../messages/TcpDiscoveryAbstractMessage.java | 10 +-
.../messages/TcpDiscoveryNodeFailedMessage.java | 18 +
.../core/src/main/resources/ignite.properties | 2 +-
.../internal/ClusterForHostsSelfTest.java | 113 +++
.../internal/ClusterGroupAbstractTest.java | 777 ++++++++++++++++++
.../ignite/internal/ClusterGroupSelfTest.java | 251 ++++++
.../internal/GridDiscoveryEventSelfTest.java | 12 +-
...ridFailFastNodeFailureDetectionSelfTest.java | 17 +-
.../internal/GridProjectionAbstractTest.java | 784 -------------------
.../ignite/internal/GridProjectionSelfTest.java | 251 ------
.../apache/ignite/internal/GridSelfTest.java | 30 +-
.../GridTaskFailoverAffinityRunTest.java | 170 ++++
.../IgniteSlowClientDetectionSelfTest.java | 187 +++++
.../GridDiscoveryManagerAliveCacheSelfTest.java | 17 +-
.../cache/CacheClientStoreSelfTest.java | 228 ++++++
...acheReadOnlyTransactionalClientSelfTest.java | 327 --------
.../CacheReadThroughAtomicRestartSelfTest.java | 32 +
...heReadThroughLocalAtomicRestartSelfTest.java | 32 +
.../CacheReadThroughLocalRestartSelfTest.java | 32 +
...dThroughReplicatedAtomicRestartSelfTest.java | 32 +
...cheReadThroughReplicatedRestartSelfTest.java | 32 +
.../cache/CacheReadThroughRestartSelfTest.java | 133 ++++
.../CacheStoreUsageMultinodeAbstractTest.java | 305 ++++++++
...eUsageMultinodeDynamicStartAbstractTest.java | 169 ++++
...oreUsageMultinodeDynamicStartAtomicTest.java | 32 +
...heStoreUsageMultinodeDynamicStartTxTest.java | 32 +
...reUsageMultinodeStaticStartAbstractTest.java | 158 ++++
...toreUsageMultinodeStaticStartAtomicTest.java | 32 +
...cheStoreUsageMultinodeStaticStartTxTest.java | 32 +
.../GridCacheAbstractFailoverSelfTest.java | 8 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 24 +-
.../cache/GridCacheAbstractSelfTest.java | 2 +-
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 +++
...ridCacheMultinodeUpdateAbstractSelfTest.java | 9 +
.../cache/GridCachePutAllFailoverSelfTest.java | 5 -
.../cache/GridCacheVersionMultinodeTest.java | 8 +-
.../IgniteCacheAbstractStopBusySelfTest.java | 30 +-
.../IgniteCacheAtomicStopBusySelfTest.java | 8 +-
...CacheP2pUnmarshallingRebalanceErrorTest.java | 15 +-
.../IgniteCacheP2pUnmarshallingTxErrorTest.java | 25 +-
...gniteCacheTransactionalStopBusySelfTest.java | 8 +-
...eDynamicCacheStartNoExchangeTimeoutTest.java | 466 +++++++++++
.../cache/IgniteDynamicCacheStartSelfTest.java | 37 +
...GridCacheQueueMultiNodeAbstractSelfTest.java | 4 +-
.../GridCacheSetAbstractSelfTest.java | 22 +-
.../IgniteDataStructureWithJobTest.java | 111 +++
...ridCachePartitionNotLoadedEventSelfTest.java | 82 ++
.../distributed/IgniteCache150ClientsTest.java | 189 +++++
.../IgniteCacheClientNodeConcurrentStart.java | 14 +-
...teCacheClientNodePartitionsExchangeTest.java | 1 +
.../distributed/IgniteCacheManyClientsTest.java | 191 ++++-
.../IgniteCacheTxMessageRecoveryTest.java | 5 +
.../dht/GridCacheColocatedFailoverSelfTest.java | 5 -
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 5 -
.../GridCachePartitionedFailoverSelfTest.java | 5 -
...achePartitionedMultiNodeFullApiSelfTest.java | 53 +-
.../GridCachePartitionedTxSalvageSelfTest.java | 37 +-
.../GridCacheReplicatedFailoverSelfTest.java | 2 +-
.../IgniteCacheTxStoreSessionTest.java | 4 +
...CacheClientWriteBehindStoreAbstractTest.java | 104 +++
...teCacheClientWriteBehindStoreAtomicTest.java | 38 +
.../IgnteCacheClientWriteBehindStoreTxTest.java | 32 +
.../DataStreamProcessorSelfTest.java | 3 +-
.../DataStreamerMultiThreadedSelfTest.java | 3 +
.../internal/util/IgniteUtilsSelfTest.java | 22 +
.../marshaller/MarshallerContextTestImpl.java | 18 +
.../GridTcpCommunicationSpiConfigSelfTest.java | 1 -
.../tcp/TcpClientDiscoverySpiSelfTest.java | 338 +++++++-
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 44 +-
.../testframework/GridSpiTestContext.java | 7 +-
.../testframework/junits/GridAbstractTest.java | 2 +-
.../junits/GridTestKernalContext.java | 3 +-
.../junits/common/GridCommonAbstractTest.java | 15 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 7 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 1 +
.../IgniteCacheFailoverTestSuite.java | 8 -
.../IgniteCacheFailoverTestSuite2.java | 47 ++
.../ignite/testsuites/IgniteCacheTestSuite.java | 4 +-
.../testsuites/IgniteCacheTestSuite3.java | 1 +
.../testsuites/IgniteCacheTestSuite4.java | 18 +-
.../IgniteCacheWriteBehindTestSuite.java | 2 +
.../testsuites/IgniteClientTestSuite.java | 38 +
.../testsuites/IgniteComputeGridTestSuite.java | 1 +
.../testsuites/IgniteKernalSelfTestSuite.java | 2 +-
.../ignite/util/TestTcpCommunicationSpi.java | 21 +
modules/extdata/p2p/pom.xml | 2 +-
.../p2p/GridP2PContinuousDeploymentTask1.java | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 80 +-
.../fs/IgniteHadoopFileSystemCounterWriter.java | 9 +-
.../processors/hadoop/HadoopClassLoader.java | 29 +
.../processors/hadoop/HadoopDefaultJobInfo.java | 27 +-
.../internal/processors/hadoop/HadoopUtils.java | 237 ------
.../hadoop/SecondaryFileSystemProvider.java | 3 +-
.../hadoop/fs/HadoopFileSystemCacheUtils.java | 241 ++++++
.../hadoop/fs/HadoopFileSystemsUtils.java | 11 +
.../hadoop/fs/HadoopLazyConcurrentMap.java | 5 +
.../hadoop/jobtracker/HadoopJobTracker.java | 25 +-
.../child/HadoopChildProcessRunner.java | 3 +-
.../processors/hadoop/v2/HadoopV2Job.java | 84 +-
.../hadoop/v2/HadoopV2JobResourceManager.java | 22 +-
.../hadoop/v2/HadoopV2TaskContext.java | 37 +-
.../apache/ignite/igfs/IgfsEventsTestSuite.java | 5 +-
.../processors/hadoop/HadoopMapReduceTest.java | 2 +-
.../processors/hadoop/HadoopTasksV1Test.java | 7 +-
.../processors/hadoop/HadoopTasksV2Test.java | 7 +-
.../processors/hadoop/HadoopV2JobSelfTest.java | 6 +-
.../collections/HadoopAbstractMapTest.java | 3 +-
.../testsuites/IgniteHadoopTestSuite.java | 2 +-
.../IgniteIgfsLinuxAndMacOSTestSuite.java | 3 +-
modules/hibernate/pom.xml | 16 +-
.../hibernate/CacheHibernateBlobStore.java | 87 +-
.../CacheHibernateBlobStoreFactory.java | 235 ++++++
.../hibernate/src/test/config/factory-cache.xml | 59 ++
.../src/test/config/factory-cache1.xml | 61 ++
.../config/factory-incorrect-store-cache.xml | 56 ++
.../CacheHibernateStoreFactorySelfTest.java | 273 +++++++
.../testsuites/IgniteHibernateTestSuite.java | 2 +
modules/indexing/pom.xml | 2 +-
.../processors/query/h2/IgniteH2Indexing.java | 81 +-
.../query/h2/sql/GridSqlQuerySplitter.java | 49 +-
.../query/h2/twostep/GridMapQueryExecutor.java | 321 ++++++--
.../query/h2/twostep/GridMergeIndex.java | 17 +-
.../h2/twostep/GridMergeIndexUnsorted.java | 7 +-
.../h2/twostep/GridReduceQueryExecutor.java | 650 ++++++++++++---
.../query/h2/twostep/GridResultPage.java | 21 +-
.../CacheAbstractQueryMetricsSelfTest.java | 205 +++++
.../CachePartitionedQueryMetricsSelfTest.java | 32 +
.../CacheReplicatedQueryMetricsSelfTest.java | 32 +
.../cache/GridCacheCrossCacheQuerySelfTest.java | 3 +-
.../cache/GridCacheQueryMetricsSelfTest.java | 206 -----
.../cache/IgniteCacheOffheapEvictQueryTest.java | 196 +++++
.../IgniteCacheQueryMultiThreadedSelfTest.java | 1 -
...QueryOffheapEvictsMultiThreadedSelfTest.java | 5 +
...lientQueryReplicatedNodeRestartSelfTest.java | 419 ++++++++++
.../IgniteCacheQueryNodeRestartSelfTest.java | 36 +-
.../IgniteCacheQueryNodeRestartSelfTest2.java | 383 +++++++++
.../query/h2/sql/BaseH2CompareQueryTest.java | 2 +-
.../IgniteCacheQuerySelfTestSuite.java | 9 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
.../cache/jta/GridCacheXAResource.java | 18 +-
.../processors/cache/GridCacheJtaSelfTest.java | 2 +-
modules/log4j/pom.xml | 2 +-
modules/mesos/pom.xml | 2 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar-2.10/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spark-2.10/pom.xml | 2 +-
modules/spark/pom.xml | 2 +-
modules/spring/pom.xml | 9 +-
.../GridResourceSpringBeanInjector.java | 2 +-
.../util/spring/IgniteSpringHelperImpl.java | 17 +
.../src/test/config/incorrect-store-cache.xml | 57 ++
modules/spring/src/test/config/node.xml | 43 +
modules/spring/src/test/config/node1.xml | 45 ++
.../test/config/pojo-incorrect-store-cache.xml | 56 ++
modules/spring/src/test/config/store-cache.xml | 59 ++
modules/spring/src/test/config/store-cache1.xml | 62 ++
.../jdbc/CacheJdbcBlobStoreFactorySelfTest.java | 172 ++++
.../jdbc/CacheJdbcPojoStoreFactorySelfTest.java | 193 +++++
.../testsuites/IgniteSpringTestSuite.java | 5 +
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
.../ignite/tools/classgen/ClassesGenerator.java | 30 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console-2.10/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
.../commands/cache/VisorCacheCommand.scala | 7 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
.../IgniteWebSessionSelfTestSuite.java | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 2 +-
scripts/git-patch-prop.sh | 2 +-
297 files changed, 12522 insertions(+), 3763 deletions(-)
----------------------------------------------------------------------
[41/50] incubator-ignite git commit: # ignite-gg-10453 removed test
(test is invalid after fix)
Posted by sb...@apache.org.
# ignite-gg-10453 removed test (test is invalid after fix)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d51db291
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d51db291
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d51db291
Branch: refs/heads/ignite-788-dev-review
Commit: d51db291037866b03ac828430cfdcc914c2f79ed
Parents: d86882c
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 29 09:21:05 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 29 09:21:05 2015 +0300
----------------------------------------------------------------------
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 -------------------
.../testsuites/IgniteCacheTestSuite3.java | 1 -
2 files changed, 120 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d51db291/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeStopSelfTest.java
deleted file mode 100644
index c56ad1c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeStopSelfTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * 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.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.*;
-import org.apache.ignite.spi.discovery.tcp.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-import org.apache.ignite.testframework.*;
-import org.apache.ignite.testframework.junits.common.*;
-
-import java.util.concurrent.*;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.*;
-import static org.apache.ignite.cache.CacheMode.*;
-
-/**
- * Test cache operations with daemon node.
- */
-public class GridCacheDaemonNodeStopSelfTest extends GridCommonAbstractTest {
- /** */
- private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
- /** Daemon flag. */
- protected boolean daemon;
-
- /** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- super.beforeTest();
-
- daemon = false;
- }
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
- IgniteConfiguration c = super.getConfiguration(gridName);
-
- c.setDaemon(daemon);
-
- TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
- disco.setIpFinder(ipFinder);
-
- c.setDiscoverySpi(disco);
-
- c.setConnectorConfiguration(null);
-
- CacheConfiguration cc = defaultCacheConfiguration();
-
- cc.setCacheMode(LOCAL);
- cc.setAtomicityMode(ATOMIC);
-
- TransactionConfiguration cfg = new TransactionConfiguration();
-
- c.setTransactionConfiguration(cfg);
-
- c.setCacheConfiguration(cc);
-
- return c;
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testStartStop() throws Exception {
- try {
- daemon = true;
-
- final IgniteEx daemonNode = startGrid(0);
-
- final IgniteInternalFuture<Object> f = GridTestUtils.runAsync(new Callable<Object>() {
- @Override public Object call() throws Exception {
- daemonNode.context().marshallerContext().getClass(1,
- GridCacheDaemonNodeStopSelfTest.class.getClassLoader());
-
- return null;
- }
- });
-
- GridTestUtils.assertThrowsWithCause(new Callable<Object>() {
- @Override public Object call() throws Exception {
- f.get(300);
-
- return null;
- }
- }, IgniteFutureTimeoutCheckedException.class);
-
- // Stop grid.
- stopGrid(0);
-
- GridTestUtils.assertThrowsWithCause(new Callable<Object>() {
- @Override public Object call() throws Exception {
- f.get(5, TimeUnit.SECONDS);
-
- return null;
- }
- }, IllegalStateException.class);
- }
- finally {
- stopAllGrids();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d51db291/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
index b83f50f..5947d33 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
@@ -100,7 +100,6 @@ public class IgniteCacheTestSuite3 extends TestSuite {
suite.addTestSuite(GridCacheDaemonNodeLocalSelfTest.class);
suite.addTestSuite(GridCacheDaemonNodePartitionedSelfTest.class);
suite.addTestSuite(GridCacheDaemonNodeReplicatedSelfTest.class);
- suite.addTestSuite(GridCacheDaemonNodeStopSelfTest.class);
// Write-behind.
suite.addTest(IgniteCacheWriteBehindTestSuite.suite());
[50/50] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
into ignite-788-dev-review
Posted by sb...@apache.org.
Merge branch 'ignite-sprint-7' into ignite-788-dev-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/bd46365d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/bd46365d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/bd46365d
Branch: refs/heads/ignite-788-dev-review
Commit: bd46365d02a92cdcae56dbd060a218db020bba26
Parents: d5f93e2 68c21ac
Author: ashutak <as...@gridgain.com>
Authored: Mon Jun 29 22:46:46 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Mon Jun 29 22:46:46 2015 +0300
----------------------------------------------------------------------
.gitignore | 3 +-
DEVNOTES.txt | 63 +-
LICENSE | 238 +
LICENSE.txt | 238 -
NOTICE | 12 +
NOTICE.txt | 12 -
RELEASE_NOTES.txt | 12 +
assembly/dependencies-fabric.xml | 1 +
assembly/dependencies-visor-console.xml | 3 +
assembly/release-base.xml | 8 +-
bin/ignite-schema-import.bat | 2 +-
bin/ignite-schema-import.sh | 2 +-
bin/ignite.bat | 2 +-
bin/ignite.sh | 2 +-
bin/ignitevisorcmd.bat | 2 +-
bin/ignitevisorcmd.sh | 2 +-
bin/include/build-classpath.bat | 46 +
bin/include/build-classpath.sh | 71 +
bin/include/functions.sh | 2 +-
bin/include/target-classpath.bat | 46 -
bin/include/target-classpath.sh | 71 -
dev-tools/build.gradle | 35 +-
.../gradle/wrapper/gradle-wrapper.properties | 20 +
dev-tools/gradlew | 233 +
dev-tools/slurp.sh | 76 +
dev-tools/src/main/groovy/jiraslurp.groovy | 592 +-
examples/config/example-cache.xml | 2 +
examples/pom.xml | 36 +-
.../hibernate/CacheHibernatePersonStore.java | 202 +-
.../hibernate/CacheHibernateStoreExample.java | 17 +
.../store/jdbc/CacheJdbcPersonStore.java | 180 +-
.../store/jdbc/CacheJdbcStoreExample.java | 13 +
.../store/spring/CacheSpringPersonStore.java | 128 +
.../store/spring/CacheSpringStoreExample.java | 143 +
.../datagrid/store/spring/package-info.java | 22 +
.../client/memcache/MemcacheRestExample.java | 32 +-
.../streaming/StreamTransformerExample.java | 4 +-
.../streaming/StreamVisitorExample.java | 4 +-
.../ignite/examples/streaming/package-info.java | 1 -
.../streaming/wordcount/CacheConfig.java | 2 +-
.../streaming/wordcount/QueryWords.java | 12 +-
.../streaming/wordcount/StreamWords.java | 12 +-
.../streaming/wordcount/package-info.java | 1 -
.../socket/WordsSocketStreamerClient.java | 82 +
.../socket/WordsSocketStreamerServer.java | 124 +
.../wordcount/socket/package-info.java | 21 +
idea/ignite_codeStyle.xml | 147 +
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
.../s3/S3CheckpointManagerSelfTest.java | 2 +-
.../checkpoint/s3/S3CheckpointSpiSelfTest.java | 4 +-
.../s3/S3CheckpointSpiStartStopSelfTest.java | 2 +-
.../s3/S3SessionCheckpointSelfTest.java | 2 +-
.../s3/TcpDiscoveryS3IpFinderSelfTest.java | 2 +-
modules/clients/pom.xml | 2 +-
.../ClientAbstractConnectivitySelfTest.java | 18 +-
.../client/router/TcpSslRouterSelfTest.java | 5 +
.../client/suite/IgniteClientTestSuite.java | 3 +-
modules/cloud/pom.xml | 2 +-
.../cloud/TcpDiscoveryCloudIpFinder.java | 25 +-
.../TcpDiscoveryCloudIpFinderSelfTest.java | 3 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 3 +-
modules/core/src/main/java/META-INF/LICENSE | 238 +
modules/core/src/main/java/META-INF/NOTICE | 12 +
.../src/main/java/org/apache/ignite/Ignite.java | 8 +-
.../java/org/apache/ignite/IgniteCache.java | 41 +-
.../java/org/apache/ignite/IgniteServices.java | 5 +-
.../apache/ignite/IgniteSystemProperties.java | 6 +
.../main/java/org/apache/ignite/Ignition.java | 18 +-
.../org/apache/ignite/cache/CacheMetrics.java | 187 +-
.../ignite/cache/eviction/EvictableEntry.java | 7 +
.../ignite/cache/eviction/EvictionPolicy.java | 2 +
.../cache/eviction/fifo/FifoEvictionPolicy.java | 117 +-
.../eviction/fifo/FifoEvictionPolicyMBean.java | 22 +
.../cache/eviction/lru/LruEvictionPolicy.java | 135 +-
.../eviction/lru/LruEvictionPolicyMBean.java | 38 +
.../eviction/random/RandomEvictionPolicy.java | 10 +-
.../eviction/sorted/SortedEvictionPolicy.java | 141 +-
.../sorted/SortedEvictionPolicyMBean.java | 22 +
.../apache/ignite/cache/query/QueryMetrics.java | 6 +-
.../apache/ignite/cache/query/ScanQuery.java | 48 +-
.../apache/ignite/cache/store/CacheStore.java | 2 +
.../ignite/cache/store/CacheStoreSession.java | 22 +
.../cache/store/CacheStoreSessionListener.java | 133 +
.../cache/store/jdbc/CacheJdbcBlobStore.java | 22 +-
.../store/jdbc/CacheJdbcBlobStoreFactory.java | 290 +
.../cache/store/jdbc/CacheJdbcPojoStore.java | 6 +-
.../store/jdbc/CacheJdbcPojoStoreFactory.java | 148 +
.../jdbc/CacheJdbcStoreSessionListener.java | 141 +
.../org/apache/ignite/cluster/ClusterGroup.java | 18 +-
.../org/apache/ignite/cluster/ClusterNode.java | 26 +-
.../ignite/compute/ComputeTaskSplitAdapter.java | 2 +-
.../configuration/CacheConfiguration.java | 70 +-
.../configuration/IgniteConfiguration.java | 48 +-
.../configuration/IgniteReflectionFactory.java | 81 +-
.../org/apache/ignite/igfs/IgfsUserContext.java | 119 +
.../igfs/secondary/IgfsSecondaryFileSystem.java | 7 +
.../ignite/internal/ClusterMetricsSnapshot.java | 14 +
.../internal/GridEventConsumeHandler.java | 126 +-
.../ignite/internal/GridKernalContext.java | 5 +
.../ignite/internal/GridKernalContextImpl.java | 13 +-
.../ignite/internal/GridPluginContext.java | 6 +
.../apache/ignite/internal/IgniteKernal.java | 99 +-
.../ignite/internal/IgniteNodeAttributes.java | 5 +-
.../org/apache/ignite/internal/IgnitionEx.java | 166 +-
.../internal/MarshallerContextAdapter.java | 82 +-
.../ignite/internal/MarshallerContextImpl.java | 38 +-
.../client/GridClientConfiguration.java | 2 +-
.../GridClientOptimizedMarshaller.java | 26 +
.../impl/GridTcpRouterNioListenerAdapter.java | 2 +-
.../internal/cluster/ClusterGroupAdapter.java | 50 +-
.../cluster/IgniteClusterAsyncImpl.java | 12 +-
.../internal/direct/DirectByteBufferStream.java | 4 +-
.../internal/events/DiscoveryCustomEvent.java | 18 +-
.../internal/igfs/common/IgfsMarshaller.java | 35 +-
.../igfs/common/IgfsPathControlRequest.java | 22 +
.../interop/InteropAwareEventFilter.java | 37 +
.../internal/interop/InteropBootstrap.java | 35 +
.../interop/InteropBootstrapFactory.java | 39 +
.../internal/interop/InteropException.java | 71 +
.../internal/interop/InteropIgnition.java | 217 +
.../interop/InteropLocalEventListener.java | 28 +
.../interop/InteropNoCallbackException.java | 50 +
.../internal/interop/InteropProcessor.java | 44 +
.../internal/managers/GridManagerAdapter.java | 76 +-
.../checkpoint/GridCheckpointManager.java | 52 +-
.../managers/communication/GridIoManager.java | 129 +-
.../GridLifecycleAwareMessageFilter.java | 5 +-
.../managers/discovery/CustomEventListener.java | 31 +
.../discovery/CustomMessageWrapper.java | 63 +
.../discovery/DiscoveryCustomMessage.java | 54 +
.../discovery/GridDiscoveryManager.java | 319 +-
.../eventstorage/GridEventStorageManager.java | 29 +-
.../managers/indexing/GridIndexingManager.java | 4 -
.../affinity/AffinityTopologyVersion.java | 7 -
.../affinity/GridAffinityAssignment.java | 12 +
.../affinity/GridAffinityAssignmentCache.java | 40 +-
.../affinity/GridAffinityProcessor.java | 23 +-
.../cache/CacheEvictableEntryImpl.java | 31 +
.../processors/cache/CacheMetricsImpl.java | 367 +-
.../cache/CacheMetricsMXBeanImpl.java | 100 +
.../processors/cache/CacheMetricsSnapshot.java | 380 +-
.../cache/DynamicCacheChangeBatch.java | 29 +-
.../cache/DynamicCacheDescriptor.java | 19 +
.../processors/cache/GridCacheAdapter.java | 212 +-
.../cache/GridCacheAffinityManager.java | 14 +
.../cache/GridCacheConcurrentMap.java | 21 +-
.../processors/cache/GridCacheContext.java | 31 +-
.../cache/GridCacheDeploymentManager.java | 10 +-
.../processors/cache/GridCacheEntryEx.java | 6 +
.../processors/cache/GridCacheGateway.java | 2 +-
.../processors/cache/GridCacheIoManager.java | 78 +-
.../processors/cache/GridCacheMapEntry.java | 172 +-
.../processors/cache/GridCacheMessage.java | 51 -
.../processors/cache/GridCacheMvccManager.java | 36 +-
.../GridCachePartitionExchangeManager.java | 178 +-
.../processors/cache/GridCachePreloader.java | 6 +-
.../cache/GridCachePreloaderAdapter.java | 11 +-
.../processors/cache/GridCacheProcessor.java | 236 +-
.../processors/cache/GridCacheProxyImpl.java | 26 +-
.../cache/GridCacheSharedContext.java | 48 +-
.../processors/cache/GridCacheSwapManager.java | 177 +-
.../processors/cache/GridCacheTtlManager.java | 9 +-
.../processors/cache/GridCacheUtils.java | 295 +-
.../processors/cache/IgniteCacheProxy.java | 49 +-
.../processors/cache/IgniteInternalCache.java | 43 +-
.../processors/cache/KeyCacheObjectImpl.java | 11 +-
.../processors/cache/QueryCursorImpl.java | 23 +-
.../cache/affinity/GridCacheAffinityImpl.java | 10 +-
.../CacheDataStructuresManager.java | 2 +-
.../distributed/GridCacheTxRecoveryRequest.java | 26 +-
.../GridCacheTxRecoveryResponse.java | 14 +-
.../distributed/GridDistributedBaseMessage.java | 77 +-
.../GridDistributedCacheAdapter.java | 210 +-
.../distributed/GridDistributedCacheEntry.java | 7 -
.../distributed/GridDistributedLockRequest.java | 123 +-
.../GridDistributedLockResponse.java | 14 +-
.../GridDistributedTxFinishRequest.java | 90 +-
.../distributed/GridDistributedTxMapping.java | 22 +-
.../GridDistributedTxPrepareRequest.java | 128 +-
.../GridDistributedTxPrepareResponse.java | 64 +-
.../GridDistributedTxRemoteAdapter.java | 30 +-
.../GridDistributedUnlockRequest.java | 6 +-
.../dht/GridClientPartitionTopology.java | 10 +-
.../dht/GridDhtAssignmentFetchFuture.java | 4 +-
.../distributed/dht/GridDhtCacheAdapter.java | 49 +-
.../distributed/dht/GridDhtCacheEntry.java | 6 +-
.../cache/distributed/dht/GridDhtGetFuture.java | 11 +-
.../distributed/dht/GridDhtLocalPartition.java | 66 +-
.../distributed/dht/GridDhtLockFuture.java | 14 +-
.../distributed/dht/GridDhtLockRequest.java | 101 +-
.../distributed/dht/GridDhtLockResponse.java | 18 +-
.../dht/GridDhtOffHeapCacheEntry.java | 63 +
.../dht/GridDhtPartitionTopologyImpl.java | 42 +-
.../dht/GridDhtPartitionsReservation.java | 292 +
.../dht/GridDhtTransactionalCacheAdapter.java | 239 +-
.../distributed/dht/GridDhtTxFinishFuture.java | 3 -
.../distributed/dht/GridDhtTxFinishRequest.java | 43 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 38 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 103 +-
.../cache/distributed/dht/GridDhtTxMapping.java | 2 +-
.../distributed/dht/GridDhtTxPrepareFuture.java | 103 +-
.../dht/GridDhtTxPrepareRequest.java | 60 +-
.../dht/GridDhtTxPrepareResponse.java | 22 +-
.../cache/distributed/dht/GridDhtTxRemote.java | 8 +-
.../distributed/dht/GridDhtUnlockRequest.java | 6 +-
.../distributed/dht/GridNoStorageCacheMap.java | 4 +-
.../cache/distributed/dht/GridReservable.java | 35 +
.../dht/atomic/GridDhtAtomicCache.java | 51 +-
.../atomic/GridDhtAtomicOffHeapCacheEntry.java | 63 +
.../dht/atomic/GridDhtAtomicUpdateFuture.java | 10 +-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 116 +-
.../dht/atomic/GridNearAtomicUpdateRequest.java | 134 +-
.../dht/colocated/GridDhtColocatedCache.java | 17 +-
.../colocated/GridDhtColocatedLockFuture.java | 210 +-
.../GridDhtColocatedOffHeapCacheEntry.java | 63 +
.../colocated/GridDhtDetachedCacheEntry.java | 4 +-
.../dht/preloader/GridDhtForceKeysFuture.java | 44 +-
.../preloader/GridDhtPartitionDemandPool.java | 26 +-
.../dht/preloader/GridDhtPartitionMap.java | 28 +-
.../preloader/GridDhtPartitionSupplyPool.java | 29 +-
.../GridDhtPartitionsExchangeFuture.java | 523 +-
.../preloader/GridDhtPartitionsFullMessage.java | 4 +-
.../GridDhtPartitionsSingleMessage.java | 33 +-
.../dht/preloader/GridDhtPreloader.java | 41 +-
.../preloader/GridDhtPreloaderAssignments.java | 3 +-
.../distributed/near/GridNearAtomicCache.java | 5 +
.../distributed/near/GridNearCacheAdapter.java | 5 +-
.../distributed/near/GridNearCacheEntry.java | 6 +-
.../distributed/near/GridNearGetFuture.java | 2 +-
.../distributed/near/GridNearLockFuture.java | 280 +-
.../distributed/near/GridNearLockRequest.java | 91 +-
.../distributed/near/GridNearLockResponse.java | 30 +-
.../near/GridNearOffHeapCacheEntry.java | 60 +
.../near/GridNearOptimisticTxPrepareFuture.java | 815 +++
.../GridNearPessimisticTxPrepareFuture.java | 350 ++
.../near/GridNearTransactionalCache.java | 8 +-
.../near/GridNearTxFinishRequest.java | 28 +-
.../cache/distributed/near/GridNearTxLocal.java | 152 +-
.../near/GridNearTxPrepareFuture.java | 1050 ----
.../near/GridNearTxPrepareFutureAdapter.java | 231 +
.../near/GridNearTxPrepareRequest.java | 86 +-
.../near/GridNearTxPrepareResponse.java | 94 +-
.../distributed/near/GridNearTxRemote.java | 24 +-
.../distributed/near/GridNearUnlockRequest.java | 2 +-
.../processors/cache/local/GridLocalCache.java | 6 +-
.../cache/local/GridLocalCacheEntry.java | 18 +
.../local/atomic/GridLocalAtomicCache.java | 31 +-
.../processors/cache/query/CacheQuery.java | 2 +-
.../query/GridCacheDistributedQueryManager.java | 3 +
.../cache/query/GridCacheQueryAdapter.java | 165 +-
.../cache/query/GridCacheQueryErrorFuture.java | 2 +
.../cache/query/GridCacheQueryManager.java | 243 +-
.../cache/query/GridCacheQueryRequest.java | 47 +-
.../cache/query/GridCacheTwoStepQuery.java | 22 +-
.../processors/cache/query/QueryCursorEx.java | 8 +
.../continuous/CacheContinuousQueryHandler.java | 8 +
.../continuous/CacheContinuousQueryManager.java | 28 +-
.../cache/store/CacheOsStoreManager.java | 1 -
.../cache/store/CacheStoreManager.java | 7 +-
.../store/GridCacheStoreManagerAdapter.java | 202 +-
.../cache/transactions/IgniteInternalTx.java | 19 +-
.../transactions/IgniteTransactionsImpl.java | 4 +-
.../cache/transactions/IgniteTxAdapter.java | 116 +-
.../cache/transactions/IgniteTxEntry.java | 48 +-
.../cache/transactions/IgniteTxHandler.java | 225 +-
.../transactions/IgniteTxLocalAdapter.java | 345 +-
.../cache/transactions/IgniteTxLocalEx.java | 21 +-
.../cache/transactions/IgniteTxManager.java | 101 +-
.../cacheobject/IgniteCacheObjectProcessor.java | 14 +-
.../IgniteCacheObjectProcessorImpl.java | 14 +-
.../continuous/AbstractContinuousMessage.java | 63 +
.../continuous/GridContinuousMessageType.java | 12 -
.../continuous/GridContinuousProcessor.java | 853 +--
.../processors/continuous/StartRequestData.java | 267 +
.../StartRoutineAckDiscoveryMessage.java | 63 +
.../StartRoutineDiscoveryMessage.java | 85 +
.../StopRoutineAckDiscoveryMessage.java | 49 +
.../continuous/StopRoutineDiscoveryMessage.java | 49 +
.../datastreamer/DataStreamerCacheUpdaters.java | 2 +-
.../datastreamer/DataStreamerImpl.java | 102 +-
.../datastructures/DataStructuresProcessor.java | 236 +-
.../datastructures/GridCacheSetImpl.java | 4 +-
.../dr/IgniteDrDataStreamerCacheUpdater.java | 7 +-
.../internal/processors/hadoop/HadoopJob.java | 2 +-
.../processors/hadoop/HadoopJobInfo.java | 4 +-
.../processors/hadoop/HadoopTaskContext.java | 14 +-
.../hadoop/counter/HadoopCounterWriter.java | 5 +-
.../ignite/internal/processors/igfs/IgfsEx.java | 8 +-
.../internal/processors/igfs/IgfsImpl.java | 8 +-
.../processors/igfs/IgfsIpcHandler.java | 184 +-
.../processors/igfs/IgfsMetaManager.java | 2 +-
.../igfs/IgfsSecondaryFileSystemImpl.java | 9 +-
.../internal/processors/igfs/IgfsServer.java | 4 +-
.../internal/processors/igfs/IgfsUtils.java | 16 +
.../offheap/GridOffHeapProcessor.java | 19 +-
.../processors/plugin/CachePluginManager.java | 10 +-
.../plugin/IgnitePluginProcessor.java | 16 +-
.../portable/GridPortableInputStream.java | 10 +
.../processors/query/GridQueryIndexing.java | 34 +-
.../processors/query/GridQueryProcessor.java | 432 +-
.../messages/GridQueryNextPageResponse.java | 35 +-
.../h2/twostep/messages/GridQueryRequest.java | 111 +-
.../processors/resource/GridResourceField.java | 5 +-
.../processors/resource/GridResourceIoc.java | 20 +-
.../resource/GridResourceProcessor.java | 16 +-
.../processors/rest/GridRestProcessor.java | 4 +-
.../rest/client/message/GridRouterRequest.java | 18 +
.../rest/client/message/GridRouterResponse.java | 18 +
.../handlers/task/GridTaskCommandHandler.java | 12 +-
.../rest/protocols/tcp/GridTcpRestProtocol.java | 3 +-
.../service/GridServiceProcessor.java | 125 +-
.../processors/task/GridTaskProcessor.java | 23 +-
.../processors/task/GridTaskWorker.java | 4 +-
.../timeout/GridSpiTimeoutObject.java | 73 +
.../timeout/GridTimeoutProcessor.java | 105 +-
.../IgniteTxRollbackCheckedException.java | 9 +
.../internal/util/GridConfigurationFinder.java | 55 +-
.../apache/ignite/internal/util/GridDebug.java | 48 +-
.../ignite/internal/util/GridJavaProcess.java | 30 +-
.../ignite/internal/util/IgniteUtils.java | 47 +-
.../internal/util/future/GridFutureAdapter.java | 4 +-
.../shmem/IpcSharedMemoryClientEndpoint.java | 2 +-
.../ipc/shmem/IpcSharedMemoryNativeLoader.java | 151 +-
.../shmem/IpcSharedMemoryServerEndpoint.java | 14 +-
.../util/ipc/shmem/IpcSharedMemoryUtils.java | 4 +-
.../util/lang/GridComputeJobWrapper.java | 96 -
.../internal/util/nio/GridBufferedParser.java | 4 -
.../util/nio/GridCommunicationClient.java | 30 +-
.../internal/util/nio/GridDelimitedParser.java | 91 +
.../util/nio/GridNioDelimitedBuffer.java | 106 +
.../util/nio/GridNioRecoveryDescriptor.java | 13 +-
.../ignite/internal/util/nio/GridNioServer.java | 64 +-
.../util/nio/GridShmemCommunicationClient.java | 146 +
.../util/nio/GridTcpCommunicationClient.java | 554 --
.../util/nio/GridTcpNioCommunicationClient.java | 8 -
.../util/spring/IgniteSpringHelper.java | 10 +
.../apache/ignite/internal/visor/VisorJob.java | 2 +
.../internal/visor/VisorMultiNodeTask.java | 2 +-
.../ignite/internal/visor/cache/VisorCache.java | 2 +-
.../VisorCacheConfigurationCollectorJob.java | 6 +-
.../internal/visor/cache/VisorCacheMetrics.java | 19 +-
.../cache/VisorCacheMetricsCollectorTask.java | 10 +-
.../cache/VisorCacheStoreConfiguration.java | 5 +-
.../internal/visor/log/VisorLogSearchTask.java | 2 +-
.../visor/node/VisorNodeDataCollectorJob.java | 4 +
.../visor/node/VisorNodeDataCollectorTask.java | 9 +-
.../node/VisorNodeDataCollectorTaskResult.java | 17 +-
.../node/VisorNodeSuppressedErrorsTask.java | 12 +-
.../visor/query/VisorQueryCleanupTask.java | 14 +
.../internal/visor/query/VisorQueryJob.java | 13 +-
.../internal/visor/query/VisorQueryTask.java | 3 +-
.../util/VisorClusterGroupEmptyException.java | 37 +
.../visor/util/VisorExceptionWrapper.java | 81 +
.../internal/visor/util/VisorTaskUtils.java | 6 +-
.../ignite/marshaller/MarshallerContext.java | 8 +
.../ignite/mxbean/CacheMetricsMXBean.java | 80 +
.../org/apache/ignite/plugin/PluginContext.java | 6 +
.../apache/ignite/plugin/PluginProvider.java | 26 +-
.../SpringApplicationContextResource.java | 4 +-
.../apache/ignite/resources/SpringResource.java | 6 +-
.../org/apache/ignite/services/Service.java | 5 +-
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 105 +-
.../org/apache/ignite/spi/IgniteSpiContext.java | 66 +-
.../ignite/spi/IgniteSpiTimeoutObject.java | 44 +
.../spi/checkpoint/noop/NoopCheckpointSpi.java | 3 +-
.../communication/tcp/TcpCommunicationSpi.java | 965 +--
.../tcp/TcpCommunicationSpiMBean.java | 29 +-
.../ignite/spi/discovery/DiscoverySpi.java | 23 +-
.../discovery/DiscoverySpiCustomMessage.java | 40 +
.../spi/discovery/DiscoverySpiListener.java | 5 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 1721 ++++++
.../ignite/spi/discovery/tcp/ServerImpl.java | 4849 +++++++++++++++
.../discovery/tcp/TcpClientDiscoverySpi.java | 1264 ----
.../tcp/TcpClientDiscoverySpiMBean.java | 164 -
.../spi/discovery/tcp/TcpDiscoveryImpl.java | 279 +
.../spi/discovery/tcp/TcpDiscoverySpi.java | 5818 ++++--------------
.../discovery/tcp/TcpDiscoverySpiAdapter.java | 1160 ----
.../spi/discovery/tcp/TcpDiscoverySpiMBean.java | 9 +
.../tcp/internal/TcpDiscoveryNode.java | 25 +-
.../tcp/internal/TcpDiscoveryNodesRing.java | 2 +-
.../tcp/ipfinder/TcpDiscoveryIpFinder.java | 10 +-
.../ipfinder/TcpDiscoveryIpFinderAdapter.java | 34 +-
.../TcpDiscoveryMulticastIpFinder.java | 50 +-
.../messages/TcpDiscoveryAbstractMessage.java | 34 +-
.../TcpDiscoveryClientHeartbeatMessage.java | 67 +
.../messages/TcpDiscoveryClientPingRequest.java | 56 +
.../TcpDiscoveryClientPingResponse.java | 67 +
.../TcpDiscoveryCustomEventMessage.java | 41 +-
.../messages/TcpDiscoveryHeartbeatMessage.java | 28 +-
.../TcpDiscoveryNodeAddFinishedMessage.java | 43 +
.../messages/TcpDiscoveryNodeAddedMessage.java | 2 +-
.../messages/TcpDiscoveryNodeFailedMessage.java | 18 +
.../tcp/messages/TcpDiscoveryPingRequest.java | 6 +
.../tcp/messages/TcpDiscoveryPingResponse.java | 15 +-
.../RoundRobinGlobalLoadBalancer.java | 2 +-
.../spi/swapspace/file/FileSwapSpaceSpi.java | 8 +-
.../org/apache/ignite/stream/StreamAdapter.java | 111 +
.../ignite/stream/StreamTupleExtractor.java | 33 +
.../stream/socket/SocketMessageConverter.java | 31 +
.../ignite/stream/socket/SocketStreamer.java | 218 +
.../ignite/stream/socket/package-info.java | 21 +
.../java/org/jsr166/ConcurrentHashMap8.java | 8 +-
.../java/org/jsr166/ConcurrentLinkedDeque8.java | 586 +-
.../src/main/java/org/jsr166/LongAdder8.java | 35 +-
.../core/src/main/java/org/jsr166/README.txt | 11 +
.../src/main/java/org/jsr166/Striped64_8.java | 22 +-
.../java/org/jsr166/ThreadLocalRandom8.java | 19 +-
.../src/main/java/org/jsr166/package-info.java | 12 +-
.../resources/META-INF/classnames.properties | 1 -
.../core/src/main/resources/ignite.properties | 2 +-
modules/core/src/test/config/tests.properties | 2 +-
.../ignite/GridSuppressedExceptionSelfTest.java | 4 +-
.../affinity/IgniteClientNodeAffinityTest.java | 182 +
...cheStoreSessionListenerAbstractSelfTest.java | 315 +
...heStoreSessionListenerLifecycleSelfTest.java | 395 ++
.../CacheJdbcStoreSessionListenerSelfTest.java | 175 +
.../internal/ClusterGroupAbstractTest.java | 777 +++
.../internal/ClusterGroupHostsSelfTest.java | 141 +
.../ignite/internal/ClusterGroupSelfTest.java | 251 +
.../ignite/internal/GridAffinitySelfTest.java | 1 +
.../internal/GridDiscoveryEventSelfTest.java | 13 +-
...ridFailFastNodeFailureDetectionSelfTest.java | 22 +-
.../GridFailoverTaskWithPredicateSelfTest.java | 3 -
.../GridJobMasterLeaveAwareSelfTest.java | 2 -
.../internal/GridJobStealingSelfTest.java | 3 -
.../internal/GridProjectionAbstractTest.java | 768 ---
.../GridProjectionForCachesSelfTest.java | 11 +-
...ectionLocalJobMultipleArgumentsSelfTest.java | 2 -
.../ignite/internal/GridProjectionSelfTest.java | 251 -
.../internal/GridReleaseTypeSelfTest.java | 77 +-
.../apache/ignite/internal/GridSelfTest.java | 30 +-
.../GridTaskExecutionContextSelfTest.java | 9 -
.../GridTaskFailoverAffinityRunTest.java | 170 +
.../IgniteComputeEmptyClusterGroupTest.java | 3 -
.../IgniteComputeTopologyExceptionTest.java | 9 -
.../IgniteSlowClientDetectionSelfTest.java | 187 +
.../GridDiscoveryManagerAliveCacheSelfTest.java | 82 +-
.../GridDiscoveryManagerAttributesSelfTest.java | 122 +-
.../discovery/GridDiscoveryManagerSelfTest.java | 46 +-
.../GridAffinityProcessorAbstractSelfTest.java | 1 +
.../cache/CacheClientStoreSelfTest.java | 228 +
.../cache/CacheOffheapMapEntrySelfTest.java | 168 +
.../CacheReadThroughAtomicRestartSelfTest.java | 32 +
...heReadThroughLocalAtomicRestartSelfTest.java | 32 +
.../CacheReadThroughLocalRestartSelfTest.java | 32 +
...dThroughReplicatedAtomicRestartSelfTest.java | 32 +
...cheReadThroughReplicatedRestartSelfTest.java | 32 +
.../cache/CacheReadThroughRestartSelfTest.java | 133 +
.../cache/CacheRemoveAllSelfTest.java | 81 +
.../CacheStoreUsageMultinodeAbstractTest.java | 305 +
...eUsageMultinodeDynamicStartAbstractTest.java | 169 +
...oreUsageMultinodeDynamicStartAtomicTest.java | 32 +
...heStoreUsageMultinodeDynamicStartTxTest.java | 32 +
...reUsageMultinodeStaticStartAbstractTest.java | 158 +
...toreUsageMultinodeStaticStartAtomicTest.java | 32 +
...cheStoreUsageMultinodeStaticStartTxTest.java | 32 +
.../GridCacheAbstractFailoverSelfTest.java | 12 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 152 +-
.../cache/GridCacheAbstractMetricsSelfTest.java | 48 +-
.../GridCacheAbstractRemoveFailureTest.java | 23 +
.../cache/GridCacheAbstractSelfTest.java | 7 +-
.../cache/GridCacheAffinityRoutingSelfTest.java | 4 +-
.../GridCacheAtomicMessageCountSelfTest.java | 1 +
.../GridCacheConcurrentTxMultiNodeTest.java | 8 +-
...idCacheConfigurationConsistencySelfTest.java | 14 +-
.../cache/GridCacheDeploymentSelfTest.java | 3 -
.../cache/GridCacheEntryMemorySizeSelfTest.java | 91 +-
.../GridCacheExAbstractFullApiSelfTest.java | 103 -
.../cache/GridCacheMemoryModeSelfTest.java | 25 +-
...GridCacheMixedPartitionExchangeSelfTest.java | 2 +-
...ridCacheMultinodeUpdateAbstractSelfTest.java | 9 +
...inodeUpdateNearEnabledNoBackupsSelfTest.java | 2 +-
...CacheMultinodeUpdateNearEnabledSelfTest.java | 2 +-
.../processors/cache/GridCacheOffHeapTest.java | 33 +-
.../cache/GridCachePutAllFailoverSelfTest.java | 1 +
.../GridCacheReferenceCleanupSelfTest.java | 3 -
.../cache/GridCacheReloadSelfTest.java | 6 +-
.../GridCacheReturnValueTransferSelfTest.java | 3 +
.../processors/cache/GridCacheStopSelfTest.java | 5 +
...acheTcpClientDiscoveryMultiThreadedTest.java | 190 +
.../processors/cache/GridCacheTestEntryEx.java | 4 +
.../GridCacheVariableTopologySelfTest.java | 12 +-
.../cache/GridCacheVersionMultinodeTest.java | 6 +-
.../IgniteCacheAbstractStopBusySelfTest.java | 36 +-
.../cache/IgniteCacheAbstractTest.java | 5 +-
.../IgniteCacheAtomicStopBusySelfTest.java | 8 +-
.../IgniteCacheConfigurationTemplateTest.java | 2 +-
.../IgniteCacheEntryListenerAbstractTest.java | 14 +-
.../IgniteCacheInterceptorSelfTestSuite.java | 2 +-
.../cache/IgniteCacheInvokeReadThroughTest.java | 5 +
.../cache/IgniteCacheNearLockValueSelfTest.java | 148 +
.../IgniteCacheP2pUnmarshallingErrorTest.java | 29 +-
...gniteCacheP2pUnmarshallingNearErrorTest.java | 13 +-
...CacheP2pUnmarshallingRebalanceErrorTest.java | 15 +-
.../IgniteCacheP2pUnmarshallingTxErrorTest.java | 25 +-
.../IgniteCachePartitionMapUpdateTest.java | 226 +
.../cache/IgniteCachePeekModesAbstractTest.java | 5 +-
...gniteCacheTransactionalStopBusySelfTest.java | 13 +-
.../IgniteDaemonNodeMarshallerCacheTest.java | 192 +
...eDynamicCacheStartNoExchangeTimeoutTest.java | 466 ++
.../cache/IgniteDynamicCacheStartSelfTest.java | 138 +-
...niteDynamicCacheWithConfigStartSelfTest.java | 97 +
.../IgniteDynamicClientCacheStartSelfTest.java | 283 +
...teStartCacheInTransactionAtomicSelfTest.java | 32 +
.../IgniteStartCacheInTransactionSelfTest.java | 254 +
.../cache/IgniteSystemCacheOnClientTest.java | 97 +
.../IgniteTxMultiThreadedAbstractTest.java | 4 +-
...cheAtomicReferenceMultiNodeAbstractTest.java | 11 -
.../GridCacheQueueApiSelfAbstractTest.java | 4 +-
...GridCacheQueueMultiNodeAbstractSelfTest.java | 6 +-
...dCacheQueueMultiNodeConsistencySelfTest.java | 5 +
...CacheQueueRotativeMultiNodeAbstractTest.java | 10 -
.../GridCacheSetAbstractSelfTest.java | 31 +-
.../IgniteClientDataStructuresAbstractTest.java | 283 +
.../IgniteClientDataStructuresTest.java | 28 +
...IgniteClientDiscoveryDataStructuresTest.java | 28 +
.../IgniteCountDownLatchAbstractSelfTest.java | 102 +
.../IgniteDataStructureWithJobTest.java | 111 +
...omicOffheapQueueCreateMultiNodeSelfTest.java | 5 +
...ionedAtomicQueueCreateMultiNodeSelfTest.java | 5 +
...rtitionedDataStructuresFailoverSelfTest.java | 5 +
...edOffheapDataStructuresFailoverSelfTest.java | 5 +
...PartitionedQueueCreateMultiNodeSelfTest.java | 5 +
...dCachePartitionedQueueEntryMoveSelfTest.java | 5 +
...nedQueueFailoverDataConsistencySelfTest.java | 5 +
...eplicatedDataStructuresFailoverSelfTest.java | 5 +
...CacheLoadingConcurrentGridStartSelfTest.java | 5 +
.../GridCacheAbstractJobExecutionTest.java | 3 -
.../GridCacheAbstractNodeRestartSelfTest.java | 11 +-
.../GridCacheClientModesAbstractSelfTest.java | 94 +-
...ientModesTcpClientDiscoveryAbstractTest.java | 168 +
.../distributed/GridCacheLockAbstractTest.java | 2 -
.../distributed/GridCacheMixedModeSelfTest.java | 3 +
...ridCachePartitionNotLoadedEventSelfTest.java | 82 +
.../GridCachePreloadLifecycleAbstractTest.java | 2 -
.../distributed/IgniteCache150ClientsTest.java | 189 +
...niteCacheClientNodeChangingTopologyTest.java | 1803 ++++++
.../IgniteCacheClientNodeConcurrentStart.java | 113 +
...teCacheClientNodePartitionsExchangeTest.java | 633 ++
.../distributed/IgniteCacheManyClientsTest.java | 318 +
.../IgniteCacheMessageRecoveryAbstractTest.java | 1 +
.../IgniteCacheTxMessageRecoveryTest.java | 5 +
.../IgniteCrossCacheTxStoreSelfTest.java | 147 +-
.../distributed/IgniteTxGetAfterStopTest.java | 131 +
...heAbstractTransformWriteThroughSelfTest.java | 3 -
.../dht/GridCacheClientOnlySelfTest.java | 60 +-
.../GridCacheColocatedTxExceptionSelfTest.java | 5 +
.../GridCacheDhtClientRemoveFailureTest.java | 28 +
...GridCacheDhtEvictionNearReadersSelfTest.java | 11 +-
.../dht/GridCacheDhtEvictionSelfTest.java | 11 +-
.../GridCacheExColocatedFullApiSelfTest.java | 33 -
...achePartitionedNearDisabledLockSelfTest.java | 47 +
...ePartitionedNearDisabledMetricsSelfTest.java | 4 +-
...dCachePartitionedTopologyChangeSelfTest.java | 5 +
.../dht/IgniteCacheMultiTxLockSelfTest.java | 53 +-
...ePrimaryNodeFailureRecoveryAbstractTest.java | 4 +-
...cClientInvalidPartitionHandlingSelfTest.java | 29 +
.../GridCacheAtomicClientRemoveFailureTest.java | 28 +
...eAtomicInvalidPartitionHandlingSelfTest.java | 23 +-
...idCacheAtomicReplicatedFailoverSelfTest.java | 6 +
...unctionExcludeNeighborsAbstractSelfTest.java | 3 +-
.../near/GridCacheAtomicNearOnlySelfTest.java | 32 -
.../near/GridCacheExNearFullApiSelfTest.java | 39 -
.../near/GridCacheNearEvictionSelfTest.java | 3 -
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 7 +-
.../near/GridCacheNearOnlySelfTest.java | 63 +-
.../near/GridCacheNearOnlyTopologySelfTest.java | 1 +
.../near/GridCacheNearTxExceptionSelfTest.java | 5 +
...ionedClientOnlyNoPrimaryFullApiSelfTest.java | 5 +-
.../GridCachePartitionedEvictionSelfTest.java | 11 +-
...PartitionedFullApiMultithreadedSelfTest.java | 5 +
.../GridCachePartitionedFullApiSelfTest.java | 32 +
...idCachePartitionedHitsAndMissesSelfTest.java | 3 -
...achePartitionedMultiNodeFullApiSelfTest.java | 53 +-
...ePartitionedMultiThreadedPutGetSelfTest.java | 6 +-
.../GridCachePartitionedNodeRestartTest.java | 5 +
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 2 +-
...ePartitionedOptimisticTxNodeRestartTest.java | 5 +
...achePartitionedPreloadLifecycleSelfTest.java | 2 +-
...CachePartitionedTxMultiThreadedSelfTest.java | 5 +
.../GridCachePartitionedTxSalvageSelfTest.java | 54 +-
...idCacheRendezvousAffinityClientSelfTest.java | 4 +
.../near/IgniteCacheNearOnlyTxTest.java | 190 +
.../near/NoneRebalanceModeSelfTest.java | 67 +
.../GridCacheExReplicatedFullApiSelfTest.java | 33 -
.../GridCacheReplicatedClientOnlySelfTest.java | 43 -
.../GridCacheReplicatedFailoverSelfTest.java | 11 +
...eReplicatedFullApiMultithreadedSelfTest.java | 5 +
.../GridCacheReplicatedInvalidateSelfTest.java | 4 +-
.../GridCacheReplicatedLockSelfTest.java | 5 +
...ridCacheReplicatedMultiNodeLockSelfTest.java | 5 +
.../GridCacheReplicatedMultiNodeSelfTest.java | 5 +
.../GridCacheReplicatedNearOnlySelfTest.java | 43 -
.../GridCacheReplicatedNodeRestartSelfTest.java | 85 +
.../GridCacheReplicatedTxExceptionSelfTest.java | 5 +
.../GridCacheSyncReplicatedPreloadSelfTest.java | 1 -
.../replicated/GridReplicatedTxPreloadTest.java | 2 +
...acheAtomicReplicatedNodeRestartSelfTest.java | 5 +
...CacheReplicatedPreloadLifecycleSelfTest.java | 6 +-
.../cache/eviction/EvictionAbstractTest.java | 1056 ++++
.../GridCacheBatchEvictUnswapSelfTest.java | 5 +-
...heConcurrentEvictionConsistencySelfTest.java | 82 +-
.../GridCacheConcurrentEvictionsSelfTest.java | 29 +-
.../GridCacheDistributedEvictionsSelfTest.java | 5 +-
.../GridCacheEmptyEntriesAbstractSelfTest.java | 11 +-
.../eviction/GridCacheEvictionAbstractTest.java | 484 --
.../GridCacheEvictionFilterSelfTest.java | 4 +-
.../GridCacheEvictionTouchSelfTest.java | 22 +-
.../cache/eviction/GridCacheMockEntry.java | 5 +
...cheSynchronousEvictionsFailoverSelfTest.java | 5 +
.../fifo/FifoEvictionPolicySelfTest.java | 262 +
...ridCacheFifoBatchEvictionPolicySelfTest.java | 384 --
.../GridCacheFifoEvictionPolicySelfTest.java | 372 --
.../lru/GridCacheLruEvictionPolicySelfTest.java | 417 --
.../GridCacheLruNearEvictionPolicySelfTest.java | 136 -
...heNearOnlyLruNearEvictionPolicySelfTest.java | 171 -
.../eviction/lru/LruEvictionPolicySelfTest.java | 353 ++
.../lru/LruNearEvictionPolicySelfTest.java | 140 +
.../LruNearOnlyNearEvictionPolicySelfTest.java | 172 +
.../GridCacheRandomEvictionPolicySelfTest.java | 258 -
.../RandomEvictionPolicyCacheSizeSelfTest.java | 78 +
.../random/RandomEvictionPolicySelfTest.java | 357 ++
...dCacheSortedBatchEvictionPolicySelfTest.java | 385 --
...acheSortedEvictionPolicyPerformanceTest.java | 135 -
.../GridCacheSortedEvictionPolicySelfTest.java | 373 --
.../SortedEvictionPolicyPerformanceTest.java | 134 +
.../sorted/SortedEvictionPolicySelfTest.java | 266 +
.../IgniteCacheClientNearCacheExpiryTest.java | 103 +
.../IgniteCacheExpiryPolicyAbstractTest.java | 10 +-
.../IgniteCacheExpiryPolicyTestSuite.java | 2 +
...eCacheExpiryPolicyWithStoreAbstractTest.java | 4 +-
.../IgniteCacheTxStoreSessionTest.java | 4 +
...CacheLocalOffHeapAndSwapMetricsSelfTest.java | 412 ++
.../local/GridCacheExLocalFullApiSelfTest.java | 30 -
...dCacheLocalFullApiMultithreadedSelfTest.java | 5 +
.../GridCacheLocalIsolatedNodesSelfTest.java | 18 +-
.../GridCacheLocalTxExceptionSelfTest.java | 5 +
.../GridCacheSwapScanQueryAbstractSelfTest.java | 115 +-
...ridCacheContinuousQueryAbstractSelfTest.java | 8 +-
...CacheClientWriteBehindStoreAbstractTest.java | 104 +
...teCacheClientWriteBehindStoreAtomicTest.java | 38 +
.../IgnteCacheClientWriteBehindStoreTxTest.java | 32 +
.../closure/GridClosureProcessorSelfTest.java | 29 +-
.../continuous/GridEventConsumeSelfTest.java | 98 +-
.../DataStreamProcessorSelfTest.java | 48 +-
.../DataStreamerMultiThreadedSelfTest.java | 62 +-
.../DataStreamerMultinodeCreateCacheTest.java | 97 +
.../igfs/IgfsClientCacheSelfTest.java | 12 +-
.../processors/igfs/IgfsCommonAbstractTest.java | 10 -
.../processors/igfs/IgfsModesSelfTest.java | 4 +-
.../processors/igfs/IgfsOneClientNodeTest.java | 8 +-
.../service/ClosureServiceClientsNodesTest.java | 251 +
.../service/GridServiceClientNodeTest.java | 81 +
.../internal/util/IgniteUtilsSelfTest.java | 22 +
.../ipc/shmem/IgfsSharedMemoryTestServer.java | 2 +
.../IpcSharedMemoryCrashDetectionSelfTest.java | 2 +-
.../ipc/shmem/IpcSharedMemorySpaceSelfTest.java | 2 +-
.../ipc/shmem/IpcSharedMemoryUtilsSelfTest.java | 2 +-
.../LoadWithCorruptedLibFileTestRunner.java | 2 +-
.../IpcSharedMemoryBenchmarkReader.java | 2 +-
.../IpcSharedMemoryBenchmarkWriter.java | 2 +-
.../nio/GridNioDelimitedBufferSelfTest.java | 112 +
.../internal/util/nio/GridNioSelfTest.java | 15 +-
.../internal/util/nio/GridNioSslSelfTest.java | 2 +
.../unsafe/GridUnsafeMemorySelfTest.java | 4 +-
.../tostring/GridToStringBuilderSelfTest.java | 4 +-
.../loadtests/GridCacheMultiNodeLoadTest.java | 5 +-
.../communication/GridIoManagerBenchmark0.java | 1 +
.../GridCachePartitionedAtomicLongLoadTest.java | 6 +-
.../loadtests/hashmap/GridCacheTestContext.java | 4 +-
.../swap/GridSwapEvictAllBenchmark.java | 6 +-
.../marshaller/MarshallerContextTestImpl.java | 29 +-
.../OptimizedMarshallerNodeFailoverTest.java | 4 +-
...GridMessagingNoPeerClassLoadingSelfTest.java | 7 +-
.../ignite/messaging/GridMessagingSelfTest.java | 16 +-
.../IgniteMessagingWithClientTest.java | 166 +
.../GridP2PContinuousDeploymentSelfTest.java | 2 +
.../p2p/GridP2PLocalDeploymentSelfTest.java | 6 +-
.../p2p/GridP2PRemoteClassLoadersSelfTest.java | 31 +-
.../spi/GridTcpSpiForwardingSelfTest.java | 4 +-
.../GridTcpCommunicationSpiAbstractTest.java | 17 +-
...mmunicationSpiConcurrentConnectSelfTest.java | 6 +-
.../GridTcpCommunicationSpiConfigSelfTest.java | 3 -
...cpCommunicationSpiMultithreadedSelfTest.java | 23 +-
...pCommunicationSpiMultithreadedShmemTest.java | 28 +
...dTcpCommunicationSpiRecoveryAckSelfTest.java | 1 +
...GridTcpCommunicationSpiRecoverySelfTest.java | 1 +
.../GridTcpCommunicationSpiShmemSelfTest.java | 38 +
.../tcp/GridTcpCommunicationSpiTcpSelfTest.java | 7 +
.../discovery/AbstractDiscoverySelfTest.java | 21 +-
...pClientDiscoveryMarshallerCheckSelfTest.java | 76 +
.../tcp/TcpClientDiscoverySelfTest.java | 700 ---
.../tcp/TcpClientDiscoverySpiMulticastTest.java | 129 +
.../tcp/TcpClientDiscoverySpiSelfTest.java | 1632 +++++
.../tcp/TcpDiscoveryConcurrentStartTest.java | 61 +-
.../tcp/TcpDiscoveryMultiThreadedTest.java | 18 +-
.../discovery/tcp/TcpDiscoveryRestartTest.java | 199 +
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 46 +-
.../stream/socket/SocketStreamerSelfTest.java | 310 +
.../ignite/stream/socket/package-info.java | 21 +
.../testframework/GridSpiTestContext.java | 42 +-
.../ignite/testframework/GridTestUtils.java | 31 +-
.../config/GridTestProperties.java | 14 +-
.../testframework/junits/GridAbstractTest.java | 54 +-
.../junits/GridTestKernalContext.java | 3 +-
.../junits/IgniteTestResources.java | 16 +-
.../junits/cache/TestCacheSession.java | 18 +
.../cache/TestThreadLocalCacheSession.java | 15 +
.../junits/common/GridCommonAbstractTest.java | 98 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 37 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 28 +-
.../IgniteCacheEvictionSelfTestSuite.java | 18 +-
.../IgniteCacheFailoverTestSuite.java | 26 +-
.../IgniteCacheFailoverTestSuite2.java | 47 +
.../IgniteCacheFullApiSelfTestSuite.java | 14 +-
.../IgniteCacheMetricsSelfTestSuite.java | 1 +
.../IgniteCacheNearOnlySelfTestSuite.java | 16 +-
...gniteCacheP2pUnmarshallingErrorTestSuit.java | 41 -
...niteCacheP2pUnmarshallingErrorTestSuite.java | 53 +
.../testsuites/IgniteCacheRestartTestSuite.java | 10 +-
.../IgniteCacheTcpClientDiscoveryTestSuite.java | 47 +
.../ignite/testsuites/IgniteCacheTestSuite.java | 55 +-
.../testsuites/IgniteCacheTestSuite2.java | 18 +-
.../testsuites/IgniteCacheTestSuite3.java | 16 +-
.../testsuites/IgniteCacheTestSuite4.java | 39 +-
.../IgniteCacheWriteBehindTestSuite.java | 2 +
.../testsuites/IgniteClientTestSuite.java | 38 +
.../testsuites/IgniteComputeGridTestSuite.java | 1 +
.../testsuites/IgniteKernalSelfTestSuite.java | 23 +-
.../IgniteMarshallerSelfTestSuite.java | 28 +-
.../IgniteSpiCommunicationSelfTestSuite.java | 2 +
.../IgniteSpiDiscoverySelfTestSuite.java | 4 +-
.../testsuites/IgniteStreamSelfTestSuite.java | 39 +
.../testsuites/IgniteUtilSelfTestSuite.java | 19 +-
.../apache/ignite/util/GridRandomSelfTest.java | 4 +-
.../ignite/util/TestTcpCommunicationSpi.java | 21 +
modules/extdata/p2p/pom.xml | 2 +-
.../p2p/GridP2PContinuousDeploymentTask1.java | 2 +-
.../tests/p2p/P2PTestTaskExternalPath1.java | 10 +-
.../tests/p2p/P2PTestTaskExternalPath2.java | 8 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 2 +-
.../gce/TcpDiscoveryGoogleStorageIpFinder.java | 43 +-
modules/geospatial/pom.xml | 2 +-
.../query/h2/GridH2IndexingGeoSelfTest.java | 20 +-
modules/hadoop/pom.xml | 81 +-
.../fs/IgniteHadoopFileSystemCounterWriter.java | 21 +-
.../fs/IgniteHadoopIgfsSecondaryFileSystem.java | 165 +-
.../hadoop/fs/v1/IgniteHadoopFileSystem.java | 137 +-
.../hadoop/fs/v2/IgniteHadoopFileSystem.java | 32 +-
.../processors/hadoop/HadoopClassLoader.java | 29 +
.../processors/hadoop/HadoopDefaultJobInfo.java | 27 +-
.../internal/processors/hadoop/HadoopUtils.java | 51 +-
.../hadoop/SecondaryFileSystemProvider.java | 58 +-
.../hadoop/fs/HadoopDistributedFileSystem.java | 91 -
.../hadoop/fs/HadoopFileSystemCacheUtils.java | 241 +
.../hadoop/fs/HadoopFileSystemsUtils.java | 26 +-
.../hadoop/fs/HadoopLazyConcurrentMap.java | 209 +
.../processors/hadoop/igfs/HadoopIgfsEx.java | 6 +
.../hadoop/igfs/HadoopIgfsInProc.java | 170 +-
.../processors/hadoop/igfs/HadoopIgfsIpcIo.java | 2 +-
.../hadoop/igfs/HadoopIgfsOutProc.java | 33 +-
.../hadoop/igfs/HadoopIgfsWrapper.java | 19 +-
.../hadoop/jobtracker/HadoopJobTracker.java | 25 +-
.../hadoop/taskexecutor/HadoopRunnableTask.java | 20 +-
.../child/HadoopChildProcessRunner.java | 3 +-
.../processors/hadoop/v2/HadoopV2Context.java | 10 +-
.../processors/hadoop/v2/HadoopV2Job.java | 111 +-
.../hadoop/v2/HadoopV2JobResourceManager.java | 40 +-
.../hadoop/v2/HadoopV2TaskContext.java | 85 +-
.../hadoop/HadoopClientProtocolSelfTest.java | 6 +-
.../HadoopIgfs20FileSystemAbstractSelfTest.java | 73 +-
...oopSecondaryFileSystemConfigurationTest.java | 18 +-
.../apache/ignite/igfs/IgfsEventsTestSuite.java | 5 +-
.../igfs/IgfsNearOnlyMultiNodeSelfTest.java | 5 +-
.../IgniteHadoopFileSystemAbstractSelfTest.java | 65 +-
.../IgniteHadoopFileSystemClientSelfTest.java | 2 +-
...IgniteHadoopFileSystemHandshakeSelfTest.java | 7 +
.../IgniteHadoopFileSystemIpcCacheSelfTest.java | 9 +
.../hadoop/HadoopAbstractSelfTest.java | 19 +-
.../hadoop/HadoopCommandLineTest.java | 14 +-
.../hadoop/HadoopFileSystemsTest.java | 23 +-
.../processors/hadoop/HadoopMapReduceTest.java | 185 +-
.../hadoop/HadoopTaskExecutionSelfTest.java | 2 +-
.../hadoop/HadoopTasksAllVersionsTest.java | 15 +-
.../processors/hadoop/HadoopTasksV1Test.java | 8 +-
.../processors/hadoop/HadoopTasksV2Test.java | 8 +-
.../processors/hadoop/HadoopV2JobSelfTest.java | 8 +-
.../collections/HadoopAbstractMapTest.java | 15 +-
.../collections/HadoopHashMapSelfTest.java | 4 +-
.../collections/HadoopSkipListSelfTest.java | 4 +-
.../HadoopExternalTaskExecutionSelfTest.java | 2 +
.../HadoopExternalCommunicationSelfTest.java | 5 +
.../testsuites/IgniteHadoopTestSuite.java | 11 +-
.../IgniteIgfsLinuxAndMacOSTestSuite.java | 3 +-
modules/hibernate/pom.xml | 16 +-
.../hibernate/CacheHibernateBlobStore.java | 87 +-
.../CacheHibernateBlobStoreFactory.java | 235 +
.../CacheHibernateStoreSessionListener.java | 216 +
.../hibernate/src/test/config/factory-cache.xml | 59 +
.../src/test/config/factory-cache1.xml | 61 +
.../config/factory-incorrect-store-cache.xml | 56 +
.../hibernate/HibernateL2CacheSelfTest.java | 5 +
.../HibernateL2CacheTransactionalSelfTest.java | 5 +
.../CacheHibernateStoreFactorySelfTest.java | 273 +
...heHibernateStoreSessionListenerSelfTest.java | 228 +
.../testsuites/IgniteHibernateTestSuite.java | 8 +-
modules/indexing/pom.xml | 18 +-
.../processors/query/h2/IgniteH2Indexing.java | 142 +-
.../query/h2/opt/GridH2AbstractKeyValueRow.java | 18 +-
.../query/h2/opt/GridH2KeyValueRowOffheap.java | 4 +-
.../query/h2/sql/GridSqlOperationType.java | 2 +-
.../query/h2/sql/GridSqlQuerySplitter.java | 53 +-
.../query/h2/twostep/GridMapQueryExecutor.java | 321 +-
.../query/h2/twostep/GridMergeIndex.java | 17 +-
.../h2/twostep/GridMergeIndexUnsorted.java | 7 +-
.../h2/twostep/GridReduceQueryExecutor.java | 656 +-
.../query/h2/twostep/GridResultPage.java | 21 +-
.../CacheAbstractQueryMetricsSelfTest.java | 205 +
.../CachePartitionedQueryMetricsSelfTest.java | 32 +
.../CacheReplicatedQueryMetricsSelfTest.java | 32 +
...CacheScanPartitionQueryFallbackSelfTest.java | 408 ++
.../cache/GridCacheCrossCacheQuerySelfTest.java | 25 +-
.../cache/GridCacheOffHeapSelfTest.java | 1 -
.../GridCacheOffheapIndexEntryEvictTest.java | 200 +
.../cache/GridCacheOffheapIndexGetSelfTest.java | 183 +
.../cache/GridCacheQueryMetricsSelfTest.java | 152 -
...idCacheReduceQueryMultithreadedSelfTest.java | 10 -
.../processors/cache/GridCacheSwapSelfTest.java | 3 -
.../cache/GridIndexingWithNoopSwapSelfTest.java | 6 +-
.../IgniteCacheAbstractFieldsQuerySelfTest.java | 13 +-
.../cache/IgniteCacheAbstractQuerySelfTest.java | 85 +-
...acheConfigurationPrimitiveTypesSelfTest.java | 104 +
.../cache/IgniteCacheOffheapEvictQueryTest.java | 196 +
...niteCacheP2pUnmarshallingQueryErrorTest.java | 3 +-
...hePartitionedQueryMultiThreadedSelfTest.java | 40 +-
...QueryMultiThreadedOffHeapTieredSelfTest.java | 37 +
...eQueryMultiThreadedOffHeapTiredSelfTest.java | 37 -
.../IgniteCacheQueryMultiThreadedSelfTest.java | 15 +-
...QueryOffheapEvictsMultiThreadedSelfTest.java | 5 +
...lientQueryReplicatedNodeRestartSelfTest.java | 419 ++
.../IgniteCacheQueryNodeRestartSelfTest.java | 41 +-
.../IgniteCacheQueryNodeRestartSelfTest2.java | 383 ++
.../local/IgniteCacheLocalQuerySelfTest.java | 6 +
...dCacheAbstractReduceFieldsQuerySelfTest.java | 1 -
.../cache/ttl/CacheTtlAbstractSelfTest.java | 6 +-
.../h2/GridIndexingSpiAbstractSelfTest.java | 4 +-
.../query/h2/sql/BaseH2CompareQueryTest.java | 22 +-
.../query/h2/sql/GridQueryParsingTest.java | 5 +-
.../IgniteCacheQuerySelfTestSuite.java | 13 +-
.../IgniteCacheWithIndexingTestSuite.java | 5 +
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
.../processors/cache/jta/CacheJtaManager.java | 4 +-
.../cache/jta/GridCacheXAResource.java | 18 +-
.../processors/cache/GridCacheJtaSelfTest.java | 2 +-
modules/log4j/pom.xml | 2 +-
modules/mesos/README.txt | 28 +
modules/mesos/licenses/apache-2.0.txt | 202 +
modules/mesos/licenses/jetty-epl-license.txt | 69 +
modules/mesos/pom.xml | 101 +
.../apache/ignite/mesos/ClusterProperties.java | 534 ++
.../apache/ignite/mesos/IgniteFramework.java | 119 +
.../apache/ignite/mesos/IgniteScheduler.java | 365 ++
.../org/apache/ignite/mesos/IgniteTask.java | 86 +
.../org/apache/ignite/mesos/package-info.java | 22 +
.../ignite/mesos/resource/IgniteProvider.java | 234 +
.../ignite/mesos/resource/JettyServer.java | 61 +
.../ignite/mesos/resource/ResourceHandler.java | 142 +
.../ignite/mesos/resource/ResourceProvider.java | 120 +
.../ignite/mesos/resource/package-info.java | 22 +
.../main/resources/ignite-default-config.xml | 35 +
.../org/apache/ignite/IgniteMesosTestSuite.java | 38 +
.../ignite/mesos/IgniteSchedulerSelfTest.java | 464 ++
modules/rest-http/pom.xml | 2 +-
modules/scalar-2.10/README.txt | 4 +
modules/scalar-2.10/licenses/apache-2.0.txt | 202 +
.../scalar-2.10/licenses/scala-bsd-license.txt | 18 +
modules/scalar-2.10/pom.xml | 197 +
modules/scalar/pom.xml | 2 +-
.../scalar/tests/ScalarCacheQueriesSpec.scala | 154 +-
.../ignite/scalar/tests/ScalarCacheSpec.scala | 23 +-
.../scalar/tests/ScalarConversionsSpec.scala | 43 +-
.../scalar/tests/ScalarProjectionSpec.scala | 128 +-
.../scalar/tests/ScalarReturnableSpec.scala | 41 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spark-2.10/README.txt | 4 +
modules/spark-2.10/licenses/apache-2.0.txt | 202 +
.../spark-2.10/licenses/scala-bsd-license.txt | 18 +
modules/spark-2.10/pom.xml | 120 +
modules/spark/README.txt | 8 +
modules/spark/licenses/apache-2.0.txt | 202 +
modules/spark/licenses/scala-bsd-license.txt | 18 +
modules/spark/pom.xml | 110 +
.../org/apache/ignite/spark/IgniteContext.scala | 119 +
.../org/apache/ignite/spark/IgniteRDD.scala | 244 +
.../apache/ignite/spark/JavaIgniteContext.scala | 63 +
.../org/apache/ignite/spark/JavaIgniteRDD.scala | 99 +
.../ignite/spark/impl/IgniteAbstractRDD.scala | 39 +
.../ignite/spark/impl/IgnitePartition.scala | 24 +
.../ignite/spark/impl/IgniteQueryIterator.scala | 27 +
.../apache/ignite/spark/impl/IgniteSqlRDD.scala | 41 +
.../spark/impl/JavaIgniteAbstractRDD.scala | 34 +
.../ignite/spark/JavaIgniteRDDSelfTest.java | 298 +
.../scala/org/apache/ignite/spark/Entity.scala | 28 +
.../org/apache/ignite/spark/IgniteRddSpec.scala | 231 +
modules/spring/pom.xml | 23 +-
.../spring/CacheSpringStoreSessionListener.java | 207 +
.../GridResourceSpringBeanInjector.java | 2 +-
.../util/spring/IgniteSpringHelperImpl.java | 17 +
.../src/test/config/incorrect-store-cache.xml | 57 +
modules/spring/src/test/config/node.xml | 43 +
modules/spring/src/test/config/node1.xml | 45 +
.../test/config/pojo-incorrect-store-cache.xml | 56 +
modules/spring/src/test/config/store-cache.xml | 59 +
modules/spring/src/test/config/store-cache1.xml | 62 +
.../jdbc/CacheJdbcBlobStoreFactorySelfTest.java | 172 +
.../jdbc/CacheJdbcPojoStoreFactorySelfTest.java | 193 +
...CacheSpringStoreSessionListenerSelfTest.java | 197 +
.../testsuites/IgniteSpringTestSuite.java | 8 +
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
.../ignite/tools/classgen/ClassesGenerator.java | 30 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console-2.10/README.txt | 4 +
modules/visor-console-2.10/pom.xml | 174 +
.../licenses/jcraft-revised-bsd.txt | 28 -
modules/visor-console/pom.xml | 4 +-
.../commands/cache/VisorCacheCommand.scala | 7 +-
.../commands/cache/VisorCacheScanCommand.scala | 2 +-
.../visor/commands/node/VisorNodeCommand.scala | 2 +-
.../commands/tasks/VisorTasksCommand.scala | 2 +-
.../scala/org/apache/ignite/visor/visor.scala | 63 +-
.../ignite/visor/VisorRuntimeBaseSpec.scala | 2 +-
.../visor/commands/VisorArgListSpec.scala | 60 +-
.../commands/VisorFileNameCompleterSpec.scala | 34 +-
.../commands/ack/VisorAckCommandSpec.scala | 20 +-
.../commands/alert/VisorAlertCommandSpec.scala | 68 +-
.../cache/VisorCacheClearCommandSpec.scala | 48 +-
.../commands/cache/VisorCacheCommandSpec.scala | 66 +-
.../config/VisorConfigurationCommandSpec.scala | 8 +-
.../cswap/VisorCacheSwapCommandSpec.scala | 24 +-
.../deploy/VisorDeployCommandSpec.scala | 10 +-
.../disco/VisorDiscoveryCommandSpec.scala | 46 +-
.../events/VisorEventsCommandSpec.scala | 28 +-
.../visor/commands/gc/VisorGcCommandSpec.scala | 30 +-
.../commands/help/VisorHelpCommandSpec.scala | 57 +-
.../commands/kill/VisorKillCommandSpec.scala | 58 +-
.../commands/log/VisorLogCommandSpec.scala | 10 +-
.../commands/mem/VisorMemoryCommandSpec.scala | 77 +-
.../commands/node/VisorNodeCommandSpec.scala | 22 +-
.../commands/open/VisorOpenCommandSpec.scala | 16 +-
.../commands/ping/VisorPingCommandSpec.scala | 16 +-
.../commands/start/VisorStartCommandSpec.scala | 126 +-
.../commands/tasks/VisorTasksCommandSpec.scala | 112 +-
.../commands/top/VisorTopologyCommandSpec.scala | 52 +-
.../commands/vvm/VisorVvmCommandSpec.scala | 30 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
.../IgniteWebSessionSelfTestSuite.java | 2 +-
.../config/benchmark-client-mode.properties | 89 +
modules/yardstick/pom.xml | 2 +-
parent/pom.xml | 14 +-
pom.xml | 125 +-
scripts/git-apply-patch.sh | 8 +-
scripts/git-format-patch.sh | 16 +-
scripts/git-patch-functions.sh | 36 +-
scripts/git-patch-prop.sh | 2 +-
972 files changed, 59669 insertions(+), 24272 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bd46365d/pom.xml
----------------------------------------------------------------------
[30/50] incubator-ignite git commit: # ignite-sprint-7 fixed test
Posted by sb...@apache.org.
# ignite-sprint-7 fixed test
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/847ddf54
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/847ddf54
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/847ddf54
Branch: refs/heads/ignite-788-dev-review
Commit: 847ddf543d635144d8c33f4afc33e76d0de92143
Parents: 01d842a
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jun 26 16:02:50 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jun 26 16:02:50 2015 +0300
----------------------------------------------------------------------
.../near/GridCachePartitionedMultiNodeFullApiSelfTest.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/847ddf54/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
index 9445f9c..30c9e8a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
@@ -358,7 +358,9 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti
assertEquals(0, cache1.localSize(NEAR));
assertEquals(5, cache1.localSize(CachePeekMode.ALL) - cache1.localSize(NEAR));
- assertEquals(nearEnabled() ? 2 : 0, cache2.localSize(NEAR));
+ boolean nearEnabled = cache2.getConfiguration(CacheConfiguration.class).getNearConfiguration() != null;
+
+ assertEquals(nearEnabled ? 2 : 0, cache2.localSize(NEAR));
assertEquals(0, cache2.localSize(CachePeekMode.ALL) - cache2.localSize(NEAR));
}
[45/50] incubator-ignite git commit: minor fix
Posted by sb...@apache.org.
minor fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a2266666
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a2266666
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a2266666
Branch: refs/heads/ignite-788-dev-review
Commit: a226666663f0d5de94284a3662a6103c1d9c2b17
Parents: f45f96d
Author: avinogradov <av...@gridgain.com>
Authored: Mon Jun 29 15:55:41 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Mon Jun 29 15:55:41 2015 +0300
----------------------------------------------------------------------
pom.xml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a2266666/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b935b2e..4f2441c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -604,12 +604,12 @@
</copy>
<!-- appending filename to md5 and sha1 files. to be improved. -->
- <concat destfile="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.md5" append="true"> ${project.artifactId}-fabric-${project.version}-bin.zip</concat>
- <concat destfile="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.sha1" append="true"> ${project.artifactId}-fabric-${project.version}-bin.zip</concat>
- <concat destfile="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.md5" append="true"> ${project.artifactId}-hadoop-${project.version}-bin.zip</concat>
- <concat destfile="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.sha1" append="true"> ${project.artifactId}-hadoop-${project.version}-bin.zip</concat>
- <concat destfile="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.md5" append="true"> ${project.artifactId}-${project.version}-src.zip</concat>
- <concat destfile="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.sha1" append="true"> ${project.artifactId}-${project.version}-src.zip</concat>
+ <echo file="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.md5" append="true" message=" ${project.artifactId}-fabric-${project.version}-bin.zip"/>
+ <echo file="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.sha1" append="true" message=" ${project.artifactId}-fabric-${project.version}-bin.zip"/>
+ <echo file="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.md5" append="true" message=" ${project.artifactId}-hadoop-${project.version}-bin.zip"/>
+ <echo file="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.sha1" append="true" message=" ${project.artifactId}-hadoop-${project.version}-bin.zip"/>
+ <echo file="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.md5" append="true" message=" ${project.artifactId}-${project.version}-src.zip"/>
+ <echo file="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.sha1" append="true" message=" ${project.artifactId}-${project.version}-src.zip"/>
<copy file="${basedir}/KEYS" todir="${basedir}/target/site" failonerror="false" />
</target>
[34/50] incubator-ignite git commit: # ignite-1017: review
Posted by sb...@apache.org.
# ignite-1017: 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/5d09ed1b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5d09ed1b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5d09ed1b
Branch: refs/heads/ignite-788-dev-review
Commit: 5d09ed1b3d295efb0670aaa943a0c3eb9c3a7267
Parents: 5b237e1
Author: ashutak <as...@gridgain.com>
Authored: Fri Jun 26 17:53:22 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Fri Jun 26 17:53:22 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/cluster/ClusterGroup.java | 16 ----------------
.../internal/cluster/ClusterGroupAdapter.java | 7 -------
.../internal/cluster/IgniteClusterAsyncImpl.java | 5 -----
3 files changed, 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5d09ed1b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
index 9627f76..62f3027 100644
--- a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
+++ b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
@@ -131,22 +131,6 @@ public interface ClusterGroup {
* @param name Name of the attribute.
* @param val Optional attribute value to match.
* @return Cluster group for nodes containing specified attribute.
- *
- * @deprecated use {@link ClusterGroup#forAttribute(String name, @Nullable Object val}
- */
- public ClusterGroup forAttribute(String name, @Nullable String val);
-
- /**
- * Creates a new cluster group for nodes containing given name and value
- * specified in user attributes.
- * <p>
- * User attributes for every node are optional and can be specified in
- * grid node configuration. See {@link IgniteConfiguration#getUserAttributes()}
- * for more information.
- *
- * @param name Name of the attribute.
- * @param val Optional attribute value to match.
- * @return Cluster group for nodes containing specified attribute.
*/
public ClusterGroup forAttribute(String name, @Nullable Object val);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5d09ed1b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
index 414f5ba..6c42067 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
@@ -345,13 +345,6 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable {
}
/** {@inheritDoc} */
- @Override public final ClusterGroup forAttribute(String name, @Nullable final String val) {
- A.notNull(name, "n");
-
- return forPredicate(new AttributeFilter(name, val));
- }
-
- /** {@inheritDoc} */
@Override public final ClusterGroup forAttribute(String name, @Nullable final Object val) {
A.notNull(name, "n");
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5d09ed1b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
index f676261..01c62b7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
@@ -192,11 +192,6 @@ public class IgniteClusterAsyncImpl extends AsyncSupportAdapter<IgniteCluster>
}
/** {@inheritDoc} */
- @Override public ClusterGroup forAttribute(String name, @Nullable String val) {
- return cluster.forAttribute(name, val);
- }
-
- /** {@inheritDoc} */
@Override public ClusterGroup forAttribute(String name, @Nullable Object val) {
return cluster.forAttribute(name, val);
}
[47/50] incubator-ignite git commit: #ignite-18: Property
segmentationResolveAttempts seems to be ignored.
Posted by sb...@apache.org.
#ignite-18: Property segmentationResolveAttempts seems to be ignored.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/1d5cfbcc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1d5cfbcc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1d5cfbcc
Branch: refs/heads/ignite-788-dev-review
Commit: 1d5cfbcc6ef79dd8da99dc46a2797952dbcf4eab
Parents: 5dff89c
Author: ivasilinets <iv...@gridgain.com>
Authored: Mon Jun 29 17:50:49 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Mon Jun 29 17:50:49 2015 +0300
----------------------------------------------------------------------
.../internal/managers/discovery/GridDiscoveryManager.java | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1d5cfbcc/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 1e4b972..5e7600f 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
@@ -326,6 +326,12 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
U.warn(log, "Configuration parameter 'segmentCheckFrequency' is too low " +
"(at least 2000 ms recommended): " + segChkFreq);
+ int segResAttemp = ctx.config().getSegmentationResolveAttempts();
+
+ if (segResAttemp < 1)
+ throw new IgniteCheckedException(
+ "Segment resolve attempts cannot be negative or zero: " + segResAttemp);
+
checkSegmentOnStart();
}
[18/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-7' into ignite-sprint-7
Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-7' into ignite-sprint-7
Conflicts:
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/646c3613
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/646c3613
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/646c3613
Branch: refs/heads/ignite-788-dev-review
Commit: 646c361323de82e0bc94a6912e838f39061fc204
Parents: 6c3d97f 9f74335
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Jun 25 17:20:12 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Thu Jun 25 17:20:12 2015 +0300
----------------------------------------------------------------------
.../ClientAbstractConnectivitySelfTest.java | 4 +-
.../org/apache/ignite/cluster/ClusterGroup.java | 9 ++
.../org/apache/ignite/cluster/ClusterNode.java | 2 +
.../internal/cluster/ClusterGroupAdapter.java | 38 +++++++
.../cluster/IgniteClusterAsyncImpl.java | 5 +
.../ignite/internal/util/IgniteUtils.java | 6 +-
.../internal/ClusterForHostsSelfTest.java | 113 +++++++++++++++++++
.../internal/util/IgniteUtilsSelfTest.java | 22 ++++
.../ignite/testsuites/IgniteBasicTestSuite.java | 4 +-
9 files changed, 197 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/646c3613/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index 3da198c,9b7f392..6ff83e2
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@@ -65,9 -65,11 +65,11 @@@ public class IgniteBasicTestSuite exten
suite.addTest(IgniteStreamSelfTestSuite.suite());
suite.addTest(new TestSuite(GridSelfTest.class));
+ suite.addTest(new TestSuite(ClusterForHostsSelfTest.class));
+ suite.addTest(new TestSuite(IgniteMessagingWithClientTest.class));
-
- GridTestUtils.addTestIfNeeded(suite, GridProjectionSelfTest.class, ignoredTests);
++
+ GridTestUtils.addTestIfNeeded(suite, ClusterGroupSelfTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite, GridMessagingSelfTest.class, ignoredTests);
- suite.addTest(new TestSuite(IgniteMessagingWithClientTest.class));
GridTestUtils.addTestIfNeeded(suite, GridMessagingNoPeerClassLoadingSelfTest.class, ignoredTests);
if (U.isLinux() || U.isMacOs())
[29/50] incubator-ignite git commit: # init marshaller cache on
daemon nodes
Posted by sb...@apache.org.
# init marshaller cache on daemon nodes
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3231f933
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3231f933
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3231f933
Branch: refs/heads/ignite-788-dev-review
Commit: 3231f93373a2f84b7e0ea64d969b53121b6fe323
Parents: 01d842a
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jun 26 14:34:24 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jun 26 15:28:52 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/GridKernalContextImpl.java | 2 +-
.../processors/cache/GridCacheProcessor.java | 62 ++++--
.../IgniteDaemonNodeMarshallerCacheTest.java | 192 +++++++++++++++++++
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
4 files changed, 245 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3231f933/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
index 65107a7..8abb135 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
@@ -899,7 +899,7 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable
/** {@inheritDoc} */
@Override public boolean clientNode() {
- return cfg.isClientMode();
+ return cfg.isClientMode() || cfg.isDaemon();
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3231f933/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 2f7f22c..8124594 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -265,7 +265,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
// Suppress warning if at least one ATOMIC cache found.
perf.add("Enable ATOMIC mode if not using transactions (set 'atomicityMode' to ATOMIC)",
- cfg.getAtomicityMode() == ATOMIC);
+ cfg.getAtomicityMode() == ATOMIC);
// Suppress warning if at least one non-FULL_SYNC mode found.
perf.add("Disable fully synchronous writes (set 'writeSynchronizationMode' to PRIMARY_SYNC or FULL_ASYNC)",
@@ -341,8 +341,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
"Serializable transactions are disabled while default transaction isolation is SERIALIZABLE " +
"(most likely misconfiguration - either update 'isTxSerializableEnabled' or " +
"'defaultTxIsolationLevel' properties) for cache: " + U.maskName(cc.getName()),
- "Serializable transactions are disabled while default transaction isolation is SERIALIZABLE " +
- "for cache: " + U.maskName(cc.getName()));
+ "Serializable transactions are disabled while default transaction isolation is SERIALIZABLE " +
+ "for cache: " + U.maskName(cc.getName()));
if (cc.isWriteBehindEnabled()) {
if (cfgStore == null)
@@ -527,8 +527,14 @@ public class GridCacheProcessor extends GridProcessorAdapter {
/** {@inheritDoc} */
@SuppressWarnings( {"unchecked"})
@Override public void start() throws IgniteCheckedException {
- if (ctx.config().isDaemon())
+ if (ctx.config().isDaemon()) {
+ sharedCtx = createSharedContext(ctx, CU.startStoreSessionListeners(ctx, null));
+
+ for (GridCacheSharedManager mgr : sharedCtx.managers())
+ mgr.start(sharedCtx);
+
return;
+ }
DeploymentMode depMode = ctx.config().getDeploymentMode();
@@ -667,8 +673,45 @@ public class GridCacheProcessor extends GridProcessorAdapter {
@SuppressWarnings("unchecked")
@Override public void onKernalStart() throws IgniteCheckedException {
try {
- if (ctx.config().isDaemon())
+ if (ctx.config().isDaemon()) {
+ for (CacheConfiguration ccfg : ctx.config().getCacheConfiguration()) {
+ if (CU.isMarshallerCache(ccfg.getName())) {
+ CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(ccfg);
+
+ initialize(ccfg, cacheObjCtx);
+
+ GridCacheContext ctx = createCache(ccfg, null, CacheType.MARSHALLER, cacheObjCtx, true);
+
+ ctx.dynamicDeploymentId(IgniteUuid.randomUuid());
+
+ sharedCtx.addCacheContext(ctx);
+
+ GridCacheAdapter cache = ctx.cache();
+
+ String name = ccfg.getName();
+
+ caches.put(maskNull(name), cache);
+
+ startCache(cache);
+
+ break;
+ }
+ }
+
+ marshallerCache().context().preloader().syncFuture().listen(new CIX1<IgniteInternalFuture<?>>() {
+ @Override public void applyx(IgniteInternalFuture<?> f) throws IgniteCheckedException {
+ ctx.marshallerContext().onMarshallerCachePreloaded(ctx);
+ }
+ });
+
+ for (GridCacheSharedManager<?, ?> mgr : sharedCtx.managers())
+ mgr.onKernalStart();
+
+ for (GridCacheAdapter<?, ?> cache : caches.values())
+ onKernalStart(cache);
+
return;
+ }
ClusterNode locNode = ctx.discovery().localNode();
@@ -808,9 +851,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public void stop(boolean cancel) throws IgniteCheckedException {
- if (ctx.config().isDaemon())
- return;
-
for (String cacheName : stopSeq) {
GridCacheAdapter<?, ?> cache = caches.remove(maskNull(cacheName));
@@ -850,9 +890,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
@Override public void onKernalStop(boolean cancel) {
cacheStartedLatch.countDown();
- if (ctx.config().isDaemon())
- return;
-
for (String cacheName : stopSeq) {
GridCacheAdapter<?, ?> cache = caches.get(maskNull(cacheName));
@@ -1390,6 +1427,9 @@ public class GridCacheProcessor extends GridProcessorAdapter {
Collection<DynamicCacheChangeRequest> reqs,
AffinityTopologyVersion topVer
) throws IgniteCheckedException {
+ if (ctx.isDaemon())
+ return;
+
for (DynamicCacheChangeRequest req : reqs) {
assert req.start() : req;
assert req.cacheType() != null : req;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3231f933/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java
new file mode 100644
index 0000000..a0f4074
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java
@@ -0,0 +1,192 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import org.apache.ignite.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.resources.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.io.*;
+
+import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.cache.CacheRebalanceMode.*;
+import static org.apache.ignite.internal.IgniteNodeAttributes.*;
+
+/**
+ *
+ */
+public class IgniteDaemonNodeMarshallerCacheTest extends GridCommonAbstractTest {
+ /** */
+ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+
+ /** */
+ private boolean daemon;
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ cfg.setDaemon(daemon);
+
+ ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ super.afterTest();
+
+ stopAllGrids();
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testMarshalOnDaemonNode1() throws Exception {
+ marshalOnDaemonNode(true);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testMarshalOnDaemonNode2() throws Exception {
+ marshalOnDaemonNode(false);
+ }
+
+ /**
+ * @param startFirst If {@code true} daemon node is started first.
+ * @throws Exception If failed.
+ */
+ public void marshalOnDaemonNode(boolean startFirst) throws Exception {
+ int nodeIdx = 0;
+
+ if (!startFirst) {
+ Ignite ignite1 = startGrid(nodeIdx++);
+
+ assertFalse("true".equals(ignite1.cluster().localNode().attribute(ATTR_DAEMON)));
+ }
+
+ daemon = true;
+
+ Ignite daemonNode = startGrid(nodeIdx++);
+
+ assertEquals("true", daemonNode.cluster().localNode().attribute(ATTR_DAEMON));
+
+ daemon = false;
+
+ if (startFirst) {
+ Ignite ignite1 = startGrid(nodeIdx++);
+
+ assertFalse("true".equals(ignite1.cluster().localNode().attribute(ATTR_DAEMON)));
+ }
+
+ awaitPartitionMapExchange();
+
+ TestClass1 res1 = daemonNode.compute(daemonNode.cluster().forRemotes()).call(new TestCallable1());
+
+ assertNotNull(res1);
+ assertEquals(111, res1.val);
+
+ Ignite ignite2 = startGrid(nodeIdx);
+
+ CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
+
+ ccfg.setRebalanceMode(SYNC);
+ ccfg.setCacheMode(REPLICATED);
+
+ IgniteCache<Object, Object> cache = ignite2.getOrCreateCache(ccfg);
+
+ awaitPartitionMapExchange();
+
+ cache.put(1, new TestClass1(1));
+ cache.put(2, new TestClass2(2));
+
+ TestClass2 res2 = daemonNode.compute(daemonNode.cluster().forRemotes()).call(new TestCallable2());
+
+ assertNotNull(res2);
+ assertEquals(222, res2.val);
+ }
+
+ /**
+ *
+ */
+ private static class TestCallable1 implements IgniteCallable<TestClass1> {
+ /** */
+ @IgniteInstanceResource
+ private Ignite ignite;
+
+ /** {@inheritDoc} */
+ @Override public TestClass1 call() throws Exception {
+ assertFalse("true".equals(ignite.cluster().localNode().attribute(ATTR_DAEMON)));
+
+ return new TestClass1(111);
+ }
+ }
+
+ /**
+ *
+ */
+ private static class TestCallable2 implements IgniteCallable<TestClass2> {
+ /** */
+ @IgniteInstanceResource
+ private Ignite ignite;
+
+ /** {@inheritDoc} */
+ @Override public TestClass2 call() throws Exception {
+ assertFalse("true".equals(ignite.cluster().localNode().attribute(ATTR_DAEMON)));
+
+ return new TestClass2(222);
+ }
+ }
+
+ /**
+ *
+ */
+ private static class TestClass1 implements Serializable {
+ /** */
+ public int val;
+
+ /**
+ * @param val Value.
+ */
+ public TestClass1(int val) {
+ this.val = val;
+ }
+ }
+
+ /**
+ *
+ */
+ private static class TestClass2 implements Serializable {
+ /** */
+ public int val;
+
+ /**
+ * @param val Value.
+ */
+ public TestClass2(int val) {
+ this.val = val;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3231f933/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index 6ff83e2..df22290 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@ -94,6 +94,7 @@ public class IgniteBasicTestSuite extends TestSuite {
suite.addTestSuite(GridFailFastNodeFailureDetectionSelfTest.class);
suite.addTestSuite(OffHeapTieredTransactionSelfTest.class);
suite.addTestSuite(IgniteSlowClientDetectionSelfTest.class);
+ suite.addTestSuite(IgniteDaemonNodeMarshallerCacheTest.class);
return suite;
}