[2/2] incubator-ignite git commit: ignite-1229: added tests that check ping interruption

2015-08-14 Thread sboikov
ignite-1229: added tests that check ping interruption


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/23dc6558
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/23dc6558
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/23dc6558

Branch: refs/heads/ignite-1229
Commit: 23dc6558e771382a244cd5d3ec7abe5ddbad1f61
Parents: 4381bf7
Author: Denis Magda 
Authored: Fri Aug 14 10:35:57 2015 +0300
Committer: Denis Magda 
Committed: Fri Aug 14 10:35:57 2015 +0300

--
 .../spi/discovery/tcp/TcpDiscoverySpi.java  |   6 +-
 .../spi/discovery/tcp/TcpDiscoverySelfTest.java | 151 ++-
 .../TcpDiscoverySpiFailureTimeoutSelfTest.java  |   5 +-
 3 files changed, 156 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/23dc6558/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 65ab8fd..2f3d410 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
@@ -1184,7 +1184,7 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter 
implements DiscoverySpi, T
  * @throws IOException If failed.
  * @throws IgniteSpiOperationTimeoutException In case of timeout.
  */
-Socket openSocket(Socket sock, InetSocketAddress remAddr, 
IgniteSpiOperationTimeoutHelper timeoutHelper)
+protected Socket openSocket(Socket sock, InetSocketAddress remAddr, 
IgniteSpiOperationTimeoutHelper timeoutHelper)
 throws IOException, IgniteSpiOperationTimeoutException {
 
 assert remAddr != null;
@@ -1277,8 +1277,8 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter 
implements DiscoverySpi, T
  * @throws IOException If IO failed or write timed out.
  * @throws IgniteCheckedException If marshalling failed.
  */
-protected void writeToSocket(Socket sock, TcpDiscoveryAbstractMessage msg, 
long timeout)
-throws IOException, IgniteCheckedException {
+protected void writeToSocket(Socket sock, TcpDiscoveryAbstractMessage msg, 
long timeout) throws IOException,
+IgniteCheckedException {
 writeToSocket(sock, msg, new GridByteArrayOutputStream(8 * 1024), 
timeout); // 8K.
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/23dc6558/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
index 9a44c24..e5118e3 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
@@ -70,7 +70,8 @@ public class TcpDiscoverySelfTest extends 
GridCommonAbstractTest {
 @Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
 IgniteConfiguration cfg = super.getConfiguration(gridName);
 
-TcpDiscoverySpi spi = new TcpDiscoverySpi();
+TcpDiscoverySpi spi = 
gridName.contains("testPingInterruptedOnNodeFailedFailingNode") ?
+new TestTcpDiscoverySpi() : new TcpDiscoverySpi();
 
 discoMap.put(gridName, spi);
 
@@ -128,6 +129,8 @@ public class TcpDiscoverySelfTest extends 
GridCommonAbstractTest {
 if (U.isMacOs())
 spi.setLocalAddress(F.first(U.allLocalIps()));
 }
+else if 
(gridName.contains("testPingInterruptedOnNodeFailedPingingNode"))
+cfg.setFailureDetectionTimeout(30_000);
 
 return cfg;
 }
@@ -339,6 +342,152 @@ public class TcpDiscoverySelfTest extends 
GridCommonAbstractTest {
 /**
  * @throws Exception If any error occurs.
  */
+public void testPingInterruptedOnNodeFailed() throws Exception {
+try {
+final Ignite pingingNode = 
startGrid("testPingInterruptedOnNodeFailedPingingNode");
+final Ignite failedNode = 
startGrid("testPingInterruptedOnNodeFailedFailingNode");
+startGrid("testPingInterruptedOnNodeFailedSimpleNode");
+
+
((TestTcpDiscoverySpi)failedNode.configuration().getDiscoverySpi()).ignorePingResponse
 = true;
+
+final CountDownLatch pingLatch = new CountDownLatch(1);
+

[1/2] incubator-ignite git commit: ignite-1229: interrupt ping queries if remote node leaves or fails

2015-08-14 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1229 2159d79e2 -> 23dc6558e


ignite-1229: interrupt ping queries if remote node leaves or fails


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4381bf7f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4381bf7f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4381bf7f

Branch: refs/heads/ignite-1229
Commit: 4381bf7fbbcf6faa906cc9ed465d3feb2a302224
Parents: 2159d79
Author: Denis Magda 
Authored: Thu Aug 13 15:54:58 2015 +0300
Committer: Denis Magda 
Committed: Thu Aug 13 15:54:58 2015 +0300

--
 .../ignite/spi/discovery/tcp/ServerImpl.java| 57 ++--
 .../spi/discovery/tcp/TcpDiscoverySpi.java  | 41 +++---
 2 files changed, 87 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4381bf7f/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 76144e3..1f0266e 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
@@ -114,7 +114,7 @@ class ServerImpl extends TcpDiscoveryImpl {
 protected TcpDiscoverySpiState spiState = DISCONNECTED;
 
 /** Map with proceeding ping requests. */
-private final ConcurrentMap>> pingMap =
+private final ConcurrentMap>> pingMap =
 new ConcurrentHashMap8<>();
 
 /**
@@ -497,9 +497,9 @@ class ServerImpl extends TcpDiscoveryImpl {
 return F.t(getLocalNodeId(), clientPingRes);
 }
 
-GridFutureAdapter> fut = new 
GridFutureAdapter<>();
+GridPingFutureAdapter> fut = new 
GridPingFutureAdapter<>();
 
-IgniteInternalFuture> oldFut = 
pingMap.putIfAbsent(addr, fut);
+GridPingFutureAdapter> oldFut = 
pingMap.putIfAbsent(addr, fut);
 
 if (oldFut != null)
 return oldFut.get();
@@ -520,7 +520,11 @@ class ServerImpl extends TcpDiscoveryImpl {
 
 long tstamp = U.currentTimeMillis();
 
-sock = spi.openSocket(addr, timeoutHelper);
+sock = spi.createSocket();
+
+fut.sock = sock;
+
+sock = spi.openSocket(sock, addr, timeoutHelper);
 
 openedSock = true;
 
@@ -597,6 +601,21 @@ class ServerImpl extends TcpDiscoveryImpl {
 }
 }
 
+/**
+ * Interrupts all existed 'ping' request for the given node.
+ *
+ * @param node Node that may be pinged.
+ */
+private void interruptPing(TcpDiscoveryNode node) {
+for (InetSocketAddress addr : spi.getNodeAddresses(node)) {
+GridPingFutureAdapter fut = pingMap.get(addr);
+
+if (fut != null && fut.sock != null)
+// Reference to the socket is not set to null. No need to 
assign it to a local variable.
+U.closeQuiet(fut.sock);
+}
+}
+
 /** {@inheritDoc} */
 @Override public void disconnect() throws IgniteSpiException {
 spiStop0(true);
@@ -3366,6 +3385,8 @@ class ServerImpl extends TcpDiscoveryImpl {
 if (msg.verified() && !locNodeId.equals(leavingNodeId)) {
 TcpDiscoveryNode leftNode = ring.removeNode(leavingNodeId);
 
+interruptPing(leavingNode);
+
 assert leftNode != null;
 
 if (log.isDebugEnabled())
@@ -3533,6 +3554,8 @@ class ServerImpl extends TcpDiscoveryImpl {
 if (msg.verified()) {
 node = ring.removeNode(nodeId);
 
+interruptPing(node);
+
 assert node != null;
 
 long topVer;
@@ -5142,4 +5165,30 @@ class ServerImpl extends TcpDiscoveryImpl {
 spi.writeToSocket(sock, msg, bout, timeout);
 }
 }
+
+/**
+ *
+ */
+private static class GridPingFutureAdapter extends GridFutureAdapter 
{
+/** Socket. */
+private Socket sock;
+
+/**
+ * Returns socket associated with this ping future.
+ *
+ * @return Socket or {@code null} if no socket associated.
+ */
+public Socket sock() {
+return sock;
+}
+
+/**
+ * Associates socket with this ping futer.
+ *
+ * @param sock Socket.
+ */
+public void sock(Socket sock) {
+this.sock = sock;
+}
+}
 }

http://git-wip-us.apache.org/repos/

[1/2] incubator-ignite git commit: 1.3.3-p1-SNAPSHOT

2015-08-14 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1.3.3-p2 [created] 51dcd518e


1.3.3-p1-SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/834b3476
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/834b3476
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/834b3476

Branch: refs/heads/ignite-1.3.3-p2
Commit: 834b34765fac4cb87d9d8f4bdb39c14a9e61275d
Parents: 7d747d2
Author: Ignite Teamcity 
Authored: Tue Aug 11 10:53:58 2015 +0300
Committer: Ignite Teamcity 
Committed: Tue Aug 11 10:53:58 2015 +0300

--
 examples/pom.xml   | 2 +-
 modules/aop/pom.xml| 2 +-
 modules/apache-license-gen/pom.xml | 2 +-
 modules/aws/pom.xml| 2 +-
 modules/clients/pom.xml| 2 +-
 modules/cloud/pom.xml  | 2 +-
 modules/codegen/pom.xml| 2 +-
 modules/core/pom.xml   | 2 +-
 modules/core/src/main/resources/ignite.properties  | 2 +-
 modules/extdata/p2p/pom.xml| 2 +-
 modules/extdata/uri/modules/uri-dependency/pom.xml | 2 +-
 modules/extdata/uri/pom.xml| 2 +-
 modules/gce/pom.xml| 2 +-
 modules/geospatial/pom.xml | 2 +-
 modules/hadoop/pom.xml | 2 +-
 modules/hibernate/pom.xml  | 2 +-
 modules/indexing/pom.xml   | 2 +-
 modules/jcl/pom.xml| 2 +-
 modules/jta/pom.xml| 2 +-
 modules/kafka/pom.xml  | 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 | 2 +-
 modules/ssh/pom.xml| 2 +-
 modules/tools/pom.xml  | 2 +-
 modules/urideploy/pom.xml  | 2 +-
 modules/visor-console-2.10/pom.xml | 2 +-
 modules/visor-console/pom.xml  | 2 +-
 modules/visor-plugins/pom.xml  | 2 +-
 modules/web/pom.xml| 2 +-
 modules/yardstick/pom.xml  | 2 +-
 modules/yarn/pom.xml   | 2 +-
 pom.xml| 2 +-
 41 files changed, 41 insertions(+), 41 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/834b3476/examples/pom.xml
--
diff --git a/examples/pom.xml b/examples/pom.xml
index 1338a18..014cb0a 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
 
 
 ignite-examples
-1.3.3-SNAPSHOT
+1.3.3-p1-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/834b3476/modules/aop/pom.xml
--
diff --git a/modules/aop/pom.xml b/modules/aop/pom.xml
index 194ffab..1983567 100644
--- a/modules/aop/pom.xml
+++ b/modules/aop/pom.xml
@@ -31,7 +31,7 @@
 
 
 ignite-aop
-1.3.3-SNAPSHOT
+1.3.3-p1-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/834b3476/modules/apache-license-gen/pom.xml
--
diff --git a/modules/apache-license-gen/pom.xml 
b/modules/apache-license-gen/pom.xml
index 11259a5..c723729 100644
--- a/modules/apache-license-gen/pom.xml
+++ b/modules/apache-license-gen/pom.xml
@@ -31,5 +31,5 @@
 
 org.apache.ignite
 ignite-apache-license-gen
-1.3.3-SNAPSHOT
+1.3.3-p1-SNAPSHOT
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/834b3476/modules/aws/pom.xml
--
diff --git a/modules/aws/pom.xml b/modules/aws/pom.xml
index 37f6250..1f92999 100644
--- a/modules/aws/pom.xml
+++ b/modules/aws/pom.xml
@@ -31,7 +31,7 @@
 
 
 ignite-aws
-1.3.3-SNAPSHOT
+1.3.3-p1-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos

[2/2] incubator-ignite git commit: # ignite-1175: call 'onDeferredDelete' from innerRemover

2015-08-14 Thread sboikov
# ignite-1175: call 'onDeferredDelete' from innerRemover


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/51dcd518
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/51dcd518
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/51dcd518

Branch: refs/heads/ignite-1.3.3-p2
Commit: 51dcd518e51883ca043492a86928cf3488db4bd7
Parents: 834b347
Author: sboikov 
Authored: Tue Aug 11 11:30:02 2015 +0300
Committer: sboikov 
Committed: Tue Aug 11 11:39:54 2015 +0300

--
 .../processors/cache/GridCacheMapEntry.java |   4 +-
 ...cheDhtLocalPartitionAfterRemoveSelfTest.java | 112 +++
 .../testsuites/IgniteCacheTestSuite2.java   |   1 +
 3 files changed, 116 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/51dcd518/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 4680994..a078bed 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -1232,7 +1232,9 @@ public abstract class GridCacheMapEntry implements 
GridCacheEntryEx {
 if (writeThrough)
 cctx.store().remove(tx, keyValue(false));
 
-if (!cctx.deferredDelete()) {
+if (cctx.deferredDelete() && !detached() && !isInternal())
+cctx.onDeferredDelete(this, newVer);
+else {
 boolean marked = false;
 
 synchronized (this) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/51dcd518/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
new file mode 100644
index 000..a930d35
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
@@ -0,0 +1,112 @@
+/*
+ * 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.internal.processors.cache.distributed.dht.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+
+/**
+ * Test for remove operation.
+ */
+public class CacheDhtLocalPartitionAfterRemoveSelfTest extends 
GridCommonAbstractTest {
+/** Grid count. */
+private static final int GRID_CNT = 3;
+
+/** {@inheritDoc} */
+@Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
+IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+CacheConfiguration ccfg = new CacheConfiguration();
+
+ccfg.setAtomicityMode(TRANSACTIONAL);
+ccfg.setNearConfiguration(null);
+
+cfg.setCacheConfiguration(ccfg);
+
+return cfg;
+}
+
+/** {@inheritDoc} */
+@Override protected void beforeTestsStarted() throws Exception {
+startGrids(GRID_CNT);
+}
+
+/** {@inheritDoc} */
+@Override protected void afterTestsStopped() throws Exception {
+stopAllGrids();
+}
+
+/**
+ * @throws Exception If failed.
+ */
+public void testMemoryUsage() throws Exception {
+assertEquals(10_000, GridDhtLocalPartition.MAX_DELETE_QUEUE_SIZE);
+

incubator-ignite git commit: ignite-1229: made link to a socket volatile

2015-08-14 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1229 23dc6558e -> 7ea23f395


ignite-1229: made link to a socket volatile


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7ea23f39
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7ea23f39
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7ea23f39

Branch: refs/heads/ignite-1229
Commit: 7ea23f395e7c72e88cceb6d68d5dfd23e11156f7
Parents: 23dc655
Author: Denis Magda 
Authored: Fri Aug 14 10:51:25 2015 +0300
Committer: Denis Magda 
Committed: Fri Aug 14 10:51:25 2015 +0300

--
 .../main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7ea23f39/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 1f0266e..0d30886 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
@@ -5171,7 +5171,7 @@ class ServerImpl extends TcpDiscoveryImpl {
  */
 private static class GridPingFutureAdapter extends GridFutureAdapter 
{
 /** Socket. */
-private Socket sock;
+private volatile Socket sock;
 
 /**
  * Returns socket associated with this ping future.



incubator-ignite git commit: 1.3.3-p2-SNAPSHOT

2015-08-14 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1.3.3-p2 51dcd518e -> 9300bbc77


1.3.3-p2-SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9300bbc7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9300bbc7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9300bbc7

Branch: refs/heads/ignite-1.3.3-p2
Commit: 9300bbc776191218fb687339ba72675f3fe45848
Parents: 51dcd51
Author: Ignite Teamcity 
Authored: Fri Aug 14 11:34:47 2015 +0300
Committer: Ignite Teamcity 
Committed: Fri Aug 14 11:34:47 2015 +0300

--
 examples/pom.xml   | 2 +-
 modules/aop/pom.xml| 2 +-
 modules/apache-license-gen/pom.xml | 2 +-
 modules/aws/pom.xml| 2 +-
 modules/clients/pom.xml| 2 +-
 modules/cloud/pom.xml  | 2 +-
 modules/codegen/pom.xml| 2 +-
 modules/core/pom.xml   | 2 +-
 modules/core/src/main/resources/ignite.properties  | 2 +-
 modules/extdata/p2p/pom.xml| 2 +-
 modules/extdata/uri/modules/uri-dependency/pom.xml | 2 +-
 modules/extdata/uri/pom.xml| 2 +-
 modules/gce/pom.xml| 2 +-
 modules/geospatial/pom.xml | 2 +-
 modules/hadoop/pom.xml | 2 +-
 modules/hibernate/pom.xml  | 2 +-
 modules/indexing/pom.xml   | 2 +-
 modules/jcl/pom.xml| 2 +-
 modules/jta/pom.xml| 2 +-
 modules/kafka/pom.xml  | 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 | 2 +-
 modules/ssh/pom.xml| 2 +-
 modules/tools/pom.xml  | 2 +-
 modules/urideploy/pom.xml  | 2 +-
 modules/visor-console-2.10/pom.xml | 2 +-
 modules/visor-console/pom.xml  | 2 +-
 modules/visor-plugins/pom.xml  | 2 +-
 modules/web/pom.xml| 2 +-
 modules/yardstick/pom.xml  | 2 +-
 modules/yarn/pom.xml   | 2 +-
 pom.xml| 2 +-
 41 files changed, 41 insertions(+), 41 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9300bbc7/examples/pom.xml
--
diff --git a/examples/pom.xml b/examples/pom.xml
index 014cb0a..043689c 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
 
 
 ignite-examples
-1.3.3-p1-SNAPSHOT
+1.3.3-p2-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9300bbc7/modules/aop/pom.xml
--
diff --git a/modules/aop/pom.xml b/modules/aop/pom.xml
index 1983567..8a271e5 100644
--- a/modules/aop/pom.xml
+++ b/modules/aop/pom.xml
@@ -31,7 +31,7 @@
 
 
 ignite-aop
-1.3.3-p1-SNAPSHOT
+1.3.3-p2-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9300bbc7/modules/apache-license-gen/pom.xml
--
diff --git a/modules/apache-license-gen/pom.xml 
b/modules/apache-license-gen/pom.xml
index c723729..e1066c1 100644
--- a/modules/apache-license-gen/pom.xml
+++ b/modules/apache-license-gen/pom.xml
@@ -31,5 +31,5 @@
 
 org.apache.ignite
 ignite-apache-license-gen
-1.3.3-p1-SNAPSHOT
+1.3.3-p2-SNAPSHOT
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9300bbc7/modules/aws/pom.xml
--
diff --git a/modules/aws/pom.xml b/modules/aws/pom.xml
index 1f92999..e5cf518 100644
--- a/modules/aws/pom.xml
+++ b/modules/aws/pom.xml
@@ -31,7 +31,7 @@
 
 
 ignite-aws
-1.3.3-p1-SNAPSHOT
+1.3.3-p2-SNAPSHOT
 
 
 

http://git-wip-us.a

incubator-ignite git commit: ignite-1239: fallback retries using a topology version when unreserved exception happened

2015-08-14 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1239 be97bdee1 -> a235c1ebb


ignite-1239: fallback retries using a topology version when unreserved 
exception happened


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a235c1eb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a235c1eb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a235c1eb

Branch: refs/heads/ignite-1239
Commit: a235c1ebb4e222d17dc48e3b728e256d5e77c32c
Parents: be97bde
Author: Denis Magda 
Authored: Fri Aug 14 12:32:37 2015 +0300
Committer: Denis Magda 
Committed: Fri Aug 14 12:32:37 2015 +0300

--
 .../GridDhtUnreservedPartitionException.java| 15 +-
 .../cache/query/GridCacheQueryAdapter.java  | 50 +---
 .../cache/query/GridCacheQueryManager.java  |  3 +-
 3 files changed, 49 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a235c1eb/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
index e64019b..d824a47 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache.distributed.dht;
 
 import org.apache.ignite.*;
+import org.apache.ignite.internal.processors.affinity.*;
 
 /**
  * Exception that is thrown when a partition reservation failed.
@@ -29,14 +30,19 @@ public class GridDhtUnreservedPartitionException extends 
IgniteCheckedException
 /** Partition. */
 private final int part;
 
+/** Topology version. */
+private final AffinityTopologyVersion topVer;
+
 /**
  * @param part Partition.
+ * @param topVer Affinity topology version.
  * @param msg Message.
  */
-public GridDhtUnreservedPartitionException(int part, String msg) {
+public GridDhtUnreservedPartitionException(int part, 
AffinityTopologyVersion topVer, String msg) {
 super(msg);
 
 this.part = part;
+this.topVer = topVer;
 }
 
 /**
@@ -46,6 +52,13 @@ public class GridDhtUnreservedPartitionException extends 
IgniteCheckedException
 return part;
 }
 
+/**
+ * @return Affinity topology version.
+ */
+public AffinityTopologyVersion topologyVersion() {
+return topVer;
+}
+
 /** {@inheritDoc} */
 @Override public String toString() {
 return getClass() + " [part=" + part + ", msg=" + getMessage() + ']';

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a235c1eb/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
index d4d9d00..5253835 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
@@ -458,7 +458,7 @@ public class GridCacheQueryAdapter implements 
CacheQuery {
 return (CacheQueryFuture)(loc ? qryMgr.queryFieldsLocal(bean) :
 qryMgr.queryFieldsDistributed(bean, nodes));
 else if (type == SCAN && part != null && nodes.size() > 1)
-return new CacheQueryFallbackFuture<>(nodes, bean, qryMgr);
+return new CacheQueryFallbackFuture<>(nodes, part, bean, qryMgr, 
cctx);
 else
 return (CacheQueryFuture)(loc ? qryMgr.queryLocal(bean) : 
qryMgr.queryDistributed(bean, nodes));
 }
@@ -557,8 +557,11 @@ public class GridCacheQueryAdapter implements 
CacheQuery {
 /** Backups. */
 private volatile Queue nodes;
 
-/** Backups that failed with {@link 
GridDhtUnreservedPartitionException}. */
-private volatile Collection unreservedNodes;
+/** Topology version of the last detected {@link 
GridDhtUnreservedPartitionException}. */
+private volatile AffinityTopolo

incubator-ignite git commit: IGNITE-843 Improve agent build and documentation.

2015-08-14 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 a03d6876b -> a1a44c88f


IGNITE-843 Improve agent build and documentation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a1a44c88
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a1a44c88
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a1a44c88

Branch: refs/heads/ignite-843
Commit: a1a44c88f5c6e77b387b15c1c0b40f54e7278c23
Parents: a03d687
Author: AKuznetsov 
Authored: Fri Aug 14 16:54:29 2015 +0700
Committer: AKuznetsov 
Committed: Fri Aug 14 16:54:29 2015 +0700

--
 modules/control-center-agent/README.txt | 55 
 .../jdbc-drivers/README.txt |  9 
 .../control-center-agent/src/assembly/build.xml |  1 +
 .../apache/ignite/agent/AgentConfiguration.java | 18 ---
 .../org/apache/ignite/agent/AgentLauncher.java  |  2 +-
 .../handlers/DatabaseMetadataExtractor.java |  2 +-
 6 files changed, 68 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1a44c88/modules/control-center-agent/README.txt
--
diff --git a/modules/control-center-agent/README.txt 
b/modules/control-center-agent/README.txt
index 0ee9d76..410b366 100644
--- a/modules/control-center-agent/README.txt
+++ b/modules/control-center-agent/README.txt
@@ -5,22 +5,55 @@ Control Center Agent communicates with grid nodes via REST 
interface and connect
 
 Two main functions of Control Center Agent:
  1. Proxy between Ignite Web Control Center and Ignite Grid to execute SQL 
statements and collect metrics for monitoring.
+You may need to specify URI for connect to Ignite REST server via "-n" 
option.
+
  2. Proxy between Ignite Web Control Center and user RDBMS to collect database 
metadata for later CacheTypeMetadata configuration.
+You may need to copy JDBC driver into "./jdbc-drivers" subfolder or 
specify path via "-drv" option.
 
+Usage example:
+agent.sh -l john.sm...@gmail.com -p qwerty -s 
wss://control-center.example.com
 
-Usage example
-==
+Configuration file:
+Should be a file with simple line-oriented format as described here: 
http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#load(java.io.Reader)
+
+Available entries names:
+login
+password
+serverURI
+nodeURI
+driverFolder
+
+Example configuration file:
+login=john.sm...@gmail.com
+serverURI=wss://control-center.example.com
+
+Options:
+-h, --help
+   Print this help message.
+
+-c, --config
+   Path to optional configuration file.
 
-agent.sh -l john.sm...@gmail.com -p qwerty -s wss://control-center.gridgain.com
+-drv, --driverFolder
+   Path to folder with JDBC drivers, for example "/home/user/drivers".
+   Default: "./jdbc-drivers".
+
+-l, --login
+   User's login (email) on Web Control Center.
+
+-n, --nodeUri
+   URI for connect to Ignite REST server, for example: 
"http://localhost:8080";.
+   Default: "http://localhost:8080";.
+
+-p, --password
+   User's password.
+
+-s, --serverUri
+   URI for connect to Ignite Web Control Center, for example: 
"wss://control-center.example.com".
+   Default: "wss://localhost:3001".
 
-Main command line arguments:
--l User's login (email) on web-control-center
--p User's password
--s Link to Ignite Control Center web-socket server.
--n Ignite REST server
--c Configure agent using configuration file. Configuration file is a 
properties file,
-   see /control-center-agent/src/main/resources/config.properties as 
example.
 
 Ignite Control Center Agent Build Instructions
-==
+==
+If you want to build from sources run following command in Ignite project root 
folder:
 mvn clean package -pl :ignite-control-center-agent -am -P control-center 
-DskipTests=true

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1a44c88/modules/control-center-agent/jdbc-drivers/README.txt
--
diff --git a/modules/control-center-agent/jdbc-drivers/README.txt 
b/modules/control-center-agent/jdbc-drivers/README.txt
new file mode 100644
index 000..5148c9d
--- /dev/null
+++ b/modules/control-center-agent/jdbc-drivers/README.txt
@@ -0,0 +1,9 @@
+Ignite Control Center Agent
+==
+
+This is default folder for JDBC drivers.
+You could specify custom folder using option: -drv 
CUSTOM_PATH_TO_FOLDER_WITH_JDBC_DRIVERS
+
+Copy JDBC drivers for your databases in this 

[04/23] incubator-ignite git commit: ignite-946: improving tests

2015-08-14 Thread ntikhonov
ignite-946: improving tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4b9f4bad
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4b9f4bad
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4b9f4bad

Branch: refs/heads/master
Commit: 4b9f4bad4191c357418996abc88748208461f18a
Parents: 325d06d
Author: Denis Magda 
Authored: Fri Jul 31 10:19:46 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:11 2015 +0300

--
 .../cache/query/GridCacheQueryManager.java  |  1 +
 .../CacheVersionedEntryAbstractTest.java| 24 ++-
 .../CacheVersionedEntryLocalAtomicSelfTest.java | 40 -
 ...nedEntryLocalAtomicSwapDisabledSelfTest.java | 45 
 .../testsuites/IgniteCacheTestSuite4.java   |  2 +-
 5 files changed, 60 insertions(+), 52 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b9f4bad/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index 5d3f6a3..400d997 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@ -845,6 +845,7 @@ public abstract class GridCacheQueryManager extends 
GridCacheManagerAdapte
 
 try {
 val = prj.localPeek(key, 
CachePeekModes.ONHEAP_ONLY, expiryPlc);
+
 }
 catch (IgniteCheckedException e) {
 if (log.isDebugEnabled())

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b9f4bad/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
index 951d05a..4cfacb7 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
@@ -55,23 +55,25 @@ public abstract class CacheVersionedEntryAbstractTest 
extends GridCacheAbstractS
 public void testInvoke() throws Exception {
 Cache cache = grid(0).cache(null);
 
-final AtomicBoolean invoked = new AtomicBoolean(false);
+final AtomicInteger invoked = new AtomicInteger();
 
-cache.invoke(100, new EntryProcessor() {
-@Override public Object process(MutableEntry 
entry, Object... arguments)
-throws EntryProcessorException {
+for (int i = 0; i < ENTRIES_NUM; i++) {
+cache.invoke(i, new EntryProcessor() {
+@Override public Object process(MutableEntry 
entry, Object... arguments)
+throws EntryProcessorException {
 
-invoked.set(true);
+invoked.incrementAndGet();
 
-VersionedEntry verEntry = 
entry.unwrap(VersionedEntry.class);
+VersionedEntry verEntry = 
entry.unwrap(VersionedEntry.class);
 
-checkVersionedEntry(verEntry);
+checkVersionedEntry(verEntry);
 
-return entry;
-}
-});
+return entry;
+}
+});
+}
 
-assertTrue(invoked.get());
+assert invoked.get() > 0;
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b9f4bad/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalAtomicSelfTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalAtomicSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalAtomicSelfTest.java
deleted file mode 100644
index a340413..000
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalAtomicSelfT

[10/23] incubator-ignite git commit: Merge branches 'ignite-946' and 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-946

2015-08-14 Thread ntikhonov
Merge branches 'ignite-946' and 'master' of 
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-946


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b2e6734c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b2e6734c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b2e6734c

Branch: refs/heads/master
Commit: b2e6734c76f17247a2801e63547e5edcc33f770c
Parents: 2e7799d b056a73
Author: Yakov Zhdanov 
Authored: Tue Aug 4 16:34:17 2015 +0300
Committer: Yakov Zhdanov 
Committed: Tue Aug 4 16:34:17 2015 +0300

--
 .../ClientAbstractMultiNodeSelfTest.java|   4 +-
 .../JettyRestProcessorAbstractSelfTest.java |  14 +-
 .../apache/ignite/IgniteSystemProperties.java   |   2 +-
 .../store/jdbc/CacheAbstractJdbcStore.java  |  21 +-
 .../apache/ignite/internal/IgniteKernal.java|   2 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |  43 +-
 .../managers/communication/GridIoManager.java   | 188 +++-
 .../processors/cache/GridCacheMvccManager.java  |  73 +--
 .../processors/cache/GridCacheProcessor.java|   2 +-
 .../processors/cache/GridCacheProxyImpl.java|  42 +-
 .../processors/cache/GridCacheSwapManager.java  |   2 +-
 .../GridDhtPartitionsExchangeFuture.java|  20 +-
 .../distributed/near/GridNearGetFuture.java |  20 +-
 .../handlers/query/QueryCommandHandler.java |   6 +-
 .../ignite/internal/util/IgniteUtils.java   |  16 +
 .../util/nio/GridCommunicationClient.java   |   5 +-
 .../util/nio/GridNioFinishedFuture.java |  12 +
 .../ignite/internal/util/nio/GridNioFuture.java |  14 +
 .../internal/util/nio/GridNioFutureImpl.java|  15 +
 .../util/nio/GridNioRecoveryDescriptor.java |  13 +-
 .../ignite/internal/util/nio/GridNioServer.java |   5 +
 .../util/nio/GridNioSessionMetaKey.java |   5 +-
 .../util/nio/GridShmemCommunicationClient.java  |   7 +-
 .../util/nio/GridTcpNioCommunicationClient.java |  14 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  84 +++-
 .../ignite/spi/discovery/tcp/ClientImpl.java|   2 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java|  45 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java  |   2 +-
 .../src/test/config/io-manager-benchmark.xml|   3 +-
 .../GridJobMasterLeaveAwareSelfTest.java|  10 +-
 .../IgniteClientReconnectAbstractTest.java  |   5 +-
 .../IgniteClientReconnectCacheTest.java |   5 +-
 .../GridDeploymentMessageCountSelfTest.java |   5 +-
 .../cache/CacheStopAndDestroySelfTest.java  |   8 +-
 .../GridCacheAtomicMessageCountSelfTest.java|   6 +-
 .../processors/cache/GridCacheMvccSelfTest.java |   1 -
 ...ridCacheReplicatedSynchronousCommitTest.java |   5 +-
 .../IgniteCacheAbstractStopBusySelfTest.java|   6 +-
 .../cache/IgniteCacheNearLockValueSelfTest.java |   6 +-
 ...eDynamicCacheStartNoExchangeTimeoutTest.java |   4 +-
 .../cache/IgniteTxReentryAbstractSelfTest.java  |   5 +-
 ...niteCacheClientNodeChangingTopologyTest.java |   6 +-
 ...teCacheClientNodePartitionsExchangeTest.java |   4 +-
 .../IgniteCacheNearOffheapGetSelfTest.java  | 131 ++
 ...xOriginatingNodeFailureAbstractSelfTest.java |   6 +-
 ...cOriginatingNodeFailureAbstractSelfTest.java |   6 +-
 .../GridCacheDhtPreloadMessageCountTest.java|   5 +-
 ...ePrimaryNodeFailureRecoveryAbstractTest.java |   6 +-
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   5 +-
 .../near/IgniteCacheNearTxRollbackTest.java |   6 +-
 .../GridCacheReplicatedInvalidateSelfTest.java  |   6 +-
 ...CommunicationRecoveryAckClosureSelfTest.java | 464 +++
 .../tcp/TcpDiscoveryMultiThreadedTest.java  |   8 +-
 .../testsuites/IgniteCacheTestSuite2.java   |   1 +
 .../IgniteSpiCommunicationSelfTestSuite.java|   1 +
 .../ignite/util/TestTcpCommunicationSpi.java|   6 +-
 ...CacheScanPartitionQueryFallbackSelfTest.java |  15 +-
 .../http/jetty/GridJettyRestHandler.java|  12 +-
 .../parser/dialect/OracleMetadataDialect.java   |   4 +-
 .../src/test/java/config/ignite-test-config.xml |  43 ++
 .../ignite/internal/GridFactorySelfTest.java|   9 +
 .../visor/commands/kill/VisorKillCommand.scala  |   2 +-
 62 files changed, 1241 insertions(+), 252 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b2e6734c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
--



[21/23] incubator-ignite git commit: ignite-946: renamed VersionedEntry to CacheEntry

2015-08-14 Thread ntikhonov
ignite-946: renamed VersionedEntry to CacheEntry


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4f8f32af
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4f8f32af
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4f8f32af

Branch: refs/heads/master
Commit: 4f8f32af80d2c13df3fd8d3c5b302c0fd04906c5
Parents: 954c459
Author: Denis Magda 
Authored: Thu Aug 13 09:10:45 2015 +0300
Committer: Denis Magda 
Committed: Thu Aug 13 09:10:45 2015 +0300

--
 .../org/apache/ignite/cache/CacheEntry.java | 94 
 .../ignite/cache/version/VersionedEntry.java| 92 ---
 .../ignite/cache/version/package-info.java  | 21 -
 .../processors/cache/CacheEntryImpl.java|  6 +-
 .../processors/cache/CacheEntryImpl0.java   |  6 +-
 .../processors/cache/CacheEntryImplEx.java  | 83 +
 .../processors/cache/CacheInvokeEntry.java  |  6 +-
 .../processors/cache/GridCacheEntryEx.java  |  2 +-
 .../processors/cache/GridCacheMapEntry.java | 12 +--
 .../cache/version/CacheVersionedEntryImpl.java  | 83 -
 .../resources/META-INF/classnames.properties|  3 +-
 .../processors/cache/GridCacheTestEntryEx.java  |  2 +-
 .../CacheVersionedEntryAbstractTest.java| 27 +++---
 13 files changed, 209 insertions(+), 228 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4f8f32af/modules/core/src/main/java/org/apache/ignite/cache/CacheEntry.java
--
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheEntry.java 
b/modules/core/src/main/java/org/apache/ignite/cache/CacheEntry.java
new file mode 100644
index 000..a6a2aa3
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheEntry.java
@@ -0,0 +1,94 @@
+/*
+ * 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.cache;
+
+import org.apache.ignite.*;
+
+import javax.cache.*;
+import javax.cache.processor.*;
+import java.util.*;
+
+/**
+ * Cache entry that extends {@link javax.cache.Cache.Entry} by providing 
additional entry related information.
+ *
+ * To get an instance of {@code CacheEntry} use {@link 
javax.cache.Cache.Entry#unwrap(Class)} method by passing
+ * {@code CacheEntry} class to it as the argument.
+ * 
+ * {@code CacheEntry} is supported only for {@link javax.cache.Cache.Entry} 
returned by one of the following methods:
+ * 
+ * {@link javax.cache.Cache#invoke(Object, EntryProcessor, Object...)}
+ * {@link javax.cache.Cache#invokeAll(Set, EntryProcessor, Object...)}
+ * invoke and invokeAll methods of {@link IgniteCache}
+ * {@link IgniteCache#randomEntry()}
+ * 
+ * 
+ * {@code CacheEntry} is not supported for {@link 
javax.cache.Cache#iterator()} because of performance reasons.
+ * {@link javax.cache.Cache#iterator()} loads entries from all the cluster 
nodes and to speed up the load additional
+ * information, like entry's version, is ignored.
+ *
+ * Java Example
+ * 
+ * IgniteCache cache = grid(0).cache(null);
+ *
+ * CacheEntry entry1 = cache.invoke(100,
+ * new EntryProcessor>() {
+ *  public CacheEntry process(MutableEntry entry,
+ *  Object... arguments) throws EntryProcessorException {
+ *  return entry.unwrap(CacheEntry.class);
+ *  }
+ * });
+ *
+ * // Cache entry for the given key may be updated at some point later.
+ *
+ * CacheEntry entry2 = cache.invoke(100,
+ * new EntryProcessor>() {
+ *  public CacheEntry process(MutableEntry entry,
+ *  Object... arguments) throws EntryProcessorException {
+ *  return entry.unwrap(CacheEntry.class);
+ *  }
+ * });
+ *
+ * // Comparing entries' versions.
+ * if (entry1.version().compareTo(entry2.version()) < 0) {
+ * // the entry has been updated
+ * }
+ * 
+ */
+public interface CacheEntry extends Cache.Entry {
+/**
+ * Returns a comparable object 

[18/23] incubator-ignite git commit: ignite-946: simplified VersionedEntry interface

2015-08-14 Thread ntikhonov
ignite-946: simplified VersionedEntry interface


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b6bef13e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b6bef13e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b6bef13e

Branch: refs/heads/master
Commit: b6bef13eef82d9a2e040c01881d07c186ade372e
Parents: dd3cecf
Author: Denis Magda 
Authored: Tue Aug 11 10:17:24 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 11 10:17:24 2015 +0300

--
 .../ignite/cache/version/VersionedEntry.java| 83 +---
 .../cache/version/CacheVersionedEntryImpl.java  | 23 +-
 .../cache/version/GridCacheVersionManager.java  |  4 +-
 .../CacheVersionedEntryAbstractTest.java|  9 +--
 4 files changed, 45 insertions(+), 74 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b6bef13e/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
index 1aac68a..135d681 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
@@ -24,7 +24,7 @@ import javax.cache.processor.*;
 import java.util.*;
 
 /**
- * Cache entry that stores entry's version related information.
+ * Cache entry that stores entry's version related information along with its 
data.
  *
  * To get a {@code VersionedEntry} of an {@link Cache.Entry} use {@link 
Cache.Entry#unwrap(Class)} by passing
  * {@code VersionedEntry} class to it as the argument.
@@ -42,62 +42,51 @@ import java.util.*;
  * is excluded from responses.
  * Java Example
  * 
- * Cache cache = grid(0).cache(null);
+ * IgniteCache cache = grid(0).cache(null);
  *
- *  cache.invoke(100, new EntryProcessor() {
- *  public Object process(MutableEntry entry, Object... 
arguments) throws EntryProcessorException {
- *  VersionedEntry verEntry = 
entry.unwrap(VersionedEntry.class);
- *  return entry;
- *   }
- *   });
+ * VersionedEntry entry1 = cache.invoke(100,
+ * new EntryProcessor>() {
+ *  public VersionedEntry 
process(MutableEntry entry,
+ *  Object... arguments) throws EntryProcessorException {
+ *  return entry.unwrap(VersionedEntry.class);
+ *  }
+ * });
+ *
+ * // Cache entry for the given key may be updated at some point later.
+ *
+ * VersionedEntry entry2 = cache.invoke(100,
+ * new EntryProcessor>() {
+ *  public VersionedEntry 
process(MutableEntry entry,
+ *  Object... arguments) throws EntryProcessorException {
+ *  return entry.unwrap(VersionedEntry.class);
+ *  }
+ * });
+ *
+ * if (entry1.version().compareTo(entry2.version()) < 0) {
+ * // the entry has been updated
+ * }
  * 
  */
 public interface VersionedEntry extends Cache.Entry {
 /**
- * Versions comparator.
- */
-public static final Comparator VER_COMP = new 
Comparator() {
-@Override public int compare(VersionedEntry o1, VersionedEntry o2) {
-int res = Integer.compare(o1.topologyVersion(), 
o2.topologyVersion());
-
-if (res != 0)
-return res;
-
-res = Long.compare(o1.order(), o2.order());
-
-if (res != 0)
-return res;
-
-return Integer.compare(o1.nodeOrder(), o2.nodeOrder());
-}
-};
-
-/**
- * Gets the topology version at the time when the entry with a given pair 
of key and value has been created.
- *
- * @return Topology version plus number of seconds from the start time of 
the first grid node.
- */
-public int topologyVersion();
-
-/**
- * Gets versioned entry unique order.
- * Each time a cache entry for a given key is updated a new {@code 
VersionedEntry} with increased order is created.
- *
- * @return Versioned entry unique order.
- */
-public long order();
-
-/**
- * Gets local node order at the time when the entry with a given pair of 
key and value has been created.
+ * Returns a comparable object representing the version of this cache 
entry.
+ * 
+ * It is valid to compare cache entries' versions for the same key. In 
this case the latter update will be
+ * represented by a higher version. The result of versions comparison of 
cache entries of different keys is
+ * undefined.
  *
- * @return Local node order on which this version has been assigned.
+ * @return Version of thi

[19/23] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-946

2015-08-14 Thread ntikhonov
Merge remote-tracking branch 'remotes/origin/master' into ignite-946


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/801d6df1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/801d6df1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/801d6df1

Branch: refs/heads/master
Commit: 801d6df1acd2615c1a85e9e3829983011b5fd0a3
Parents: b6bef13 ae11e9b
Author: Denis Magda 
Authored: Tue Aug 11 10:19:21 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 11 10:19:21 2015 +0300

--
 .../configuration/IgniteConfiguration.java  |  1 -
 .../GridCachePartitionExchangeManager.java  | 48 +++
 .../dht/atomic/GridDhtAtomicCache.java  | 36 +---
 .../cache/CacheStopAndDestroySelfTest.java  | 87 
 4 files changed, 56 insertions(+), 116 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/801d6df1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
--



[01/23] incubator-ignite git commit: ignite-946: added tests

2015-08-14 Thread ntikhonov
Repository: incubator-ignite
Updated Branches:
  refs/heads/master 8ecddcc2d -> 776084772


ignite-946: added tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/325d06d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/325d06d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/325d06d3

Branch: refs/heads/master
Commit: 325d06d3127e73554cfcf40a549d2ae9343dca50
Parents: 01c0246
Author: Denis Magda 
Authored: Thu Jul 30 16:03:18 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:10 2015 +0300

--
 .../cache/version/CacheVersionedEntryImpl.java  |   2 -
 .../CacheVersionedEntryAbstractTest.java| 184 +++
 .../CacheVersionedEntryLocalAtomicSelfTest.java |  40 
 ...ersionedEntryLocalTransactionalSelfTest.java |  40 
 ...edEntryPartitionedAtomicOffHeapSelfTest.java |  35 
 ...VersionedEntryPartitionedAtomicSelfTest.java |  35 
 ...PartitionedTransactionalOffHeapSelfTest.java |  36 
 ...edEntryPartitionedTransactionalSelfTest.java |  35 
 ...nedEntryReplicatedAtomicOffHeapSelfTest.java |  35 
 ...eVersionedEntryReplicatedAtomicSelfTest.java |  35 
 ...yReplicatedTransactionalOffHeapSelfTest.java |  36 
 ...nedEntryReplicatedTransactionalSelfTest.java |  35 
 .../testsuites/IgniteCacheTestSuite4.java   |  13 ++
 13 files changed, 559 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/325d06d3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
index 6d1e0c9..924eff9 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
@@ -48,8 +48,6 @@ public class CacheVersionedEntryImpl extends 
CacheEntryImpl implemen
 public CacheVersionedEntryImpl(K key, V val, GridCacheVersion ver) {
 super(key, val);
 
-assert val == null;
-
 this.ver = ver;
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/325d06d3/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
new file mode 100644
index 000..951d05a
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
@@ -0,0 +1,184 @@
+/*
+ * 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.version;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.version.*;
+import org.apache.ignite.internal.processors.cache.*;
+
+import javax.cache.*;
+import javax.cache.processor.*;
+import java.util.*;
+import java.util.concurrent.atomic.*;
+
+/**
+ * Versioned entry abstract test.
+ */
+public abstract class CacheVersionedEntryAbstractTest extends 
GridCacheAbstractSelfTest {
+/** Entries number to store in a cache. */
+private static final int ENTRIES_NUM = 1000;
+
+/** {@inheritDoc} */
+@Override protected int gridCount() {
+return 2;
+}
+
+/** {@inheritDoc} */
+@Override protected void beforeTest() throws Exception {
+super.beforeTest();
+
+Cache cache = grid(0).cache(nul

[08/23] incubator-ignite git commit: ignite-946: formatting fixes

2015-08-14 Thread ntikhonov
ignite-946: formatting fixes


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/26144dc4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/26144dc4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/26144dc4

Branch: refs/heads/master
Commit: 26144dc4f845af7533cc645d898202b80c0a29f6
Parents: 4928d99
Author: Denis Magda 
Authored: Fri Jul 31 12:18:58 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:13 2015 +0300

--
 .../processors/cache/GridCacheMapEntry.java | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/26144dc4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 45ff619..ebcb908 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -609,16 +609,16 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
 @Nullable IgniteCacheExpiryPolicy expirePlc)
 throws IgniteCheckedException, GridCacheEntryRemovedException {
 return innerGet0(tx,
- readSwap,
- readThrough,
- evt,
- unmarshal,
- updateMetrics,
- tmp,
- subjId,
- transformClo,
- taskName,
- expirePlc);
+readSwap,
+readThrough,
+evt,
+unmarshal,
+updateMetrics,
+tmp,
+subjId,
+transformClo,
+taskName,
+expirePlc);
 }
 
 /** {@inheritDoc} */



[23/23] incubator-ignite git commit: Merge branch 'ignite-946'

2015-08-14 Thread ntikhonov
Merge branch 'ignite-946'


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/77608477
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/77608477
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/77608477

Branch: refs/heads/master
Commit: 776084772c06f6149d09726b2f6c3c7a08cef7bc
Parents: 8ecddcc 51a9bd8
Author: nikolay_tikhonov 
Authored: Fri Aug 14 12:54:34 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Aug 14 12:54:34 2015 +0300

--
 .../org/apache/ignite/cache/CacheEntry.java |  94 ++
 .../processors/cache/CacheEntryImpl.java|  20 +++
 .../processors/cache/CacheEntryImpl0.java   |   5 +
 .../processors/cache/CacheEntryImplEx.java  |  83 +
 .../processors/cache/CacheInvokeEntry.java  |  27 ++-
 .../cache/CacheVersionedEntryImpl.java  |  80 -
 .../processors/cache/GridCacheAdapter.java  |  13 +-
 .../processors/cache/GridCacheEntryEx.java  |   2 +-
 .../processors/cache/GridCacheMapEntry.java |  28 ++-
 .../processors/cache/GridCacheSwapManager.java  |  82 +
 .../distributed/dht/GridDhtTxPrepareFuture.java |   2 +-
 .../dht/atomic/GridDhtAtomicCache.java  |   3 +-
 .../local/atomic/GridLocalAtomicCache.java  |   3 +-
 .../cache/transactions/IgniteTxAdapter.java |  16 +-
 .../cache/transactions/IgniteTxEntry.java   |  16 +-
 .../transactions/IgniteTxLocalAdapter.java  |  83 +++--
 .../cache/version/GridCacheVersion.java |   2 +-
 .../cache/version/GridCacheVersionAware.java|  30 
 .../cache/version/GridCacheVersionManager.java  |   5 +-
 .../clock/GridClockSyncProcessor.java   |   2 +-
 .../resources/META-INF/classnames.properties|   3 +-
 .../processors/cache/GridCacheTestEntryEx.java  |   2 +-
 .../CacheVersionedEntryAbstractTest.java| 170 +++
 ...nedEntryLocalAtomicSwapDisabledSelfTest.java |  45 +
 ...ersionedEntryLocalTransactionalSelfTest.java |  40 +
 ...edEntryPartitionedAtomicOffHeapSelfTest.java |  35 
 ...VersionedEntryPartitionedAtomicSelfTest.java |  35 
 ...PartitionedTransactionalOffHeapSelfTest.java |  36 
 ...edEntryPartitionedTransactionalSelfTest.java |  35 
 ...nedEntryReplicatedAtomicOffHeapSelfTest.java |  35 
 ...eVersionedEntryReplicatedAtomicSelfTest.java |  35 
 ...yReplicatedTransactionalOffHeapSelfTest.java |  36 
 ...nedEntryReplicatedTransactionalSelfTest.java |  35 
 .../testsuites/IgniteCacheTestSuite4.java   |  13 ++
 34 files changed, 1005 insertions(+), 146 deletions(-)
--




Git Push Summary

2015-08-14 Thread ntikhonov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-946 [deleted] 51a9bd85e


[15/23] incubator-ignite git commit: ignite-946: fixed review notes

2015-08-14 Thread ntikhonov
ignite-946: 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/911ffbb5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/911ffbb5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/911ffbb5

Branch: refs/heads/master
Commit: 911ffbb5de261d662a915677b99cae4a160407eb
Parents: 9f16eb1
Author: Denis Magda 
Authored: Mon Aug 10 11:39:44 2015 +0300
Committer: Denis Magda 
Committed: Mon Aug 10 11:39:44 2015 +0300

--
 .../ignite/cache/version/VersionedEntry.java|  2 +-
 .../processors/cache/CacheEntryImpl0.java   |  4 +-
 .../processors/cache/GridCacheMapEntry.java |  2 +-
 .../processors/cache/GridCacheSwapManager.java  | 88 
 .../cache/transactions/IgniteTxAdapter.java |  2 +
 .../cache/transactions/IgniteTxEntry.java   |  2 +-
 .../transactions/IgniteTxLocalAdapter.java  |  8 ++
 .../cache/version/GridCacheVersionAware.java| 30 +++
 .../cache/version/GridVersionedMapEntry.java| 33 
 .../CacheVersionedEntryAbstractTest.java|  2 +-
 10 files changed, 99 insertions(+), 74 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/911ffbb5/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
index e669f15..2c0879b 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
@@ -56,7 +56,7 @@ public interface VersionedEntry extends Cache.Entry {
 /**
  * Versions comparator.
  */
-public static final Comparator VERSIONS_COMPARATOR = new 
Comparator() {
+public static final Comparator VER_COMP = new 
Comparator() {
 @Override public int compare(VersionedEntry o1, VersionedEntry o2) {
 int res = Integer.compare(o1.topologyVersion(), 
o2.topologyVersion());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/911ffbb5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
index a5e27d6..987fbd3 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
@@ -52,8 +52,8 @@ public class CacheEntryImpl0 implements Cache.Entry {
 @Override public  T unwrap(Class cls) {
 if(cls.isAssignableFrom(getClass()))
 return cls.cast(this);
-else if (cls.isAssignableFrom(VersionedEntry.class) && e instanceof 
GridVersionedMapEntry)
-return (T)new CacheVersionedEntryImpl<>(e.getKey(), e.getValue(), 
((GridVersionedMapEntry)e).version());
+else if (cls.isAssignableFrom(VersionedEntry.class) && e instanceof 
GridCacheVersionAware)
+return (T)new CacheVersionedEntryImpl<>(e.getKey(), e.getValue(), 
((GridCacheVersionAware)e).version());
 
 throw new IllegalArgumentException("Unwrapping to class is not 
supported: " + cls);
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/911ffbb5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 43cf2fe..298f7a6 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -1385,7 +1385,7 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
 
 assert entryProcessor != null;
 
-CacheInvokeEntry entry = new 
CacheInvokeEntry<>(cctx, key, old, this.ver);
+CacheInvokeEntry entry = new 
CacheInvokeEntry<>(cctx, key, old, version());
 
 try {
 Object computed = entryProcessor.process(entry, 
invokeArgs);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/911ffbb5/modules/core/src/m

[07/23] incubator-ignite git commit: IGNITE-946 Added test to Suite.

2015-08-14 Thread ntikhonov
IGNITE-946 Added test to Suite.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f0fe0769
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f0fe0769
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f0fe0769

Branch: refs/heads/master
Commit: f0fe0769751b7957a64fc5dd56989e54f1223ab1
Parents: 26144dc
Author: nikolay_tikhonov 
Authored: Fri Jul 31 13:00:09 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:13 2015 +0300

--
 .../java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f0fe0769/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 3ac7879..228be92 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
@@ -164,7 +164,7 @@ public class IgniteCacheTestSuite4 extends TestSuite {
 suite.addTestSuite(CacheVersionedEntryReplicatedAtomicSelfTest.class);
 
suite.addTestSuite(CacheVersionedEntryReplicatedTransactionalSelfTest.class);
 
suite.addTestSuite(CacheVersionedEntryReplicatedAtomicOffHeapSelfTest.class);
-
suite.addTestSuite(CacheVersionedEntryPartitionedTransactionalOffHeapSelfTest.class);
+
suite.addTestSuite(CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest.class);
 
 return suite;
 }



[11/23] incubator-ignite git commit: review

2015-08-14 Thread ntikhonov
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/fe2be79c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/fe2be79c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/fe2be79c

Branch: refs/heads/master
Commit: fe2be79c8e4eccf8f823abeb32521f0fca8ddf42
Parents: b2e6734
Author: Yakov Zhdanov 
Authored: Tue Aug 4 17:49:48 2015 +0300
Committer: Yakov Zhdanov 
Committed: Tue Aug 4 17:49:48 2015 +0300

--
 .../ignite/cache/version/package-info.java  |  4 ++--
 .../processors/cache/CacheInvokeEntry.java  |  5 +++--
 .../cache/transactions/IgniteTxEntry.java   |  4 +++-
 .../transactions/IgniteTxLocalAdapter.java  | 20 ++--
 4 files changed, 18 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe2be79c/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java 
b/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
index 9aeaba2..50ceb13 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
@@ -16,6 +16,6 @@
  */
 
 /**
- * Contains cache version based implementations.
+ * Contains cache versioned entry interface.
  */
-package org.apache.ignite.cache.version;
\ No newline at end of file
+package org.apache.ignite.cache.version;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe2be79c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
index 2d8f738..515a4c5 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
@@ -49,14 +49,15 @@ public class CacheInvokeEntry extends 
CacheLazyEntry implements Muta
 public CacheInvokeEntry(GridCacheContext cctx,
 KeyCacheObject keyObj,
 @Nullable CacheObject valObj,
-GridCacheVersion ver) {
+GridCacheVersion ver
+) {
 super(cctx, keyObj, valObj);
 
 this.hadVal = valObj != null;
 this.ver = ver;
 }
 
-/** 
+/**
  * @param ctx Cache context.
  * @param keyObj Key cache object.
  * @param key Key value.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe2be79c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
index ed57bf2..73b9975 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
@@ -577,6 +577,8 @@ public class IgniteTxEntry implements GridPeerDeployAware, 
Message {
 ver = entry.version();
 }
 catch (GridCacheEntryRemovedException e) {
+assert tx.optimistic() : tx;
+
 ver = null;
 }
 
@@ -924,7 +926,7 @@ public class IgniteTxEntry implements GridPeerDeployAware, 
Message {
 return false;
 
 reader.incrementState();
-
+
 case 6:
 flags = reader.readByte("flags");
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe2be79c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 7f171c2..e03f34d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalA

[09/23] incubator-ignite git commit: ignite-946: fixing version retrieval for transactions

2015-08-14 Thread ntikhonov
ignite-946: fixing version retrieval for transactions


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2e7799d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2e7799d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2e7799d4

Branch: refs/heads/master
Commit: 2e7799d446653bba379cc231628ba2b02c993e5e
Parents: f0fe076
Author: Denis Magda 
Authored: Fri Jul 31 15:32:45 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:14 2015 +0300

--
 .../processors/cache/CacheInvokeEntry.java  |  2 +-
 .../processors/cache/GridCacheMapEntry.java |  4 +-
 .../cache/transactions/IgniteTxAdapter.java | 14 ++-
 .../cache/transactions/IgniteTxEntry.java   | 11 ++-
 .../transactions/IgniteTxLocalAdapter.java  | 90 
 5 files changed, 98 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2e7799d4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
index e6f8d4e..2d8f738 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
@@ -121,7 +121,7 @@ public class CacheInvokeEntry extends 
CacheLazyEntry implements Muta
 /** {@inheritDoc} */
 @SuppressWarnings("unchecked")
 @Override public  T unwrap(Class cls) {
-if (cls.isAssignableFrom(VersionedEntry.class))
+if (cls.isAssignableFrom(VersionedEntry.class) && ver != null)
 return (T)new CacheVersionedEntryImpl<>(getKey(), getValue(), ver);
 
 return super.unwrap(cls);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2e7799d4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index ebcb908..43cf2fe 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -1653,7 +1653,7 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
 
 oldVal = rawGetOrUnmarshalUnlocked(true);
 
-CacheInvokeEntry entry = new 
CacheInvokeEntry(cctx, key, oldVal, this.ver);
+CacheInvokeEntry entry = new 
CacheInvokeEntry(cctx, key, oldVal, version());
 
 try {
 Object computed = entryProcessor.process(entry, 
invokeArgs);
@@ -1878,7 +1878,7 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
 
 EntryProcessor entryProcessor = 
(EntryProcessor)writeObj;
 
-CacheInvokeEntry entry = new 
CacheInvokeEntry(cctx, key, oldVal, this.ver);
+CacheInvokeEntry entry = new 
CacheInvokeEntry(cctx, key, oldVal, version());
 
 try {
 Object computed = entryProcessor.process(entry, 
invokeArgs);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2e7799d4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
index 0d14012..797f75e 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
@@ -1228,9 +1228,21 @@ public abstract class IgniteTxAdapter extends 
GridMetadataAwareAdapter
 
 Object key = null;
 
+GridCacheVersion ver;
+
+try {
+ver = txEntry.cached().version();
+}
+catch (GridCacheEntryRemovedException e) {
+if (log.isDebugEnabled())
+log.debu

[05/23] incubator-ignite git commit: ignite-946: added documentation

2015-08-14 Thread ntikhonov
ignite-946: added documentation


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4928d99d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4928d99d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4928d99d

Branch: refs/heads/master
Commit: 4928d99d80a837843ce733eab546a3ea6aa3c2d3
Parents: 2d200a3
Author: Denis Magda 
Authored: Fri Jul 31 12:14:54 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:12 2015 +0300

--
 .../ignite/cache/version/VersionedEntry.java| 31 +++-
 1 file changed, 30 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4928d99d/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
index 6f9d8f6..e669f15 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
@@ -17,11 +17,40 @@
 
 package org.apache.ignite.cache.version;
 
+import org.apache.ignite.*;
+
 import javax.cache.*;
+import javax.cache.processor.*;
 import java.util.*;
 
 /**
- * Cache entry along with version information.
+ * Cache entry that stores entry's version related information.
+ *
+ * To get a {@code VersionedEntry} of an {@link Cache.Entry} use {@link 
Cache.Entry#unwrap(Class)} by passing
+ * {@code VersionedEntry} class to it as the argument.
+ * 
+ * {@code VersionedEntry} is supported only for {@link Cache.Entry} returned 
by one of the following methods:
+ * 
+ * {@link Cache#invoke(Object, EntryProcessor, Object...)}
+ * {@link Cache#invokeAll(Set, EntryProcessor, Object...)}
+ * invoke and invokeAll methods of {@link IgniteCache}
+ * {@link IgniteCache#randomEntry()}
+ * 
+ * 
+ * {@code VersionedEntry} is not supported for {@link Cache#iterator()} 
because of performance reasons.
+ * {@link Cache#iterator()} loads entries from all the cluster nodes and to 
speed up the load version information
+ * is excluded from responses.
+ * Java Example
+ * 
+ * Cache cache = grid(0).cache(null);
+ *
+ *  cache.invoke(100, new EntryProcessor() {
+ *  public Object process(MutableEntry entry, Object... 
arguments) throws EntryProcessorException {
+ *  VersionedEntry verEntry = 
entry.unwrap(VersionedEntry.class);
+ *  return entry;
+ *   }
+ *   });
+ * 
  */
 public interface VersionedEntry extends Cache.Entry {
 /**



[06/23] incubator-ignite git commit: ignite-946: supported VersionedEntry for IgniteCache.localEntries() when OFF_HEAP mode is used

2015-08-14 Thread ntikhonov
ignite-946: supported VersionedEntry for IgniteCache.localEntries() when 
OFF_HEAP mode is used


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2d200a31
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2d200a31
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2d200a31

Branch: refs/heads/master
Commit: 2d200a31b9903a165c9d70ec84b687e7bcc55c44
Parents: 719161f
Author: Denis Magda 
Authored: Fri Jul 31 11:39:47 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:12 2015 +0300

--
 .../processors/cache/CacheEntryImpl0.java   |  5 +++
 .../processors/cache/GridCacheSwapManager.java  |  8 -
 .../cache/version/GridVersionedMapEntry.java| 33 +++
 .../CacheVersionedEntryAbstractTest.java| 34 ++--
 4 files changed, 55 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2d200a31/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
index d2b1923..a5e27d6 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
@@ -17,6 +17,9 @@
 
 package org.apache.ignite.internal.processors.cache;
 
+import org.apache.ignite.cache.version.*;
+import org.apache.ignite.internal.processors.cache.version.*;
+
 import javax.cache.*;
 import java.util.*;
 
@@ -49,6 +52,8 @@ public class CacheEntryImpl0 implements Cache.Entry {
 @Override public  T unwrap(Class cls) {
 if(cls.isAssignableFrom(getClass()))
 return cls.cast(this);
+else if (cls.isAssignableFrom(VersionedEntry.class) && e instanceof 
GridVersionedMapEntry)
+return (T)new CacheVersionedEntryImpl<>(e.getKey(), e.getValue(), 
((GridVersionedMapEntry)e).version());
 
 throw new IllegalArgumentException("Unwrapping to class is not 
supported: " + cls);
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2d200a31/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
index 9e9c958..0530c19 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
@@ -1513,7 +1513,7 @@ public class GridCacheSwapManager extends 
GridCacheManagerAdapter {
 @Override protected Map.Entry onNext() {
 final Map.Entry cur0 = it.next();
 
-cur = new Map.Entry() {
+cur = new GridVersionedMapEntry() {
 @Override public K getKey() {
 try {
 KeyCacheObject key = 
cctx.toCacheKeyObject(cur0.getKey());
@@ -1538,6 +1538,12 @@ public class GridCacheSwapManager extends 
GridCacheManagerAdapter {
 }
 }
 
+@Override public GridCacheVersion version() {
+GridCacheSwapEntry e = 
unmarshalSwapEntry(cur0.getValue());
+
+return e.version();
+}
+
 @Override public V setValue(V val) {
 throw new UnsupportedOperationException();
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2d200a31/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridVersionedMapEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridVersionedMapEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridVersionedMapEntry.java
new file mode 100644
index 000..f653fac
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridVersionedMapEntry.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this 

[22/23] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-946

2015-08-14 Thread ntikhonov
Merge remote-tracking branch 'remotes/origin/master' into ignite-946


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/51a9bd85
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/51a9bd85
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/51a9bd85

Branch: refs/heads/master
Commit: 51a9bd85e5cb7cb38fcc60b7adf808fe0545e7df
Parents: 4f8f32a 36f7ba6
Author: Denis Magda 
Authored: Thu Aug 13 09:12:26 2015 +0300
Committer: Denis Magda 
Committed: Thu Aug 13 09:12:26 2015 +0300

--
 .../processors/cache/GridCacheGateway.java  |  5 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java| 91 +---
 2 files changed, 62 insertions(+), 34 deletions(-)
--




[12/23] incubator-ignite git commit: review

2015-08-14 Thread ntikhonov
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/53557e32
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/53557e32
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/53557e32

Branch: refs/heads/master
Commit: 53557e327721fee683b9b37217d530db44166aec
Parents: fe2be79
Author: Yakov Zhdanov 
Authored: Wed Aug 5 10:15:52 2015 +0300
Committer: Yakov Zhdanov 
Committed: Wed Aug 5 10:15:52 2015 +0300

--
 .../processors/cache/transactions/IgniteTxLocalAdapter.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/53557e32/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index e03f34d..a209780 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -1937,7 +1937,7 @@ public abstract class IgniteTxLocalAdapter extends 
IgniteTxAdapter
 GridCacheContext cacheCtx,
 Map drMap
 ) {
-return putAllAsync0(cacheCtx,
+return this.putAllAsync0(cacheCtx,
 null,
 null,
 null,



[20/23] incubator-ignite git commit: ignite-946: reverted renaming topVer to avoid breaking compatibility

2015-08-14 Thread ntikhonov
ignite-946: reverted renaming topVer to avoid breaking compatibility


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/954c4591
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/954c4591
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/954c4591

Branch: refs/heads/master
Commit: 954c4591c95b7625042657f7a7311f4ea0f17c19
Parents: 801d6df
Author: Denis Magda 
Authored: Tue Aug 11 15:00:47 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 11 15:00:47 2015 +0300

--
 .../cache/GridCacheAtomicVersionComparator.java |  4 +--
 .../processors/cache/GridCacheMapEntry.java |  2 +-
 .../processors/cache/GridCacheUtils.java|  2 +-
 .../cache/transactions/IgniteTxManager.java |  2 +-
 .../cache/version/CacheVersionedEntryImpl.java  |  4 +--
 .../version/GridCachePlainVersionedEntry.java   |  2 +-
 .../version/GridCacheRawVersionedEntry.java |  2 +-
 .../cache/version/GridCacheVersion.java | 26 ++--
 .../cache/version/GridCacheVersionManager.java  |  4 +--
 .../ignite/internal/util/IgniteUtils.java   |  4 +--
 .../cache/GridCacheEntryVersionSelfTest.java|  4 +--
 11 files changed, 28 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/954c4591/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
index 45288d9..3a06100 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
@@ -32,8 +32,8 @@ public class GridCacheAtomicVersionComparator {
  * @return Comparison value.
  */
 public int compare(GridCacheVersion one, GridCacheVersion other, boolean 
ignoreTime) {
-int topVer = one.topologyOrder();
-int otherTopVer = other.topologyOrder();
+int topVer = one.topologyVersion();
+int otherTopVer = other.topologyVersion();
 
 if (topVer == otherTopVer) {
 long globalTime = one.globalTime();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/954c4591/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 33c42c4..298f7a6 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -1927,7 +1927,7 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
 
 // Incorporate conflict version into new version if needed.
 if (conflictVer != null && conflictVer != newVer)
-newVer = new GridCacheVersionEx(newVer.topologyOrder(),
+newVer = new GridCacheVersionEx(newVer.topologyVersion(),
 newVer.globalTime(),
 newVer.order(),
 newVer.nodeOrder(),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/954c4591/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 75f1dee..a313e3d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -1060,7 +1060,7 @@ public class GridCacheUtils {
 
 byte[] bytes = new byte[28];
 
-U.intToBytes(ver.topologyOrder(), bytes, 0);
+U.intToBytes(ver.topologyVersion(), bytes, 0);
 U.longToBytes(ver.globalTime(), bytes, 4);
 U.longToBytes(ver.order(), bytes, 12);
 U.intToBytes(ver.nodeOrderAndDrIdRaw(), bytes, 20);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/954c4591/modules/core/src/main/java/org/apache/ignite/inte

[14/23] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-946' into ignite-946

2015-08-14 Thread ntikhonov
Merge remote-tracking branch 'origin/ignite-946' into ignite-946


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9f16eb16
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9f16eb16
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9f16eb16

Branch: refs/heads/master
Commit: 9f16eb165f2aad48f05cef17f608eb2898c078a3
Parents: 92e81dc 53557e3
Author: Denis Magda 
Authored: Mon Aug 10 09:58:27 2015 +0300
Committer: Denis Magda 
Committed: Mon Aug 10 09:58:27 2015 +0300

--
 .../apache/ignite/cache/version/package-info.java |  4 ++--
 .../processors/cache/CacheInvokeEntry.java|  5 +++--
 .../cache/transactions/IgniteTxEntry.java |  4 +++-
 .../cache/transactions/IgniteTxLocalAdapter.java  | 18 +-
 4 files changed, 17 insertions(+), 14 deletions(-)
--




[02/23] incubator-ignite git commit: ignite-946: introduced VersionedEntry, supported versioned entry for Cache.invoke/randomEntry/localEntries methods

2015-08-14 Thread ntikhonov
ignite-946: introduced VersionedEntry, supported versioned entry for 
Cache.invoke/randomEntry/localEntries methods


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/01c02465
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/01c02465
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/01c02465

Branch: refs/heads/master
Commit: 01c02465ff6924842644bf5b3447d324966cc5f9
Parents: 7ed4d15
Author: Denis Magda 
Authored: Thu Jul 30 13:50:40 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:10 2015 +0300

--
 .../ignite/cache/version/VersionedEntry.java|  73 +
 .../ignite/cache/version/package-info.java  |  21 
 .../processors/cache/CacheEntryImpl.java|  20 
 .../processors/cache/CacheInvokeEntry.java  |  24 -
 .../cache/CacheVersionedEntryImpl.java  |  80 ---
 .../processors/cache/GridCacheAdapter.java  |  13 ++-
 .../processors/cache/GridCacheMapEntry.java |  42 +---
 .../distributed/dht/GridDhtTxPrepareFuture.java |   2 +-
 .../dht/atomic/GridDhtAtomicCache.java  |   3 +-
 .../local/atomic/GridLocalAtomicCache.java  |   3 +-
 .../cache/transactions/IgniteTxAdapter.java |   2 +-
 .../cache/transactions/IgniteTxEntry.java   |   3 +-
 .../transactions/IgniteTxLocalAdapter.java  |   3 +-
 .../cache/version/CacheVersionedEntryImpl.java  | 102 +++
 .../resources/META-INF/classnames.properties|   2 +-
 15 files changed, 287 insertions(+), 106 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01c02465/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
new file mode 100644
index 000..6f9d8f6
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
@@ -0,0 +1,73 @@
+/*
+ * 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.cache.version;
+
+import javax.cache.*;
+import java.util.*;
+
+/**
+ * Cache entry along with version information.
+ */
+public interface VersionedEntry extends Cache.Entry {
+/**
+ * Versions comparator.
+ */
+public static final Comparator VERSIONS_COMPARATOR = new 
Comparator() {
+@Override public int compare(VersionedEntry o1, VersionedEntry o2) {
+int res = Integer.compare(o1.topologyVersion(), 
o2.topologyVersion());
+
+if (res != 0)
+return res;
+
+res = Long.compare(o1.order(), o2.order());
+
+if (res != 0)
+return res;
+
+return Integer.compare(o1.nodeOrder(), o2.nodeOrder());
+}
+};
+
+/**
+ * Gets entry's topology version.
+ *
+ * @return Topology version plus number of seconds from the start time of 
the first grid node.
+ */
+public int topologyVersion();
+
+/**
+ * Gets entry's order.
+ *
+ * @return Version order.
+ */
+public long order();
+
+/**
+ * Gets entry's node order.
+ *
+ * @return Node order on which this version was assigned.
+ */
+public int nodeOrder();
+
+/**
+ * Gets entry's global time.
+ *
+ * @return Adjusted time.
+ */
+public long globalTime();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01c02465/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java 
b/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
new file mode 100644
index 000..9aeaba2
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignit

[03/23] incubator-ignite git commit: ignite-946: improving tests

2015-08-14 Thread ntikhonov
ignite-946: improving tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/719161f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/719161f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/719161f2

Branch: refs/heads/master
Commit: 719161f2d02dd1c589155800f60e02f86c469de4
Parents: 4b9f4ba
Author: Denis Magda 
Authored: Fri Jul 31 10:20:22 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:11 2015 +0300

--
 .../internal/processors/cache/query/GridCacheQueryManager.java  | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/719161f2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index 400d997..5d3f6a3 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@ -845,7 +845,6 @@ public abstract class GridCacheQueryManager extends 
GridCacheManagerAdapte
 
 try {
 val = prj.localPeek(key, 
CachePeekModes.ONHEAP_ONLY, expiryPlc);
-
 }
 catch (IgniteCheckedException e) {
 if (log.isDebugEnabled())



[13/23] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-946

2015-08-14 Thread ntikhonov
Merge remote-tracking branch 'remotes/origin/master' into ignite-946


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/92e81dca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/92e81dca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/92e81dca

Branch: refs/heads/master
Commit: 92e81dca00800b1b74f0ade328121aaf0ab1d4df
Parents: 2e7799d d9acbd1
Author: Denis Magda 
Authored: Mon Aug 10 09:57:31 2015 +0300
Committer: Denis Magda 
Committed: Mon Aug 10 09:57:31 2015 +0300

--
 assembly/release-hadoop.xml |   5 +
 .../ClientAbstractMultiNodeSelfTest.java|   4 +-
 .../JettyRestProcessorAbstractSelfTest.java |  14 +-
 .../apache/ignite/IgniteSystemProperties.java   |   2 +-
 .../store/jdbc/CacheAbstractJdbcStore.java  |  21 +-
 .../apache/ignite/internal/IgniteKernal.java|   2 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |  43 +-
 .../managers/communication/GridIoManager.java   | 188 +++-
 .../processors/cache/GridCacheMvccManager.java  |  73 +--
 .../processors/cache/GridCacheProcessor.java|  12 +-
 .../processors/cache/GridCacheProxyImpl.java|  42 +-
 .../processors/cache/GridCacheSwapManager.java  |   2 +-
 .../processors/cache/GridCacheUtils.java|   1 -
 .../GridDhtPartitionsExchangeFuture.java|  20 +-
 .../distributed/near/GridNearGetFuture.java |  20 +-
 .../cache/query/GridCacheSqlQuery.java  |  33 +-
 .../cache/query/GridCacheTwoStepQuery.java  |  34 +-
 .../handlers/query/QueryCommandHandler.java |   6 +-
 .../ignite/internal/util/GridLogThrottle.java   |  63 ++-
 .../ignite/internal/util/IgniteUtils.java   |  16 +
 .../util/nio/GridCommunicationClient.java   |   5 +-
 .../util/nio/GridNioFinishedFuture.java |  12 +
 .../ignite/internal/util/nio/GridNioFuture.java |  14 +
 .../internal/util/nio/GridNioFutureImpl.java|  15 +
 .../util/nio/GridNioRecoveryDescriptor.java |  13 +-
 .../ignite/internal/util/nio/GridNioServer.java |   5 +
 .../util/nio/GridNioSessionMetaKey.java |   5 +-
 .../util/nio/GridShmemCommunicationClient.java  |   7 +-
 .../util/nio/GridTcpNioCommunicationClient.java |  14 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  84 +++-
 .../ignite/spi/discovery/tcp/ClientImpl.java|  29 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java|  50 +-
 .../spi/discovery/tcp/TcpDiscoveryImpl.java |  15 +
 .../spi/discovery/tcp/TcpDiscoverySpi.java  |   7 +-
 .../TcpDiscoveryMulticastIpFinder.java  |   7 +-
 .../src/test/config/io-manager-benchmark.xml|   3 +-
 .../GridJobMasterLeaveAwareSelfTest.java|  10 +-
 .../IgniteClientReconnectAbstractTest.java  |   5 +-
 .../IgniteClientReconnectCacheTest.java |   5 +-
 .../GridDeploymentMessageCountSelfTest.java |   5 +-
 .../cache/CacheStopAndDestroySelfTest.java  |   8 +-
 .../GridCacheAtomicMessageCountSelfTest.java|   6 +-
 .../processors/cache/GridCacheMvccSelfTest.java |   1 -
 ...ridCacheReplicatedSynchronousCommitTest.java |   5 +-
 .../cache/GridCacheSwapPreloadSelfTest.java |   2 +
 .../IgniteCacheAbstractStopBusySelfTest.java|   6 +-
 .../cache/IgniteCacheNearLockValueSelfTest.java |   6 +-
 ...eDynamicCacheStartNoExchangeTimeoutTest.java |   4 +-
 .../cache/IgniteTxReentryAbstractSelfTest.java  |   5 +-
 ...niteCacheClientNodeChangingTopologyTest.java |   6 +-
 ...teCacheClientNodePartitionsExchangeTest.java |   4 +-
 .../IgniteCacheNearOffheapGetSelfTest.java  | 131 ++
 ...xOriginatingNodeFailureAbstractSelfTest.java |   6 +-
 ...cOriginatingNodeFailureAbstractSelfTest.java |   6 +-
 .../GridCacheDhtPreloadMessageCountTest.java|   5 +-
 ...ePrimaryNodeFailureRecoveryAbstractTest.java |   6 +-
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   5 +-
 .../near/IgniteCacheNearTxRollbackTest.java |   6 +-
 .../GridCacheReplicatedInvalidateSelfTest.java  |   6 +-
 ...CommunicationRecoveryAckClosureSelfTest.java | 464 +++
 .../tcp/TcpDiscoveryMultiThreadedTest.java  |   8 +-
 .../testsuites/IgniteCacheTestSuite2.java   |   1 +
 .../IgniteSpiCommunicationSelfTestSuite.java|   1 +
 .../ignite/util/TestTcpCommunicationSpi.java|   6 +-
 .../processors/query/h2/IgniteH2Indexing.java   |  27 +-
 .../processors/query/h2/sql/GridSqlElement.java |  18 +-
 .../query/h2/sql/GridSqlFunction.java   |  17 +-
 .../processors/query/h2/sql/GridSqlQuery.java   |   4 +-
 .../query/h2/sql/GridSqlQueryParser.java|  94 ++--
 .../query/h2/sql/GridSqlQuerySplitter.java  | 117 +++--
 .../processors/query/h2/sql/GridSqlSelect.java  |  76 +--
 .../processors/query/h2/sql/GridSqlType.java|  24 +-
 .../processors/query/h2/sql/GridSqlUnion.java   |   2 +-
 .../query/h2/twostep/GridMapQueryExecutor.java  |   7 +-
 .../que

[17/23] incubator-ignite git commit: ignite-946: renamed topologyVersion to topologyOrder for GridCacheVersion

2015-08-14 Thread ntikhonov
ignite-946: renamed topologyVersion to topologyOrder for GridCacheVersion


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/dd3cecf6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/dd3cecf6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/dd3cecf6

Branch: refs/heads/master
Commit: dd3cecf6a68deec93c084af2f7d7e1be9de9f877
Parents: c1582fc
Author: Denis Magda 
Authored: Tue Aug 11 09:02:00 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 11 09:02:00 2015 +0300

--
 .../cache/GridCacheAtomicVersionComparator.java |  4 +--
 .../processors/cache/GridCacheMapEntry.java |  2 +-
 .../processors/cache/GridCacheUtils.java|  2 +-
 .../cache/transactions/IgniteTxManager.java |  2 +-
 .../cache/version/CacheVersionedEntryImpl.java  |  4 +--
 .../version/GridCachePlainVersionedEntry.java   |  2 +-
 .../version/GridCacheRawVersionedEntry.java |  2 +-
 .../cache/version/GridCacheVersion.java | 28 ++--
 .../cache/version/GridCacheVersionManager.java  |  5 ++--
 .../ignite/internal/util/IgniteUtils.java   |  4 +--
 .../cache/GridCacheEntryVersionSelfTest.java|  4 +--
 11 files changed, 29 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dd3cecf6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
index 3a06100..45288d9 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
@@ -32,8 +32,8 @@ public class GridCacheAtomicVersionComparator {
  * @return Comparison value.
  */
 public int compare(GridCacheVersion one, GridCacheVersion other, boolean 
ignoreTime) {
-int topVer = one.topologyVersion();
-int otherTopVer = other.topologyVersion();
+int topVer = one.topologyOrder();
+int otherTopVer = other.topologyOrder();
 
 if (topVer == otherTopVer) {
 long globalTime = one.globalTime();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dd3cecf6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 298f7a6..33c42c4 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -1927,7 +1927,7 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
 
 // Incorporate conflict version into new version if needed.
 if (conflictVer != null && conflictVer != newVer)
-newVer = new GridCacheVersionEx(newVer.topologyVersion(),
+newVer = new GridCacheVersionEx(newVer.topologyOrder(),
 newVer.globalTime(),
 newVer.order(),
 newVer.nodeOrder(),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dd3cecf6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index a313e3d..75f1dee 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -1060,7 +1060,7 @@ public class GridCacheUtils {
 
 byte[] bytes = new byte[28];
 
-U.intToBytes(ver.topologyVersion(), bytes, 0);
+U.intToBytes(ver.topologyOrder(), bytes, 0);
 U.longToBytes(ver.globalTime(), bytes, 4);
 U.longToBytes(ver.order(), bytes, 12);
 U.intToBytes(ver.nodeOrderAndDrIdRaw(), bytes, 20);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dd3cecf6/modules/core/src/main/java/org/apache/ignit

[16/23] incubator-ignite git commit: ignite-946: fixed comments and bugs

2015-08-14 Thread ntikhonov
ignite-946: fixed comments and bugs


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c1582fc3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c1582fc3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c1582fc3

Branch: refs/heads/master
Commit: c1582fc32884cdf9494df32fb33207d64ed1230f
Parents: 911ffbb
Author: Denis Magda 
Authored: Mon Aug 10 12:44:31 2015 +0300
Committer: Denis Magda 
Committed: Mon Aug 10 12:44:31 2015 +0300

--
 .../ignite/cache/version/VersionedEntry.java   | 17 +
 .../cache/version/CacheVersionedEntryImpl.java |  4 ++--
 .../processors/clock/GridClockSyncProcessor.java   |  2 +-
 .../version/CacheVersionedEntryAbstractTest.java   |  2 +-
 4 files changed, 13 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c1582fc3/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
index 2c0879b..1aac68a 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
@@ -73,30 +73,31 @@ public interface VersionedEntry extends 
Cache.Entry {
 };
 
 /**
- * Gets entry's topology version.
+ * Gets the topology version at the time when the entry with a given pair 
of key and value has been created.
  *
  * @return Topology version plus number of seconds from the start time of 
the first grid node.
  */
 public int topologyVersion();
 
 /**
- * Gets entry's order.
+ * Gets versioned entry unique order.
+ * Each time a cache entry for a given key is updated a new {@code 
VersionedEntry} with increased order is created.
  *
- * @return Version order.
+ * @return Versioned entry unique order.
  */
 public long order();
 
 /**
- * Gets entry's node order.
+ * Gets local node order at the time when the entry with a given pair of 
key and value has been created.
  *
- * @return Node order on which this version was assigned.
+ * @return Local node order on which this version has been assigned.
  */
 public int nodeOrder();
 
 /**
- * Gets entry's global time.
+ * Gets the time when the entry with a given pair of key and value has 
been created.
  *
- * @return Adjusted time.
+ * @return Time in milliseconds.
  */
-public long globalTime();
+public long creationTime();
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c1582fc3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
index 924eff9..74e4a9a 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
@@ -74,7 +74,7 @@ public class CacheVersionedEntryImpl extends 
CacheEntryImpl implemen
 }
 
 /** {@inheritDoc} */
-@Override public long globalTime() {
+@Override public long creationTime() {
 return ver.globalTime();
 }
 
@@ -95,6 +95,6 @@ public class CacheVersionedEntryImpl extends 
CacheEntryImpl implemen
 /** {@inheritDoc} */
 public String toString() {
 return "VersionedEntry [key=" + getKey() + ", val=" + getValue() + ", 
topVer=" + ver.topologyVersion() +
-", nodeOrder=" + ver.nodeOrder() + ", order=" + ver.order() + ", 
globalTime=" + ver.globalTime() + ']';
+", nodeOrder=" + ver.nodeOrder() + ", order=" + ver.order() + ", 
creationTime=" + ver.globalTime() + ']';
 }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c1582fc3/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockSyncProcessor.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockSyncProcessor.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockSyncProcessor.java
index 3ac44f2..69b07b3 100644
--- 
a/modules/core/src/main/java/org/apac

incubator-ignite git commit: IGNITE-843 Fixed download instructions.

2015-08-14 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 a1a44c88f -> 6943e48bb


IGNITE-843 Fixed download instructions.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6943e48b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6943e48b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6943e48b

Branch: refs/heads/ignite-843
Commit: 6943e48bb3b531bb3bf6b2c41044633ef3430d74
Parents: a1a44c8
Author: AKuznetsov 
Authored: Fri Aug 14 17:05:12 2015 +0700
Committer: AKuznetsov 
Committed: Fri Aug 14 17:05:12 2015 +0700

--
 .../src/main/js/views/configuration/metadata-load.jade  | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6943e48b/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade
--
diff --git 
a/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade 
b/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade
index 8d514ca..5768a7d 100644
--- 
a/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade
+++ 
b/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade
@@ -23,13 +23,12 @@ include ../includes/controls
 button.close(type='button' ng-click='$hide()' 
aria-hidden='true') ×
 h4.modal-title Load metadata from database
 .metadata-download(ng-show='loadMeta.action == "download"')
-|Connection to web agent is not established!
+|Connection to Web Agent is not established!
 |How to extract metadata from database:
 ul
-li Download web agent.
-li Unzip web agent to some folder.
-li Create a "driver" subfolder and copy there JDBC driver 
for your database.
-li Start web agent with "agent.sh" (to see agent usage: 
"agent.sh -h").
+li Download Web Agent.
+li Unzip Web Agent to some folder.
+li Please refer to the README.txt how to configure and 
start Web Agent.
 
 div(ng-show='loadMeta.action == "connect"')
 form.form-horizontal(name='loadForm' novalidate)



incubator-ignite git commit: IGNITE-843 Fixed tips for regions and zones.

2015-08-14 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 6943e48bb -> 9642b59ab


IGNITE-843 Fixed tips for regions and zones.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9642b59a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9642b59a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9642b59a

Branch: refs/heads/ignite-843
Commit: 9642b59aba12f7a4d878110600115797616ade66
Parents: 6943e48
Author: AKuznetsov 
Authored: Fri Aug 14 17:11:50 2015 +0700
Committer: AKuznetsov 
Committed: Fri Aug 14 17:11:50 2015 +0700

--
 .../src/main/js/controllers/models/clusters.json   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9642b59a/modules/control-center-web/src/main/js/controllers/models/clusters.json
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/models/clusters.json 
b/modules/control-center-web/src/main/js/controllers/models/clusters.json
index c29f67b..8ff582a 100644
--- a/modules/control-center-web/src/main/js/controllers/models/clusters.json
+++ b/modules/control-center-web/src/main/js/controllers/models/clusters.json
@@ -219,7 +219,7 @@
   "tableTip": [
 "List of regions where VMs are located.",
 "If the regions are not set then every region, that a cloud 
provider has, will be investigated. This could lead to significant performance 
degradation.",
-"Note, that some cloud providers, like Google Compute Engine, 
doesn't have a notion of a region. For such providers a call to this method is 
redundant."
+"Note, that some cloud providers, like Google Compute Engine, 
doesn't have a notion of a region. For such providers regions are redundant."
   ],
   "tip": [
 "Region where VMs are located."
@@ -237,8 +237,8 @@
   "removeTip": "Remove zone.",
   "tableTip": [
 "List of zones where VMs are located.",
-"If the zones are not set then every zone from regions, set by 
{@link #setRegions(Collection)}}, will be taken into account.",
-"Note, that some cloud providers, like Rackspace, doesn't have 
a notion of a zone. For such providers a call to this method is redundant."
+"If the zones are not set then every zone from specified 
regions, will be taken into account.",
+"Note, that some cloud providers, like Rackspace, doesn't have 
a notion of a zone. For such providers zones are redundant."
   ],
   "tip": [
 "Zone where VMs are located."



[2/3] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-1.3.3-p2' into ignite-1.3.3-p2

2015-08-14 Thread sboikov
Merge remote-tracking branch 'origin/ignite-1.3.3-p2' into ignite-1.3.3-p2


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/47895da6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/47895da6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/47895da6

Branch: refs/heads/ignite-1.3.3-p2
Commit: 47895da65c84e3c51a0eeb6c526d424ea9fabf41
Parents: a3301b3 9300bbc
Author: sboikov 
Authored: Fri Aug 14 11:39:04 2015 +0300
Committer: sboikov 
Committed: Fri Aug 14 11:39:04 2015 +0300

--
 examples/pom.xml   | 2 +-
 modules/aop/pom.xml| 2 +-
 modules/apache-license-gen/pom.xml | 2 +-
 modules/aws/pom.xml| 2 +-
 modules/clients/pom.xml| 2 +-
 modules/cloud/pom.xml  | 2 +-
 modules/codegen/pom.xml| 2 +-
 modules/core/pom.xml   | 2 +-
 modules/core/src/main/resources/ignite.properties  | 2 +-
 modules/extdata/p2p/pom.xml| 2 +-
 modules/extdata/uri/modules/uri-dependency/pom.xml | 2 +-
 modules/extdata/uri/pom.xml| 2 +-
 modules/gce/pom.xml| 2 +-
 modules/geospatial/pom.xml | 2 +-
 modules/hadoop/pom.xml | 2 +-
 modules/hibernate/pom.xml  | 2 +-
 modules/indexing/pom.xml   | 2 +-
 modules/jcl/pom.xml| 2 +-
 modules/jta/pom.xml| 2 +-
 modules/kafka/pom.xml  | 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 | 2 +-
 modules/ssh/pom.xml| 2 +-
 modules/tools/pom.xml  | 2 +-
 modules/urideploy/pom.xml  | 2 +-
 modules/visor-console-2.10/pom.xml | 2 +-
 modules/visor-console/pom.xml  | 2 +-
 modules/visor-plugins/pom.xml  | 2 +-
 modules/web/pom.xml| 2 +-
 modules/yardstick/pom.xml  | 2 +-
 modules/yarn/pom.xml   | 2 +-
 pom.xml| 2 +-
 41 files changed, 41 insertions(+), 41 deletions(-)
--




[1/3] incubator-ignite git commit: # Fix TopologyVersionAwareJob

2015-08-14 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1.3.3-p2 9300bbc77 -> 122a9dbf3


 # Fix TopologyVersionAwareJob


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a3301b35
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a3301b35
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a3301b35

Branch: refs/heads/ignite-1.3.3-p2
Commit: a3301b3511a742c7c2cc013a4e31a1a838482938
Parents: 51dcd51
Author: sboikov 
Authored: Fri Aug 14 11:27:29 2015 +0300
Committer: sboikov 
Committed: Fri Aug 14 11:37:47 2015 +0300

--
 .../processors/cache/GridCacheAdapter.java  |   9 +-
 .../IgniteCacheSizeFailoverTest.java| 115 +++
 .../IgniteCachePutRetryAbstractSelfTest.java|  19 ++-
 ...PutRetryAtomicPrimaryWriteOrderSelfTest.java |  32 ++
 .../tcp/IgniteCacheSslStartStopSelfTest.java|   1 +
 .../IgniteCacheFailoverTestSuite.java   |   3 +
 6 files changed, 175 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a3301b35/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 18f4004..47ede5b 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -5597,9 +5597,12 @@ public abstract class GridCacheAdapter implements 
IgniteInternalCache>() {
-@Override
-public void apply(IgniteInternalFuture t) {
-jobCtx.callcc();
+@Override public void apply(IgniteInternalFuture t) 
{
+
((IgniteKernal)ignite).context().closure().runLocalSafe(new Runnable() {
+@Override public void run() {
+jobCtx.callcc();
+}
+}, false);
 }
 });
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a3301b35/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java
new file mode 100644
index 000..a76d894
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java
@@ -0,0 +1,115 @@
+/*
+ * 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.distributed;
+
+import org.apache.ignite.*;
+import org.apache.ignite.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 java.util.concurrent.atomic.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
+
+/**
+ *
+ */
+public class IgniteCacheSizeFailoverTest extends GridCommonAbstractTest {
+/** */
+private static TcpDiscoveryIpFinder ipFinder = new 
TcpDisc

[3/3] incubator-ignite git commit: # Wait for next topology version before retry, retries for async tx operations

2015-08-14 Thread sboikov
# Wait for next topology version before retry, retries for async tx operations


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/122a9dbf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/122a9dbf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/122a9dbf

Branch: refs/heads/ignite-1.3.3-p2
Commit: 122a9dbf337d5c1128be32d4efee1e0f1dc683f5
Parents: 47895da
Author: sboikov 
Authored: Fri Aug 14 12:50:06 2015 +0300
Committer: sboikov 
Committed: Fri Aug 14 13:57:19 2015 +0300

--
 .../processors/cache/GridCacheAdapter.java  | 143 +--
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |  25 +++-
 .../IgniteCachePutRetryAbstractSelfTest.java|  94 ++--
 3 files changed, 237 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/122a9dbf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 47ede5b..91af352 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -2283,8 +2283,7 @@ public abstract class GridCacheAdapter implements 
IgniteInternalCache putAsync(K key, V val,
-  @Nullable 
CacheEntryPredicate... filter) {
+public IgniteInternalFuture putAsync(K key, V val, @Nullable 
CacheEntryPredicate... filter) {
 final boolean statsEnabled = ctx.config().isStatisticsEnabled();
 
 final long start = statsEnabled ? System.nanoTime() : 0L;
@@ -3975,8 +3974,15 @@ public abstract class GridCacheAdapter implements 
IgniteInternalCache 0 
: tx;
+
+
ctx.affinity().affinityReadyFuture(topVer.topologyVersion() + 1).get();
+
 continue;
+}
 
 throw e;
 }
@@ -4014,18 +4020,36 @@ public abstract class GridCacheAdapter implements 
IgniteInternalCache fut = new AsyncOpRetryFuture<>(op, 
skipStore, retries);
+
+fut.execute();
+
+return fut;
+}
+}
+else
+return asyncOp(tx, op);
 }
 
 /**
@@ -4624,6 +4648,97 @@ public abstract class GridCacheAdapter implements 
IgniteInternalCache extends GridFutureAdapter {
+/** */
+private AsyncOp op;
+
+/** */
+private boolean skipStore;
+
+/** */
+private int retries;
+
+/** */
+private IgniteTxLocalAdapter tx;
+
+/**
+ * @param op Operation.
+ * @param skipStore Skip store flag.
+ * @param retries Number of retries.
+ */
+public AsyncOpRetryFuture(AsyncOp op,
+boolean skipStore,
+int retries) {
+assert retries > 1 : retries;
+
+this.op = op;
+this.tx = null;
+this.skipStore = skipStore;
+this.retries = retries;
+}
+
+/**
+ * @param tx Transaction.
+ */
+public void execute() {
+tx = ctx.tm().newTx(
+true,
+op.single(),
+ctx.systemTx() ? ctx : null,
+OPTIMISTIC,
+READ_COMMITTED,
+
ctx.kernalContext().config().getTransactionConfiguration().getDefaultTxTimeout(),
+!skipStore,
+0);
+
+IgniteInternalFuture fut = asyncOp(tx, op);
+
+fut.listen(new IgniteInClosure>() {
+@Override public void apply(IgniteInternalFuture fut) {
+try {
+T res = fut.get();
+
+onDone(res);
+}
+catch (IgniteCheckedException e) {
+if (X.hasCause(e, 
ClusterTopologyCheckedException.class) && --retries > 0) {
+IgniteTxLocalAdapter tx = 
AsyncOpRetryFuture.this.tx;
+
+assert tx != null;
+
+AffinityTopologyVersion topVer = 
tx.topologyVersion();
+
+assert topVer != null && topVer.topologyVersion() 
> 0 : tx;
+
+IgniteInternalFuture topFut =
+
ctx.affinity().affinityReadyFuture(topVer.topologyVersion() + 1);
+
+topFut.listen(new 
IgniteInClosure>() {
+   

[3/3] incubator-ignite git commit: IGNITE-843: Validation with popover for cluster screen.

2015-08-14 Thread akuznetsov
IGNITE-843: Validation with popover for cluster screen.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3a1c1529
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3a1c1529
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3a1c1529

Branch: refs/heads/ignite-843
Commit: 3a1c1529d6fe7a8425cd53042e21a0f16fddd8e7
Parents: 14287f6
Author: AKuznetsov 
Authored: Fri Aug 14 18:30:17 2015 +0700
Committer: AKuznetsov 
Committed: Fri Aug 14 18:30:17 2015 +0700

--
 .../main/js/controllers/clusters-controller.js  | 68 +++-
 .../src/main/js/controllers/common-module.js| 16 +++--
 .../src/main/js/public/stylesheets/style.scss   |  1 +
 .../js/views/configuration/metadata-load.jade   |  2 +-
 .../src/main/js/views/includes/controls.jade|  6 +-
 5 files changed, 68 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3a1c1529/modules/control-center-web/src/main/js/controllers/clusters-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/clusters-controller.js 
b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
index 6c2ead5..98f8c90 100644
--- a/modules/control-center-web/src/main/js/controllers/clusters-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
@@ -15,8 +15,8 @@
  * limitations under the License.
  */
 
-controlCenterModule.controller('clustersController', ['$scope', '$http', 
'$popover', '$common', '$focus', '$confirm', '$copy', '$table',
-function ($scope, $http, $popover, $common, $focus, $confirm, $copy, 
$table) {
+controlCenterModule.controller('clustersController', ['$scope', '$http', 
'$popover', '$timeout', '$common', '$focus', '$confirm', '$copy', '$table',
+function ($scope, $http, $popover, $timeout, $common, $focus, $confirm, 
$copy, $table) {
 $scope.joinTip = $common.joinTip;
 $scope.getModel = $common.getModel;
 
@@ -222,30 +222,64 @@ controlCenterModule.controller('clustersController', 
['$scope', '$http', '$popov
 });
 };
 
-$scope.popover = {
-"title": "Title",
-"content": "Hello PopoverThis is a multiline message!"
-};
+var popover = null;
+
+function showPopoverMessage(panelIndex, id, message) {
+$common.ensureActivePanel($scope.panels, panelIndex);
+
+var el = $('body').find('#' + id);
+
+if (popover)
+popover.hide();
+
+var newPopover = $popover(el, {content: message});
+
+$timeout(function () {
+$focus(id);
+}, 50);
+
+$timeout(function () {
+newPopover.show();
+
+popover = newPopover;
+}, 100);
+
+$timeout(function () { newPopover.hide() }, 3000);
+
+return false;
+}
 
 // Check cluster logical consistency.
 function validate(item) {
-if ($common.isEmptyString(item.name)) {
-$common.ensureActivePanel($scope.panels, 0);
+if ($common.isEmptyString(item.name))
+return showPopoverMessage(0, 'clusterName', 'Name should not 
be empty');
 
-var el = $('body').find('#clusterName');
+if (item.discovery.kind == 'Vm' && 
item.discovery.Vm.addresses.length == 0)
+return showPopoverMessage(0, 'addresses', 'Addresses are not 
specified');
 
-var myPopover = $popover(el, {content: 'Name should not be 
empty'});
+if (item.discovery.kind == 'S3' && 
$common.isEmptyString(item.discovery.S3.bucketName))
+return showPopoverMessage(0, 'bucketName', 'Bucket name should 
not be empty');
 
-myPopover.$promise.then(function () {
-myPopover.show();
+if (item.discovery.kind == 'Cloud') {
+if ($common.isEmptyString(item.discovery.Cloud.identity))
+return showPopoverMessage(0, 'identity', 'Identity should 
not be empty');
 
-$focus('clusterName');
-});
+if ($common.isEmptyString(item.discovery.Cloud.provider))
+return showPopoverMessage(0, 'provider', 'Provider should 
not be empty');
+}
+
+if (item.discovery.kind == 'GoogleStorage') {
+if 
($common.isEmptyString(item.discovery.GoogleStorage.projectName))
+return showPopoverMessage(0, 'projectName', 'Project name 
should not be empty');
+
+if 
($common.isEmptyString(item.discovery.GoogleStorage.bucketName))

[1/3] incubator-ignite git commit: IGNITE-843: Minor changes to documentation.

2015-08-14 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 9642b59ab -> 3a1c1529d


IGNITE-843: Minor changes to documentation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/98cadbfe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/98cadbfe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/98cadbfe

Branch: refs/heads/ignite-843
Commit: 98cadbfef664b86e1a170291e4015a198e4e0013
Parents: 9642b59
Author: AKuznetsov 
Authored: Fri Aug 14 18:25:32 2015 +0700
Committer: AKuznetsov 
Committed: Fri Aug 14 18:25:32 2015 +0700

--
 modules/control-center-agent/README.txt  | 8 
 modules/control-center-agent/jdbc-drivers/README.txt | 7 ---
 2 files changed, 8 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/98cadbfe/modules/control-center-agent/README.txt
--
diff --git a/modules/control-center-agent/README.txt 
b/modules/control-center-agent/README.txt
index 410b366..3712cbd 100644
--- a/modules/control-center-agent/README.txt
+++ b/modules/control-center-agent/README.txt
@@ -1,9 +1,9 @@
 Ignite Control Center Agent
 ==
-Ignite Control Center Agent is a java standalone application that allow to 
connect grid to Ignite Web Control Center.
-Control Center Agent communicates with grid nodes via REST interface and 
connects to Web Control Center via web-socket.
+Ignite Control Center Agent is a java standalone application that allow to 
connect Ignite Grid to Ignite Web Control Center.
+Ignite Control Center Agent communicates with grid nodes via REST interface 
and connects to Ignite Web Control Center via web-socket.
 
-Two main functions of Control Center Agent:
+Two main functions of Ignite Control Center Agent:
  1. Proxy between Ignite Web Control Center and Ignite Grid to execute SQL 
statements and collect metrics for monitoring.
 You may need to specify URI for connect to Ignite REST server via "-n" 
option.
 
@@ -39,7 +39,7 @@ Options:
Default: "./jdbc-drivers".
 
 -l, --login
-   User's login (email) on Web Control Center.
+   User's login (email) on Ignite Web Control Center.
 
 -n, --nodeUri
URI for connect to Ignite REST server, for example: 
"http://localhost:8080";.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/98cadbfe/modules/control-center-agent/jdbc-drivers/README.txt
--
diff --git a/modules/control-center-agent/jdbc-drivers/README.txt 
b/modules/control-center-agent/jdbc-drivers/README.txt
index 5148c9d..fa2923d 100644
--- a/modules/control-center-agent/jdbc-drivers/README.txt
+++ b/modules/control-center-agent/jdbc-drivers/README.txt
@@ -1,9 +1,10 @@
 Ignite Control Center Agent
 ==
 
+If you are are planning to load cache type metadata from your existing 
databases
+you need to copy JDBC drivers in this folder.
+
 This is default folder for JDBC drivers.
-You could specify custom folder using option: -drv 
CUSTOM_PATH_TO_FOLDER_WITH_JDBC_DRIVERS
 
-Copy JDBC drivers for your databases in this folder.
+Also, you could specify custom folder using option: "-drv 
CUSTOM_PATH_TO_FOLDER_WITH_JDBC_DRIVERS".
 
-Note, you need to copy JDBC drivers if you are planning to load cache type 
metadata from your existing databases.



[2/3] incubator-ignite git commit: IGNITE-843: Read JDBC driver class from driver jar file.

2015-08-14 Thread akuznetsov
IGNITE-843: Read JDBC driver class from driver jar file.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/14287f69
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/14287f69
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/14287f69

Branch: refs/heads/ignite-843
Commit: 14287f6963d135afe314586f733217a3b69edd05
Parents: 98cadbf
Author: AKuznetsov 
Authored: Fri Aug 14 18:26:28 2015 +0700
Committer: AKuznetsov 
Committed: Fri Aug 14 18:26:28 2015 +0700

--
 .../handlers/DatabaseMetadataExtractor.java | 39 ++--
 1 file changed, 35 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/14287f69/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
--
diff --git 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
index 8f6f5b2..57f6720 100644
--- 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
+++ 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
@@ -22,6 +22,7 @@ import org.apache.ignite.agent.remote.*;
 import org.apache.ignite.schema.parser.*;
 
 import java.io.*;
+import java.net.*;
 import java.sql.*;
 import java.util.*;
 
@@ -68,11 +69,30 @@ public class DatabaseMetadataExtractor {
 }
 
 /**
+ * Wrapper class for later to be transformed to JSON and send to Web 
Control Center.
+ */
+private static class JdbcDriver {
+/** */
+private final String jdbcDriverClass;
+/** */
+private final String jdbcDriverJar;
+
+/**
+ * @param jdbcDriverClass Optional JDBC driver class.
+ * @param jdbcDriverJar File name of driver jar file.
+ */
+public JdbcDriver(String jdbcDriverClass, String jdbcDriverJar) {
+this.jdbcDriverClass = jdbcDriverClass;
+this.jdbcDriverJar = jdbcDriverJar;
+}
+}
+
+/**
  * @return Drivers in drivers folder
  * @see AgentConfiguration#driversFolder
  */
 @Remote
-public List availableDrivers() {
+public List availableDrivers() {
 if (driversFolder == null)
 return Collections.emptyList();
 
@@ -81,11 +101,22 @@ public class DatabaseMetadataExtractor {
 if (list == null)
 return Collections.emptyList();
 
-List res = new ArrayList<>();
+List res = new ArrayList<>();
 
 for (String fileName : list) {
-if (fileName.endsWith(".jar"))
-res.add(fileName);
+if (fileName.endsWith(".jar")) {
+try {
+String spec = "jar:file:/" + driversFolder + '/' + 
fileName + "!/META-INF/services/java.sql.Driver";
+
+URL url = new URL(spec.replace('\\', '/'));
+
+try (BufferedReader reader = new BufferedReader(new 
InputStreamReader(url.openStream( {
+res.add(new JdbcDriver(reader.readLine(), fileName));
+}
+} catch (IOException ignored) {
+res.add(new JdbcDriver(null, fileName));
+}
+}
 }
 
 return res;



incubator-ignite git commit: # Properly handle ClusterTopologyServerNotFoundException for retries

2015-08-14 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1.3.3-p2 122a9dbf3 -> 2903a29e7


# Properly handle ClusterTopologyServerNotFoundException for retries


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2903a29e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2903a29e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2903a29e

Branch: refs/heads/ignite-1.3.3-p2
Commit: 2903a29e7a50802617872bfd0fcc3497c4c7785e
Parents: 122a9db
Author: sboikov 
Authored: Fri Aug 14 16:22:25 2015 +0300
Committer: sboikov 
Committed: Fri Aug 14 16:22:25 2015 +0300

--
 .../CachePartialUpdateCheckedException.java | 29 +++-
 .../processors/cache/GridCacheAdapter.java  | 50 
 .../dht/atomic/GridNearAtomicUpdateFuture.java  | 48 +++
 .../near/GridNearOptimisticTxPrepareFuture.java |  2 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |  1 -
 5 files changed, 86 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2903a29e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
index 0272b7c..f430d12 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
+import org.apache.ignite.internal.processors.affinity.*;
 
 import java.util.*;
 
@@ -32,6 +33,9 @@ public class CachePartialUpdateCheckedException extends 
IgniteCheckedException {
 /** Failed keys. */
 private final Collection failedKeys = new ArrayList<>();
 
+/** */
+private AffinityTopologyVersion topVer;
+
 /**
  * @param msg Error message.
  */
@@ -50,13 +54,36 @@ public class CachePartialUpdateCheckedException extends 
IgniteCheckedException {
 /**
  * @param failedKeys Failed keys.
  * @param err Error.
+ * @param topVer Topology version for failed update.
  */
-public void add(Collection failedKeys, Throwable err) {
+public void add(Collection failedKeys, Throwable err, 
AffinityTopologyVersion topVer) {
+if (topVer != null) {
+AffinityTopologyVersion topVer0 = this.topVer;
+
+if (topVer0 == null || topVer.compareTo(topVer0) > 0)
+this.topVer = topVer;
+}
+
 this.failedKeys.addAll(failedKeys);
 
 addSuppressed(err);
 }
 
+/**
+ * @return Topology version.
+ */
+public AffinityTopologyVersion topologyVersion() {
+return topVer;
+}
+
+/**
+ * @param failedKeys Failed keys.
+ * @param err Error.
+ */
+public void add(Collection failedKeys, Throwable err) {
+add(failedKeys, err, null);
+}
+
 /** {@inheritDoc} */
 @Override public String getMessage() {
 return super.getMessage() + ": " + failedKeys;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2903a29e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 91af352..992edd8 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -3975,13 +3975,17 @@ public abstract class GridCacheAdapter implements 
IgniteInternalCache 0 
: tx;
+if (!(topErr instanceof 
ClusterTopologyServerNotFoundException)) {
+AffinityTopologyVersion topVer = 
tx.topologyVersion();
+
+assert topVer != null && topVer.topologyVersion() 
> 0 : tx;
 
-
ctx.affinity().affinityReadyFuture(topVer.topologyVersion() + 1).get();
+
ctx.affinity().affinityReadyFuture(topVer.topologyVersion() + 1).get();
 
-continue;
+continue;
+}
 }
 

incubator-ignite git commit: # Properly handle ClusterTopologyServerNotFoundException for retries

2015-08-14 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1.3.3-p2 2903a29e7 -> 5faffb980


# Properly handle ClusterTopologyServerNotFoundException for retries


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5faffb98
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5faffb98
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5faffb98

Branch: refs/heads/ignite-1.3.3-p2
Commit: 5faffb98032f54ed1160279de9d52938aef94bd2
Parents: 2903a29
Author: sboikov 
Authored: Fri Aug 14 16:23:19 2015 +0300
Committer: sboikov 
Committed: Fri Aug 14 16:23:19 2015 +0300

--
 .../processors/cache/CachePartialUpdateCheckedException.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5faffb98/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
index f430d12..c2259df 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
@@ -34,7 +34,7 @@ public class CachePartialUpdateCheckedException extends 
IgniteCheckedException {
 private final Collection failedKeys = new ArrayList<>();
 
 /** */
-private AffinityTopologyVersion topVer;
+private transient AffinityTopologyVersion topVer;
 
 /**
  * @param msg Error message.



[06/34] incubator-ignite git commit: ignite-1189: 4 reproducing deadlock

2015-08-14 Thread av
ignite-1189: 4 reproducing deadlock


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/132562b4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/132562b4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/132562b4

Branch: refs/heads/ignite-1093
Commit: 132562b431bc3250abe56ec48725c5ebe6083964
Parents: 28c9977
Author: Denis Magda 
Authored: Tue Aug 4 12:26:00 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 4 12:26:00 2015 +0300

--
 .../dht/atomic/GridDhtAtomicCache.java  |  8 ++--
 .../IgniteCacheAtomicNodeRestartTest.java   | 45 
 2 files changed, 48 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/132562b4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 4d73fb2..cd6e28d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -1152,11 +1152,6 @@ public class GridDhtAtomicCache extends 
GridDhtCacheAdapter {
 
 e.printStackTrace();
 }
-catch (Exception e) {
-U.error(log, "FUCK ERROR", e);
-
-throw e;
-}
 finally {
 if (locked != null)
 unlockEntries(locked, req.topologyVersion());
@@ -1179,6 +1174,9 @@ public class GridDhtAtomicCache extends 
GridDhtCacheAdapter {
 
 remap = true;
 }
+catch (Exception e) {
+U.error(log, "Unexpected exception during cache update", e);
+}
 
 if (remap) {
 assert dhtFut == null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/132562b4/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
index 70e6c4c..caee4d0 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
@@ -36,7 +36,52 @@ public class IgniteCacheAtomicNodeRestartTest extends 
GridCachePartitionedNodeRe
 super.testRestartWithPutTenNodesTwoBackups();
 }
 
+public void testRestartWithPutTenNodesTwoBackups2() throws Throwable {
+super.testRestartWithPutTenNodesTwoBackups();
+}
+public void testRestartWithPutTenNodesTwoBackups3() throws Throwable {
+super.testRestartWithPutTenNodesTwoBackups();
+}
+public void testRestartWithPutTenNodesTwoBackups4() throws Throwable {
+super.testRestartWithPutTenNodesTwoBackups();
+}
+public void testRestartWithPutTenNodesTwoBackups5() throws Throwable {
+super.testRestartWithPutTenNodesTwoBackups();
+}
+public void testRestartWithPutTenNodesTwoBackups6() throws Throwable {
+super.testRestartWithPutTenNodesTwoBackups();
+}
+public void testRestartWithPutTenNodesTwoBackups7() throws Throwable {
+super.testRestartWithPutTenNodesTwoBackups();
+}
+public void testRestartWithPutTenNodesTwoBackups8() throws Throwable {
+super.testRestartWithPutTenNodesTwoBackups();
+}
+public void testRestartWithPutTenNodesTwoBackups9() throws Throwable {
+super.testRestartWithPutTenNodesTwoBackups();
+}
+public void testRestartWithPutTenNodesTwoBackups10() throws Throwable {
+super.testRestartWithPutTenNodesTwoBackups();
+}
+public void testRestartWithPutTenNodesTwoBackups11() throws Throwable {
+super.testRestartWithPutTenNodesTwoBackups();
+}
+public void testRestartWithPutTenNodesTwoBackups12() throws Throwable {
+super.testRestartWithPutTenNodesTwoBackups();
+}
+public void testRestartWithPutTenNodesTwoBackups13() throws Throwable {
+super.testRestartWithPutTenNodesTwoB

[30/34] incubator-ignite git commit: ignite-1093

2015-08-14 Thread av
ignite-1093


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8f36482b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8f36482b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8f36482b

Branch: refs/heads/ignite-1093
Commit: 8f36482b33d05d20a065d2b3684d82ab7559b902
Parents: 50e188d
Author: Anton Vinogradov 
Authored: Wed Aug 12 12:42:48 2015 +0300
Committer: Anton Vinogradov 
Committed: Wed Aug 12 12:42:48 2015 +0300

--
 .../dht/preloader/GridDhtPartitionDemander.java | 168 ---
 .../dht/preloader/GridDhtPreloader.java |  19 +--
 .../GridCacheMassiveRebalancingSelfTest.java|  19 ++-
 3 files changed, 90 insertions(+), 116 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8f36482b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
index f6a33c3..6c95707 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
@@ -20,6 +20,7 @@ package 
org.apache.ignite.internal.processors.cache.distributed.dht.preloader;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cluster.*;
+import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.cluster.*;
@@ -305,6 +306,22 @@ public class GridDhtPartitionDemander {
 
 ClusterNode node = e.getKey();
 
+final long start = U.currentTimeMillis();
+
+final CacheConfiguration cfg = cctx.config();
+
+if (cfg.getRebalanceDelay() >= 0 && 
!cctx.kernalContext().clientNode()) {
+U.log(log, "Starting rebalancing [cache=" + cctx.name() + 
", mode=" + cfg.getRebalanceMode() +
+", from node=" + node.id() + ", partitions count=" + 
d.partitions().size() + "]");
+
+syncFut.listen(new CI1() {
+@Override public void apply(Object t) {
+U.log(log, "Completed rebalancing [cache=" + 
cctx.name() + ", mode="
++ cfg.getRebalanceMode() + ", time=" + 
(U.currentTimeMillis() - start) + " ms]");
+}
+});
+}
+
 GridConcurrentHashSet remainings = new 
GridConcurrentHashSet<>();
 
 remainings.addAll(d.partitions());
@@ -342,50 +359,6 @@ public class GridDhtPartitionDemander {
 }
 }
 }
-
-if (log.isInfoEnabled() && !d.partitions().isEmpty()) {
-LinkedList s = new LinkedList<>(d.partitions());
-
-Collections.sort(s);
-
-StringBuilder sb = new StringBuilder();
-
-int start = -1;
-
-int prev = -1;
-
-Iterator sit = s.iterator();
-
-while (sit.hasNext()) {
-int p = sit.next();
-if (start == -1) {
-start = p;
-prev = p;
-}
-
-if (prev < p - 1) {
-sb.append(start);
-
-if (start != prev)
-sb.append("-").append(prev);
-
-sb.append(", ");
-
-start = p;
-}
-
-if (!sit.hasNext()) {
-sb.append(start);
-
-if (start != p)
-sb.append("-").append(p);
-}
-
-prev = p;
-}
-
-log.info("Requested rebalancing [from node=" + node.id() + 
", partitions=" + s.size() + " (" + sb.toString() + ")]");
-}
 }
 }
 else if (delay > 0) {
@@ -659,82 +632,83 @@ public class GridDhtPartitionDemander {
 void updateLastExchangeFuture(GridDhtPartitionsExchangeFuture lastFut) {
 lastExchangeFut = lastFut;

[32/34] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-1093

2015-08-14 Thread av
Merge remote-tracking branch 'remotes/origin/master' into ignite-1093


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/19969226
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/19969226
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/19969226

Branch: refs/heads/ignite-1093
Commit: 199692269b9c3385e79327dc05f16c7610cf9e78
Parents: 6640c9a d5986c2
Author: Anton Vinogradov 
Authored: Wed Aug 12 14:33:19 2015 +0300
Committer: Anton Vinogradov 
Committed: Wed Aug 12 14:33:19 2015 +0300

--
 assembly/release-hadoop.xml |   5 +
 .../configuration/IgniteConfiguration.java  |   1 -
 .../GridCachePartitionExchangeManager.java  |  48 ++--
 .../dht/atomic/GridDhtAtomicCache.java  |  36 ++-
 .../cache/query/GridCacheSqlQuery.java  |  33 ++-
 .../cache/query/GridCacheTwoStepQuery.java  |  34 +--
 .../ignite/spi/discovery/tcp/ClientImpl.java|  28 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java|  91 ---
 .../TcpDiscoveryMulticastIpFinder.java  |   7 +-
 .../cache/CacheStopAndDestroySelfTest.java  |  87 --
 .../processors/query/h2/IgniteH2Indexing.java   |  27 +-
 .../processors/query/h2/sql/GridSqlElement.java |  18 +-
 .../query/h2/sql/GridSqlFunction.java   |  17 +-
 .../processors/query/h2/sql/GridSqlQuery.java   |   4 +-
 .../query/h2/sql/GridSqlQueryParser.java|  94 ---
 .../query/h2/sql/GridSqlQuerySplitter.java  | 117 +
 .../processors/query/h2/sql/GridSqlSelect.java  |  76 +++---
 .../processors/query/h2/sql/GridSqlType.java|  24 +-
 .../processors/query/h2/sql/GridSqlUnion.java   |   2 +-
 .../h2/twostep/GridReduceQueryExecutor.java | 211 ++-
 .../query/h2/twostep/GridThreadLocalTable.java  | 262 +++
 .../IgniteCacheAbstractFieldsQuerySelfTest.java |   2 +-
 .../org/apache/ignite/spark/IgniteContext.scala |  19 +-
 .../config/benchmark-multicast.properties   |   1 +
 parent/pom.xml  |  97 ---
 scripts/git-apply-patch.sh  |  94 ---
 scripts/git-patch-functions.sh  |  56 +---
 27 files changed, 830 insertions(+), 661 deletions(-)
--




[04/34] incubator-ignite git commit: ignite-1189: 2 reproducing deadlock

2015-08-14 Thread av
ignite-1189: 2 reproducing deadlock


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3ce3c8b7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3ce3c8b7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3ce3c8b7

Branch: refs/heads/ignite-1093
Commit: 3ce3c8b71064ff4d8abd78cd95f4678cb7a74811
Parents: efa7e99
Author: Denis Magda 
Authored: Tue Aug 4 10:33:57 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 4 10:33:57 2015 +0300

--
 .../dht/atomic/GridDhtAtomicCache.java  | 40 +++-
 1 file changed, 5 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3ce3c8b7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 18911fd..d6163c2 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -85,8 +85,6 @@ public class GridDhtAtomicCache extends 
GridDhtCacheAdapter {
 /** */
 private GridNearAtomicCache near;
 
-private ThreadLocal> lockedEntries = new 
ThreadLocal<>();
-
 /**
  * Empty constructor required by {@link Externalizable}.
  */
@@ -992,20 +990,6 @@ public class GridDhtAtomicCache extends 
GridDhtCacheAdapter {
 final GridNearAtomicUpdateRequest req,
 final CI2 
completionCb
 ) {
-boolean printKeys = false;
-
-if (lockedEntries.get() != null) {
-for (GridDhtCacheEntry entry : lockedEntries.get())
-U.error(log, "Locked entry [entry=" + entry + ']');
-
-printKeys = true;
-}
-
-if (printKeys) {
-for (KeyCacheObject obj : req.keys())
-U.error(log, "Key requested: " + obj);
-}
-
 IgniteInternalFuture forceFut = preldr.request(req.keys(), 
req.topologyVersion());
 
 if (forceFut.isDone())
@@ -1048,26 +1032,10 @@ public class GridDhtAtomicCache extends 
GridDhtCacheAdapter {
 IgniteCacheExpiryPolicy expiry = null;
 
 try {
-boolean printKeys = false;
-
-if (lockedEntries.get() != null) {
-for (GridDhtCacheEntry entry : lockedEntries.get())
-U.error(log, "Locked entry (2) [entry=" + entry + ']');
-
-printKeys = true;
-}
-
-if (printKeys) {
-for (KeyCacheObject obj : keys)
-U.error(log, "Key requested: " + obj);
-}
-
 // If batch store update is enabled, we need to lock all entries.
 // First, need to acquire locks on cache entries, then check 
filter.
 List locked = lockEntries(keys, 
req.topologyVersion());
 
-lockedEntries.set(locked);
-
 Collection> 
deleted = null;
 
 try {
@@ -1184,11 +1152,13 @@ public class GridDhtAtomicCache extends 
GridDhtCacheAdapter {
 
 e.printStackTrace();
 }
+catch (Exception e) {
+if (X.hasCause(e, InterruptedException.class))
+U.error(log, "FUCK Interrupted", e);
+}
 finally {
-if (locked != null) {
-lockedEntries.set(null);
+if (locked != null)
 unlockEntries(locked, req.topologyVersion());
-}
 
 // Enqueue if necessary after locks release.
 if (deleted != null) {



[17/34] incubator-ignite git commit: minor

2015-08-14 Thread av
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/56efb6b1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/56efb6b1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/56efb6b1

Branch: refs/heads/ignite-1093
Commit: 56efb6b112abd03f673ee65ca8061b4728e1205d
Parents: 5ce8bc6
Author: Yakov Zhdanov 
Authored: Thu Aug 6 15:53:48 2015 +0300
Committer: Yakov Zhdanov 
Committed: Thu Aug 6 15:53:48 2015 +0300

--
 .../tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56efb6b1/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
 
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
index bdc7865..b93c547 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
@@ -330,9 +330,10 @@ public class TcpDiscoveryMulticastIpFinder extends 
TcpDiscoveryVmIpFinder {
 reqItfs.add(mcastAddr);
 }
 catch (IOException e) {
-log.debug("Failed to create multicast socket 
[mcastAddr=" + mcastAddr +
-", mcastGrp=" + mcastGrp + ", mcastPort=" + 
mcastPort + ", locAddr=" + mcastAddr +
-", err=" + e + ']');
+if (log.isDebugEnabled())
+log.debug("Failed to create multicast socket 
[mcastAddr=" + mcastAddr +
+", mcastGrp=" + mcastGrp + ", mcastPort=" + 
mcastPort + ", locAddr=" + mcastAddr +
+", err=" + e + ']');
 }
 }
 }



[05/34] incubator-ignite git commit: ignite-1189: 3 reproducing deadlock

2015-08-14 Thread av
ignite-1189: 3 reproducing deadlock


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/28c9977b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/28c9977b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/28c9977b

Branch: refs/heads/ignite-1093
Commit: 28c9977bb8344f2d73c65d45656b673a9a4c634b
Parents: 3ce3c8b
Author: Denis Magda 
Authored: Tue Aug 4 11:41:48 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 4 11:41:48 2015 +0300

--
 .../cache/distributed/dht/atomic/GridDhtAtomicCache.java| 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/28c9977b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index d6163c2..4d73fb2 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -1153,8 +1153,9 @@ public class GridDhtAtomicCache extends 
GridDhtCacheAdapter {
 e.printStackTrace();
 }
 catch (Exception e) {
-if (X.hasCause(e, InterruptedException.class))
-U.error(log, "FUCK Interrupted", e);
+U.error(log, "FUCK ERROR", e);
+
+throw e;
 }
 finally {
 if (locked != null)



[27/34] incubator-ignite git commit: Merge remote-tracking branch 'origin/master'

2015-08-14 Thread av
Merge remote-tracking branch 'origin/master'


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/19fb305d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/19fb305d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/19fb305d

Branch: refs/heads/ignite-1093
Commit: 19fb305d5ceff430911d8dc25685686f6446ea21
Parents: fbda19d 0798e6f
Author: Anton Vinogradov 
Authored: Mon Aug 10 16:12:53 2015 +0300
Committer: Anton Vinogradov 
Committed: Mon Aug 10 16:12:53 2015 +0300

--
 .../cache/GridCachePartitionExchangeManager.java| 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)
--




[08/34] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-1189

2015-08-14 Thread av
Merge remote-tracking branch 'remotes/origin/master' into ignite-1189


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d78e4c8e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d78e4c8e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d78e4c8e

Branch: refs/heads/ignite-1093
Commit: d78e4c8eef921775d2d5d1fcd5adf151c3d46923
Parents: 4d528be b056a73
Author: Denis Magda 
Authored: Tue Aug 4 13:32:45 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 4 13:32:45 2015 +0300

--
 .../ClientAbstractMultiNodeSelfTest.java|   4 +-
 .../apache/ignite/IgniteSystemProperties.java   |   2 +-
 .../store/jdbc/CacheAbstractJdbcStore.java  |  21 +-
 .../apache/ignite/internal/IgniteKernal.java|   2 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |  43 +-
 .../managers/communication/GridIoManager.java   | 188 +++-
 .../processors/cache/GridCacheMvccManager.java  |  73 +--
 .../processors/cache/GridCacheProcessor.java|   2 +-
 .../processors/cache/GridCacheProxyImpl.java|  42 +-
 .../processors/cache/GridCacheSwapManager.java  |   2 +-
 .../distributed/near/GridNearGetFuture.java |  20 +-
 .../ignite/internal/util/IgniteUtils.java   |  16 +
 .../util/nio/GridCommunicationClient.java   |   5 +-
 .../util/nio/GridNioFinishedFuture.java |  12 +
 .../ignite/internal/util/nio/GridNioFuture.java |  14 +
 .../internal/util/nio/GridNioFutureImpl.java|  15 +
 .../util/nio/GridNioRecoveryDescriptor.java |  13 +-
 .../ignite/internal/util/nio/GridNioServer.java |   5 +
 .../util/nio/GridNioSessionMetaKey.java |   5 +-
 .../util/nio/GridShmemCommunicationClient.java  |   7 +-
 .../util/nio/GridTcpNioCommunicationClient.java |  14 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  43 +-
 .../ignite/spi/discovery/tcp/ClientImpl.java|   2 +-
 .../src/test/config/io-manager-benchmark.xml|   3 +-
 .../GridJobMasterLeaveAwareSelfTest.java|  10 +-
 .../IgniteClientReconnectAbstractTest.java  |   5 +-
 .../IgniteClientReconnectCacheTest.java |   5 +-
 .../GridDeploymentMessageCountSelfTest.java |   5 +-
 .../cache/CacheStopAndDestroySelfTest.java  |   8 +-
 .../GridCacheAtomicMessageCountSelfTest.java|   6 +-
 .../processors/cache/GridCacheMvccSelfTest.java |   1 -
 ...ridCacheReplicatedSynchronousCommitTest.java |   5 +-
 .../IgniteCacheAbstractStopBusySelfTest.java|   6 +-
 .../cache/IgniteCacheNearLockValueSelfTest.java |   6 +-
 ...eDynamicCacheStartNoExchangeTimeoutTest.java |   4 +-
 .../cache/IgniteTxReentryAbstractSelfTest.java  |   5 +-
 ...niteCacheClientNodeChangingTopologyTest.java |   6 +-
 ...teCacheClientNodePartitionsExchangeTest.java |   4 +-
 .../IgniteCacheNearOffheapGetSelfTest.java  | 131 ++
 ...xOriginatingNodeFailureAbstractSelfTest.java |   6 +-
 ...cOriginatingNodeFailureAbstractSelfTest.java |   6 +-
 .../GridCacheDhtPreloadMessageCountTest.java|   5 +-
 ...ePrimaryNodeFailureRecoveryAbstractTest.java |   6 +-
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   5 +-
 .../near/IgniteCacheNearTxRollbackTest.java |   6 +-
 .../GridCacheReplicatedInvalidateSelfTest.java  |   6 +-
 ...CommunicationRecoveryAckClosureSelfTest.java | 464 +++
 .../testsuites/IgniteCacheTestSuite2.java   |   1 +
 .../IgniteSpiCommunicationSelfTestSuite.java|   1 +
 .../ignite/util/TestTcpCommunicationSpi.java|   6 +-
 ...CacheScanPartitionQueryFallbackSelfTest.java |  15 +-
 .../parser/dialect/OracleMetadataDialect.java   |   4 +-
 .../src/test/java/config/ignite-test-config.xml |  43 ++
 .../ignite/internal/GridFactorySelfTest.java|   9 +
 .../visor/commands/kill/VisorKillCommand.scala  |   2 +-
 55 files changed, 1148 insertions(+), 197 deletions(-)
--




[01/34] incubator-ignite git commit: ignite-1189: clearing grid information on stop even when grid's state is not STARTED

2015-08-14 Thread av
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1093 50e188df2 -> 64319443a


ignite-1189: clearing grid information on stop even when grid's state is not 
STARTED


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ac6d75dc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ac6d75dc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ac6d75dc

Branch: refs/heads/ignite-1093
Commit: ac6d75dc55eab0ce909c972a1124bf5fb42a5e3d
Parents: aec9764
Author: Denis Magda 
Authored: Mon Aug 3 12:44:45 2015 +0300
Committer: Denis Magda 
Committed: Mon Aug 3 12:44:45 2015 +0300

--
 .../org/apache/ignite/internal/IgnitionEx.java  | 21 +++-
 1 file changed, 16 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac6d75dc/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java 
b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 5cbe377..d355085 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -261,8 +261,11 @@ public class IgnitionEx {
 public static boolean stop(@Nullable String name, boolean cancel) {
 IgniteNamedInstance grid = name != null ? grids.get(name) : dfltGrid;
 
-if (grid != null && grid.state() == STARTED) {
-grid.stop(cancel);
+if (grid != null) {
+IgniteState state = grid.state();
+
+if (state == STARTED)
+grid.stop(cancel);
 
 boolean fireEvt;
 
@@ -277,10 +280,18 @@ public class IgnitionEx {
 }
 }
 
-if (fireEvt)
-notifyStateChange(grid.getName(), grid.state());
+if (state == STARTED) {
+if (fireEvt)
+notifyStateChange(grid.getName(), grid.state());
 
-return true;
+return true;
+}
+else {
+U.warn(null, "Ignoring stopping grid instance (has not been in 
STARTED state): [grid=" + name +
+", state=" + state + ']');
+
+return false;
+}
 }
 
 // We don't have log at this point...



[12/34] incubator-ignite git commit: msg format

2015-08-14 Thread av
msg format


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5ce8bc69
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5ce8bc69
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5ce8bc69

Branch: refs/heads/ignite-1093
Commit: 5ce8bc692cdc5e7662ccd6ac5f6e8f5b2fd493e4
Parents: d7623b4
Author: Yakov Zhdanov 
Authored: Thu Aug 6 12:52:59 2015 +0300
Committer: Yakov Zhdanov 
Committed: Thu Aug 6 12:52:59 2015 +0300

--
 .../main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5ce8bc69/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 d5d6ea2..5e81a3e 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
@@ -418,8 +418,7 @@ class ClientImpl extends TcpDiscoveryImpl {
 "Please check IP finder configuration" +
 (spi.ipFinder instanceof 
TcpDiscoveryMulticastIpFinder ?
 " and make sure multicast works on your 
network. " : ". ") +
-"Will retry every 2 secs."
-+ spi.ipFinder, true);
+"Will retry every 2 secs.", true);
 
 Thread.sleep(2000);
 }



[03/34] incubator-ignite git commit: ignite-1189: reproducing deadlock

2015-08-14 Thread av
ignite-1189: reproducing deadlock


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/efa7e99b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/efa7e99b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/efa7e99b

Branch: refs/heads/ignite-1093
Commit: efa7e99bbad76ce35a55e6ad9faa9aac8e57b5f4
Parents: 6b237e1
Author: Denis Magda 
Authored: Tue Aug 4 09:12:12 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 4 09:12:12 2015 +0300

--
 .../dht/atomic/GridDhtAtomicCache.java  | 36 +++-
 .../IgniteCacheAtomicNodeRestartTest.java   | 43 
 2 files changed, 78 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/efa7e99b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 0a21979..18911fd 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -85,6 +85,8 @@ public class GridDhtAtomicCache extends 
GridDhtCacheAdapter {
 /** */
 private GridNearAtomicCache near;
 
+private ThreadLocal> lockedEntries = new 
ThreadLocal<>();
+
 /**
  * Empty constructor required by {@link Externalizable}.
  */
@@ -990,6 +992,20 @@ public class GridDhtAtomicCache extends 
GridDhtCacheAdapter {
 final GridNearAtomicUpdateRequest req,
 final CI2 
completionCb
 ) {
+boolean printKeys = false;
+
+if (lockedEntries.get() != null) {
+for (GridDhtCacheEntry entry : lockedEntries.get())
+U.error(log, "Locked entry [entry=" + entry + ']');
+
+printKeys = true;
+}
+
+if (printKeys) {
+for (KeyCacheObject obj : req.keys())
+U.error(log, "Key requested: " + obj);
+}
+
 IgniteInternalFuture forceFut = preldr.request(req.keys(), 
req.topologyVersion());
 
 if (forceFut.isDone())
@@ -1032,10 +1048,26 @@ public class GridDhtAtomicCache extends 
GridDhtCacheAdapter {
 IgniteCacheExpiryPolicy expiry = null;
 
 try {
+boolean printKeys = false;
+
+if (lockedEntries.get() != null) {
+for (GridDhtCacheEntry entry : lockedEntries.get())
+U.error(log, "Locked entry (2) [entry=" + entry + ']');
+
+printKeys = true;
+}
+
+if (printKeys) {
+for (KeyCacheObject obj : keys)
+U.error(log, "Key requested: " + obj);
+}
+
 // If batch store update is enabled, we need to lock all entries.
 // First, need to acquire locks on cache entries, then check 
filter.
 List locked = lockEntries(keys, 
req.topologyVersion());
 
+lockedEntries.set(locked);
+
 Collection> 
deleted = null;
 
 try {
@@ -1153,8 +1185,10 @@ public class GridDhtAtomicCache extends 
GridDhtCacheAdapter {
 e.printStackTrace();
 }
 finally {
-if (locked != null)
+if (locked != null) {
+lockedEntries.set(null);
 unlockEntries(locked, req.topologyVersion());
+}
 
 // Enqueue if necessary after locks release.
 if (deleted != null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/efa7e99b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
index fa8898f..70e6c4c 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
@@ -31,7 +31,50 @@ public class IgniteCacheAtomicNodeRestartTest extends 
GridCachePartitioned

[13/34] incubator-ignite git commit: master ignite-1207

2015-08-14 Thread av
master ignite-1207


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/33e174bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/33e174bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/33e174bb

Branch: refs/heads/ignite-1093
Commit: 33e174bb9a8c9d79c66962449cf0d5403b921aed
Parents: 2173b0e
Author: Anton Vinogradov 
Authored: Thu Aug 6 13:03:44 2015 +0300
Committer: Anton Vinogradov 
Committed: Thu Aug 6 13:03:44 2015 +0300

--
 assembly/release-hadoop.xml | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/33e174bb/assembly/release-hadoop.xml
--
diff --git a/assembly/release-hadoop.xml b/assembly/release-hadoop.xml
index 7b94144..3f61ec9 100644
--- a/assembly/release-hadoop.xml
+++ b/assembly/release-hadoop.xml
@@ -58,6 +58,11 @@
 modules/hadoop/config/hive-site.ignite.xml
 /config/hadoop
 
+
+
+modules/hadoop/docs/HADOOP_README.txt
+/
+
 
 
 



[09/34] incubator-ignite git commit: ignite-1189: eventually fixed the deadlock

2015-08-14 Thread av
ignite-1189: eventually fixed the deadlock


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/67706063
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/67706063
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/67706063

Branch: refs/heads/ignite-1093
Commit: 67706063d2e8d8cc3ed8d55cdfffccc0a21005c6
Parents: d78e4c8
Author: Denis Magda 
Authored: Tue Aug 4 13:34:19 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 4 13:34:19 2015 +0300

--
 .../dht/atomic/GridDhtAtomicCache.java  |  6 +-
 .../IgniteCacheAtomicNodeRestartTest.java   | 92 
 2 files changed, 5 insertions(+), 93 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/67706063/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 470efdd..14b4680 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -1175,6 +1175,8 @@ public class GridDhtAtomicCache extends 
GridDhtCacheAdapter {
 remap = true;
 }
 catch (Exception e) {
+// At least RuntimeException can be thrown by the code above when 
GridCacheContext is cleaned and there is
+// an attempt to use cleaned resources.
 U.error(log, "Unexpected exception during cache update", e);
 
 res.addFailedKeys(keys, e);
@@ -2184,7 +2186,9 @@ public class GridDhtAtomicCache extends 
GridDhtCacheAdapter {
 }
 }
 finally {
-// Release locks.
+// At least RuntimeException can be thrown by the code above when 
GridCacheContext is cleaned and there is
+// an attempt to use cleaned resources.
+// That's why releasing locks in the finally block..
 for (GridCacheMapEntry entry : locked) {
 if (entry != null)
 UNSAFE.monitorExit(entry);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/67706063/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
index caee4d0..1c4e616 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
@@ -30,96 +30,4 @@ public class IgniteCacheAtomicNodeRestartTest extends 
GridCachePartitionedNodeRe
 @Override protected CacheAtomicityMode atomicityMode() {
 return ATOMIC;
 }
-
-/** {@inheritDoc} */
-@Override public void testRestartWithPutTenNodesTwoBackups() throws 
Throwable {
-super.testRestartWithPutTenNodesTwoBackups();
-}
-
-public void testRestartWithPutTenNodesTwoBackups2() throws Throwable {
-super.testRestartWithPutTenNodesTwoBackups();
-}
-public void testRestartWithPutTenNodesTwoBackups3() throws Throwable {
-super.testRestartWithPutTenNodesTwoBackups();
-}
-public void testRestartWithPutTenNodesTwoBackups4() throws Throwable {
-super.testRestartWithPutTenNodesTwoBackups();
-}
-public void testRestartWithPutTenNodesTwoBackups5() throws Throwable {
-super.testRestartWithPutTenNodesTwoBackups();
-}
-public void testRestartWithPutTenNodesTwoBackups6() throws Throwable {
-super.testRestartWithPutTenNodesTwoBackups();
-}
-public void testRestartWithPutTenNodesTwoBackups7() throws Throwable {
-super.testRestartWithPutTenNodesTwoBackups();
-}
-public void testRestartWithPutTenNodesTwoBackups8() throws Throwable {
-super.testRestartWithPutTenNodesTwoBackups();
-}
-public void testRestartWithPutTenNodesTwoBackups9() throws Throwable {
-super.testRestartWithPutTenNodesTwoBackups();
-}
-public void testRestartWithPutTen

[10/34] incubator-ignite git commit: # ignite-1198

2015-08-14 Thread av
# ignite-1198


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2173b0e1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2173b0e1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2173b0e1

Branch: refs/heads/ignite-1093
Commit: 2173b0e1500d3dbc198a610042fca9b92d4f7de7
Parents: 023ffe0
Author: Alexey Goncharuk 
Authored: Wed Aug 5 14:05:07 2015 -0700
Committer: Alexey Goncharuk 
Committed: Wed Aug 5 14:25:13 2015 -0700

--
 .../org/apache/ignite/spark/IgniteContext.scala  | 19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2173b0e1/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
--
diff --git 
a/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala 
b/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
index 5267244a..6e48017 100644
--- a/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
+++ b/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
@@ -19,7 +19,8 @@ package org.apache.ignite.spark
 
 
 import org.apache.ignite.internal.IgnitionEx
-import org.apache.ignite.{Ignition, Ignite}
+import org.apache.ignite.internal.util.IgniteUtils
+import org.apache.ignite.{IgniteSystemProperties, Ignition, Ignite}
 import org.apache.ignite.configuration.{CacheConfiguration, 
IgniteConfiguration}
 import org.apache.spark.{Logging, SparkContext}
 import org.apache.spark.sql.SQLContext
@@ -41,8 +42,12 @@ class IgniteContext[K, V](
 
 private val cfgClo = new Once(cfgF)
 
+private val igniteHome = IgniteUtils.getIgniteHome
+
 if (!client) {
-val workers = sparkContext.getExecutorStorageStatus.length - 1
+// Get required number of executors with default equals to number of 
available executors.
+val workers = sparkContext.getConf.getInt("spark.executor.instances",
+sparkContext.getExecutorStorageStatus.length)
 
 if (workers <= 0)
 throw new IllegalStateException("No Spark executors found to start 
Ignite nodes.")
@@ -125,6 +130,16 @@ class IgniteContext[K, V](
  * @return Ignite instance.
  */
 def ignite(): Ignite = {
+val home = IgniteUtils.getIgniteHome
+
+if (home == null && igniteHome != null) {
+logInfo("Setting IGNITE_HOME from driver not as it is not 
available on this worker: " + igniteHome)
+
+IgniteUtils.nullifyHomeDirectory()
+
+System.setProperty(IgniteSystemProperties.IGNITE_HOME, igniteHome)
+}
+
 val igniteCfg = cfgClo()
 
 try {



[16/34] incubator-ignite git commit: Added comment in benchmark-multicast.properties

2015-08-14 Thread av
Added comment in benchmark-multicast.properties


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b94c1302
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b94c1302
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b94c1302

Branch: refs/heads/ignite-1093
Commit: b94c13026e9097adb2d318548832ce870152c95f
Parents: 6e496e6
Author: nikolay_tikhonov 
Authored: Thu Aug 6 15:39:54 2015 +0300
Committer: nikolay_tikhonov 
Committed: Thu Aug 6 15:39:54 2015 +0300

--
 modules/yardstick/config/benchmark-multicast.properties | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b94c1302/modules/yardstick/config/benchmark-multicast.properties
--
diff --git a/modules/yardstick/config/benchmark-multicast.properties 
b/modules/yardstick/config/benchmark-multicast.properties
index 74b152c..82bf766 100644
--- a/modules/yardstick/config/benchmark-multicast.properties
+++ b/modules/yardstick/config/benchmark-multicast.properties
@@ -45,6 +45,7 @@ 
BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe,DStatProbe
 # Packages where the specified benchmark is searched by reflection mechanism.
 BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick
 
+# Restart servers for each benchmark.
 RESTART_SERVERS=true
 
 # Probe point writer class name.



[33/34] incubator-ignite git commit: ignite-1093

2015-08-14 Thread av
ignite-1093


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/50d32b38
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/50d32b38
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/50d32b38

Branch: refs/heads/ignite-1093
Commit: 50d32b38426dd19adcef81e7c645f95a6ff6927e
Parents: 1996922
Author: Anton Vinogradov 
Authored: Thu Aug 13 10:51:15 2015 +0300
Committer: Anton Vinogradov 
Committed: Thu Aug 13 10:51:15 2015 +0300

--
 .../dht/preloader/GridDhtPartitionDemander.java | 51 
 1 file changed, 51 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/50d32b38/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
index 6c95707..16f7a61 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
@@ -357,6 +357,9 @@ public class GridDhtPartitionDemander {
 catch (IgniteCheckedException ex) {
 U.error(log, "Failed to send partition demand 
message to local node", ex);
 }
+
+if (log.isDebugEnabled())
+log.debug("Requested rebalancing [from node=" + 
node.id() + ", listener index=" + cnt + ", partitions count=" + 
sParts.get(cnt).size() + " (" + partitionsList(sParts.get(cnt)) + ")]");
 }
 }
 }
@@ -388,6 +391,54 @@ public class GridDhtPartitionDemander {
 }
 
 /**
+ * @param c Partitions.
+ * @return String representation of partitions list.
+ */
+private String partitionsList(Collection c){
+LinkedList s = new LinkedList<>(c);
+
+Collections.sort(s);
+
+StringBuilder sb = new StringBuilder();
+
+int start = -1;
+
+int prev = -1;
+
+Iterator sit = s.iterator();
+
+while (sit.hasNext()) {
+int p = sit.next();
+if (start == -1) {
+start = p;
+prev = p;
+}
+
+if (prev < p - 1) {
+sb.append(start);
+
+if (start != prev)
+sb.append("-").append(prev);
+
+sb.append(", ");
+
+start = p;
+}
+
+if (!sit.hasNext()) {
+sb.append(start);
+
+if (start != p)
+sb.append("-").append(p);
+}
+
+prev = p;
+}
+
+return sb.toString();
+}
+
+/**
  * @param idx Index.
  * @param id Node id.
  * @param supply Supply.



[20/34] incubator-ignite git commit: Renaming

2015-08-14 Thread av
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/ebcdb4bf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ebcdb4bf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ebcdb4bf

Branch: refs/heads/ignite-1093
Commit: ebcdb4bf5cfe508670129389637984b8dba43146
Parents: d7dd4a0
Author: Yakov Zhdanov 
Authored: Thu Aug 6 16:44:21 2015 +0300
Committer: Yakov Zhdanov 
Committed: Thu Aug 6 16:44:21 2015 +0300

--
 .../internal/processors/cache/query/GridCacheSqlQuery.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ebcdb4bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
index d5eb379..77bbe39 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
@@ -53,7 +53,7 @@ public class GridCacheSqlQuery implements Message {
 /** */
 @GridToStringInclude
 @GridDirectTransient
-private LinkedHashMap columns;
+private LinkedHashMap cols;
 
 /**
  * For {@link Message}.
@@ -78,7 +78,7 @@ public class GridCacheSqlQuery implements Message {
  * @return Columns.
  */
 public LinkedHashMap columns() {
-return columns;
+return cols;
 }
 
 /**
@@ -86,7 +86,7 @@ public class GridCacheSqlQuery implements Message {
  * @return {@code this}.
  */
 public GridCacheSqlQuery columns(LinkedHashMap columns) {
-this.columns = columns;
+this.cols = columns;
 
 return this;
 }



[07/34] incubator-ignite git commit: ignite-1189: fixing deadlock

2015-08-14 Thread av
ignite-1189: fixing deadlock


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4d528bec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4d528bec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4d528bec

Branch: refs/heads/ignite-1093
Commit: 4d528becc1cd3db9d4d2d6db2053895043aa3918
Parents: 132562b
Author: Denis Magda 
Authored: Tue Aug 4 13:04:35 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 4 13:04:35 2015 +0300

--
 .../dht/atomic/GridDhtAtomicCache.java  | 29 +---
 1 file changed, 19 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4d528bec/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index cd6e28d..470efdd 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -1176,6 +1176,12 @@ public class GridDhtAtomicCache extends 
GridDhtCacheAdapter {
 }
 catch (Exception e) {
 U.error(log, "Unexpected exception during cache update", e);
+
+res.addFailedKeys(keys, e);
+
+completionCb.apply(req, res);
+
+return;
 }
 
 if (remap) {
@@ -2167,19 +2173,22 @@ public class GridDhtAtomicCache extends 
GridDhtCacheAdapter {
 // Enqueue entries while holding locks.
 Collection skip = null;
 
-for (GridCacheMapEntry entry : locked) {
-if (entry != null && entry.deleted()) {
-if (skip == null)
-skip = new HashSet<>(locked.size(), 1.0f);
+try {
+for (GridCacheMapEntry entry : locked) {
+if (entry != null && entry.deleted()) {
+if (skip == null)
+skip = new HashSet<>(locked.size(), 1.0f);
 
-skip.add(entry.key());
+skip.add(entry.key());
+}
 }
 }
-
-// Release locks.
-for (GridCacheMapEntry entry : locked) {
-if (entry != null)
-UNSAFE.monitorExit(entry);
+finally {
+// Release locks.
+for (GridCacheMapEntry entry : locked) {
+if (entry != null)
+UNSAFE.monitorExit(entry);
+}
 }
 
 // Try evict partitions.



[25/34] incubator-ignite git commit: Merge remote-tracking branch 'origin/master'

2015-08-14 Thread av
Merge remote-tracking branch 'origin/master'


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0798e6f1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0798e6f1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0798e6f1

Branch: refs/heads/ignite-1093
Commit: 0798e6f1764aaf3e8101383b7a8ac3d7ed9b9d2c
Parents: bd770a5 cd844a7
Author: sboikov 
Authored: Mon Aug 10 16:08:49 2015 +0300
Committer: sboikov 
Committed: Mon Aug 10 16:08:49 2015 +0300

--
 .../configuration/IgniteConfiguration.java  |  1 -
 .../dht/atomic/GridDhtAtomicCache.java  | 36 ++--
 2 files changed, 26 insertions(+), 11 deletions(-)
--




[14/34] incubator-ignite git commit: Merge remote-tracking branch 'origin/master'

2015-08-14 Thread av
Merge remote-tracking branch 'origin/master'


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b0315250
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b0315250
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b0315250

Branch: refs/heads/ignite-1093
Commit: b03152504cb5d8da0d57b3a712cadd9a4aea4a83
Parents: 33e174b 5ce8bc6
Author: Anton Vinogradov 
Authored: Thu Aug 6 13:05:43 2015 +0300
Committer: Anton Vinogradov 
Committed: Thu Aug 6 13:05:43 2015 +0300

--
 .../ignite/spi/discovery/tcp/ClientImpl.java| 28 +++-
 1 file changed, 21 insertions(+), 7 deletions(-)
--




[02/34] incubator-ignite git commit: ignite-1189: trying to reproduce failures

2015-08-14 Thread av
ignite-1189: trying to reproduce failures


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6b237e11
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6b237e11
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6b237e11

Branch: refs/heads/ignite-1093
Commit: 6b237e119caad68474cc785c0373da8ce31011d8
Parents: ac6d75d
Author: Denis Magda 
Authored: Mon Aug 3 14:45:40 2015 +0300
Committer: Denis Magda 
Committed: Mon Aug 3 14:45:40 2015 +0300

--
 .../org/apache/ignite/internal/IgnitionEx.java  | 21 +---
 .../IgniteCacheAtomicNodeRestartTest.java   |  4 
 2 files changed, 9 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6b237e11/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java 
b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index d355085..5cbe377 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -261,11 +261,8 @@ public class IgnitionEx {
 public static boolean stop(@Nullable String name, boolean cancel) {
 IgniteNamedInstance grid = name != null ? grids.get(name) : dfltGrid;
 
-if (grid != null) {
-IgniteState state = grid.state();
-
-if (state == STARTED)
-grid.stop(cancel);
+if (grid != null && grid.state() == STARTED) {
+grid.stop(cancel);
 
 boolean fireEvt;
 
@@ -280,18 +277,10 @@ public class IgnitionEx {
 }
 }
 
-if (state == STARTED) {
-if (fireEvt)
-notifyStateChange(grid.getName(), grid.state());
-
-return true;
-}
-else {
-U.warn(null, "Ignoring stopping grid instance (has not been in 
STARTED state): [grid=" + name +
-", state=" + state + ']');
+if (fireEvt)
+notifyStateChange(grid.getName(), grid.state());
 
-return false;
-}
+return true;
 }
 
 // We don't have log at this point...

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6b237e11/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
index 1c4e616..fa8898f 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
@@ -30,4 +30,8 @@ public class IgniteCacheAtomicNodeRestartTest extends 
GridCachePartitionedNodeRe
 @Override protected CacheAtomicityMode atomicityMode() {
 return ATOMIC;
 }
+
+@Override public void testRestartWithPutTenNodesTwoBackups() throws 
Throwable {
+
+}
 }



[22/34] incubator-ignite git commit: IGNITE-1189 Removed unnecessary comment.

2015-08-14 Thread av
IGNITE-1189 Removed unnecessary comment.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e42f954f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e42f954f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e42f954f

Branch: refs/heads/ignite-1093
Commit: e42f954f043b6690dfcc10b7eb8817194eb898e2
Parents: 6770606
Author: nikolay_tikhonov 
Authored: Mon Aug 10 13:33:28 2015 +0300
Committer: nikolay_tikhonov 
Committed: Mon Aug 10 13:33:28 2015 +0300

--
 .../java/org/apache/ignite/configuration/IgniteConfiguration.java   | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e42f954f/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
 
b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
index e1aff25..546c382 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
@@ -194,7 +194,6 @@ public class IgniteConfiguration {
 
 /** Default failure detection timeout in millis. */
 @SuppressWarnings("UnnecessaryBoxing")
-//public static final Long DFLT_FAILURE_DETECTION_TIMEOUT = new 
Long(10_000);
 public static final Long DFLT_FAILURE_DETECTION_TIMEOUT = new Long(10_000);
 
 /** Optional grid name. */



[28/34] incubator-ignite git commit: # Fixed potential NPE in GridCachePartitionExchangeManager.dumpPendingObjects

2015-08-14 Thread av
# Fixed potential NPE in GridCachePartitionExchangeManager.dumpPendingObjects


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ae11e9b5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ae11e9b5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ae11e9b5

Branch: refs/heads/ignite-1093
Commit: ae11e9b5aa9af4d0d58e2a16dd3a3331969961df
Parents: 19fb305
Author: sboikov 
Authored: Tue Aug 11 09:42:02 2015 +0300
Committer: sboikov 
Committed: Tue Aug 11 09:42:43 2015 +0300

--
 .../GridCachePartitionExchangeManager.java  | 32 
 1 file changed, 20 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae11e9b5/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 cf49197..e00d3b7 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
@@ -984,25 +984,33 @@ public class GridCachePartitionExchangeManager 
extends GridCacheSharedMana
  *
  */
 public void dumpPendingObjects() {
-U.warn(log, "Pending transactions:");
+IgniteTxManager tm = cctx.tm();
 
-for (IgniteInternalTx tx : cctx.tm().activeTransactions())
-U.warn(log, ">>> " + tx);
+if (tm != null) {
+U.warn(log, "Pending transactions:");
 
-U.warn(log, "Pending explicit locks:");
+for (IgniteInternalTx tx : tm.activeTransactions())
+U.warn(log, ">>> " + tx);
+}
 
-for (GridCacheExplicitLockSpan lockSpan : 
cctx.mvcc().activeExplicitLocks())
-U.warn(log, ">>> " + lockSpan);
+GridCacheMvccManager mvcc = cctx.mvcc();
 
-U.warn(log, "Pending cache futures:");
+if (mvcc != null) {
+U.warn(log, "Pending explicit locks:");
 
-for (GridCacheFuture fut : cctx.mvcc().activeFutures())
-U.warn(log, ">>> " + fut);
+for (GridCacheExplicitLockSpan lockSpan : 
mvcc.activeExplicitLocks())
+U.warn(log, ">>> " + lockSpan);
 
-U.warn(log, "Pending atomic cache futures:");
+U.warn(log, "Pending cache futures:");
 
-for (GridCacheFuture fut : cctx.mvcc().atomicFutures())
-U.warn(log, ">>> " + fut);
+for (GridCacheFuture fut : mvcc.activeFutures())
+U.warn(log, ">>> " + fut);
+
+U.warn(log, "Pending atomic cache futures:");
+
+for (GridCacheFuture fut : mvcc.atomicFutures())
+U.warn(log, ">>> " + fut);
+}
 }
 
 /**



[15/34] incubator-ignite git commit: License generation hotfix

2015-08-14 Thread av
License generation hotfix


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6e496e67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6e496e67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6e496e67

Branch: refs/heads/ignite-1093
Commit: 6e496e67e7b3a1c7cd6e31555a3198a833252f1d
Parents: b031525
Author: Anton Vinogradov 
Authored: Thu Aug 6 13:44:36 2015 +0300
Committer: Anton Vinogradov 
Committed: Thu Aug 6 13:44:36 2015 +0300

--
 parent/pom.xml | 97 ++---
 1 file changed, 48 insertions(+), 49 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e496e67/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index e703502..efa6494 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -140,6 +140,13 @@
 4.11
 test
 
+
+
+org.apache.ignite
+ignite-apache-license-gen
+${project.version}
+test
+
 
 
 
@@ -567,60 +574,52 @@
 
 
 
+
+
+org.apache.maven.plugins
+maven-remote-resources-plugin
+
+
+ignite-dependencies
+
+process
+
+
+
+
org.apache.ignite:ignite-apache-license-gen:${project.version}
+
+true
+
+
+
+
+
+
+org.apache.maven.plugins
+maven-antrun-plugin
+1.7
+
+
+licenses-file-rename
+
+run
+
+compile
+
+
+
+
+
+false
+
+
+
+
 
 
 
 
 
-apache-release
-
-
-
-org.apache.maven.plugins
-maven-remote-resources-plugin
-
-
-ignite-dependencies
-
-process
-
-
-
-
org.apache.ignite:ignite-apache-license-gen:${project.version}
-
-true
-
-
-
-
-
-
-org.apache.maven.plugins
-maven-antrun-plugin
-1.7
-
-
-licenses-file-rename
-
-run
-
-compile
-
-
-
-
-
-false
-  
-
-
-
-
-
-
-
-
-
 check-licenses
 
 



[34/34] incubator-ignite git commit: ignite-1093

2015-08-14 Thread av
ignite-1093


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/64319443
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/64319443
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/64319443

Branch: refs/heads/ignite-1093
Commit: 64319443ab55aa4a0fc4c56182c774dec8446d48
Parents: 50d32b3
Author: Anton Vinogradov 
Authored: Fri Aug 14 16:29:31 2015 +0300
Committer: Anton Vinogradov 
Committed: Fri Aug 14 16:29:31 2015 +0300

--
 .../configuration/CacheConfiguration.java   |  27 ++
 .../communication/GridIoMessageFactory.java |   7 +-
 .../processors/cache/GridCacheIoManager.java|   8 +
 .../dht/preloader/GridDhtPartitionDemander.java | 156 ---
 .../dht/preloader/GridDhtPartitionSupplier.java |  25 +-
 .../GridDhtPartitionSupplyMessageV2.java| 423 +++
 .../GridCacheMassiveRebalancingSelfTest.java| 210 -
 ...ridCacheMassiveRebalancingAsyncSelfTest.java |  37 ++
 ...GridCacheMassiveRebalancingSyncSelfTest.java | 252 +++
 9 files changed, 864 insertions(+), 281 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64319443/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
 
b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index 3ad0f01..a19e136 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -57,6 +57,9 @@ public class CacheConfiguration extends 
MutableConfiguration {
 /** Default rebalance timeout (ms).*/
 public static final long DFLT_REBALANCE_TIMEOUT = 1;
 
+/** Default rebalance batches count. */
+public static final long DFLT_REBALANCE_BATCHES_COUNT = 3;
+
 /** Time in milliseconds to wait between rebalance messages to avoid 
overloading CPU. */
 public static final long DFLT_REBALANCE_THROTTLE = 0;
 
@@ -240,6 +243,9 @@ public class CacheConfiguration extends 
MutableConfiguration {
 /** Off-heap memory size. */
 private long offHeapMaxMem = DFLT_OFFHEAP_MEMORY;
 
+/** Rebalance batches count. */
+private long rebalanceBatchesCount = DFLT_REBALANCE_BATCHES_COUNT;
+
 /** */
 private boolean swapEnabled = DFLT_SWAP_ENABLED;
 
@@ -1751,6 +1757,27 @@ public class CacheConfiguration extends 
MutableConfiguration {
 }
 
 /**
+ * To gain better rebalancing performance supplier node can provide mode 
than one batch at start and provide
+ * one new to each next demand request.
+ *
+ * Gets number of batches generated by supply node at rebalancing start.
+ *
+ * @return
+ */
+public long getRebalanceBatchesCount() {
+return rebalanceBatchesCount;
+}
+
+/**
+ * Sets number of batches generated by supply node at rebalancing start.
+ *
+ * @param rebalanceBatchesCnt batches count.
+ */
+public void setRebalanceBatchesCount(long rebalanceBatchesCnt) {
+this.rebalanceBatchesCount = rebalanceBatchesCnt;
+}
+
+/**
  * Gets cache store session listener factories.
  *
  * @return Cache store session listener factories.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64319443/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
index 7fe8da8..7ddbfb7 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
@@ -600,7 +600,12 @@ public class GridIoMessageFactory implements 
MessageFactory {
 
 break;
 
-// [-3..112] - this
+case 113:
+msg = new GridDhtPartitionSupplyMessageV2();
+
+break;
+
+// [-3..113] - this
 // [120..123] - DR
 // [-4..-22] - SQL
 default:

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64319443/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
--
diff --git 
a/modules/core/src/m

[29/34] incubator-ignite git commit: # ignite-1229: stop ping process when node left topology

2015-08-14 Thread av
# ignite-1229: stop ping process when node left topology


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d5986c26
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d5986c26
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d5986c26

Branch: refs/heads/ignite-1093
Commit: d5986c265c9f68c2a98c48d4ba75444fad9e6725
Parents: ae11e9b
Author: sboikov 
Authored: Wed Aug 12 11:42:22 2015 +0300
Committer: sboikov 
Committed: Wed Aug 12 11:42:22 2015 +0300

--
 .../ignite/spi/discovery/tcp/ServerImpl.java| 91 +---
 1 file changed, 60 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5986c26/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 92c21ed..76144e3 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
@@ -388,12 +388,15 @@ class ServerImpl extends TcpDiscoveryImpl {
 
 TcpDiscoveryNode node = ring.node(nodeId);
 
-if (node == null || !node.visible())
+if (node == null)
+return false;
+
+if (!nodeAlive(nodeId))
 return false;
 
 boolean res = pingNode(node);
 
-if (!res && !node.isClient()) {
+if (!res && !node.isClient() && nodeAlive(nodeId)) {
 LT.warn(log, null, "Failed to ping node (status check will be 
initiated): " + nodeId);
 
 msgWorker.addMessage(new TcpDiscoveryStatusCheckMessage(locNode, 
node.id()));
@@ -421,14 +424,18 @@ class ServerImpl extends TcpDiscoveryImpl {
 
 node = ring.node(node.clientRouterNodeId());
 
-if (node == null || !node.visible())
+if (node == null || !nodeAlive(node.id()))
 return false;
 }
 
 for (InetSocketAddress addr : spi.getNodeAddresses(node, 
U.sameMacs(locNode, node))) {
 try {
 // ID returned by the node should be the same as ID of the 
parameter for ping to succeed.
-IgniteBiTuple t = pingNode(addr, clientNodeId);
+IgniteBiTuple t = pingNode(addr, node.id(), 
clientNodeId);
+
+if (t == null)
+// Remote node left topology.
+return false;
 
 boolean res = node.id().equals(t.get1()) && (clientNodeId == 
null || t.get2());
 
@@ -453,12 +460,14 @@ class ServerImpl extends TcpDiscoveryImpl {
  * Pings the node by its address to see if it's alive.
  *
  * @param addr Address of the node.
+ * @param nodeId Node ID to ping. In case when client node ID is not null 
this node ID is an ID of the router node.
  * @param clientNodeId Client node ID.
- * @return ID of the remote node and "client exists" flag if node alive.
+ * @return ID of the remote node and "client exists" flag if node alive or 
{@code null} if the remote node has
+ * left a topology during the ping process.
  * @throws IgniteCheckedException If an error occurs.
  */
-private IgniteBiTuple pingNode(InetSocketAddress addr, 
@Nullable UUID clientNodeId)
-throws IgniteCheckedException {
+private @Nullable IgniteBiTuple pingNode(InetSocketAddress 
addr, @Nullable UUID nodeId,
+@Nullable UUID clientNodeId) throws IgniteCheckedException {
 assert addr != null;
 
 UUID locNodeId = getLocalNodeId();
@@ -537,6 +546,16 @@ class ServerImpl extends TcpDiscoveryImpl {
 return t;
 }
 catch (IOException | IgniteCheckedException e) {
+if (nodeId != null && !nodeAlive(nodeId)) {
+if (log.isDebugEnabled())
+log.debug("Failed to ping the node (has left 
or leaving topology): [nodeId=" + nodeId +
+']');
+
+fut.onDone((IgniteBiTuple)null);
+
+return null;
+}
+
 if (errs == null)
 errs = new ArrayList<>();
 
@@ -615,6 +634,28 @@ class ServerImpl extends TcpDiscoveryImpl {
 }
 
 /**
+ * Checks whether a node is alive or not.
+ *
+ * @param nodeId Node ID.
+ * @return {@code True} if node is in the ring and is not being removed 
from.
+ */
+private boolean nodeAlive(UUID nodeId) {
+

[19/34] incubator-ignite git commit: # ignite-1142

2015-08-14 Thread av
# ignite-1142

Signed-off-by: Yakov Zhdanov 


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d7dd4a02
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d7dd4a02
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d7dd4a02

Branch: refs/heads/ignite-1093
Commit: d7dd4a0272aff8e00324254ac97f47393d05f70c
Parents: 63944d4
Author: S.Vladykin 
Authored: Thu Aug 6 16:24:56 2015 +0300
Committer: Yakov Zhdanov 
Committed: Thu Aug 6 16:27:59 2015 +0300

--
 .../cache/query/GridCacheSqlQuery.java  |  33 ++-
 .../cache/query/GridCacheTwoStepQuery.java  |  34 +--
 .../processors/query/h2/IgniteH2Indexing.java   |  27 +-
 .../processors/query/h2/sql/GridSqlElement.java |  18 +-
 .../query/h2/sql/GridSqlFunction.java   |  17 +-
 .../processors/query/h2/sql/GridSqlQuery.java   |   4 +-
 .../query/h2/sql/GridSqlQueryParser.java|  94 ---
 .../query/h2/sql/GridSqlQuerySplitter.java  | 117 +
 .../processors/query/h2/sql/GridSqlSelect.java  |  76 +++---
 .../processors/query/h2/sql/GridSqlType.java|  24 +-
 .../processors/query/h2/sql/GridSqlUnion.java   |   2 +-
 .../h2/twostep/GridReduceQueryExecutor.java | 211 ++-
 .../query/h2/twostep/GridThreadLocalTable.java  | 262 +++
 .../IgniteCacheAbstractFieldsQuerySelfTest.java |   2 +-
 14 files changed, 614 insertions(+), 307 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7dd4a02/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
index 7a0e140..d5eb379 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
@@ -26,6 +26,7 @@ import org.apache.ignite.marshaller.*;
 import org.apache.ignite.plugin.extensions.communication.*;
 
 import java.nio.*;
+import java.util.*;
 
 /**
  * Query.
@@ -38,9 +39,6 @@ public class GridCacheSqlQuery implements Message {
 public static final Object[] EMPTY_PARAMS = {};
 
 /** */
-private String alias;
-
-/** */
 @GridToStringInclude
 private String qry;
 
@@ -52,6 +50,11 @@ public class GridCacheSqlQuery implements Message {
 /** */
 private byte[] paramsBytes;
 
+/** */
+@GridToStringInclude
+@GridDirectTransient
+private LinkedHashMap columns;
+
 /**
  * For {@link Message}.
  */
@@ -60,24 +63,32 @@ public class GridCacheSqlQuery implements Message {
 }
 
 /**
- * @param alias Alias.
  * @param qry Query.
  * @param params Query parameters.
  */
-public GridCacheSqlQuery(String alias, String qry, Object[] params) {
+public GridCacheSqlQuery(String qry, Object[] params) {
 A.ensure(!F.isEmpty(qry), "qry must not be empty");
 
-this.alias = alias;
 this.qry = qry;
 
 this.params = F.isEmpty(params) ? EMPTY_PARAMS : params;
 }
 
 /**
- * @return Alias.
+ * @return Columns.
  */
-public String alias() {
-return alias;
+public LinkedHashMap columns() {
+return columns;
+}
+
+/**
+ * @param columns Columns.
+ * @return {@code this}.
+ */
+public GridCacheSqlQuery columns(LinkedHashMap columns) {
+this.columns = columns;
+
+return this;
 }
 
 /**
@@ -138,7 +149,7 @@ public class GridCacheSqlQuery implements Message {
 
 switch (writer.state()) {
 case 0:
-if (!writer.writeString("alias", alias))
+if (!writer.writeString("alias", null))
 return false;
 
 writer.incrementState();
@@ -169,7 +180,7 @@ public class GridCacheSqlQuery implements Message {
 
 switch (reader.state()) {
 case 0:
-alias = reader.readString("alias");
+reader.readString("alias");
 
 if (!reader.isLastRead())
 return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7dd4a02/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/

[18/34] incubator-ignite git commit: Merge remote-tracking branch 'origin/master'

2015-08-14 Thread av
Merge remote-tracking branch 'origin/master'


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/63944d41
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/63944d41
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/63944d41

Branch: refs/heads/ignite-1093
Commit: 63944d41d9bb7e9e74366f935b9f620e01bc36ce
Parents: 56efb6b b94c130
Author: Yakov Zhdanov 
Authored: Thu Aug 6 15:54:01 2015 +0300
Committer: Yakov Zhdanov 
Committed: Thu Aug 6 15:54:01 2015 +0300

--
 assembly/release-hadoop.xml |  5 +
 .../config/benchmark-multicast.properties   |  1 +
 parent/pom.xml  | 97 ++--
 3 files changed, 54 insertions(+), 49 deletions(-)
--




[26/34] incubator-ignite git commit: ignite-1222

2015-08-14 Thread av
ignite-1222


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/fbda19d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/fbda19d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/fbda19d4

Branch: refs/heads/ignite-1093
Commit: fbda19d4b530051f0ab6784379afe66be7d44c76
Parents: cd844a7
Author: Anton Vinogradov 
Authored: Mon Aug 10 16:11:46 2015 +0300
Committer: Anton Vinogradov 
Committed: Mon Aug 10 16:11:46 2015 +0300

--
 .../cache/CacheStopAndDestroySelfTest.java  | 87 
 1 file changed, 87 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbda19d4/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
index 803789e..17f0db7 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
@@ -712,93 +712,6 @@ public class CacheStopAndDestroySelfTest extends 
GridCommonAbstractTest {
 }
 
 /**
- * Tests concurrent close.
- *
- * @throws Exception If failed.
- */
-public void testConcurrentCloseSetWithTry() throws Exception {
-final AtomicInteger a1 = new AtomicInteger();
-final AtomicInteger a2 = new AtomicInteger();
-final AtomicInteger a3 = new AtomicInteger();
-final AtomicInteger a4 = new AtomicInteger();
-
-Thread t1 = new Thread(new Runnable() {
-@Override public void run() {
-Thread.currentThread().setName("test-thread-1");
-
-closeWithTry(a1, 0);
-}
-});
-Thread t2 = new Thread(new Runnable() {
-@Override public void run() {
-Thread.currentThread().setName("test-thread-2");
-
-closeWithTry(a2, 0);
-}
-});
-Thread t3 = new Thread(new Runnable() {
-@Override public void run() {
-Thread.currentThread().setName("test-thread-3");
-
-closeWithTry(a3, 2);
-}
-});
-Thread t4 = new Thread(new Runnable() {
-@Override public void run() {
-Thread.currentThread().setName("test-thread-4");
-
-closeWithTry(a4, 2);
-}
-});
-
-IgniteCache cache = 
grid(0).getOrCreateCache(getDhtConfig());
-
-cache.close();
-
-t1.start();
-t2.start();
-t3.start();
-t4.start();
-
-try {
-U.sleep(1000);
-}
-finally {
-stop = true;
-}
-
-t1.join();
-t2.join();
-t3.join();
-t4.join();
-
-assert a1.get() > 1;
-assert a2.get() > 1;
-assert a3.get() > 1;
-assert a4.get() > 1;
-
-checkUsageFails(cache);
-}
-
-/**
- * @param a AtomicInteger.
- * @param node Node.
- */
-public void closeWithTry(AtomicInteger a, int node) {
-while (!stop) {
-try (IgniteCache cache = 
grid(node).getOrCreateCache(getDhtConfig())) {
-a.incrementAndGet();
-
-assert cache.get(KEY_VAL) == null || 
cache.get(KEY_VAL).equals(KEY_VAL);
-
-cache.put(KEY_VAL, KEY_VAL);
-
-assert cache.get(KEY_VAL).equals(KEY_VAL);
-}
-}
-}
-
-/**
  * Tests start -> destroy -> start -> close using CacheManager.
  */
 public void testTckStyleCreateDestroyClose() {



[21/34] incubator-ignite git commit: # ignite-1209

2015-08-14 Thread av
# ignite-1209

Signed-off-by: Yakov Zhdanov 


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d9acbd1d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d9acbd1d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d9acbd1d

Branch: refs/heads/ignite-1093
Commit: d9acbd1da16efac59d3cc44c18c16af2db5f50f2
Parents: ebcdb4b
Author: ashutak 
Authored: Thu Aug 6 18:21:08 2015 +0300
Committer: Yakov Zhdanov 
Committed: Thu Aug 6 18:29:44 2015 +0300

--
 scripts/git-apply-patch.sh | 94 -
 scripts/git-patch-functions.sh | 56 ++
 2 files changed, 4 insertions(+), 146 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d9acbd1d/scripts/git-apply-patch.sh
--
diff --git a/scripts/git-apply-patch.sh b/scripts/git-apply-patch.sh
deleted file mode 100755
index 757cd26..000
--- a/scripts/git-apply-patch.sh
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-#
-# Git patch-file applier.
-#
-echo 'Usage: scripts/git-apply-patch.sh  [-ih|--ignitehome 
] [-idb|--ignitedefbranch ] [-ph|--patchhome ]'
-echo "It should be called from IGNITE_HOME directory."
-echo "Patch will be applied to DEFAULT_BRANCH from PATCHES_HOME."
-echo "Note: you can use ${IGNITE_HOME}/scripts/git-patch-prop-local.sh to set 
your own local properties (to rewrite settings at git-patch-prop-local.sh). "
-echo
-
-#
-# Init home and import properties and functions.
-#
-if [ -z ${IGNITE_HOME} ] # Script can be called from not IGNITE_HOME if 
IGNITE_HOME was set.
-then IGNITE_HOME=$PWD
-fi
-
-. ${IGNITE_HOME}/scripts/git-patch-prop.sh # Import properties.
-. ${IGNITE_HOME}/scripts/git-patch-functions.sh # Import patch functions.
-
-if [ -f ${IGNITE_HOME}/scripts/git-patch-prop-local.sh ] # Whether a local 
user properties file exists.
-then . ${IGNITE_HOME}/scripts/git-patch-prop-local.sh # Import user 
properties (it will rewrite global properties).
-fi
-
-#
-# Ignite task.
-#
-IGNITE_TASK=$1
-
-#
-# Read command line params.
-#
-while [[ $# > 1 ]]
-do
-key="$1"
-
-case $key in
--ih|--ignitehome)
-IGNITE_HOME="$2"
-shift
-;;
-
--idb|--ignitedefbranch)
-IGNITE_DEFAULT_BRANCH="$2"
-shift
-;;
-
--ph|--patchhome)
-PATCHES_HOME="$2"
-shift
-;;
-*)
-
-echo "Unknown parameter: ${key}"
-;;
-esac
-shift
-done
-
-echo "IGNITE_HOME: ${IGNITE_HOME}"
-echo "Default branch : ${IGNITE_DEFAULT_BRANCH}"
-echo "Ignite task: ${IGNITE_TASK}"
-echo
-echo "PATCHES_HOME   : ${PATCHES_HOME}"
-echo
-
-#
-# Main script logic.
-#
-
-currentAndDefaultBranchesShouldBeEqual ${IGNITE_HOME} ${IGNITE_DEFAULT_BRANCH}
-
-requireCleanWorkTree ${IGNITE_HOME}
-
-IGNITE_PATCH_FILE=${PATCHES_HOME}/${IGNITE_DEFAULT_BRANCH}_${IGNITE_TASK}.patch
-
-applyPatch ${IGNITE_HOME} ${IGNITE_DEFAULT_BRANCH} ${IGNITE_PATCH_FILE}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d9acbd1d/scripts/git-patch-functions.sh
--
diff --git a/scripts/git-patch-functions.sh b/scripts/git-patch-functions.sh
index 3cc1bb0..cade691 100644
--- a/scripts/git-patch-functions.sh
+++ b/scripts/git-patch-functions.sh
@@ -50,13 +50,16 @@ formatPatch () {
 cd ${GIT_HOME}
 
 git checkout ${DEFAULT_BRANCH}
+
+DEF_BRANCH_REV="$(git rev-parse --short HEAD)"
+
 git checkout -b tmppatch
 
 # Merge to make only one commit.
 git merge --squash ${PATCHED_BRANCH}
 git commit -a -m "# ${PATCHED_BRANCH}"
 
-
PATCH_FILE=${PATCHES_HOME}'/'${DEFAULT_BRANCH}_${PATCHED_BRANCH}${PATCH_SUFFIX}
+
PATCH_FILE=${PATCHES_HOME}'/'${DEFAULT_BRANCH}_${DEF_BRANCH_REV}_${PATCHED_BRANCH}${PATCH_SUFFIX}
 
 git format-patch ${DEFAULT_BRANCH}  --stdout > ${PATCH_FILE}
 echo "Patch file created."
@@ -

[24/34] incubator-ignite git commit: # Fixed potential NPE in GridCachePartitionExchangeManager.dumpDebugInfo

2015-08-14 Thread av
# Fixed potential NPE in GridCachePartitionExchangeManager.dumpDebugInfo


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/bd770a54
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/bd770a54
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/bd770a54

Branch: refs/heads/ignite-1093
Commit: bd770a54a554c8c22f36ea00f8c735218c29b330
Parents: d9acbd1
Author: sboikov 
Authored: Mon Aug 10 16:08:10 2015 +0300
Committer: sboikov 
Committed: Mon Aug 10 16:08:10 2015 +0300

--
 .../cache/GridCachePartitionExchangeManager.java| 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bd770a54/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 c26f5c3..cf49197 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
@@ -962,15 +962,19 @@ public class GridCachePartitionExchangeManager 
extends GridCacheSharedMana
 for (GridDhtPartitionsExchangeFuture fut : pendingExchangeFuts)
 U.warn(log, ">>> " + fut);
 
-U.warn(log, "Last 10 exchange futures (total: " + exchFuts.size() + 
"):");
+ExchangeFutureSet exchFuts = this.exchFuts;
 
-int cnt = 0;
+if (exchFuts != null) {
+U.warn(log, "Last 10 exchange futures (total: " + exchFuts.size() 
+ "):");
 
-for (GridDhtPartitionsExchangeFuture fut : exchFuts) {
-U.warn(log, ">>> " + fut);
+int cnt = 0;
+
+for (GridDhtPartitionsExchangeFuture fut : exchFuts) {
+U.warn(log, ">>> " + fut);
 
-if (++cnt == 10)
-break;
+if (++cnt == 10)
+break;
+}
 }
 
 dumpPendingObjects();



[31/34] incubator-ignite git commit: ignite-1093

2015-08-14 Thread av
ignite-1093


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6640c9a5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6640c9a5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6640c9a5

Branch: refs/heads/ignite-1093
Commit: 6640c9a58dd5c2db0a87d7b3307d95d27109b5c1
Parents: 8f36482
Author: Anton Vinogradov 
Authored: Wed Aug 12 14:32:25 2015 +0300
Committer: Anton Vinogradov 
Committed: Wed Aug 12 14:32:25 2015 +0300

--
 .../processors/cache/GridCacheMassiveRebalancingSelfTest.java   | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6640c9a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMassiveRebalancingSelfTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMassiveRebalancingSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMassiveRebalancingSelfTest.java
index ca95905..0771509 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMassiveRebalancingSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMassiveRebalancingSelfTest.java
@@ -120,6 +120,7 @@ public class GridCacheMassiveRebalancingSelfTest extends 
GridCommonAbstractTest
 
 stopGrid(0);
 
+//TODO: refactor to get futures by topology
 while (f1 == 
((GridCacheAdapter)grid(1).context().cache().internalCache(CACHE_NAME_DHT)).preloader().syncFuture()
 ||
 f2 == 
((GridCacheAdapter)grid(2).context().cache().internalCache(CACHE_NAME_DHT)).preloader().syncFuture())
 U.sleep(100);



[23/34] incubator-ignite git commit: Merge branch 'ignite-1189'

2015-08-14 Thread av
Merge branch 'ignite-1189'


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/cd844a7f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/cd844a7f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/cd844a7f

Branch: refs/heads/ignite-1093
Commit: cd844a7f959c79e3b5e9364ab9993f1c3d4fc91e
Parents: d9acbd1 e42f954
Author: nikolay_tikhonov 
Authored: Mon Aug 10 13:34:03 2015 +0300
Committer: nikolay_tikhonov 
Committed: Mon Aug 10 13:34:03 2015 +0300

--
 .../configuration/IgniteConfiguration.java  |  1 -
 .../dht/atomic/GridDhtAtomicCache.java  | 36 ++--
 2 files changed, 26 insertions(+), 11 deletions(-)
--




[11/34] incubator-ignite git commit: msg format

2015-08-14 Thread av
msg format


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d7623b47
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d7623b47
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d7623b47

Branch: refs/heads/ignite-1093
Commit: d7623b47abea23c685856b36ade75027efbb3cc5
Parents: 2173b0e
Author: Yakov Zhdanov 
Authored: Thu Aug 6 12:38:24 2015 +0300
Committer: Yakov Zhdanov 
Committed: Thu Aug 6 12:38:24 2015 +0300

--
 .../ignite/spi/discovery/tcp/ClientImpl.java| 27 +++-
 1 file changed, 21 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7623b47/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 0f9c100..d5d6ea2 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
@@ -29,6 +29,7 @@ import org.apache.ignite.lang.*;
 import org.apache.ignite.spi.*;
 import org.apache.ignite.spi.discovery.*;
 import org.apache.ignite.spi.discovery.tcp.internal.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.*;
 import org.apache.ignite.spi.discovery.tcp.messages.*;
 import org.jetbrains.annotations.*;
 import org.jsr166.*;
@@ -159,7 +160,9 @@ class ClientImpl extends TcpDiscoveryImpl {
 
 /** {@inheritDoc} */
 @Override public void spiStart(@Nullable String gridName) throws 
IgniteSpiException {
-spi.initLocalNode(0, true);
+spi.initLocalNode(
+0,
+true);
 
 locNode = spi.locNode;
 
@@ -190,7 +193,10 @@ class ClientImpl extends TcpDiscoveryImpl {
 throw new IgniteSpiException("Thread has been interrupted.", e);
 }
 
-timer.schedule(new HeartbeatSender(), spi.hbFreq, spi.hbFreq);
+timer.schedule(
+new HeartbeatSender(),
+spi.hbFreq,
+spi.hbFreq);
 
 spi.printStartInfo();
 }
@@ -408,7 +414,11 @@ class ClientImpl extends TcpDiscoveryImpl {
 if (timeout > 0 && (U.currentTimeMillis() - startTime) > 
timeout)
 return null;
 
-LT.warn(log, null, "No addresses registered in the IP 
finder (will retry in 2000ms): "
+LT.warn(log, null, "IP finder returned empty addresses 
list. " +
+"Please check IP finder configuration" +
+(spi.ipFinder instanceof 
TcpDiscoveryMulticastIpFinder ?
+" and make sure multicast works on your 
network. " : ". ") +
+"Will retry every 2 secs."
 + spi.ipFinder, true);
 
 Thread.sleep(2000);
@@ -460,7 +470,7 @@ class ClientImpl extends TcpDiscoveryImpl {
 return null;
 
 LT.warn(log, null, "Failed to connect to any address from IP 
finder (will retry to join topology " +
-"in 2000ms): " + toOrderedList(addrs0), true);
+"every 2 secs): " + toOrderedList(addrs0), true);
 
 Thread.sleep(2000);
 }
@@ -682,7 +692,9 @@ class ClientImpl extends TcpDiscoveryImpl {
 U.interrupt(msgWorker);
 
 U.join(sockWriter, log);
-U.join(msgWorker, log);
+U.join(
+msgWorker,
+log);
 }
 
 /** {@inheritDoc} */
@@ -987,7 +999,10 @@ class ClientImpl extends TcpDiscoveryImpl {
 }
 }
 
-spi.writeToSocket(sock, msg, socketTimeout);
+spi.writeToSocket(
+sock,
+msg,
+socketTimeout);
 
 msg = null;
 



Git Push Summary

2015-08-14 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-gg-10606 [created] 776084772


[1/2] incubator-ignite git commit: # ignite-1228

2015-08-14 Thread vkulichenko
Repository: incubator-ignite
Updated Branches:
  refs/heads/master 776084772 -> d0536dcec


# ignite-1228

Signed-off-by: Valentin Kulichenko 


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e5eef508
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e5eef508
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e5eef508

Branch: refs/heads/master
Commit: e5eef50844580bd9ef2dba6bdfc1efca8992e78a
Parents: 8ecddcc
Author: Valentin Kulichenko 
Authored: Tue Aug 11 18:34:58 2015 -0700
Committer: Valentin Kulichenko 
Committed: Thu Aug 13 18:57:20 2015 -0700

--
 .../main/java/org/apache/ignite/logger/log4j/Log4JLogger.java| 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e5eef508/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java
--
diff --git 
a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java 
b/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java
index e3828ab..bc843fb 100644
--- 
a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java
+++ 
b/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java
@@ -342,6 +342,10 @@ public class Log4JLogger implements IgniteLogger, 
LoggerNodeIdAware, Log4jFileAw
 impl.setLevel(logLevel);
 }
 
+// If still don't have appenders, disable logging.
+if (!isConfigured())
+impl.setLevel(Level.OFF);
+
 quiet0 = quiet;
 inited = true;
 }



[2/2] incubator-ignite git commit: ignite-1228 - Closed #18

2015-08-14 Thread vkulichenko
ignite-1228 - Closed #18


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d0536dce
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d0536dce
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d0536dce

Branch: refs/heads/master
Commit: d0536dcec02e46cc1e68a13676e87a140d511db2
Parents: 7760847 e5eef50
Author: Valentin Kulichenko 
Authored: Fri Aug 14 15:31:34 2015 -0700
Committer: Valentin Kulichenko 
Committed: Fri Aug 14 15:31:34 2015 -0700

--
 .../main/java/org/apache/ignite/logger/log4j/Log4JLogger.java| 4 
 1 file changed, 4 insertions(+)
--




incubator-ignite git commit: ignite-534 - IgniteJmsStreamer implemented. Closes #14.

2015-08-14 Thread vkulichenko
Repository: incubator-ignite
Updated Branches:
  refs/heads/master d0536dcec -> 0d701127c


ignite-534 - IgniteJmsStreamer implemented. Closes #14.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0d701127
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0d701127
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0d701127

Branch: refs/heads/master
Commit: 0d701127c8a95a30f4c484247e84ab1f10f95e3a
Parents: d0536dc
Author: Raul Kripalani 
Authored: Fri Aug 14 16:11:19 2015 -0700
Committer: Valentin Kulichenko 
Committed: Fri Aug 14 16:11:19 2015 -0700

--
 .../ignite/internal/util/GridArgumentCheck.java |  17 +
 modules/jms11/pom.xml   |  98 
 .../apache/ignite/stream/jms11/JmsStreamer.java | 524 ++
 .../ignite/stream/jms11/MessageTransformer.java |  43 ++
 .../stream/jms11/IgniteJmsStreamerTest.java | 551 +++
 .../jms11/IgniteJmsStreamerTestSuite.java   |  34 ++
 .../ignite/stream/jms11/TestTransformers.java   | 123 +
 pom.xml |   1 +
 8 files changed, 1391 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0d701127/modules/core/src/main/java/org/apache/ignite/internal/util/GridArgumentCheck.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/GridArgumentCheck.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/GridArgumentCheck.java
index b94bae6..8289f90 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/GridArgumentCheck.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/GridArgumentCheck.java
@@ -35,6 +35,9 @@ public class GridArgumentCheck {
 /** Not empty argument error message suffix. */
 private static final String NOT_EMPTY_SUFFIX = " must not be empty.";
 
+/** Not null or empty error message suffix. */
+private static final String NOT_NULL_OR_EMPTY_SUFFIX = " must not be null 
or empty.";
+
 /**
  * Checks if given argument value is not {@code null}. Otherwise - throws 
{@link NullPointerException}.
  *
@@ -145,4 +148,18 @@ public class GridArgumentCheck {
 if (arr.length == 0)
 throw new IllegalArgumentException(INVALID_ARG_MSG_PREFIX + name + 
NOT_EMPTY_SUFFIX);
 }
+
+/**
+ * Checks that a String is not null or empty.
+ *
+ * @param value Value to check.
+ * @param name Argument name.
+ */
+public static void notNullOrEmpty(String value, String name) {
+notNull(value, name);
+
+if (value.trim().length() == 0) {
+throw new IllegalArgumentException(INVALID_ARG_MSG_PREFIX + name + 
NOT_NULL_OR_EMPTY_SUFFIX);
+}
+}
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0d701127/modules/jms11/pom.xml
--
diff --git a/modules/jms11/pom.xml b/modules/jms11/pom.xml
new file mode 100644
index 000..c93ea9a
--- /dev/null
+++ b/modules/jms11/pom.xml
@@ -0,0 +1,98 @@
+
+
+
+
+
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+4.0.0
+
+
+org.apache.ignite
+ignite-parent
+1
+../../parent
+
+
+ignite-jms11
+1.4.1-SNAPSHOT
+
+
+5.11.1
+
+
+
+
+org.apache.ignite
+ignite-core
+${project.version}
+
+
+
+javax.jms
+jms-api
+1.1-rev-1
+
+
+
+org.apache.activemq
+activemq-client
+${activemq.version}
+test
+
+
+
+org.apache.activemq
+activemq-broker
+${activemq.version}
+test
+
+
+
+org.apache.activemq
+activemq-kahadb-store
+${activemq.version}
+test
+
+
+
+org.apache.ignite
+ignite-log4j
+${project.version}
+test
+
+
+
+org.apache.ignite
+ignite-spring
+${project.version}
+test
+
+
+
+org.apache.ignite
+ignite-core
+${project.version}
+test-jar
+test
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0d701127/modules/jms11/src/main/java/org/apache/ignite/stream/jms11/JmsStreamer.java
--

svn commit: r1696012 - in /incubator/ignite/site/trunk: ./ css/ features/ images/ includes/ scss/ use-cases/caching/ use-cases/datagridreplace/ use-cases/hadoop/ use-cases/platforms/ use-cases/spark/

2015-08-14 Thread dsetrakyan
Author: dsetrakyan
Date: Sat Aug 15 01:35:18 2015
New Revision: 1696012

URL: http://svn.apache.org/r1696012
Log:
Added use-cases.

Added:
incubator/ignite/site/trunk/images/ignite_filesystem.png   (with props)
incubator/ignite/site/trunk/images/partitioned_cache.png   (with props)
incubator/ignite/site/trunk/images/replicated_cache.png   (with props)
incubator/ignite/site/trunk/use-cases/caching/jcache-provider.html   (with 
props)
incubator/ignite/site/trunk/use-cases/caching/key-value-store.html   (with 
props)
incubator/ignite/site/trunk/use-cases/hadoop/
incubator/ignite/site/trunk/use-cases/hadoop/hdfs-cache.html   (with props)
incubator/ignite/site/trunk/use-cases/hadoop/mapreduce.html   (with props)
incubator/ignite/site/trunk/use-cases/platforms/
incubator/ignite/site/trunk/use-cases/platforms/dotnet.html   (with props)
incubator/ignite/site/trunk/use-cases/spark/
incubator/ignite/site/trunk/use-cases/spark/shared-memory-layer.html   
(with props)
incubator/ignite/site/trunk/use-cases/spark/sql-queries.html   (with props)
incubator/ignite/site/trunk/usecases.html
  - copied, changed from r1695208, incubator/ignite/site/trunk/features.html
Modified:
incubator/ignite/site/trunk/css/all.css
incubator/ignite/site/trunk/features.html
incubator/ignite/site/trunk/features/igfs.html
incubator/ignite/site/trunk/features/igniterdd.html
incubator/ignite/site/trunk/features/mapreduce.html
incubator/ignite/site/trunk/includes/header.html
incubator/ignite/site/trunk/scss/ignite.scss
incubator/ignite/site/trunk/use-cases/caching/database-caching.html
incubator/ignite/site/trunk/use-cases/caching/hibernate-l2-cache.html
incubator/ignite/site/trunk/use-cases/caching/web-session-clustering.html
incubator/ignite/site/trunk/use-cases/datagridreplace/coherence.html
incubator/ignite/site/trunk/use-cases/datagridreplace/gemfire.html
incubator/ignite/site/trunk/use-cases/datagridreplace/hazelcast.html

Modified: incubator/ignite/site/trunk/css/all.css
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/css/all.css?rev=1696012&r1=1696011&r2=1696012&view=diff
==
--- incubator/ignite/site/trunk/css/all.css (original)
+++ incubator/ignite/site/trunk/css/all.css Sat Aug 15 01:35:18 2015
@@ -7711,7 +7711,7 @@ sub {
 .feature-block {
   margin-top: 40px;
   padding: 40px 0 24px;
-  border-top: 1px dotted #ddd;
+  border-top: 2px dotted #ddd;
 }
 .feature-block .inside-feature-block-1 {
   display: inline-block;
@@ -8009,6 +8009,7 @@ section.page-section:last-child {
 }
 section.page-section ul.page-list, section.page-section ol.page-list {
   padding-left: 20px;
+  color: #333;
 }
 section.page-section ul.page-list > li, section.page-section ol.page-list > li 
{
   padding-bottom: 4px;

Modified: incubator/ignite/site/trunk/features.html
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/features.html?rev=1696012&r1=1696011&r2=1696012&view=diff
==
--- incubator/ignite/site/trunk/features.html (original)
+++ incubator/ignite/site/trunk/features.html Sat Aug 15 01:35:18 2015
@@ -52,7 +52,7 @@ under the License.
 
 
 
-Features
+Ignite 
Features
 
 
 Transactions & Analytics

Modified: incubator/ignite/site/trunk/features/igfs.html
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/features/igfs.html?rev=1696012&r1=1696011&r2=1696012&view=diff
==
Binary files - no diff available.

Modified: incubator/ignite/site/trunk/features/igniterdd.html
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/features/igniterdd.html?rev=1696012&r1=1696011&r2=1696012&view=diff
==
Binary files - no diff available.

Modified: incubator/ignite/site/trunk/features/mapreduce.html
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/features/mapreduce.html?rev=1696012&r1=1696011&r2=1696012&view=diff
==
Binary files - no diff available.

Added: incubator/ignite/site/trunk/images/ignite_filesystem.png
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/images/ignite_filesystem.png?rev=1696012&view=auto
==
Binary file - no diff available.

Propchange: incubator/ignite/site/trunk/images/ignite_filesystem.png
--
svn:mime-type = application/octet-stream

Added: incubator/ignite/site/trunk/images/partitioned_cache.png
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/tru

[31/35] incubator-ignite git commit: JavaDoc fix

2015-08-14 Thread agoncharuk
JavaDoc 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/260238e0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/260238e0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/260238e0

Branch: refs/heads/ignite-264
Commit: 260238e041c66a02f2552692bab2f44a923f7d41
Parents: ba3abce
Author: Valentin Kulichenko 
Authored: Thu Aug 13 15:50:48 2015 -0700
Committer: Valentin Kulichenko 
Committed: Thu Aug 13 15:50:48 2015 -0700

--
 .../main/java/org/apache/ignite/internal/IgnitionEx.java  | 10 +-
 .../src/main/java/org/apache/ignite/IgniteSpring.java |  8 
 2 files changed, 9 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/260238e0/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java 
b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 3790703..fd74745 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -429,7 +429,7 @@ public class IgnitionEx {
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
- *  {@link SpringApplicationContextResource 
@IgniteSpringApplicationContextResource} annotation.
+ *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
  * @return Started grid.
  * @throws IgniteCheckedException If default grid could not be started. 
This exception will be thrown
  *  also if default grid has already been started.
@@ -466,7 +466,7 @@ public class IgnitionEx {
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
- *  {@link SpringApplicationContextResource 
@IgniteSpringApplicationContextResource} annotation.
+ *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
  * @return Started grid.
  * @throws IgniteCheckedException If grid could not be started. This 
exception will be thrown
  *  also if named grid has already been started.
@@ -642,7 +642,7 @@ public class IgnitionEx {
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
- *  {@link SpringApplicationContextResource 
@IgniteSpringApplicationContextResource} annotation.
+ *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
  * @return Started grid. If Spring configuration contains multiple grid 
instances,
  *  then the 1st found instance is returned.
  * @throws IgniteCheckedException If grid could not be started or 
configuration
@@ -690,7 +690,7 @@ public class IgnitionEx {
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
- *  {@link SpringApplicationContextResource 
@IgniteSpringApplicationContextResource} annotation.
+ *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
  * @return Started grid. If Spring configuration contains multiple grid 
instances,
  *  then the 1st found instance is returned.
  * @throws IgniteCheckedException If grid could not be started or 
configuration
@@ -769,7 +769,7 @@ public class IgnitionEx {
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
- *  {@link SpringApplicationContextResource 
@IgniteSpringApplicationContextResource} annotation.
+ *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
  * @return Started grid. If Spring configuration contains multiple grid 
instances,
  *  then the 1st 

[03/35] incubator-ignite git commit: ignite-946: improving tests

2015-08-14 Thread agoncharuk
ignite-946: improving tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/719161f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/719161f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/719161f2

Branch: refs/heads/ignite-264
Commit: 719161f2d02dd1c589155800f60e02f86c469de4
Parents: 4b9f4ba
Author: Denis Magda 
Authored: Fri Jul 31 10:20:22 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:11 2015 +0300

--
 .../internal/processors/cache/query/GridCacheQueryManager.java  | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/719161f2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index 400d997..5d3f6a3 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@ -845,7 +845,6 @@ public abstract class GridCacheQueryManager extends 
GridCacheManagerAdapte
 
 try {
 val = prj.localPeek(key, 
CachePeekModes.ONHEAP_ONLY, expiryPlc);
-
 }
 catch (IgniteCheckedException e) {
 if (log.isDebugEnabled())



[18/35] incubator-ignite git commit: ignite-946: simplified VersionedEntry interface

2015-08-14 Thread agoncharuk
ignite-946: simplified VersionedEntry interface


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b6bef13e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b6bef13e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b6bef13e

Branch: refs/heads/ignite-264
Commit: b6bef13eef82d9a2e040c01881d07c186ade372e
Parents: dd3cecf
Author: Denis Magda 
Authored: Tue Aug 11 10:17:24 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 11 10:17:24 2015 +0300

--
 .../ignite/cache/version/VersionedEntry.java| 83 +---
 .../cache/version/CacheVersionedEntryImpl.java  | 23 +-
 .../cache/version/GridCacheVersionManager.java  |  4 +-
 .../CacheVersionedEntryAbstractTest.java|  9 +--
 4 files changed, 45 insertions(+), 74 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b6bef13e/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
index 1aac68a..135d681 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
@@ -24,7 +24,7 @@ import javax.cache.processor.*;
 import java.util.*;
 
 /**
- * Cache entry that stores entry's version related information.
+ * Cache entry that stores entry's version related information along with its 
data.
  *
  * To get a {@code VersionedEntry} of an {@link Cache.Entry} use {@link 
Cache.Entry#unwrap(Class)} by passing
  * {@code VersionedEntry} class to it as the argument.
@@ -42,62 +42,51 @@ import java.util.*;
  * is excluded from responses.
  * Java Example
  * 
- * Cache cache = grid(0).cache(null);
+ * IgniteCache cache = grid(0).cache(null);
  *
- *  cache.invoke(100, new EntryProcessor() {
- *  public Object process(MutableEntry entry, Object... 
arguments) throws EntryProcessorException {
- *  VersionedEntry verEntry = 
entry.unwrap(VersionedEntry.class);
- *  return entry;
- *   }
- *   });
+ * VersionedEntry entry1 = cache.invoke(100,
+ * new EntryProcessor>() {
+ *  public VersionedEntry 
process(MutableEntry entry,
+ *  Object... arguments) throws EntryProcessorException {
+ *  return entry.unwrap(VersionedEntry.class);
+ *  }
+ * });
+ *
+ * // Cache entry for the given key may be updated at some point later.
+ *
+ * VersionedEntry entry2 = cache.invoke(100,
+ * new EntryProcessor>() {
+ *  public VersionedEntry 
process(MutableEntry entry,
+ *  Object... arguments) throws EntryProcessorException {
+ *  return entry.unwrap(VersionedEntry.class);
+ *  }
+ * });
+ *
+ * if (entry1.version().compareTo(entry2.version()) < 0) {
+ * // the entry has been updated
+ * }
  * 
  */
 public interface VersionedEntry extends Cache.Entry {
 /**
- * Versions comparator.
- */
-public static final Comparator VER_COMP = new 
Comparator() {
-@Override public int compare(VersionedEntry o1, VersionedEntry o2) {
-int res = Integer.compare(o1.topologyVersion(), 
o2.topologyVersion());
-
-if (res != 0)
-return res;
-
-res = Long.compare(o1.order(), o2.order());
-
-if (res != 0)
-return res;
-
-return Integer.compare(o1.nodeOrder(), o2.nodeOrder());
-}
-};
-
-/**
- * Gets the topology version at the time when the entry with a given pair 
of key and value has been created.
- *
- * @return Topology version plus number of seconds from the start time of 
the first grid node.
- */
-public int topologyVersion();
-
-/**
- * Gets versioned entry unique order.
- * Each time a cache entry for a given key is updated a new {@code 
VersionedEntry} with increased order is created.
- *
- * @return Versioned entry unique order.
- */
-public long order();
-
-/**
- * Gets local node order at the time when the entry with a given pair of 
key and value has been created.
+ * Returns a comparable object representing the version of this cache 
entry.
+ * 
+ * It is valid to compare cache entries' versions for the same key. In 
this case the latter update will be
+ * represented by a higher version. The result of versions comparison of 
cache entries of different keys is
+ * undefined.
  *
- * @return Local node order on which this version has been assigned.
+ * @return Version of

[25/35] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-946

2015-08-14 Thread agoncharuk
Merge remote-tracking branch 'remotes/origin/master' into ignite-946


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/51a9bd85
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/51a9bd85
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/51a9bd85

Branch: refs/heads/ignite-264
Commit: 51a9bd85e5cb7cb38fcc60b7adf808fe0545e7df
Parents: 4f8f32a 36f7ba6
Author: Denis Magda 
Authored: Thu Aug 13 09:12:26 2015 +0300
Committer: Denis Magda 
Committed: Thu Aug 13 09:12:26 2015 +0300

--
 .../processors/cache/GridCacheGateway.java  |  5 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java| 91 +---
 2 files changed, 62 insertions(+), 34 deletions(-)
--




[23/35] incubator-ignite git commit: Fixed error message

2015-08-14 Thread agoncharuk
Fixed error message


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/36f7ba66
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/36f7ba66
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/36f7ba66

Branch: refs/heads/ignite-264
Commit: 36f7ba669fd5b706fd9b01c06ce20dbb7610d50f
Parents: 653c0b2
Author: Valentin Kulichenko 
Authored: Wed Aug 12 16:56:18 2015 -0700
Committer: Valentin Kulichenko 
Committed: Wed Aug 12 16:56:18 2015 -0700

--
 .../apache/ignite/internal/processors/cache/GridCacheGateway.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36f7ba66/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
index 93c5858..58c9035 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
@@ -156,7 +156,7 @@ public class GridCacheGateway {
 GridCachePreloader preldr = cache != null ? cache.preloader() : 
null;
 
 if (preldr == null)
-throw new IllegalStateException("Cache has been closed: " + 
ctx.name());
+throw new IllegalStateException("Cache has been closed or 
destroyed: " + ctx.name());
 
 preldr.startFuture().get();
 }



[10/35] incubator-ignite git commit: Merge branches 'ignite-946' and 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-946

2015-08-14 Thread agoncharuk
Merge branches 'ignite-946' and 'master' of 
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-946


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b2e6734c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b2e6734c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b2e6734c

Branch: refs/heads/ignite-264
Commit: b2e6734c76f17247a2801e63547e5edcc33f770c
Parents: 2e7799d b056a73
Author: Yakov Zhdanov 
Authored: Tue Aug 4 16:34:17 2015 +0300
Committer: Yakov Zhdanov 
Committed: Tue Aug 4 16:34:17 2015 +0300

--
 .../ClientAbstractMultiNodeSelfTest.java|   4 +-
 .../JettyRestProcessorAbstractSelfTest.java |  14 +-
 .../apache/ignite/IgniteSystemProperties.java   |   2 +-
 .../store/jdbc/CacheAbstractJdbcStore.java  |  21 +-
 .../apache/ignite/internal/IgniteKernal.java|   2 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |  43 +-
 .../managers/communication/GridIoManager.java   | 188 +++-
 .../processors/cache/GridCacheMvccManager.java  |  73 +--
 .../processors/cache/GridCacheProcessor.java|   2 +-
 .../processors/cache/GridCacheProxyImpl.java|  42 +-
 .../processors/cache/GridCacheSwapManager.java  |   2 +-
 .../GridDhtPartitionsExchangeFuture.java|  20 +-
 .../distributed/near/GridNearGetFuture.java |  20 +-
 .../handlers/query/QueryCommandHandler.java |   6 +-
 .../ignite/internal/util/IgniteUtils.java   |  16 +
 .../util/nio/GridCommunicationClient.java   |   5 +-
 .../util/nio/GridNioFinishedFuture.java |  12 +
 .../ignite/internal/util/nio/GridNioFuture.java |  14 +
 .../internal/util/nio/GridNioFutureImpl.java|  15 +
 .../util/nio/GridNioRecoveryDescriptor.java |  13 +-
 .../ignite/internal/util/nio/GridNioServer.java |   5 +
 .../util/nio/GridNioSessionMetaKey.java |   5 +-
 .../util/nio/GridShmemCommunicationClient.java  |   7 +-
 .../util/nio/GridTcpNioCommunicationClient.java |  14 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  84 +++-
 .../ignite/spi/discovery/tcp/ClientImpl.java|   2 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java|  45 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java  |   2 +-
 .../src/test/config/io-manager-benchmark.xml|   3 +-
 .../GridJobMasterLeaveAwareSelfTest.java|  10 +-
 .../IgniteClientReconnectAbstractTest.java  |   5 +-
 .../IgniteClientReconnectCacheTest.java |   5 +-
 .../GridDeploymentMessageCountSelfTest.java |   5 +-
 .../cache/CacheStopAndDestroySelfTest.java  |   8 +-
 .../GridCacheAtomicMessageCountSelfTest.java|   6 +-
 .../processors/cache/GridCacheMvccSelfTest.java |   1 -
 ...ridCacheReplicatedSynchronousCommitTest.java |   5 +-
 .../IgniteCacheAbstractStopBusySelfTest.java|   6 +-
 .../cache/IgniteCacheNearLockValueSelfTest.java |   6 +-
 ...eDynamicCacheStartNoExchangeTimeoutTest.java |   4 +-
 .../cache/IgniteTxReentryAbstractSelfTest.java  |   5 +-
 ...niteCacheClientNodeChangingTopologyTest.java |   6 +-
 ...teCacheClientNodePartitionsExchangeTest.java |   4 +-
 .../IgniteCacheNearOffheapGetSelfTest.java  | 131 ++
 ...xOriginatingNodeFailureAbstractSelfTest.java |   6 +-
 ...cOriginatingNodeFailureAbstractSelfTest.java |   6 +-
 .../GridCacheDhtPreloadMessageCountTest.java|   5 +-
 ...ePrimaryNodeFailureRecoveryAbstractTest.java |   6 +-
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   5 +-
 .../near/IgniteCacheNearTxRollbackTest.java |   6 +-
 .../GridCacheReplicatedInvalidateSelfTest.java  |   6 +-
 ...CommunicationRecoveryAckClosureSelfTest.java | 464 +++
 .../tcp/TcpDiscoveryMultiThreadedTest.java  |   8 +-
 .../testsuites/IgniteCacheTestSuite2.java   |   1 +
 .../IgniteSpiCommunicationSelfTestSuite.java|   1 +
 .../ignite/util/TestTcpCommunicationSpi.java|   6 +-
 ...CacheScanPartitionQueryFallbackSelfTest.java |  15 +-
 .../http/jetty/GridJettyRestHandler.java|  12 +-
 .../parser/dialect/OracleMetadataDialect.java   |   4 +-
 .../src/test/java/config/ignite-test-config.xml |  43 ++
 .../ignite/internal/GridFactorySelfTest.java|   9 +
 .../visor/commands/kill/VisorKillCommand.scala  |   2 +-
 62 files changed, 1241 insertions(+), 252 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b2e6734c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
--



[02/35] incubator-ignite git commit: ignite-946: introduced VersionedEntry, supported versioned entry for Cache.invoke/randomEntry/localEntries methods

2015-08-14 Thread agoncharuk
ignite-946: introduced VersionedEntry, supported versioned entry for 
Cache.invoke/randomEntry/localEntries methods


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/01c02465
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/01c02465
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/01c02465

Branch: refs/heads/ignite-264
Commit: 01c02465ff6924842644bf5b3447d324966cc5f9
Parents: 7ed4d15
Author: Denis Magda 
Authored: Thu Jul 30 13:50:40 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:10 2015 +0300

--
 .../ignite/cache/version/VersionedEntry.java|  73 +
 .../ignite/cache/version/package-info.java  |  21 
 .../processors/cache/CacheEntryImpl.java|  20 
 .../processors/cache/CacheInvokeEntry.java  |  24 -
 .../cache/CacheVersionedEntryImpl.java  |  80 ---
 .../processors/cache/GridCacheAdapter.java  |  13 ++-
 .../processors/cache/GridCacheMapEntry.java |  42 +---
 .../distributed/dht/GridDhtTxPrepareFuture.java |   2 +-
 .../dht/atomic/GridDhtAtomicCache.java  |   3 +-
 .../local/atomic/GridLocalAtomicCache.java  |   3 +-
 .../cache/transactions/IgniteTxAdapter.java |   2 +-
 .../cache/transactions/IgniteTxEntry.java   |   3 +-
 .../transactions/IgniteTxLocalAdapter.java  |   3 +-
 .../cache/version/CacheVersionedEntryImpl.java  | 102 +++
 .../resources/META-INF/classnames.properties|   2 +-
 15 files changed, 287 insertions(+), 106 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01c02465/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
new file mode 100644
index 000..6f9d8f6
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
@@ -0,0 +1,73 @@
+/*
+ * 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.cache.version;
+
+import javax.cache.*;
+import java.util.*;
+
+/**
+ * Cache entry along with version information.
+ */
+public interface VersionedEntry extends Cache.Entry {
+/**
+ * Versions comparator.
+ */
+public static final Comparator VERSIONS_COMPARATOR = new 
Comparator() {
+@Override public int compare(VersionedEntry o1, VersionedEntry o2) {
+int res = Integer.compare(o1.topologyVersion(), 
o2.topologyVersion());
+
+if (res != 0)
+return res;
+
+res = Long.compare(o1.order(), o2.order());
+
+if (res != 0)
+return res;
+
+return Integer.compare(o1.nodeOrder(), o2.nodeOrder());
+}
+};
+
+/**
+ * Gets entry's topology version.
+ *
+ * @return Topology version plus number of seconds from the start time of 
the first grid node.
+ */
+public int topologyVersion();
+
+/**
+ * Gets entry's order.
+ *
+ * @return Version order.
+ */
+public long order();
+
+/**
+ * Gets entry's node order.
+ *
+ * @return Node order on which this version was assigned.
+ */
+public int nodeOrder();
+
+/**
+ * Gets entry's global time.
+ *
+ * @return Adjusted time.
+ */
+public long globalTime();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01c02465/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java 
b/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
new file mode 100644
index 000..9aeaba2
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/i

[20/35] incubator-ignite git commit: ignite-946: reverted renaming topVer to avoid breaking compatibility

2015-08-14 Thread agoncharuk
ignite-946: reverted renaming topVer to avoid breaking compatibility


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/954c4591
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/954c4591
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/954c4591

Branch: refs/heads/ignite-264
Commit: 954c4591c95b7625042657f7a7311f4ea0f17c19
Parents: 801d6df
Author: Denis Magda 
Authored: Tue Aug 11 15:00:47 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 11 15:00:47 2015 +0300

--
 .../cache/GridCacheAtomicVersionComparator.java |  4 +--
 .../processors/cache/GridCacheMapEntry.java |  2 +-
 .../processors/cache/GridCacheUtils.java|  2 +-
 .../cache/transactions/IgniteTxManager.java |  2 +-
 .../cache/version/CacheVersionedEntryImpl.java  |  4 +--
 .../version/GridCachePlainVersionedEntry.java   |  2 +-
 .../version/GridCacheRawVersionedEntry.java |  2 +-
 .../cache/version/GridCacheVersion.java | 26 ++--
 .../cache/version/GridCacheVersionManager.java  |  4 +--
 .../ignite/internal/util/IgniteUtils.java   |  4 +--
 .../cache/GridCacheEntryVersionSelfTest.java|  4 +--
 11 files changed, 28 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/954c4591/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
index 45288d9..3a06100 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
@@ -32,8 +32,8 @@ public class GridCacheAtomicVersionComparator {
  * @return Comparison value.
  */
 public int compare(GridCacheVersion one, GridCacheVersion other, boolean 
ignoreTime) {
-int topVer = one.topologyOrder();
-int otherTopVer = other.topologyOrder();
+int topVer = one.topologyVersion();
+int otherTopVer = other.topologyVersion();
 
 if (topVer == otherTopVer) {
 long globalTime = one.globalTime();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/954c4591/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 33c42c4..298f7a6 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -1927,7 +1927,7 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
 
 // Incorporate conflict version into new version if needed.
 if (conflictVer != null && conflictVer != newVer)
-newVer = new GridCacheVersionEx(newVer.topologyOrder(),
+newVer = new GridCacheVersionEx(newVer.topologyVersion(),
 newVer.globalTime(),
 newVer.order(),
 newVer.nodeOrder(),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/954c4591/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 75f1dee..a313e3d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -1060,7 +1060,7 @@ public class GridCacheUtils {
 
 byte[] bytes = new byte[28];
 
-U.intToBytes(ver.topologyOrder(), bytes, 0);
+U.intToBytes(ver.topologyVersion(), bytes, 0);
 U.longToBytes(ver.globalTime(), bytes, 4);
 U.longToBytes(ver.order(), bytes, 12);
 U.intToBytes(ver.nodeOrderAndDrIdRaw(), bytes, 20);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/954c4591/modules/core/src/main/java/org/apache/ignite/

[09/35] incubator-ignite git commit: ignite-946: fixing version retrieval for transactions

2015-08-14 Thread agoncharuk
ignite-946: fixing version retrieval for transactions


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2e7799d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2e7799d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2e7799d4

Branch: refs/heads/ignite-264
Commit: 2e7799d446653bba379cc231628ba2b02c993e5e
Parents: f0fe076
Author: Denis Magda 
Authored: Fri Jul 31 15:32:45 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:14 2015 +0300

--
 .../processors/cache/CacheInvokeEntry.java  |  2 +-
 .../processors/cache/GridCacheMapEntry.java |  4 +-
 .../cache/transactions/IgniteTxAdapter.java | 14 ++-
 .../cache/transactions/IgniteTxEntry.java   | 11 ++-
 .../transactions/IgniteTxLocalAdapter.java  | 90 
 5 files changed, 98 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2e7799d4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
index e6f8d4e..2d8f738 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
@@ -121,7 +121,7 @@ public class CacheInvokeEntry extends 
CacheLazyEntry implements Muta
 /** {@inheritDoc} */
 @SuppressWarnings("unchecked")
 @Override public  T unwrap(Class cls) {
-if (cls.isAssignableFrom(VersionedEntry.class))
+if (cls.isAssignableFrom(VersionedEntry.class) && ver != null)
 return (T)new CacheVersionedEntryImpl<>(getKey(), getValue(), ver);
 
 return super.unwrap(cls);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2e7799d4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index ebcb908..43cf2fe 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -1653,7 +1653,7 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
 
 oldVal = rawGetOrUnmarshalUnlocked(true);
 
-CacheInvokeEntry entry = new 
CacheInvokeEntry(cctx, key, oldVal, this.ver);
+CacheInvokeEntry entry = new 
CacheInvokeEntry(cctx, key, oldVal, version());
 
 try {
 Object computed = entryProcessor.process(entry, 
invokeArgs);
@@ -1878,7 +1878,7 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
 
 EntryProcessor entryProcessor = 
(EntryProcessor)writeObj;
 
-CacheInvokeEntry entry = new 
CacheInvokeEntry(cctx, key, oldVal, this.ver);
+CacheInvokeEntry entry = new 
CacheInvokeEntry(cctx, key, oldVal, version());
 
 try {
 Object computed = entryProcessor.process(entry, 
invokeArgs);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2e7799d4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
index 0d14012..797f75e 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
@@ -1228,9 +1228,21 @@ public abstract class IgniteTxAdapter extends 
GridMetadataAwareAdapter
 
 Object key = null;
 
+GridCacheVersion ver;
+
+try {
+ver = txEntry.cached().version();
+}
+catch (GridCacheEntryRemovedException e) {
+if (log.isDebugEnabled())
+log.

[06/35] incubator-ignite git commit: ignite-946: added documentation

2015-08-14 Thread agoncharuk
ignite-946: added documentation


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4928d99d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4928d99d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4928d99d

Branch: refs/heads/ignite-264
Commit: 4928d99d80a837843ce733eab546a3ea6aa3c2d3
Parents: 2d200a3
Author: Denis Magda 
Authored: Fri Jul 31 12:14:54 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:12 2015 +0300

--
 .../ignite/cache/version/VersionedEntry.java| 31 +++-
 1 file changed, 30 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4928d99d/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
index 6f9d8f6..e669f15 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
@@ -17,11 +17,40 @@
 
 package org.apache.ignite.cache.version;
 
+import org.apache.ignite.*;
+
 import javax.cache.*;
+import javax.cache.processor.*;
 import java.util.*;
 
 /**
- * Cache entry along with version information.
+ * Cache entry that stores entry's version related information.
+ *
+ * To get a {@code VersionedEntry} of an {@link Cache.Entry} use {@link 
Cache.Entry#unwrap(Class)} by passing
+ * {@code VersionedEntry} class to it as the argument.
+ * 
+ * {@code VersionedEntry} is supported only for {@link Cache.Entry} returned 
by one of the following methods:
+ * 
+ * {@link Cache#invoke(Object, EntryProcessor, Object...)}
+ * {@link Cache#invokeAll(Set, EntryProcessor, Object...)}
+ * invoke and invokeAll methods of {@link IgniteCache}
+ * {@link IgniteCache#randomEntry()}
+ * 
+ * 
+ * {@code VersionedEntry} is not supported for {@link Cache#iterator()} 
because of performance reasons.
+ * {@link Cache#iterator()} loads entries from all the cluster nodes and to 
speed up the load version information
+ * is excluded from responses.
+ * Java Example
+ * 
+ * Cache cache = grid(0).cache(null);
+ *
+ *  cache.invoke(100, new EntryProcessor() {
+ *  public Object process(MutableEntry entry, Object... 
arguments) throws EntryProcessorException {
+ *  VersionedEntry verEntry = 
entry.unwrap(VersionedEntry.class);
+ *  return entry;
+ *   }
+ *   });
+ * 
  */
 public interface VersionedEntry extends Cache.Entry {
 /**



[16/35] incubator-ignite git commit: ignite-946: fixed comments and bugs

2015-08-14 Thread agoncharuk
ignite-946: fixed comments and bugs


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c1582fc3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c1582fc3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c1582fc3

Branch: refs/heads/ignite-264
Commit: c1582fc32884cdf9494df32fb33207d64ed1230f
Parents: 911ffbb
Author: Denis Magda 
Authored: Mon Aug 10 12:44:31 2015 +0300
Committer: Denis Magda 
Committed: Mon Aug 10 12:44:31 2015 +0300

--
 .../ignite/cache/version/VersionedEntry.java   | 17 +
 .../cache/version/CacheVersionedEntryImpl.java |  4 ++--
 .../processors/clock/GridClockSyncProcessor.java   |  2 +-
 .../version/CacheVersionedEntryAbstractTest.java   |  2 +-
 4 files changed, 13 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c1582fc3/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
index 2c0879b..1aac68a 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
@@ -73,30 +73,31 @@ public interface VersionedEntry extends 
Cache.Entry {
 };
 
 /**
- * Gets entry's topology version.
+ * Gets the topology version at the time when the entry with a given pair 
of key and value has been created.
  *
  * @return Topology version plus number of seconds from the start time of 
the first grid node.
  */
 public int topologyVersion();
 
 /**
- * Gets entry's order.
+ * Gets versioned entry unique order.
+ * Each time a cache entry for a given key is updated a new {@code 
VersionedEntry} with increased order is created.
  *
- * @return Version order.
+ * @return Versioned entry unique order.
  */
 public long order();
 
 /**
- * Gets entry's node order.
+ * Gets local node order at the time when the entry with a given pair of 
key and value has been created.
  *
- * @return Node order on which this version was assigned.
+ * @return Local node order on which this version has been assigned.
  */
 public int nodeOrder();
 
 /**
- * Gets entry's global time.
+ * Gets the time when the entry with a given pair of key and value has 
been created.
  *
- * @return Adjusted time.
+ * @return Time in milliseconds.
  */
-public long globalTime();
+public long creationTime();
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c1582fc3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
index 924eff9..74e4a9a 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
@@ -74,7 +74,7 @@ public class CacheVersionedEntryImpl extends 
CacheEntryImpl implemen
 }
 
 /** {@inheritDoc} */
-@Override public long globalTime() {
+@Override public long creationTime() {
 return ver.globalTime();
 }
 
@@ -95,6 +95,6 @@ public class CacheVersionedEntryImpl extends 
CacheEntryImpl implemen
 /** {@inheritDoc} */
 public String toString() {
 return "VersionedEntry [key=" + getKey() + ", val=" + getValue() + ", 
topVer=" + ver.topologyVersion() +
-", nodeOrder=" + ver.nodeOrder() + ", order=" + ver.order() + ", 
globalTime=" + ver.globalTime() + ']';
+", nodeOrder=" + ver.nodeOrder() + ", order=" + ver.order() + ", 
creationTime=" + ver.globalTime() + ']';
 }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c1582fc3/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockSyncProcessor.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockSyncProcessor.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockSyncProcessor.java
index 3ac44f2..69b07b3 100644
--- 
a/modules/core/src/main/java/org/

[19/35] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-946

2015-08-14 Thread agoncharuk
Merge remote-tracking branch 'remotes/origin/master' into ignite-946


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/801d6df1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/801d6df1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/801d6df1

Branch: refs/heads/ignite-264
Commit: 801d6df1acd2615c1a85e9e3829983011b5fd0a3
Parents: b6bef13 ae11e9b
Author: Denis Magda 
Authored: Tue Aug 11 10:19:21 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 11 10:19:21 2015 +0300

--
 .../configuration/IgniteConfiguration.java  |  1 -
 .../GridCachePartitionExchangeManager.java  | 48 +++
 .../dht/atomic/GridDhtAtomicCache.java  | 36 +---
 .../cache/CacheStopAndDestroySelfTest.java  | 87 
 4 files changed, 56 insertions(+), 116 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/801d6df1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
--



[28/35] incubator-ignite git commit: When NIO server port is set to -1, we do not need to check address for null.

2015-08-14 Thread agoncharuk
When NIO server port is set to -1, we do not need to check address for null.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7290d065
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7290d065
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7290d065

Branch: refs/heads/ignite-264
Commit: 7290d0658aa10675095f1a0379f5c21b9bb09bc4
Parents: aed83af
Author: vozerov-gridgain 
Authored: Thu Aug 13 18:09:54 2015 +0300
Committer: vozerov-gridgain 
Committed: Thu Aug 13 18:09:54 2015 +0300

--
 .../java/org/apache/ignite/internal/util/nio/GridNioServer.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7290d065/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
index c180837..2d60f98 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
@@ -209,7 +209,9 @@ public class GridNioServer {
 IgniteBiInClosure msgQueueLsnr,
 GridNioFilter... filters
 ) throws IgniteCheckedException {
-A.notNull(addr, "addr");
+if (port != -1)
+A.notNull(addr, "addr");
+
 A.notNull(lsnr, "lsnr");
 A.notNull(log, "log");
 A.notNull(order, "order");



[34/35] incubator-ignite git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-264

2015-08-14 Thread agoncharuk
Merge branch 'master' of 
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-264


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/44c4a605
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/44c4a605
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/44c4a605

Branch: refs/heads/ignite-264
Commit: 44c4a605e7828513f379745680d2c830f675d53a
Parents: f9511af 7760847
Author: Alexey Goncharuk 
Authored: Fri Aug 14 10:01:36 2015 -0700
Committer: Alexey Goncharuk 
Committed: Fri Aug 14 10:01:36 2015 -0700

--
 .../org/apache/ignite/cache/CacheEntry.java |  94 ++
 .../org/apache/ignite/internal/IgnitionEx.java  |  10 +-
 .../processors/cache/CacheEntryImpl.java|  20 +++
 .../processors/cache/CacheEntryImpl0.java   |   5 +
 .../processors/cache/CacheEntryImplEx.java  |  83 +
 .../processors/cache/CacheInvokeEntry.java  |  27 ++-
 .../cache/CacheVersionedEntryImpl.java  |  80 -
 .../processors/cache/GridCacheAdapter.java  |  13 +-
 .../processors/cache/GridCacheEntryEx.java  |   2 +-
 .../processors/cache/GridCacheGateway.java  |   5 +-
 .../processors/cache/GridCacheMapEntry.java |  28 ++-
 .../processors/cache/GridCacheSwapManager.java  |  82 +
 .../distributed/dht/GridDhtTxPrepareFuture.java |   2 +-
 .../dht/atomic/GridDhtAtomicCache.java  |   3 +-
 .../local/atomic/GridLocalAtomicCache.java  |   3 +-
 .../cache/transactions/IgniteTxAdapter.java |  16 +-
 .../cache/transactions/IgniteTxEntry.java   |  16 +-
 .../transactions/IgniteTxLocalAdapter.java  |  83 +++--
 .../cache/version/GridCacheVersion.java |   2 +-
 .../cache/version/GridCacheVersionAware.java|  30 
 .../cache/version/GridCacheVersionManager.java  |   5 +-
 .../clock/GridClockSyncProcessor.java   |   2 +-
 .../continuous/GridContinuousProcessor.java |  60 +--
 .../ignite/internal/util/nio/GridNioServer.java |   4 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java|  91 ++
 .../resources/META-INF/classnames.properties|   3 +-
 .../processors/cache/GridCacheTestEntryEx.java  |   2 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java |   2 +-
 .../IgniteCacheContinuousQueryClientTest.java   | 137 +++
 .../CacheVersionedEntryAbstractTest.java| 170 +++
 ...nedEntryLocalAtomicSwapDisabledSelfTest.java |  45 +
 ...ersionedEntryLocalTransactionalSelfTest.java |  40 +
 ...edEntryPartitionedAtomicOffHeapSelfTest.java |  35 
 ...VersionedEntryPartitionedAtomicSelfTest.java |  35 
 ...PartitionedTransactionalOffHeapSelfTest.java |  36 
 ...edEntryPartitionedTransactionalSelfTest.java |  35 
 ...nedEntryReplicatedAtomicOffHeapSelfTest.java |  35 
 ...eVersionedEntryReplicatedAtomicSelfTest.java |  35 
 ...yReplicatedTransactionalOffHeapSelfTest.java |  36 
 ...nedEntryReplicatedTransactionalSelfTest.java |  35 
 .../continuous/GridEventConsumeSelfTest.java|   4 +-
 .../testsuites/IgniteCacheTestSuite4.java   |  13 ++
 .../IgniteCacheQuerySelfTestSuite.java  |   1 +
 .../java/org/apache/ignite/IgniteSpring.java|   8 +-
 scripts/git-format-patch.sh |   2 +-
 45 files changed, 1268 insertions(+), 207 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44c4a605/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
--

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44c4a605/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
--

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44c4a605/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
--

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44c4a605/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
--

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44c4a605/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
--



[11/35] incubator-ignite git commit: review

2015-08-14 Thread agoncharuk
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/fe2be79c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/fe2be79c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/fe2be79c

Branch: refs/heads/ignite-264
Commit: fe2be79c8e4eccf8f823abeb32521f0fca8ddf42
Parents: b2e6734
Author: Yakov Zhdanov 
Authored: Tue Aug 4 17:49:48 2015 +0300
Committer: Yakov Zhdanov 
Committed: Tue Aug 4 17:49:48 2015 +0300

--
 .../ignite/cache/version/package-info.java  |  4 ++--
 .../processors/cache/CacheInvokeEntry.java  |  5 +++--
 .../cache/transactions/IgniteTxEntry.java   |  4 +++-
 .../transactions/IgniteTxLocalAdapter.java  | 20 ++--
 4 files changed, 18 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe2be79c/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java 
b/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
index 9aeaba2..50ceb13 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
@@ -16,6 +16,6 @@
  */
 
 /**
- * Contains cache version based implementations.
+ * Contains cache versioned entry interface.
  */
-package org.apache.ignite.cache.version;
\ No newline at end of file
+package org.apache.ignite.cache.version;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe2be79c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
index 2d8f738..515a4c5 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
@@ -49,14 +49,15 @@ public class CacheInvokeEntry extends 
CacheLazyEntry implements Muta
 public CacheInvokeEntry(GridCacheContext cctx,
 KeyCacheObject keyObj,
 @Nullable CacheObject valObj,
-GridCacheVersion ver) {
+GridCacheVersion ver
+) {
 super(cctx, keyObj, valObj);
 
 this.hadVal = valObj != null;
 this.ver = ver;
 }
 
-/** 
+/**
  * @param ctx Cache context.
  * @param keyObj Key cache object.
  * @param key Key value.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe2be79c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
index ed57bf2..73b9975 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
@@ -577,6 +577,8 @@ public class IgniteTxEntry implements GridPeerDeployAware, 
Message {
 ver = entry.version();
 }
 catch (GridCacheEntryRemovedException e) {
+assert tx.optimistic() : tx;
+
 ver = null;
 }
 
@@ -924,7 +926,7 @@ public class IgniteTxEntry implements GridPeerDeployAware, 
Message {
 return false;
 
 reader.incrementState();
-
+
 case 6:
 flags = reader.readByte("flags");
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe2be79c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 7f171c2..e03f34d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLo

[30/35] incubator-ignite git commit: Fixed threads cleanup in continuous processor

2015-08-14 Thread agoncharuk
Fixed threads cleanup in continuous processor


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ba3abcec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ba3abcec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ba3abcec

Branch: refs/heads/ignite-264
Commit: ba3abceca10a1745253a3c28e7a6fe6f5833d266
Parents: 6697b0c
Author: Valentin Kulichenko 
Authored: Thu Aug 13 15:50:39 2015 -0700
Committer: Valentin Kulichenko 
Committed: Thu Aug 13 15:50:39 2015 -0700

--
 .../continuous/GridContinuousProcessor.java | 16 +++-
 .../GridCacheContinuousQueryAbstractSelfTest.java   |  2 +-
 2 files changed, 12 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ba3abcec/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
index 5f1c4bb..a360e35 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
@@ -29,7 +29,6 @@ import org.apache.ignite.internal.managers.eventstorage.*;
 import org.apache.ignite.internal.processors.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.timeout.*;
-import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.future.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -72,7 +71,7 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 private final ConcurrentMap stopFuts = new 
ConcurrentHashMap8<>();
 
 /** Threads started by this processor. */
-private final Collection threads = new 
GridConcurrentHashSet<>();
+private final Map bufCheckThreads = new 
ConcurrentHashMap8<>();
 
 /** */
 private final ConcurrentMap syncMsgFuts 
= new ConcurrentHashMap8<>();
@@ -311,8 +310,10 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 
 ctx.io().removeMessageListener(TOPIC_CONTINUOUS);
 
-U.interrupt(threads);
-U.joinThreads(threads, log);
+for (IgniteThread thread : bufCheckThreads.values()) {
+U.interrupt(thread);
+U.join(thread);
+}
 
 if (log.isDebugEnabled())
 log.debug("Continuous processor stopped.");
@@ -915,7 +916,7 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 }
 });
 
-threads.add(checker);
+bufCheckThreads.put(routineId, checker);
 
 checker.start();
 }
@@ -947,6 +948,11 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 ctx.io().removeMessageListener(hnd.orderedTopic());
 
 hnd.unregister(routineId, ctx);
+
+IgniteThread checker = bufCheckThreads.remove(routineId);
+
+if (checker != null)
+checker.interrupt();
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ba3abcec/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
index 4681071..7b628b4 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
@@ -29,7 +29,6 @@ import org.apache.ignite.internal.processors.datastructures.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -177,6 +176,7 @@ public abstract class 
GridCacheContinuousQueryAbstra

[12/35] incubator-ignite git commit: review

2015-08-14 Thread agoncharuk
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/53557e32
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/53557e32
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/53557e32

Branch: refs/heads/ignite-264
Commit: 53557e327721fee683b9b37217d530db44166aec
Parents: fe2be79
Author: Yakov Zhdanov 
Authored: Wed Aug 5 10:15:52 2015 +0300
Committer: Yakov Zhdanov 
Committed: Wed Aug 5 10:15:52 2015 +0300

--
 .../processors/cache/transactions/IgniteTxLocalAdapter.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/53557e32/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index e03f34d..a209780 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -1937,7 +1937,7 @@ public abstract class IgniteTxLocalAdapter extends 
IgniteTxAdapter
 GridCacheContext cacheCtx,
 Map drMap
 ) {
-return putAllAsync0(cacheCtx,
+return this.putAllAsync0(cacheCtx,
 null,
 null,
 null,



[21/35] incubator-ignite git commit: # ignite-1229: stop ping process when node left topology

2015-08-14 Thread agoncharuk
# ignite-1229: stop ping process when node left topology


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d5986c26
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d5986c26
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d5986c26

Branch: refs/heads/ignite-264
Commit: d5986c265c9f68c2a98c48d4ba75444fad9e6725
Parents: ae11e9b
Author: sboikov 
Authored: Wed Aug 12 11:42:22 2015 +0300
Committer: sboikov 
Committed: Wed Aug 12 11:42:22 2015 +0300

--
 .../ignite/spi/discovery/tcp/ServerImpl.java| 91 +---
 1 file changed, 60 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5986c26/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 92c21ed..76144e3 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
@@ -388,12 +388,15 @@ class ServerImpl extends TcpDiscoveryImpl {
 
 TcpDiscoveryNode node = ring.node(nodeId);
 
-if (node == null || !node.visible())
+if (node == null)
+return false;
+
+if (!nodeAlive(nodeId))
 return false;
 
 boolean res = pingNode(node);
 
-if (!res && !node.isClient()) {
+if (!res && !node.isClient() && nodeAlive(nodeId)) {
 LT.warn(log, null, "Failed to ping node (status check will be 
initiated): " + nodeId);
 
 msgWorker.addMessage(new TcpDiscoveryStatusCheckMessage(locNode, 
node.id()));
@@ -421,14 +424,18 @@ class ServerImpl extends TcpDiscoveryImpl {
 
 node = ring.node(node.clientRouterNodeId());
 
-if (node == null || !node.visible())
+if (node == null || !nodeAlive(node.id()))
 return false;
 }
 
 for (InetSocketAddress addr : spi.getNodeAddresses(node, 
U.sameMacs(locNode, node))) {
 try {
 // ID returned by the node should be the same as ID of the 
parameter for ping to succeed.
-IgniteBiTuple t = pingNode(addr, clientNodeId);
+IgniteBiTuple t = pingNode(addr, node.id(), 
clientNodeId);
+
+if (t == null)
+// Remote node left topology.
+return false;
 
 boolean res = node.id().equals(t.get1()) && (clientNodeId == 
null || t.get2());
 
@@ -453,12 +460,14 @@ class ServerImpl extends TcpDiscoveryImpl {
  * Pings the node by its address to see if it's alive.
  *
  * @param addr Address of the node.
+ * @param nodeId Node ID to ping. In case when client node ID is not null 
this node ID is an ID of the router node.
  * @param clientNodeId Client node ID.
- * @return ID of the remote node and "client exists" flag if node alive.
+ * @return ID of the remote node and "client exists" flag if node alive or 
{@code null} if the remote node has
+ * left a topology during the ping process.
  * @throws IgniteCheckedException If an error occurs.
  */
-private IgniteBiTuple pingNode(InetSocketAddress addr, 
@Nullable UUID clientNodeId)
-throws IgniteCheckedException {
+private @Nullable IgniteBiTuple pingNode(InetSocketAddress 
addr, @Nullable UUID nodeId,
+@Nullable UUID clientNodeId) throws IgniteCheckedException {
 assert addr != null;
 
 UUID locNodeId = getLocalNodeId();
@@ -537,6 +546,16 @@ class ServerImpl extends TcpDiscoveryImpl {
 return t;
 }
 catch (IOException | IgniteCheckedException e) {
+if (nodeId != null && !nodeAlive(nodeId)) {
+if (log.isDebugEnabled())
+log.debug("Failed to ping the node (has left 
or leaving topology): [nodeId=" + nodeId +
+']');
+
+fut.onDone((IgniteBiTuple)null);
+
+return null;
+}
+
 if (errs == null)
 errs = new ArrayList<>();
 
@@ -615,6 +634,28 @@ class ServerImpl extends TcpDiscoveryImpl {
 }
 
 /**
+ * Checks whether a node is alive or not.
+ *
+ * @param nodeId Node ID.
+ * @return {@code True} if node is in the ring and is not being removed 
from.
+ */
+private boolean nodeAlive(UUID nodeId) {
+ 

[01/35] incubator-ignite git commit: ignite-946: added tests

2015-08-14 Thread agoncharuk
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-264 f9511aff9 -> 9278d805f


ignite-946: added tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/325d06d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/325d06d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/325d06d3

Branch: refs/heads/ignite-264
Commit: 325d06d3127e73554cfcf40a549d2ae9343dca50
Parents: 01c0246
Author: Denis Magda 
Authored: Thu Jul 30 16:03:18 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:10 2015 +0300

--
 .../cache/version/CacheVersionedEntryImpl.java  |   2 -
 .../CacheVersionedEntryAbstractTest.java| 184 +++
 .../CacheVersionedEntryLocalAtomicSelfTest.java |  40 
 ...ersionedEntryLocalTransactionalSelfTest.java |  40 
 ...edEntryPartitionedAtomicOffHeapSelfTest.java |  35 
 ...VersionedEntryPartitionedAtomicSelfTest.java |  35 
 ...PartitionedTransactionalOffHeapSelfTest.java |  36 
 ...edEntryPartitionedTransactionalSelfTest.java |  35 
 ...nedEntryReplicatedAtomicOffHeapSelfTest.java |  35 
 ...eVersionedEntryReplicatedAtomicSelfTest.java |  35 
 ...yReplicatedTransactionalOffHeapSelfTest.java |  36 
 ...nedEntryReplicatedTransactionalSelfTest.java |  35 
 .../testsuites/IgniteCacheTestSuite4.java   |  13 ++
 13 files changed, 559 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/325d06d3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
index 6d1e0c9..924eff9 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
@@ -48,8 +48,6 @@ public class CacheVersionedEntryImpl extends 
CacheEntryImpl implemen
 public CacheVersionedEntryImpl(K key, V val, GridCacheVersion ver) {
 super(key, val);
 
-assert val == null;
-
 this.ver = ver;
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/325d06d3/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
new file mode 100644
index 000..951d05a
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
@@ -0,0 +1,184 @@
+/*
+ * 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.version;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.version.*;
+import org.apache.ignite.internal.processors.cache.*;
+
+import javax.cache.*;
+import javax.cache.processor.*;
+import java.util.*;
+import java.util.concurrent.atomic.*;
+
+/**
+ * Versioned entry abstract test.
+ */
+public abstract class CacheVersionedEntryAbstractTest extends 
GridCacheAbstractSelfTest {
+/** Entries number to store in a cache. */
+private static final int ENTRIES_NUM = 1000;
+
+/** {@inheritDoc} */
+@Override protected int gridCount() {
+return 2;
+}
+
+/** {@inheritDoc} */
+@Override protected void beforeTest() throws Exception {
+super.beforeTest();
+
+Cache cache = grid(0).c

  1   2   >