You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by nt...@apache.org on 2015/12/24 19:06:25 UTC
[01/19] ignite git commit: IGNITE-2226
Repository: ignite
Updated Branches:
refs/heads/ignite-gg-10837 972a703b6 -> cc40e1f4e
IGNITE-2226
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8be0ced4
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8be0ced4
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8be0ced4
Branch: refs/heads/ignite-gg-10837
Commit: 8be0ced4c4eaba4002a0f963d0d74519aef7c8c6
Parents: d95ca2e
Author: Anton Vinogradov <av...@apache.org>
Authored: Tue Dec 22 18:14:25 2015 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Tue Dec 22 18:14:25 2015 +0300
----------------------------------------------------------------------
examples/pom.xml | 2 +-
examples/schema-import/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/apache-license-gen/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
modules/camel/pom.xml | 2 +-
modules/clients/pom.xml | 2 +-
modules/cloud/pom.xml | 2 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 2 +-
.../ignite/internal/IgniteVersionUtils.java | 5 ++++-
.../ignite/lang/IgniteProductVersion.java | 2 +-
.../core/src/main/resources/ignite.properties | 2 +-
.../product/GridProductVersionSelfTest.java | 22 ++++++++++++++------
modules/extdata/p2p/pom.xml | 2 +-
.../extdata/uri/modules/uri-dependency/pom.xml | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/flume/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/jms11/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/kafka/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/log4j2/pom.xml | 2 +-
modules/mesos/pom.xml | 2 +-
modules/mqtt/pom.xml | 2 +-
modules/osgi-karaf/pom.xml | 2 +-
modules/osgi-paxlogging/pom.xml | 2 +-
modules/osgi/pom.xml | 2 +-
modules/platforms/cpp/common/configure.ac | 2 +-
modules/platforms/cpp/core-test/configure.ac | 2 +-
modules/platforms/cpp/core/configure.ac | 2 +-
modules/platforms/cpp/examples/configure.ac | 2 +-
modules/platforms/cpp/ignite/configure.ac | 2 +-
.../Properties/AssemblyInfo.cs | 6 +++---
.../Properties/AssemblyInfo.cs | 6 +++---
.../Properties/AssemblyInfo.cs | 6 +++---
.../Properties/AssemblyInfo.cs | 6 +++---
.../Apache.Ignite/Properties/AssemblyInfo.cs | 6 +++---
.../Properties/AssemblyInfo.cs | 6 +++---
.../Properties/AssemblyInfo.cs | 6 +++---
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/twitter/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 +-
modules/zookeeper/pom.xml | 2 +-
pom.xml | 2 +-
67 files changed, 99 insertions(+), 86 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index f123855..5b8c36a 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
</parent>
<artifactId>ignite-examples</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/examples/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/examples/schema-import/pom.xml b/examples/schema-import/pom.xml
index f2cfbeb..6abff1a 100644
--- a/examples/schema-import/pom.xml
+++ b/examples/schema-import/pom.xml
@@ -35,7 +35,7 @@
</properties>
<artifactId>ignite-schema-import-demo</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/aop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aop/pom.xml b/modules/aop/pom.xml
index c143c67..375628f 100644
--- a/modules/aop/pom.xml
+++ b/modules/aop/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-aop</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/apache-license-gen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/apache-license-gen/pom.xml b/modules/apache-license-gen/pom.xml
index 154d43b..d49a4f0 100644
--- a/modules/apache-license-gen/pom.xml
+++ b/modules/apache-license-gen/pom.xml
@@ -31,7 +31,7 @@
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-apache-license-gen</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<build>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/aws/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aws/pom.xml b/modules/aws/pom.xml
index b4e8816..16a25d8 100644
--- a/modules/aws/pom.xml
+++ b/modules/aws/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-aws</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/camel/pom.xml
----------------------------------------------------------------------
diff --git a/modules/camel/pom.xml b/modules/camel/pom.xml
index 6a574af..0e0b535 100644
--- a/modules/camel/pom.xml
+++ b/modules/camel/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-camel</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<properties>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/clients/pom.xml
----------------------------------------------------------------------
diff --git a/modules/clients/pom.xml b/modules/clients/pom.xml
index cd8ae10..1f4555f 100644
--- a/modules/clients/pom.xml
+++ b/modules/clients/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-clients</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/cloud/pom.xml
----------------------------------------------------------------------
diff --git a/modules/cloud/pom.xml b/modules/cloud/pom.xml
index 175b3b2..20df4b9 100644
--- a/modules/cloud/pom.xml
+++ b/modules/cloud/pom.xml
@@ -29,7 +29,7 @@
</parent>
<artifactId>ignite-cloud</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<properties>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/codegen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/codegen/pom.xml b/modules/codegen/pom.xml
index d124c42..50dbbc1 100644
--- a/modules/codegen/pom.xml
+++ b/modules/codegen/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-codegen</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<properties>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 56c1ff3..f09f099 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-core</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<repositories>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
index 7f81cb5..02cbc81 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
@@ -53,7 +53,10 @@ public class IgniteVersionUtils {
* Static initializer.
*/
static {
- VER_STR = IgniteProperties.get("ignite.version");
+ VER_STR = IgniteProperties.get("ignite.version")
+ .replace(".a", "-a") // Backward compatibility fix.
+ .replace(".b", "-b")
+ .replace(".final", "-final");
BUILD_TSTAMP = Long.valueOf(IgniteProperties.get("ignite.build"));
BUILD_TSTAMP_STR = new SimpleDateFormat("yyyyMMdd").format(new Date(BUILD_TSTAMP * 1000));
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/core/src/main/java/org/apache/ignite/lang/IgniteProductVersion.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/lang/IgniteProductVersion.java b/modules/core/src/main/java/org/apache/ignite/lang/IgniteProductVersion.java
index 9826b6d..12851ba 100644
--- a/modules/core/src/main/java/org/apache/ignite/lang/IgniteProductVersion.java
+++ b/modules/core/src/main/java/org/apache/ignite/lang/IgniteProductVersion.java
@@ -43,7 +43,7 @@ public class IgniteProductVersion implements Comparable<IgniteProductVersion>, E
/** Regexp parse pattern. */
private static final Pattern VER_PATTERN =
- Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)(-([^0123456789][^-]+)(-SNAPSHOT)?)?(-(\\d+))?(-([\\da-f]+))?");
+ Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)([-.]([^0123456789][^-]+)(-SNAPSHOT)?)?(-(\\d+))?(-([\\da-f]+))?");
/** Major version number. */
private byte major;
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/core/src/main/resources/ignite.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/ignite.properties b/modules/core/src/main/resources/ignite.properties
index 3568cd4..6210489 100644
--- a/modules/core/src/main/resources/ignite.properties
+++ b/modules/core/src/main/resources/ignite.properties
@@ -15,7 +15,7 @@
# limitations under the License.
#
-ignite.version=1.5.0-final-SNAPSHOT
+ignite.version=1.5.0.final-SNAPSHOT
ignite.build=0
ignite.revision=DEV
ignite.rel.date=01011970
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java
index 38422e3..92990de 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java
@@ -50,21 +50,21 @@ public class GridProductVersionSelfTest extends GridCommonAbstractTest {
assertEquals(0, ver.revisionTimestamp());
assertArrayEquals(new byte[20], ver.revisionHash());
- ver = IgniteProductVersion.fromString("1.2.3-rc1-4-DEV");
+ ver = IgniteProductVersion.fromString("1.2.3.b1-4-DEV");
assertEquals(1, ver.major());
assertEquals(2, ver.minor());
assertEquals(3, ver.maintenance());
- assertEquals("rc1", ver.stage());
+ assertEquals("b1", ver.stage());
assertEquals(4, ver.revisionTimestamp());
assertArrayEquals(new byte[20], ver.revisionHash());
- ver = IgniteProductVersion.fromString("1.2.3-GA1-4-DEV");
+ ver = IgniteProductVersion.fromString("1.2.3.final-4-DEV");
assertEquals(1, ver.major());
assertEquals(2, ver.minor());
assertEquals(3, ver.maintenance());
- assertEquals("GA1", ver.stage());
+ assertEquals("final", ver.stage());
assertEquals(4, ver.revisionTimestamp());
assertArrayEquals(new byte[20], ver.revisionHash());
@@ -96,6 +96,16 @@ public class GridProductVersionSelfTest extends GridCommonAbstractTest {
assertArrayEquals(new byte[]{24, -27, -89, -20, -98, 50, 2, 18, 106, 105, -68, 35, 26, 107, -106, 91, -63, -41, 61, -18},
ver.revisionHash());
+ ver = IgniteProductVersion.fromString("1.2.3.b1-4-18e5a7ec9e3202126a69bc231a6b965bc1d73dee");
+
+ assertEquals(1, ver.major());
+ assertEquals(2, ver.minor());
+ assertEquals(3, ver.maintenance());
+ assertEquals("b1", ver.stage());
+ assertEquals(4, ver.revisionTimestamp());
+ assertArrayEquals(new byte[]{24, -27, -89, -20, -98, 50, 2, 18, 106, 105, -68, 35, 26, 107, -106, 91, -63, -41, 61, -18},
+ ver.revisionHash());
+
ver = IgniteProductVersion.fromString("1.2.3-rc1-4-18e5a7ec9e3202126a69bc231a6b965bc1d73dee");
assertEquals(1, ver.major());
@@ -116,12 +126,12 @@ public class GridProductVersionSelfTest extends GridCommonAbstractTest {
assertArrayEquals(new byte[]{24, -27, -89, -20, -98, 50, 2, 18, 106, 105, -68, 35, 26, 107, -106, 91, -63, -41, 61, -18},
ver.revisionHash());
- ver = IgniteProductVersion.fromString("1.2.3-rc1-SNAPSHOT-4-18e5a7ec9e3202126a69bc231a6b965bc1d73dee");
+ ver = IgniteProductVersion.fromString("1.2.3.b1-SNAPSHOT-4-18e5a7ec9e3202126a69bc231a6b965bc1d73dee");
assertEquals(1, ver.major());
assertEquals(2, ver.minor());
assertEquals(3, ver.maintenance());
- assertEquals("rc1-SNAPSHOT", ver.stage());
+ assertEquals("b1-SNAPSHOT", ver.stage());
assertEquals(4, ver.revisionTimestamp());
assertArrayEquals(new byte[]{24, -27, -89, -20, -98, 50, 2, 18, 106, 105, -68, 35, 26, 107, -106, 91, -63, -41, 61, -18},
ver.revisionHash());
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/extdata/p2p/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/pom.xml b/modules/extdata/p2p/pom.xml
index 2525ab6..bfca85a 100644
--- a/modules/extdata/p2p/pom.xml
+++ b/modules/extdata/p2p/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-extdata-p2p</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/extdata/uri/modules/uri-dependency/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/modules/uri-dependency/pom.xml b/modules/extdata/uri/modules/uri-dependency/pom.xml
index 9de066c..53bf0b2 100644
--- a/modules/extdata/uri/modules/uri-dependency/pom.xml
+++ b/modules/extdata/uri/modules/uri-dependency/pom.xml
@@ -27,7 +27,7 @@
<artifactId>ignite-extdata-uri-dep</artifactId>
<packaging>jar</packaging>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<modelVersion>4.0.0</modelVersion>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/extdata/uri/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/pom.xml b/modules/extdata/uri/pom.xml
index 99fd120..c775a8d 100644
--- a/modules/extdata/uri/pom.xml
+++ b/modules/extdata/uri/pom.xml
@@ -32,7 +32,7 @@
</parent>
<artifactId>ignite-extdata-uri</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/flume/pom.xml
----------------------------------------------------------------------
diff --git a/modules/flume/pom.xml b/modules/flume/pom.xml
index 2f856f8..4b3eb49 100644
--- a/modules/flume/pom.xml
+++ b/modules/flume/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-flume</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/gce/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gce/pom.xml b/modules/gce/pom.xml
index b05e1ff..a725a8b 100644
--- a/modules/gce/pom.xml
+++ b/modules/gce/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-gce</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/geospatial/pom.xml
----------------------------------------------------------------------
diff --git a/modules/geospatial/pom.xml b/modules/geospatial/pom.xml
index eb9b89a..cfa9065 100644
--- a/modules/geospatial/pom.xml
+++ b/modules/geospatial/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-geospatial</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/hadoop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hadoop/pom.xml b/modules/hadoop/pom.xml
index 103d402..0cd553d 100644
--- a/modules/hadoop/pom.xml
+++ b/modules/hadoop/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-hadoop</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/hibernate/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hibernate/pom.xml b/modules/hibernate/pom.xml
index dcfe133..1eaf6f2 100644
--- a/modules/hibernate/pom.xml
+++ b/modules/hibernate/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-hibernate</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/indexing/pom.xml
----------------------------------------------------------------------
diff --git a/modules/indexing/pom.xml b/modules/indexing/pom.xml
index 7efabcd..246462d 100644
--- a/modules/indexing/pom.xml
+++ b/modules/indexing/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-indexing</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/jcl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jcl/pom.xml b/modules/jcl/pom.xml
index d11fdcc..1efb50d 100644
--- a/modules/jcl/pom.xml
+++ b/modules/jcl/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-jcl</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/jms11/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jms11/pom.xml b/modules/jms11/pom.xml
index db2d6e9..793ae23 100644
--- a/modules/jms11/pom.xml
+++ b/modules/jms11/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-jms11</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/jta/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jta/pom.xml b/modules/jta/pom.xml
index 10756aa..d7a5666 100644
--- a/modules/jta/pom.xml
+++ b/modules/jta/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-jta</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/kafka/pom.xml
----------------------------------------------------------------------
diff --git a/modules/kafka/pom.xml b/modules/kafka/pom.xml
index f99f3c0..85a2605 100644
--- a/modules/kafka/pom.xml
+++ b/modules/kafka/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-kafka</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/log4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/log4j/pom.xml b/modules/log4j/pom.xml
index 29230c0..ae8ab8c 100644
--- a/modules/log4j/pom.xml
+++ b/modules/log4j/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-log4j</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/log4j2/pom.xml
----------------------------------------------------------------------
diff --git a/modules/log4j2/pom.xml b/modules/log4j2/pom.xml
index 15d56ea..115a21d 100644
--- a/modules/log4j2/pom.xml
+++ b/modules/log4j2/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-log4j2</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/mesos/pom.xml
----------------------------------------------------------------------
diff --git a/modules/mesos/pom.xml b/modules/mesos/pom.xml
index 1d55b30..0c5286e 100644
--- a/modules/mesos/pom.xml
+++ b/modules/mesos/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-mesos</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<properties>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/mqtt/pom.xml
----------------------------------------------------------------------
diff --git a/modules/mqtt/pom.xml b/modules/mqtt/pom.xml
index 9f5cf8b..54f29c3 100644
--- a/modules/mqtt/pom.xml
+++ b/modules/mqtt/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-mqtt</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/osgi-karaf/pom.xml
----------------------------------------------------------------------
diff --git a/modules/osgi-karaf/pom.xml b/modules/osgi-karaf/pom.xml
index 46cd239..11fcd38 100644
--- a/modules/osgi-karaf/pom.xml
+++ b/modules/osgi-karaf/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-osgi-karaf</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<packaging>pom</packaging>
<build>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/osgi-paxlogging/pom.xml
----------------------------------------------------------------------
diff --git a/modules/osgi-paxlogging/pom.xml b/modules/osgi-paxlogging/pom.xml
index 8d23b25..f2531d7 100644
--- a/modules/osgi-paxlogging/pom.xml
+++ b/modules/osgi-paxlogging/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-osgi-paxlogging</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/osgi/pom.xml
----------------------------------------------------------------------
diff --git a/modules/osgi/pom.xml b/modules/osgi/pom.xml
index a08c7a0..6348e4c 100644
--- a/modules/osgi/pom.xml
+++ b/modules/osgi/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-osgi</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/platforms/cpp/common/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/configure.ac b/modules/platforms/cpp/common/configure.ac
index 67dc2d3..63bc44c 100644
--- a/modules/platforms/cpp/common/configure.ac
+++ b/modules/platforms/cpp/common/configure.ac
@@ -19,7 +19,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([Apache Ignite JNI bridge for C++], [1.5.0.7782], [dev@ignite.apache.org], [ignite-common], [ignite.apache.org])
+AC_INIT([Apache Ignite JNI bridge for C++], [1.5.0.7791], [dev@ignite.apache.org], [ignite-common], [ignite.apache.org])
AC_CONFIG_SRCDIR(src)
AC_CANONICAL_SYSTEM
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/platforms/cpp/core-test/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/configure.ac b/modules/platforms/cpp/core-test/configure.ac
index 739cde3..736c721 100644
--- a/modules/platforms/cpp/core-test/configure.ac
+++ b/modules/platforms/cpp/core-test/configure.ac
@@ -19,7 +19,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([Apache Ignite C++ Test], [1.5.0.7782], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
+AC_INIT([Apache Ignite C++ Test], [1.5.0.7791], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
AC_CONFIG_SRCDIR(src)
AC_CANONICAL_SYSTEM
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/platforms/cpp/core/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/configure.ac b/modules/platforms/cpp/core/configure.ac
index aa02b55..a87bd58 100644
--- a/modules/platforms/cpp/core/configure.ac
+++ b/modules/platforms/cpp/core/configure.ac
@@ -19,7 +19,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([Apache Ignite C++], [1.5.0.7782], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
+AC_INIT([Apache Ignite C++], [1.5.0.7791], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
AC_CONFIG_SRCDIR(src)
AC_CANONICAL_SYSTEM
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/platforms/cpp/examples/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/configure.ac b/modules/platforms/cpp/examples/configure.ac
index f9ad30f..b3d72ab 100644
--- a/modules/platforms/cpp/examples/configure.ac
+++ b/modules/platforms/cpp/examples/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([Ingnite C++ examples],[1.5.0.7782],[dec@ignite.apache.org],[ignite-examples],[ignite.apache.org])
+AC_INIT([Ingnite C++ examples],[1.5.0.7791],[dec@ignite.apache.org],[ignite-examples],[ignite.apache.org])
AC_CONFIG_SRCDIR(src)
AC_CANONICAL_SYSTEM
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/platforms/cpp/ignite/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/ignite/configure.ac b/modules/platforms/cpp/ignite/configure.ac
index 10ab371..7393275 100644
--- a/modules/platforms/cpp/ignite/configure.ac
+++ b/modules/platforms/cpp/ignite/configure.ac
@@ -19,7 +19,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([Apache Ignite C++ Runner], [1.5.0.7782], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
+AC_INIT([Apache Ignite C++ Runner], [1.5.0.7791], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
AC_CONFIG_SRCDIR(src)
AC_CANONICAL_SYSTEM
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
index b0ca9c3..5e9d84c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
[assembly: Guid("8fae8395-7e91-411a-a78f-44d6d3fed0fc")]
-[assembly: AssemblyVersion("1.5.0.7782")]
-[assembly: AssemblyFileVersion("1.5.0.7782")]
-[assembly: AssemblyInformationalVersion("1.5.0-final")]
+[assembly: AssemblyVersion("1.5.0.7791")]
+[assembly: AssemblyFileVersion("1.5.0.7791")]
+[assembly: AssemblyInformationalVersion("1.5.0.final")]
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs
index 8d8b2b7..8088c5e 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs
@@ -45,6 +45,6 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.5.0.7782")]
-[assembly: AssemblyFileVersion("1.5.0.7782")]
-[assembly: AssemblyInformationalVersion("1.5.0-final")]
+[assembly: AssemblyVersion("1.5.0.7791")]
+[assembly: AssemblyFileVersion("1.5.0.7791")]
+[assembly: AssemblyInformationalVersion("1.5.0.final")]
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs
index d252aae..984d5dc 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
[assembly: Guid("de8dd5cc-7c7f-4a09-80d5-7086d9416a7b")]
-[assembly: AssemblyVersion("1.5.0.7782")]
-[assembly: AssemblyFileVersion("1.5.0.7782")]
-[assembly: AssemblyInformationalVersion("1.5.0-final")]
+[assembly: AssemblyVersion("1.5.0.7791")]
+[assembly: AssemblyFileVersion("1.5.0.7791")]
+[assembly: AssemblyInformationalVersion("1.5.0.final")]
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs
index de40c9e..6fe123d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs
@@ -33,9 +33,9 @@ using System.Runtime.InteropServices;
[assembly: Guid("97db45a8-f922-456a-a819-7b3c6e5e03ba")]
-[assembly: AssemblyVersion("1.5.0.7782")]
-[assembly: AssemblyFileVersion("1.5.0.7782")]
-[assembly: AssemblyInformationalVersion("1.5.0-final")]
+[assembly: AssemblyVersion("1.5.0.7791")]
+[assembly: AssemblyFileVersion("1.5.0.7791")]
+[assembly: AssemblyInformationalVersion("1.5.0.final")]
[assembly: CLSCompliant(true)]
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs
index 15025b2..6814ea7 100644
--- a/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
[assembly: Guid("0f9702ec-da7d-4ce5-b4b7-73310c885355")]
-[assembly: AssemblyVersion("1.5.0.7782")]
-[assembly: AssemblyFileVersion("1.5.0.7782")]
-[assembly: AssemblyInformationalVersion("1.5.0-final")]
+[assembly: AssemblyVersion("1.5.0.7791")]
+[assembly: AssemblyFileVersion("1.5.0.7791")]
+[assembly: AssemblyInformationalVersion("1.5.0.final")]
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
index 6741909..fae8f69 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@
[assembly: Guid("41a0cb95-3435-4c78-b867-900b28e2c9ee")]
-[assembly: AssemblyVersion("1.5.0.7782")]
-[assembly: AssemblyFileVersion("1.5.0.7782")]
-[assembly: AssemblyInformationalVersion("1.5.0-final")]
+[assembly: AssemblyVersion("1.5.0.7791")]
+[assembly: AssemblyFileVersion("1.5.0.7791")]
+[assembly: AssemblyInformationalVersion("1.5.0.final")]
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
index 197245c..3c059c6 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Reflection;
[assembly: Guid("ce65ec7c-d3cf-41ad-8f45-f90d5af68d77")]
-[assembly: AssemblyVersion("1.5.0.7782")]
-[assembly: AssemblyFileVersion("1.5.0.7782")]
-[assembly: AssemblyInformationalVersion("1.5.0-final")]
+[assembly: AssemblyVersion("1.5.0.7791")]
+[assembly: AssemblyFileVersion("1.5.0.7791")]
+[assembly: AssemblyInformationalVersion("1.5.0.final")]
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/rest-http/pom.xml
----------------------------------------------------------------------
diff --git a/modules/rest-http/pom.xml b/modules/rest-http/pom.xml
index 1709c2c..4523d3b 100644
--- a/modules/rest-http/pom.xml
+++ b/modules/rest-http/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-rest-http</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<properties>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/scalar-2.10/pom.xml
----------------------------------------------------------------------
diff --git a/modules/scalar-2.10/pom.xml b/modules/scalar-2.10/pom.xml
index 05b66f1..0cc030d 100644
--- a/modules/scalar-2.10/pom.xml
+++ b/modules/scalar-2.10/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-scalar_2.10</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/scalar/pom.xml
----------------------------------------------------------------------
diff --git a/modules/scalar/pom.xml b/modules/scalar/pom.xml
index 8be03df..8a503e4 100644
--- a/modules/scalar/pom.xml
+++ b/modules/scalar/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-scalar</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/schedule/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schedule/pom.xml b/modules/schedule/pom.xml
index 5246938..1abf75e 100644
--- a/modules/schedule/pom.xml
+++ b/modules/schedule/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-schedule</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<properties>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schema-import/pom.xml b/modules/schema-import/pom.xml
index ff6387d..97b1d3a 100644
--- a/modules/schema-import/pom.xml
+++ b/modules/schema-import/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-schema-import</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/slf4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/slf4j/pom.xml b/modules/slf4j/pom.xml
index aba43b9..65c1e2b 100644
--- a/modules/slf4j/pom.xml
+++ b/modules/slf4j/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-slf4j</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/spark-2.10/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spark-2.10/pom.xml b/modules/spark-2.10/pom.xml
index 79db055..bfbd711 100644
--- a/modules/spark-2.10/pom.xml
+++ b/modules/spark-2.10/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-spark_2.10</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/spark/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spark/pom.xml b/modules/spark/pom.xml
index b79e0ec..aefd4b8 100644
--- a/modules/spark/pom.xml
+++ b/modules/spark/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-spark</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/spring/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spring/pom.xml b/modules/spring/pom.xml
index 0c73598..e6c0d7f 100644
--- a/modules/spring/pom.xml
+++ b/modules/spring/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-spring</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/ssh/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ssh/pom.xml b/modules/ssh/pom.xml
index b67252d..348e9ad 100644
--- a/modules/ssh/pom.xml
+++ b/modules/ssh/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-ssh</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/tools/pom.xml
----------------------------------------------------------------------
diff --git a/modules/tools/pom.xml b/modules/tools/pom.xml
index 3f71641..35d6237 100644
--- a/modules/tools/pom.xml
+++ b/modules/tools/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-tools</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<properties>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/twitter/pom.xml
----------------------------------------------------------------------
diff --git a/modules/twitter/pom.xml b/modules/twitter/pom.xml
index 21b360d..a98ad20 100644
--- a/modules/twitter/pom.xml
+++ b/modules/twitter/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-twitter</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/urideploy/pom.xml
----------------------------------------------------------------------
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index fcd2b49..5c39e54 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-urideploy</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/visor-console-2.10/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-console-2.10/pom.xml b/modules/visor-console-2.10/pom.xml
index e4c29f8..7b73bb4 100644
--- a/modules/visor-console-2.10/pom.xml
+++ b/modules/visor-console-2.10/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-visor-console_2.10</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/visor-console/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml
index ccdba4f..126de56 100644
--- a/modules/visor-console/pom.xml
+++ b/modules/visor-console/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-visor-console</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/visor-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-plugins/pom.xml b/modules/visor-plugins/pom.xml
index 4403e08..8a38515 100644
--- a/modules/visor-plugins/pom.xml
+++ b/modules/visor-plugins/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-visor-plugins</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/web/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/pom.xml b/modules/web/pom.xml
index 9a7e81d..ee90a5f 100644
--- a/modules/web/pom.xml
+++ b/modules/web/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-web</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/yardstick/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/pom.xml b/modules/yardstick/pom.xml
index 9c0f594..357d21c 100644
--- a/modules/yardstick/pom.xml
+++ b/modules/yardstick/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-yardstick</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<properties>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/yarn/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yarn/pom.xml b/modules/yarn/pom.xml
index 348c72e..bf89a6a 100644
--- a/modules/yarn/pom.xml
+++ b/modules/yarn/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-yarn</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<properties>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/modules/zookeeper/pom.xml
----------------------------------------------------------------------
diff --git a/modules/zookeeper/pom.xml b/modules/zookeeper/pom.xml
index 8879ec3..96fb1fc 100644
--- a/modules/zookeeper/pom.xml
+++ b/modules/zookeeper/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-zookeeper</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
<dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/8be0ced4/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ec34661..4bdad1e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
<groupId>org.apache.ignite</groupId>
<artifactId>apache-ignite</artifactId>
- <version>1.5.0-final-SNAPSHOT</version>
+ <version>1.5.0.final-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
[13/19] ignite git commit: ignite-1.5 Implemented start of local node
with specified configuration and custom environment variables.
Posted by nt...@apache.org.
ignite-1.5 Implemented start of local node with specified configuration and custom environment variables.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8f5445ab
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8f5445ab
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8f5445ab
Branch: refs/heads/ignite-gg-10837
Commit: 8f5445ab934c0133f45a87b220b5d4841c9bca43
Parents: 77e77e4
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Thu Dec 24 14:41:18 2015 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Thu Dec 24 14:41:18 2015 +0700
----------------------------------------------------------------------
.../internal/visor/util/VisorTaskUtils.java | 122 ++++++++++++++++++-
1 file changed, 118 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/8f5445ab/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
index 579f50c..83dbda0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.visor.util;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileFilter;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.net.InetAddress;
@@ -36,6 +37,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.SortedMap;
@@ -101,6 +103,9 @@ public class VisorTaskUtils {
/** Log files count limit */
public static final int LOG_FILES_COUNT_LIMIT = 5000;
+ /** */
+ private static final int DFLT_BUFFER_SIZE = 4096;
+
/** Only task event types that Visor should collect. */
public static final int[] VISOR_TASK_EVTS = {
EVT_JOB_STARTED,
@@ -558,7 +563,7 @@ public class VisorTaskUtils {
try (RandomAccessFile raf = new RandomAccessFile(f, "r")) {
FileChannel ch = raf.getChannel();
- ByteBuffer buf = ByteBuffer.allocate(4096);
+ ByteBuffer buf = ByteBuffer.allocate(DFLT_BUFFER_SIZE);
ch.read(buf);
@@ -823,6 +828,85 @@ public class VisorTaskUtils {
}
/**
+ * Start local node in terminal.
+ *
+ * @param log Logger.
+ * @param cfgPath Path to node configuration to start with.
+ * @param nodesToStart Number of nodes to start.
+ * @param quite If {@code true} then start node in quiet mode.
+ * @param envVars Optional map with environment variables.
+ * @return List of started processes.
+ * @throws IOException If failed to start.
+ */
+ public static List<Process> startLocalNode(@Nullable IgniteLogger log, String cfgPath, int nodesToStart,
+ boolean quite, Map<String, String> envVars) throws IOException {
+ String quitePar = quite ? "" : "-v";
+
+ String cmdFile = new File("bin", U.isWindows() ? "ignite.bat" : "ignite.sh").getPath();
+
+ File cmdFilePath = U.resolveIgnitePath(cmdFile);
+
+ if (cmdFilePath == null || !cmdFilePath.exists())
+ throw new FileNotFoundException(String.format("File not found: %s", cmdFile));
+
+ String ignite = cmdFilePath.getCanonicalPath();
+
+ File nodesCfgPath = U.resolveIgnitePath(cfgPath);
+
+ if (nodesCfgPath == null || !nodesCfgPath.exists())
+ throw new FileNotFoundException(String.format("File not found: %s", cfgPath));
+
+ String nodeCfg = nodesCfgPath.getCanonicalPath();
+
+ log(log, String.format("Starting %s local %s with '%s' config", nodesToStart, nodesToStart > 1 ? "nodes" : "node", nodeCfg));
+
+ List<Process> run = new ArrayList<>();
+
+ try {
+ for (int i = 0; i < nodesToStart; i++) {
+ if (U.isMacOs()) {
+ StringBuilder envs = new StringBuilder();
+
+ Map<String, String> macEnv = new HashMap<>(System.getenv());
+
+ if (envVars != null) {
+ for (Map.Entry<String, String> ent : envVars.entrySet())
+ if (macEnv.containsKey(ent.getKey())) {
+ String old = macEnv.get(ent.getKey());
+
+ if (old == null || old.isEmpty())
+ macEnv.put(ent.getKey(), ent.getValue());
+ else
+ macEnv.put(ent.getKey(), old + ':' + ent.getValue());
+ }
+ else
+ macEnv.put(ent.getKey(), ent.getValue());
+ }
+
+ for (Map.Entry<String, String> entry : macEnv.entrySet()) {
+ String val = entry.getValue();
+
+ if (val.indexOf(';') < 0 && val.indexOf('\'') < 0)
+ envs.append(String.format("export %s='%s'; ",
+ entry.getKey(), val.replace('\n', ' ').replace("'", "\'")));
+ }
+
+ run.add(openInConsole(envs.toString(), ignite, quitePar, nodeCfg));
+ } else
+ run.add(openInConsole(null, envVars, ignite, quitePar, nodeCfg));
+ }
+
+ return run;
+ }
+ catch (Exception e) {
+ for (Process proc: run)
+ proc.destroy();
+
+ throw e;
+ }
+ }
+
+ /**
* Run command in separated console.
*
* @param args A string array containing the program and its arguments.
@@ -839,9 +923,22 @@ public class VisorTaskUtils {
* @param workFolder Work folder for command.
* @param args A string array containing the program and its arguments.
* @return Started process.
+ * @throws IOException in case of error.
+ */
+ public static Process openInConsole(@Nullable File workFolder, String... args) throws IOException {
+ return openInConsole(workFolder, null, args);
+ }
+
+ /**
+ * Run command in separated console.
+ *
+ * @param workFolder Work folder for command.
+ * @param envVars Optional map with environment variables.
+ * @param args A string array containing the program and its arguments.
+ * @return Started process.
* @throws IOException If failed to start process.
*/
- public static Process openInConsole(@Nullable File workFolder, String... args)
+ public static Process openInConsole(@Nullable File workFolder, Map<String, String> envVars, String... args)
throws IOException {
String[] commands = args;
@@ -862,6 +959,23 @@ public class VisorTaskUtils {
if (workFolder != null)
pb.directory(workFolder);
+ if (envVars != null) {
+ String sep = U.isWindows() ? ";" : ":";
+
+ Map<String, String> goalVars = pb.environment();
+
+ for (Map.Entry<String, String> var: envVars.entrySet()) {
+ String envVar = goalVars.get(var.getKey());
+
+ if (envVar == null || envVar.isEmpty())
+ envVar = var.getValue();
+ else
+ envVar += sep + var.getValue();
+
+ goalVars.put(var.getKey(), envVar);
+ }
+ }
+
return pb.start();
}
@@ -873,7 +987,7 @@ public class VisorTaskUtils {
* @throws IOException If failed.
*/
public static byte[] zipBytes(byte[] input) throws IOException {
- return zipBytes(input, 4096);
+ return zipBytes(input, DFLT_BUFFER_SIZE);
}
/**
@@ -904,4 +1018,4 @@ public class VisorTaskUtils {
return bos.toByteArray();
}
-}
\ No newline at end of file
+}
[02/19] ignite git commit: 1.5.0.final-SNAPSHOT
Posted by nt...@apache.org.
1.5.0.final-SNAPSHOT
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b6dab091
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b6dab091
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b6dab091
Branch: refs/heads/ignite-gg-10837
Commit: b6dab0915d691c9a4b9e949d90d93ced8458e018
Parents: 8be0ced
Author: Ignite Teamcity <ig...@apache.org>
Authored: Tue Dec 22 18:21:45 2015 +0300
Committer: Ignite Teamcity <ig...@apache.org>
Committed: Tue Dec 22 18:21:45 2015 +0300
----------------------------------------------------------------------
modules/platforms/cpp/common/configure.ac | 2 +-
modules/platforms/cpp/core-test/configure.ac | 2 +-
modules/platforms/cpp/core/configure.ac | 2 +-
modules/platforms/cpp/examples/configure.ac | 2 +-
modules/platforms/cpp/ignite/configure.ac | 2 +-
.../dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs | 4 ++--
.../Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs | 4 ++--
.../dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs | 4 ++--
.../dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs | 4 ++--
.../platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs | 4 ++--
.../examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs | 4 ++--
.../Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs | 4 ++--
12 files changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b6dab091/modules/platforms/cpp/common/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/configure.ac b/modules/platforms/cpp/common/configure.ac
index 63bc44c..c81873d 100644
--- a/modules/platforms/cpp/common/configure.ac
+++ b/modules/platforms/cpp/common/configure.ac
@@ -19,7 +19,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([Apache Ignite JNI bridge for C++], [1.5.0.7791], [dev@ignite.apache.org], [ignite-common], [ignite.apache.org])
+AC_INIT([Apache Ignite JNI bridge for C++], [1.5.0.7794], [dev@ignite.apache.org], [ignite-common], [ignite.apache.org])
AC_CONFIG_SRCDIR(src)
AC_CANONICAL_SYSTEM
http://git-wip-us.apache.org/repos/asf/ignite/blob/b6dab091/modules/platforms/cpp/core-test/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/configure.ac b/modules/platforms/cpp/core-test/configure.ac
index 736c721..5918135 100644
--- a/modules/platforms/cpp/core-test/configure.ac
+++ b/modules/platforms/cpp/core-test/configure.ac
@@ -19,7 +19,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([Apache Ignite C++ Test], [1.5.0.7791], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
+AC_INIT([Apache Ignite C++ Test], [1.5.0.7794], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
AC_CONFIG_SRCDIR(src)
AC_CANONICAL_SYSTEM
http://git-wip-us.apache.org/repos/asf/ignite/blob/b6dab091/modules/platforms/cpp/core/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/configure.ac b/modules/platforms/cpp/core/configure.ac
index a87bd58..7f36009 100644
--- a/modules/platforms/cpp/core/configure.ac
+++ b/modules/platforms/cpp/core/configure.ac
@@ -19,7 +19,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([Apache Ignite C++], [1.5.0.7791], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
+AC_INIT([Apache Ignite C++], [1.5.0.7794], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
AC_CONFIG_SRCDIR(src)
AC_CANONICAL_SYSTEM
http://git-wip-us.apache.org/repos/asf/ignite/blob/b6dab091/modules/platforms/cpp/examples/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/configure.ac b/modules/platforms/cpp/examples/configure.ac
index b3d72ab..c9aa6b7 100644
--- a/modules/platforms/cpp/examples/configure.ac
+++ b/modules/platforms/cpp/examples/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([Ingnite C++ examples],[1.5.0.7791],[dec@ignite.apache.org],[ignite-examples],[ignite.apache.org])
+AC_INIT([Ingnite C++ examples],[1.5.0.7794],[dec@ignite.apache.org],[ignite-examples],[ignite.apache.org])
AC_CONFIG_SRCDIR(src)
AC_CANONICAL_SYSTEM
http://git-wip-us.apache.org/repos/asf/ignite/blob/b6dab091/modules/platforms/cpp/ignite/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/ignite/configure.ac b/modules/platforms/cpp/ignite/configure.ac
index 7393275..94a5eaf 100644
--- a/modules/platforms/cpp/ignite/configure.ac
+++ b/modules/platforms/cpp/ignite/configure.ac
@@ -19,7 +19,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([Apache Ignite C++ Runner], [1.5.0.7791], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
+AC_INIT([Apache Ignite C++ Runner], [1.5.0.7794], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
AC_CONFIG_SRCDIR(src)
AC_CANONICAL_SYSTEM
http://git-wip-us.apache.org/repos/asf/ignite/blob/b6dab091/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
index 5e9d84c..859620c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
[assembly: Guid("8fae8395-7e91-411a-a78f-44d6d3fed0fc")]
-[assembly: AssemblyVersion("1.5.0.7791")]
-[assembly: AssemblyFileVersion("1.5.0.7791")]
+[assembly: AssemblyVersion("1.5.0.7794")]
+[assembly: AssemblyFileVersion("1.5.0.7794")]
[assembly: AssemblyInformationalVersion("1.5.0.final")]
http://git-wip-us.apache.org/repos/asf/ignite/blob/b6dab091/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs
index 8088c5e..1fc5582 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs
@@ -45,6 +45,6 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.5.0.7791")]
-[assembly: AssemblyFileVersion("1.5.0.7791")]
+[assembly: AssemblyVersion("1.5.0.7794")]
+[assembly: AssemblyFileVersion("1.5.0.7794")]
[assembly: AssemblyInformationalVersion("1.5.0.final")]
http://git-wip-us.apache.org/repos/asf/ignite/blob/b6dab091/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs
index 984d5dc..bd3237c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
[assembly: Guid("de8dd5cc-7c7f-4a09-80d5-7086d9416a7b")]
-[assembly: AssemblyVersion("1.5.0.7791")]
-[assembly: AssemblyFileVersion("1.5.0.7791")]
+[assembly: AssemblyVersion("1.5.0.7794")]
+[assembly: AssemblyFileVersion("1.5.0.7794")]
[assembly: AssemblyInformationalVersion("1.5.0.final")]
http://git-wip-us.apache.org/repos/asf/ignite/blob/b6dab091/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs
index 6fe123d..f7e2f86 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs
@@ -33,8 +33,8 @@ using System.Runtime.InteropServices;
[assembly: Guid("97db45a8-f922-456a-a819-7b3c6e5e03ba")]
-[assembly: AssemblyVersion("1.5.0.7791")]
-[assembly: AssemblyFileVersion("1.5.0.7791")]
+[assembly: AssemblyVersion("1.5.0.7794")]
+[assembly: AssemblyFileVersion("1.5.0.7794")]
[assembly: AssemblyInformationalVersion("1.5.0.final")]
[assembly: CLSCompliant(true)]
http://git-wip-us.apache.org/repos/asf/ignite/blob/b6dab091/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs
index 6814ea7..ab59db5 100644
--- a/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
[assembly: Guid("0f9702ec-da7d-4ce5-b4b7-73310c885355")]
-[assembly: AssemblyVersion("1.5.0.7791")]
-[assembly: AssemblyFileVersion("1.5.0.7791")]
+[assembly: AssemblyVersion("1.5.0.7794")]
+[assembly: AssemblyFileVersion("1.5.0.7794")]
[assembly: AssemblyInformationalVersion("1.5.0.final")]
http://git-wip-us.apache.org/repos/asf/ignite/blob/b6dab091/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
index fae8f69..e9c35d3 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@
[assembly: Guid("41a0cb95-3435-4c78-b867-900b28e2c9ee")]
-[assembly: AssemblyVersion("1.5.0.7791")]
-[assembly: AssemblyFileVersion("1.5.0.7791")]
+[assembly: AssemblyVersion("1.5.0.7794")]
+[assembly: AssemblyFileVersion("1.5.0.7794")]
[assembly: AssemblyInformationalVersion("1.5.0.final")]
http://git-wip-us.apache.org/repos/asf/ignite/blob/b6dab091/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
index 3c059c6..5d251b7 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Reflection;
[assembly: Guid("ce65ec7c-d3cf-41ad-8f45-f90d5af68d77")]
-[assembly: AssemblyVersion("1.5.0.7791")]
-[assembly: AssemblyFileVersion("1.5.0.7791")]
+[assembly: AssemblyVersion("1.5.0.7794")]
+[assembly: AssemblyFileVersion("1.5.0.7794")]
[assembly: AssemblyInformationalVersion("1.5.0.final")]
[07/19] ignite git commit: ignite-1.5 Fixed hang on metadata update
inside put in atomic cache when topology read lock is held. Also fixed
several test issues.
Posted by nt...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
index 5a4ba14..283da80 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
@@ -1009,107 +1009,111 @@ public abstract class CacheContinuousQueryFailoverAbstractSelfTest extends GridC
*/
private void checkEvents(final List<T3<Object, Object, Object>> expEvts, final CacheEventListener2 lsnr,
boolean lostAllow, boolean wait) throws Exception {
- if (wait)
+ if (wait) {
GridTestUtils.waitForCondition(new PA() {
- @Override public boolean apply() {
+ @Override
+ public boolean apply() {
return expEvts.size() == lsnr.size();
}
}, 2000L);
+ }
- Map<Integer, List<CacheEntryEvent<?, ?>>> prevMap = new HashMap<>(lsnr.evts.size());
+ synchronized (lsnr) {
+ Map<Integer, List<CacheEntryEvent<?, ?>>> prevMap = new HashMap<>(lsnr.evts.size());
- for (Map.Entry<Integer, List<CacheEntryEvent<?, ?>>> e : lsnr.evts.entrySet())
- prevMap.put(e.getKey(), new ArrayList<>(e.getValue()));
+ for (Map.Entry<Integer, List<CacheEntryEvent<?, ?>>> e : lsnr.evts.entrySet())
+ prevMap.put(e.getKey(), new ArrayList<>(e.getValue()));
- List<T3<Object, Object, Object>> lostEvts = new ArrayList<>();
+ List<T3<Object, Object, Object>> lostEvts = new ArrayList<>();
- for (T3<Object, Object, Object> exp : expEvts) {
- List<CacheEntryEvent<?, ?>> rcvdEvts = lsnr.evts.get(exp.get1());
+ for (T3<Object, Object, Object> exp : expEvts) {
+ List<CacheEntryEvent<?, ?>> rcvdEvts = lsnr.evts.get(exp.get1());
- if (F.eq(exp.get2(), exp.get3()))
- continue;
+ if (F.eq(exp.get2(), exp.get3()))
+ continue;
- if (rcvdEvts == null || rcvdEvts.isEmpty()) {
- lostEvts.add(exp);
+ if (rcvdEvts == null || rcvdEvts.isEmpty()) {
+ lostEvts.add(exp);
- continue;
- }
+ continue;
+ }
- Iterator<CacheEntryEvent<?, ?>> iter = rcvdEvts.iterator();
+ Iterator<CacheEntryEvent<?, ?>> iter = rcvdEvts.iterator();
- boolean found = false;
+ boolean found = false;
- while (iter.hasNext()) {
- CacheEntryEvent<?, ?> e = iter.next();
+ while (iter.hasNext()) {
+ CacheEntryEvent<?, ?> e = iter.next();
- if ((exp.get2() != null && e.getValue() != null && exp.get2().equals(e.getValue()))
- && equalOldValue(e, exp)) {
- found = true;
+ if ((exp.get2() != null && e.getValue() != null && exp.get2().equals(e.getValue()))
+ && equalOldValue(e, exp)) {
+ found = true;
- iter.remove();
+ iter.remove();
- break;
+ break;
+ }
}
- }
- // Lost event is acceptable.
- if (!found)
- lostEvts.add(exp);
- }
+ // Lost event is acceptable.
+ if (!found)
+ lostEvts.add(exp);
+ }
- boolean dup = false;
+ boolean dup = false;
- // Check duplicate.
- if (!lsnr.evts.isEmpty()) {
- for (List<CacheEntryEvent<?, ?>> evts : lsnr.evts.values()) {
- if (!evts.isEmpty()) {
- for (CacheEntryEvent<?, ?> e : evts) {
- boolean found = false;
+ // Check duplicate.
+ if (!lsnr.evts.isEmpty()) {
+ for (List<CacheEntryEvent<?, ?>> evts : lsnr.evts.values()) {
+ if (!evts.isEmpty()) {
+ for (CacheEntryEvent<?, ?> e : evts) {
+ boolean found = false;
- for (T3<Object, Object, Object> lostEvt : lostEvts) {
- if (e.getKey().equals(lostEvt.get1()) && e.getValue().equals(lostEvt.get2())) {
- found = true;
+ for (T3<Object, Object, Object> lostEvt : lostEvts) {
+ if (e.getKey().equals(lostEvt.get1()) && e.getValue().equals(lostEvt.get2())) {
+ found = true;
- lostEvts.remove(lostEvt);
+ lostEvts.remove(lostEvt);
- break;
+ break;
+ }
}
- }
- if (!found) {
- dup = true;
+ if (!found) {
+ dup = true;
- break;
+ break;
+ }
}
}
}
- }
- if (dup) {
- for (List<CacheEntryEvent<?, ?>> e : lsnr.evts.values()) {
- if (!e.isEmpty()) {
- for (CacheEntryEvent<?, ?> event : e)
- log.error("Got duplicate event: " + event);
+ if (dup) {
+ for (List<CacheEntryEvent<?, ?>> e : lsnr.evts.values()) {
+ if (!e.isEmpty()) {
+ for (CacheEntryEvent<?, ?> event : e)
+ log.error("Got duplicate event: " + event);
+ }
}
}
}
- }
- if (!lostAllow && lostEvts.size() > 100) {
- log.error("Lost event cnt: " + lostEvts.size());
+ if (!lostAllow && lostEvts.size() > 100) {
+ log.error("Lost event cnt: " + lostEvts.size());
- for (T3<Object, Object, Object> e : lostEvts)
- log.error("Lost event: " + e);
+ for (T3<Object, Object, Object> e : lostEvts)
+ log.error("Lost event: " + e);
- fail("Lose events, see log for details.");
- }
+ fail("Lose events, see log for details.");
+ }
- log.error("Lost event cnt: " + lostEvts.size());
+ log.error("Lost event cnt: " + lostEvts.size());
- expEvts.clear();
+ expEvts.clear();
- lsnr.evts.clear();
- lsnr.vals.clear();
+ lsnr.evts.clear();
+ lsnr.vals.clear();
+ }
}
/**
@@ -2111,7 +2115,7 @@ public abstract class CacheContinuousQueryFailoverAbstractSelfTest extends GridC
/**
* @return Count events.
*/
- public int size() {
+ public synchronized int size() {
int size = 0;
for (List<CacheEntryEvent<?, ?>> e : evts.values())
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/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 5f5dfd4..db59a7f 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
@@ -62,6 +62,7 @@ import org.apache.ignite.internal.util.typedef.PA;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteBiInClosure;
import org.apache.ignite.lang.IgnitePredicate;
+import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
@@ -128,6 +129,8 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
cfg.setDiscoverySpi(disco);
+ ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
+
return cfg;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java
index b529b6c..49c6968 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java
@@ -27,6 +27,7 @@ import org.apache.ignite.IgniteLogger;
import org.apache.ignite.cluster.ClusterGroup;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.util.lang.GridAbsPredicate;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.lang.IgniteCallable;
import org.apache.ignite.marshaller.optimized.OptimizedMarshaller;
@@ -38,6 +39,7 @@ import org.apache.ignite.services.ServiceDescriptor;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
/**
@@ -171,14 +173,20 @@ public class ClosureServiceClientsNodesTest extends GridCommonAbstractTest {
for (int i = 0 ; i < NODES_CNT; i++) {
log.info("Iteration: " + i);
- Ignite ignite = grid(i);
+ final Ignite ignite = grid(i);
ignite.services().deployNodeSingleton(SINGLETON_NAME, new TestService());
- ClusterGroup grp = ignite.cluster();
+ final ClusterGroup grp = ignite.cluster();
assertEquals(NODES_CNT, grp.nodes().size());
+ GridTestUtils.waitForCondition(new GridAbsPredicate() {
+ @Override public boolean apply() {
+ return ignite.services(grp).serviceDescriptors().size() == 1;
+ }
+ }, 5000);
+
Collection<ServiceDescriptor> srvDscs = ignite.services(grp).serviceDescriptors();
assertEquals(1, srvDscs.size());
@@ -206,14 +214,20 @@ public class ClosureServiceClientsNodesTest extends GridCommonAbstractTest {
for (int i = 0 ; i < NODES_CNT; i++) {
log.info("Iteration: " + i);
- Ignite ignite = grid(i);
+ final Ignite ignite = grid(i);
ignite.services(ignite.cluster().forClients()).deployNodeSingleton(SINGLETON_NAME, new TestService());
- ClusterGroup grp = ignite.cluster();
+ final ClusterGroup grp = ignite.cluster();
assertEquals(NODES_CNT, grp.nodes().size());
+ GridTestUtils.waitForCondition(new GridAbsPredicate() {
+ @Override public boolean apply() {
+ return ignite.services(grp).serviceDescriptors().size() == 1;
+ }
+ }, 5000);
+
Collection<ServiceDescriptor> srvDscs = ignite.services(grp).serviceDescriptors();
assertEquals(1, srvDscs.size());
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java
index dfea37a..92b18ab 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java
@@ -17,15 +17,18 @@
package org.apache.ignite.internal.processors.service;
+import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteServices;
import org.apache.ignite.Ignition;
+import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.services.Service;
import org.apache.ignite.services.ServiceContext;
+import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
/**
@@ -49,10 +52,8 @@ public class GridServiceProcessorStopSelfTest extends GridCommonAbstractTest {
final Ignite ignite = startGrid(0);
- Thread t = new Thread(new Runnable() {
- @Override public void run() {
- Thread.currentThread().setName("deploy-thread");
-
+ IgniteInternalFuture<?> fut = GridTestUtils.runAsync(new Callable<Void>() {
+ @Override public Void call() throws Exception {
IgniteServices svcs = ignite.services();
IgniteServices services = svcs.withAsync();
@@ -67,13 +68,13 @@ public class GridServiceProcessorStopSelfTest extends GridCommonAbstractTest {
catch (IgniteException e) {
finishLatch.countDown();
}
- catch (Throwable e) {
- log.error("Service deployment error: ", e);
+ finally {
+ finishLatch.countDown();
}
- }
- });
- t.start();
+ return null;
+ }
+ }, "deploy-thread");
depLatch.await();
@@ -85,6 +86,8 @@ public class GridServiceProcessorStopSelfTest extends GridCommonAbstractTest {
U.dumpThreads(log);
assertTrue("Deploy future isn't completed", wait);
+
+ fut.get();
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java
index 731b0c7..7bbf531 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java
@@ -37,6 +37,7 @@ import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.IgniteInterruptedCheckedException;
import org.apache.ignite.internal.managers.communication.GridIoMessageFactory;
+import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor;
import org.apache.ignite.internal.util.lang.GridAbsPredicate;
import org.apache.ignite.internal.util.nio.GridCommunicationClient;
import org.apache.ignite.internal.util.nio.GridNioRecoveryDescriptor;
@@ -55,6 +56,7 @@ import org.apache.ignite.spi.communication.GridTestMessage;
import org.apache.ignite.testframework.GridSpiTestContext;
import org.apache.ignite.testframework.GridTestNode;
import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.GridTestKernalContext;
import org.apache.ignite.testframework.junits.IgniteTestResources;
import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest;
import org.jsr166.ConcurrentLinkedDeque8;
@@ -90,6 +92,9 @@ public class GridTcpCommunicationSpiMultithreadedSelfTest extends GridSpiAbstrac
/** Initialized nodes */
private static final List<ClusterNode> nodes = new ArrayList<>();
+ /** */
+ private static GridTimeoutProcessor timeoutProcessor;
+
/** Flag indicating if listener should reject messages. */
private static boolean reject;
@@ -472,6 +477,12 @@ public class GridTcpCommunicationSpiMultithreadedSelfTest extends GridSpiAbstrac
Map<ClusterNode, GridSpiTestContext> ctxs = new HashMap<>();
+ timeoutProcessor = new GridTimeoutProcessor(new GridTestKernalContext(log));
+
+ timeoutProcessor.start();
+
+ timeoutProcessor.onKernalStart();
+
for (int i = 0; i < getSpiCount(); i++) {
CommunicationSpi<Message> spi = newCommunicationSpi();
@@ -485,6 +496,8 @@ public class GridTcpCommunicationSpiMultithreadedSelfTest extends GridSpiAbstrac
GridSpiTestContext ctx = initSpiContext();
+ ctx.timeoutProcessor(timeoutProcessor);
+
ctx.setLocalNode(node);
info(">>> Initialized context: nodeId=" + ctx.localNode().id());
@@ -548,6 +561,14 @@ public class GridTcpCommunicationSpiMultithreadedSelfTest extends GridSpiAbstrac
/** {@inheritDoc} */
@Override protected void afterTestsStopped() throws Exception {
+ if (timeoutProcessor != null) {
+ timeoutProcessor.onKernalStop(true);
+
+ timeoutProcessor.stop(true);
+
+ timeoutProcessor = null;
+ }
+
for (CommunicationSpi<Message> spi : spis.values()) {
spi.onContextDestroyed();
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/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 5af0596..0df7da6 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
@@ -897,8 +897,8 @@ public class TcpDiscoverySelfTest extends GridCommonAbstractTest {
*/
public void testIpFinderCleaning() throws Exception {
try {
- ipFinder.registerAddresses(Arrays.asList(new InetSocketAddress("host1", 1024),
- new InetSocketAddress("host2", 1024)));
+ ipFinder.registerAddresses(Arrays.asList(new InetSocketAddress("1.1.1.1", 1024),
+ new InetSocketAddress("1.1.1.2", 1024)));
Ignite g1 = startGrid(1);
@@ -912,13 +912,19 @@ public class TcpDiscoverySelfTest extends GridCommonAbstractTest {
}
}, timeout);
+ if (ipFinder.getRegisteredAddresses().size() != 1) {
+ log.error("Failed to wait for IP cleanup, will dump threads.");
+
+ U.dumpThreads(log);
+ }
+
assert ipFinder.getRegisteredAddresses().size() == 1 : "ipFinder=" + ipFinder.getRegisteredAddresses();
// Check that missing addresses are returned back.
ipFinder.unregisterAddresses(ipFinder.getRegisteredAddresses()); // Unregister valid address.
- ipFinder.registerAddresses(Arrays.asList(new InetSocketAddress("host1", 1024),
- new InetSocketAddress("host2", 1024)));
+ ipFinder.registerAddresses(Arrays.asList(new InetSocketAddress("1.1.1.1", 1024),
+ new InetSocketAddress("1.1.1.2", 1024)));
GridTestUtils.waitForCondition(new GridAbsPredicate() {
@Override public boolean apply() {
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java b/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
index e257a97..0bffe8b 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
@@ -41,6 +41,8 @@ import org.apache.ignite.internal.managers.communication.GridIoManager;
import org.apache.ignite.internal.managers.communication.GridIoMessageFactory;
import org.apache.ignite.internal.managers.communication.GridMessageListener;
import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
+import org.apache.ignite.internal.processors.timeout.GridSpiTimeoutObject;
+import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.lang.IgniteUuid;
import org.apache.ignite.plugin.extensions.communication.MessageFactory;
@@ -89,6 +91,16 @@ public class GridSpiTestContext implements IgniteSpiContext {
/** */
private MessageFactory factory;
+ /** */
+ private GridTimeoutProcessor timeoutProcessor;
+
+ /**
+ * @param timeoutProcessor Timeout processor.
+ */
+ public void timeoutProcessor(GridTimeoutProcessor timeoutProcessor) {
+ this.timeoutProcessor = timeoutProcessor;
+ }
+
/** {@inheritDoc} */
@Override public Collection<ClusterNode> remoteNodes() {
return rmtNodes;
@@ -530,12 +542,14 @@ public class GridSpiTestContext implements IgniteSpiContext {
/** {@inheritDoc} */
@Override public void addTimeoutObject(IgniteSpiTimeoutObject obj) {
- // No-op.
+ if (timeoutProcessor != null)
+ timeoutProcessor.addTimeoutObject(new GridSpiTimeoutObject(obj));
}
/** {@inheritDoc} */
@Override public void removeTimeoutObject(IgniteSpiTimeoutObject obj) {
- // No-op.
+ if (timeoutProcessor != null)
+ timeoutProcessor.removeTimeoutObject(new GridSpiTimeoutObject(obj));
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionFilter.java
----------------------------------------------------------------------
diff --git a/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionFilter.java b/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionFilter.java
index 77e2dae..4a84931 100644
--- a/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionFilter.java
+++ b/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionFilter.java
@@ -38,14 +38,16 @@ import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.IgniteTransactions;
-import org.apache.ignite.cache.CachePartialUpdateException;
+import org.apache.ignite.cluster.ClusterTopologyException;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.internal.util.typedef.C1;
import org.apache.ignite.internal.util.typedef.G;
import org.apache.ignite.internal.util.typedef.T2;
+import org.apache.ignite.internal.util.typedef.X;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteClosure;
+import org.apache.ignite.lang.IgniteFuture;
import org.apache.ignite.startup.servlet.ServletContextListenerStartup;
import org.apache.ignite.transactions.Transaction;
@@ -191,6 +193,9 @@ public class WebSessionFilter implements Filter {
/** Transactions enabled flag. */
private boolean txEnabled;
+ /** */
+ private int retries;
+
/** {@inheritDoc} */
@Override public void init(FilterConfig cfg) throws ServletException {
ctx = cfg.getServletContext();
@@ -207,8 +212,6 @@ public class WebSessionFilter implements Filter {
cfg.getInitParameter(WEB_SES_MAX_RETRIES_ON_FAIL_NAME_PARAM),
ctx.getInitParameter(WEB_SES_MAX_RETRIES_ON_FAIL_NAME_PARAM));
- int retries;
-
try {
retries = retriesStr != null ? Integer.parseInt(retriesStr) : DFLT_MAX_RETRIES_ON_FAIL;
}
@@ -226,10 +229,6 @@ public class WebSessionFilter implements Filter {
log = webSesIgnite.log();
- if (webSesIgnite == null)
- throw new IgniteException("Grid for web sessions caching is not started (is it configured?): " +
- gridName);
-
cache = webSesIgnite.cache(cacheName);
if (cache == null)
@@ -409,41 +408,62 @@ public class WebSessionFilter implements Filter {
WebSession cached = new WebSession(ses, true);
- try {
- while (true) {
- try {
- IgniteCache<String, WebSession> cache0;
-
- if (cached.getMaxInactiveInterval() > 0) {
- long ttl = cached.getMaxInactiveInterval() * 1000;
+ for (int i = 0; i < retries; i++) {
+ try {
+ IgniteCache<String, WebSession> cache0;
- ExpiryPolicy plc = new ModifiedExpiryPolicy(new Duration(MILLISECONDS, ttl));
+ if (cached.getMaxInactiveInterval() > 0) {
+ long ttl = cached.getMaxInactiveInterval() * 1000;
- cache0 = cache.withExpiryPolicy(plc);
- }
- else
- cache0 = cache;
+ ExpiryPolicy plc = new ModifiedExpiryPolicy(new Duration(MILLISECONDS, ttl));
- WebSession old = cache0.getAndPutIfAbsent(sesId, cached);
+ cache0 = cache.withExpiryPolicy(plc);
+ }
+ else
+ cache0 = cache;
- if (old != null) {
- cached = old;
+ WebSession old = cache0.getAndPutIfAbsent(sesId, cached);
- if (cached.isNew())
- cached = new WebSession(cached, false);
- }
+ if (old != null) {
+ cached = old;
- break;
+ if (cached.isNew())
+ cached = new WebSession(cached, false);
}
- catch (CachePartialUpdateException e) {
+
+ break;
+ }
+ catch (CacheException | IgniteException e) {
+ if (log.isDebugEnabled())
+ log.debug(e.getMessage());
+
+ if (i == retries - 1)
+ throw new IgniteException("Failed to save session: " + sesId, e);
+ else {
if (log.isDebugEnabled())
- log.debug(e.getMessage());
+ log.debug("Failed to save session (will retry): " + sesId);
+
+ IgniteFuture<?> retryFut = null;
+
+ if (X.hasCause(e, ClusterTopologyException.class)) {
+ ClusterTopologyException cause = X.cause(e, ClusterTopologyException.class);
+
+ assert cause != null : e;
+
+ retryFut = cause.retryReadyFuture();
+ }
+
+ if (retryFut != null) {
+ try {
+ retryFut.get();
+ }
+ catch (IgniteException retryErr) {
+ throw new IgniteException("Failed to save session: " + sesId, retryErr);
+ }
+ }
}
}
}
- catch (CacheException e) {
- throw new IgniteException("Failed to save session: " + sesId, e);
- }
return cached;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionListener.java
----------------------------------------------------------------------
diff --git a/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionListener.java b/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionListener.java
index 82f1633..b826031 100644
--- a/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionListener.java
+++ b/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionListener.java
@@ -30,12 +30,14 @@ import javax.cache.processor.EntryProcessor;
import javax.cache.processor.MutableEntry;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.cache.CachePartialUpdateException;
-import org.apache.ignite.internal.IgniteInterruptedCheckedException;
+import org.apache.ignite.cluster.ClusterTopologyException;
import org.apache.ignite.internal.util.typedef.T2;
+import org.apache.ignite.internal.util.typedef.X;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteFuture;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
@@ -117,7 +119,7 @@ class WebSessionListener {
break;
}
- catch (CachePartialUpdateException ignored) {
+ catch (CacheException | IgniteException e) {
if (i == retries - 1) {
U.warn(log, "Failed to apply updates for session (maximum number of retries exceeded) [sesId=" +
sesId + ", retries=" + retries + ']');
@@ -125,12 +127,25 @@ class WebSessionListener {
else {
U.warn(log, "Failed to apply updates for session (will retry): " + sesId);
- U.sleep(RETRY_DELAY);
+ IgniteFuture<?> retryFut = null;
+
+ if (X.hasCause(e, ClusterTopologyException.class)) {
+ ClusterTopologyException cause = X.cause(e, ClusterTopologyException.class);
+
+ assert cause != null : e;
+
+ retryFut = cause.retryReadyFuture();
+ }
+
+ if (retryFut != null)
+ retryFut.get();
+ else
+ U.sleep(RETRY_DELAY);
}
}
}
}
- catch (CacheException | IgniteInterruptedCheckedException e) {
+ catch (Exception e) {
U.error(log, "Failed to update session attributes [id=" + sesId + ']', e);
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
index 4508edb..7a321d6 100644
--- a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
+++ b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
@@ -142,7 +142,6 @@ public class WebSessionSelfTest extends GridCommonAbstractTest {
}
assert idx != -1;
- assert srv != null;
stopServer(srv);
@@ -181,7 +180,6 @@ public class WebSessionSelfTest extends GridCommonAbstractTest {
}
assert idx != -1;
- assert srv != null;
int port = TEST_JETTY_PORT + idx;
[06/19] ignite git commit: IGNITE-2200 - Fixed deployment. - Fixes
#367.
Posted by nt...@apache.org.
IGNITE-2200 - Fixed deployment. - Fixes #367.
Signed-off-by: Alexey Goncharuk <al...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/16a9e6da
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/16a9e6da
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/16a9e6da
Branch: refs/heads/ignite-gg-10837
Commit: 16a9e6da2a8baca35d9b95bc0a28995d3f1c5780
Parents: 66b33bc
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Wed Dec 23 14:52:28 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Wed Dec 23 14:52:28 2015 +0300
----------------------------------------------------------------------
.../query/GridCacheDistributedQueryManager.java | 6 +-
...iteCacheScanPredicateDeploymentSelfTest.java | 114 +++++++++++++++++++
.../testsuites/IgniteCacheTestSuite3.java | 2 +
.../p2p/CacheDeploymentAlwaysTruePredicate.java | 29 +++++
4 files changed, 149 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/16a9e6da/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
index 7f63b4c..353fbd3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
@@ -570,7 +570,8 @@ public class GridCacheDistributedQueryManager<K, V> extends GridCacheQueryManage
qry.query().subjectId(),
qry.query().taskHash(),
queryTopologyVersion(),
- cctx.deploymentEnabled());
+ // Force deployment anyway if scan query is used.
+ cctx.deploymentEnabled() || (qry.query().scanFilter() != null && cctx.gridDeploy().enabled()));
addQueryFuture(req.id(), fut);
@@ -616,7 +617,8 @@ public class GridCacheDistributedQueryManager<K, V> extends GridCacheQueryManage
qry.subjectId(),
qry.taskHash(),
queryTopologyVersion(),
- cctx.deploymentEnabled());
+ // Force deployment anyway if scan query is used.
+ cctx.deploymentEnabled() || (qry.scanFilter() != null && cctx.gridDeploy().enabled()));
sendRequest(fut, req, nodes);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/16a9e6da/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java
new file mode 100644
index 0000000..e1fbb0d
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java
@@ -0,0 +1,114 @@
+/*
+ * 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 java.util.List;
+import javax.cache.Cache;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.query.ScanQuery;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.lang.IgniteBiPredicate;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheMode.PARTITIONED;
+import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
+
+/**
+ *
+ */
+public class IgniteCacheScanPredicateDeploymentSelfTest extends GridCommonAbstractTest {
+ /** IP finder. */
+ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+ /** Test value. */
+ protected static final String TEST_PREDICATE = "org.apache.ignite.tests.p2p.CacheDeploymentAlwaysTruePredicate";
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ if (getTestGridName(3).equals(gridName))
+ cfg.setClassLoader(getExternalClassLoader());
+
+ cfg.setCacheConfiguration(cacheConfiguration());
+
+ TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+ disco.setIpFinder(IP_FINDER);
+
+ cfg.setDiscoverySpi(disco);
+
+ cfg.setConnectorConfiguration(null);
+
+ return cfg;
+ }
+
+ /**
+ * @return Cache configuration.
+ * @throws Exception In case of error.
+ */
+ protected CacheConfiguration cacheConfiguration() throws Exception {
+ CacheConfiguration cfg = defaultCacheConfiguration();
+
+ cfg.setCacheMode(PARTITIONED);
+ cfg.setWriteSynchronizationMode(FULL_SYNC);
+ cfg.setRebalanceMode(SYNC);
+ cfg.setAtomicityMode(atomicityMode());
+ cfg.setBackups(1);
+
+ return cfg;
+ }
+
+ protected CacheAtomicityMode atomicityMode() {
+ return TRANSACTIONAL;
+ }
+
+ /**
+ * @throws Exception In case of error.
+ */
+ public void testDeployScanPredicate() throws Exception {
+ startGrids(4);
+
+ awaitPartitionMapExchange();
+
+ try {
+ IgniteCache<Object, Object> cache = grid(3).cache(null);
+
+ // It is important that there are no too many keys.
+ for (int i = 0; i < 1; i++)
+ cache.put(i, i);
+
+ Class predCls = grid(3).configuration().getClassLoader().loadClass(TEST_PREDICATE);
+
+ IgniteBiPredicate<Object, Object> pred = (IgniteBiPredicate<Object, Object>)predCls.newInstance();
+
+ List<Cache.Entry<Object, Object>> all = cache.query(new ScanQuery<>(pred)).getAll();
+
+ assertEquals(1, all.size());
+ }
+ finally {
+ stopAllGrids();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/16a9e6da/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
index 176ab3f..b86a33d 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
@@ -33,6 +33,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheValueConsistencyTran
import org.apache.ignite.internal.processors.cache.GridCacheValueConsistencyTransactionalSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheVersionSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheInterceptorSelfTestSuite;
+import org.apache.ignite.internal.processors.cache.IgniteCacheScanPredicateDeploymentSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.CacheAsyncOperationsTest;
import org.apache.ignite.internal.processors.cache.distributed.GridCacheMixedModeSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.IgniteTxGetAfterStopTest;
@@ -127,6 +128,7 @@ public class IgniteCacheTestSuite3 extends TestSuite {
suite.addTestSuite(GridCacheConditionalDeploymentSelfTest.class);
suite.addTestSuite(GridCacheAtomicEntryProcessorDeploymentSelfTest.class);
suite.addTestSuite(GridCacheTransactionalEntryProcessorDeploymentSelfTest.class);
+ suite.addTestSuite(IgniteCacheScanPredicateDeploymentSelfTest.class);
suite.addTestSuite(GridCachePutArrayValueSelfTest.class);
suite.addTestSuite(GridCacheReplicatedUnswapAdvancedSelfTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/16a9e6da/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheDeploymentAlwaysTruePredicate.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheDeploymentAlwaysTruePredicate.java b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheDeploymentAlwaysTruePredicate.java
new file mode 100644
index 0000000..100ab95
--- /dev/null
+++ b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheDeploymentAlwaysTruePredicate.java
@@ -0,0 +1,29 @@
+/*
+ * 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.tests.p2p;
+
+import org.apache.ignite.lang.IgniteBiPredicate;
+
+/**
+ *
+ */
+public class CacheDeploymentAlwaysTruePredicate implements IgniteBiPredicate<Object, Object> {
+ /** */
+ @Override public boolean apply(Object o, Object o2) {
+ return true;
+ }
+}
[18/19] ignite git commit: ignite-1.5 Fixed test.
Posted by nt...@apache.org.
ignite-1.5 Fixed test.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/49c29886
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/49c29886
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/49c29886
Branch: refs/heads/ignite-gg-10837
Commit: 49c298866b7c113aa62af4fe0587d6d39edd9f50
Parents: debe34d
Author: sboikov <sb...@gridgain.com>
Authored: Thu Dec 24 15:52:59 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Dec 24 15:52:59 2015 +0300
----------------------------------------------------------------------
.../util/nio/GridNioRecoveryDescriptor.java | 7 -
.../ignite/internal/util/nio/GridNioServer.java | 7 +
.../communication/tcp/TcpCommunicationSpi.java | 12 +-
.../internal/util/nio/GridNioSelfTest.java | 127 ++++++++++++-------
...dTcpCommunicationSpiRecoveryAckSelfTest.java | 14 ++
.../GridUriDeploymentFileProcessorSelfTest.java | 19 ++-
6 files changed, 120 insertions(+), 66 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/49c29886/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioRecoveryDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioRecoveryDescriptor.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioRecoveryDescriptor.java
index 5647239..429f990 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioRecoveryDescriptor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioRecoveryDescriptor.java
@@ -134,13 +134,6 @@ public class GridNioRecoveryDescriptor {
}
/**
- * @return Received messages count.
- */
- public long receivedCount() {
- return rcvCnt;
- }
-
- /**
* @return Maximum size of unacknowledged messages queue.
*/
public int queueLimit() {
http://git-wip-us.apache.org/repos/asf/ignite/blob/49c29886/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 be28c30..17a0b8f 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
@@ -309,6 +309,13 @@ public class GridNioServer<T> {
}
/**
+ * @return Configured port.
+ */
+ public int port() {
+ return locAddr != null ? locAddr.getPort() : -1;
+ }
+
+ /**
* Creates and returns a builder for a new instance of this class.
*
* @return Builder for new instance.
http://git-wip-us.apache.org/repos/asf/ignite/blob/49c29886/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index bf6e869..6cdfe9a 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -620,7 +620,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
nioSrvr.resend(ses);
if (sndRes)
- nioSrvr.sendSystem(ses, new RecoveryLastReceivedMessage(recovery.receivedCount()));
+ nioSrvr.sendSystem(ses, new RecoveryLastReceivedMessage(recovery.received()));
recovery.connected();
@@ -714,7 +714,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
}
};
- nioSrvr.sendSystem(ses, new RecoveryLastReceivedMessage(recoveryDesc.receivedCount()), lsnr);
+ nioSrvr.sendSystem(ses, new RecoveryLastReceivedMessage(recoveryDesc.received()), lsnr);
}
else {
try {
@@ -2587,16 +2587,16 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
else
ch.write(ByteBuffer.wrap(U.IGNITE_HEADER));
- ClusterNode localNode = getLocalNode();
+ ClusterNode locNode = getLocalNode();
- if (localNode == null)
+ if (locNode == null)
throw new IgniteCheckedException("Local node has not been started or " +
"fully initialized [isStopping=" + getSpiContext().isStopping() + ']');
if (recovery != null) {
- HandshakeMessage msg = new HandshakeMessage(localNode.id(),
+ HandshakeMessage msg = new HandshakeMessage(locNode.id(),
recovery.incrementConnectCount(),
- recovery.receivedCount());
+ recovery.received());
if (log.isDebugEnabled())
log.debug("Write handshake message [rmtNode=" + rmtNodeId + ", msg=" + msg + ']');
http://git-wip-us.apache.org/repos/asf/ignite/blob/49c29886/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java
index 594e3c2..6089795 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java
@@ -23,6 +23,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import java.lang.reflect.Field;
+import java.net.BindException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
@@ -61,6 +62,9 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
/** Message count in test without reconnect. */
private static final int MSG_CNT = 2000;
+ /** */
+ private static final int START_PORT = 55443;
+
/** Message id provider. */
private static final AtomicInteger idProvider = new AtomicInteger(1);
@@ -80,13 +84,15 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
private static volatile Marshaller marsh;
/** Test port. */
- private int port = 55443;
+ private static int port;
/** {@inheritDoc} */
@Override protected void beforeTestsStarted() throws Exception {
getTestResources().startThreads(true);
marsh = getTestResources().getMarshaller();
+
+ port = START_PORT;
}
/** {@inheritDoc} */
@@ -94,13 +100,6 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
getTestResources().stopThreads();
}
- /** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- super.beforeTest();
-
- port++;
- }
-
/**
* @throws Exception If failed.
*/
@@ -127,19 +126,18 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
}
};
- GridNioServer<?> srvr = startServer(port, new GridPlainParser(), lsnr);
+ final GridNioServer<?> srvr = startServer(new GridPlainParser(), lsnr);
try {
IgniteInternalFuture<?> fut = multithreadedAsync(new Runnable() {
- @Override
- public void run() {
+ @Override public void run() {
byte[] msg = new byte[MSG_SIZE];
for (int i = 0; i < msg.length; i++)
msg[i] = (byte) (i ^ (i * i - 1)); // Some data
for (int i = 0; i < RECONNECT_MSG_CNT; i++)
- validateSendMessage(msg);
+ validateSendMessage(srvr.port(), msg);
}
}, THREAD_CNT);
@@ -177,11 +175,11 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
}
};
- GridNioServer<?> srvr = startServer(port, new GridPlainParser(), lsnr);
+ GridNioServer<?> srvr = startServer(new GridPlainParser(), lsnr);
Socket s = createSocket();
- s.connect(new InetSocketAddress(U.getLocalHost(), port), 1000);
+ s.connect(new InetSocketAddress(U.getLocalHost(), srvr.port()), 1000);
try {
byte[] msg = new byte[MSG_SIZE];
@@ -235,12 +233,12 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
}
};
- GridNioServer<?> srvr = startServer(port, new GridPlainParser(), lsnr);
+ GridNioServer<?> srvr = startServer(new GridPlainParser(), lsnr);
try {
Socket s = createSocket();
- s.connect(new InetSocketAddress(U.getLocalHost(), port), 1000);
+ s.connect(new InetSocketAddress(U.getLocalHost(), srvr.port()), 1000);
if (!(s instanceof SSLSocket)) {
// These methods are not supported by SSL sockets.
@@ -277,7 +275,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
}
};
- GridNioServer<?> srvr = startServer(port, new GridPlainParser(), lsnr);
+ final GridNioServer<?> srvr = startServer(new GridPlainParser(), lsnr);
final AtomicLong cnt = new AtomicLong();
@@ -285,8 +283,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
try {
IgniteInternalFuture<?> fut = multithreadedAsync(new Runnable() {
- @Override
- public void run() {
+ @Override public void run() {
try {
byte[] msg = new byte[MSG_SIZE];
@@ -294,7 +291,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
msg[i] = (byte) (i ^ (i * i - 1)); // Some data
try (Socket s = createSocket()) {
- s.connect(new InetSocketAddress(U.getLocalHost(), port), 1000);
+ s.connect(new InetSocketAddress(U.getLocalHost(), srvr.port()), 1000);
OutputStream out = s.getOutputStream();
@@ -369,12 +366,12 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
}
};
- GridNioServer<?> srvr = startServer(port, new GridPlainParser(), lsnr);
+ GridNioServer<?> srvr = startServer(new GridPlainParser(), lsnr);
try {
Socket s = createSocket();
- s.connect(new InetSocketAddress(U.getLocalHost(), port), 1000);
+ s.connect(new InetSocketAddress(U.getLocalHost(), srvr.port()), 1000);
// This is needed for SSL to begin handshake.
s.getOutputStream().write(new byte[1]);
@@ -439,16 +436,12 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
}
};
- GridNioServer.Builder<?> builder = serverBuilder(port, new GridPlainParser(), lsnr);
-
- GridNioServer<?> srvr = builder.sendQueueLimit(5).build();
-
- srvr.start();
+ GridNioServer<?> srvr = startServer(new GridPlainParser(), lsnr, 5);
try {
Socket s = createSocket();
- s.connect(new InetSocketAddress(U.getLocalHost(), port), 1000);
+ s.connect(new InetSocketAddress(U.getLocalHost(), srvr.port()), 1000);
s.getOutputStream().write(new byte[1]);
@@ -473,9 +466,10 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
/**
* Sends message and validates reply.
*
+ * @param port Port.
* @param msg Message to send.
*/
- private void validateSendMessage(byte[] msg) {
+ private void validateSendMessage(int port, byte[] msg) {
try {
Socket s = createSocket();
@@ -552,19 +546,54 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
/**
* Starts server with specified arguments.
*
- * @param port Port to listen.
* @param parser Parser to use.
* @param lsnr Listener.
* @return Started server.
* @throws Exception If failed.
*/
- protected final GridNioServer<?> startServer(int port, GridNioParser parser, GridNioServerListener lsnr)
+ protected final GridNioServer<?> startServer(GridNioParser parser, GridNioServerListener lsnr)
throws Exception {
- GridNioServer<?> srvr = serverBuilder(port, parser, lsnr).build();
+ return startServer(parser, lsnr, null);
+ }
+
+ /**
+ * Starts server with specified arguments.
+ *
+ * @param parser Parser to use.
+ * @param lsnr Listener.
+ * @param queueLimit Optional send queue limit.
+ * @return Started server.
+ * @throws Exception If failed.
+ */
+ protected final GridNioServer<?> startServer(GridNioParser parser,
+ GridNioServerListener lsnr,
+ @Nullable Integer queueLimit) throws Exception {
+ for (int i = 0; i < 10; i++) {
+ try {
+ int srvPort = port++;
+
+ GridNioServer.Builder<?> builder = serverBuilder(srvPort, parser, lsnr);
+
+ if (queueLimit != null)
+ builder.sendQueueLimit(queueLimit);
+
+ GridNioServer<?> srvr = builder.build();
+
+ srvr.start();
+
+ return srvr;
+ }
+ catch (IgniteCheckedException e) {
+ if (i < 9 && e.hasCause(BindException.class))
+ log.error("Failed to start server, will try another port: " + e);
+ else
+ throw e;
+ }
+ }
- srvr.start();
+ fail("Failed to start server.");
- return srvr;
+ return null;
}
/**
@@ -604,13 +633,13 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
NioListener lsnr = new NioListener(latch);
- GridNioServer<?> srvr = startServer(port, new GridBufferedParser(true, ByteOrder.nativeOrder()), lsnr);
+ GridNioServer<?> srvr = startServer(new GridBufferedParser(true, ByteOrder.nativeOrder()), lsnr);
TestClient client = null;
try {
for (int i = 0; i < 5; i++) {
- client = createClient(U.getLocalHost(), port, U.getLocalHost());
+ client = createClient(U.getLocalHost(), srvr.port(), U.getLocalHost());
client.sendMessage(createMessage(), MSG_SIZE);
client.sendMessage(createMessage(), MSG_SIZE);
@@ -638,13 +667,13 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
NioListener lsnr = new NioListener(latch);
- GridNioServer<?> srvr1 = startServer(port, new BufferedParser(false), lsnr);
- GridNioServer<?> srvr2 = startServer(port + 1, new BufferedParser(false), lsnr);
+ GridNioServer<?> srvr1 = startServer(new BufferedParser(false), lsnr);
+ GridNioServer<?> srvr2 = startServer(new BufferedParser(false), lsnr);
GridNioSession ses = null;
try {
- SocketChannel ch = SocketChannel.open(new InetSocketAddress(U.getLocalHost(), port + 1));
+ SocketChannel ch = SocketChannel.open(new InetSocketAddress(U.getLocalHost(), srvr2.port()));
GridNioFuture<GridNioSession> fut = srvr1.createSession(ch, null);
@@ -676,7 +705,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
NioListener lsnr = new NioListener(latch);
- GridNioServer<?> srvr = startServer(port, new GridBufferedParser(true, ByteOrder.nativeOrder()), lsnr);
+ final GridNioServer<?> srvr = startServer(new GridBufferedParser(true, ByteOrder.nativeOrder()), lsnr);
try {
final byte[] data = createMessage();
@@ -686,7 +715,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
TestClient client = null;
try {
- client = createClient(U.getLocalHost(), port, U.getLocalHost());
+ client = createClient(U.getLocalHost(), srvr.port(), U.getLocalHost());
for (int i = 0; i < MSG_CNT; i++)
client.sendMessage(data, data.length);
@@ -722,7 +751,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
final AtomicReference<Exception> err = new AtomicReference<>();
- GridNioServer<?> srvr = startServer(port, new GridBufferedParser(true, ByteOrder.nativeOrder()),
+ final GridNioServer<?> srvr = startServer(new GridBufferedParser(true, ByteOrder.nativeOrder()),
new EchoListener());
try {
@@ -734,7 +763,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
TestClient client = null;
try {
- client = createClient(U.getLocalHost(), port, U.getLocalHost());
+ client = createClient(U.getLocalHost(), srvr.port(), U.getLocalHost());
MessageWithId msg = new MessageWithId(idProvider.getAndIncrement());
@@ -827,7 +856,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
final AtomicLong cntr = new AtomicLong();
- GridNioServer<?> srvr = startServer(port, new GridBufferedParser(true, ByteOrder.nativeOrder()), lsnr);
+ final GridNioServer<?> srvr = startServer(new GridBufferedParser(true, ByteOrder.nativeOrder()), lsnr);
try {
multithreaded(new Runnable() {
@@ -835,7 +864,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
TestClient client = null;
try {
- client = createClient(U.getLocalHost(), port, U.getLocalHost());
+ client = createClient(U.getLocalHost(), srvr.port(), U.getLocalHost());
while (cntr.getAndIncrement() < MSG_CNT * THREAD_CNT) {
MessageWithId msg = new MessageWithId(idProvider.getAndIncrement());
@@ -908,14 +937,14 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
}
};
- GridNioServer<?> srvr = startServer(port, new GridBufferedParser(true, ByteOrder.nativeOrder()), lsnr);
+ final GridNioServer<?> srvr = startServer(new GridBufferedParser(true, ByteOrder.nativeOrder()), lsnr);
srvr.idleTimeout(1000);
try {
multithreaded(new Runnable() {
@Override public void run() {
- try (TestClient ignored = createClient(U.getLocalHost(), port, U.getLocalHost())) {
+ try (TestClient ignored = createClient(U.getLocalHost(), srvr.port(), U.getLocalHost())) {
info("Before sleep.");
U.sleep(4000);
@@ -976,7 +1005,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
}
};
- GridNioServer<?> srvr = startServer(port, new GridBufferedParser(true, ByteOrder.nativeOrder()), lsnr);
+ final GridNioServer<?> srvr = startServer(new GridBufferedParser(true, ByteOrder.nativeOrder()), lsnr);
// Set flag using reflection.
Field f = srvr.getClass().getDeclaredField("skipWrite");
@@ -990,7 +1019,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
try {
multithreaded(new Runnable() {
@Override public void run() {
- try (TestClient ignored = createClient(U.getLocalHost(), port, U.getLocalHost())) {
+ try (TestClient ignored = createClient(U.getLocalHost(), srvr.port(), U.getLocalHost())) {
info("Before sleep.");
U.sleep(4000);
http://git-wip-us.apache.org/repos/asf/ignite/blob/49c29886/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java
index 9e78fb9..d07a1e6 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java
@@ -149,6 +149,8 @@ public class GridTcpCommunicationSpiRecoveryAckSelfTest<T extends CommunicationS
int expMsgs = 0;
+ long totAcked = 0;
+
for (int i = 0; i < 5; i++) {
info("Iteration: " + i);
@@ -160,6 +162,8 @@ public class GridTcpCommunicationSpiRecoveryAckSelfTest<T extends CommunicationS
expMsgs += msgPerIter;
+ final long totAcked0 = totAcked;
+
for (TcpCommunicationSpi spi : spis) {
GridNioServer srv = U.field(spi, "nioSrvr");
@@ -177,6 +181,14 @@ public class GridTcpCommunicationSpiRecoveryAckSelfTest<T extends CommunicationS
GridTestUtils.waitForCondition(new GridAbsPredicate() {
@Override public boolean apply() {
+ long acked = GridTestUtils.getFieldValue(recoveryDesc, "acked");
+
+ return acked > totAcked0;
+ }
+ }, 5000);
+
+ GridTestUtils.waitForCondition(new GridAbsPredicate() {
+ @Override public boolean apply() {
return recoveryDesc.messagesFutures().isEmpty();
}
}, 10_000);
@@ -204,6 +216,8 @@ public class GridTcpCommunicationSpiRecoveryAckSelfTest<T extends CommunicationS
assertEquals(expMsgs, lsnr.rcvCnt.get());
}
+
+ totAcked += msgPerIter;
}
}
finally {
http://git-wip-us.apache.org/repos/asf/ignite/blob/49c29886/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java
index b87551d..cbcac9c 100644
--- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java
+++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java
@@ -20,7 +20,11 @@ package org.apache.ignite.spi.deployment.uri;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.internal.util.lang.GridAbsPredicate;
+import org.apache.ignite.internal.util.lang.GridAbsPredicateX;
import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.config.GridTestProperties;
import org.apache.ignite.testframework.junits.spi.GridSpiTest;
import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig;
@@ -69,7 +73,7 @@ public class GridUriDeploymentFileProcessorSelfTest extends GridUriDeploymentAbs
* if {@code false} then it should be undeployed.
* @throws Exception If failed.
*/
- private void proceedTest(String garFileName, String garDescFileName, String taskId, boolean deployed)
+ private void proceedTest(String garFileName, String garDescFileName, final String taskId, final boolean deployed)
throws Exception {
info("This test checks broken tasks. All exceptions that might happen are the part of the test.");
@@ -123,10 +127,17 @@ public class GridUriDeploymentFileProcessorSelfTest extends GridUriDeploymentAbs
// Copy to deployment directory.
U.copy(garFile, destDir, true);
- // Wait for SPI
- Thread.sleep(1000);
-
try {
+ // Wait for SPI
+ GridTestUtils.waitForCondition(new GridAbsPredicateX() {
+ @Override public boolean applyx() throws IgniteCheckedException {
+ if (deployed)
+ return getSpi().findResource(taskId) != null;
+ else
+ return getSpi().findResource(taskId) == null;
+ }
+ }, 5000);
+
if (deployed)
assert getSpi().findResource(taskId) != null;
else
[12/19] ignite git commit: ignite-1.5 Fixed test.
Posted by nt...@apache.org.
ignite-1.5 Fixed test.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/77e77e40
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/77e77e40
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/77e77e40
Branch: refs/heads/ignite-gg-10837
Commit: 77e77e40fb9463ba3bccd01ddf3231ff9ef6f327
Parents: bd05fa9
Author: sboikov <sb...@gridgain.com>
Authored: Thu Dec 24 10:25:23 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Dec 24 10:25:23 2015 +0300
----------------------------------------------------------------------
.../apache/ignite/internal/binary/BinaryMarshallerSelfTest.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/77e77e40/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java
index 9f7beb8..20b2258 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java
@@ -2532,11 +2532,10 @@ public class BinaryMarshallerSelfTest extends GridCommonAbstractTest {
assertNull(bVal);
- for (NonSerializableA a : bArr) {
+ for (NonSerializableA a : bArr)
a.checkAfterUnmarshalled();
- }
- assertEquals(floatVal, 567.89F);
+ assertEquals(floatVal, 567.89F, 0);
}
}
[19/19] ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-1.5' into ignite-gg-10837
Posted by nt...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-1.5' into ignite-gg-10837
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/cc40e1f4
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/cc40e1f4
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/cc40e1f4
Branch: refs/heads/ignite-gg-10837
Commit: cc40e1f4e3b47b5226e9770e2244e8e6da38b32c
Parents: 972a703 49c2988
Author: Tikhonov Nikolay <ti...@gmail.com>
Authored: Thu Dec 24 16:46:55 2015 +0300
Committer: Tikhonov Nikolay <ti...@gmail.com>
Committed: Thu Dec 24 16:46:55 2015 +0300
----------------------------------------------------------------------
README.txt | 4 +-
examples/pom.xml | 2 +-
examples/schema-import/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/apache-license-gen/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
modules/camel/pom.xml | 2 +-
modules/clients/pom.xml | 2 +-
.../JettyRestProcessorAbstractSelfTest.java | 25 +-
modules/cloud/pom.xml | 2 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 2 +-
.../ignite/internal/IgniteVersionUtils.java | 5 +-
.../internal/binary/BinaryObjectImpl.java | 2 +-
.../connection/GridClientNioTcpConnection.java | 17 +-
.../managers/communication/GridIoManager.java | 39 +-
.../processors/cache/GridCacheAdapter.java | 47 ++-
.../processors/cache/GridCacheProcessor.java | 3 +-
.../processors/cache/GridCacheProxyImpl.java | 29 ++
.../cache/GridCacheSharedContext.java | 10 +-
.../processors/cache/IgniteCacheProxy.java | 35 ++
.../processors/cache/IgniteInternalCache.java | 26 ++
.../binary/CacheObjectBinaryProcessorImpl.java | 7 +-
.../distributed/dht/GridDhtLockFuture.java | 2 +-
.../dht/atomic/GridDhtAtomicCache.java | 8 +-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 149 ++++---
.../colocated/GridDhtColocatedLockFuture.java | 11 +-
.../GridDhtPartitionsExchangeFuture.java | 20 +-
.../distributed/near/GridNearLockFuture.java | 11 +-
...arOptimisticSerializableTxPrepareFuture.java | 5 +-
.../near/GridNearOptimisticTxPrepareFuture.java | 5 +-
...ridNearOptimisticTxPrepareFutureAdapter.java | 20 +-
.../query/GridCacheDistributedQueryManager.java | 6 +-
.../transactions/IgniteTxLocalAdapter.java | 2 +
.../cache/transactions/IgniteTxManager.java | 61 ++-
.../datastreamer/DataStreamProcessor.java | 12 +-
.../processors/query/GridQueryProcessor.java | 5 +
.../client/message/GridClientCacheBean.java | 139 +++++++
.../rest/client/message/GridClientNodeBean.java | 70 ++--
.../top/GridTopologyCommandHandler.java | 38 +-
.../ignite/internal/util/lang/GridFunc.java | 1 +
.../util/nio/GridNioRecoveryDescriptor.java | 7 -
.../ignite/internal/util/nio/GridNioServer.java | 7 +
.../internal/visor/util/VisorTaskUtils.java | 122 +++++-
.../ignite/lang/IgniteProductVersion.java | 2 +-
.../communication/tcp/TcpCommunicationSpi.java | 12 +-
.../core/src/main/resources/ignite.properties | 2 +-
.../test/config/websession/example-cache.xml | 9 +-
.../ignite/IgniteCacheAffinitySelfTest.java | 7 -
.../fair/FairAffinityDynamicCacheSelfTest.java | 17 +-
...niteClientReconnectFailoverAbstractTest.java | 3 +-
.../binary/BinaryMarshallerSelfTest.java | 87 ++--
.../cache/CrossCacheTxRandomOperationsTest.java | 2 -
.../cache/GridCacheAbstractFullApiSelfTest.java | 22 +-
.../cache/GridCacheAbstractSelfTest.java | 3 +-
...iteCacheScanPredicateDeploymentSelfTest.java | 114 +++++
...yMetadataUpdateChangingTopologySelfTest.java | 104 +++--
...niteBinaryMetadataUpdateNodeRestartTest.java | 411 +++++++++++++++++++
.../distributed/IgniteCacheManyClientsTest.java | 2 +
...ContinuousQueryFailoverAbstractSelfTest.java | 128 +++---
...ridCacheContinuousQueryAbstractSelfTest.java | 3 +
.../service/ClosureServiceClientsNodesTest.java | 22 +-
.../GridServiceProcessorStopSelfTest.java | 21 +-
.../product/GridProductVersionSelfTest.java | 22 +-
.../internal/util/nio/GridNioSelfTest.java | 127 +++---
...cpCommunicationSpiMultithreadedSelfTest.java | 21 +
...dTcpCommunicationSpiRecoveryAckSelfTest.java | 17 +-
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 14 +-
.../TcpDiscoveryMulticastIpFinderSelfTest.java | 21 +-
.../testframework/GridSpiTestContext.java | 18 +-
.../IgniteCacheRestartTestSuite2.java | 3 +
.../testsuites/IgniteCacheTestSuite3.java | 2 +
modules/extdata/p2p/pom.xml | 2 +-
.../p2p/CacheDeploymentAlwaysTruePredicate.java | 29 ++
.../ignite/tests/p2p/cache/PersonWrapper.java | 121 ++++++
.../extdata/uri/modules/uri-dependency/pom.xml | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/flume/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 +-
.../processors/query/h2/IgniteH2Indexing.java | 2 +-
.../IgniteBinaryObjectFieldsQuerySelfTest.java | 16 +-
...eBinaryWrappedObjectFieldsQuerySelfTest.java | 28 ++
.../cache/IgniteCacheAbstractQuerySelfTest.java | 2 +-
.../IgniteBinaryCacheQueryTestSuite.java | 4 +
.../IgniteCacheQuerySelfTestSuite.java | 4 +
modules/jcl/pom.xml | 2 +-
modules/jms11/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/kafka/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/log4j2/pom.xml | 2 +-
modules/mesos/pom.xml | 2 +-
modules/mqtt/pom.xml | 2 +-
.../stream/mqtt/IgniteMqttStreamerTest.java | 33 +-
modules/osgi-karaf/pom.xml | 2 +-
modules/osgi-paxlogging/pom.xml | 2 +-
modules/osgi/pom.xml | 2 +-
modules/platforms/cpp/common/configure.ac | 2 +-
modules/platforms/cpp/core-test/configure.ac | 2 +-
modules/platforms/cpp/core/configure.ac | 2 +-
modules/platforms/cpp/examples/configure.ac | 2 +-
modules/platforms/cpp/ignite/configure.ac | 2 +-
.../Properties/AssemblyInfo.cs | 6 +-
.../Properties/AssemblyInfo.cs | 6 +-
.../Properties/AssemblyInfo.cs | 6 +-
.../Properties/AssemblyInfo.cs | 6 +-
.../Apache.Ignite/Properties/AssemblyInfo.cs | 6 +-
.../Properties/AssemblyInfo.cs | 6 +-
.../Properties/AssemblyInfo.cs | 6 +-
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/twitter/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
.../GridUriDeploymentFileProcessorSelfTest.java | 19 +-
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 +-
.../cache/websession/WebSessionFilter.java | 82 ++--
.../cache/websession/WebSessionListener.java | 25 +-
.../internal/websession/WebSessionSelfTest.java | 2 -
modules/yardstick/pom.xml | 2 +-
modules/yarn/pom.xml | 2 +-
modules/zookeeper/pom.xml | 2 +-
pom.xml | 2 +-
138 files changed, 2044 insertions(+), 643 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/cc40e1f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index a8769b0,5d4c386..f21d2fe
--- 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
@@@ -2077,25 -2077,32 +2077,49 @@@ public abstract class GridCacheAdapter<
}
/** {@inheritDoc} */
+ @Nullable @Override public <T> EntryProcessorResult<T> invoke(@Nullable AffinityTopologyVersion topVer,
+ K key,
+ EntryProcessor<K, V, T> entryProcessor,
+ Object... args) throws IgniteCheckedException {
+ return invoke0(topVer, key, entryProcessor, args);
+ }
+
+ /** {@inheritDoc} */
+ @Override public void invokeAllConflict(final Map<KeyCacheObject, GridCacheDrInfo> map,
+ final Object... args) throws IgniteCheckedException {
+ if (F.isEmpty(map))
+ return;
+
+ syncOp(new SyncInOp(map.size() == 1) {
+ @Override public void inOp(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
+ tx.invokeAllDrAsync(ctx, map, args).get();
+ }
+
+ @Override public String toString() {
+ return "invokeAllDrAsync [drMap=" + map + ']';
+ }
+ });
+ }
+
+ /** {@inheritDoc} */
@Override public <T> EntryProcessorResult<T> invoke(final K key,
final EntryProcessor<K, V, T> entryProcessor,
+ final Object... args) throws IgniteCheckedException {
+ return invoke0(null, key, entryProcessor, args);
+ }
+
+ /**
+ * @param topVer Locked topology version.
+ * @param key Key.
+ * @param entryProcessor Entry processor.
+ * @param args Entry processor arguments.
+ * @return Invoke result.
+ * @throws IgniteCheckedException If failed.
+ */
+ private <T> EntryProcessorResult<T> invoke0(
+ @Nullable final AffinityTopologyVersion topVer,
+ final K key,
+ final EntryProcessor<K, V, T> entryProcessor,
final Object... args)
throws IgniteCheckedException {
A.notNull(key, "key", entryProcessor, "entryProcessor");
http://git-wip-us.apache.org/repos/asf/ignite/blob/cc40e1f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/cc40e1f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index 91ea822,27a7587..a4fd2ee
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@@ -64,10 -64,9 +64,11 @@@ import org.apache.ignite.internal.Async
import org.apache.ignite.internal.GridKernalContext;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.IgniteInternalFuture;
+ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
+import org.apache.ignite.internal.processors.cache.dr.GridCacheDrInfo;
import org.apache.ignite.internal.processors.cache.query.CacheQuery;
import org.apache.ignite.internal.processors.cache.query.CacheQueryFuture;
+import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.processors.query.GridQueryProcessor;
import org.apache.ignite.internal.util.GridCloseableIteratorAdapter;
import org.apache.ignite.internal.util.GridEmptyIterator;
http://git-wip-us.apache.org/repos/asf/ignite/blob/cc40e1f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/cc40e1f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/cc40e1f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index 8692f84,3c86083..c9e1a11
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@@ -998,9 -1032,9 +1032,9 @@@ public class GridNearAtomicUpdateFutur
throw new NullPointerException("Null value.");
}
else if (conflictPutVals != null) {
- GridCacheDrInfo conflictPutVal = conflictPutValsIt.next();
+ GridCacheDrInfo conflictPutVal = conflictPutValsIt.next();
- val = conflictPutVal.value();
+ val = conflictPutVal.valueEx();
conflictVer = conflictPutVal.version();
conflictTtl = conflictPutVal.ttl();
conflictExpireTime = conflictPutVal.expireTime();
http://git-wip-us.apache.org/repos/asf/ignite/blob/cc40e1f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
[04/19] ignite git commit: Minor: fixed compilation for Java 8 in
test.
Posted by nt...@apache.org.
Minor: fixed compilation for Java 8 in test.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/66b33bc0
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/66b33bc0
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/66b33bc0
Branch: refs/heads/ignite-gg-10837
Commit: 66b33bc0ce10ccb5c8cbeb91dc9c3fdc75c7f6c2
Parents: fbb4982
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Dec 23 12:17:48 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Dec 23 12:17:48 2015 +0300
----------------------------------------------------------------------
.../processors/cache/IgniteCacheAbstractQuerySelfTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/66b33bc0/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
index 3782596..1507543 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
@@ -475,7 +475,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
Cache.Entry<BinaryObject, BinaryObject> entry = F.first(qry.getAll());
assertNotNull(entry);
- assertEquals(100500L, entry.getKey().field("id"));
+ assertEquals(Long.valueOf(100500L), entry.getKey().field("id"));
assertEquals(val1, entry.getValue().deserialize());
}
}
[08/19] ignite git commit: ignite-1.5 Fixed hang on metadata update
inside put in atomic cache when topology read lock is held. Also fixed
several test issues.
Posted by nt...@apache.org.
ignite-1.5 Fixed hang on metadata update inside put in atomic cache when topology read lock is held. Also fixed several test issues.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/53ec76ff
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/53ec76ff
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/53ec76ff
Branch: refs/heads/ignite-gg-10837
Commit: 53ec76ffe65d5788fc1ffa32c2fba66222e51dcc
Parents: 66b33bc
Author: sboikov <sb...@gridgain.com>
Authored: Wed Dec 23 15:06:48 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Dec 23 15:06:48 2015 +0300
----------------------------------------------------------------------
.../managers/communication/GridIoManager.java | 39 +-
.../processors/cache/GridCacheAdapter.java | 47 ++-
.../processors/cache/GridCacheProxyImpl.java | 29 ++
.../cache/GridCacheSharedContext.java | 10 +-
.../processors/cache/IgniteCacheProxy.java | 35 ++
.../processors/cache/IgniteInternalCache.java | 26 ++
.../binary/CacheObjectBinaryProcessorImpl.java | 4 +-
.../distributed/dht/GridDhtLockFuture.java | 2 +-
.../dht/atomic/GridDhtAtomicCache.java | 95 +++--
.../dht/atomic/GridNearAtomicUpdateFuture.java | 150 ++++---
.../colocated/GridDhtColocatedLockFuture.java | 11 +-
.../distributed/near/GridNearLockFuture.java | 11 +-
...arOptimisticSerializableTxPrepareFuture.java | 5 +-
.../near/GridNearOptimisticTxPrepareFuture.java | 5 +-
...ridNearOptimisticTxPrepareFutureAdapter.java | 12 +-
.../transactions/IgniteTxLocalAdapter.java | 2 +
.../cache/transactions/IgniteTxManager.java | 61 ++-
.../datastreamer/DataStreamProcessor.java | 12 +-
.../ignite/internal/util/lang/GridFunc.java | 1 +
.../test/config/websession/example-cache.xml | 9 +-
...niteClientReconnectFailoverAbstractTest.java | 3 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 22 +-
.../cache/GridCacheAbstractSelfTest.java | 3 +-
...yMetadataUpdateChangingTopologySelfTest.java | 7 +-
...niteBinaryMetadataUpdateNodeRestartTest.java | 411 +++++++++++++++++++
.../distributed/IgniteCacheManyClientsTest.java | 2 +
...ContinuousQueryFailoverAbstractSelfTest.java | 128 +++---
...ridCacheContinuousQueryAbstractSelfTest.java | 3 +
.../service/ClosureServiceClientsNodesTest.java | 22 +-
.../GridServiceProcessorStopSelfTest.java | 21 +-
...cpCommunicationSpiMultithreadedSelfTest.java | 21 +
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 14 +-
.../testframework/GridSpiTestContext.java | 18 +-
.../cache/websession/WebSessionFilter.java | 82 ++--
.../cache/websession/WebSessionListener.java | 25 +-
.../internal/websession/WebSessionSelfTest.java | 2 -
36 files changed, 1023 insertions(+), 327 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index bf7c7e4..42f8dae 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@ -666,6 +666,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
*
* @param plc Policy.
* @return Execution pool.
+ * @throws IgniteCheckedException If failed.
*/
private Executor pool(byte plc) throws IgniteCheckedException {
switch (plc) {
@@ -767,6 +768,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
* @param msg Message.
* @param plc Execution policy.
* @param msgC Closure to call when message processing finished.
+ * @throws IgniteCheckedException If failed.
*/
private void processRegularMessage(
final UUID nodeId,
@@ -824,6 +826,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
* @param msg Ordered message.
* @param plc Execution policy.
* @param msgC Closure to call when message processing finished ({@code null} for sync processing).
+ * @throws IgniteCheckedException If failed.
*/
@SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
private void processOrderedMessage(
@@ -1029,7 +1032,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
* @param ordered Ordered flag.
* @param timeout Timeout.
* @param skipOnTimeout Whether message can be skipped on timeout.
- * @param ackClosure Ack closure.
+ * @param ackC Ack closure.
* @throws IgniteCheckedException Thrown in case of any errors.
*/
private void send(
@@ -1041,7 +1044,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
boolean ordered,
long timeout,
boolean skipOnTimeout,
- IgniteInClosure<IgniteException> ackClosure
+ IgniteInClosure<IgniteException> ackC
) throws IgniteCheckedException {
assert node != null;
assert topic != null;
@@ -1062,8 +1065,8 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
else
processRegularMessage0(ioMsg, locNodeId);
- if (ackClosure != null)
- ackClosure.apply(null);
+ if (ackC != null)
+ ackC.apply(null);
}
else {
if (topicOrd < 0)
@@ -1071,7 +1074,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
try {
if ((CommunicationSpi)getSpi() instanceof TcpCommunicationSpi)
- ((TcpCommunicationSpi)(CommunicationSpi)getSpi()).sendMessage(node, ioMsg, ackClosure);
+ ((TcpCommunicationSpi)(CommunicationSpi)getSpi()).sendMessage(node, ioMsg, ackC);
else
getSpi().sendMessage(node, ioMsg);
}
@@ -1197,12 +1200,12 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
* @param topic Topic to send the message to.
* @param msg Message to send.
* @param plc Type of processing.
- * @param ackClosure Ack closure.
+ * @param ackC Ack closure.
* @throws IgniteCheckedException Thrown in case of any errors.
*/
public void send(ClusterNode node, GridTopic topic, Message msg, byte plc,
- IgniteInClosure<IgniteException> ackClosure) throws IgniteCheckedException {
- send(node, topic, topic.ordinal(), msg, plc, false, 0, false, ackClosure);
+ IgniteInClosure<IgniteException> ackC) throws IgniteCheckedException {
+ send(node, topic, topic.ordinal(), msg, plc, false, 0, false, ackC);
}
/**
@@ -1233,12 +1236,12 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
* @param topic Topic to send the message to.
* @param msg Message to send.
* @param plc Type of processing.
- * @param ackClosure Ack closure.
+ * @param ackC Ack closure.
* @throws IgniteCheckedException Thrown in case of any errors.
*/
- public void send(ClusterNode node, Object topic, Message msg, byte plc, IgniteInClosure<IgniteException> ackClosure)
+ public void send(ClusterNode node, Object topic, Message msg, byte plc, IgniteInClosure<IgniteException> ackC)
throws IgniteCheckedException {
- send(node, topic, -1, msg, plc, false, 0, false, ackClosure);
+ send(node, topic, -1, msg, plc, false, 0, false, ackC);
}
/**
@@ -1280,7 +1283,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
* @param plc Type of processing.
* @param timeout Timeout to keep a message on receiving queue.
* @param skipOnTimeout Whether message can be skipped on timeout.
- * @param ackClosure Ack closure.
+ * @param ackC Ack closure.
* @throws IgniteCheckedException Thrown in case of any errors.
*/
public void sendOrderedMessage(
@@ -1290,11 +1293,11 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
byte plc,
long timeout,
boolean skipOnTimeout,
- IgniteInClosure<IgniteException> ackClosure
+ IgniteInClosure<IgniteException> ackC
) throws IgniteCheckedException {
assert timeout > 0 || skipOnTimeout;
- send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, ackClosure);
+ send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, ackC);
}
/**
@@ -1385,6 +1388,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
* @param topic Topic to subscribe to.
* @param p Message predicate.
*/
+ @SuppressWarnings("unchecked")
public void addUserMessageListener(@Nullable final Object topic, @Nullable final IgniteBiPredicate<UUID, ?> p) {
if (p != null) {
try {
@@ -1406,6 +1410,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
* @param topic Topic to unsubscribe from.
* @param p Message predicate.
*/
+ @SuppressWarnings("unchecked")
public void removeUserMessageListener(@Nullable Object topic, IgniteBiPredicate<UUID, ?> p) {
try {
removeMessageListener(TOPIC_COMM_USER,
@@ -1423,7 +1428,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
* @param plc Type of processing.
* @param timeout Timeout to keep a message on receiving queue.
* @param skipOnTimeout Whether message can be skipped on timeout.
- * @param ackClosure Ack closure.
+ * @param ackC Ack closure.
* @throws IgniteCheckedException Thrown in case of any errors.
*/
public void sendOrderedMessage(
@@ -1433,7 +1438,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
byte plc,
long timeout,
boolean skipOnTimeout,
- IgniteInClosure<IgniteException> ackClosure
+ IgniteInClosure<IgniteException> ackC
) throws IgniteCheckedException {
assert timeout > 0 || skipOnTimeout;
@@ -1442,7 +1447,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
if (node == null)
throw new IgniteCheckedException("Failed to send message to node (has node left grid?): " + nodeId);
- send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, ackClosure);
+ send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, ackC);
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/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 cc4e962..5d4c386 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
@@ -2077,8 +2077,32 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
}
/** {@inheritDoc} */
+ @Nullable @Override public <T> EntryProcessorResult<T> invoke(@Nullable AffinityTopologyVersion topVer,
+ K key,
+ EntryProcessor<K, V, T> entryProcessor,
+ Object... args) throws IgniteCheckedException {
+ return invoke0(topVer, key, entryProcessor, args);
+ }
+
+ /** {@inheritDoc} */
@Override public <T> EntryProcessorResult<T> invoke(final K key,
final EntryProcessor<K, V, T> entryProcessor,
+ final Object... args) throws IgniteCheckedException {
+ return invoke0(null, key, entryProcessor, args);
+ }
+
+ /**
+ * @param topVer Locked topology version.
+ * @param key Key.
+ * @param entryProcessor Entry processor.
+ * @param args Entry processor arguments.
+ * @return Invoke result.
+ * @throws IgniteCheckedException If failed.
+ */
+ private <T> EntryProcessorResult<T> invoke0(
+ @Nullable final AffinityTopologyVersion topVer,
+ final K key,
+ final EntryProcessor<K, V, T> entryProcessor,
final Object... args)
throws IgniteCheckedException {
A.notNull(key, "key", entryProcessor, "entryProcessor");
@@ -2089,8 +2113,15 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
return syncOp(new SyncOp<EntryProcessorResult<T>>(true) {
@Nullable @Override public EntryProcessorResult<T> op(IgniteTxLocalAdapter tx)
throws IgniteCheckedException {
- IgniteInternalFuture<GridCacheReturn> fut =
- tx.invokeAsync(ctx, key, (EntryProcessor<K, V, Object>)entryProcessor, args);
+ assert topVer == null || tx.implicit();
+
+ if (topVer != null)
+ tx.topologyVersion(topVer);
+
+ IgniteInternalFuture<GridCacheReturn> fut = tx.invokeAsync(ctx,
+ key,
+ (EntryProcessor<K, V, Object>)entryProcessor,
+ args);
Map<K, EntryProcessorResult<T>> resMap = fut.get().value();
@@ -2324,16 +2355,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
});
}
- /**
- * Tries to put value in cache. Will fail with {@link GridCacheTryPutFailedException}
- * if topology exchange is in progress.
- *
- * @param key Key.
- * @param val value.
- * @return Old value.
- * @throws IgniteCheckedException In case of error.
- */
- @Nullable public V tryPutIfAbsent(K key, V val) throws IgniteCheckedException {
+ /** {@inheritDoc} */
+ @Nullable @Override public V tryPutIfAbsent(K key, V val) throws IgniteCheckedException {
// Supported only in ATOMIC cache.
throw new UnsupportedOperationException();
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
index d1d93d8..8ffd273 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
@@ -36,6 +36,7 @@ import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.cache.affinity.Affinity;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.affinity.GridCacheAffinityProxy;
import org.apache.ignite.internal.processors.cache.dr.GridCacheDrInfo;
import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
@@ -1231,6 +1232,34 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte
}
/** {@inheritDoc} */
+ @Nullable @Override public V tryPutIfAbsent(K key, V val) throws IgniteCheckedException {
+ CacheOperationContext prev = gate.enter(opCtx);
+
+ try {
+ return delegate.tryPutIfAbsent(key, val);
+ }
+ finally {
+ gate.leave(prev);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Nullable @Override public <T> EntryProcessorResult<T> invoke(
+ AffinityTopologyVersion topVer,
+ K key,
+ EntryProcessor<K, V, T> entryProcessor,
+ Object... args) throws IgniteCheckedException {
+ CacheOperationContext prev = gate.enter(opCtx);
+
+ try {
+ return delegate.invoke(topVer, key, entryProcessor, args);
+ }
+ finally {
+ gate.leave(prev);
+ }
+ }
+
+ /** {@inheritDoc} */
@Override public void removeAll()
throws IgniteCheckedException {
CacheOperationContext prev = gate.enter(opCtx);
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
index 5ed1df9..2221d3b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
@@ -91,9 +91,6 @@ public class GridCacheSharedContext<K, V> {
/** Tx metrics. */
private volatile TransactionMetricsAdapter txMetrics;
- /** Preloaders start future. */
- private IgniteInternalFuture<Object> preloadersStartFut;
-
/** Store session listeners. */
private Collection<CacheStoreSessionListener> storeSesLsnrs;
@@ -578,12 +575,7 @@ public class GridCacheSharedContext<K, V> {
@Nullable public AffinityTopologyVersion lockedTopologyVersion(IgniteInternalTx ignore) {
long threadId = Thread.currentThread().getId();
- IgniteInternalTx tx = txMgr.anyActiveThreadTx(threadId, ignore);
-
- AffinityTopologyVersion topVer = null;
-
- if (tx != null && tx.topologyVersionSnapshot() != null)
- topVer = tx.topologyVersionSnapshot();
+ AffinityTopologyVersion topVer = txMgr.lockedTopologyVersion(threadId, ignore);
if (topVer == null)
topVer = mvccMgr.lastExplicitLockTopologyVersion(threadId);
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index 271a2cf..27a7587 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -64,6 +64,7 @@ import org.apache.ignite.internal.AsyncSupportAdapter;
import org.apache.ignite.internal.GridKernalContext;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.query.CacheQuery;
import org.apache.ignite.internal.processors.cache.query.CacheQueryFuture;
import org.apache.ignite.internal.processors.query.GridQueryProcessor;
@@ -1483,6 +1484,40 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
return invoke(key, (EntryProcessor<K, V, T>)entryProcessor, args);
}
+ /**
+ * @param topVer Locked topology version.
+ * @param key Key.
+ * @param entryProcessor Entry processor.
+ * @param args Arguments.
+ * @return Invoke result.
+ */
+ public <T> T invoke(@Nullable AffinityTopologyVersion topVer,
+ K key,
+ EntryProcessor<K, V, T> entryProcessor,
+ Object... args) {
+ try {
+ GridCacheGateway<K, V> gate = this.gate;
+
+ CacheOperationContext prev = onEnter(gate, opCtx);
+
+ try {
+ if (isAsync())
+ throw new UnsupportedOperationException();
+ else {
+ EntryProcessorResult<T> res = delegate.invoke(topVer, key, entryProcessor, args);
+
+ return res != null ? res.get() : null;
+ }
+ }
+ finally {
+ onLeave(gate, prev);
+ }
+ }
+ catch (IgniteCheckedException e) {
+ throw cacheException(e);
+ }
+ }
+
/** {@inheritDoc} */
@Override public <T> Map<K, EntryProcessorResult<T>> invokeAll(Set<? extends K> keys,
EntryProcessor<K, V, T> entryProcessor,
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
index 186de68..433290c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
@@ -40,6 +40,7 @@ import org.apache.ignite.cache.store.CacheStore;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.dr.GridCacheDrInfo;
import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
@@ -1863,4 +1864,29 @@ public interface IgniteInternalCache<K, V> extends Iterable<Cache.Entry<K, V>> {
* @throws IgniteCheckedException If failed.
*/
public V getTopologySafe(K key) throws IgniteCheckedException;
+
+ /**
+ * Tries to put value in cache. Will fail with {@link GridCacheTryPutFailedException}
+ * if topology exchange is in progress.
+ *
+ * @param key Key.
+ * @param val value.
+ * @return Old value.
+ * @throws IgniteCheckedException In case of error.
+ */
+ @Nullable public V tryPutIfAbsent(K key, V val) throws IgniteCheckedException;
+
+ /**
+ * @param topVer Locked topology version.
+ * @param key Key.
+ * @param entryProcessor Entry processor.
+ * @param args Arguments.
+ * @return Invoke result.
+ * @throws IgniteCheckedException If failed.
+ */
+ @Nullable public <T> EntryProcessorResult<T> invoke(
+ @Nullable AffinityTopologyVersion topVer,
+ K key,
+ EntryProcessor<K, V, T> entryProcessor,
+ Object... args) throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
index b335179..7586a42 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
@@ -489,7 +489,9 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
BinaryMetadata oldMeta = metaDataCache.localPeek(key);
BinaryMetadata mergedMeta = BinaryUtils.mergeMetadata(oldMeta, newMeta0);
- BinaryObjectException err = metaDataCache.invoke(key, new MetadataProcessor(mergedMeta));
+ AffinityTopologyVersion topVer = ctx.cache().context().lockedTopologyVersion(null);
+
+ BinaryObjectException err = metaDataCache.invoke(topVer, key, new MetadataProcessor(mergedMeta));
if (err != null)
throw err;
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
index f0d2e15..98711b8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
@@ -743,7 +743,7 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
if (tx != null) {
cctx.tm().txContext(tx);
- set = cctx.tm().setTxTopologyHint(tx);
+ set = cctx.tm().setTxTopologyHint(tx.topologyVersionSnapshot());
}
try {
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/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 481317a..634a9ea 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
@@ -77,6 +77,7 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearSing
import org.apache.ignite.internal.processors.cache.dr.GridCacheDrExpirationInfo;
import org.apache.ignite.internal.processors.cache.dr.GridCacheDrInfo;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalEx;
+import org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersionConflictContext;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersionEx;
@@ -1240,7 +1241,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
top.readLock();
try {
- if (topology().stopping()) {
+ if (top.stopping()) {
res.addFailedKeys(keys, new IgniteCheckedException("Failed to perform cache operation " +
"(cache is stopped): " + name()));
@@ -1289,48 +1290,59 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
GridCacheReturn retVal = null;
- if (keys.size() > 1 && // Several keys ...
- writeThrough() && !req.skipStore() && // and store is enabled ...
- !ctx.store().isLocal() && // and this is not local store ...
- !ctx.dr().receiveEnabled() // and no DR.
- ) {
- // This method can only be used when there are no replicated entries in the batch.
- UpdateBatchResult updRes = updateWithBatch(node,
- hasNear,
- req,
- res,
- locked,
- ver,
- dhtFut,
- completionCb,
- ctx.isDrEnabled(),
- taskName,
- expiry,
- sndPrevVal);
+ IgniteTxManager tm = ctx.tm();
- deleted = updRes.deleted();
- dhtFut = updRes.dhtFuture();
+ // Needed for metadata cache transaction.
+ boolean set = tm.setTxTopologyHint(req.topologyVersion());
- if (req.operation() == TRANSFORM)
- retVal = updRes.invokeResults();
+ try {
+ if (keys.size() > 1 && // Several keys ...
+ writeThrough() && !req.skipStore() && // and store is enabled ...
+ !ctx.store().isLocal() && // and this is not local store ...
+ !ctx.dr().receiveEnabled() // and no DR.
+ ) {
+ // This method can only be used when there are no replicated entries in the batch.
+ UpdateBatchResult updRes = updateWithBatch(node,
+ hasNear,
+ req,
+ res,
+ locked,
+ ver,
+ dhtFut,
+ completionCb,
+ ctx.isDrEnabled(),
+ taskName,
+ expiry,
+ sndPrevVal);
+
+ deleted = updRes.deleted();
+ dhtFut = updRes.dhtFuture();
+
+ if (req.operation() == TRANSFORM)
+ retVal = updRes.invokeResults();
+ }
+ else {
+ UpdateSingleResult updRes = updateSingle(node,
+ hasNear,
+ req,
+ res,
+ locked,
+ ver,
+ dhtFut,
+ completionCb,
+ ctx.isDrEnabled(),
+ taskName,
+ expiry,
+ sndPrevVal);
+
+ retVal = updRes.returnValue();
+ deleted = updRes.deleted();
+ dhtFut = updRes.dhtFuture();
+ }
}
- else {
- UpdateSingleResult updRes = updateSingle(node,
- hasNear,
- req,
- res,
- locked,
- ver,
- dhtFut,
- completionCb,
- ctx.isDrEnabled(),
- taskName,
- expiry,
- sndPrevVal);
-
- retVal = updRes.returnValue();
- deleted = updRes.deleted();
- dhtFut = updRes.dhtFuture();
+ finally {
+ if (set)
+ tm.setTxTopologyHint(null);
}
if (retVal == null)
@@ -2782,8 +2794,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
if (log.isDebugEnabled())
log.debug("Processing dht atomic update response [nodeId=" + nodeId + ", res=" + res + ']');
- GridDhtAtomicUpdateFuture updateFut = (GridDhtAtomicUpdateFuture)ctx.mvcc().
- atomicFuture(res.futureVersion());
+ GridDhtAtomicUpdateFuture updateFut = (GridDhtAtomicUpdateFuture)ctx.mvcc().atomicFuture(res.futureVersion());
if (updateFut != null)
updateFut.onResult(nodeId, res);
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index eefdc73..3c86083 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache.distributed.dht.atomic;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.UUID;
@@ -47,8 +46,8 @@ import org.apache.ignite.internal.processors.cache.KeyCacheObject;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTopologyFuture;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearAtomicCache;
import org.apache.ignite.internal.processors.cache.dr.GridCacheDrInfo;
-import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.util.future.GridFinishedFuture;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
import org.apache.ignite.internal.util.typedef.CI1;
@@ -288,7 +287,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
// Cannot remap.
remapCnt = 1;
- state.map(topVer);
+ state.map(topVer, null);
}
}
@@ -415,7 +414,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
cache.topology().readUnlock();
}
- state.map(topVer);
+ state.map(topVer, null);
}
/**
@@ -582,7 +581,9 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
req = mappings != null ? mappings.get(nodeId) : null;
if (req != null && req.response() == null) {
- res = new GridNearAtomicUpdateResponse(cctx.cacheId(), nodeId, req.futureVersion(),
+ res = new GridNearAtomicUpdateResponse(cctx.cacheId(),
+ nodeId,
+ req.futureVersion(),
cctx.deploymentEnabled());
ClusterTopologyCheckedException e = new ClusterTopologyCheckedException("Primary node left grid " +
@@ -603,6 +604,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
* @param res Response.
* @param nodeErr {@code True} if response was created on node failure.
*/
+ @SuppressWarnings("unchecked")
void onResult(UUID nodeId, GridNearAtomicUpdateResponse res, boolean nodeErr) {
GridNearAtomicUpdateRequest req;
@@ -774,7 +776,11 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
return;
}
- IgniteInternalFuture<AffinityTopologyVersion> fut = cctx.affinity().affinityReadyFuture(remapTopVer);
+ IgniteInternalFuture<AffinityTopologyVersion> fut =
+ cctx.shared().exchange().affinityReadyFuture(remapTopVer);
+
+ if (fut == null)
+ fut = new GridFinishedFuture<>(remapTopVer);
fut.listen(new CI1<IgniteInternalFuture<AffinityTopologyVersion>>() {
@Override public void apply(final IgniteInternalFuture<AffinityTopologyVersion> fut) {
@@ -783,7 +789,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
try {
AffinityTopologyVersion topVer = fut.get();
- map(topVer);
+ map(topVer, remapKeys);
}
catch (IgniteCheckedException e) {
onDone(e);
@@ -819,8 +825,9 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
/**
* @param topVer Topology version.
+ * @param remapKeys Keys to remap.
*/
- void map(AffinityTopologyVersion topVer) {
+ void map(AffinityTopologyVersion topVer, @Nullable Collection<KeyCacheObject> remapKeys) {
Collection<ClusterNode> topNodes = CU.affinityNodes(cctx, topVer);
if (F.isEmpty(topNodes)) {
@@ -832,68 +839,78 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
Exception err = null;
GridNearAtomicUpdateRequest singleReq0 = null;
- Map<UUID, GridNearAtomicUpdateRequest> pendingMappings = null;
+ Map<UUID, GridNearAtomicUpdateRequest> mappings0 = null;
int size = keys.size();
- synchronized (this) {
- assert futVer == null : this;
- assert this.topVer == AffinityTopologyVersion.ZERO : this;
+ GridCacheVersion futVer = cctx.versions().next(topVer);
- resCnt = 0;
+ GridCacheVersion updVer;
- this.topVer = topVer;
+ // Assign version on near node in CLOCK ordering mode even if fastMap is false.
+ if (cctx.config().getAtomicWriteOrderMode() == CLOCK) {
+ updVer = this.updVer;
- futVer = cctx.versions().next(topVer);
+ if (updVer == null) {
+ updVer = cctx.versions().next(topVer);
- if (storeFuture()) {
- if (!cctx.mvcc().addAtomicFuture(futVer, GridNearAtomicUpdateFuture.this)) {
- assert isDone() : GridNearAtomicUpdateFuture.this;
-
- return;
- }
+ if (log.isDebugEnabled())
+ log.debug("Assigned fast-map version for update on near node: " + updVer);
}
+ }
+ else
+ updVer = null;
- // Assign version on near node in CLOCK ordering mode even if fastMap is false.
- if (updVer == null)
- updVer = cctx.config().getAtomicWriteOrderMode() == CLOCK ? cctx.versions().next(topVer) : null;
+ try {
+ if (size == 1 && !fastMap) {
+ assert remapKeys == null || remapKeys.size() == 1;
- if (updVer != null && log.isDebugEnabled())
- log.debug("Assigned fast-map version for update on near node: " + updVer);
+ singleReq0 = mapSingleUpdate(topVer, futVer, updVer);
+ }
+ else {
+ Map<UUID, GridNearAtomicUpdateRequest> pendingMappings = mapUpdate(topNodes,
+ topVer,
+ futVer,
+ updVer,
+ remapKeys);
+
+ if (pendingMappings.size() == 1)
+ singleReq0 = F.firstValue(pendingMappings);
+ else {
+ if (syncMode == PRIMARY_SYNC) {
+ mappings0 = U.newHashMap(pendingMappings.size());
- try {
- if (size == 1 && !fastMap) {
- assert remapKeys == null || remapKeys.size() == 1;
+ for (GridNearAtomicUpdateRequest req : pendingMappings.values()) {
+ if (req.hasPrimary())
+ mappings0.put(req.nodeId(), req);
+ }
+ }
+ else
+ mappings0 = pendingMappings;
- singleReq0 = singleReq = mapSingleUpdate();
+ assert !mappings0.isEmpty() || size == 0 : GridNearAtomicUpdateFuture.this;
}
- else {
- pendingMappings = mapUpdate(topNodes);
+ }
- if (pendingMappings.size() == 1)
- singleReq0 = singleReq = F.firstValue(pendingMappings);
- else {
- if (syncMode == PRIMARY_SYNC) {
- mappings = U.newHashMap(pendingMappings.size());
+ synchronized (this) {
+ assert this.futVer == null : this;
+ assert this.topVer == AffinityTopologyVersion.ZERO : this;
- for (GridNearAtomicUpdateRequest req : pendingMappings.values()) {
- if (req.hasPrimary())
- mappings.put(req.nodeId(), req);
- }
- }
- else
- mappings = new HashMap<>(pendingMappings);
+ this.topVer = topVer;
+ this.updVer = updVer;
+ this.futVer = futVer;
- assert !mappings.isEmpty() || size == 0 : GridNearAtomicUpdateFuture.this;
- }
- }
+ resCnt = 0;
- remapKeys = null;
- }
- catch (Exception e) {
- err = e;
+ singleReq = singleReq0;
+ mappings = mappings0;
+
+ this.remapKeys = null;
}
}
+ catch (Exception e) {
+ err = e;
+ }
if (err != null) {
onDone(err);
@@ -901,16 +918,24 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
return;
}
+ if (storeFuture()) {
+ if (!cctx.mvcc().addAtomicFuture(futVer, GridNearAtomicUpdateFuture.this)) {
+ assert isDone() : GridNearAtomicUpdateFuture.this;
+
+ return;
+ }
+ }
+
// Optimize mapping for single key.
if (singleReq0 != null)
mapSingle(singleReq0.nodeId(), singleReq0);
else {
- assert pendingMappings != null;
+ assert mappings0 != null;
if (size == 0)
onDone(new GridCacheReturn(cctx, true, true, null, true));
else
- doUpdate(pendingMappings);
+ doUpdate(mappings0);
}
}
@@ -958,10 +983,18 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
/**
* @param topNodes Cache nodes.
+ * @param topVer Topology version.
+ * @param futVer Future version.
+ * @param updVer Update version.
+ * @param remapKeys Keys to remap.
* @return Mapping.
* @throws Exception If failed.
*/
- private Map<UUID, GridNearAtomicUpdateRequest> mapUpdate(Collection<ClusterNode> topNodes) throws Exception {
+ private Map<UUID, GridNearAtomicUpdateRequest> mapUpdate(Collection<ClusterNode> topNodes,
+ AffinityTopologyVersion topVer,
+ GridCacheVersion futVer,
+ @Nullable GridCacheVersion updVer,
+ @Nullable Collection<KeyCacheObject> remapKeys) throws Exception {
Iterator<?> it = null;
if (vals != null)
@@ -999,7 +1032,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
throw new NullPointerException("Null value.");
}
else if (conflictPutVals != null) {
- GridCacheDrInfo conflictPutVal = conflictPutValsIt.next();
+ GridCacheDrInfo conflictPutVal = conflictPutValsIt.next();
val = conflictPutVal.value();
conflictVer = conflictPutVal.version();
@@ -1082,10 +1115,15 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
}
/**
+ * @param topVer Topology version.
+ * @param futVer Future version.
+ * @param updVer Update version.
* @return Request.
* @throws Exception If failed.
*/
- private GridNearAtomicUpdateRequest mapSingleUpdate() throws Exception {
+ private GridNearAtomicUpdateRequest mapSingleUpdate(AffinityTopologyVersion topVer,
+ GridCacheVersion futVer,
+ @Nullable GridCacheVersion updVer) throws Exception {
Object key = F.first(keys);
Object val;
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
index 22b329c..a5f5286 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
@@ -48,7 +48,6 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearLock
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockRequest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockResponse;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal;
-import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
@@ -596,12 +595,8 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
AffinityTopologyVersion topVer = cctx.mvcc().lastExplicitLockTopologyVersion(threadId);
// If there is another system transaction in progress, use it's topology version to prevent deadlock.
- if (topVer == null && tx != null && tx.system()) {
- IgniteInternalTx tx0 = cctx.tm().anyActiveThreadTx(Thread.currentThread().getId(), tx);
-
- if (tx0 != null)
- topVer = tx0.topologyVersionSnapshot();
- }
+ if (topVer == null && tx != null && tx.system())
+ topVer = cctx.tm().lockedTopologyVersion(Thread.currentThread().getId(), tx);
if (topVer != null && tx != null)
tx.topologyVersion(topVer);
@@ -980,7 +975,7 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
* @throws IgniteCheckedException If failed.
*/
private void proceedMapping() throws IgniteCheckedException {
- boolean set = tx != null && cctx.shared().tm().setTxTopologyHint(tx);
+ boolean set = tx != null && cctx.shared().tm().setTxTopologyHint(tx.topologyVersionSnapshot());
try {
proceedMapping0();
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
index 23e0f6b..55c5ab6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
@@ -46,7 +46,6 @@ import org.apache.ignite.internal.processors.cache.distributed.GridDistributedCa
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTopologyFuture;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter;
-import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
@@ -723,12 +722,8 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
AffinityTopologyVersion topVer = cctx.mvcc().lastExplicitLockTopologyVersion(threadId);
// If there is another system transaction in progress, use it's topology version to prevent deadlock.
- if (topVer == null && tx != null && tx.system()) {
- IgniteInternalTx tx0 = cctx.tm().anyActiveThreadTx(threadId, tx);
-
- if (tx0 != null)
- topVer = tx0.topologyVersionSnapshot();
- }
+ if (topVer == null && tx != null && tx.system())
+ topVer = cctx.tm().lockedTopologyVersion(threadId, tx);
if (topVer != null && tx != null)
tx.topologyVersion(topVer);
@@ -1098,7 +1093,7 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
* @throws IgniteCheckedException If failed.
*/
private void proceedMapping() throws IgniteCheckedException {
- boolean set = tx != null && cctx.shared().tm().setTxTopologyHint(tx);
+ boolean set = tx != null && cctx.shared().tm().setTxTopologyHint(tx.topologyVersionSnapshot());
try {
proceedMapping0();
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
index f52b3fc..37dc564 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
@@ -84,7 +84,8 @@ public class GridNearOptimisticSerializableTxPrepareFuture extends GridNearOptim
* @param cctx Context.
* @param tx Transaction.
*/
- public GridNearOptimisticSerializableTxPrepareFuture(GridCacheSharedContext cctx, GridNearTxLocal tx) {
+ public GridNearOptimisticSerializableTxPrepareFuture(GridCacheSharedContext cctx,
+ GridNearTxLocal tx) {
super(cctx, tx);
assert tx.optimistic() && tx.serializable() : tx;
@@ -304,7 +305,7 @@ public class GridNearOptimisticSerializableTxPrepareFuture extends GridNearOptim
return;
}
- boolean set = cctx.tm().setTxTopologyHint(tx);
+ boolean set = cctx.tm().setTxTopologyHint(tx.topologyVersionSnapshot());
try {
prepare(tx.readEntries(), tx.writeEntries(), remap, topLocked);
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
index 2ce14af..a9f158a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
@@ -72,7 +72,8 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearOptimisticTxPrepa
* @param cctx Context.
* @param tx Transaction.
*/
- public GridNearOptimisticTxPrepareFuture(GridCacheSharedContext cctx, GridNearTxLocal tx) {
+ public GridNearOptimisticTxPrepareFuture(GridCacheSharedContext cctx,
+ GridNearTxLocal tx) {
super(cctx, tx);
assert tx.optimistic() && !tx.serializable() : tx;
@@ -405,7 +406,7 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearOptimisticTxPrepa
if (isDone())
return;
- boolean set = cctx.tm().setTxTopologyHint(tx);
+ boolean set = cctx.tm().setTxTopologyHint(tx.topologyVersionSnapshot());
try {
assert !m.empty();
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFutureAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFutureAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFutureAdapter.java
index b3eab34..fa7020b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFutureAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFutureAdapter.java
@@ -23,7 +23,6 @@ import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTopologyFuture;
-import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
import org.apache.ignite.internal.util.GridConcurrentHashSet;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
@@ -41,7 +40,8 @@ public abstract class GridNearOptimisticTxPrepareFutureAdapter extends GridNearT
* @param cctx Context.
* @param tx Transaction.
*/
- public GridNearOptimisticTxPrepareFutureAdapter(GridCacheSharedContext cctx, GridNearTxLocal tx) {
+ public GridNearOptimisticTxPrepareFutureAdapter(GridCacheSharedContext cctx,
+ GridNearTxLocal tx) {
super(cctx, tx);
assert tx.optimistic() : tx;
@@ -55,12 +55,8 @@ public abstract class GridNearOptimisticTxPrepareFutureAdapter extends GridNearT
AffinityTopologyVersion topVer = cctx.mvcc().lastExplicitLockTopologyVersion(threadId);
// If there is another system transaction in progress, use it's topology version to prevent deadlock.
- if (topVer == null && tx != null && tx.system()) {
- IgniteInternalTx tx0 = cctx.tm().anyActiveThreadTx(threadId, tx);
-
- if (tx0 != null)
- topVer = tx0.topologyVersionSnapshot();
- }
+ if (topVer == null && tx != null && tx.system())
+ topVer = cctx.tm().lockedTopologyVersion(threadId, tx);
if (topVer != null) {
tx.topologyVersion(topVer);
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/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 720832e..70c79a5 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
@@ -3203,8 +3203,10 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
}
/**
+ * @param cacheCtx Cache context.
* @param loadFut Missing keys load future.
* @param ret Future result.
+ * @param keepBinary Keep binary flag.
* @return Future.
*/
private IgniteInternalFuture optimisticPutFuture(
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
index d2b803a..d384e4e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
@@ -114,8 +114,8 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
/** Committing transactions. */
private final ThreadLocal<IgniteInternalTx> threadCtx = new ThreadLocal<>();
- /** Transaction which topology version should be used when mapping internal tx. */
- private final ThreadLocal<IgniteInternalTx> txTopology = new ThreadLocal<>();
+ /** Topology version should be used when mapping internal tx. */
+ private final ThreadLocal<AffinityTopologyVersion> txTop = new ThreadLocal<>();
/** Per-thread transaction map. */
private final ConcurrentMap<Long, IgniteInternalTx> threadMap = newMap();
@@ -130,7 +130,7 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
private final ConcurrentMap<GridCacheVersion, IgniteInternalTx> nearIdMap = newMap();
/** TX handler. */
- private IgniteTxHandler txHandler;
+ private IgniteTxHandler txHnd;
/** Committed local transactions. */
private final GridBoundedConcurrentOrderedMap<GridCacheVersion, Boolean> completedVersSorted =
@@ -197,7 +197,7 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
@Override protected void start0() throws IgniteCheckedException {
txFinishSync = new GridCacheTxFinishSync<>(cctx);
- txHandler = new IgniteTxHandler(cctx);
+ txHnd = new IgniteTxHandler(cctx);
}
/** {@inheritDoc} */
@@ -212,7 +212,7 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
* @return TX handler.
*/
public IgniteTxHandler txHandler() {
- return txHandler;
+ return txHnd;
}
/**
@@ -607,13 +607,17 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
/**
* @param threadId Thread ID.
* @param ignore Transaction to ignore.
- * @return Any transaction associated with the current thread.
+ * @return Not null topology version if current thread holds lock preventing topology change.
*/
- public IgniteInternalTx anyActiveThreadTx(long threadId, IgniteInternalTx ignore) {
+ @Nullable public AffinityTopologyVersion lockedTopologyVersion(long threadId, IgniteInternalTx ignore) {
IgniteInternalTx tx = threadMap.get(threadId);
- if (tx != null && tx.topologyVersionSnapshot() != null)
- return tx;
+ if (tx != null) {
+ AffinityTopologyVersion topVer = tx.topologyVersionSnapshot();
+
+ if (topVer != null)
+ return topVer;
+ }
for (GridCacheContext cacheCtx : cctx.cache().context().cacheContexts()) {
if (!cacheCtx.systemTx())
@@ -621,22 +625,27 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
tx = sysThreadMap.get(new TxThreadKey(threadId, cacheCtx.cacheId()));
- if (tx != null && tx != ignore && tx.topologyVersionSnapshot() != null)
- return tx;
+ if (tx != null && tx != ignore) {
+ AffinityTopologyVersion topVer = tx.topologyVersionSnapshot();
+
+ if (topVer != null)
+ return topVer;
+ }
}
- return txTopology.get();
+ return txTop.get();
}
/**
- * @param tx Transaction.
+ * @param topVer Locked topology version.
+ * @return {@code True} if topology hint was set.
*/
- public boolean setTxTopologyHint(IgniteInternalTx tx) {
- if (tx == null)
- txTopology.remove();
+ public boolean setTxTopologyHint(@Nullable AffinityTopologyVersion topVer) {
+ if (topVer == null)
+ txTop.remove();
else {
- if (txTopology.get() == null) {
- txTopology.set(tx);
+ if (txTop.get() == null) {
+ txTop.set(topVer);
return true;
}
@@ -1807,8 +1816,10 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
this.evtNodeId = evtNodeId;
}
- /** {@inheritDoc} */
- @Override public void onTimeout() {
+ /**
+ *
+ */
+ private void onTimeout0() {
try {
cctx.kernalContext().gateway().readLock();
}
@@ -1861,6 +1872,16 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
cctx.kernalContext().gateway().readUnlock();
}
}
+
+ /** {@inheritDoc} */
+ @Override public void onTimeout() {
+ // Should not block timeout thread.
+ cctx.kernalContext().closure().runLocalSafe(new Runnable() {
+ @Override public void run() {
+ onTimeout0();
+ }
+ });
+ }
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessor.java
index a2aab77..da39209 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessor.java
@@ -62,6 +62,9 @@ public class DataStreamProcessor<K, V> extends GridProcessorAdapter {
/** Marshaller. */
private final Marshaller marsh;
+ /** */
+ private byte[] marshErrBytes;
+
/**
* @param ctx Kernal context.
*/
@@ -86,6 +89,9 @@ public class DataStreamProcessor<K, V> extends GridProcessorAdapter {
if (ctx.config().isDaemon())
return;
+ marshErrBytes = marsh.marshal(new IgniteCheckedException("Failed to marshal response error, " +
+ "see node log for details."));
+
flusher = new IgniteThread(new GridWorker(ctx.gridName(), "grid-data-loader-flusher", log) {
@Override protected void body() throws InterruptedException {
while (!isCancelled()) {
@@ -324,10 +330,10 @@ public class DataStreamProcessor<K, V> extends GridProcessorAdapter {
try {
errBytes = err != null ? marsh.marshal(err) : null;
}
- catch (IgniteCheckedException e) {
- U.error(log, "Failed to marshal message.", e);
+ catch (Exception e) {
+ U.error(log, "Failed to marshal error [err=" + err + ", marshErr=" + e + ']', e);
- return;
+ errBytes = marshErrBytes;
}
DataStreamerResponse res = new DataStreamerResponse(reqId, errBytes, forceLocDep);
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
index 8d5a8e7..8eeca6b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
@@ -3408,6 +3408,7 @@ public class GridFunc {
* @return First element in given collection for which predicate evaluates to
* {@code true} - or {@code null} if such element cannot be found.
*/
+ @SafeVarargs
@Nullable public static <V> V find(Iterable<? extends V> c, @Nullable V dfltVal,
@Nullable IgnitePredicate<? super V>... p) {
A.notNull(c, "c");
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/test/config/websession/example-cache.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/websession/example-cache.xml b/modules/core/src/test/config/websession/example-cache.xml
index d5bfeb7..0cc0e1e 100644
--- a/modules/core/src/test/config/websession/example-cache.xml
+++ b/modules/core/src/test/config/websession/example-cache.xml
@@ -130,14 +130,7 @@
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
- <!--
- Ignite provides several options for automatic discovery that can be used
- instead os static IP based discovery. For information on all options refer
- to our documentation: http://apacheignite.readme.io/docs/cluster-config
- -->
- <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
- <!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
- <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
+ <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<property name="addresses">
<list>
<!-- In distributed environment, replace with actual host IP address. -->
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectFailoverAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectFailoverAbstractTest.java
index f050c72..7e217b7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectFailoverAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectFailoverAbstractTest.java
@@ -117,7 +117,8 @@ public abstract class IgniteClientReconnectFailoverAbstractTest extends IgniteCl
}
return null;
- } catch (Throwable e) {
+ }
+ catch (Throwable e) {
log.error("Unexpected error in operation thread: " + e, e);
stop.set(true);
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index 5b294cc..0d9c541 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -3277,9 +3277,9 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
* @throws Exception If failed.
*/
public void testPeekExpired() throws Exception {
- IgniteCache<String, Integer> c = jcache();
+ final IgniteCache<String, Integer> c = jcache();
- String key = primaryKeysForCache(c, 1).get(0);
+ final String key = primaryKeysForCache(c, 1).get(0);
info("Using key: " + key);
@@ -3295,6 +3295,12 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
Thread.sleep(ttl + 100);
+ GridTestUtils.waitForCondition(new GridAbsPredicate() {
+ @Override public boolean apply() {
+ return peek(c, key) == null;
+ }
+ }, 2000);
+
assert peek(c, key) == null;
assert c.localSize() == 0 : "Cache is not empty.";
@@ -3307,9 +3313,9 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
*/
public void testPeekExpiredTx() throws Exception {
if (txShouldBeUsed()) {
- IgniteCache<String, Integer> c = jcache();
+ final IgniteCache<String, Integer> c = jcache();
- String key = "1";
+ final String key = "1";
int ttl = 500;
try (Transaction tx = grid(0).transactions().txStart()) {
@@ -3320,9 +3326,13 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
tx.commit();
}
- Thread.sleep(ttl + 100);
+ GridTestUtils.waitForCondition(new GridAbsPredicate() {
+ @Override public boolean apply() {
+ return peek(c, key) == null;
+ }
+ }, 2000);
- assertNull(c.localPeek(key, ONHEAP));
+ assertNull(peek(c, key));
assert c.localSize() == 0;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
index 52fbf4c..b3d1384 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
@@ -416,9 +416,8 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
* @param cache Cache projection.
* @param key Key.
* @return Value.
- * @throws Exception If failed.
*/
- @Nullable protected <K, V> V peek(IgniteCache<K, V> cache, K key) throws Exception {
+ @Nullable protected <K, V> V peek(IgniteCache<K, V> cache, K key) {
return offheapTiered(cache) ? cache.localPeek(key, CachePeekMode.SWAP, CachePeekMode.OFFHEAP) :
cache.localPeek(key, CachePeekMode.ONHEAP);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java
index e53650c..c95c586 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java
@@ -152,7 +152,7 @@ public class IgniteBinaryMetadataUpdateChangingTopologySelfTest extends GridComm
private List<Object> recordedMsgs = new ArrayList<>();
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackC)
throws IgniteSpiException {
if (msg instanceof GridIoMessage) {
Object msg0 = ((GridIoMessage)msg).message();
@@ -174,7 +174,7 @@ public class IgniteBinaryMetadataUpdateChangingTopologySelfTest extends GridComm
}
}
- super.sendMessage(node, msg, ackClosure);
+ super.sendMessage(node, msg, ackC);
}
/**
@@ -238,6 +238,9 @@ public class IgniteBinaryMetadataUpdateChangingTopologySelfTest extends GridComm
}
}
+ /**
+ *
+ */
private static class TestValue {
/** Field1. */
private String field1;
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java
new file mode 100644
index 0000000..814fb08
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java
@@ -0,0 +1,411 @@
+/*
+ * 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 java.util.concurrent.Callable;
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import javax.cache.CacheException;
+import javax.cache.processor.MutableEntry;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheEntryProcessor;
+import org.apache.ignite.cluster.ClusterTopologyException;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.util.typedef.X;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheMode.PARTITIONED;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
+
+/**
+ *
+ */
+public class IgniteBinaryMetadataUpdateNodeRestartTest extends GridCommonAbstractTest {
+ /** */
+ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+ /** */
+ private static final String ATOMIC_CACHE = "atomicCache";
+
+ /** */
+ private static final String TX_CACHE = "txCache";
+
+ /** */
+ private static final int SRVS = 3;
+
+ /** */
+ private static final int CLIENTS = 1;
+
+ /** */
+ private boolean client;
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
+
+ ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
+
+ cfg.setMarshaller(null);
+
+ CacheConfiguration ccfg1 = cacheConfiguration(TX_CACHE, TRANSACTIONAL);
+ CacheConfiguration ccfg2 = cacheConfiguration(ATOMIC_CACHE, ATOMIC);
+
+ cfg.setCacheConfiguration(ccfg1, ccfg2);
+
+ cfg.setClientMode(client);
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTestsStopped() throws Exception {
+ stopAllGrids();
+
+ super.afterTestsStopped();
+ }
+
+ /**
+ * @param name Cache name.
+ * @param atomicityMode Cache atomicity mode.
+ * @return Cache configuration.
+ */
+ private CacheConfiguration cacheConfiguration(String name, CacheAtomicityMode atomicityMode) {
+ CacheConfiguration ccfg = new CacheConfiguration();
+
+ ccfg.setCacheMode(PARTITIONED);
+ ccfg.setBackups(1);
+ ccfg.setWriteSynchronizationMode(FULL_SYNC);
+ ccfg.setName(name);
+ ccfg.setAtomicityMode(atomicityMode);
+
+ return ccfg;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testNodeRestart() throws Exception {
+ for (int i = 0; i < 10; i++) {
+ log.info("Iteration: " + i);
+
+ client = false;
+
+ startGridsMultiThreaded(SRVS);
+
+ client = true;
+
+ startGrid(SRVS);
+
+ final AtomicBoolean stop = new AtomicBoolean();
+
+ try {
+ IgniteInternalFuture<?> restartFut = GridTestUtils.runAsync(new Callable<Void>() {
+ @Override public Void call() throws Exception {
+ while (!stop.get()) {
+ log.info("Start node.");
+
+ startGrid(SRVS + CLIENTS);
+
+ log.info("Stop node.");
+
+ stopGrid(SRVS + CLIENTS);
+ }
+
+ return null;
+ }
+ }, "restart-thread");
+
+ final AtomicInteger idx = new AtomicInteger();
+
+ IgniteInternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+ @Override public Object call() throws Exception {
+ int threadIdx = idx.getAndIncrement();
+
+ int node = threadIdx % (SRVS + CLIENTS);
+
+ Ignite ignite = ignite(node);
+
+ log.info("Started thread: " + ignite.name());
+
+ Thread.currentThread().setName("update-thread-" + threadIdx + "-" + ignite.name());
+
+ IgniteCache<Object, Object> cache1 = ignite.cache(ATOMIC_CACHE);
+ IgniteCache<Object, Object> cache2 = ignite.cache(TX_CACHE);
+
+ ThreadLocalRandom rnd = ThreadLocalRandom.current();
+
+ while (!stop.get()) {
+ try {
+ cache1.put(new TestClass1(true), create(rnd.nextInt(20) + 1));
+
+ cache1.invoke(new TestClass1(true), new TestEntryProcessor(rnd.nextInt(20) + 1));
+
+ cache2.put(new TestClass1(true), create(rnd.nextInt(20) + 1));
+
+ cache2.invoke(new TestClass1(true), new TestEntryProcessor(rnd.nextInt(20) + 1));
+ }
+ catch (CacheException | IgniteException e) {
+ log.info("Error: " + e);
+
+ if (X.hasCause(e, ClusterTopologyException.class)) {
+ ClusterTopologyException cause = X.cause(e, ClusterTopologyException.class);
+
+ if (cause.retryReadyFuture() != null)
+ cause.retryReadyFuture().get();
+ }
+ }
+ }
+
+ return null;
+ }
+ }, 10, "update-thread");
+
+ U.sleep(5_000);
+
+ stop.set(true);
+
+ restartFut.get();
+
+ fut.get();
+ }
+ finally {
+ stop.set(true);
+
+ stopAllGrids();
+ }
+ }
+ }
+
+ /**
+ * @param id Class ID.
+ * @return Test class instance.
+ */
+ private static Object create(int id) {
+ switch (id) {
+ case 1: return new TestClass1(true);
+
+ case 2: return new TestClass2();
+
+ case 3: return new TestClass3();
+
+ case 4: return new TestClass4();
+
+ case 5: return new TestClass5();
+
+ case 6: return new TestClass6();
+
+ case 7: return new TestClass7();
+
+ case 8: return new TestClass8();
+
+ case 9: return new TestClass9();
+
+ case 10: return new TestClass10();
+
+ case 11: return new TestClass11();
+
+ case 12: return new TestClass12();
+
+ case 13: return new TestClass13();
+
+ case 14: return new TestClass14();
+
+ case 15: return new TestClass15();
+
+ case 16: return new TestClass16();
+
+ case 17: return new TestClass17();
+
+ case 18: return new TestClass18();
+
+ case 19: return new TestClass19();
+
+ case 20: return new TestClass20();
+ }
+
+ fail();
+
+ return null;
+ }
+
+ /**
+ *
+ */
+ static class TestEntryProcessor implements CacheEntryProcessor<Object, Object, Object> {
+ /** */
+ private int id;
+
+ /**
+ * @param id Value id.
+ */
+ public TestEntryProcessor(int id) {
+ this.id = id;
+ }
+
+ /** {@inheritDoc} */
+ @Override public Object process(MutableEntry<Object, Object> entry, Object... args) {
+ entry.setValue(create(id));
+
+ return null;
+ }
+ }
+
+ /**
+ *
+ */
+ static class TestClass1 {
+ /** */
+ int val;
+
+ /**
+ * @param setVal Set value flag.
+ */
+ public TestClass1(boolean setVal) {
+ this.val = setVal ? ThreadLocalRandom.current().nextInt(10_000) : 0;
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean equals(Object o) {
+ if (this == o) return true;
+
+ if (o == null || getClass() != o.getClass())
+ return false;
+
+ TestClass1 that = (TestClass1)o;
+
+ return val == that.val;
+
+ }
+
+ /** {@inheritDoc} */
+ @Override public int hashCode() {
+ return val;
+ }
+ }
+
+ /**
+ *
+ */
+ static class TestClass2 {}
+
+ /**
+ *
+ */
+ static class TestClass3 {}
+
+ /**
+ *
+ */
+ static class TestClass4 {}
+
+ /**
+ *
+ */
+ static class TestClass5 {}
+
+ /**
+ *
+ */
+ static class TestClass6 {}
+
+ /**
+ *
+ */
+ static class TestClass7 {}
+
+ /**
+ *
+ */
+ static class TestClass8 {}
+
+ /**
+ *
+ */
+ static class TestClass9 {}
+
+ /**
+ *
+ */
+ static class TestClass10 {}
+
+ /**
+ *
+ */
+ static class TestClass11 {}
+
+ /**
+ *
+ */
+ static class TestClass12 {}
+
+ /**
+ *
+ */
+ static class TestClass13 {}
+
+ /**
+ *
+ */
+ static class TestClass14 {}
+
+ /**
+ *
+ */
+ static class TestClass15 {}
+
+ /**
+ *
+ */
+ static class TestClass16 {}
+
+ /**
+ *
+ */
+ static class TestClass17 {}
+
+ /**
+ *
+ */
+ static class TestClass18 {}
+
+ /**
+ *
+ */
+ static class TestClass19 {}
+
+ /**
+ *
+ */
+ static class TestClass20 {}
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/53ec76ff/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java
index 242b12d..8d4af19 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java
@@ -65,6 +65,8 @@ public class IgniteCacheManyClientsTest extends GridCommonAbstractTest {
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
+ cfg.setFailureDetectionTimeout(20_000);
+
cfg.setConnectorConfiguration(null);
cfg.setPeerClassLoadingEnabled(false);
cfg.setTimeServerPortRange(200);
[17/19] ignite git commit: IGNITE-2252 Added support for cache sql
schema in REST topology command - Fixes #374.
Posted by nt...@apache.org.
IGNITE-2252 Added support for cache sql schema in REST topology command - Fixes #374.
Signed-off-by: Andrey <an...@gridgain.com>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/debe34de
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/debe34de
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/debe34de
Branch: refs/heads/ignite-gg-10837
Commit: debe34de1881f5a1268993ae584db70f16a761cf
Parents: 383f317
Author: Andrey <an...@gridgain.com>
Authored: Thu Dec 24 17:49:02 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Dec 24 17:49:02 2015 +0700
----------------------------------------------------------------------
.../JettyRestProcessorAbstractSelfTest.java | 25 +++-
.../connection/GridClientNioTcpConnection.java | 17 +--
.../client/message/GridClientCacheBean.java | 139 +++++++++++++++++++
.../rest/client/message/GridClientNodeBean.java | 70 ++++++----
.../top/GridTopologyCommandHandler.java | 38 +++--
5 files changed, 230 insertions(+), 59 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/debe34de/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
index 4c73f78..4b1d47c 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
@@ -35,6 +35,7 @@ import java.util.regex.Pattern;
import net.sf.json.JSONNull;
import net.sf.json.JSONObject;
import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.cache.query.SqlQuery;
import org.apache.ignite.cache.query.annotations.QuerySqlField;
@@ -45,7 +46,6 @@ import org.apache.ignite.internal.processors.cache.query.GridCacheSqlIndexMetada
import org.apache.ignite.internal.processors.cache.query.GridCacheSqlMetadata;
import org.apache.ignite.internal.processors.rest.handlers.GridRestCommandHandler;
import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.internal.CU;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.internal.util.typedef.P1;
import org.apache.ignite.lang.IgniteBiPredicate;
@@ -1054,11 +1054,28 @@ public abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestPro
assertEquals(JSONNull.getInstance(), node.get("attributes"));
assertEquals(JSONNull.getInstance(), node.get("metrics"));
- assertEquals("PARTITIONED", node.get("defaultCacheMode"));
+ Collection<Map> caches = (Collection)node.get("caches");
- Map caches = (Map)node.get("caches");
+ Collection<IgniteCacheProxy<?, ?>> publicCaches = grid(0).context().cache().publicCaches();
- assertEquals(F.asMap("person", "PARTITIONED"), caches);
+ assertNotNull(caches);
+ assertEquals(publicCaches.size(), caches.size());
+
+ for (Map cache : caches) {
+ final String cacheName = cache.get("name").equals("") ? null : (String)cache.get("name");
+
+ IgniteCacheProxy<?, ?> publicCache = F.find(publicCaches, null, new P1<IgniteCacheProxy<?, ?>>() {
+ @Override public boolean apply(IgniteCacheProxy<?, ?> c) {
+ return F.eq(c.getName(), cacheName);
+ }
+ });
+
+ assertNotNull(publicCache);
+
+ CacheMode cacheMode = CacheMode.valueOf((String)cache.get("mode"));
+
+ assertEquals(publicCache.getConfiguration(CacheConfiguration.class).getCacheMode(),cacheMode);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/debe34de/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientNioTcpConnection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientNioTcpConnection.java b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientNioTcpConnection.java
index 576df3a..cfcb07f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientNioTcpConnection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientNioTcpConnection.java
@@ -60,6 +60,7 @@ import org.apache.ignite.internal.processors.rest.client.message.GridClientCache
import org.apache.ignite.internal.processors.rest.client.message.GridClientHandshakeRequest;
import org.apache.ignite.internal.processors.rest.client.message.GridClientMessage;
import org.apache.ignite.internal.processors.rest.client.message.GridClientNodeBean;
+import org.apache.ignite.internal.processors.rest.client.message.GridClientCacheBean;
import org.apache.ignite.internal.processors.rest.client.message.GridClientNodeMetricsBean;
import org.apache.ignite.internal.processors.rest.client.message.GridClientPingPacket;
import org.apache.ignite.internal.processors.rest.client.message.GridClientResponse;
@@ -926,27 +927,17 @@ public class GridClientNioTcpConnection extends GridClientConnection {
Map<String, GridClientCacheMode> caches = new HashMap<>();
if (nodeBean.getCaches() != null) {
- for (Map.Entry<String, String> e : nodeBean.getCaches().entrySet()) {
+ for (GridClientCacheBean cacheBean : nodeBean.getCaches()) {
try {
- caches.put(e.getKey(), GridClientCacheMode.valueOf(e.getValue()));
+ caches.put(cacheBean.getName(), cacheBean.getMode());
}
catch (IllegalArgumentException ignored) {
log.warning("Invalid cache mode received from remote node (will ignore) [srv=" + serverAddress() +
- ", cacheName=" + e.getKey() + ", cacheMode=" + e.getValue() + ']');
+ ", cacheName=" + cacheBean.getName() + ", cacheMode=" + cacheBean.getMode() + ']');
}
}
}
- if (nodeBean.getDefaultCacheMode() != null) {
- try {
- caches.put(null, GridClientCacheMode.valueOf(nodeBean.getDefaultCacheMode()));
- }
- catch (IllegalArgumentException ignored) {
- log.warning("Invalid cache mode received for default cache from remote node (will ignore) [srv="
- + serverAddress() + ", cacheMode=" + nodeBean.getDefaultCacheMode() + ']');
- }
- }
-
if (!caches.isEmpty())
nodeBuilder.caches(caches);
http://git-wip-us.apache.org/repos/asf/ignite/blob/debe34de/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientCacheBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientCacheBean.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientCacheBean.java
new file mode 100644
index 0000000..e055ec3
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientCacheBean.java
@@ -0,0 +1,139 @@
+/*
+ * 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.rest.client.message;
+
+import java.io.Serializable;
+import org.apache.ignite.internal.client.GridClientCacheMode;
+
+/**
+ * Cache bean.
+ */
+public class GridClientCacheBean implements Serializable {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /**
+ * Cache name
+ */
+ private String name;
+
+ /**
+ * Cache mode
+ */
+ private GridClientCacheMode mode;
+
+ /**
+ * Custom name of the sql schema.
+ */
+ private String sqlSchema;
+
+ public GridClientCacheBean() {
+ }
+
+ public GridClientCacheBean(String name, GridClientCacheMode mode, String sqlSchema) {
+ this.name = name;
+ this.mode = mode;
+ this.sqlSchema = sqlSchema;
+ }
+
+ /**
+ * Gets cache name.
+ *
+ * @return Cache name.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets cache name.
+ *
+ * @param name Cache name.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Gets cache mode.
+ *
+ * @return Cache mode.
+ */
+ public GridClientCacheMode getMode() {
+ return mode;
+ }
+
+ /**
+ * Sets cache mode.
+ *
+ * @param mode Cache mode.
+ */
+ public void setMode(GridClientCacheMode mode) {
+ this.mode = mode;
+ }
+
+ /**
+ * Gets custom name of the sql schema.
+ *
+ * @return Custom name of the sql schema.
+ */
+ public String getSqlSchema() {
+ return sqlSchema;
+ }
+
+ /**
+ * Sets custom name of the sql schema.
+ *
+ * @param sqlSchema Custom name of the sql schema.
+ */
+ public void setSqlSchema(String sqlSchema) {
+ this.sqlSchema = sqlSchema;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int hashCode() {
+ return name != null ? name.hashCode() : 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+
+ if (obj == null || getClass() != obj.getClass())
+ return false;
+
+ GridClientCacheBean other = (GridClientCacheBean) obj;
+
+ return name == null ? other.name == null : name.equals(other.name);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString() {
+ return "GridClientCacheBean [name=" + name + ", mode=" + mode + ']';
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/debe34de/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
index 2a34c80..8ba6eb5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
@@ -21,10 +21,12 @@ import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.UUID;
+import org.apache.ignite.internal.client.GridClientCacheMode;
import org.apache.ignite.internal.util.typedef.internal.U;
/**
@@ -55,11 +57,8 @@ public class GridClientNodeBean implements Externalizable {
/** Node attributes. */
private Map<String, Object> attrs;
- /** Mode for cache with {@code null} name. */
- private String dfltCacheMode;
-
/** Node caches. */
- private Map<String, String> caches;
+ private Collection<GridClientCacheBean> caches;
/**
* Gets node ID.
@@ -177,40 +176,22 @@ public class GridClientNodeBean implements Externalizable {
/**
* Gets configured node caches.
*
- * @return Map where key is cache name and value is cache mode ("LOCAL", "REPLICATED", "PARTITIONED").
+ * @return Configured node caches.
*/
- public Map<String, String> getCaches() {
+ public Collection<GridClientCacheBean> getCaches() {
return caches;
}
/**
* Sets configured node caches.
*
- * @param caches Map where key is cache name and value is cache mode ("LOCAL", "REPLICATED", "PARTITIONED").
+ * @param caches Configured node caches.
*/
- public void setCaches(Map<String, String> caches) {
+ public void setCaches(Collection<GridClientCacheBean> caches) {
this.caches = caches;
}
/**
- * Gets mode for cache with null name.
- *
- * @return Default cache mode.
- */
- public String getDefaultCacheMode() {
- return dfltCacheMode;
- }
-
- /**
- * Sets mode for default cache.
- *
- * @param dfltCacheMode Default cache mode.
- */
- public void setDefaultCacheMode(String dfltCacheMode) {
- this.dfltCacheMode = dfltCacheMode;
- }
-
- /**
* Sets REST binary protocol port.
*
* @param tcpPort Port on which REST binary protocol is bound.
@@ -242,10 +223,25 @@ public class GridClientNodeBean implements Externalizable {
out.writeInt(tcpPort);
out.writeInt(0); // Jetty port.
+ String dfltCacheMode = null;
+
+ Map<String, String> cacheMap = null;
+
+ if (caches != null) {
+ cacheMap = U.newHashMap(caches.size());
+
+ for (GridClientCacheBean cacheBean : caches) {
+ if (cacheBean.getName() == null)
+ dfltCacheMode = cacheBean.getMode().toString();
+ else
+ cacheMap.put(cacheBean.getName(), cacheBean.getMode().toString());
+ }
+ }
+
U.writeString(out, dfltCacheMode);
U.writeMap(out, attrs);
- U.writeMap(out, caches);
+ U.writeMap(out, cacheMap);
U.writeCollection(out, tcpAddrs);
U.writeCollection(out, tcpHostNames);
@@ -263,10 +259,24 @@ public class GridClientNodeBean implements Externalizable {
tcpPort = in.readInt();
in.readInt(); // Jetty port.
- dfltCacheMode = U.readString(in);
+ String dfltCacheMode = U.readString(in);
attrs = U.readMap(in);
- caches = U.readMap(in);
+
+ Map<String, String> cacheMap = U.readMap(in);
+
+ if (cacheMap == null && dfltCacheMode != null) {
+ cacheMap = U.newHashMap(1);
+
+ cacheMap.put(null, dfltCacheMode);
+ }
+
+ if (cacheMap != null) {
+ caches = new ArrayList<>(cacheMap.size());
+
+ for (Map.Entry<String, String> e : cacheMap.entrySet())
+ caches.add(new GridClientCacheBean(e.getKey(), GridClientCacheMode.valueOf(e.getValue()), null));
+ }
tcpAddrs = U.readCollection(in);
tcpHostNames = U.readCollection(in);
@@ -283,4 +293,4 @@ public class GridClientNodeBean implements Externalizable {
@Override public String toString() {
return "GridClientNodeBean [id=" + nodeId + ']';
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/debe34de/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/top/GridTopologyCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/top/GridTopologyCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/top/GridTopologyCommandHandler.java
index f950ac2..297785e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/top/GridTopologyCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/top/GridTopologyCommandHandler.java
@@ -30,13 +30,17 @@ import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cluster.ClusterMetrics;
import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.internal.GridKernalContext;
import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.client.GridClientCacheMode;
+import org.apache.ignite.internal.processors.cache.GridCacheProcessor;
import org.apache.ignite.internal.processors.port.GridPortRecord;
import org.apache.ignite.internal.processors.rest.GridRestCommand;
import org.apache.ignite.internal.processors.rest.GridRestProtocol;
import org.apache.ignite.internal.processors.rest.GridRestResponse;
import org.apache.ignite.internal.processors.rest.client.message.GridClientNodeBean;
+import org.apache.ignite.internal.processors.rest.client.message.GridClientCacheBean;
import org.apache.ignite.internal.processors.rest.client.message.GridClientNodeMetricsBean;
import org.apache.ignite.internal.processors.rest.handlers.GridRestCommandHandlerAdapter;
import org.apache.ignite.internal.processors.rest.request.GridRestRequest;
@@ -175,6 +179,22 @@ public class GridTopologyCommandHandler extends GridRestCommandHandlerAdapter {
}
/**
+ * Creates cache bean.
+ *
+ * @param ccfg Cache configuration.
+ * @return Cache bean.
+ */
+ public GridClientCacheBean createCacheBean(CacheConfiguration ccfg) {
+ GridClientCacheBean cacheBean = new GridClientCacheBean();
+
+ cacheBean.setName(ccfg.getName());
+ cacheBean.setMode(GridClientCacheMode.valueOf(ccfg.getCacheMode().toString()));
+ cacheBean.setSqlSchema(ccfg.getSqlSchema());
+
+ return cacheBean;
+ }
+
+ /**
* Creates node bean out of grid node. Notice that cache attribute is handled separately.
*
* @param node Grid node.
@@ -194,22 +214,16 @@ public class GridTopologyCommandHandler extends GridRestCommandHandlerAdapter {
nodeBean.setTcpAddresses(nonEmptyList(node.<Collection<String>>attribute(ATTR_REST_TCP_ADDRS)));
nodeBean.setTcpHostNames(nonEmptyList(node.<Collection<String>>attribute(ATTR_REST_TCP_HOST_NAMES)));
- Map<String, CacheMode> nodeCaches = ctx.discovery().nodeCaches(node);
-
- Map<String, String> cacheMap = U.newHashMap(nodeCaches.size());
+ GridCacheProcessor cacheProc = ctx.cache();
- for (Map.Entry<String, CacheMode> cache : nodeCaches.entrySet()) {
- String cacheName = cache.getKey();
+ Map<String, CacheMode> nodeCaches = ctx.discovery().nodeCaches(node);
- String mode = cache.getValue().toString();
+ Collection<GridClientCacheBean> caches = new ArrayList<>(nodeCaches.size());
- if (cacheName != null)
- cacheMap.put(cacheName, mode);
- else
- nodeBean.setDefaultCacheMode(mode);
- }
+ for (String cacheName : nodeCaches.keySet())
+ caches.add(createCacheBean(cacheProc.cacheConfiguration(cacheName)));
- nodeBean.setCaches(cacheMap);
+ nodeBean.setCaches(caches);
if (mtr) {
ClusterMetrics metrics = node.metrics();
[11/19] ignite git commit: ignite-2175
Posted by nt...@apache.org.
ignite-2175
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/bd05fa90
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/bd05fa90
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/bd05fa90
Branch: refs/heads/ignite-gg-10837
Commit: bd05fa90b1d04c8c488717302d55558d84fb02e1
Parents: 29c4778
Author: Anton Vinogradov <av...@apache.org>
Authored: Wed Dec 23 18:05:06 2015 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Wed Dec 23 18:05:06 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/binary/BinaryContext.java | 2 +-
.../internal/binary/BinaryObjectImpl.java | 2 +-
.../ignite/tests/p2p/cache/PersonWrapper.java | 121 +++++++++++++++++++
.../processors/query/h2/IgniteH2Indexing.java | 2 +-
.../IgniteBinaryObjectFieldsQuerySelfTest.java | 16 ++-
...eBinaryWrappedObjectFieldsQuerySelfTest.java | 28 +++++
.../IgniteBinaryCacheQueryTestSuite.java | 4 +
.../IgniteCacheQuerySelfTestSuite.java | 4 +
8 files changed, 171 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/bd05fa90/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
index 5c63fbd..a27a3d0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
@@ -743,7 +743,7 @@ public class BinaryContext implements Externalizable {
*/
protected Object readResolve() throws ObjectStreamException {
try {
- IgniteKernal g = IgnitionEx.gridx(gridName);
+ IgniteKernal g = IgnitionEx.localIgnite();
if (g == null)
throw new IllegalStateException("Failed to find grid for name: " + gridName);
http://git-wip-us.apache.org/repos/asf/ignite/blob/bd05fa90/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryObjectImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryObjectImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryObjectImpl.java
index d712eb8..fca8955 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryObjectImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryObjectImpl.java
@@ -533,7 +533,7 @@ public final class BinaryObjectImpl extends BinaryObjectExImpl implements Extern
*/
private Object deserializeValue(@Nullable CacheObjectContext coCtx) {
BinaryReaderExImpl reader = reader(null,
- coCtx != null ? coCtx.kernalContext().config().getClassLoader() : null);
+ coCtx != null ? coCtx.kernalContext().config().getClassLoader() : ctx.configuration().getClassLoader());
Object obj0 = reader.deserialize();
http://git-wip-us.apache.org/repos/asf/ignite/blob/bd05fa90/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/cache/PersonWrapper.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/cache/PersonWrapper.java b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/cache/PersonWrapper.java
new file mode 100644
index 0000000..2655e39
--- /dev/null
+++ b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/cache/PersonWrapper.java
@@ -0,0 +1,121 @@
+/*
+ * 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.tests.p2p.cache;
+
+import java.io.Serializable;
+import org.apache.ignite.cache.query.annotations.QuerySqlField;
+
+/**
+ * Wraps Person class.
+ */
+public class PersonWrapper {
+ public static class Person implements Serializable {
+ /** */
+ @QuerySqlField
+ private String name;
+
+ /** */
+ @QuerySqlField(index = true)
+ private int id;
+
+ /** */
+ @QuerySqlField
+ private String lastName;
+
+ /** */
+ @QuerySqlField
+ private double salary;
+
+ /**
+ *
+ */
+ public Person() {
+ // No-op.
+ }
+
+ /**
+ * @param name Name.
+ */
+ public Person(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @return Name.
+ */
+ public String name() {
+ return name;
+ }
+
+ /**
+ * @return Name.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name Name.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @return ID.
+ */
+ public int getId() {
+ return id;
+ }
+
+ /**
+ * @param id ID.
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ /**
+ * @return Last name.
+ */
+ public String getLastName() {
+ return lastName;
+ }
+
+ /**
+ * @param lastName Last name.
+ */
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ /**
+ * @return Salary.
+ */
+ public double getSalary() {
+ return salary;
+ }
+
+ /**
+ * @param salary Salary.
+ */
+ public void setSalary(double salary) {
+ this.salary = salary;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/bd05fa90/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index dead526..be72888 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -1584,7 +1584,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
Schema rmv = schemas.remove(schema);
if (rmv != null) {
- space2schema.remove(rmv.spaceName);
+ space2schema.remove(emptyIfNull(rmv.spaceName));
mapQryExec.onCacheStop(ccfg.getName());
try {
http://git-wip-us.apache.org/repos/asf/ignite/blob/bd05fa90/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectFieldsQuerySelfTest.java
index 5c1e578..fb53b8a 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectFieldsQuerySelfTest.java
@@ -45,9 +45,6 @@ public class IgniteBinaryObjectFieldsQuerySelfTest extends GridCommonAbstractTes
/** */
public static final String PERSON_KEY_CLS_NAME = "org.apache.ignite.tests.p2p.cache.PersonKey";
- /** */
- public static final String PERSON_CLS_NAME = "org.apache.ignite.tests.p2p.cache.Person";
-
/** IP finder. */
private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -57,6 +54,14 @@ public class IgniteBinaryObjectFieldsQuerySelfTest extends GridCommonAbstractTes
/** */
private static ClassLoader extClassLoader;
+ /**
+ * Gets Person class name.
+ * @return class name.
+ */
+ protected String getPersonClassName(){
+ return "org.apache.ignite.tests.p2p.cache.Person";
+ }
+
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
@@ -91,7 +96,8 @@ public class IgniteBinaryObjectFieldsQuerySelfTest extends GridCommonAbstractTes
cache.setCacheMode(cacheMode);
cache.setAtomicityMode(atomicity);
- cache.setIndexedTypes(extClassLoader.loadClass(PERSON_KEY_CLS_NAME), extClassLoader.loadClass(PERSON_CLS_NAME));
+ cache.setIndexedTypes(extClassLoader.loadClass(PERSON_KEY_CLS_NAME),
+ extClassLoader.loadClass(getPersonClassName()));
return cache;
}
@@ -251,7 +257,7 @@ public class IgniteBinaryObjectFieldsQuerySelfTest extends GridCommonAbstractTes
*/
private void populate(IgniteCache<Object, Object> cache) throws Exception {
Class<?> keyCls = extClassLoader.loadClass(PERSON_KEY_CLS_NAME);
- Class<?> cls = extClassLoader.loadClass(PERSON_CLS_NAME);
+ Class<?> cls = extClassLoader.loadClass(getPersonClassName());
for (int i = 0; i < 100; i++) {
Object key = keyCls.newInstance();
http://git-wip-us.apache.org/repos/asf/ignite/blob/bd05fa90/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryWrappedObjectFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryWrappedObjectFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryWrappedObjectFieldsQuerySelfTest.java
new file mode 100644
index 0000000..923d601
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryWrappedObjectFieldsQuerySelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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;
+
+/**
+ * Tests that server nodes do not need class definitions to execute queries.
+ * Used internal class.
+ */
+public class IgniteBinaryWrappedObjectFieldsQuerySelfTest extends IgniteBinaryObjectFieldsQuerySelfTest {
+ /** {@inheritDoc} */
+ protected String getPersonClassName() {
+ return "org.apache.ignite.tests.p2p.cache.PersonWrapper$Person";
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/bd05fa90/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
index b145a90..eddfcf4 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
@@ -33,6 +33,8 @@ import org.apache.ignite.internal.processors.cache.GridCacheQueryIndexingDisable
import org.apache.ignite.internal.processors.cache.GridCacheQueryInternalKeysSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheQuerySerializationSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheReduceQueryMultithreadedSelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteBinaryObjectFieldsQuerySelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteBinaryWrappedObjectFieldsQuerySelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheBinaryObjectsScanSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheCollocatedQuerySelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheDuplicateEntityConfigurationSelfTest;
@@ -160,6 +162,8 @@ public class IgniteBinaryCacheQueryTestSuite extends TestSuite {
suite.addTestSuite(GridCacheCrossCacheQuerySelfTest.class);
suite.addTestSuite(GridCacheQuerySerializationSelfTest.class);
suite.addTestSuite(IgniteCacheBinaryObjectsScanSelfTest.class);
+ suite.addTestSuite(IgniteBinaryObjectFieldsQuerySelfTest.class);
+ suite.addTestSuite(IgniteBinaryWrappedObjectFieldsQuerySelfTest.class);
// Scan queries.
suite.addTestSuite(CacheScanPartitionQueryFallbackSelfTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/bd05fa90/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
index 7c8d1d7..4b1eafa 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
@@ -30,6 +30,8 @@ import org.apache.ignite.internal.processors.cache.GridCacheQueryIndexingDisable
import org.apache.ignite.internal.processors.cache.GridCacheQueryInternalKeysSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheQuerySerializationSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheReduceQueryMultithreadedSelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteBinaryObjectFieldsQuerySelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteBinaryWrappedObjectFieldsQuerySelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheCollocatedQuerySelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheDuplicateEntityConfigurationSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheFieldsQueryNoDataSelfTest;
@@ -149,6 +151,8 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
suite.addTestSuite(GridCacheReduceQueryMultithreadedSelfTest.class);
suite.addTestSuite(GridCacheCrossCacheQuerySelfTest.class);
suite.addTestSuite(GridCacheQuerySerializationSelfTest.class);
+ suite.addTestSuite(IgniteBinaryObjectFieldsQuerySelfTest.class);
+ suite.addTestSuite(IgniteBinaryWrappedObjectFieldsQuerySelfTest.class);
// Scan queries.
suite.addTestSuite(CacheScanPartitionQueryFallbackSelfTest.class);
[05/19] ignite git commit: ignite-2175
Posted by nt...@apache.org.
ignite-2175
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/60eec118
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/60eec118
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/60eec118
Branch: refs/heads/ignite-gg-10837
Commit: 60eec118428bc06f3107fee3ad55dd9a1c6d5cf3
Parents: 66b33bc
Author: Anton Vinogradov <av...@apache.org>
Authored: Wed Dec 23 13:35:14 2015 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Wed Dec 23 13:35:14 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/processors/query/GridQueryProcessor.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/60eec118/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 7d1311f..4808e96 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -1076,6 +1076,11 @@ public class GridQueryProcessor extends GridProcessorAdapter {
clsName = clsName.substring(0, clsName.length() - 2) + "_array";
}
+ int parentEnd = clsName.lastIndexOf('$');
+
+ if (parentEnd >= 0)
+ clsName = clsName.substring(parentEnd + 1);
+
return clsName;
}
[14/19] ignite git commit: ignite-1.5 Reverted
BinaryContext.readResolve since it does not work from user thread and breaks
tests
Posted by nt...@apache.org.
ignite-1.5 Reverted BinaryContext.readResolve since it does not work from user thread and breaks tests
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/61c072e5
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/61c072e5
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/61c072e5
Branch: refs/heads/ignite-gg-10837
Commit: 61c072e51b16f6776e3e73252bfd5d7f09c0f21e
Parents: 8f5445a
Author: sboikov <sb...@gridgain.com>
Authored: Thu Dec 24 10:47:50 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Dec 24 10:47:50 2015 +0300
----------------------------------------------------------------------
.../main/java/org/apache/ignite/internal/binary/BinaryContext.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/61c072e5/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
index a27a3d0..5c63fbd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
@@ -743,7 +743,7 @@ public class BinaryContext implements Externalizable {
*/
protected Object readResolve() throws ObjectStreamException {
try {
- IgniteKernal g = IgnitionEx.localIgnite();
+ IgniteKernal g = IgnitionEx.gridx(gridName);
if (g == null)
throw new IllegalStateException("Failed to find grid for name: " + gridName);
[15/19] ignite git commit: ignite-1.5 Fixed links.
Posted by nt...@apache.org.
ignite-1.5 Fixed links.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fe140992
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fe140992
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fe140992
Branch: refs/heads/ignite-gg-10837
Commit: fe140992581d196fd2abe9702c3a6ac28ee9ba47
Parents: 61c072e
Author: sboikov <sb...@gridgain.com>
Authored: Thu Dec 24 12:14:18 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Dec 24 12:14:18 2015 +0300
----------------------------------------------------------------------
README.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/fe140992/README.txt
----------------------------------------------------------------------
diff --git a/README.txt b/README.txt
index f66f9ee..9133f2c 100644
--- a/README.txt
+++ b/README.txt
@@ -17,9 +17,9 @@ The main feature set of Ignite In-Memory Data Fabric includes:
For information on how to get started with Apache Ignite please visit:
- http://apacheignite.readme.io/v1.0/docs/getting-started
+ http://apacheignite.readme.io/docs/getting-started
You can find Apache Ignite documentation here:
- http://apacheignite.readme.io/v1.0/docs/getting-started
+ http://apacheignite.readme.io/docs
[16/19] ignite git commit: ignite-1.5 Corrected fix for hang on
metadata update. Fix for ignite-647 (issues with dynamic cache start when
fair affinity is used).
Posted by nt...@apache.org.
ignite-1.5 Corrected fix for hang on metadata update. Fix for ignite-647 (issues with dynamic cache start when fair affinity is used).
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/383f317d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/383f317d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/383f317d
Branch: refs/heads/ignite-gg-10837
Commit: 383f317d03aca8903aeaa00da903366911103cef
Parents: fe14099
Author: sboikov <sb...@gridgain.com>
Authored: Thu Dec 24 13:12:23 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Dec 24 13:12:23 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheProcessor.java | 3 +-
.../binary/CacheObjectBinaryProcessorImpl.java | 3 +
.../dht/atomic/GridDhtAtomicCache.java | 89 ++++++++----------
.../GridDhtPartitionsExchangeFuture.java | 20 +++-
...ridNearOptimisticTxPrepareFutureAdapter.java | 10 +-
.../ignite/IgniteCacheAffinitySelfTest.java | 7 --
.../fair/FairAffinityDynamicCacheSelfTest.java | 17 +---
.../cache/CrossCacheTxRandomOperationsTest.java | 2 -
...yMetadataUpdateChangingTopologySelfTest.java | 97 +++++++++++++-------
...dTcpCommunicationSpiRecoveryAckSelfTest.java | 3 +-
.../TcpDiscoveryMulticastIpFinderSelfTest.java | 21 ++++-
.../IgniteCacheRestartTestSuite2.java | 3 +
.../stream/mqtt/IgniteMqttStreamerTest.java | 33 ++++---
13 files changed, 173 insertions(+), 135 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/383f317d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 380c163..ff02e70 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -1961,7 +1961,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
if (req.initiatingNodeId() == null)
desc.staticallyConfigured(true);
- desc.receivedOnDiscovery(true);
+ if (joiningNodeId.equals(ctx.localNodeId()))
+ desc.receivedOnDiscovery(true);
DynamicCacheDescriptor old = registeredCaches.put(maskNull(req.cacheName()), desc);
http://git-wip-us.apache.org/repos/asf/ignite/blob/383f317d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
index 7586a42..bcc2ab7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
@@ -491,6 +491,9 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
AffinityTopologyVersion topVer = ctx.cache().context().lockedTopologyVersion(null);
+ if (topVer == null)
+ topVer = ctx.cache().context().exchange().readyAffinityVersion();
+
BinaryObjectException err = metaDataCache.invoke(topVer, key, new MetadataProcessor(mergedMeta));
if (err != null)
http://git-wip-us.apache.org/repos/asf/ignite/blob/383f317d/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 634a9ea..393413e 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
@@ -1290,59 +1290,48 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
GridCacheReturn retVal = null;
- IgniteTxManager tm = ctx.tm();
+ if (keys.size() > 1 && // Several keys ...
+ writeThrough() && !req.skipStore() && // and store is enabled ...
+ !ctx.store().isLocal() && // and this is not local store ...
+ !ctx.dr().receiveEnabled() // and no DR.
+ ) {
+ // This method can only be used when there are no replicated entries in the batch.
+ UpdateBatchResult updRes = updateWithBatch(node,
+ hasNear,
+ req,
+ res,
+ locked,
+ ver,
+ dhtFut,
+ completionCb,
+ ctx.isDrEnabled(),
+ taskName,
+ expiry,
+ sndPrevVal);
- // Needed for metadata cache transaction.
- boolean set = tm.setTxTopologyHint(req.topologyVersion());
+ deleted = updRes.deleted();
+ dhtFut = updRes.dhtFuture();
- try {
- if (keys.size() > 1 && // Several keys ...
- writeThrough() && !req.skipStore() && // and store is enabled ...
- !ctx.store().isLocal() && // and this is not local store ...
- !ctx.dr().receiveEnabled() // and no DR.
- ) {
- // This method can only be used when there are no replicated entries in the batch.
- UpdateBatchResult updRes = updateWithBatch(node,
- hasNear,
- req,
- res,
- locked,
- ver,
- dhtFut,
- completionCb,
- ctx.isDrEnabled(),
- taskName,
- expiry,
- sndPrevVal);
-
- deleted = updRes.deleted();
- dhtFut = updRes.dhtFuture();
-
- if (req.operation() == TRANSFORM)
- retVal = updRes.invokeResults();
- }
- else {
- UpdateSingleResult updRes = updateSingle(node,
- hasNear,
- req,
- res,
- locked,
- ver,
- dhtFut,
- completionCb,
- ctx.isDrEnabled(),
- taskName,
- expiry,
- sndPrevVal);
-
- retVal = updRes.returnValue();
- deleted = updRes.deleted();
- dhtFut = updRes.dhtFuture();
- }
+ if (req.operation() == TRANSFORM)
+ retVal = updRes.invokeResults();
}
- finally {
- if (set)
- tm.setTxTopologyHint(null);
+ else {
+ UpdateSingleResult updRes = updateSingle(node,
+ hasNear,
+ req,
+ res,
+ locked,
+ ver,
+ dhtFut,
+ completionCb,
+ ctx.isDrEnabled(),
+ taskName,
+ expiry,
+ sndPrevVal);
+
+ retVal = updRes.returnValue();
+ deleted = updRes.deleted();
+ dhtFut = updRes.dhtFuture();
}
if (retVal == null)
http://git-wip-us.apache.org/repos/asf/ignite/blob/383f317d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 854726f..a10294f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -329,6 +329,19 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
* @return {@code True} if cache was added during this exchange.
*/
public boolean isCacheAdded(int cacheId, AffinityTopologyVersion topVer) {
+ if (cacheStarted(cacheId))
+ return true;
+
+ GridCacheContext<?, ?> cacheCtx = cctx.cacheContext(cacheId);
+
+ return cacheCtx != null && F.eq(cacheCtx.startTopologyVersion(), topVer);
+ }
+
+ /**
+ * @param cacheId Cache ID.
+ * @return {@code True} if non-client cache was added during this exchange.
+ */
+ private boolean cacheStarted(int cacheId) {
if (!F.isEmpty(reqs)) {
for (DynamicCacheChangeRequest req : reqs) {
if (req.start() && !req.clientStartOnly()) {
@@ -338,9 +351,7 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
}
}
- GridCacheContext<?, ?> cacheCtx = cctx.cacheContext(cacheId);
-
- return cacheCtx != null && F.eq(cacheCtx.startTopologyVersion(), topVer);
+ return false;
}
/**
@@ -419,7 +430,8 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
// If local node did not initiate exchange or local node is the only cache node in grid.
Collection<ClusterNode> affNodes = CU.affinityNodes(cacheCtx, exchId.topologyVersion());
- return !exchId.nodeId().equals(cctx.localNodeId()) ||
+ return cacheStarted(cacheCtx.cacheId()) ||
+ !exchId.nodeId().equals(cctx.localNodeId()) ||
(affNodes.size() == 1 && affNodes.contains(cctx.localNode()));
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/383f317d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFutureAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFutureAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFutureAdapter.java
index fa7020b..fe6180a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFutureAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFutureAdapter.java
@@ -52,10 +52,16 @@ public abstract class GridNearOptimisticTxPrepareFutureAdapter extends GridNearT
// Obtain the topology version to use.
long threadId = Thread.currentThread().getId();
- AffinityTopologyVersion topVer = cctx.mvcc().lastExplicitLockTopologyVersion(threadId);
+ AffinityTopologyVersion topVer = null;
+
+ if (tx.system())
+ topVer = tx.topologyVersionSnapshot();
+
+ if (topVer == null)
+ topVer = cctx.mvcc().lastExplicitLockTopologyVersion(threadId);
// If there is another system transaction in progress, use it's topology version to prevent deadlock.
- if (topVer == null && tx != null && tx.system())
+ if (topVer == null && tx.system())
topVer = cctx.tm().lockedTopologyVersion(threadId, tx);
if (topVer != null) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/383f317d/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java
index 3d76268..5b08f62 100644
--- a/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java
@@ -92,17 +92,10 @@ public class IgniteCacheAffinitySelfTest extends IgniteCacheAbstractTest {
return new NearCacheConfiguration();
}
- /** {@inheritDoc} */
- @Override protected void beforeTestsStarted() throws Exception {
- fail("Enable when https://issues.apache.org/jira/browse/IGNITE-647 is fixed.");
- }
-
/**
* @throws Exception if failed.
*/
public void testAffinity() throws Exception {
- fail("Enable when https://issues.apache.org/jira/browse/IGNITE-647 is fixed.");
-
checkAffinity();
stopGrid(gridCount() - 1);
http://git-wip-us.apache.org/repos/asf/ignite/blob/383f317d/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityDynamicCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityDynamicCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityDynamicCacheSelfTest.java
index ef67495..4299935 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityDynamicCacheSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityDynamicCacheSelfTest.java
@@ -37,22 +37,11 @@ public class FairAffinityDynamicCacheSelfTest extends GridCommonAbstractTest {
/** */
private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
- /** */
- public FairAffinityDynamicCacheSelfTest(){
- super(false);
- }
-
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
- TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
- disco.setIpFinder(IP_FINDER);
-
- cfg.getTransactionConfiguration().setTxSerializableEnabled(true);
-
- cfg.setDiscoverySpi(disco);
+ ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
return cfg;
}
@@ -71,8 +60,6 @@ public class FairAffinityDynamicCacheSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testStartStopCache() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-647");
-
CacheConfiguration<Integer, Integer> cacheCfg = new CacheConfiguration<>();
cacheCfg.setCacheMode(CacheMode.PARTITIONED);
@@ -94,6 +81,6 @@ public class FairAffinityDynamicCacheSelfTest extends GridCommonAbstractTest {
}
});
- destFut.get(2000L);
+ destFut.get(5000L);
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/383f317d/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java
index d88f12f..2577d93 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java
@@ -126,8 +126,6 @@ public class CrossCacheTxRandomOperationsTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testCrossCacheTxOperationsFairAffinity() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-647");
-
txOperations(PARTITIONED, FULL_SYNC, true, true);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/383f317d/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java
index c95c586..9eaa848 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java
@@ -25,10 +25,12 @@ import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.Callable;
+import javax.cache.processor.MutableEntry;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheEntryProcessor;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
@@ -48,7 +50,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.jetbrains.annotations.Nullable;
/**
* Tests specific scenario when binary metadata should be updated from a system thread
@@ -105,7 +106,7 @@ public class IgniteBinaryMetadataUpdateChangingTopologySelfTest extends GridComm
IgniteCache<Object, Object> cache = ignite(0).cache("cache").withAsync();
- cache.putAll(F.asMap(key1, "val1", key2, new TestValue()));
+ cache.putAll(F.asMap(key1, "val1", key2, new TestValue1()));
try {
Thread.sleep(500);
@@ -118,8 +119,47 @@ public class IgniteBinaryMetadataUpdateChangingTopologySelfTest extends GridComm
}
});
+ Thread.sleep(1000);
+
+ spi.stopBlock();
+
+ cache.future().get();
+
+ fut.get();
+ }
+ finally {
+ stopGrid(4);
+ }
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testNoDeadlockInvoke() throws Exception {
+ int key1 = primaryKey(ignite(1).cache("cache"));
+ int key2 = primaryKey(ignite(2).cache("cache"));
+
+ TestCommunicationSpi spi = (TestCommunicationSpi)ignite(1).configuration().getCommunicationSpi();
+
+ spi.blockMessages(GridNearTxPrepareResponse.class, ignite(0).cluster().localNode().id());
+
+ IgniteCache<Object, Object> cache = ignite(0).cache("cache").withAsync();
+
+ cache.invokeAll(F.asSet(key1, key2), new TestEntryProcessor());
+
+ try {
Thread.sleep(500);
+ IgniteInternalFuture<Void> fut = GridTestUtils.runAsync(new Callable<Void>() {
+ @Override public Void call() throws Exception {
+ startGrid(4);
+
+ return null;
+ }
+ });
+
+ Thread.sleep(1000);
+
spi.stopBlock();
cache.future().get();
@@ -145,12 +185,6 @@ public class IgniteBinaryMetadataUpdateChangingTopologySelfTest extends GridComm
/** */
private Map<Class<?>, Set<UUID>> blockCls = new HashMap<>();
- /** */
- private Class<?> recordCls;
-
- /** */
- private List<Object> recordedMsgs = new ArrayList<>();
-
/** {@inheritDoc} */
@Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackC)
throws IgniteSpiException {
@@ -158,9 +192,6 @@ public class IgniteBinaryMetadataUpdateChangingTopologySelfTest extends GridComm
Object msg0 = ((GridIoMessage)msg).message();
synchronized (this) {
- if (recordCls != null && msg0.getClass().equals(recordCls))
- recordedMsgs.add(msg0);
-
Set<UUID> blockNodes = blockCls.get(msg0.getClass());
if (F.contains(blockNodes, node.id())) {
@@ -178,28 +209,6 @@ public class IgniteBinaryMetadataUpdateChangingTopologySelfTest extends GridComm
}
/**
- * @param recordCls Message class to record.
- */
- void record(@Nullable Class<?> recordCls) {
- synchronized (this) {
- this.recordCls = recordCls;
- }
- }
-
- /**
- * @return Recorded messages.
- */
- List<Object> recordedMessages() {
- synchronized (this) {
- List<Object> msgs = recordedMsgs;
-
- recordedMsgs = new ArrayList<>();
-
- return msgs;
- }
- }
-
- /**
* @param cls Message class.
* @param nodeId Node ID.
*/
@@ -241,7 +250,27 @@ public class IgniteBinaryMetadataUpdateChangingTopologySelfTest extends GridComm
/**
*
*/
- private static class TestValue {
+ static class TestEntryProcessor implements CacheEntryProcessor<Object, Object, Object> {
+ /** {@inheritDoc} */
+ @Override public Object process(MutableEntry<Object, Object> e, Object... arguments) {
+ e.setValue(new TestValue2());
+
+ return null;
+ }
+ }
+
+ /**
+ *
+ */
+ private static class TestValue1 {
+ /** Field1. */
+ private String field1;
+ }
+
+ /**
+ *
+ */
+ private static class TestValue2 {
/** Field1. */
private String field1;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/383f317d/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java
index 38e3d98..9e78fb9 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java
@@ -179,8 +179,7 @@ public class GridTcpCommunicationSpiRecoveryAckSelfTest<T extends CommunicationS
@Override public boolean apply() {
return recoveryDesc.messagesFutures().isEmpty();
}
- }, spi.failureDetectionTimeoutEnabled() ? spi.failureDetectionTimeout() + 7000 :
- 10_000);
+ }, 10_000);
assertEquals("Unexpected messages: " + recoveryDesc.messagesFutures(), 0,
recoveryDesc.messagesFutures().size());
http://git-wip-us.apache.org/repos/asf/ignite/blob/383f317d/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinderSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinderSelfTest.java
index b39be56..90fdb0a 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinderSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinderSelfTest.java
@@ -101,11 +101,11 @@ public class TcpDiscoveryMulticastIpFinderSelfTest
assertEquals(1, addrs1.size());
assertEquals(2, addrs2.size());
- assertEquals(3, addrs3.size());
+ assertTrue("Unexpected number of addresses: " + addrs3, addrs3.size() == 2 || addrs3.size() == 3);
- assertEquals(3, ipFinder1.getRegisteredAddresses().size());
- assertEquals(3, ipFinder2.getRegisteredAddresses().size());
- assertEquals(3, ipFinder3.getRegisteredAddresses().size());
+ checkRequestAddresses(ipFinder1, 3);
+ checkRequestAddresses(ipFinder2, 3);
+ checkRequestAddresses(ipFinder3, 3);
}
finally {
if (ipFinder1 != null)
@@ -118,4 +118,17 @@ public class TcpDiscoveryMulticastIpFinderSelfTest
ipFinder3.close();
}
}
+
+ /**
+ * @param ipFinder IP finder.
+ * @param exp Expected number of addresses.
+ */
+ private void checkRequestAddresses(TcpDiscoveryMulticastIpFinder ipFinder, int exp) {
+ for (int i = 0; i < 10; i++) {
+ if (ipFinder.getRegisteredAddresses().size() == exp)
+ return;
+ }
+
+ assertEquals(exp, ipFinder.getRegisteredAddresses().size());
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/383f317d/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite2.java
index c9e9467..de87e99 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite2.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite2.java
@@ -21,6 +21,7 @@ import junit.framework.TestSuite;
import org.apache.ignite.internal.processors.cache.GridCachePutAllFailoverSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicPutAllFailoverSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCachePutAllRestartTest;
+import org.apache.ignite.internal.processors.cache.distributed.IgniteBinaryMetadataUpdateNodeRestartTest;
import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheAtomicNodeRestartTest;
import org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheAtomicReplicatedNodeRestartSelfTest;
@@ -42,6 +43,8 @@ public class IgniteCacheRestartTestSuite2 extends TestSuite {
suite.addTestSuite(IgniteCachePutAllRestartTest.class);
suite.addTestSuite(GridCachePutAllFailoverSelfTest.class);
+ suite.addTestSuite(IgniteBinaryMetadataUpdateNodeRestartTest.class);
+
return suite;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/383f317d/modules/mqtt/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java
----------------------------------------------------------------------
diff --git a/modules/mqtt/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java b/modules/mqtt/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java
index 891866d..92a530d 100644
--- a/modules/mqtt/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java
+++ b/modules/mqtt/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java
@@ -87,7 +87,7 @@ public class IgniteMqttStreamerTest extends GridCommonAbstractTest {
private MqttStreamer<Integer, String> streamer;
/** The UUID of the currently active remote listener. */
- private UUID remoteListener;
+ private UUID remoteLsnr;
/** The Ignite data streamer. */
private IgniteDataStreamer<Integer, String> dataStreamer;
@@ -105,7 +105,8 @@ public class IgniteMqttStreamerTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
- @Before @SuppressWarnings("unchecked")
+ @Before
+ @SuppressWarnings("unchecked")
public void beforeTest() throws Exception {
grid().<Integer, String>getOrCreateCache(defaultCacheConfiguration());
@@ -121,13 +122,13 @@ public class IgniteMqttStreamerTest extends GridCommonAbstractTest {
broker.setPersistenceAdapter(null);
broker.setPersistenceFactory(null);
- PolicyMap policyMap = new PolicyMap();
- PolicyEntry policy = new PolicyEntry();
+ PolicyMap plcMap = new PolicyMap();
+ PolicyEntry plc = new PolicyEntry();
- policy.setQueuePrefetch(1);
+ plc.setQueuePrefetch(1);
- broker.setDestinationPolicy(policyMap);
- broker.getDestinationPolicy().setDefaultEntry(policy);
+ broker.setDestinationPolicy(plcMap);
+ broker.getDestinationPolicy().setDefaultEntry(plc);
broker.setSchedulerSupport(false);
// add the MQTT transport connector to the broker
@@ -194,7 +195,9 @@ public class IgniteMqttStreamerTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testConnectionStatusWithBrokerDisconnection() throws Exception {
- // configure streamer
+ fail("https://issues.apache.org/jira/browse/IGNITE-2255");
+
+ // Configure streamer.
streamer.setSingleTupleExtractor(singleTupleExtractor());
streamer.setTopic(SINGLE_TOPIC_NAME);
streamer.setBlockUntilConnected(true);
@@ -202,8 +205,10 @@ public class IgniteMqttStreamerTest extends GridCommonAbstractTest {
streamer.start();
- // action time: repeat 5 times; make sure the connection state is kept correctly every time
+ // Action time: repeat 5 times; make sure the connection state is kept correctly every time.
for (int i = 0; i < 5; i++) {
+ log.info("Iteration: " + i);
+
assertTrue(streamer.isConnected());
broker.stop();
@@ -355,7 +360,7 @@ public class IgniteMqttStreamerTest extends GridCommonAbstractTest {
}
/**
- * @throws Exception
+ * @throws Exception If failed.
*/
public void testSingleTopic_NoQoS_Reconnect() throws Exception {
// configure streamer
@@ -557,7 +562,7 @@ public class IgniteMqttStreamerTest extends GridCommonAbstractTest {
// Listen to cache PUT events and expect as many as messages as test data items
final CountDownLatch latch = new CountDownLatch(expect);
- IgniteBiPredicate<UUID, CacheEvent> callback = new IgniteBiPredicate<UUID, CacheEvent>() {
+ IgniteBiPredicate<UUID, CacheEvent> cb = new IgniteBiPredicate<UUID, CacheEvent>() {
@Override public boolean apply(UUID uuid, CacheEvent evt) {
latch.countDown();
@@ -565,8 +570,8 @@ public class IgniteMqttStreamerTest extends GridCommonAbstractTest {
}
};
- remoteListener = ignite.events(ignite.cluster().forCacheNodes(null))
- .remoteListen(callback, null, EVT_CACHE_OBJECT_PUT);
+ remoteLsnr = ignite.events(ignite.cluster().forCacheNodes(null))
+ .remoteListen(cb, null, EVT_CACHE_OBJECT_PUT);
return latch;
}
@@ -586,7 +591,7 @@ public class IgniteMqttStreamerTest extends GridCommonAbstractTest {
assertEquals(cnt, cache.size(CachePeekMode.ALL));
// remove the event listener
- grid().events(grid().cluster().forCacheNodes(null)).stopRemoteListen(remoteListener);
+ grid().events(grid().cluster().forCacheNodes(null)).stopRemoteListen(remoteLsnr);
}
/**
[03/19] ignite git commit: IGNITE-2213: Fixed test. Thanks to Roman
Shtykh for noticing it.
Posted by nt...@apache.org.
IGNITE-2213: Fixed test. Thanks to Roman Shtykh for noticing it.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fbb49820
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fbb49820
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fbb49820
Branch: refs/heads/ignite-gg-10837
Commit: fbb4982081d08ea9d8d2971a1db49e9fed547304
Parents: b6dab09
Author: thatcoach <pp...@list.ru>
Authored: Wed Dec 23 09:01:13 2015 +0300
Committer: thatcoach <pp...@list.ru>
Committed: Wed Dec 23 09:01:13 2015 +0300
----------------------------------------------------------------------
.../binary/BinaryMarshallerSelfTest.java | 82 ++++++++++----------
1 file changed, 41 insertions(+), 41 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/fbb49820/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java
index ac9771f..9f7beb8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java
@@ -17,40 +17,6 @@
package org.apache.ignite.internal.binary;
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.io.Serializable;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.net.InetSocketAddress;
-import java.sql.Timestamp;
-import java.util.AbstractQueue;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Queue;
-import java.util.TreeMap;
-import java.util.TreeSet;
-import java.util.UUID;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentSkipListSet;
import junit.framework.Assert;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.binary.BinaryCollectionFactory;
@@ -87,9 +53,43 @@ import org.jetbrains.annotations.Nullable;
import org.jsr166.ConcurrentHashMap8;
import sun.misc.Unsafe;
-import static org.apache.ignite.internal.binary.streams.BinaryMemoryAllocator.INSTANCE;
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertNotEquals;
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.io.Serializable;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.InetSocketAddress;
+import java.sql.Timestamp;
+import java.util.AbstractQueue;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Queue;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentSkipListSet;
+
+import static org.apache.ignite.internal.binary.streams.BinaryMemoryAllocator.*;
+import static org.junit.Assert.*;
/**
* Binary marshaller tests.
@@ -2339,8 +2339,8 @@ public class BinaryMarshallerSelfTest extends GridCommonAbstractTest {
// Check direct field access.
assertNull(objBin.field(fieldName));
- assertEquals(1, objBin.field(fieldNameA));
- assertEquals(2, objBin.field(fieldNameB));
+ assertEquals(Integer.valueOf(1), objBin.field(fieldNameA));
+ assertEquals(Integer.valueOf(2), objBin.field(fieldNameB));
// Check metadata.
BinaryType type = objBin.type();
@@ -2363,8 +2363,8 @@ public class BinaryMarshallerSelfTest extends GridCommonAbstractTest {
assert fieldB.exists(objBin);
assertNull(field.value(objBin));
- assertEquals(1, fieldA.value(objBin));
- assertEquals(2, fieldB.value(objBin));
+ assertEquals(Integer.valueOf(1), fieldA.value(objBin));
+ assertEquals(Integer.valueOf(2), fieldB.value(objBin));
// Check object deserialization.
DuplicateFieldsB deserialized = objBin.deserialize();
[10/19] ignite git commit: Merge branch 'ignite-2175' into ignite-1.5
Posted by nt...@apache.org.
Merge branch 'ignite-2175' into ignite-1.5
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/29c47784
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/29c47784
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/29c47784
Branch: refs/heads/ignite-gg-10837
Commit: 29c47784eb6d07c20d4d72000522668dd381c175
Parents: 9db05f5 60eec11
Author: Anton Vinogradov <av...@apache.org>
Authored: Wed Dec 23 17:32:28 2015 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Wed Dec 23 17:32:28 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/processors/query/GridQueryProcessor.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
[09/19] ignite git commit: Merge remote-tracking branch
'origin/ignite-1.5' into ignite-1.5
Posted by nt...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9db05f5f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9db05f5f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9db05f5f
Branch: refs/heads/ignite-gg-10837
Commit: 9db05f5f6c64d3b6473d65a501a31287a6c7942c
Parents: 53ec76f 16a9e6d
Author: sboikov <sb...@gridgain.com>
Authored: Wed Dec 23 15:07:22 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Dec 23 15:07:22 2015 +0300
----------------------------------------------------------------------
.../query/GridCacheDistributedQueryManager.java | 6 +-
...iteCacheScanPredicateDeploymentSelfTest.java | 114 +++++++++++++++++++
.../testsuites/IgniteCacheTestSuite3.java | 2 +
.../p2p/CacheDeploymentAlwaysTruePredicate.java | 29 +++++
4 files changed, 149 insertions(+), 2 deletions(-)
----------------------------------------------------------------------