You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2015/05/13 20:24:20 UTC
[01/50] [abbrv] incubator-ignite git commit: Merge remote-tracking
branch 'origin/ignite-157' into ignite-157
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-836_2 9126679c3 -> 8c105ec23
Merge remote-tracking branch 'origin/ignite-157' into ignite-157
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/41d1a143
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/41d1a143
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/41d1a143
Branch: refs/heads/ignite-836_2
Commit: 41d1a143548b4ab09aa1b97bca0d7cdf9f3e4a59
Parents: b3dcbf1 fcb45bb
Author: sboikov <sb...@gridgain.com>
Authored: Fri May 8 11:33:51 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri May 8 11:33:51 2015 +0300
----------------------------------------------------------------------
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
modules/clients/pom.xml | 2 +-
modules/cloud/pom.xml | 2 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 2 +-
.../testsuites/IgniteCacheRestartTestSuite.java | 4 ++--
modules/extdata/p2p/pom.xml | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 2 +-
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/rest-http/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/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/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 +-
pom.xml | 14 ++++----------
32 files changed, 36 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
[40/50] [abbrv] incubator-ignite git commit: # ignite-sprint-5 added
test
Posted by se...@apache.org.
# ignite-sprint-5 added test
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6395b434
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6395b434
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6395b434
Branch: refs/heads/ignite-836_2
Commit: 6395b434e37b93f025c7b81802a77aa4f1aebf4c
Parents: f6012f1
Author: sboikov <sb...@gridgain.com>
Authored: Tue May 12 16:02:45 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue May 12 16:02:45 2015 +0300
----------------------------------------------------------------------
.../cache/GridCacheOffheapIndexGetSelfTest.java | 111 +++++++++++++++++++
.../IgniteCacheWithIndexingTestSuite.java | 2 +
2 files changed, 113 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6395b434/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
new file mode 100644
index 0000000..4e40040
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import org.apache.ignite.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.spi.swapspace.file.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
+import static org.apache.ignite.configuration.DeploymentMode.*;
+
+/**
+ * Tests off heap storage when both offheaped and swapped entries exists.
+ */
+public class GridCacheOffheapIndexGetSelfTest extends GridCommonAbstractTest {
+ /** */
+ private static final long OFFHEAP_MEM = 10L * 1024L;
+
+ /** */
+ private final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+ disco.setIpFinder(ipFinder);
+
+ cfg.setDiscoverySpi(disco);
+
+ cfg.setNetworkTimeout(2000);
+
+ cfg.setSwapSpaceSpi(new FileSwapSpaceSpi());
+
+ CacheConfiguration cacheCfg = defaultCacheConfiguration();
+
+ cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
+ cacheCfg.setSwapEnabled(true);
+ cacheCfg.setCacheMode(PARTITIONED);
+ cacheCfg.setBackups(1);
+ cacheCfg.setOffHeapMaxMemory(OFFHEAP_MEM);
+ cacheCfg.setEvictSynchronized(true);
+ cacheCfg.setEvictSynchronizedKeyBufferSize(1);
+ cacheCfg.setAtomicityMode(TRANSACTIONAL);
+ cacheCfg.setMemoryMode(OFFHEAP_TIERED);
+ cacheCfg.setEvictionPolicy(null);
+ cacheCfg.setOffHeapMaxMemory(OFFHEAP_MEM);
+ cacheCfg.setIndexedTypes(Long.class, Long.class);
+
+ cfg.setCacheConfiguration(cacheCfg);
+
+ cfg.setDeploymentMode(SHARED);
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTestsStarted() throws Exception {
+ startGrids(2);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTestsStopped() throws Exception {
+ stopAllGrids();
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ grid(0).cache(null).clear();
+ }
+
+ /**
+ * Tests behavior on offheaped entries.
+ *
+ * @throws Exception If failed.
+ */
+ public void testGet() throws Exception {
+ fail("https://issues.apache.org/jira/browse/IGNITE-873");
+
+ IgniteCache<Long, Long> cache = grid(0).cache(null);
+
+ for (long i = 0; i < 100; i++)
+ cache.put(i, i);
+
+ for (long i = 0; i < 100; i++)
+ assertEquals((Long)i, cache.get(i));
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6395b434/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java
index a2ccc82..ae45120 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java
@@ -46,6 +46,8 @@ public class IgniteCacheWithIndexingTestSuite extends TestSuite {
suite.addTestSuite(CacheTtlOnheapAtomicLocalSelfTest.class);
suite.addTestSuite(CacheTtlOnheapAtomicPartitionedSelfTest.class);
+ suite.addTestSuite(GridCacheOffheapIndexGetSelfTest.class);
+
suite.addTestSuite(CacheConfigurationP2PTest.class);
return suite;
[38/50] [abbrv] incubator-ignite git commit: KEYS file is optional
since this moment
Posted by se...@apache.org.
KEYS file is optional since this moment
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b95d2ae6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b95d2ae6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b95d2ae6
Branch: refs/heads/ignite-836_2
Commit: b95d2ae6c40faa45a68f2566df8e4ebb8b25d4fe
Parents: a4c9653
Author: avinogradov <av...@gridgain.com>
Authored: Tue May 12 15:32:51 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Tue May 12 15:32:51 2015 +0300
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b95d2ae6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 451812a..0643227 100644
--- a/pom.xml
+++ b/pom.xml
@@ -573,7 +573,7 @@
<include name="**/*" />
</fileset>
</copy>
- <copy file="${basedir}/KEYS" todir="${basedir}/target/site" />
+ <copy file="${basedir}/KEYS" todir="${basedir}/target/site" failonerror="false"/>
</target>
</configuration>
</execution>
[43/50] [abbrv] incubator-ignite git commit: Merge remote-tracking
branch 'remotes/origin/ignite-sprint-5' into ignite-709_2
Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-5' into ignite-709_2
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/406e2970
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/406e2970
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/406e2970
Branch: refs/heads/ignite-836_2
Commit: 406e29709065a934a6fde9f9f4043259e65f1503
Parents: a001312 08360c9
Author: sevdokimov <se...@gridgain.com>
Authored: Tue May 12 16:45:48 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Tue May 12 16:45:48 2015 +0300
----------------------------------------------------------------------
assembly/release-base.xml | 4 +-
bin/ignite-schema-import.bat | 2 +-
bin/ignite-schema-import.sh | 2 +-
bin/ignite.bat | 2 +-
bin/ignite.sh | 2 +-
bin/ignitevisorcmd.bat | 2 +-
bin/ignitevisorcmd.sh | 2 +-
bin/include/build-classpath.bat | 46 +++
bin/include/build-classpath.sh | 71 ++++
bin/include/target-classpath.bat | 46 ---
bin/include/target-classpath.sh | 71 ----
.../processors/resource/GridResourceField.java | 11 +
.../processors/resource/GridResourceIoc.java | 387 ++++++-------------
.../processors/resource/GridResourceMethod.java | 13 +
.../resource/GridResourceProcessor.java | 4 +-
.../ignite/internal/util/IgniteUtils.java | 15 +
.../spi/discovery/tcp/TcpDiscoverySpi.java | 24 +-
.../cache/GridCacheOffheapIndexGetSelfTest.java | 111 ++++++
.../IgniteCacheWithIndexingTestSuite.java | 2 +
parent/pom.xml | 2 +
pom.xml | 83 ++--
21 files changed, 458 insertions(+), 444 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/406e2970/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
[10/50] [abbrv] incubator-ignite git commit: # ignite-157
Posted by se...@apache.org.
# ignite-157
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c5481362
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c5481362
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c5481362
Branch: refs/heads/ignite-836_2
Commit: c54813625103ea98591acfb8fe15d5cb4dea7f1c
Parents: 46dda3d
Author: sboikov <sb...@gridgain.com>
Authored: Fri May 8 13:31:41 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri May 8 13:31:41 2015 +0300
----------------------------------------------------------------------
.../transactions/IgniteTxLocalAdapter.java | 2 +-
.../GridCacheAbstractNodeRestartSelfTest.java | 6 +-
.../distributed/IgniteTxGetAfterStopTest.java | 131 +++++++++++++++++++
.../testsuites/IgniteCacheRestartTestSuite.java | 4 +-
4 files changed, 137 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c5481362/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 fc3efba..bd3a4ec 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
@@ -1760,7 +1760,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
}
}
- if (!missed.isEmpty() && (cacheCtx.isReplicated() || cacheCtx.isLocal())) {
+ if (!missed.isEmpty() && cacheCtx.isLocal()) {
return checkMissed(cacheCtx,
retMap,
missed,
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c5481362/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
index 76020b8..7e65f23 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
@@ -105,9 +105,9 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
disco.setIpFinder(ipFinder);
- disco.setSocketTimeout(10_000);
- disco.setAckTimeout(10_000);
- disco.setNetworkTimeout(10_000);
+ disco.setSocketTimeout(30_000);
+ disco.setAckTimeout(30_000);
+ disco.setNetworkTimeout(30_000);
c.setDiscoverySpi(disco);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c5481362/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxGetAfterStopTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxGetAfterStopTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxGetAfterStopTest.java
new file mode 100644
index 0000000..469f513
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxGetAfterStopTest.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.transactions.*;
+import org.jetbrains.annotations.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+
+/**
+ *
+ */
+public class IgniteTxGetAfterStopTest extends IgniteCacheAbstractTest {
+ /** */
+ private CacheMode cacheMode;
+
+ /** */
+ private NearCacheConfiguration nearCfg;
+
+ /** {@inheritDoc} */
+ @Override protected int gridCount() {
+ return 4;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected CacheMode cacheMode() {
+ return cacheMode;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicityMode atomicityMode() {
+ return TRANSACTIONAL;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected NearCacheConfiguration nearConfiguration() {
+ return nearCfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTestsStarted() throws Exception {
+ // No-op.
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ super.afterTest();
+
+ stopAllGrids();
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testReplicated() throws Exception {
+ getAfterStop(REPLICATED, null);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testPartitioned() throws Exception {
+ getAfterStop(PARTITIONED, new NearCacheConfiguration());
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testPartitionedNearDisabled() throws Exception {
+ getAfterStop(PARTITIONED, null);
+ }
+
+ /**
+ * @param cacheMode Cache mode.
+ * @param nearCfg Near cache configuration.
+ * @throws Exception If failed.
+ */
+ private void getAfterStop(CacheMode cacheMode, @Nullable NearCacheConfiguration nearCfg) throws Exception {
+ this.cacheMode = cacheMode;
+ this.nearCfg = nearCfg;
+
+ startGrids();
+
+ IgniteCache<Integer, Integer> cache0 = jcache(0);
+ IgniteCache<Integer, Integer> cache1 = jcache(1);
+
+ Integer key0 = primaryKey(cache0);
+ Integer key1 = primaryKey(cache1);
+
+ try (Transaction tx = ignite(0).transactions().txStart()) {
+ log.info("Put: " + key0);
+
+ cache0.put(key0, key0);
+
+ log.info("Stop node.");
+
+ stopGrid(3);
+
+ log.info("Get: " + key1);
+
+ cache0.get(key1);
+
+ log.info("Commit.");
+
+ tx.commit();
+ }
+
+ assertEquals(key0, cache0.get(key0));
+ assertNull(cache1.get(key1));
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c5481362/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
index e5372e8..983d447 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
@@ -21,6 +21,7 @@ import junit.framework.*;
import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.processors.cache.distributed.*;
import org.apache.ignite.internal.processors.cache.distributed.near.*;
+import org.apache.ignite.internal.processors.cache.distributed.replicated.*;
/**
* In-Memory Data Grid stability test suite on changing topology.
@@ -37,8 +38,7 @@ public class IgniteCacheRestartTestSuite extends TestSuite {
suite.addTestSuite(GridCachePartitionedNodeRestartTest.class);
suite.addTestSuite(GridCachePartitionedOptimisticTxNodeRestartTest.class);
- // TODO IGNITE-157.
- // suite.addTestSuite(GridCacheReplicatedNodeRestartSelfTest.class);
+ suite.addTestSuite(GridCacheReplicatedNodeRestartSelfTest.class);
suite.addTestSuite(IgniteCacheAtomicNodeRestartTest.class);
// suite.addTestSuite(IgniteCacheAtomicReplicatedNodeRestartSelfTest.class); // TODO IGNITE-747
[23/50] [abbrv] incubator-ignite git commit: i-478 review
Posted by se...@apache.org.
i-478 review
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/995b6089
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/995b6089
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/995b6089
Branch: refs/heads/ignite-836_2
Commit: 995b60898067b7dd95f33f598fadd579917473d0
Parents: d081046
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Fri May 8 16:40:31 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Fri May 8 16:40:31 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/processors/resource/GridResourceIoc.java | 2 --
.../ignite/internal/processors/resource/GridResourceProcessor.java | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/995b6089/modules/core/src/main/java/org/apache/ignite/internal/processors/resource/GridResourceIoc.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/resource/GridResourceIoc.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/resource/GridResourceIoc.java
index 301e5e5..c2ef116 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/resource/GridResourceIoc.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/resource/GridResourceIoc.java
@@ -91,7 +91,6 @@ class GridResourceIoc {
/**
* @param cls Class.
*/
- @NotNull
private ClassDescriptor descriptor(@Nullable GridDeployment dep, Class<?> cls) {
ClassDescriptor res = clsDescs.get(cls);
@@ -319,7 +318,6 @@ class GridResourceIoc {
for (Map.Entry<Class<? extends Annotation>, T2<List<GridResourceField>, List<GridResourceMethod>>> entry
: annMap.entrySet()) {
-
GridResourceField[] fields = GridResourceField.toArray(entry.getValue().get1());
GridResourceMethod[] mtds = GridResourceMethod.toArray(entry.getValue().get2());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/995b6089/modules/core/src/main/java/org/apache/ignite/internal/processors/resource/GridResourceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/resource/GridResourceProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/resource/GridResourceProcessor.java
index eae5c4b..cb4149b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/resource/GridResourceProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/resource/GridResourceProcessor.java
@@ -147,6 +147,8 @@ public class GridResourceProcessor extends GridProcessorAdapter {
Method mtd = rsrcMtd.getMethod();
try {
+ // No need to call mtd.setAccessible(true);
+ // It has been called in GridResourceMethod constructor.
mtd.invoke(target);
}
catch (IllegalArgumentException | InvocationTargetException | IllegalAccessException e) {
[28/50] [abbrv] incubator-ignite git commit: # IGNITE-777
(ConcurrentModificationException in TcpDiscoverySpi): Clone message before
send to client.
Posted by se...@apache.org.
# IGNITE-777 (ConcurrentModificationException in TcpDiscoverySpi): Clone message before send to client.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0dc908bd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0dc908bd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0dc908bd
Branch: refs/heads/ignite-836_2
Commit: 0dc908bd3d781c30b809d3ba525208d583d8c35d
Parents: c9cd92e
Author: sevdokimov <se...@gridgain.com>
Authored: Wed Apr 22 13:29:40 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Fri May 8 17:58:11 2015 +0300
----------------------------------------------------------------------
.../spi/discovery/tcp/TcpDiscoverySpi.java | 24 ++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0dc908bd/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index 46d90b5..3afcd0f 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -2690,8 +2690,28 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
msgLsnr.apply(msg);
if (redirectToClients(msg)) {
- for (ClientMessageWorker clientMsgWorker : clientMsgWorkers.values())
- clientMsgWorker.addMessage(msg);
+ byte[] marshalledMsg = null;
+
+ for (ClientMessageWorker clientMsgWorker : clientMsgWorkers.values()) {
+ // Send a clone to client to avoid ConcurrentModificationException
+ TcpDiscoveryAbstractMessage msgClone;
+
+ try {
+ if (marshalledMsg == null)
+ marshalledMsg = marsh.marshal(msg);
+
+ msgClone = marsh.unmarshal(marshalledMsg, null);
+
+ clientMsgWorker.addMessage(msgClone);
+ }
+ catch (IgniteCheckedException e) {
+ log.error("Failed to marshal message: " + msg, e);
+
+ msgClone = msg;
+ }
+
+ clientMsgWorker.addMessage(msgClone);
+ }
}
Collection<TcpDiscoveryNode> failedNodes;
[35/50] [abbrv] incubator-ignite git commit: # IGNITE-709 Improve
ping from client to server.
Posted by se...@apache.org.
# IGNITE-709 Improve ping from client to server.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/505a03e9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/505a03e9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/505a03e9
Branch: refs/heads/ignite-836_2
Commit: 505a03e92db2747ed5beb07eb47cce17271d387c
Parents: c05e368
Author: sevdokimov <se...@gridgain.com>
Authored: Tue May 12 13:43:26 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Tue May 12 13:43:26 2015 +0300
----------------------------------------------------------------------
.../discovery/tcp/TcpClientDiscoverySpi.java | 56 +++++++++++++++-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 62 ++++++++++++++++--
.../messages/TcpDiscoveryClientPingRequest.java | 56 ++++++++++++++++
.../TcpDiscoveryClientPingResponse.java | 67 ++++++++++++++++++++
.../tcp/TcpClientDiscoverySpiSelfTest.java | 30 +++++++++
5 files changed, 264 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/505a03e9/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
index 6752bf5..d55d1c5 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
@@ -20,6 +20,7 @@ package org.apache.ignite.spi.discovery.tcp;
import org.apache.ignite.*;
import org.apache.ignite.cache.*;
import org.apache.ignite.cluster.*;
+import org.apache.ignite.internal.util.future.*;
import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.lang.*;
@@ -75,6 +76,9 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
/** Remote nodes. */
private final ConcurrentMap<UUID, TcpDiscoveryNode> rmtNodes = new ConcurrentHashMap8<>();
+ /** Remote nodes. */
+ private final ConcurrentMap<UUID, GridFutureAdapter<Boolean>> pingFuts = new ConcurrentHashMap8<>();
+
/** Socket writer. */
private SocketWriter sockWriter;
@@ -316,6 +320,9 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
}
}
+ for (GridFutureAdapter<Boolean> fut : pingFuts.values())
+ fut.onDone(false);
+
rmtNodes.clear();
U.interrupt(sockTimeoutWorker);
@@ -359,15 +366,46 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
}
/** {@inheritDoc} */
- @Override public boolean pingNode(UUID nodeId) {
- assert nodeId != null;
+ @Override public boolean pingNode(@NotNull final UUID nodeId) {
+ if (getSpiContext().isStopping())
+ return false;
if (nodeId.equals(getLocalNodeId()))
return true;
TcpDiscoveryNode node = rmtNodes.get(nodeId);
- return node != null && node.visible();
+ if (node == null || !node.visible())
+ return false;
+
+ GridFutureAdapter<Boolean> fut = pingFuts.get(nodeId);
+
+ if (fut == null) {
+ fut = new GridFutureAdapter<>();
+
+ GridFutureAdapter<Boolean> oldFut = pingFuts.putIfAbsent(nodeId, fut);
+
+ if (oldFut != null)
+ fut = oldFut;
+ else
+ sockWriter.sendMessage(new TcpDiscoveryClientPingRequest(getLocalNodeId(), nodeId));
+ }
+
+ final GridFutureAdapter<Boolean> finalFut = fut;
+
+ timer.schedule(new TimerTask() {
+ @Override public void run() {
+ if (pingFuts.remove(nodeId, finalFut))
+ finalFut.onDone(false);
+ }
+ }, netTimeout);
+
+ try {
+ return fut.get();
+ }
+ catch (IgniteCheckedException e) {
+ throw new IgniteSpiException(e); // Should newer occur
+ }
}
/** {@inheritDoc} */
@@ -1069,6 +1107,8 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
processClientReconnectMessage((TcpDiscoveryClientReconnectMessage)msg);
else if (msg instanceof TcpDiscoveryCustomEventMessage)
processCustomMessage((TcpDiscoveryCustomEventMessage)msg);
+ else if (msg instanceof TcpDiscoveryClientPingResponse)
+ processClientPingResponse((TcpDiscoveryClientPingResponse)msg);
stats.onMessageProcessingFinished(msg);
}
@@ -1366,6 +1406,16 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
}
/**
+ * @param msg Message.
+ */
+ private void processClientPingResponse(TcpDiscoveryClientPingResponse msg) {
+ GridFutureAdapter<Boolean> fut = pingFuts.remove(msg.nodeToPing());
+
+ if (fut != null)
+ fut.onDone(msg.result());
+ }
+
+ /**
* @param nodeId Node ID.
* @param metrics Metrics.
* @param cacheMetrics Cache metrics.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/505a03e9/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index 3624791..e00f798 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -203,6 +203,10 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
@SuppressWarnings({"FieldAccessedSynchronizedAndUnsynchronized"})
private int reconCnt = DFLT_RECONNECT_CNT;
+ /** */
+ private final ThreadPoolExecutor utilityPool = new ThreadPoolExecutor(0, 10, 2000, TimeUnit.MILLISECONDS,
+ new LinkedBlockingQueue<Runnable>());
+
/** Nodes ring. */
@GridToStringExclude
private final TcpDiscoveryNodesRing ring = new TcpDiscoveryNodesRing();
@@ -285,6 +289,10 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
private final CopyOnWriteArrayList<IgniteInClosure<TcpDiscoveryAbstractMessage>> sendMsgLsnrs =
new CopyOnWriteArrayList<>();
+ /** */
+ private final CopyOnWriteArrayList<IgniteInClosure<Socket>> incomeConnLsnrs =
+ new CopyOnWriteArrayList<>();
+
/** {@inheritDoc} */
@IgniteInstanceResource
@Override public void injectResources(Ignite ignite) {
@@ -2034,15 +2042,29 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
/**
* <strong>FOR TEST ONLY!!!</strong>
*/
- public void addSendMessageListener(IgniteInClosure<TcpDiscoveryAbstractMessage> msg) {
- sendMsgLsnrs.add(msg);
+ public void addSendMessageListener(IgniteInClosure<TcpDiscoveryAbstractMessage> lsnr) {
+ sendMsgLsnrs.add(lsnr);
+ }
+
+ /**
+ * <strong>FOR TEST ONLY!!!</strong>
+ */
+ public void removeSendMessageListener(IgniteInClosure<TcpDiscoveryAbstractMessage> lsnr) {
+ sendMsgLsnrs.remove(lsnr);
+ }
+
+ /**
+ * <strong>FOR TEST ONLY!!!</strong>
+ */
+ public void addIncomeConnectionListener(IgniteInClosure<Socket> lsnr) {
+ incomeConnLsnrs.add(lsnr);
}
/**
* <strong>FOR TEST ONLY!!!</strong>
*/
- public void removeSendMessageListener(IgniteInClosure<TcpDiscoveryAbstractMessage> msg) {
- sendMsgLsnrs.remove(msg);
+ public void removeIncomeConnectionListener(IgniteInClosure<Socket> lsnr) {
+ incomeConnLsnrs.remove(lsnr);
}
/**
@@ -2634,6 +2656,9 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
else if (msg instanceof TcpDiscoveryCustomEventMessage)
processCustomMessage((TcpDiscoveryCustomEventMessage)msg);
+ else if (msg instanceof TcpDiscoveryClientPingRequest)
+ processClientPingRequest((TcpDiscoveryClientPingRequest)msg);
+
else
assert false : "Unknown message type: " + msg.getClass().getSimpleName();
@@ -4448,6 +4473,32 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
/**
* @param msg Message.
*/
+ private void processClientPingRequest(final TcpDiscoveryClientPingRequest msg) {
+ utilityPool.execute(new Runnable() {
+ @Override public void run() {
+ boolean res = pingNode(msg.nodeToPing());
+
+ final ClientMessageWorker worker = clientMsgWorkers.get(msg.creatorNodeId());
+
+ if (worker == null) {
+ if (log.isDebugEnabled())
+ log.debug("Ping request from dead client node, will be skipped: " + msg.creatorNodeId());
+ }
+ else {
+ TcpDiscoveryClientPingResponse pingRes = new TcpDiscoveryClientPingResponse(
+ getLocalNodeId(), msg.nodeToPing(), res);
+
+ pingRes.verify(getLocalNodeId());
+
+ worker.addMessage(pingRes);
+ }
+ }
+ });
+ }
+
+ /**
+ * @param msg Message.
+ */
private void processCustomMessage(TcpDiscoveryCustomEventMessage msg) {
if (isLocalNodeCoordinator()) {
if (msg.verified()) {
@@ -4643,6 +4694,9 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
sock.setSoTimeout((int)netTimeout);
+ for (IgniteInClosure<Socket> connLsnr : incomeConnLsnrs)
+ connLsnr.apply(sock);
+
in = new BufferedInputStream(sock.getInputStream());
byte[] buf = new byte[4];
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/505a03e9/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryClientPingRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryClientPingRequest.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryClientPingRequest.java
new file mode 100644
index 0000000..f9f164d
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryClientPingRequest.java
@@ -0,0 +1,56 @@
+/*
+ * 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.spi.discovery.tcp.messages;
+
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.jetbrains.annotations.*;
+
+import java.util.*;
+
+/**
+ * Ping request.
+ */
+public class TcpDiscoveryClientPingRequest extends TcpDiscoveryAbstractMessage {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /** Pinged client node ID. */
+ private final UUID nodeToPing;
+
+ /**
+ * @param creatorNodeId Creator node ID.
+ * @param nodeToPing Pinged client node ID.
+ */
+ public TcpDiscoveryClientPingRequest(UUID creatorNodeId, @Nullable UUID nodeToPing) {
+ super(creatorNodeId);
+
+ this.nodeToPing = nodeToPing;
+ }
+
+ /**
+ * @return Pinged client node ID.
+ */
+ @Nullable public UUID nodeToPing() {
+ return nodeToPing;
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(TcpDiscoveryClientPingRequest.class, this, "super", super.toString());
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/505a03e9/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryClientPingResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryClientPingResponse.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryClientPingResponse.java
new file mode 100644
index 0000000..26a2b00
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryClientPingResponse.java
@@ -0,0 +1,67 @@
+/*
+ * 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.spi.discovery.tcp.messages;
+
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.jetbrains.annotations.*;
+
+import java.util.*;
+
+/**
+ * Ping request.
+ */
+public class TcpDiscoveryClientPingResponse extends TcpDiscoveryAbstractMessage {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /** Pinged client node ID. */
+ private final UUID nodeToPing;
+
+ /** */
+ private final boolean res;
+
+ /**
+ * @param creatorNodeId Creator node ID.
+ * @param nodeToPing Pinged client node ID.
+ */
+ public TcpDiscoveryClientPingResponse(UUID creatorNodeId, @Nullable UUID nodeToPing, boolean res) {
+ super(creatorNodeId);
+
+ this.nodeToPing = nodeToPing;
+ this.res = res;
+ }
+
+ /**
+ * @return Pinged client node ID.
+ */
+ @Nullable public UUID nodeToPing() {
+ return nodeToPing;
+ }
+
+ /**
+ * @return Result of ping.
+ */
+ public boolean result() {
+ return res;
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(TcpDiscoveryClientPingResponse.class, this, "super", super.toString());
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/505a03e9/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
index a06bfd9..49ef4aa 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
@@ -353,6 +353,36 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ public void testPingFailedNodeFromClient() throws Exception {
+ startServerNodes(2);
+ startClientNodes(1);
+
+ Ignite srv0 = G.ignite("server-0");
+ Ignite srv1 = G.ignite("server-1");
+ Ignite client = G.ignite("client-0");
+
+ final CountDownLatch latch = new CountDownLatch(1);
+
+ ((TcpDiscoverySpi)srv1.configuration().getDiscoverySpi()).addIncomeConnectionListener(new IgniteInClosure<Socket>() {
+ @Override public void apply(Socket sock) {
+ try {
+ latch.await();
+ }
+ catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ });
+
+ assert ((IgniteEx)client).context().discovery().pingNode(srv0.cluster().localNode().id());
+ assert !((IgniteEx)client).context().discovery().pingNode(srv1.cluster().localNode().id());
+
+ latch.countDown();
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
public void testClientReconnectOnRouterFail() throws Exception {
clientsPerSrv = 1;
[19/50] [abbrv] incubator-ignite git commit: Merge remote-tracking
branch 'remotes/origin/ignite-sprint-5' into ignite-157
Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-5' into ignite-157
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d245dc81
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d245dc81
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d245dc81
Branch: refs/heads/ignite-836_2
Commit: d245dc818d18f9474854cd9550e60efc87732ce0
Parents: f9c5fbe 2361640
Author: sboikov <sb...@gridgain.com>
Authored: Fri May 8 15:21:01 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri May 8 15:21:01 2015 +0300
----------------------------------------------------------------------
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
modules/clients/pom.xml | 2 +-
modules/cloud/pom.xml | 2 +-
.../TcpDiscoveryCloudIpFinderSelfTest.java | 2 -
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 2 +-
.../processors/cache/GridCacheAdapter.java | 26 ++-
.../cache/GridCacheEvictionManager.java | 2 +-
.../processors/cache/GridCacheProxyImpl.java | 24 --
.../processors/cache/GridCacheSwapManager.java | 215 +++++++++++++-----
.../processors/cache/IgniteInternalCache.java | 27 ---
.../colocated/GridDhtColocatedLockFuture.java | 2 +
.../distributed/near/GridNearCacheAdapter.java | 10 -
.../processors/cache/local/GridLocalCache.java | 8 +-
.../local/atomic/GridLocalAtomicCache.java | 27 ++-
.../cache/query/GridCacheQueryManager.java | 21 +-
.../transactions/IgniteTxLocalAdapter.java | 12 +-
.../processors/igfs/IgfsDeleteWorker.java | 4 +
.../offheap/GridOffHeapProcessor.java | 17 ++
.../util/offheap/GridOffHeapPartitionedMap.java | 9 +
.../unsafe/GridUnsafePartitionedMap.java | 155 ++++++-------
.../core/src/main/resources/ignite.properties | 2 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 227 +++++++++++--------
.../cache/GridCacheAbstractSelfTest.java | 4 +-
.../cache/OffHeapTieredTransactionSelfTest.java | 127 +++++++++++
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 43 ++++
...ionedNearDisabledOffHeapFullApiSelfTest.java | 8 +-
...DisabledOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...abledOffHeapTieredAtomicFullApiSelfTest.java | 56 +++++
...earDisabledOffHeapTieredFullApiSelfTest.java | 33 +++
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +++
...CacheAtomicOffHeapTieredFullApiSelfTest.java | 32 +++
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +++
...yWriteOrderOffHeapTieredFullApiSelfTest.java | 33 +++
...erOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +++
...achePartitionedMultiNodeFullApiSelfTest.java | 15 +-
...dCachePartitionedOffHeapFullApiSelfTest.java | 8 +-
...titionedOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...PartitionedOffHeapTieredFullApiSelfTest.java | 32 +++
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 72 ++++++
...idCacheReplicatedOffHeapFullApiSelfTest.java | 8 +-
...plicatedOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...eReplicatedOffHeapTieredFullApiSelfTest.java | 33 +++
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +++
...LocalAtomicOffHeapTieredFullApiSelfTest.java | 32 +++
.../GridCacheLocalOffHeapFullApiSelfTest.java | 6 +-
...dCacheLocalOffHeapTieredFullApiSelfTest.java | 32 +++
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
.../IgniteCacheFullApiSelfTestSuite.java | 18 ++
.../testsuites/IgniteCacheTestSuite3.java | 3 -
modules/extdata/p2p/pom.xml | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 2 +-
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
...eQueryMultiThreadedOffHeapTiredSelfTest.java | 37 +++
.../IgniteCacheQueryMultiThreadedSelfTest.java | 29 ++-
.../IgniteCacheQuerySelfTestSuite.java | 1 +
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/rest-http/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/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/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 +-
pom.xml | 6 +-
79 files changed, 1269 insertions(+), 406 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d245dc81/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d245dc81/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d245dc81/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
----------------------------------------------------------------------
[41/50] [abbrv] incubator-ignite git commit: Merge remote-tracking
branch 'origin/ignite-sprint-5' into ignite-sprint-5
Posted by se...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-5' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/08360c99
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/08360c99
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/08360c99
Branch: refs/heads/ignite-836_2
Commit: 08360c999a73173aceef8eb7500d656ea5b386c0
Parents: 6395b43 c235711
Author: sboikov <sb...@gridgain.com>
Authored: Tue May 12 16:03:05 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue May 12 16:03:05 2015 +0300
----------------------------------------------------------------------
assembly/release-base.xml | 4 +-
bin/ignite-schema-import.bat | 2 +-
bin/ignite-schema-import.sh | 2 +-
bin/ignite.bat | 2 +-
bin/ignite.sh | 2 +-
bin/ignitevisorcmd.bat | 2 +-
bin/ignitevisorcmd.sh | 2 +-
bin/include/build-classpath.bat | 46 +++++++++++++++++++++++
bin/include/build-classpath.sh | 71 +++++++++++++++++++++++++++++++++++
bin/include/target-classpath.bat | 46 -----------------------
bin/include/target-classpath.sh | 71 -----------------------------------
pom.xml | 50 ++++++++++++------------
12 files changed, 152 insertions(+), 148 deletions(-)
----------------------------------------------------------------------
[29/50] [abbrv] incubator-ignite git commit: Merge remote-tracking
branch 'remotes/origin/ignite-478' into ignite-sprint-5
Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-478' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f4a3591b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f4a3591b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f4a3591b
Branch: refs/heads/ignite-836_2
Commit: f4a3591b35b707aa1cf2643d4d9db99a5bd0afc8
Parents: f059be6 995b608
Author: sevdokimov <se...@gridgain.com>
Authored: Fri May 8 18:01:46 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Fri May 8 18:01:46 2015 +0300
----------------------------------------------------------------------
.../processors/resource/GridResourceField.java | 11 +
.../processors/resource/GridResourceIoc.java | 387 ++++++-------------
.../processors/resource/GridResourceMethod.java | 13 +
.../resource/GridResourceProcessor.java | 4 +-
.../ignite/internal/util/IgniteUtils.java | 15 +
5 files changed, 169 insertions(+), 261 deletions(-)
----------------------------------------------------------------------
[27/50] [abbrv] incubator-ignite git commit: # IGNITE-777 Review:
Replace log.error() with U.error()
Posted by se...@apache.org.
# IGNITE-777 Review: Replace log.error() with U.error()
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f059be62
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f059be62
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f059be62
Branch: refs/heads/ignite-836_2
Commit: f059be626b0a66e81b5ce3961d53a20d89526bc8
Parents: 0dc908b
Author: sevdokimov <se...@gridgain.com>
Authored: Fri May 8 17:57:00 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Fri May 8 17:58:11 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f059be62/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index 3afcd0f..0ebb6cd 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -2705,7 +2705,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
clientMsgWorker.addMessage(msgClone);
}
catch (IgniteCheckedException e) {
- log.error("Failed to marshal message: " + msg, e);
+ U.error(log, "Failed to marshal message: " + msg, e);
msgClone = msg;
}
[02/50] [abbrv] incubator-ignite git commit: sprint-4 -> sprint-5
merge fix
Posted by se...@apache.org.
sprint-4 -> sprint-5 merge fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e8a38e04
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e8a38e04
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e8a38e04
Branch: refs/heads/ignite-836_2
Commit: e8a38e04e9ff6fca30953d72bd657889c1c17456
Parents: 17bf271
Author: avinogradov <av...@gridgain.com>
Authored: Fri May 8 11:58:48 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri May 8 11:58:48 2015 +0300
----------------------------------------------------------------------
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e8a38e04/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 86b77fa..c445fd3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -508,8 +508,8 @@
<configuration>
<failOnError>false</failOnError>
<target>
- <attachartifact file="${basedir}/target/bin/ignite-fabric-${project.version}-incubating.zip" classifier="fabric" type="zip" />
- <attachartifact file="${basedir}/target/bin/ignite-hadoop-${project.version}-incubating.zip" classifier="hadoop" type="zip" />
+ <attachartifact file="${basedir}/target/bin/ignite-fabric-${project.version}.zip" classifier="fabric" type="zip" />
+ <attachartifact file="${basedir}/target/bin/ignite-hadoop-${project.version}.zip" classifier="hadoop" type="zip" />
</target>
</configuration>
</execution>
[47/50] [abbrv] incubator-ignite git commit: # ignite-sprint-5 minor
test change
Posted by se...@apache.org.
# ignite-sprint-5 minor test change
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5f8925be
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5f8925be
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5f8925be
Branch: refs/heads/ignite-836_2
Commit: 5f8925be6d6e1360ff56ff3c1dfff49811caef82
Parents: bbc21a6
Author: sboikov <sb...@gridgain.com>
Authored: Wed May 13 12:38:49 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed May 13 12:38:49 2015 +0300
----------------------------------------------------------------------
.../GridCachePartitionedTxSalvageSelfTest.java | 25 ++++++++++----------
1 file changed, 13 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5f8925be/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
index 5072642..6192f39 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
@@ -18,7 +18,6 @@
package org.apache.ignite.internal.processors.cache.distributed.near;
import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
import org.apache.ignite.cache.affinity.rendezvous.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.*;
@@ -35,6 +34,8 @@ import org.apache.ignite.transactions.*;
import java.util.*;
import static org.apache.ignite.IgniteSystemProperties.*;
+import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.cache.CacheRebalanceMode.*;
import static org.apache.ignite.transactions.TransactionConcurrency.*;
import static org.apache.ignite.transactions.TransactionIsolation.*;
@@ -76,10 +77,10 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes
CacheConfiguration cc = defaultCacheConfiguration();
- cc.setCacheMode(CacheMode.PARTITIONED);
+ cc.setCacheMode(PARTITIONED);
cc.setAffinity(new RendezvousAffinityFunction(false, 18));
cc.setBackups(1);
- cc.setRebalanceMode(CacheRebalanceMode.SYNC);
+ cc.setRebalanceMode(SYNC);
c.setCacheConfiguration(cc);
@@ -109,8 +110,9 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes
/** {@inheritDoc} */
@Override protected void afterTest() throws Exception {
- // Shutwodn the gird.
stopAllGrids();
+
+ System.gc();
}
/**
@@ -145,8 +147,8 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes
* Check whether caches has no transactions after salvage timeout.
*
* @param mode Transaction mode (PESSIMISTIC, OPTIMISTIC).
- * @param prepare Whether to preapre transaction state
- * (i.e. call {@link org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx#prepare()}).
+ * @param prepare Whether to prepare transaction state
+ * (i.e. call {@link IgniteInternalTx#prepare()}).
* @throws Exception If failed.
*/
private void checkSalvageAfterTimeout(TransactionConcurrency mode, boolean prepare) throws Exception {
@@ -164,8 +166,8 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes
* Check whether caches still has all transactions before salvage timeout.
*
* @param mode Transaction mode (PESSIMISTIC, OPTIMISTIC).
- * @param prepare Whether to preapre transaction state
- * (i.e. call {@link org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx#prepare()}).
+ * @param prepare Whether to prepare transaction state
+ * (i.e. call {@link IgniteInternalTx#prepare()}).
* @throws Exception If failed.
*/
private void checkSalvageBeforeTimeout(TransactionConcurrency mode, boolean prepare) throws Exception {
@@ -191,8 +193,8 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes
* Start new transaction on the grid(0) and put some keys to it.
*
* @param mode Transaction mode (PESSIMISTIC, OPTIMISTIC).
- * @param prepare Whether to preapre transaction state
- * (i.e. call {@link org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx#prepare()}).
+ * @param prepare Whether to prepare transaction state
+ * (i.e. call {@link IgniteInternalTx#prepare()}).
* @throws Exception If failed.
*/
private void startTxAndPutKeys(final TransactionConcurrency mode, final boolean prepare) throws Exception {
@@ -210,9 +212,8 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes
for (Integer key : keys)
c.put(key, "val" + key);
- // Unproxy.
if (prepare)
- U.<IgniteInternalTx>field(tx, "tx").prepare();
+ ((TransactionProxyImpl)tx).tx().prepare();
}
catch (IgniteCheckedException e) {
info("Failed to put keys to cache: " + e.getMessage());
[48/50] [abbrv] incubator-ignite git commit: Merge branches
'ignite-709_2' and 'ignite-sprint-5' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-709_2
Posted by se...@apache.org.
Merge branches 'ignite-709_2' and 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-709_2
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ae38a243
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ae38a243
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ae38a243
Branch: refs/heads/ignite-836_2
Commit: ae38a2435113fdec5988978cc3f0899189a220e3
Parents: 406e297 5f8925b
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed May 13 12:54:46 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed May 13 12:54:46 2015 +0300
----------------------------------------------------------------------
bin/include/functions.sh | 2 +-
.../internal/direct/DirectByteBufferStream.java | 4 +-
.../eventstorage/GridEventStorageManager.java | 5 +-
.../processors/cache/GridCacheMvccManager.java | 4 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 32 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 27 +
.../cache/distributed/dht/GridDhtTxMapping.java | 2 +-
.../distributed/dht/GridDhtTxPrepareFuture.java | 81 +-
.../colocated/GridDhtColocatedLockFuture.java | 25 +-
.../colocated/GridDhtDetachedCacheEntry.java | 4 +-
.../distributed/near/GridNearCacheEntry.java | 4 +-
.../distributed/near/GridNearLockFuture.java | 5 -
.../near/GridNearOptimisticTxPrepareFuture.java | 779 +++++++++++++
.../GridNearPessimisticTxPrepareFuture.java | 349 ++++++
.../cache/distributed/near/GridNearTxLocal.java | 84 +-
.../near/GridNearTxPrepareFuture.java | 1050 ------------------
.../near/GridNearTxPrepareFutureAdapter.java | 226 ++++
.../cache/transactions/IgniteInternalTx.java | 4 +-
.../cache/transactions/IgniteTxAdapter.java | 2 +-
.../cache/transactions/IgniteTxHandler.java | 68 +-
.../transactions/IgniteTxLocalAdapter.java | 2 +-
.../cache/transactions/IgniteTxManager.java | 12 +-
.../ignite/internal/util/IgniteUtils.java | 4 +-
.../GridCacheAbstractFailoverSelfTest.java | 8 +-
.../GridCacheAbstractNodeRestartSelfTest.java | 11 +-
.../distributed/IgniteTxGetAfterStopTest.java | 131 +++
...ePrimaryNodeFailureRecoveryAbstractTest.java | 4 +-
...idCacheAtomicReplicatedFailoverSelfTest.java | 6 +
.../GridCachePartitionedTxSalvageSelfTest.java | 25 +-
.../GridCacheReplicatedFailoverSelfTest.java | 6 +
.../GridCacheReplicatedNodeRestartSelfTest.java | 80 ++
.../IgniteCacheFailoverTestSuite.java | 10 +-
.../testsuites/IgniteCacheRestartTestSuite.java | 8 +-
.../testsuites/IgniteCacheTestSuite3.java | 2 +
34 files changed, 1778 insertions(+), 1288 deletions(-)
----------------------------------------------------------------------
[04/50] [abbrv] incubator-ignite git commit: #ignite-286: Make cache
full api test work in OFFHEAP_TIERED mode.
Posted by se...@apache.org.
#ignite-286: Make cache full api test work in OFFHEAP_TIERED mode.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/745cf7f9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/745cf7f9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/745cf7f9
Branch: refs/heads/ignite-836_2
Commit: 745cf7f9bd4ca8e649fa77fdfe4e9e3468ecaaa0
Parents: e8a38e0
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri May 8 12:15:29 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri May 8 12:15:29 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheAdapter.java | 26 ++-
.../cache/GridCacheEvictionManager.java | 2 +-
.../processors/cache/GridCacheProxyImpl.java | 24 --
.../processors/cache/GridCacheSwapManager.java | 215 +++++++++++++-----
.../processors/cache/IgniteInternalCache.java | 27 ---
.../colocated/GridDhtColocatedLockFuture.java | 2 +
.../distributed/near/GridNearCacheAdapter.java | 10 -
.../processors/cache/local/GridLocalCache.java | 8 +-
.../local/atomic/GridLocalAtomicCache.java | 27 ++-
.../cache/query/GridCacheQueryManager.java | 21 +-
.../transactions/IgniteTxLocalAdapter.java | 12 +-
.../offheap/GridOffHeapProcessor.java | 17 ++
.../util/offheap/GridOffHeapPartitionedMap.java | 9 +
.../unsafe/GridUnsafePartitionedMap.java | 155 ++++++-------
.../cache/GridCacheAbstractFullApiSelfTest.java | 227 +++++++++++--------
.../cache/GridCacheAbstractSelfTest.java | 4 +-
.../cache/OffHeapTieredTransactionSelfTest.java | 127 +++++++++++
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 43 ++++
...ionedNearDisabledOffHeapFullApiSelfTest.java | 8 +-
...DisabledOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...abledOffHeapTieredAtomicFullApiSelfTest.java | 56 +++++
...earDisabledOffHeapTieredFullApiSelfTest.java | 33 +++
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +++
...CacheAtomicOffHeapTieredFullApiSelfTest.java | 32 +++
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +++
...yWriteOrderOffHeapTieredFullApiSelfTest.java | 33 +++
...erOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +++
...achePartitionedMultiNodeFullApiSelfTest.java | 15 +-
...dCachePartitionedOffHeapFullApiSelfTest.java | 8 +-
...titionedOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...PartitionedOffHeapTieredFullApiSelfTest.java | 32 +++
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 72 ++++++
...idCacheReplicatedOffHeapFullApiSelfTest.java | 8 +-
...plicatedOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...eReplicatedOffHeapTieredFullApiSelfTest.java | 33 +++
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +++
...LocalAtomicOffHeapTieredFullApiSelfTest.java | 32 +++
.../GridCacheLocalOffHeapFullApiSelfTest.java | 6 +-
...dCacheLocalOffHeapTieredFullApiSelfTest.java | 32 +++
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
.../IgniteCacheFullApiSelfTestSuite.java | 18 ++
...eQueryMultiThreadedOffHeapTiredSelfTest.java | 37 +++
.../IgniteCacheQueryMultiThreadedSelfTest.java | 29 ++-
.../IgniteCacheQuerySelfTestSuite.java | 1 +
44 files changed, 1231 insertions(+), 367 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/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 afddc79..3826bfa 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
@@ -2692,6 +2692,22 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
}
/** {@inheritDoc} */
+ @SuppressWarnings("unchecked")
+ @Override public void removeAll() throws IgniteCheckedException {
+ assert ctx.isLocal();
+
+ for (Iterator<KeyCacheObject> it = ctx.swap().offHeapKeyIterator(true, true, AffinityTopologyVersion.NONE);
+ it.hasNext(); )
+ remove((K)it.next());
+
+ for (Iterator<KeyCacheObject> it = ctx.swap().swapKeyIterator(true, true, AffinityTopologyVersion.NONE);
+ it.hasNext(); )
+ remove((K)it.next());
+
+ removeAll(keySet());
+ }
+
+ /** {@inheritDoc} */
@Override public void removeAll(final Collection<? extends K> keys) throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
@@ -3782,16 +3798,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
}
/** {@inheritDoc} */
- @Override public Iterator<Map.Entry<K, V>> swapIterator() throws IgniteCheckedException {
- return ctx.swap().lazySwapIterator();
- }
-
- /** {@inheritDoc} */
- @Override public Iterator<Map.Entry<K, V>> offHeapIterator() throws IgniteCheckedException {
- return ctx.swap().lazyOffHeapIterator();
- }
-
- /** {@inheritDoc} */
@Override public long offHeapEntriesCount() {
return ctx.swap().offHeapEntriesCount();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
index 9135c16..d565af1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
@@ -751,7 +751,7 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter {
U.error(log, "Failed to evict entry from cache: " + e, ex);
}
- if (memoryMode == OFFHEAP_TIERED) {
+ if (!cctx.isNear() && memoryMode == OFFHEAP_TIERED) {
try {
evict0(cctx.cache(), e, cctx.versions().next(), null, false);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/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 5487944..55d2f84 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
@@ -1390,30 +1390,6 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte
}
/** {@inheritDoc} */
- @Override public Iterator<Map.Entry<K, V>> swapIterator() throws IgniteCheckedException {
- CacheOperationContext prev = gate.enter(opCtx);
-
- try {
- return delegate.swapIterator();
- }
- finally {
- gate.leave(prev);
- }
- }
-
- /** {@inheritDoc} */
- @Override public Iterator<Map.Entry<K, V>> offHeapIterator() throws IgniteCheckedException {
- CacheOperationContext prev = gate.enter(opCtx);
-
- try {
- return delegate.offHeapIterator();
- }
- finally {
- gate.leave(prev);
- }
- }
-
- /** {@inheritDoc} */
@Override public long offHeapEntriesCount() {
CacheOperationContext prev = gate.enter(opCtx);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
index 6444e37..eb82218 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
@@ -1211,10 +1211,10 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
checkIteratorQueue();
if (offHeapEnabled() && !swapEnabled())
- return rawOffHeapIterator();
+ return rawOffHeapIterator(true, true);
if (swapEnabled() && !offHeapEnabled())
- return rawSwapIterator();
+ return rawSwapIterator(true, true);
// Both, swap and off-heap are enabled.
return new GridCloseableIteratorAdapter<Map.Entry<byte[], byte[]>>() {
@@ -1227,7 +1227,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
private Map.Entry<byte[], byte[]> cur;
{
- it = rawOffHeapIterator();
+ it = rawOffHeapIterator(true, true);
advance();
}
@@ -1241,7 +1241,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
if (offheapFlag) {
offheapFlag = false;
- it = rawSwapIterator();
+ it = rawSwapIterator(true, true);
if (!it.hasNext()) {
it.close();
@@ -1313,7 +1313,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
Set<Integer> parts = primary ? cctx.affinity().primaryPartitions(cctx.localNodeId(), topVer) :
cctx.affinity().backupPartitions(cctx.localNodeId(), topVer);
- return new PartitionsKeyIterator(parts) {
+ return new PartitionsAbstractIterator<KeyCacheObject>(parts) {
@Override protected Iterator<KeyCacheObject> partitionIterator(int part)
throws IgniteCheckedException
{
@@ -1338,7 +1338,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
Set<Integer> parts = primary ? cctx.affinity().primaryPartitions(cctx.localNodeId(), topVer) :
cctx.affinity().backupPartitions(cctx.localNodeId(), topVer);
- return new PartitionsKeyIterator(parts) {
+ return new PartitionsAbstractIterator<KeyCacheObject>(parts) {
@Override protected Iterator<KeyCacheObject> partitionIterator(int part)
throws IgniteCheckedException
{
@@ -1554,37 +1554,91 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
/**
* @param c Key/value closure.
+ * @param primary Include primaries.
+ * @param backup Include backups.
* @return Off-heap iterator.
*/
- public <T> GridCloseableIterator<T> rawOffHeapIterator(CX2<T2<Long, Integer>, T2<Long, Integer>, T> c) {
+ public <T> GridCloseableIterator<T> rawOffHeapIterator(final CX2<T2<Long, Integer>, T2<Long, Integer>, T> c,
+ boolean primary,
+ boolean backup)
+ {
assert c != null;
- if (!offheapEnabled)
+ if (!offheapEnabled || (!primary && !backup))
return new GridEmptyCloseableIterator<>();
checkIteratorQueue();
- return offheap.iterator(spaceName, c);
+ if (primary && backup)
+ return offheap.iterator(spaceName, c);
+
+ AffinityTopologyVersion ver = cctx.affinity().affinityTopologyVersion();
+
+ Set<Integer> parts = primary ? cctx.affinity().primaryPartitions(cctx.localNodeId(), ver) :
+ cctx.affinity().backupPartitions(cctx.localNodeId(), ver);
+
+ return new CloseablePartitionsIterator<T, T>(parts) {
+ @Override protected GridCloseableIterator<T> partitionIterator(int part)
+ throws IgniteCheckedException
+ {
+ return offheap.iterator(spaceName, c, part);
+ }
+ };
}
/**
+ * @param primary Include primaries.
+ * @param backup Include backups.
* @return Raw off-heap iterator.
*/
- public GridCloseableIterator<Map.Entry<byte[], byte[]>> rawOffHeapIterator() {
- if (!offheapEnabled)
+ public GridCloseableIterator<Map.Entry<byte[], byte[]>> rawOffHeapIterator(final boolean primary,
+ final boolean backup)
+ {
+ if (!offheapEnabled || (!primary && !backup))
return new GridEmptyCloseableIterator<>();
- return new GridCloseableIteratorAdapter<Map.Entry<byte[], byte[]>>() {
- private GridCloseableIterator<IgniteBiTuple<byte[], byte[]>> it = offheap.iterator(spaceName);
+ if (primary && backup)
+ return new GridCloseableIteratorAdapter<Map.Entry<byte[], byte[]>>() {
+ private GridCloseableIterator<IgniteBiTuple<byte[], byte[]>> it = offheap.iterator(spaceName);
+
+ private Map.Entry<byte[], byte[]> cur;
+
+ @Override protected Map.Entry<byte[], byte[]> onNext() {
+ return cur = it.next();
+ }
+
+ @Override protected boolean onHasNext() {
+ return it.hasNext();
+ }
+
+ @Override protected void onRemove() throws IgniteCheckedException {
+ KeyCacheObject key = cctx.toCacheKeyObject(cur.getKey());
+
+ int part = cctx.affinity().partition(key);
+
+ offheap.removex(spaceName, part, key, key.valueBytes(cctx.cacheObjectContext()));
+ }
+
+ @Override protected void onClose() throws IgniteCheckedException {
+ it.close();
+ }
+ };
+ AffinityTopologyVersion ver = cctx.affinity().affinityTopologyVersion();
+
+ Set<Integer> parts = primary ? cctx.affinity().primaryPartitions(cctx.localNodeId(), ver) :
+ cctx.affinity().backupPartitions(cctx.localNodeId(), ver);
+
+ return new CloseablePartitionsIterator<Map.Entry<byte[], byte[]>, IgniteBiTuple<byte[], byte[]>>(parts) {
private Map.Entry<byte[], byte[]> cur;
@Override protected Map.Entry<byte[], byte[]> onNext() {
- return cur = it.next();
+ return cur = super.onNext();
}
- @Override protected boolean onHasNext() {
- return it.hasNext();
+ @Override protected GridCloseableIterator<IgniteBiTuple<byte[], byte[]>> partitionIterator(int part)
+ throws IgniteCheckedException {
+ return offheap.iterator(spaceName, part);
}
@Override protected void onRemove() throws IgniteCheckedException {
@@ -1594,10 +1648,6 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
offheap.removex(spaceName, part, key, key.valueBytes(cctx.cacheObjectContext()));
}
-
- @Override protected void onClose() throws IgniteCheckedException {
- it.close();
- }
};
}
@@ -1621,15 +1671,33 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
/**
* @return Raw off-heap iterator.
+ * @param primary Include primaries.
+ * @param backup Include backups.
* @throws IgniteCheckedException If failed.
*/
- public GridCloseableIterator<Map.Entry<byte[], byte[]>> rawSwapIterator() throws IgniteCheckedException {
- if (!swapEnabled)
+ public GridCloseableIterator<Map.Entry<byte[], byte[]>> rawSwapIterator(boolean primary, boolean backup)
+ throws IgniteCheckedException
+ {
+ if (!swapEnabled || (!primary && !backup))
return new GridEmptyCloseableIterator<>();
checkIteratorQueue();
- return swapMgr.rawIterator(spaceName);
+ if (primary && backup)
+ return swapMgr.rawIterator(spaceName);
+
+ AffinityTopologyVersion ver = cctx.affinity().affinityTopologyVersion();
+
+ Set<Integer> parts = primary ? cctx.affinity().primaryPartitions(cctx.localNodeId(), ver) :
+ cctx.affinity().backupPartitions(cctx.localNodeId(), ver);
+
+ return new CloseablePartitionsIterator<Map.Entry<byte[], byte[]>, Map.Entry<byte[], byte[]>>(parts) {
+ @Override protected GridCloseableIterator<Map.Entry<byte[], byte[]>> partitionIterator(int part)
+ throws IgniteCheckedException
+ {
+ return swapMgr.rawIterator(spaceName, part);
+ }
+ };
}
/**
@@ -1654,7 +1722,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
cctx.affinity().backupPartitions(cctx.localNodeId(), topVer);
return new PartitionsIterator<K, V>(parts) {
- @Override protected GridCloseableIterator<? extends Map.Entry<byte[], byte[]>> partitionIterator(int part)
+ @Override protected GridCloseableIterator<? extends Map.Entry<byte[], byte[]>> nextPartition(int part)
throws IgniteCheckedException
{
return swapMgr.rawIterator(spaceName, part);
@@ -1669,7 +1737,9 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
* @return Offheap entries iterator.
* @throws IgniteCheckedException If failed.
*/
- public <K, V> Iterator<Cache.Entry<K, V>> offheapIterator(boolean primary, boolean backup, AffinityTopologyVersion topVer)
+ public <K, V> Iterator<Cache.Entry<K, V>> offheapIterator(boolean primary,
+ boolean backup,
+ AffinityTopologyVersion topVer)
throws IgniteCheckedException
{
assert primary || backup;
@@ -1684,7 +1754,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
cctx.affinity().backupPartitions(cctx.localNodeId(), topVer);
return new PartitionsIterator<K, V>(parts) {
- @Override protected GridCloseableIterator<? extends Map.Entry<byte[], byte[]>> partitionIterator(int part) {
+ @Override protected GridCloseableIterator<? extends Map.Entry<byte[], byte[]>> nextPartition(int part) {
return offheap.iterator(spaceName, part);
}
};
@@ -1884,20 +1954,46 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
/**
*
*/
- private abstract class PartitionsIterator<K, V> implements Iterator<Cache.Entry<K, V>> {
+ private abstract class PartitionsIterator<K, V> extends PartitionsAbstractIterator<Cache.Entry<K, V>> {
+ /**
+ * @param parts Partitions
+ */
+ public PartitionsIterator(Collection<Integer> parts) {
+ super(parts);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected Iterator<Cache.Entry<K, V>> partitionIterator(int part)
+ throws IgniteCheckedException {
+ return cacheEntryIterator(GridCacheSwapManager.this.<K, V>lazyIterator(nextPartition(part)));
+ }
+
+ /**
+ * @param part Partition.
+ * @return Iterator for given partition.
+ * @throws IgniteCheckedException If failed.
+ */
+ abstract protected GridCloseableIterator<? extends Map.Entry<byte[], byte[]>> nextPartition(int part)
+ throws IgniteCheckedException;
+ }
+
+ /**
+ *
+ */
+ private abstract class PartitionsAbstractIterator<T> implements Iterator<T> {
/** */
private Iterator<Integer> partIt;
/** */
- private Iterator<Cache.Entry<K, V>> curIt;
+ private Iterator<T> curIt;
/** */
- private Cache.Entry<K, V> next;
+ private T next;
/**
* @param parts Partitions
*/
- public PartitionsIterator(Collection<Integer> parts) {
+ public PartitionsAbstractIterator(Collection<Integer> parts) {
this.partIt = parts.iterator();
advance();
@@ -1909,11 +2005,11 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
}
/** {@inheritDoc} */
- @Override public Cache.Entry<K, V> next() {
+ @Override public T next() {
if (next == null)
throw new NoSuchElementException();
- Cache.Entry<K, V> e = next;
+ T e = next;
advance();
@@ -1937,8 +2033,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
int part = partIt.next();
try {
- curIt = cacheEntryIterator(
- GridCacheSwapManager.this.<K, V>lazyIterator(partitionIterator(part)));
+ curIt = partitionIterator(part);
}
catch (IgniteCheckedException e) {
throw new IgniteException(e);
@@ -1964,58 +2059,70 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
* @return Iterator for given partition.
* @throws IgniteCheckedException If failed.
*/
- abstract protected GridCloseableIterator<? extends Map.Entry<byte[], byte[]>> partitionIterator(int part)
+ abstract protected Iterator<T> partitionIterator(int part)
throws IgniteCheckedException;
}
/**
*
*/
- private abstract class PartitionsKeyIterator implements Iterator<KeyCacheObject> {
+ private abstract class CloseablePartitionsIterator<T, T1 extends T> extends GridCloseableIteratorAdapter<T> {
/** */
private Iterator<Integer> partIt;
/** */
- private Iterator<KeyCacheObject> curIt;
+ protected GridCloseableIterator<T1> curIt;
/** */
- private KeyCacheObject next;
+ protected T next;
/**
* @param parts Partitions
*/
- public PartitionsKeyIterator(Collection<Integer> parts) {
+ public CloseablePartitionsIterator(Collection<Integer> parts) {
this.partIt = parts.iterator();
- advance();
+ try {
+ advance();
+ }
+ catch (IgniteCheckedException e) {
+ throw U.convertException(e);
+ }
}
/** {@inheritDoc} */
- @Override public boolean hasNext() {
+ @Override protected boolean onHasNext() {
return next != null;
}
/** {@inheritDoc} */
- @Override public KeyCacheObject next() {
- if (next == null)
- throw new NoSuchElementException();
+ @Override protected T onNext() {
+ try {
+ if (next == null)
+ throw new NoSuchElementException();
- KeyCacheObject e = next;
+ T e = next;
- advance();
+ advance();
- return e;
+ return e;
+ }
+ catch (IgniteCheckedException e) {
+ throw U.convertException(e);
+ }
}
/** {@inheritDoc} */
- @Override public void remove() {
- throw new UnsupportedOperationException();
+ @Override protected void onClose() throws IgniteCheckedException {
+ if (curIt != null)
+ curIt.close();
}
/**
* Switches to next element.
+ * @throws IgniteCheckedException If failed.
*/
- private void advance() {
+ private void advance() throws IgniteCheckedException {
next = null;
do {
@@ -2038,8 +2145,11 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
break;
}
- else
+ else {
+ curIt.close();
+
curIt = null;
+ }
}
}
while (partIt.hasNext());
@@ -2050,7 +2160,6 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
* @return Iterator for given partition.
* @throws IgniteCheckedException If failed.
*/
- abstract protected Iterator<KeyCacheObject> partitionIterator(int part)
- throws IgniteCheckedException;
+ abstract protected GridCloseableIterator<T1> partitionIterator(int part) throws IgniteCheckedException;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/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 fe371ce..5184115 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
@@ -1451,33 +1451,6 @@ public interface IgniteInternalCache<K, V> extends Iterable<Cache.Entry<K, V>> {
public long swapKeys() throws IgniteCheckedException;
/**
- * Gets iterator over keys and values belonging to this cache swap space on local node. This
- * iterator is thread-safe, which means that cache (and therefore its swap space)
- * may be modified concurrently with iteration over swap.
- * <p>
- * Returned iterator supports {@code remove} operation which delegates to
- * <code>removex(Object, org.apache.ignite.lang.IgnitePredicate[])</code> method.
- *
- * @return Iterator over keys.
- * @throws IgniteCheckedException If failed.
- */
- public Iterator<Map.Entry<K, V>> swapIterator() throws IgniteCheckedException;
-
- /**
- * Gets iterator over keys and values belonging to this cache off-heap memory on local node. This
- * iterator is thread-safe, which means that cache (and therefore its off-heap memory)
- * may be modified concurrently with iteration over off-heap. To achieve better performance
- * the keys and values deserialized on demand, whenever accessed.
- * <p>
- * Returned iterator supports {@code remove} operation which delegates to
- * <code>removex(Object, org.apache.ignite.lang.IgnitePredicate[])}</code> method.
- *
- * @return Iterator over keys.
- * @throws IgniteCheckedException If failed.
- */
- public Iterator<Map.Entry<K, V>> offHeapIterator() throws IgniteCheckedException;
-
- /**
* Forces this cache node to re-balance its partitions. This method is usually used when
* {@link CacheConfiguration#getRebalanceDelay()} configuration parameter has non-zero value.
* When many nodes are started or stopped almost concurrently, it is more efficient to delay
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/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 5b74b31..f10baa3 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
@@ -786,6 +786,8 @@ public final class GridDhtColocatedLockFuture<K, V> extends GridCompoundIdentity
catch (GridCacheEntryRemovedException ignored) {
if (log.isDebugEnabled())
log.debug("Got removed entry in lockAsync(..) method (will retry): " + entry);
+
+ entry = null;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
index 29c1d45..145e980 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
@@ -436,16 +436,6 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
}
/** {@inheritDoc} */
- @Override public Iterator<Map.Entry<K, V>> swapIterator() throws IgniteCheckedException {
- return dht().swapIterator();
- }
-
- /** {@inheritDoc} */
- @Override public Iterator<Map.Entry<K, V>> offHeapIterator() throws IgniteCheckedException {
- return dht().offHeapIterator();
- }
-
- /** {@inheritDoc} */
@Override public long offHeapEntriesCount() {
return dht().offHeapEntriesCount();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java
index fae2372..6120e25 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java
@@ -146,6 +146,8 @@ public class GridLocalCache<K, V> extends GridCacheAdapter<K, V> {
try {
entry = entryExx(key);
+ entry.unswap(false);
+
if (!ctx.isAll(entry, filter)) {
fut.onFailed();
@@ -200,12 +202,6 @@ public class GridLocalCache<K, V> extends GridCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @SuppressWarnings("unchecked")
- @Override public void removeAll() throws IgniteCheckedException {
- removeAll(keySet());
- }
-
- /** {@inheritDoc} */
@Override public IgniteInternalFuture<?> removeAllAsync() {
return ctx.closures().callLocalSafe(new Callable<Void>() {
@Override public Void call() throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
index 936ed9d..819b0f0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
@@ -387,12 +387,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @SuppressWarnings("unchecked")
- @Override public void removeAll() throws IgniteCheckedException {
- removeAll(keySet());
- }
-
- /** {@inheritDoc} */
@Override public IgniteInternalFuture<?> removeAllAsync() {
return ctx.closures().callLocalSafe(new Callable<Void>() {
@Override public Void call() throws Exception {
@@ -1374,16 +1368,24 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
private List<GridCacheEntryEx> lockEntries(Collection<? extends K> keys) {
List<GridCacheEntryEx> locked = new ArrayList<>(keys.size());
+ boolean nullKeys = false;
+
while (true) {
for (K key : keys) {
- if (key == null)
- throw new NullPointerException("Null key.");
+ if (key == null) {
+ nullKeys = true;
+
+ break;
+ }
GridCacheEntryEx entry = entryEx(ctx.toCacheKeyObject(key));
locked.add(entry);
}
+ if (nullKeys)
+ break;
+
for (int i = 0; i < locked.size(); i++) {
GridCacheEntryEx entry = locked.get(i);
@@ -1405,6 +1407,15 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
if (!locked.isEmpty())
return locked;
}
+
+ assert nullKeys;
+
+ AffinityTopologyVersion topVer = ctx.affinity().affinityTopologyVersion();
+
+ for (GridCacheEntryEx entry : locked)
+ ctx.evicts().touch(entry, topVer);
+
+ throw new NullPointerException("Null key.");
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index d3ebe60..16a8028 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@ -766,13 +766,14 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
final ExpiryPolicy plc = cctx.expiry();
+ final boolean backups = qry.includeBackups() || cctx.isReplicated();
+
final GridCloseableIteratorAdapter<IgniteBiTuple<K, V>> heapIt = new GridCloseableIteratorAdapter<IgniteBiTuple<K, V>>() {
private IgniteBiTuple<K, V> next;
private IgniteCacheExpiryPolicy expiryPlc = cctx.cache().expiryPolicy(plc);
- private Iterator<K> iter = qry.includeBackups() || cctx.isReplicated() ?
- prj.keySet().iterator() : prj.primaryKeySet().iterator();
+ private Iterator<K> iter = backups ? prj.keySet().iterator() : prj.primaryKeySet().iterator();
{
advance();
@@ -868,10 +869,10 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
iters.add(heapIt);
if (cctx.isOffHeapEnabled())
- iters.add(offheapIterator(qry));
+ iters.add(offheapIterator(qry, backups));
if (cctx.swap().swapEnabled())
- iters.add(swapIterator(qry));
+ iters.add(swapIterator(qry, backups));
it = new CompoundIterator<>(iters);
}
@@ -905,32 +906,34 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
/**
* @param qry Query.
+ * @param backups Include backups.
* @return Swap iterator.
* @throws IgniteCheckedException If failed.
*/
- private GridIterator<IgniteBiTuple<K, V>> swapIterator(GridCacheQueryAdapter<?> qry)
+ private GridIterator<IgniteBiTuple<K, V>> swapIterator(GridCacheQueryAdapter<?> qry, boolean backups)
throws IgniteCheckedException {
IgniteBiPredicate<K, V> filter = qry.scanFilter();
- Iterator<Map.Entry<byte[], byte[]>> it = cctx.swap().rawSwapIterator();
+ Iterator<Map.Entry<byte[], byte[]>> it = cctx.swap().rawSwapIterator(true, backups);
return scanIterator(it, filter, qry.keepPortable());
}
/**
* @param qry Query.
+ * @param backups Include backups.
* @return Offheap iterator.
*/
- private GridIterator<IgniteBiTuple<K, V>> offheapIterator(GridCacheQueryAdapter<?> qry) {
+ private GridIterator<IgniteBiTuple<K, V>> offheapIterator(GridCacheQueryAdapter<?> qry, boolean backups) {
IgniteBiPredicate<K, V> filter = qry.scanFilter();
if (cctx.offheapTiered() && filter != null) {
OffheapIteratorClosure c = new OffheapIteratorClosure(filter, qry.keepPortable());
- return cctx.swap().rawOffHeapIterator(c);
+ return cctx.swap().rawOffHeapIterator(c, true, backups);
}
else {
- Iterator<Map.Entry<byte[], byte[]>> it = cctx.swap().rawOffHeapIterator();
+ Iterator<Map.Entry<byte[], byte[]>> it = cctx.swap().rawOffHeapIterator(true, backups);
return scanIterator(it, filter, qry.keepPortable());
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/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 fc3efba..3c855ec 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
@@ -2040,7 +2040,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
for (Object key : keys) {
if (key == null) {
- setRollbackOnly();
+ rollback();
throw new NullPointerException("Null key.");
}
@@ -2191,7 +2191,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
drVer,
skipStore);
- if (!implicit() && readCommitted())
+ if (!implicit() && readCommitted() && !cacheCtx.offheapTiered())
cacheCtx.evicts().touch(entry, topologyVersion());
if (groupLock() && !lockOnly)
@@ -2934,19 +2934,17 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
assert loadFut.isDone();
return nonInterruptable(commitAsync().chain(new CX1<IgniteInternalFuture<IgniteInternalTx>, GridCacheReturn>() {
- @Override
- public GridCacheReturn applyx(IgniteInternalFuture<IgniteInternalTx> txFut)
+ @Override public GridCacheReturn applyx(IgniteInternalFuture<IgniteInternalTx> txFut)
throws IgniteCheckedException {
txFut.get();
- return (GridCacheReturn)implicitRes;
+ return implicitRes;
}
}));
}
else
return nonInterruptable(loadFut.chain(new CX1<IgniteInternalFuture<Set<KeyCacheObject>>, GridCacheReturn>() {
- @Override
- public GridCacheReturn applyx(IgniteInternalFuture<Set<KeyCacheObject>> f)
+ @Override public GridCacheReturn applyx(IgniteInternalFuture<Set<KeyCacheObject>> f)
throws IgniteCheckedException {
f.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
index ebedadb..a99c4c0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
@@ -293,6 +293,23 @@ public class GridOffHeapProcessor extends GridProcessorAdapter {
}
/**
+ * Gets iterator over contents of the given space.
+ *
+ * @param spaceName Space name.
+ * @param c Key/value closure.
+ * @param part Partition.
+ * @return Iterator.
+ */
+ public <T> GridCloseableIterator<T> iterator(@Nullable String spaceName,
+ CX2<T2<Long, Integer>, T2<Long, Integer>, T> c, int part) {
+ assert c != null;
+
+ GridOffHeapPartitionedMap m = offheap(spaceName);
+
+ return m == null ? new GridEmptyCloseableIterator<T>() : m.iterator(c, part);
+ }
+
+ /**
* Gets number of elements in the given space.
*
* @param spaceName Space name. Optional.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/main/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMap.java b/modules/core/src/main/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMap.java
index 49850ab..a945262 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMap.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMap.java
@@ -201,6 +201,15 @@ public interface GridOffHeapPartitionedMap {
public <T> GridCloseableIterator<T> iterator(CX2<T2<Long, Integer>, T2<Long, Integer>, T> c);
/**
+ * Gets iterator over the partition.
+ *
+ * @param c Key/value closure.
+ * @param part Partition.
+ * @return Iterator over the partition.
+ */
+ public <T> GridCloseableIterator<T> iterator(CX2<T2<Long, Integer>, T2<Long, Integer>, T> c, int part);
+
+ /**
* Gets iterator over certain partition.
*
* @param p Partition.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/main/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafePartitionedMap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafePartitionedMap.java b/modules/core/src/main/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafePartitionedMap.java
index ba67b30..4ffc33f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafePartitionedMap.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafePartitionedMap.java
@@ -277,21 +277,8 @@ public class GridUnsafePartitionedMap implements GridOffHeapPartitionedMap {
/** {@inheritDoc} */
@Override public GridCloseableIterator<IgniteBiTuple<byte[], byte[]>> iterator() {
- return new GridCloseableIteratorAdapter<IgniteBiTuple<byte[], byte[]>>() {
- private int p;
-
- private GridCloseableIterator<IgniteBiTuple<byte[], byte[]>> curIt;
-
- {
- try {
- advance();
- }
- catch (IgniteCheckedException e) {
- e.printStackTrace(); // Should never happen.
- }
- }
-
- private void advance() throws IgniteCheckedException {
+ return new PartitionedMapCloseableIterator<IgniteBiTuple<byte[], byte[]>>() {
+ protected void advance() throws IgniteCheckedException {
curIt = null;
while (p < parts) {
@@ -305,34 +292,6 @@ public class GridUnsafePartitionedMap implements GridOffHeapPartitionedMap {
curIt = null;
}
-
- @Override protected IgniteBiTuple<byte[], byte[]> onNext() throws IgniteCheckedException {
- if (curIt == null)
- throw new NoSuchElementException();
-
- IgniteBiTuple<byte[], byte[]> t = curIt.next();
-
- if (!curIt.hasNext()) {
- curIt.close();
-
- advance();
- }
-
- return t;
- }
-
- @Override protected boolean onHasNext() {
- return curIt != null;
- }
-
- @Override protected void onRemove() {
- throw new UnsupportedOperationException();
- }
-
- @Override protected void onClose() throws IgniteCheckedException {
- if (curIt != null)
- curIt.close();
- }
};
}
@@ -340,21 +299,8 @@ public class GridUnsafePartitionedMap implements GridOffHeapPartitionedMap {
@Override public <T> GridCloseableIterator<T> iterator(final CX2<T2<Long, Integer>, T2<Long, Integer>, T> c) {
assert c != null;
- return new GridCloseableIteratorAdapter<T>() {
- private int p;
-
- private GridCloseableIterator<T> curIt;
-
- {
- try {
- advance();
- }
- catch (IgniteCheckedException e) {
- e.printStackTrace(); // Should never happen.
- }
- }
-
- private void advance() throws IgniteCheckedException {
+ return new PartitionedMapCloseableIterator<T>() {
+ protected void advance() throws IgniteCheckedException {
curIt = null;
while (p < parts) {
@@ -368,38 +314,16 @@ public class GridUnsafePartitionedMap implements GridOffHeapPartitionedMap {
curIt = null;
}
-
- @Override protected T onNext() throws IgniteCheckedException {
- if (curIt == null)
- throw new NoSuchElementException();
-
- T t = curIt.next();
-
- if (!curIt.hasNext()) {
- curIt.close();
-
- advance();
- }
-
- return t;
- }
-
- @Override protected boolean onHasNext() {
- return curIt != null;
- }
-
- @Override protected void onRemove() {
- throw new UnsupportedOperationException();
- }
-
- @Override protected void onClose() throws IgniteCheckedException {
- if (curIt != null)
- curIt.close();
- }
};
}
/** {@inheritDoc} */
+ @Override public <T> GridCloseableIterator<T> iterator(final CX2<T2<Long, Integer>, T2<Long, Integer>, T> c,
+ int part) {
+ return mapFor(part).iterator(c);
+ }
+
+ /** {@inheritDoc} */
@Override public GridCloseableIterator<IgniteBiTuple<byte[], byte[]>> iterator(int p) {
return mapFor(p).iterator();
}
@@ -430,4 +354,63 @@ public class GridUnsafePartitionedMap implements GridOffHeapPartitionedMap {
public long lruSize() {
return lru.size();
}
+
+ /**
+ * Partitioned closable iterator.
+ */
+ private abstract class PartitionedMapCloseableIterator<T> extends GridCloseableIteratorAdapter<T> {
+ /** Current partition. */
+ protected int p;
+
+ /** Current iterator. */
+ protected GridCloseableIterator<T> curIt;
+
+ {
+ try {
+ advance();
+ }
+ catch (IgniteCheckedException e) {
+ e.printStackTrace(); // Should never happen.
+ }
+ }
+
+ /**
+ * Switch to next partition.
+ *
+ * @throws IgniteCheckedException If failed.
+ */
+ abstract void advance() throws IgniteCheckedException;
+
+ /** {@inheritDoc} */
+ @Override protected T onNext() throws IgniteCheckedException {
+ if (curIt == null)
+ throw new NoSuchElementException();
+
+ T t = curIt.next();
+
+ if (!curIt.hasNext()) {
+ curIt.close();
+
+ advance();
+ }
+
+ return t;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected boolean onHasNext() {
+ return curIt != null;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void onRemove() {
+ throw new UnsupportedOperationException();
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void onClose() throws IgniteCheckedException {
+ if (curIt != null)
+ curIt.close();
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/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 4dc371c..70d8f9c 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
@@ -50,6 +50,7 @@ import static java.util.concurrent.TimeUnit.*;
import static org.apache.ignite.cache.CacheAtomicityMode.*;
import static org.apache.ignite.cache.CacheMemoryMode.*;
import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.cache.CachePeekMode.*;
import static org.apache.ignite.events.EventType.*;
import static org.apache.ignite.testframework.GridTestUtils.*;
import static org.apache.ignite.transactions.TransactionConcurrency.*;
@@ -121,15 +122,15 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
/**
* @return {@code True} if values should be stored off-heap.
*/
- protected boolean offHeapValues() {
- return false;
+ protected CacheMemoryMode memoryMode() {
+ return ONHEAP_TIERED;
}
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
- if (offHeapValues())
+ if (memoryMode() == OFFHEAP_TIERED || memoryMode() == OFFHEAP_VALUES)
cfg.setSwapSpaceSpi(new GridTestSwapSpaceSpi());
return cfg;
@@ -139,8 +140,8 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
@Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception {
CacheConfiguration ccfg = super.cacheConfiguration(gridName);
- if (offHeapValues()) {
- ccfg.setMemoryMode(CacheMemoryMode.OFFHEAP_VALUES);
+ if (memoryMode() == OFFHEAP_TIERED || memoryMode() == OFFHEAP_VALUES) {
+ ccfg.setMemoryMode(memoryMode());
ccfg.setOffHeapMaxMemory(0);
}
@@ -272,7 +273,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
// Will actually delete entry from map.
CU.invalidate(jcache(i), "key0");
- assertNull("Failed check for grid: " + i, jcache(i).localPeek("key0", CachePeekMode.ONHEAP));
+ assertNull("Failed check for grid: " + i, jcache(i).localPeek("key0", ONHEAP));
Collection<String> keysCol = mapped.get(grid(i).localNode());
@@ -288,20 +289,20 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
if (ctx.affinity().localNode(key, new AffinityTopologyVersion(ctx.discovery().topologyVersion())))
sum++;
- assertEquals("Incorrect key size on cache #" + i, sum, jcache(i).localSize(CachePeekMode.ALL));
+ assertEquals("Incorrect key size on cache #" + i, sum, jcache(i).localSize(ALL));
}
for (int i = 0; i < gridCount(); i++) {
Collection<String> keysCol = mapped.get(grid(i).localNode());
assertEquals("Failed check for grid: " + i, !F.isEmpty(keysCol) ? keysCol.size() : 0,
- jcache(i).localSize(CachePeekMode.PRIMARY));
+ jcache(i).localSize(PRIMARY));
}
int globalPrimarySize = map.size();
for (int i = 0; i < gridCount(); i++)
- assertEquals(globalPrimarySize, jcache(i).size(CachePeekMode.PRIMARY));
+ assertEquals(globalPrimarySize, jcache(i).size(PRIMARY));
int times = 1;
@@ -313,7 +314,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
int globalSize = globalPrimarySize * times;
for (int i = 0; i < gridCount(); i++)
- assertEquals(globalSize, jcache(i).size(CachePeekMode.ALL));
+ assertEquals(globalSize, jcache(i).size(ALL));
}
/**
@@ -735,7 +736,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
assertNull(cache.get("key3"));
for (int i = 0; i < gridCount(); i++)
- assertNull("Failed for cache: " + i, jcache(i).localPeek("key3", CachePeekMode.ONHEAP));
+ assertNull("Failed for cache: " + i, jcache(i).localPeek("key3", ONHEAP));
cache.remove("key1");
cache.put("key2", 1);
@@ -750,7 +751,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
assertNull(cache.get("key3"));
for (int i = 0; i < gridCount(); i++)
- assertNull(jcache(i).localPeek("key3", CachePeekMode.ONHEAP));
+ assertNull(jcache(i).localPeek("key3", ONHEAP));
}
/**
@@ -789,7 +790,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
assertNull(cache.get("key3"));
for (int i = 0; i < gridCount(); i++)
- assertNull("Failed for cache: " + i, jcache(i).localPeek("key3", CachePeekMode.ONHEAP));
+ assertNull("Failed for cache: " + i, jcache(i).localPeek("key3", ONHEAP));
cache.remove("key1");
cache.put("key2", 1);
@@ -804,7 +805,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
assertNull(cache.get("key3"));
for (int i = 0; i < gridCount(); i++)
- assertNull(jcache(i).localPeek("key3", CachePeekMode.ONHEAP));
+ assertNull(jcache(i).localPeek("key3", ONHEAP));
}
/**
@@ -874,9 +875,9 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
Map<String, EntryProcessorResult<String>> res = cache.invokeAll(F.asSet("key1", "key2", "key3"), RMV_PROCESSOR);
for (int i = 0; i < gridCount(); i++) {
- assertNull(jcache(i).localPeek("key1", CachePeekMode.ONHEAP));
- assertNull(jcache(i).localPeek("key2", CachePeekMode.ONHEAP));
- assertNull(jcache(i).localPeek("key3", CachePeekMode.ONHEAP));
+ assertNull(jcache(i).localPeek("key1", ONHEAP));
+ assertNull(jcache(i).localPeek("key2", ONHEAP));
+ assertNull(jcache(i).localPeek("key3", ONHEAP));
}
assertEquals("null", res.get("key1").get());
@@ -1232,7 +1233,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
assertNull(cache.get("key3"));
for (int i = 0; i < gridCount(); i++)
- assertNull(jcache(i).localPeek("key3", CachePeekMode.ONHEAP));
+ assertNull(jcache(i).localPeek("key3", ONHEAP));
}
/**
@@ -1271,7 +1272,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
assertNull(cache.get("k1"));
for (int i = 0; i < gridCount(); i++)
- assertNull(jcache(i).localPeek("k1", CachePeekMode.ONHEAP));
+ assertNull(jcache(i).localPeek("k1", ONHEAP));
final EntryProcessor<String, Integer, Integer> errProcessor = new EntryProcessor<String, Integer, Integer>() {
@Override public Integer process(MutableEntry<String, Integer> e, Object... args) {
@@ -1692,7 +1693,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
for (int i = 0; i < gridCount(); i++) {
info("Peek on node [i=" + i + ", id=" + grid(i).localNode().id() + ", val=" +
- grid(i).cache(null).localPeek("key", CachePeekMode.ONHEAP) + ']');
+ grid(i).cache(null).localPeek("key", ONHEAP) + ']');
}
assertEquals((Integer)1, cache.getAndPutIfAbsent("key", 2));
@@ -2001,10 +2002,10 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
for (int i = 0; i < gridCount(); i++) {
info("Peek key on grid [i=" + i + ", nodeId=" + grid(i).localNode().id() +
- ", peekVal=" + grid(i).cache(null).localPeek("key", CachePeekMode.ONHEAP) + ']');
+ ", peekVal=" + grid(i).cache(null).localPeek("key", ONHEAP) + ']');
info("Peek key2 on grid [i=" + i + ", nodeId=" + grid(i).localNode().id() +
- ", peekVal=" + grid(i).cache(null).localPeek("key2", CachePeekMode.ONHEAP) + ']');
+ ", peekVal=" + grid(i).cache(null).localPeek("key2", ONHEAP) + ']');
}
assertEquals((Integer)6, cache.get("key2"));
@@ -2233,7 +2234,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
* @throws Exception If failed.
*/
public void testDeletedEntriesFlag() throws Exception {
- if (cacheMode() != LOCAL && cacheMode() != REPLICATED) {
+ if (cacheMode() != LOCAL && cacheMode() != REPLICATED && memoryMode() != OFFHEAP_TIERED) {
int cnt = 3;
IgniteCache<String, Integer> cache = jcache();
@@ -2288,9 +2289,9 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
String key = String.valueOf(i);
if (grid(0).affinity(null).mapKeyToPrimaryAndBackups(key).contains(grid(g).localNode()))
- assertEquals((Integer)i, jcache(g).localPeek(key, CachePeekMode.ONHEAP));
+ assertEquals((Integer)i, peek(jcache(g), key));
else
- assertNull(jcache(g).localPeek(key, CachePeekMode.ONHEAP));
+ assertNull(peek(jcache(g), key));
}
}
}
@@ -2475,6 +2476,8 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
}
}, NullPointerException.class, null);
+ assertEquals(0, grid(0).cache(null).localSize());
+
GridTestUtils.assertThrows(log, new Callable<Void>() {
@Override public Void call() throws Exception {
cache.removeAll(null);
@@ -2569,7 +2572,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
Set<String> keys = new HashSet<>(primaryKeysForCache(cache, 2));
for (String key : keys)
- assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
+ assertNull(cache.localPeek(key, ONHEAP));
Map<String, Integer> vals = new HashMap<>();
@@ -2584,17 +2587,17 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
}
for (String key : keys)
- assertEquals(vals.get(key), cache.localPeek(key, CachePeekMode.ONHEAP));
+ assertEquals(vals.get(key), peek(cache, key));
cache.clear();
for (String key : keys)
- assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
+ assertNull(peek(cache, key));
loadAll(cache, keys, true);
for (String key : keys)
- assertEquals(vals.get(key), cache.localPeek(key, CachePeekMode.ONHEAP));
+ assertEquals(vals.get(key), peek(cache, key));
}
/**
@@ -2703,7 +2706,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
try {
cache.clear();
- assertEquals(vals.get(first), peek(cache, first));
+ assertEquals(vals.get(first), cache.localPeek(first, ONHEAP));
}
finally {
lock.unlock();
@@ -2734,14 +2737,14 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
cache.localEvict(Sets.union(ImmutableSet.of("key1", "key2"), keys));
- assert cache.localSize(CachePeekMode.ONHEAP) == 0;
+ assert cache.localSize(ONHEAP) == 0;
cache.clear();
cache.localPromote(ImmutableSet.of("key2", "key1"));
- assert cache.localPeek("key1", CachePeekMode.ONHEAP) == null;
- assert cache.localPeek("key2", CachePeekMode.ONHEAP) == null;
+ assert cache.localPeek("key1", ONHEAP) == null;
+ assert cache.localPeek("key2", ONHEAP) == null;
}
/**
@@ -2906,13 +2909,13 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
Ignite ignite = primaryIgnite("key");
IgniteCache<String, Integer> cache = ignite.cache(null);
- assert cache.localPeek("key", CachePeekMode.ONHEAP) == null;
+ assert peek(cache, "key") == null;
cache.put("key", 1);
cache.replace("key", 2);
- assert cache.localPeek("key", CachePeekMode.ONHEAP) == 2;
+ assertEquals(2, peek(cache, "key").intValue());
}
/**
@@ -2944,7 +2947,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
cache.remove("key");
assertNull(cache.get("key")); // localPeek ignores transactions.
- assertNotNull(cache.localPeek("key")); // localPeek ignores transactions.
+ assertNotNull(peek(cache, "key")); // localPeek ignores transactions.
tx.commit();
}
@@ -2960,7 +2963,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
cache.put("key", 1);
cache.remove("key");
- assertNull(cache.localPeek("key", CachePeekMode.ONHEAP));
+ assertNull(peek(cache, "key"));
}
/**
@@ -2986,11 +2989,11 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
// Expired entry should not be swapped.
cache.localEvict(Collections.singleton(key));
- assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
+ assertNull(peek(cache, "key"));
cache.localPromote(Collections.singleton(key));
- assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
+ assertNull(cache.localPeek(key, ONHEAP));
assertTrue(cache.localSize() == 0);
@@ -3021,7 +3024,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
c.put(key, 1);
- assertEquals(Integer.valueOf(1), c.localPeek(key, CachePeekMode.ONHEAP));
+ assertEquals(Integer.valueOf(1), peek(c, key));
int ttl = 500;
@@ -3031,7 +3034,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
Thread.sleep(ttl + 100);
- assert c.localPeek(key, CachePeekMode.ONHEAP) == null;
+ assert peek(c, key) == null;
assert c.localSize() == 0 : "Cache is not empty.";
}
@@ -3058,7 +3061,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
Thread.sleep(ttl + 100);
- assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
+ assertNull(c.localPeek(key, ONHEAP));
assert c.localSize() == 0;
}
@@ -3092,6 +3095,9 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
* @throws Exception If failed.
*/
private void checkTtl(boolean inTx, boolean oldEntry) throws Exception {
+ if (memoryMode() == OFFHEAP_TIERED)
+ return;
+
int ttl = 1000;
final ExpiryPolicy expiry = new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl));
@@ -3361,15 +3367,15 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
cache.put(key2, 2);
cache.put(key3, 3);
- assert cache.localPeek(key1, CachePeekMode.ONHEAP) == 1;
- assert cache.localPeek(key2, CachePeekMode.ONHEAP) == 2;
- assert cache.localPeek(key3, CachePeekMode.ONHEAP) == 3;
+ assert peek(cache, key1) == 1;
+ assert peek(cache, key2) == 2;
+ assert peek(cache, key3) == 3;
cache.localEvict(F.asList(key1, key2));
- assert cache.localPeek(key1, CachePeekMode.ONHEAP) == null;
- assert cache.localPeek(key2, CachePeekMode.ONHEAP) == null;
- assert cache.localPeek(key3, CachePeekMode.ONHEAP) == 3;
+ assert cache.localPeek(key1, ONHEAP) == null;
+ assert cache.localPeek(key2, ONHEAP) == null;
+ assert peek(cache, key3) == 3;
loadAll(cache, ImmutableSet.of(key1, key2), true);
@@ -3391,7 +3397,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
* @throws Exception If failed.
*/
public void testUnswap() throws Exception {
- GridCacheAdapter<String, Integer> cache = ((IgniteKernal)grid(0)).internalCache();
+ IgniteCache<String, Integer> cache = grid(0).cache(null);
List<String> keys = primaryKeysForCache(jcache(), 3);
@@ -3408,17 +3414,11 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
Collection<String> locKeys = new HashSet<>();
- if (cache.context().affinityNode()) {
- locKeys.addAll(cache.primaryKeySet());
+ if (grid(0).context().cache().cache(null).context().affinityNode()) {
+ Iterable<Cache.Entry<String, Integer>> entries = cache.localEntries(PRIMARY, BACKUP);
- info("Local keys (primary): " + locKeys);
-
- locKeys.addAll(cache.keySet(new CacheEntryPredicateAdapter() {
- @Override public boolean apply(GridCacheEntryEx e) {
- return grid(0).affinity(null).isBackup(grid(0).localNode(),
- e.key().value(e.context().cacheObjectContext(), false));
- }
- }));
+ for (Cache.Entry<String, Integer> entry : entries)
+ locKeys.add(entry.getKey());
info("Local keys (primary + backup): " + locKeys);
}
@@ -3444,57 +3444,67 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
}, EVT_CACHE_OBJECT_SWAPPED, EVT_CACHE_OBJECT_UNSWAPPED);
}
- cache.evictAll(Collections.singleton(k2));
- cache.evictAll(Collections.singleton(k3));
+ cache.localEvict(F.asList(k2, k3));
- assertNotNull(cache.localPeek(k1, new CachePeekMode[] {CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP}, null));
- assertNull(cache.localPeek(k2, new CachePeekMode[] {CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP}, null));
- assertNull(cache.localPeek(k3, new CachePeekMode[] {CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP}, null));
+ if (memoryMode() == OFFHEAP_TIERED) {
+ assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
+ assertNotNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
+ assertNotNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
+ }
+ else {
+ assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
+ assertNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
+ assertNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
+ }
int cnt = 0;
if (locKeys.contains(k2)) {
- assertNull(cache.localPeek(k2, ONHEAP_PEEK_MODES, null));
+ assertNull(cache.localPeek(k2, ONHEAP_PEEK_MODES));
- cache.promoteAll(Collections.singleton(k2));
+ cache.localPromote(Collections.singleton(k2));
- assertEquals((Integer) 2, cache.localPeek(k2, ONHEAP_PEEK_MODES, null));
+ assertEquals((Integer) 2, cache.localPeek(k2, ONHEAP_PEEK_MODES));
cnt++;
}
else {
- cache.promoteAll(Collections.singleton(k2));
+ cache.localPromote(Collections.singleton(k2));
- assertNull(cache.localPeek(k2, ONHEAP_PEEK_MODES, null));
+ assertNull(cache.localPeek(k2, ONHEAP_PEEK_MODES));
}
if (locKeys.contains(k3)) {
- assertNull(cache.localPeek(k3, ONHEAP_PEEK_MODES, null));
+ assertNull(cache.localPeek(k3, ONHEAP_PEEK_MODES));
- cache.promoteAll(Collections.singleton(k3));
+ cache.localPromote(Collections.singleton(k3));
- assertEquals((Integer)3, cache.localPeek(k3, ONHEAP_PEEK_MODES, null));
+ assertEquals((Integer)3, cache.localPeek(k3, ONHEAP_PEEK_MODES));
cnt++;
}
else {
- cache.promoteAll(Collections.singleton(k3));
+ cache.localPromote(Collections.singleton(k3));
- assertNull(cache.localPeek(k3, ONHEAP_PEEK_MODES, null));
+ assertNull(cache.localPeek(k3, ONHEAP_PEEK_MODES));
}
- assertEquals(cnt, swapEvts.get());
- assertEquals(cnt, unswapEvts.get());
+ if (memoryMode() != OFFHEAP_TIERED) {
+ assertEquals(cnt, swapEvts.get());
+ assertEquals(cnt, unswapEvts.get());
+ }
- cache.evictAll(Collections.singleton(k1));
+ cache.localEvict(Collections.singleton(k1));
assertEquals((Integer)1, cache.get(k1));
if (locKeys.contains(k1))
cnt++;
- assertEquals(cnt, swapEvts.get());
- assertEquals(cnt, unswapEvts.get());
+ if (memoryMode() != OFFHEAP_TIERED) {
+ assertEquals(cnt, swapEvts.get());
+ assertEquals(cnt, unswapEvts.get());
+ }
cache.clear();
@@ -3506,14 +3516,21 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
swapEvts.set(0);
unswapEvts.set(0);
- cache.evictAll(Collections.singleton(k2));
- cache.evictAll(Collections.singleton(k3));
+ cache.localEvict(Collections.singleton(k2));
+ cache.localEvict(Collections.singleton(k3));
- assertNotNull(cache.localPeek(k1, new CachePeekMode[] {CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP}, null));
- assertNull(cache.localPeek(k2, new CachePeekMode[] {CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP}, null));
- assertNull(cache.localPeek(k3, new CachePeekMode[] {CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP}, null));
+ if (memoryMode() == OFFHEAP_TIERED) {
+ assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
+ assertNotNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
+ assertNotNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
+ }
+ else {
+ assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
+ assertNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
+ assertNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
+ }
- cache.promoteAll(F.asList(k2, k3));
+ cache.localPromote(F.asSet(k2, k3));
cnt = 0;
@@ -3523,8 +3540,10 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
if (locKeys.contains(k3))
cnt++;
- assertEquals(cnt, swapEvts.get());
- assertEquals(cnt, unswapEvts.get());
+ if (memoryMode() != OFFHEAP_TIERED) {
+ assertEquals(cnt, swapEvts.get());
+ assertEquals(cnt, unswapEvts.get());
+ }
}
/**
@@ -3557,7 +3576,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
Thread.sleep(ttl + 100);
// Peek will actually remove entry from cache.
- assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
+ assertNull(cache.localPeek(key, ONHEAP));
assert cache.localSize() == 0;
@@ -3654,6 +3673,13 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
assertTrue(cache.remove("key" + i));
}
});
+
+ CU.inTx(ignite(0), jcache(), concurrency, isolation, new CIX1<IgniteCache<String, Integer>>() {
+ @Override public void applyx(IgniteCache<String, Integer> cache) {
+ for (int i = 0; i < cnt; i++)
+ assertNull(cache.get("key" + i));
+ }
+ });
}
}
@@ -3745,6 +3771,9 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
* @throws Exception If failed.
*/
protected void checkSize(Collection<String> keys) throws Exception {
+ if (memoryMode() == OFFHEAP_TIERED)
+ return;
+
if (nearEnabled())
assertEquals(keys.size(), jcache().localSize(CachePeekMode.ALL));
else {
@@ -3768,7 +3797,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
}
}
- assertEquals("Incorrect size on cache #" + i, size, jcache(i).localSize(CachePeekMode.ALL));
+ assertEquals("Incorrect size on cache #" + i, size, jcache(i).localSize(ALL));
}
}
}
@@ -3779,8 +3808,8 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
*/
protected void checkKeySize(Collection<String> keys) throws Exception {
if (nearEnabled())
- assertEquals("Invalid key size: " + jcache().localSize(CachePeekMode.ALL),
- keys.size(), jcache().localSize(CachePeekMode.ALL));
+ assertEquals("Invalid key size: " + jcache().localSize(ALL),
+ keys.size(), jcache().localSize(ALL));
else {
for (int i = 0; i < gridCount(); i++) {
GridCacheContext<String, Integer> ctx = context(i);
@@ -3791,7 +3820,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
if (ctx.affinity().localNode(key, ctx.discovery().topologyVersionEx()))
size++;
- assertEquals("Incorrect key size on cache #" + i, size, jcache(i).localSize(CachePeekMode.ALL));
+ assertEquals("Incorrect key size on cache #" + i, size, jcache(i).localSize(ALL));
}
}
}
@@ -4390,7 +4419,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
assertFalse(cacheSkipStore.iterator().hasNext());
assertTrue(map.size() == 0);
- assertTrue(cache.size(CachePeekMode.ALL) == 0);
+ assertTrue(cache.size(ALL) == 0);
// putAll/removeAll from multiple nodes.
@@ -4479,8 +4508,8 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
assertTrue(map.containsKey(rmvKey));
- assertTrue(cache.size(CachePeekMode.ALL) == 0);
- assertTrue(cacheSkipStore.size(CachePeekMode.ALL) == 0);
+ assertTrue(cache.size(ALL) == 0);
+ assertTrue(cacheSkipStore.size(ALL) == 0);
cache.remove(rmvKey);
@@ -4723,8 +4752,8 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
for (int i = 0; i < keys.size(); i++)
putToStore(keys.get(i), i);
- assertTrue(cacheSkipStore.size(CachePeekMode.ALL) == 0);
- assertTrue(cache.size(CachePeekMode.ALL) == 0);
+ assertTrue(cacheSkipStore.size(ALL) == 0);
+ assertTrue(cache.size(ALL) == 0);
assertTrue(map.size() != 0);
try (Transaction tx = txs.txStart(txConcurrency, txIsolation)) {
@@ -4813,8 +4842,8 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
*/
private void checkEmpty(IgniteCache<String, Integer> cache, IgniteCache<String, Integer> cacheSkipStore)
throws Exception {
- assertTrue(cache.size(CachePeekMode.ALL) == 0);
- assertTrue(cacheSkipStore.size(CachePeekMode.ALL) == 0);
+ assertTrue(cache.size(ALL) == 0);
+ assertTrue(cacheSkipStore.size(ALL) == 0);
assertTrue(map.size() == 0);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/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 342eb5a..efd0185 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
@@ -393,8 +393,8 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
@Nullable protected <K, V> V peek(IgniteCache<K, V> cache, K key) throws Exception {
- return offheapTiered(cache) ? cache.localPeek(key, CachePeekMode.SWAP) : cache.localPeek(key,
- CachePeekMode.ONHEAP);
+ return offheapTiered(cache) ? cache.localPeek(key, CachePeekMode.SWAP, CachePeekMode.OFFHEAP) :
+ cache.localPeek(key, CachePeekMode.ONHEAP);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffHeapTieredTransactionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffHeapTieredTransactionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffHeapTieredTransactionSelfTest.java
new file mode 100644
index 0000000..671d6c4
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffHeapTieredTransactionSelfTest.java
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import org.apache.ignite.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.junits.common.*;
+import org.apache.ignite.transactions.*;
+
+import java.util.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.transactions.TransactionConcurrency.*;
+import static org.apache.ignite.transactions.TransactionIsolation.*;
+
+/**
+ * Off-heap tiered test.
+ */
+public class OffHeapTieredTransactionSelfTest extends GridCommonAbstractTest {
+ /** IP finder. */
+ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ CacheConfiguration ccfg = defaultCacheConfiguration();
+
+ ccfg.setMemoryMode(OFFHEAP_TIERED);
+ ccfg.setAtomicityMode(TRANSACTIONAL);
+ ccfg.setOffHeapMaxMemory(0);
+ ccfg.setSwapEnabled(true);
+ ccfg.setCacheMode(REPLICATED);
+
+ TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+ disco.setIpFinder(ipFinder);
+
+ cfg.setDiscoverySpi(disco);
+
+ cfg.setCacheConfiguration(ccfg);
+
+ cfg.getTransactionConfiguration().setTxSerializableEnabled(true);
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected long getTestTimeout() {
+ return 30_000;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ startGrids(2);
+
+ awaitPartitionMapExchange();
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ stopAllGrids();
+ }
+
+ /**
+ * @throws Exception In case of error.
+ */
+ public void testPutAll() throws Exception {
+ IgniteCache<String, Integer> cache = grid(0).cache(null);
+
+ final int KEYS = 5;
+
+ Map<String, Integer> data = new LinkedHashMap<>();
+
+ for (int i = 0; i < KEYS; i++)
+ data.put("key_" + i, i);
+
+ checkPutAll(cache, data, OPTIMISTIC, READ_COMMITTED);
+
+ checkPutAll(cache, data, OPTIMISTIC, REPEATABLE_READ);
+
+ checkPutAll(cache, data, OPTIMISTIC, SERIALIZABLE);
+
+ checkPutAll(cache, data, PESSIMISTIC, READ_COMMITTED);
+
+ checkPutAll(cache, data, PESSIMISTIC, REPEATABLE_READ);
+
+ checkPutAll(cache, data, PESSIMISTIC, SERIALIZABLE);
+ }
+
+ /**
+ * @throws Exception In case of error.
+ */
+ private void checkPutAll(IgniteCache<String, Integer> cache, Map<String, Integer> data,
+ TransactionConcurrency txConcurrency, TransactionIsolation txIsolation) throws Exception {
+ IgniteTransactions txs = cache.unwrap(Ignite.class).transactions();
+
+ try (Transaction tx = txs.txStart(txConcurrency, txIsolation)) {
+ cache.putAll(data);
+
+ tx.commit();
+ }
+
+ for (Map.Entry<String, Integer> entry : data.entrySet())
+ assertEquals(entry.getValue(), cache.get(entry.getKey()));
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..686cc31
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
@@ -0,0 +1,43 @@
+/*
+ * 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.dht;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+
+/**
+ * Tests colocated cache with off-heap tiered mode.
+ */
+public class GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest extends
+ GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicityMode atomicityMode() {
+ return ATOMIC;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected boolean txEnabled() {
+ return false;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected boolean lockingEnabled() {
+ return false;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapFullApiSelfTest.java
index c3a69e2..2dd07ff 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapFullApiSelfTest.java
@@ -17,13 +17,17 @@
package org.apache.ignite.internal.processors.cache.distributed.dht;
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
/**
* Tests colocated cache with values being stored off-heap.
*/
public class GridCachePartitionedNearDisabledOffHeapFullApiSelfTest extends
GridCachePartitionedNearDisabledFullApiSelfTest {
/** {@inheritDoc} */
- @Override protected boolean offHeapValues() {
- return true;
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_VALUES;
}
}
[24/50] [abbrv] incubator-ignite git commit: Merge branches
'ignite-709_2' and 'ignite-sprint-5' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-709_2
Posted by se...@apache.org.
Merge branches 'ignite-709_2' and 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-709_2
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/16a6aa0e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/16a6aa0e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/16a6aa0e
Branch: refs/heads/ignite-836_2
Commit: 16a6aa0eec4d3227506f6f1b0ceebcb733ca653e
Parents: 796234f 2361640
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Fri May 8 16:44:08 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Fri May 8 16:44:08 2015 +0300
----------------------------------------------------------------------
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
modules/clients/pom.xml | 2 +-
modules/cloud/pom.xml | 4 +-
.../TcpDiscoveryCloudIpFinderSelfTest.java | 2 -
modules/codegen/pom.xml | 2 +-
.../ignite/codegen/MessageCodeGenerator.java | 4 +-
modules/core/pom.xml | 2 +-
.../communication/GridIoMessageFactory.java | 4 +-
.../cache/DynamicCacheDescriptor.java | 16 +-
.../processors/cache/GridCacheAdapter.java | 544 +-
.../cache/GridCacheEvictionManager.java | 2 +-
.../processors/cache/GridCacheMapEntry.java | 18 +-
.../GridCachePartitionExchangeManager.java | 3 +
.../processors/cache/GridCacheProcessor.java | 189 +-
.../processors/cache/GridCacheProxyImpl.java | 24 -
.../processors/cache/GridCacheSwapManager.java | 215 +-
.../processors/cache/GridCacheTtlManager.java | 42 +-
.../processors/cache/GridCacheUtils.java | 5 +-
.../processors/cache/IgniteInternalCache.java | 27 -
...ridCacheOptimisticCheckPreparedTxFuture.java | 434 --
...idCacheOptimisticCheckPreparedTxRequest.java | 232 -
...dCacheOptimisticCheckPreparedTxResponse.java | 179 -
.../distributed/GridCacheTxRecoveryFuture.java | 506 ++
.../distributed/GridCacheTxRecoveryRequest.java | 261 +
.../GridCacheTxRecoveryResponse.java | 182 +
.../GridDistributedTxRemoteAdapter.java | 2 +-
.../distributed/dht/GridDhtLocalPartition.java | 2 +-
.../dht/GridPartitionedGetFuture.java | 2 +-
.../colocated/GridDhtColocatedLockFuture.java | 2 +
.../distributed/near/GridNearCacheAdapter.java | 10 -
.../processors/cache/local/GridLocalCache.java | 8 +-
.../local/atomic/GridLocalAtomicCache.java | 27 +-
.../cache/query/GridCacheQueryManager.java | 21 +-
.../cache/query/GridCacheSqlQuery.java | 2 +-
.../cache/query/GridCacheTwoStepQuery.java | 17 +
.../cache/transactions/IgniteInternalTx.java | 5 +-
.../cache/transactions/IgniteTxAdapter.java | 2 +-
.../cache/transactions/IgniteTxHandler.java | 38 +-
.../transactions/IgniteTxLocalAdapter.java | 14 +-
.../cache/transactions/IgniteTxManager.java | 173 +-
.../datastreamer/DataStreamerImpl.java | 2 +
.../processors/igfs/IgfsDataManager.java | 3 +
.../processors/igfs/IgfsDeleteWorker.java | 4 +
.../processors/igfs/IgfsMetaManager.java | 2 +-
.../internal/processors/igfs/IgfsUtils.java | 11 +-
.../offheap/GridOffHeapProcessor.java | 17 +
.../util/lang/GridFilteredIterator.java | 2 +-
.../ignite/internal/util/lang/GridFunc.java | 7218 +++++-------------
.../util/offheap/GridOffHeapPartitionedMap.java | 9 +
.../unsafe/GridUnsafePartitionedMap.java | 155 +-
.../internal/visor/query/VisorQueryArg.java | 14 +-
.../internal/visor/query/VisorQueryJob.java | 2 +
.../resources/META-INF/classnames.properties | 12 +-
.../core/src/main/resources/ignite.properties | 2 +-
.../internal/GridUpdateNotifierSelfTest.java | 21 +-
.../processors/cache/CacheGetFromJobTest.java | 110 +
.../GridCacheAbstractFailoverSelfTest.java | 4 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 227 +-
.../cache/GridCacheAbstractSelfTest.java | 4 +-
.../cache/OffHeapTieredTransactionSelfTest.java | 127 +
...CacheLoadingConcurrentGridStartSelfTest.java | 49 +-
.../GridCacheAbstractNodeRestartSelfTest.java | 94 +-
...xOriginatingNodeFailureAbstractSelfTest.java | 2 +-
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 43 +
...ionedNearDisabledOffHeapFullApiSelfTest.java | 8 +-
...DisabledOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...abledOffHeapTieredAtomicFullApiSelfTest.java | 56 +
...earDisabledOffHeapTieredFullApiSelfTest.java | 33 +
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
...rDisabledPrimaryNodeFailureRecoveryTest.java | 31 +
...rtitionedPrimaryNodeFailureRecoveryTest.java | 31 +
...woBackupsPrimaryNodeFailureRecoveryTest.java | 37 +
...ePrimaryNodeFailureRecoveryAbstractTest.java | 533 ++
...CacheAtomicOffHeapTieredFullApiSelfTest.java | 32 +
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
...yWriteOrderOffHeapTieredFullApiSelfTest.java | 33 +
...erOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
...achePartitionedMultiNodeFullApiSelfTest.java | 15 +-
.../GridCachePartitionedNodeRestartTest.java | 4 +-
...dCachePartitionedOffHeapFullApiSelfTest.java | 8 +-
...titionedOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...PartitionedOffHeapTieredFullApiSelfTest.java | 32 +
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 72 +
...ePartitionedOptimisticTxNodeRestartTest.java | 4 +-
.../GridCacheReplicatedNodeRestartSelfTest.java | 2 +
...idCacheReplicatedOffHeapFullApiSelfTest.java | 8 +-
...plicatedOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...eReplicatedOffHeapTieredFullApiSelfTest.java | 33 +
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
.../IgniteCacheExpiryPolicyAbstractTest.java | 2 +-
.../IgniteCacheExpiryPolicyTestSuite.java | 2 +
.../expiry/IgniteCacheTtlCleanupSelfTest.java | 85 +
...LocalAtomicOffHeapTieredFullApiSelfTest.java | 32 +
.../GridCacheLocalOffHeapFullApiSelfTest.java | 6 +-
...dCacheLocalOffHeapTieredFullApiSelfTest.java | 32 +
.../igfs/IgfsClientCacheSelfTest.java | 132 +
.../processors/igfs/IgfsOneClientNodeTest.java | 133 +
.../processors/igfs/IgfsStreamsSelfTest.java | 2 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
.../IgniteCacheFullApiSelfTestSuite.java | 18 +
.../testsuites/IgniteCacheRestartTestSuite.java | 5 +-
.../testsuites/IgniteCacheTestSuite3.java | 3 -
.../IgniteCacheTxRecoverySelfTestSuite.java | 4 +
.../ignite/testsuites/IgniteIgfsTestSuite.java | 3 +
modules/extdata/p2p/pom.xml | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 4 +-
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 | 4 +
.../processors/query/h2/sql/GridSqlQuery.java | 20 +
.../query/h2/sql/GridSqlQueryParser.java | 10 +-
.../query/h2/sql/GridSqlQuerySplitter.java | 11 +-
.../processors/query/h2/sql/GridSqlSelect.java | 2 +-
.../processors/query/h2/sql/GridSqlUnion.java | 2 +-
.../query/h2/twostep/GridMapQueryExecutor.java | 3 +
.../h2/twostep/GridReduceQueryExecutor.java | 119 +-
.../IgniteCacheAbstractFieldsQuerySelfTest.java | 21 +
...eQueryMultiThreadedOffHeapTiredSelfTest.java | 37 +
.../IgniteCacheQueryMultiThreadedSelfTest.java | 29 +-
.../IgniteCacheQuerySelfTestSuite.java | 1 +
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
.../ignite/scalar/ScalarConversions.scala | 8 -
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
.../ignite/schema/generator/CodeGenerator.java | 47 +-
modules/slf4j/pom.xml | 2 +-
modules/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
.../commands/cache/VisorCacheScanCommand.scala | 2 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 36 +-
145 files changed, 6039 insertions(+), 7313 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/16a6aa0e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
----------------------------------------------------------------------
[31/50] [abbrv] incubator-ignite git commit: ignite-877
Posted by se...@apache.org.
ignite-877
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e6ca7570
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e6ca7570
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e6ca7570
Branch: refs/heads/ignite-836_2
Commit: e6ca75701e6acf7e4fb857530744d5263bc2f962
Parents: c9cd92e
Author: avinogradov <av...@gridgain.com>
Authored: Fri May 8 18:54:33 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri May 8 18:54:33 2015 +0300
----------------------------------------------------------------------
pom.xml | 33 ---------------------------------
1 file changed, 33 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e6ca7570/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c5a9e5d..e303480 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,8 +36,6 @@
<packaging>pom</packaging>
<properties>
- <ignite.site>scp://localhost:/home</ignite.site>
- <ignite.site.folder>${project.artifactId}-${project.version}</ignite.site.folder>
<!--fix <attachartifact>...< /> at apache-release profile if changed-->
<ignite.zip.pattern>ignite-${ignite.edition}-${project.version}</ignite.zip.pattern>
</properties>
@@ -49,13 +47,6 @@
<tag>HEAD</tag>
</scm>
- <distributionManagement>
- <site>
- <id>ignite-site</id>
- <url>${ignite.site}/${ignite.site.folder}</url>
- </site>
- </distributionManagement>
-
<modules>
<module>modules/tools</module>
<module>modules/core</module>
@@ -599,30 +590,6 @@
</execution>
</executions>
</plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <version>3.4</version>
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-ssh</artifactId>
- <version>2.8</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <goals>
- <goal>deploy</goal>
- </goals>
- <phase>deploy</phase>
- <configuration>
- <inputDirectory>${basedir}/target/site</inputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
</profile>
[16/50] [abbrv] incubator-ignite git commit: hot fix of ignite-869
Posted by se...@apache.org.
hot fix of ignite-869
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a983125a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a983125a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a983125a
Branch: refs/heads/ignite-836_2
Commit: a983125a2b68448e66b22e5df2e023cd6536be73
Parents: 17bf271
Author: Denis Magda <dm...@gridgain.com>
Authored: Fri May 8 15:15:40 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Fri May 8 15:15:40 2015 +0300
----------------------------------------------------------------------
.../tcp/ipfinder/cloud/TcpDiscoveryCloudIpFinderSelfTest.java | 2 --
1 file changed, 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a983125a/modules/cloud/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/cloud/TcpDiscoveryCloudIpFinderSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/cloud/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/cloud/TcpDiscoveryCloudIpFinderSelfTest.java b/modules/cloud/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/cloud/TcpDiscoveryCloudIpFinderSelfTest.java
index 7ac1994..aba0760 100644
--- a/modules/cloud/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/cloud/TcpDiscoveryCloudIpFinderSelfTest.java
+++ b/modules/cloud/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/cloud/TcpDiscoveryCloudIpFinderSelfTest.java
@@ -107,8 +107,6 @@ public class TcpDiscoveryCloudIpFinderSelfTest extends
Collection<InetSocketAddress> addresses = ipFinder.getRegisteredAddresses();
- assert addresses.size() > 0;
-
for (InetSocketAddress addr : addresses)
info("Registered instance: " + addr.getAddress().getHostAddress() + ":" + addr.getPort());
[13/50] [abbrv] incubator-ignite git commit: # ignite-157
Posted by se...@apache.org.
# ignite-157
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/30d306a4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/30d306a4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/30d306a4
Branch: refs/heads/ignite-836_2
Commit: 30d306a4a14e42fe93047947f7346271c81bf98f
Parents: 4dd6a63
Author: sboikov <sb...@gridgain.com>
Authored: Fri May 8 13:36:26 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri May 8 13:36:26 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/30d306a4/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 2e56b7a..574680a 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
@@ -138,6 +138,8 @@ public class IgniteCacheTestSuite3 extends TestSuite {
// Cache interceptor tests.
suite.addTest(IgniteCacheInterceptorSelfTestSuite.suite());
+ suite.addTestSuite(IgniteTxGetAfterStopTest.class);
+
return suite;
}
}
[34/50] [abbrv] incubator-ignite git commit: # Rename
TcpClientDiscoverySelfTest to TcpClientDiscoverySpiSelfTest
Posted by se...@apache.org.
# Rename TcpClientDiscoverySelfTest to TcpClientDiscoverySpiSelfTest
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c05e368d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c05e368d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c05e368d
Branch: refs/heads/ignite-836_2
Commit: c05e368d9a10e77d39f72fcad22f625402102fda
Parents: 28498e9
Author: sevdokimov <se...@gridgain.com>
Authored: Tue May 12 13:37:44 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Tue May 12 13:37:44 2015 +0300
----------------------------------------------------------------------
.../tcp/TcpClientDiscoverySelfTest.java | 1028 ------------------
.../tcp/TcpClientDiscoverySpiSelfTest.java | 1028 ++++++++++++++++++
.../IgniteSpiDiscoverySelfTestSuite.java | 2 +-
3 files changed, 1029 insertions(+), 1029 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c05e368d/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySelfTest.java
deleted file mode 100644
index 2a123ce..0000000
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySelfTest.java
+++ /dev/null
@@ -1,1028 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.spi.discovery.tcp;
-
-import org.apache.ignite.*;
-import org.apache.ignite.cluster.*;
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.events.*;
-import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.util.*;
-import org.apache.ignite.internal.util.io.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.lang.*;
-import org.apache.ignite.resources.*;
-import org.apache.ignite.spi.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-import org.apache.ignite.spi.discovery.tcp.messages.*;
-import org.apache.ignite.testframework.*;
-import org.apache.ignite.testframework.junits.common.*;
-import org.jetbrains.annotations.*;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import java.util.concurrent.*;
-import java.util.concurrent.atomic.*;
-
-import static java.util.concurrent.TimeUnit.*;
-import static org.apache.ignite.events.EventType.*;
-
-/**
- * Client-based discovery tests.
- */
-public class TcpClientDiscoverySelfTest extends GridCommonAbstractTest {
- /** */
- private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
-
- /** */
- private static final AtomicInteger srvIdx = new AtomicInteger();
-
- /** */
- private static final AtomicInteger clientIdx = new AtomicInteger();
-
- /** */
- private static Collection<UUID> srvNodeIds;
-
- /** */
- private static Collection<UUID> clientNodeIds;
-
- /** */
- private static int clientsPerSrv;
-
- /** */
- private static CountDownLatch srvJoinedLatch;
-
- /** */
- private static CountDownLatch srvLeftLatch;
-
- /** */
- private static CountDownLatch srvFailedLatch;
-
- /** */
- private static CountDownLatch clientJoinedLatch;
-
- /** */
- private static CountDownLatch clientLeftLatch;
-
- /** */
- private static CountDownLatch clientFailedLatch;
-
- /** */
- private static CountDownLatch msgLatch;
-
- /** */
- private UUID nodeId;
-
- /** */
- private TcpDiscoveryVmIpFinder clientIpFinder;
-
- /** */
- private long joinTimeout = TcpClientDiscoverySpi.DFLT_JOIN_TIMEOUT;
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
- IgniteConfiguration cfg = super.getConfiguration(gridName);
-
- cfg.setLocalHost("127.0.0.1");
-
- if (gridName.startsWith("server")) {
- TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
- disco.setIpFinder(IP_FINDER);
-
- cfg.setDiscoverySpi(disco);
- }
- else if (gridName.startsWith("client")) {
- TcpClientDiscoverySpi disco = new TestTcpClientDiscovery();
-
- disco.setJoinTimeout(joinTimeout);
-
- TcpDiscoveryVmIpFinder ipFinder;
-
- if (clientIpFinder != null)
- ipFinder = clientIpFinder;
- else {
- ipFinder = new TcpDiscoveryVmIpFinder();
-
- String addr = new ArrayList<>(IP_FINDER.getRegisteredAddresses()).
- get((clientIdx.get() - 1) / clientsPerSrv).toString();
-
- if (addr.startsWith("/"))
- addr = addr.substring(1);
-
- ipFinder.setAddresses(Arrays.asList(addr));
- }
-
- disco.setIpFinder(ipFinder);
-
- cfg.setDiscoverySpi(disco);
-
- String nodeId = cfg.getNodeId().toString();
-
- nodeId = "cc" + nodeId.substring(2);
-
- cfg.setNodeId(UUID.fromString(nodeId));
- }
-
- if (nodeId != null)
- cfg.setNodeId(nodeId);
-
- return cfg;
- }
-
- /** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- Collection<InetSocketAddress> addrs = IP_FINDER.getRegisteredAddresses();
-
- if (!F.isEmpty(addrs))
- IP_FINDER.unregisterAddresses(addrs);
-
- srvIdx.set(0);
- clientIdx.set(0);
-
- srvNodeIds = new GridConcurrentHashSet<>();
- clientNodeIds = new GridConcurrentHashSet<>();
-
- clientsPerSrv = 2;
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTest() throws Exception {
- stopAllClients(true);
- stopAllServers(true);
-
- nodeId = null;
- clientIpFinder = null;
- joinTimeout = TcpClientDiscoverySpi.DFLT_JOIN_TIMEOUT;
-
- assert G.allGrids().isEmpty();
- }
-
- /**
- *
- * @throws Exception
- */
- public void testJoinTimeout() throws Exception {
- clientIpFinder = new TcpDiscoveryVmIpFinder();
- joinTimeout = 1000;
-
- try {
- startClientNodes(1);
-
- fail("Client cannot be start because no server nodes run");
- }
- catch (IgniteCheckedException e) {
- IgniteSpiException spiEx = e.getCause(IgniteSpiException.class);
-
- assert spiEx != null : e;
-
- assert spiEx.getMessage().contains("Join process timed out") : spiEx.getMessage();
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClientNodeJoin() throws Exception {
- startServerNodes(3);
- startClientNodes(3);
-
- checkNodes(3, 3);
-
- srvJoinedLatch = new CountDownLatch(3);
- clientJoinedLatch = new CountDownLatch(3);
-
- attachListeners(3, 3);
-
- startClientNodes(1);
-
- await(srvJoinedLatch);
- await(clientJoinedLatch);
-
- checkNodes(3, 4);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClientNodeLeave() throws Exception {
- startServerNodes(3);
- startClientNodes(3);
-
- checkNodes(3, 3);
-
- srvLeftLatch = new CountDownLatch(3);
- clientLeftLatch = new CountDownLatch(2);
-
- attachListeners(3, 3);
-
- stopGrid("client-2");
-
- await(srvLeftLatch);
- await(clientLeftLatch);
-
- checkNodes(3, 2);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClientNodeFail() throws Exception {
- startServerNodes(3);
- startClientNodes(3);
-
- checkNodes(3, 3);
-
- srvFailedLatch = new CountDownLatch(3);
- clientFailedLatch = new CountDownLatch(2);
-
- attachListeners(3, 3);
-
- failClient(2);
-
- await(srvFailedLatch);
- await(clientFailedLatch);
-
- checkNodes(3, 2);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testServerNodeJoin() throws Exception {
- startServerNodes(3);
- startClientNodes(3);
-
- checkNodes(3, 3);
-
- srvJoinedLatch = new CountDownLatch(3);
- clientJoinedLatch = new CountDownLatch(3);
-
- attachListeners(3, 3);
-
- startServerNodes(1);
-
- await(srvJoinedLatch);
- await(clientJoinedLatch);
-
- checkNodes(4, 3);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testServerNodeLeave() throws Exception {
- startServerNodes(3);
- startClientNodes(3);
-
- checkNodes(3, 3);
-
- srvLeftLatch = new CountDownLatch(2);
- clientLeftLatch = new CountDownLatch(3);
-
- attachListeners(3, 3);
-
- stopGrid("server-2");
-
- await(srvLeftLatch);
- await(clientLeftLatch);
-
- checkNodes(2, 3);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testServerNodeFail() throws Exception {
- startServerNodes(3);
- startClientNodes(3);
-
- checkNodes(3, 3);
-
- srvFailedLatch = new CountDownLatch(2);
- clientFailedLatch = new CountDownLatch(3);
-
- attachListeners(3, 3);
-
- assert U.<Map>field(G.ignite("server-2").configuration().getDiscoverySpi(), "clientMsgWorkers").isEmpty();
-
- failServer(2);
-
- await(srvFailedLatch);
- await(clientFailedLatch);
-
- checkNodes(2, 3);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPing() throws Exception {
- startServerNodes(2);
- startClientNodes(1);
-
- Ignite srv0 = G.ignite("server-0");
- Ignite srv1 = G.ignite("server-1");
- Ignite client = G.ignite("client-0");
-
- assert ((IgniteEx)srv0).context().discovery().pingNode(client.cluster().localNode().id());
- assert ((IgniteEx)srv1).context().discovery().pingNode(client.cluster().localNode().id());
-
- assert ((IgniteEx)client).context().discovery().pingNode(srv0.cluster().localNode().id());
- assert ((IgniteEx)client).context().discovery().pingNode(srv1.cluster().localNode().id());
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClientReconnectOnRouterFail() throws Exception {
- clientsPerSrv = 1;
-
- startServerNodes(3);
- startClientNodes(3);
-
- checkNodes(3, 3);
-
- setClientRouter(2, 0);
-
- srvFailedLatch = new CountDownLatch(2);
- clientFailedLatch = new CountDownLatch(3);
-
- attachListeners(2, 3);
-
- failServer(2);
-
- await(srvFailedLatch);
- await(clientFailedLatch);
-
- checkNodes(2, 3);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClientReconnectOnNetworkProblem() throws Exception {
- clientsPerSrv = 1;
-
- startServerNodes(3);
- startClientNodes(3);
-
- checkNodes(3, 3);
-
- setClientRouter(2, 0);
-
- srvFailedLatch = new CountDownLatch(2);
- clientFailedLatch = new CountDownLatch(3);
-
- attachListeners(2, 3);
-
- ((TcpClientDiscoverySpi)G.ignite("client-2").configuration().getDiscoverySpi()).brokeConnection();
-
- G.ignite("client-2").message().remoteListen(null, new MessageListener()); // Send some discovery message.
-
- checkNodes(3, 3);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testGetMissedMessagesOnReconnect() throws Exception {
- clientsPerSrv = 1;
-
- startServerNodes(3);
- startClientNodes(2);
-
- checkNodes(3, 2);
-
- clientLeftLatch = new CountDownLatch(1);
- srvLeftLatch = new CountDownLatch(2);
-
- attachListeners(2, 2);
-
- ((TestTcpClientDiscovery)G.ignite("client-1").configuration().getDiscoverySpi()).pauseAll();
-
- stopGrid("server-2");
-
- await(srvLeftLatch);
- await(srvLeftLatch);
-
- Thread.sleep(500);
-
- assert G.ignite("client-0").cluster().nodes().size() == 4;
- assert G.ignite("client-1").cluster().nodes().size() == 5;
-
- clientLeftLatch = new CountDownLatch(1);
-
- ((TestTcpClientDiscovery)G.ignite("client-1").configuration().getDiscoverySpi()).resume();
-
- await(clientLeftLatch);
-
- checkNodes(2, 2);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClientSegmentation() throws Exception {
- clientsPerSrv = 1;
-
- startServerNodes(3);
- startClientNodes(3);
-
- checkNodes(3, 3);
-
-// setClientRouter(2, 2);
-
- srvFailedLatch = new CountDownLatch(2 + 2);
- clientFailedLatch = new CountDownLatch(2 + 2);
-
- attachListeners(2, 2);
-
- final CountDownLatch client2StoppedLatch = new CountDownLatch(1);
-
- IgnitionListener lsnr = new IgnitionListener() {
- @Override public void onStateChange(@Nullable String name, IgniteState state) {
- if (state == IgniteState.STOPPED_ON_SEGMENTATION)
- client2StoppedLatch.countDown();
- }
- };
- G.addListener(lsnr);
-
- try {
- failServer(2);
-
- await(srvFailedLatch);
- await(clientFailedLatch);
-
- await(client2StoppedLatch);
-
- checkNodes(2, 2);
- }
- finally {
- G.removeListener(lsnr);
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClientNodeJoinOneServer() throws Exception {
- startServerNodes(1);
-
- srvJoinedLatch = new CountDownLatch(1);
-
- attachListeners(1, 0);
-
- startClientNodes(1);
-
- await(srvJoinedLatch);
-
- checkNodes(1, 1);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClientNodeLeaveOneServer() throws Exception {
- startServerNodes(1);
- startClientNodes(1);
-
- checkNodes(1, 1);
-
- srvLeftLatch = new CountDownLatch(1);
-
- attachListeners(1, 0);
-
- stopGrid("client-0");
-
- await(srvLeftLatch);
-
- checkNodes(1, 0);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClientNodeFailOneServer() throws Exception {
- startServerNodes(1);
- startClientNodes(1);
-
- checkNodes(1, 1);
-
- srvFailedLatch = new CountDownLatch(1);
-
- attachListeners(1, 0);
-
- failClient(0);
-
- await(srvFailedLatch);
-
- checkNodes(1, 0);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testMetrics() throws Exception {
- startServerNodes(3);
- startClientNodes(3);
-
- checkNodes(3, 3);
-
- attachListeners(3, 3);
-
- assertTrue(checkMetrics(3, 3, 0));
-
- G.ignite("client-0").compute().broadcast(F.noop());
-
- assertTrue(GridTestUtils.waitForCondition(new PA() {
- @Override public boolean apply() {
- return checkMetrics(3, 3, 1);
- }
- }, 10000));
-
- checkMetrics(3, 3, 1);
-
- G.ignite("server-0").compute().broadcast(F.noop());
-
- assertTrue(GridTestUtils.waitForCondition(new PA() {
- @Override public boolean apply() {
- return checkMetrics(3, 3, 2);
- }
- }, 10000));
- }
-
- /**
- * @param srvCnt Number of Number of server nodes.
- * @param clientCnt Number of client nodes.
- * @param execJobsCnt Expected number of executed jobs.
- * @return Whether metrics are correct.
- */
- private boolean checkMetrics(int srvCnt, int clientCnt, int execJobsCnt) {
- for (int i = 0; i < srvCnt; i++) {
- Ignite g = G.ignite("server-" + i);
-
- for (ClusterNode n : g.cluster().nodes()) {
- if (n.metrics().getTotalExecutedJobs() != execJobsCnt)
- return false;
- }
- }
-
- for (int i = 0; i < clientCnt; i++) {
- Ignite g = G.ignite("client-" + i);
-
- for (ClusterNode n : g.cluster().nodes()) {
- if (n.metrics().getTotalExecutedJobs() != execJobsCnt)
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testDataExchangeFromServer() throws Exception {
- testDataExchange("server-0");
- }
-
- /**
- * TODO: IGNITE-587.
- *
- * @throws Exception If failed.
- */
- public void testDataExchangeFromClient() throws Exception {
- testDataExchange("client-0");
- }
-
- /**
- * @throws Exception If failed.
- */
- private void testDataExchange(String masterName) throws Exception {
- startServerNodes(2);
- startClientNodes(2);
-
- checkNodes(2, 2);
-
- IgniteMessaging msg = grid(masterName).message();
-
- UUID id = null;
-
- try {
- id = msg.remoteListen(null, new MessageListener());
-
- msgLatch = new CountDownLatch(4);
-
- msg.send(null, "Message 1");
-
- await(msgLatch);
-
- startServerNodes(1);
- startClientNodes(1);
-
- checkNodes(3, 3);
-
- msgLatch = new CountDownLatch(6);
-
- msg.send(null, "Message 2");
-
- await(msgLatch);
- }
- finally {
- if (id != null)
- msg.stopRemoteListen(id);
- }
- }
-
- /**
- * @throws Exception If any error occurs.
- */
- public void testDuplicateId() throws Exception {
- startServerNodes(2);
-
- nodeId = G.ignite("server-1").cluster().localNode().id();
-
- try {
- startGrid("client-0");
-
- assert false;
- }
- catch (IgniteCheckedException e) {
- IgniteSpiException spiEx = e.getCause(IgniteSpiException.class);
-
- assert spiEx != null : e;
- assert spiEx.getMessage().contains("same ID") : spiEx.getMessage();
- }
- }
-
- /**
- * @throws Exception If any error occurs.
- */
- public void testTimeoutWaitingNodeAddedMessage() throws Exception {
- startServerNodes(2);
-
- final CountDownLatch cnt = new CountDownLatch(1);
-
- ((TcpDiscoverySpi)G.ignite("server-1").configuration().getDiscoverySpi()).addSendMessageListener(
- new IgniteInClosure<TcpDiscoveryAbstractMessage>() {
- @Override public void apply(TcpDiscoveryAbstractMessage msg) {
- try {
- cnt.await(10, MINUTES);
- }
- catch (InterruptedException e) {
- Thread.currentThread().interrupt();
-
- throw new IgniteInterruptedException(e);
- }
- }
- });
-
- try {
- startGrid("client-0");
-
- assert false;
- }
- catch (IgniteCheckedException e) {
- cnt.countDown();
-
- IgniteSpiException spiEx = e.getCause(IgniteSpiException.class);
-
- assert spiEx != null : e;
- assert spiEx.getMessage().contains("Join process timed out") : spiEx.getMessage();
- }
- }
-
- /**
- * @throws Exception If any error occurs.
- */
- public void testGridStartTime() throws Exception {
- startServerNodes(2);
-
- startClientNodes(2);
-
- long startTime = -1;
-
- for (Ignite g : G.allGrids()) {
- IgniteEx kernal = (IgniteKernal)g;
-
- assertTrue(kernal.context().discovery().gridStartTime() > 0);
-
- if (startTime == -1)
- startTime = kernal.context().discovery().gridStartTime();
- else
- assertEquals(startTime, kernal.context().discovery().gridStartTime());
- }
- }
-
- /**
- * @param clientIdx Index.
- * @throws Exception In case of error.
- */
- private void setClientRouter(int clientIdx, int srvIdx) throws Exception {
- TcpClientDiscoverySpi disco =
- (TcpClientDiscoverySpi)G.ignite("client-" + clientIdx).configuration().getDiscoverySpi();
-
- TcpDiscoveryVmIpFinder ipFinder = (TcpDiscoveryVmIpFinder)disco.getIpFinder();
-
- String addr = new ArrayList<>(IP_FINDER.getRegisteredAddresses()).get(srvIdx).toString();
-
- if (addr.startsWith("/"))
- addr = addr.substring(1);
-
- ipFinder.setAddresses(Arrays.asList(addr));
- }
-
- /**
- * @param cnt Number of nodes.
- * @throws Exception In case of error.
- */
- private void startServerNodes(int cnt) throws Exception {
- for (int i = 0; i < cnt; i++) {
- Ignite g = startGrid("server-" + srvIdx.getAndIncrement());
-
- srvNodeIds.add(g.cluster().localNode().id());
- }
- }
-
- /**
- * @param cnt Number of nodes.
- * @throws Exception In case of error.
- */
- private void startClientNodes(int cnt) throws Exception {
- for (int i = 0; i < cnt; i++) {
- Ignite g = startGrid("client-" + clientIdx.getAndIncrement());
-
- clientNodeIds.add(g.cluster().localNode().id());
- }
- }
-
- /**
- * @param idx Index.
- */
- private void failServer(int idx) {
- ((TcpDiscoverySpi)G.ignite("server-" + idx).configuration().getDiscoverySpi()).simulateNodeFailure();
- }
-
- /**
- * @param idx Index.
- */
- private void failClient(int idx) {
- ((TcpClientDiscoverySpi)G.ignite("client-" + idx).configuration().getDiscoverySpi()).simulateNodeFailure();
- }
-
- /**
- * @param srvCnt Number of server nodes.
- * @param clientCnt Number of client nodes.
- */
- private void attachListeners(int srvCnt, int clientCnt) throws Exception {
- if (srvJoinedLatch != null) {
- for (int i = 0; i < srvCnt; i++) {
- G.ignite("server-" + i).events().localListen(new IgnitePredicate<Event>() {
- @Override public boolean apply(Event evt) {
- info("Joined event fired on server: " + evt);
-
- srvJoinedLatch.countDown();
-
- return true;
- }
- }, EVT_NODE_JOINED);
- }
- }
-
- if (srvLeftLatch != null) {
- for (int i = 0; i < srvCnt; i++) {
- G.ignite("server-" + i).events().localListen(new IgnitePredicate<Event>() {
- @Override public boolean apply(Event evt) {
- info("Left event fired on server: " + evt);
-
- srvLeftLatch.countDown();
-
- return true;
- }
- }, EVT_NODE_LEFT);
- }
- }
-
- if (srvFailedLatch != null) {
- for (int i = 0; i < srvCnt; i++) {
- G.ignite("server-" + i).events().localListen(new IgnitePredicate<Event>() {
- @Override public boolean apply(Event evt) {
- info("Failed event fired on server: " + evt);
-
- srvFailedLatch.countDown();
-
- return true;
- }
- }, EVT_NODE_FAILED);
- }
- }
-
- if (clientJoinedLatch != null) {
- for (int i = 0; i < clientCnt; i++) {
- G.ignite("client-" + i).events().localListen(new IgnitePredicate<Event>() {
- @Override public boolean apply(Event evt) {
- info("Joined event fired on client: " + evt);
-
- clientJoinedLatch.countDown();
-
- return true;
- }
- }, EVT_NODE_JOINED);
- }
- }
-
- if (clientLeftLatch != null) {
- for (int i = 0; i < clientCnt; i++) {
- G.ignite("client-" + i).events().localListen(new IgnitePredicate<Event>() {
- @Override public boolean apply(Event evt) {
- info("Left event fired on client: " + evt);
-
- clientLeftLatch.countDown();
-
- return true;
- }
- }, EVT_NODE_LEFT);
- }
- }
-
- if (clientFailedLatch != null) {
- for (int i = 0; i < clientCnt; i++) {
- G.ignite("client-" + i).events().localListen(new IgnitePredicate<Event>() {
- @Override public boolean apply(Event evt) {
- info("Failed event fired on client: " + evt);
-
- clientFailedLatch.countDown();
-
- return true;
- }
- }, EVT_NODE_FAILED);
- }
- }
- }
-
- /**
- * @param srvCnt Number of server nodes.
- * @param clientCnt Number of client nodes.
- */
- private void checkNodes(int srvCnt, int clientCnt) {
- for (int i = 0; i < srvCnt; i++) {
- Ignite g = G.ignite("server-" + i);
-
- assertTrue(srvNodeIds.contains(g.cluster().localNode().id()));
-
- assertFalse(g.cluster().localNode().isClient());
-
- checkRemoteNodes(g, srvCnt + clientCnt - 1);
- }
-
- for (int i = 0; i < clientCnt; i++) {
- Ignite g = G.ignite("client-" + i);
-
- assertTrue(clientNodeIds.contains(g.cluster().localNode().id()));
-
- assertTrue(g.cluster().localNode().isClient());
-
- checkRemoteNodes(g, srvCnt + clientCnt - 1);
- }
- }
-
- /**
- * @param ignite Grid.
- * @param expCnt Expected nodes count.
- */
- @SuppressWarnings("TypeMayBeWeakened")
- private void checkRemoteNodes(Ignite ignite, int expCnt) {
- Collection<ClusterNode> nodes = ignite.cluster().forRemotes().nodes();
-
- assertEquals(expCnt, nodes.size());
-
- for (ClusterNode node : nodes) {
- UUID id = node.id();
-
- if (clientNodeIds.contains(id))
- assertTrue(node.isClient());
- else if (srvNodeIds.contains(id))
- assertFalse(node.isClient());
- else
- assert false : "Unexpected node ID: " + id;
- }
- }
-
- /**
- * @param latch Latch.
- * @throws InterruptedException If interrupted.
- */
- private void await(CountDownLatch latch) throws InterruptedException {
- assertTrue("Latch count: " + latch.getCount(), latch.await(10000, MILLISECONDS));
- }
-
- /**
- */
- private static class MessageListener implements IgniteBiPredicate<UUID, Object> {
- @IgniteInstanceResource
- private Ignite ignite;
-
- /** {@inheritDoc} */
- @Override public boolean apply(UUID uuid, Object msg) {
- X.println(">>> Received [locNodeId=" + ignite.configuration().getNodeId() + ", msg=" + msg + ']');
-
- msgLatch.countDown();
-
- return true;
- }
- }
-
- /**
- *
- */
- private static class TestTcpClientDiscovery extends TcpClientDiscoverySpi {
- /** */
- private final Object mux = new Object();
-
- /** */
- private final AtomicBoolean writeLock = new AtomicBoolean();
-
- /** */
- private final AtomicBoolean openSockLock = new AtomicBoolean();
-
- /**
- * @param lock Lock.
- */
- private void waitFor(AtomicBoolean lock) {
- try {
- synchronized (mux) {
- while (lock.get())
- mux.wait();
- }
- }
- catch (InterruptedException e) {
- Thread.currentThread().interrupt();
-
- throw new RuntimeException(e);
- }
- }
-
- /**
- * @param isPause Is lock.
- * @param locks Locks.
- */
- private void pauseResumeOperation(boolean isPause, AtomicBoolean... locks) {
- synchronized (mux) {
- for (AtomicBoolean lock : locks)
- lock.set(isPause);
-
- mux.notifyAll();
- }
- }
-
- /** {@inheritDoc} */
- @Override protected void writeToSocket(Socket sock, TcpDiscoveryAbstractMessage msg,
- GridByteArrayOutputStream bout) throws IOException, IgniteCheckedException {
- waitFor(writeLock);
-
- super.writeToSocket(sock, msg, bout);
- }
-
- /** {@inheritDoc} */
- @Override protected Socket openSocket(InetSocketAddress sockAddr) throws IOException {
- waitFor(openSockLock);
-
- return super.openSocket(sockAddr);
- }
-
- /**
- *
- */
- private void pauseAll() {
- pauseResumeOperation(true, openSockLock, writeLock);
-
- brokeConnection();
- }
-
- /**
- *
- */
- private void resume() {
- pauseResumeOperation(false, openSockLock, writeLock);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c05e368d/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
new file mode 100644
index 0000000..a06bfd9
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
@@ -0,0 +1,1028 @@
+/*
+ * 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.spi.discovery.tcp;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.events.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.util.*;
+import org.apache.ignite.internal.util.io.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.resources.*;
+import org.apache.ignite.spi.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.spi.discovery.tcp.messages.*;
+import org.apache.ignite.testframework.*;
+import org.apache.ignite.testframework.junits.common.*;
+import org.jetbrains.annotations.*;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.*;
+
+import static java.util.concurrent.TimeUnit.*;
+import static org.apache.ignite.events.EventType.*;
+
+/**
+ * Client-based discovery tests.
+ */
+public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
+ /** */
+ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+ /** */
+ private static final AtomicInteger srvIdx = new AtomicInteger();
+
+ /** */
+ private static final AtomicInteger clientIdx = new AtomicInteger();
+
+ /** */
+ private static Collection<UUID> srvNodeIds;
+
+ /** */
+ private static Collection<UUID> clientNodeIds;
+
+ /** */
+ private static int clientsPerSrv;
+
+ /** */
+ private static CountDownLatch srvJoinedLatch;
+
+ /** */
+ private static CountDownLatch srvLeftLatch;
+
+ /** */
+ private static CountDownLatch srvFailedLatch;
+
+ /** */
+ private static CountDownLatch clientJoinedLatch;
+
+ /** */
+ private static CountDownLatch clientLeftLatch;
+
+ /** */
+ private static CountDownLatch clientFailedLatch;
+
+ /** */
+ private static CountDownLatch msgLatch;
+
+ /** */
+ private UUID nodeId;
+
+ /** */
+ private TcpDiscoveryVmIpFinder clientIpFinder;
+
+ /** */
+ private long joinTimeout = TcpClientDiscoverySpi.DFLT_JOIN_TIMEOUT;
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ cfg.setLocalHost("127.0.0.1");
+
+ if (gridName.startsWith("server")) {
+ TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+ disco.setIpFinder(IP_FINDER);
+
+ cfg.setDiscoverySpi(disco);
+ }
+ else if (gridName.startsWith("client")) {
+ TcpClientDiscoverySpi disco = new TestTcpClientDiscovery();
+
+ disco.setJoinTimeout(joinTimeout);
+
+ TcpDiscoveryVmIpFinder ipFinder;
+
+ if (clientIpFinder != null)
+ ipFinder = clientIpFinder;
+ else {
+ ipFinder = new TcpDiscoveryVmIpFinder();
+
+ String addr = new ArrayList<>(IP_FINDER.getRegisteredAddresses()).
+ get((clientIdx.get() - 1) / clientsPerSrv).toString();
+
+ if (addr.startsWith("/"))
+ addr = addr.substring(1);
+
+ ipFinder.setAddresses(Arrays.asList(addr));
+ }
+
+ disco.setIpFinder(ipFinder);
+
+ cfg.setDiscoverySpi(disco);
+
+ String nodeId = cfg.getNodeId().toString();
+
+ nodeId = "cc" + nodeId.substring(2);
+
+ cfg.setNodeId(UUID.fromString(nodeId));
+ }
+
+ if (nodeId != null)
+ cfg.setNodeId(nodeId);
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ Collection<InetSocketAddress> addrs = IP_FINDER.getRegisteredAddresses();
+
+ if (!F.isEmpty(addrs))
+ IP_FINDER.unregisterAddresses(addrs);
+
+ srvIdx.set(0);
+ clientIdx.set(0);
+
+ srvNodeIds = new GridConcurrentHashSet<>();
+ clientNodeIds = new GridConcurrentHashSet<>();
+
+ clientsPerSrv = 2;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ stopAllClients(true);
+ stopAllServers(true);
+
+ nodeId = null;
+ clientIpFinder = null;
+ joinTimeout = TcpClientDiscoverySpi.DFLT_JOIN_TIMEOUT;
+
+ assert G.allGrids().isEmpty();
+ }
+
+ /**
+ *
+ * @throws Exception
+ */
+ public void testJoinTimeout() throws Exception {
+ clientIpFinder = new TcpDiscoveryVmIpFinder();
+ joinTimeout = 1000;
+
+ try {
+ startClientNodes(1);
+
+ fail("Client cannot be start because no server nodes run");
+ }
+ catch (IgniteCheckedException e) {
+ IgniteSpiException spiEx = e.getCause(IgniteSpiException.class);
+
+ assert spiEx != null : e;
+
+ assert spiEx.getMessage().contains("Join process timed out") : spiEx.getMessage();
+ }
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientNodeJoin() throws Exception {
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ srvJoinedLatch = new CountDownLatch(3);
+ clientJoinedLatch = new CountDownLatch(3);
+
+ attachListeners(3, 3);
+
+ startClientNodes(1);
+
+ await(srvJoinedLatch);
+ await(clientJoinedLatch);
+
+ checkNodes(3, 4);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientNodeLeave() throws Exception {
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ srvLeftLatch = new CountDownLatch(3);
+ clientLeftLatch = new CountDownLatch(2);
+
+ attachListeners(3, 3);
+
+ stopGrid("client-2");
+
+ await(srvLeftLatch);
+ await(clientLeftLatch);
+
+ checkNodes(3, 2);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientNodeFail() throws Exception {
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ srvFailedLatch = new CountDownLatch(3);
+ clientFailedLatch = new CountDownLatch(2);
+
+ attachListeners(3, 3);
+
+ failClient(2);
+
+ await(srvFailedLatch);
+ await(clientFailedLatch);
+
+ checkNodes(3, 2);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testServerNodeJoin() throws Exception {
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ srvJoinedLatch = new CountDownLatch(3);
+ clientJoinedLatch = new CountDownLatch(3);
+
+ attachListeners(3, 3);
+
+ startServerNodes(1);
+
+ await(srvJoinedLatch);
+ await(clientJoinedLatch);
+
+ checkNodes(4, 3);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testServerNodeLeave() throws Exception {
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ srvLeftLatch = new CountDownLatch(2);
+ clientLeftLatch = new CountDownLatch(3);
+
+ attachListeners(3, 3);
+
+ stopGrid("server-2");
+
+ await(srvLeftLatch);
+ await(clientLeftLatch);
+
+ checkNodes(2, 3);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testServerNodeFail() throws Exception {
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ srvFailedLatch = new CountDownLatch(2);
+ clientFailedLatch = new CountDownLatch(3);
+
+ attachListeners(3, 3);
+
+ assert U.<Map>field(G.ignite("server-2").configuration().getDiscoverySpi(), "clientMsgWorkers").isEmpty();
+
+ failServer(2);
+
+ await(srvFailedLatch);
+ await(clientFailedLatch);
+
+ checkNodes(2, 3);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testPing() throws Exception {
+ startServerNodes(2);
+ startClientNodes(1);
+
+ Ignite srv0 = G.ignite("server-0");
+ Ignite srv1 = G.ignite("server-1");
+ Ignite client = G.ignite("client-0");
+
+ assert ((IgniteEx)srv0).context().discovery().pingNode(client.cluster().localNode().id());
+ assert ((IgniteEx)srv1).context().discovery().pingNode(client.cluster().localNode().id());
+
+ assert ((IgniteEx)client).context().discovery().pingNode(srv0.cluster().localNode().id());
+ assert ((IgniteEx)client).context().discovery().pingNode(srv1.cluster().localNode().id());
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientReconnectOnRouterFail() throws Exception {
+ clientsPerSrv = 1;
+
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ setClientRouter(2, 0);
+
+ srvFailedLatch = new CountDownLatch(2);
+ clientFailedLatch = new CountDownLatch(3);
+
+ attachListeners(2, 3);
+
+ failServer(2);
+
+ await(srvFailedLatch);
+ await(clientFailedLatch);
+
+ checkNodes(2, 3);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientReconnectOnNetworkProblem() throws Exception {
+ clientsPerSrv = 1;
+
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ setClientRouter(2, 0);
+
+ srvFailedLatch = new CountDownLatch(2);
+ clientFailedLatch = new CountDownLatch(3);
+
+ attachListeners(2, 3);
+
+ ((TcpClientDiscoverySpi)G.ignite("client-2").configuration().getDiscoverySpi()).brokeConnection();
+
+ G.ignite("client-2").message().remoteListen(null, new MessageListener()); // Send some discovery message.
+
+ checkNodes(3, 3);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testGetMissedMessagesOnReconnect() throws Exception {
+ clientsPerSrv = 1;
+
+ startServerNodes(3);
+ startClientNodes(2);
+
+ checkNodes(3, 2);
+
+ clientLeftLatch = new CountDownLatch(1);
+ srvLeftLatch = new CountDownLatch(2);
+
+ attachListeners(2, 2);
+
+ ((TestTcpClientDiscovery)G.ignite("client-1").configuration().getDiscoverySpi()).pauseAll();
+
+ stopGrid("server-2");
+
+ await(srvLeftLatch);
+ await(srvLeftLatch);
+
+ Thread.sleep(500);
+
+ assert G.ignite("client-0").cluster().nodes().size() == 4;
+ assert G.ignite("client-1").cluster().nodes().size() == 5;
+
+ clientLeftLatch = new CountDownLatch(1);
+
+ ((TestTcpClientDiscovery)G.ignite("client-1").configuration().getDiscoverySpi()).resume();
+
+ await(clientLeftLatch);
+
+ checkNodes(2, 2);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientSegmentation() throws Exception {
+ clientsPerSrv = 1;
+
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+// setClientRouter(2, 2);
+
+ srvFailedLatch = new CountDownLatch(2 + 2);
+ clientFailedLatch = new CountDownLatch(2 + 2);
+
+ attachListeners(2, 2);
+
+ final CountDownLatch client2StoppedLatch = new CountDownLatch(1);
+
+ IgnitionListener lsnr = new IgnitionListener() {
+ @Override public void onStateChange(@Nullable String name, IgniteState state) {
+ if (state == IgniteState.STOPPED_ON_SEGMENTATION)
+ client2StoppedLatch.countDown();
+ }
+ };
+ G.addListener(lsnr);
+
+ try {
+ failServer(2);
+
+ await(srvFailedLatch);
+ await(clientFailedLatch);
+
+ await(client2StoppedLatch);
+
+ checkNodes(2, 2);
+ }
+ finally {
+ G.removeListener(lsnr);
+ }
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientNodeJoinOneServer() throws Exception {
+ startServerNodes(1);
+
+ srvJoinedLatch = new CountDownLatch(1);
+
+ attachListeners(1, 0);
+
+ startClientNodes(1);
+
+ await(srvJoinedLatch);
+
+ checkNodes(1, 1);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientNodeLeaveOneServer() throws Exception {
+ startServerNodes(1);
+ startClientNodes(1);
+
+ checkNodes(1, 1);
+
+ srvLeftLatch = new CountDownLatch(1);
+
+ attachListeners(1, 0);
+
+ stopGrid("client-0");
+
+ await(srvLeftLatch);
+
+ checkNodes(1, 0);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientNodeFailOneServer() throws Exception {
+ startServerNodes(1);
+ startClientNodes(1);
+
+ checkNodes(1, 1);
+
+ srvFailedLatch = new CountDownLatch(1);
+
+ attachListeners(1, 0);
+
+ failClient(0);
+
+ await(srvFailedLatch);
+
+ checkNodes(1, 0);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testMetrics() throws Exception {
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ attachListeners(3, 3);
+
+ assertTrue(checkMetrics(3, 3, 0));
+
+ G.ignite("client-0").compute().broadcast(F.noop());
+
+ assertTrue(GridTestUtils.waitForCondition(new PA() {
+ @Override public boolean apply() {
+ return checkMetrics(3, 3, 1);
+ }
+ }, 10000));
+
+ checkMetrics(3, 3, 1);
+
+ G.ignite("server-0").compute().broadcast(F.noop());
+
+ assertTrue(GridTestUtils.waitForCondition(new PA() {
+ @Override public boolean apply() {
+ return checkMetrics(3, 3, 2);
+ }
+ }, 10000));
+ }
+
+ /**
+ * @param srvCnt Number of Number of server nodes.
+ * @param clientCnt Number of client nodes.
+ * @param execJobsCnt Expected number of executed jobs.
+ * @return Whether metrics are correct.
+ */
+ private boolean checkMetrics(int srvCnt, int clientCnt, int execJobsCnt) {
+ for (int i = 0; i < srvCnt; i++) {
+ Ignite g = G.ignite("server-" + i);
+
+ for (ClusterNode n : g.cluster().nodes()) {
+ if (n.metrics().getTotalExecutedJobs() != execJobsCnt)
+ return false;
+ }
+ }
+
+ for (int i = 0; i < clientCnt; i++) {
+ Ignite g = G.ignite("client-" + i);
+
+ for (ClusterNode n : g.cluster().nodes()) {
+ if (n.metrics().getTotalExecutedJobs() != execJobsCnt)
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testDataExchangeFromServer() throws Exception {
+ testDataExchange("server-0");
+ }
+
+ /**
+ * TODO: IGNITE-587.
+ *
+ * @throws Exception If failed.
+ */
+ public void testDataExchangeFromClient() throws Exception {
+ testDataExchange("client-0");
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ private void testDataExchange(String masterName) throws Exception {
+ startServerNodes(2);
+ startClientNodes(2);
+
+ checkNodes(2, 2);
+
+ IgniteMessaging msg = grid(masterName).message();
+
+ UUID id = null;
+
+ try {
+ id = msg.remoteListen(null, new MessageListener());
+
+ msgLatch = new CountDownLatch(4);
+
+ msg.send(null, "Message 1");
+
+ await(msgLatch);
+
+ startServerNodes(1);
+ startClientNodes(1);
+
+ checkNodes(3, 3);
+
+ msgLatch = new CountDownLatch(6);
+
+ msg.send(null, "Message 2");
+
+ await(msgLatch);
+ }
+ finally {
+ if (id != null)
+ msg.stopRemoteListen(id);
+ }
+ }
+
+ /**
+ * @throws Exception If any error occurs.
+ */
+ public void testDuplicateId() throws Exception {
+ startServerNodes(2);
+
+ nodeId = G.ignite("server-1").cluster().localNode().id();
+
+ try {
+ startGrid("client-0");
+
+ assert false;
+ }
+ catch (IgniteCheckedException e) {
+ IgniteSpiException spiEx = e.getCause(IgniteSpiException.class);
+
+ assert spiEx != null : e;
+ assert spiEx.getMessage().contains("same ID") : spiEx.getMessage();
+ }
+ }
+
+ /**
+ * @throws Exception If any error occurs.
+ */
+ public void testTimeoutWaitingNodeAddedMessage() throws Exception {
+ startServerNodes(2);
+
+ final CountDownLatch cnt = new CountDownLatch(1);
+
+ ((TcpDiscoverySpi)G.ignite("server-1").configuration().getDiscoverySpi()).addSendMessageListener(
+ new IgniteInClosure<TcpDiscoveryAbstractMessage>() {
+ @Override public void apply(TcpDiscoveryAbstractMessage msg) {
+ try {
+ cnt.await(10, MINUTES);
+ }
+ catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+
+ throw new IgniteInterruptedException(e);
+ }
+ }
+ });
+
+ try {
+ startGrid("client-0");
+
+ assert false;
+ }
+ catch (IgniteCheckedException e) {
+ cnt.countDown();
+
+ IgniteSpiException spiEx = e.getCause(IgniteSpiException.class);
+
+ assert spiEx != null : e;
+ assert spiEx.getMessage().contains("Join process timed out") : spiEx.getMessage();
+ }
+ }
+
+ /**
+ * @throws Exception If any error occurs.
+ */
+ public void testGridStartTime() throws Exception {
+ startServerNodes(2);
+
+ startClientNodes(2);
+
+ long startTime = -1;
+
+ for (Ignite g : G.allGrids()) {
+ IgniteEx kernal = (IgniteKernal)g;
+
+ assertTrue(kernal.context().discovery().gridStartTime() > 0);
+
+ if (startTime == -1)
+ startTime = kernal.context().discovery().gridStartTime();
+ else
+ assertEquals(startTime, kernal.context().discovery().gridStartTime());
+ }
+ }
+
+ /**
+ * @param clientIdx Index.
+ * @throws Exception In case of error.
+ */
+ private void setClientRouter(int clientIdx, int srvIdx) throws Exception {
+ TcpClientDiscoverySpi disco =
+ (TcpClientDiscoverySpi)G.ignite("client-" + clientIdx).configuration().getDiscoverySpi();
+
+ TcpDiscoveryVmIpFinder ipFinder = (TcpDiscoveryVmIpFinder)disco.getIpFinder();
+
+ String addr = new ArrayList<>(IP_FINDER.getRegisteredAddresses()).get(srvIdx).toString();
+
+ if (addr.startsWith("/"))
+ addr = addr.substring(1);
+
+ ipFinder.setAddresses(Arrays.asList(addr));
+ }
+
+ /**
+ * @param cnt Number of nodes.
+ * @throws Exception In case of error.
+ */
+ private void startServerNodes(int cnt) throws Exception {
+ for (int i = 0; i < cnt; i++) {
+ Ignite g = startGrid("server-" + srvIdx.getAndIncrement());
+
+ srvNodeIds.add(g.cluster().localNode().id());
+ }
+ }
+
+ /**
+ * @param cnt Number of nodes.
+ * @throws Exception In case of error.
+ */
+ private void startClientNodes(int cnt) throws Exception {
+ for (int i = 0; i < cnt; i++) {
+ Ignite g = startGrid("client-" + clientIdx.getAndIncrement());
+
+ clientNodeIds.add(g.cluster().localNode().id());
+ }
+ }
+
+ /**
+ * @param idx Index.
+ */
+ private void failServer(int idx) {
+ ((TcpDiscoverySpi)G.ignite("server-" + idx).configuration().getDiscoverySpi()).simulateNodeFailure();
+ }
+
+ /**
+ * @param idx Index.
+ */
+ private void failClient(int idx) {
+ ((TcpClientDiscoverySpi)G.ignite("client-" + idx).configuration().getDiscoverySpi()).simulateNodeFailure();
+ }
+
+ /**
+ * @param srvCnt Number of server nodes.
+ * @param clientCnt Number of client nodes.
+ */
+ private void attachListeners(int srvCnt, int clientCnt) throws Exception {
+ if (srvJoinedLatch != null) {
+ for (int i = 0; i < srvCnt; i++) {
+ G.ignite("server-" + i).events().localListen(new IgnitePredicate<Event>() {
+ @Override public boolean apply(Event evt) {
+ info("Joined event fired on server: " + evt);
+
+ srvJoinedLatch.countDown();
+
+ return true;
+ }
+ }, EVT_NODE_JOINED);
+ }
+ }
+
+ if (srvLeftLatch != null) {
+ for (int i = 0; i < srvCnt; i++) {
+ G.ignite("server-" + i).events().localListen(new IgnitePredicate<Event>() {
+ @Override public boolean apply(Event evt) {
+ info("Left event fired on server: " + evt);
+
+ srvLeftLatch.countDown();
+
+ return true;
+ }
+ }, EVT_NODE_LEFT);
+ }
+ }
+
+ if (srvFailedLatch != null) {
+ for (int i = 0; i < srvCnt; i++) {
+ G.ignite("server-" + i).events().localListen(new IgnitePredicate<Event>() {
+ @Override public boolean apply(Event evt) {
+ info("Failed event fired on server: " + evt);
+
+ srvFailedLatch.countDown();
+
+ return true;
+ }
+ }, EVT_NODE_FAILED);
+ }
+ }
+
+ if (clientJoinedLatch != null) {
+ for (int i = 0; i < clientCnt; i++) {
+ G.ignite("client-" + i).events().localListen(new IgnitePredicate<Event>() {
+ @Override public boolean apply(Event evt) {
+ info("Joined event fired on client: " + evt);
+
+ clientJoinedLatch.countDown();
+
+ return true;
+ }
+ }, EVT_NODE_JOINED);
+ }
+ }
+
+ if (clientLeftLatch != null) {
+ for (int i = 0; i < clientCnt; i++) {
+ G.ignite("client-" + i).events().localListen(new IgnitePredicate<Event>() {
+ @Override public boolean apply(Event evt) {
+ info("Left event fired on client: " + evt);
+
+ clientLeftLatch.countDown();
+
+ return true;
+ }
+ }, EVT_NODE_LEFT);
+ }
+ }
+
+ if (clientFailedLatch != null) {
+ for (int i = 0; i < clientCnt; i++) {
+ G.ignite("client-" + i).events().localListen(new IgnitePredicate<Event>() {
+ @Override public boolean apply(Event evt) {
+ info("Failed event fired on client: " + evt);
+
+ clientFailedLatch.countDown();
+
+ return true;
+ }
+ }, EVT_NODE_FAILED);
+ }
+ }
+ }
+
+ /**
+ * @param srvCnt Number of server nodes.
+ * @param clientCnt Number of client nodes.
+ */
+ private void checkNodes(int srvCnt, int clientCnt) {
+ for (int i = 0; i < srvCnt; i++) {
+ Ignite g = G.ignite("server-" + i);
+
+ assertTrue(srvNodeIds.contains(g.cluster().localNode().id()));
+
+ assertFalse(g.cluster().localNode().isClient());
+
+ checkRemoteNodes(g, srvCnt + clientCnt - 1);
+ }
+
+ for (int i = 0; i < clientCnt; i++) {
+ Ignite g = G.ignite("client-" + i);
+
+ assertTrue(clientNodeIds.contains(g.cluster().localNode().id()));
+
+ assertTrue(g.cluster().localNode().isClient());
+
+ checkRemoteNodes(g, srvCnt + clientCnt - 1);
+ }
+ }
+
+ /**
+ * @param ignite Grid.
+ * @param expCnt Expected nodes count.
+ */
+ @SuppressWarnings("TypeMayBeWeakened")
+ private void checkRemoteNodes(Ignite ignite, int expCnt) {
+ Collection<ClusterNode> nodes = ignite.cluster().forRemotes().nodes();
+
+ assertEquals(expCnt, nodes.size());
+
+ for (ClusterNode node : nodes) {
+ UUID id = node.id();
+
+ if (clientNodeIds.contains(id))
+ assertTrue(node.isClient());
+ else if (srvNodeIds.contains(id))
+ assertFalse(node.isClient());
+ else
+ assert false : "Unexpected node ID: " + id;
+ }
+ }
+
+ /**
+ * @param latch Latch.
+ * @throws InterruptedException If interrupted.
+ */
+ private void await(CountDownLatch latch) throws InterruptedException {
+ assertTrue("Latch count: " + latch.getCount(), latch.await(10000, MILLISECONDS));
+ }
+
+ /**
+ */
+ private static class MessageListener implements IgniteBiPredicate<UUID, Object> {
+ @IgniteInstanceResource
+ private Ignite ignite;
+
+ /** {@inheritDoc} */
+ @Override public boolean apply(UUID uuid, Object msg) {
+ X.println(">>> Received [locNodeId=" + ignite.configuration().getNodeId() + ", msg=" + msg + ']');
+
+ msgLatch.countDown();
+
+ return true;
+ }
+ }
+
+ /**
+ *
+ */
+ private static class TestTcpClientDiscovery extends TcpClientDiscoverySpi {
+ /** */
+ private final Object mux = new Object();
+
+ /** */
+ private final AtomicBoolean writeLock = new AtomicBoolean();
+
+ /** */
+ private final AtomicBoolean openSockLock = new AtomicBoolean();
+
+ /**
+ * @param lock Lock.
+ */
+ private void waitFor(AtomicBoolean lock) {
+ try {
+ synchronized (mux) {
+ while (lock.get())
+ mux.wait();
+ }
+ }
+ catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * @param isPause Is lock.
+ * @param locks Locks.
+ */
+ private void pauseResumeOperation(boolean isPause, AtomicBoolean... locks) {
+ synchronized (mux) {
+ for (AtomicBoolean lock : locks)
+ lock.set(isPause);
+
+ mux.notifyAll();
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void writeToSocket(Socket sock, TcpDiscoveryAbstractMessage msg,
+ GridByteArrayOutputStream bout) throws IOException, IgniteCheckedException {
+ waitFor(writeLock);
+
+ super.writeToSocket(sock, msg, bout);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected Socket openSocket(InetSocketAddress sockAddr) throws IOException {
+ waitFor(openSockLock);
+
+ return super.openSocket(sockAddr);
+ }
+
+ /**
+ *
+ */
+ private void pauseAll() {
+ pauseResumeOperation(true, openSockLock, writeLock);
+
+ brokeConnection();
+ }
+
+ /**
+ *
+ */
+ private void resume() {
+ pauseResumeOperation(false, openSockLock, writeLock);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c05e368d/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java
index ebc7111..8bf8dbc 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java
@@ -51,7 +51,7 @@ public class IgniteSpiDiscoverySelfTestSuite extends TestSuite {
suite.addTest(new TestSuite(GridTcpSpiForwardingSelfTest.class));
- suite.addTest(new TestSuite(TcpClientDiscoverySelfTest.class));
+ suite.addTest(new TestSuite(TcpClientDiscoverySpiSelfTest.class));
suite.addTest(new TestSuite(TcpClientDiscoverySpiConfigSelfTest.class));
suite.addTest(new TestSuite(TcpClientDiscoveryMarshallerCheckSelfTest.class));
[11/50] [abbrv] incubator-ignite git commit: Merge remote-tracking
branch 'remotes/origin/ignite-sprint-5' into ignite-157
Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-5' into ignite-157
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4dd6a63b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4dd6a63b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4dd6a63b
Branch: refs/heads/ignite-836_2
Commit: 4dd6a63ba0e63d9f6b72264983807ab577900b8f
Parents: c548136 17bf271
Author: sboikov <sb...@gridgain.com>
Authored: Fri May 8 13:32:05 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri May 8 13:32:05 2015 +0300
----------------------------------------------------------------------
DEVNOTES.txt | 32 +-
dev-tools/.gitignore | 2 +
dev-tools/build.gradle | 45 +
dev-tools/src/main/groovy/jiraslurp.groovy | 146 +
modules/cloud/pom.xml | 2 +-
.../processors/cache/GridCacheIoManager.java | 314 +-
.../processors/cache/GridCacheMessage.java | 8 +-
.../dht/atomic/GridDhtAtomicUpdateResponse.java | 8 +
.../dht/atomic/GridNearAtomicUpdateFuture.java | 2 +-
.../atomic/GridNearAtomicUpdateResponse.java | 18 +-
.../dht/preloader/GridDhtForceKeysFuture.java | 6 +
.../dht/preloader/GridDhtForceKeysResponse.java | 54 +-
.../distributed/near/GridNearGetResponse.java | 8 +-
.../util/lang/GridFilteredIterator.java | 2 +-
.../ignite/internal/util/lang/GridFunc.java | 7218 +++++-------------
.../spi/discovery/tcp/TcpDiscoverySpi.java | 22 +-
.../cache/GridCacheSwapReloadSelfTest.java | 20 +-
.../IgniteCacheP2pUnmarshallingErrorTest.java | 189 +
...gniteCacheP2pUnmarshallingNearErrorTest.java | 56 +
...CacheP2pUnmarshallingRebalanceErrorTest.java | 80 +
.../IgniteCacheP2pUnmarshallingTxErrorTest.java | 109 +
.../cache/IgniteCachePeekModesAbstractTest.java | 15 +-
...CacheLoadingConcurrentGridStartSelfTest.java | 49 +-
...idFileSwapSpaceSpiMultithreadedLoadTest.java | 4 +-
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 65 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
...gniteCacheP2pUnmarshallingErrorTestSuit.java | 41 +
.../ignite/testsuites/IgniteCacheTestSuite.java | 293 -
.../testsuites/IgniteCacheTestSuite2.java | 141 +
.../testsuites/IgniteCacheTestSuite3.java | 143 +
.../testsuites/IgniteCacheTestSuite4.java | 131 +
modules/gce/pom.xml | 2 +-
.../cache/GridCacheOffHeapAndSwapSelfTest.java | 11 +-
.../cache/GridCacheOffHeapSelfTest.java | 11 +-
...niteCacheP2pUnmarshallingQueryErrorTest.java | 56 +
.../IgniteCacheQuerySelfTestSuite.java | 3 +
.../ignite/scalar/ScalarConversions.scala | 8 -
.../ignite/schema/generator/CodeGenerator.java | 6 +-
pom.xml | 22 +-
39 files changed, 3469 insertions(+), 5874 deletions(-)
----------------------------------------------------------------------
[50/50] [abbrv] incubator-ignite git commit: Merge remote-tracking
branch 'remotes/origin/ignite-709_2' into ignite-836_2
Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-709_2' into ignite-836_2
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8c105ec2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8c105ec2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8c105ec2
Branch: refs/heads/ignite-836_2
Commit: 8c105ec2379acb78bd5fc9185cc99b9a1bc18562
Parents: 9126679 16e211e
Author: sevdokimov <se...@gridgain.com>
Authored: Wed May 13 15:09:57 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Wed May 13 15:09:57 2015 +0300
----------------------------------------------------------------------
assembly/release-base.xml | 4 +-
bin/ignite-schema-import.bat | 2 +-
bin/ignite-schema-import.sh | 2 +-
bin/ignite.bat | 2 +-
bin/ignite.sh | 2 +-
bin/ignitevisorcmd.bat | 2 +-
bin/ignitevisorcmd.sh | 2 +-
bin/include/build-classpath.bat | 46 +
bin/include/build-classpath.sh | 71 +
bin/include/functions.sh | 2 +-
bin/include/target-classpath.bat | 46 -
bin/include/target-classpath.sh | 71 -
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
modules/clients/pom.xml | 2 +-
modules/cloud/pom.xml | 4 +-
.../TcpDiscoveryCloudIpFinderSelfTest.java | 2 -
modules/codegen/pom.xml | 2 +-
.../ignite/codegen/MessageCodeGenerator.java | 4 +-
modules/core/pom.xml | 2 +-
.../internal/direct/DirectByteBufferStream.java | 4 +-
.../communication/GridIoMessageFactory.java | 4 +-
.../eventstorage/GridEventStorageManager.java | 5 +-
.../cache/DynamicCacheDescriptor.java | 16 +-
.../processors/cache/GridCacheAdapter.java | 544 +-
.../cache/GridCacheEvictionManager.java | 2 +-
.../processors/cache/GridCacheMapEntry.java | 18 +-
.../processors/cache/GridCacheMvccManager.java | 4 +-
.../GridCachePartitionExchangeManager.java | 3 +
.../processors/cache/GridCacheProcessor.java | 189 +-
.../processors/cache/GridCacheProxyImpl.java | 24 -
.../processors/cache/GridCacheSwapManager.java | 215 +-
.../processors/cache/GridCacheTtlManager.java | 42 +-
.../processors/cache/GridCacheUtils.java | 5 +-
.../processors/cache/IgniteInternalCache.java | 27 -
...ridCacheOptimisticCheckPreparedTxFuture.java | 434 --
...idCacheOptimisticCheckPreparedTxRequest.java | 232 -
...dCacheOptimisticCheckPreparedTxResponse.java | 179 -
.../distributed/GridCacheTxRecoveryFuture.java | 506 ++
.../distributed/GridCacheTxRecoveryRequest.java | 261 +
.../GridCacheTxRecoveryResponse.java | 182 +
.../GridDistributedTxRemoteAdapter.java | 2 +-
.../distributed/dht/GridDhtLocalPartition.java | 2 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 32 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 27 +
.../cache/distributed/dht/GridDhtTxMapping.java | 2 +-
.../distributed/dht/GridDhtTxPrepareFuture.java | 81 +-
.../dht/GridPartitionedGetFuture.java | 2 +-
.../colocated/GridDhtColocatedLockFuture.java | 27 +-
.../colocated/GridDhtDetachedCacheEntry.java | 4 +-
.../distributed/near/GridNearCacheAdapter.java | 10 -
.../distributed/near/GridNearCacheEntry.java | 4 +-
.../distributed/near/GridNearLockFuture.java | 5 -
.../near/GridNearOptimisticTxPrepareFuture.java | 779 ++
.../GridNearPessimisticTxPrepareFuture.java | 349 +
.../cache/distributed/near/GridNearTxLocal.java | 84 +-
.../near/GridNearTxPrepareFuture.java | 1050 ---
.../near/GridNearTxPrepareFutureAdapter.java | 226 +
.../processors/cache/local/GridLocalCache.java | 8 +-
.../local/atomic/GridLocalAtomicCache.java | 27 +-
.../cache/query/GridCacheQueryManager.java | 21 +-
.../cache/query/GridCacheSqlQuery.java | 2 +-
.../cache/query/GridCacheTwoStepQuery.java | 17 +
.../cache/transactions/IgniteInternalTx.java | 9 +-
.../cache/transactions/IgniteTxAdapter.java | 4 +-
.../cache/transactions/IgniteTxHandler.java | 100 +-
.../transactions/IgniteTxLocalAdapter.java | 16 +-
.../cache/transactions/IgniteTxManager.java | 185 +-
.../datastreamer/DataStreamerImpl.java | 2 +
.../processors/igfs/IgfsDataManager.java | 3 +
.../processors/igfs/IgfsDeleteWorker.java | 4 +
.../processors/igfs/IgfsMetaManager.java | 2 +-
.../internal/processors/igfs/IgfsUtils.java | 11 +-
.../offheap/GridOffHeapProcessor.java | 17 +
.../processors/resource/GridResourceField.java | 11 +
.../processors/resource/GridResourceIoc.java | 387 +-
.../processors/resource/GridResourceMethod.java | 13 +
.../resource/GridResourceProcessor.java | 4 +-
.../ignite/internal/util/IgniteUtils.java | 19 +-
.../internal/util/future/SettableFuture.java | 86 +
.../util/lang/GridFilteredIterator.java | 2 +-
.../ignite/internal/util/lang/GridFunc.java | 7218 +++++-------------
.../util/offheap/GridOffHeapPartitionedMap.java | 9 +
.../unsafe/GridUnsafePartitionedMap.java | 155 +-
.../internal/visor/query/VisorQueryArg.java | 14 +-
.../internal/visor/query/VisorQueryJob.java | 2 +
.../discovery/tcp/TcpClientDiscoverySpi.java | 114 +-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 255 +-
.../discovery/tcp/TcpDiscoverySpiAdapter.java | 39 +
.../messages/TcpDiscoveryClientPingRequest.java | 56 +
.../TcpDiscoveryClientPingResponse.java | 67 +
.../resources/META-INF/classnames.properties | 12 +-
.../core/src/main/resources/ignite.properties | 2 +-
.../internal/GridUpdateNotifierSelfTest.java | 21 +-
.../processors/cache/CacheGetFromJobTest.java | 110 +
.../GridCacheAbstractFailoverSelfTest.java | 12 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 227 +-
.../cache/GridCacheAbstractSelfTest.java | 4 +-
.../cache/OffHeapTieredTransactionSelfTest.java | 127 +
.../GridCacheAbstractNodeRestartSelfTest.java | 101 +-
.../distributed/IgniteTxGetAfterStopTest.java | 131 +
...xOriginatingNodeFailureAbstractSelfTest.java | 2 +-
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 43 +
...ionedNearDisabledOffHeapFullApiSelfTest.java | 8 +-
...DisabledOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...abledOffHeapTieredAtomicFullApiSelfTest.java | 56 +
...earDisabledOffHeapTieredFullApiSelfTest.java | 33 +
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
...rDisabledPrimaryNodeFailureRecoveryTest.java | 31 +
...rtitionedPrimaryNodeFailureRecoveryTest.java | 31 +
...woBackupsPrimaryNodeFailureRecoveryTest.java | 37 +
...ePrimaryNodeFailureRecoveryAbstractTest.java | 533 ++
...idCacheAtomicReplicatedFailoverSelfTest.java | 6 +
...CacheAtomicOffHeapTieredFullApiSelfTest.java | 32 +
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
...yWriteOrderOffHeapTieredFullApiSelfTest.java | 33 +
...erOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
...achePartitionedMultiNodeFullApiSelfTest.java | 15 +-
.../GridCachePartitionedNodeRestartTest.java | 4 +-
...dCachePartitionedOffHeapFullApiSelfTest.java | 8 +-
...titionedOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...PartitionedOffHeapTieredFullApiSelfTest.java | 32 +
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 72 +
...ePartitionedOptimisticTxNodeRestartTest.java | 4 +-
.../GridCachePartitionedTxSalvageSelfTest.java | 25 +-
.../GridCacheReplicatedFailoverSelfTest.java | 6 +
.../GridCacheReplicatedNodeRestartSelfTest.java | 82 +
...idCacheReplicatedOffHeapFullApiSelfTest.java | 8 +-
...plicatedOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...eReplicatedOffHeapTieredFullApiSelfTest.java | 33 +
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
.../IgniteCacheExpiryPolicyAbstractTest.java | 2 +-
.../IgniteCacheExpiryPolicyTestSuite.java | 2 +
.../expiry/IgniteCacheTtlCleanupSelfTest.java | 85 +
...LocalAtomicOffHeapTieredFullApiSelfTest.java | 32 +
.../GridCacheLocalOffHeapFullApiSelfTest.java | 6 +-
...dCacheLocalOffHeapTieredFullApiSelfTest.java | 32 +
.../igfs/IgfsClientCacheSelfTest.java | 132 +
.../processors/igfs/IgfsOneClientNodeTest.java | 133 +
.../processors/igfs/IgfsStreamsSelfTest.java | 2 +-
.../tcp/TcpClientDiscoverySelfTest.java | 1021 ---
.../TcpClientDiscoverySpiConfigSelfTest.java | 2 +-
.../tcp/TcpClientDiscoverySpiSelfTest.java | 1089 +++
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
.../IgniteCacheFailoverTestSuite.java | 10 +-
.../IgniteCacheFullApiSelfTestSuite.java | 18 +
.../testsuites/IgniteCacheRestartTestSuite.java | 11 +-
.../testsuites/IgniteCacheTestSuite3.java | 5 +-
.../IgniteCacheTxRecoverySelfTestSuite.java | 4 +
.../ignite/testsuites/IgniteIgfsTestSuite.java | 3 +
.../IgniteSpiDiscoverySelfTestSuite.java | 2 +-
modules/extdata/p2p/pom.xml | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 4 +-
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 | 4 +
.../processors/query/h2/sql/GridSqlQuery.java | 20 +
.../query/h2/sql/GridSqlQueryParser.java | 10 +-
.../query/h2/sql/GridSqlQuerySplitter.java | 11 +-
.../processors/query/h2/sql/GridSqlSelect.java | 2 +-
.../processors/query/h2/sql/GridSqlUnion.java | 2 +-
.../query/h2/twostep/GridMapQueryExecutor.java | 3 +
.../h2/twostep/GridReduceQueryExecutor.java | 119 +-
.../cache/GridCacheOffheapIndexGetSelfTest.java | 111 +
.../IgniteCacheAbstractFieldsQuerySelfTest.java | 21 +
...eQueryMultiThreadedOffHeapTiredSelfTest.java | 37 +
.../IgniteCacheQueryMultiThreadedSelfTest.java | 29 +-
.../IgniteCacheQuerySelfTestSuite.java | 1 +
.../IgniteCacheWithIndexingTestSuite.java | 2 +
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
.../ignite/scalar/ScalarConversions.scala | 8 -
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
.../ignite/schema/generator/CodeGenerator.java | 41 +-
modules/slf4j/pom.xml | 2 +-
modules/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
.../commands/cache/VisorCacheScanCommand.scala | 2 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
modules/yardstick/pom.xml | 2 +-
parent/pom.xml | 2 +
pom.xml | 115 +-
194 files changed, 9825 insertions(+), 10127 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c105ec2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c105ec2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c105ec2/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c105ec2/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index ad78f86,53522c7..134097b
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@@ -4476,74 -4517,76 +4514,110 @@@ public class TcpDiscoverySpi extends Tc
/**
* @param msg Message.
*/
+ private void processClientPingRequest(final TcpDiscoveryClientPingRequest msg) {
+ utilityPool.execute(new Runnable() {
+ @Override public void run() {
+ boolean res = pingNode(msg.nodeToPing());
+
+ final ClientMessageWorker worker = clientMsgWorkers.get(msg.creatorNodeId());
+
+ if (worker == null) {
+ if (log.isDebugEnabled())
+ log.debug("Ping request from dead client node, will be skipped: " + msg.creatorNodeId());
+ }
+ else {
+ TcpDiscoveryClientPingResponse pingRes = new TcpDiscoveryClientPingResponse(
+ getLocalNodeId(), msg.nodeToPing(), res);
+
+ pingRes.verify(getLocalNodeId());
+
+ worker.addMessage(pingRes);
+ }
+ }
+ });
+ }
+
+ /**
+ * @param msg Message.
+ */
+ private void processPingResponse(final TcpDiscoveryPingResponse msg) {
+ ClientMessageWorker clientWorker = clientMsgWorkers.get(msg.creatorNodeId());
+
+ if (clientWorker != null)
+ clientWorker.pingResult(true);
+ }
+
+ /**
+ * @param msg Message.
+ */
private void processCustomMessage(TcpDiscoveryCustomEventMessage msg) {
if (isLocalNodeCoordinator()) {
- if (msg.verified()) {
+ boolean sndNext;
+
+ if (!msg.verified()) {
+ msg.verify(getLocalNodeId());
+ msg.topologyVersion(ring.topologyVersion());
+
+ notifyDiscoveryListener(msg);
+
+ sndNext = true;
+ }
+ else
+ sndNext = false;
+
+ if (sndNext && ring.hasRemoteNodes())
+ sendMessageAcrossRing(msg);
+ else {
stats.onRingMessageReceived(msg);
- addMessage(new TcpDiscoveryDiscardMessage(getLocalNodeId(), msg.id()));
+ try {
+ DiscoverySpiCustomMessage msgObj = marsh.unmarshal(msg.messageBytes(), U.gridClassLoader());
- return;
+ DiscoverySpiCustomMessage nextMsg = msgObj.newMessageOnRingEnd();
+
+ if (nextMsg != null)
+ addMessage(new TcpDiscoveryCustomEventMessage(getLocalNodeId(), marsh.marshal(nextMsg)));
+ }
+ catch (IgniteCheckedException e) {
+ U.error(log, "Failed to unmarshal discovery custom message.", e);
+ }
+
+ addMessage(new TcpDiscoveryDiscardMessage(getLocalNodeId(), msg.id()));
}
+ }
+ else {
+ if (msg.verified())
+ notifyDiscoveryListener(msg);
- msg.verify(getLocalNodeId());
- msg.topologyVersion(ring.topologyVersion());
+ if (ring.hasRemoteNodes())
+ sendMessageAcrossRing(msg);
}
+ }
- if (msg.verified()) {
- DiscoverySpiListener lsnr = TcpDiscoverySpi.this.lsnr;
+ /**
+ * @param msg Custom message.
+ */
+ private void notifyDiscoveryListener(TcpDiscoveryCustomEventMessage msg) {
+ DiscoverySpiListener lsnr = TcpDiscoverySpi.this.lsnr;
- TcpDiscoverySpiState spiState = spiStateCopy();
+ TcpDiscoverySpiState spiState = spiStateCopy();
- Map<Long, Collection<ClusterNode>> hist;
+ Map<Long, Collection<ClusterNode>> hist;
- synchronized (mux) {
- hist = new TreeMap<>(topHist);
- }
+ synchronized (mux) {
+ hist = new TreeMap<>(topHist);
+ }
- Collection<ClusterNode> snapshot = hist.get(msg.topologyVersion());
+ Collection<ClusterNode> snapshot = hist.get(msg.topologyVersion());
- if (lsnr != null && (spiState == CONNECTED || spiState == DISCONNECTING)) {
- assert msg.messageBytes() != null;
+ if (lsnr != null && (spiState == CONNECTED || spiState == DISCONNECTING)) {
+ assert msg.messageBytes() != null;
- TcpDiscoveryNode node = ring.node(msg.creatorNodeId());
+ TcpDiscoveryNode node = ring.node(msg.creatorNodeId());
+ if (node != null) {
try {
- Serializable msgObj = marsh.unmarshal(msg.messageBytes(), U.gridClassLoader());
+ DiscoverySpiCustomMessage msgObj = marsh.unmarshal(msg.messageBytes(), U.gridClassLoader());
lsnr.onDiscovery(DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT,
msg.topologyVersion(),
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c105ec2/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
index 0000000,507b3e7..da40d4e
mode 000000,100644..100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
@@@ -1,0 -1,1089 +1,1089 @@@
+ /*
+ * 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.spi.discovery.tcp;
+
+ import org.apache.ignite.*;
+ import org.apache.ignite.cluster.*;
+ import org.apache.ignite.configuration.*;
+ import org.apache.ignite.events.*;
+ import org.apache.ignite.internal.*;
+ import org.apache.ignite.internal.util.*;
+ import org.apache.ignite.internal.util.io.*;
+ import org.apache.ignite.internal.util.typedef.*;
+ import org.apache.ignite.internal.util.typedef.internal.*;
+ import org.apache.ignite.lang.*;
+ import org.apache.ignite.resources.*;
+ import org.apache.ignite.spi.*;
+ import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+ import org.apache.ignite.spi.discovery.tcp.messages.*;
+ import org.apache.ignite.testframework.*;
+ import org.apache.ignite.testframework.junits.common.*;
+ import org.jetbrains.annotations.*;
+
+ import java.io.*;
+ import java.net.*;
+ import java.util.*;
+ import java.util.concurrent.*;
+ import java.util.concurrent.atomic.*;
+
+ import static java.util.concurrent.TimeUnit.*;
+ import static org.apache.ignite.events.EventType.*;
+
+ /**
+ * Client-based discovery tests.
+ */
+ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
+ /** */
+ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+ /** */
+ private static final AtomicInteger srvIdx = new AtomicInteger();
+
+ /** */
+ private static final AtomicInteger clientIdx = new AtomicInteger();
+
+ /** */
+ private static Collection<UUID> srvNodeIds;
+
+ /** */
+ private static Collection<UUID> clientNodeIds;
+
+ /** */
+ private static int clientsPerSrv;
+
+ /** */
+ private static CountDownLatch srvJoinedLatch;
+
+ /** */
+ private static CountDownLatch srvLeftLatch;
+
+ /** */
+ private static CountDownLatch srvFailedLatch;
+
+ /** */
+ private static CountDownLatch clientJoinedLatch;
+
+ /** */
+ private static CountDownLatch clientLeftLatch;
+
+ /** */
+ private static CountDownLatch clientFailedLatch;
+
+ /** */
+ private static CountDownLatch msgLatch;
+
+ /** */
+ private UUID nodeId;
+
+ /** */
+ private TcpDiscoveryVmIpFinder clientIpFinder;
+
+ /** */
+ private long joinTimeout = TcpClientDiscoverySpi.DFLT_JOIN_TIMEOUT;
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ cfg.setLocalHost("127.0.0.1");
+
+ if (gridName.startsWith("server")) {
+ TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+ disco.setIpFinder(IP_FINDER);
+
+ cfg.setDiscoverySpi(disco);
+ }
+ else if (gridName.startsWith("client")) {
+ TcpClientDiscoverySpi disco = new TestTcpClientDiscovery();
+
+ disco.setJoinTimeout(joinTimeout);
+
+ TcpDiscoveryVmIpFinder ipFinder;
+
+ if (clientIpFinder != null)
+ ipFinder = clientIpFinder;
+ else {
+ ipFinder = new TcpDiscoveryVmIpFinder();
+
+ String addr = new ArrayList<>(IP_FINDER.getRegisteredAddresses()).
+ get((clientIdx.get() - 1) / clientsPerSrv).toString();
+
+ if (addr.startsWith("/"))
+ addr = addr.substring(1);
+
+ ipFinder.setAddresses(Arrays.asList(addr));
+ }
+
+ disco.setIpFinder(ipFinder);
+
+ cfg.setDiscoverySpi(disco);
+
+ String nodeId = cfg.getNodeId().toString();
+
+ nodeId = "cc" + nodeId.substring(2);
+
+ cfg.setNodeId(UUID.fromString(nodeId));
+ }
+
+ if (nodeId != null)
+ cfg.setNodeId(nodeId);
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ Collection<InetSocketAddress> addrs = IP_FINDER.getRegisteredAddresses();
+
+ if (!F.isEmpty(addrs))
+ IP_FINDER.unregisterAddresses(addrs);
+
+ srvIdx.set(0);
+ clientIdx.set(0);
+
+ srvNodeIds = new GridConcurrentHashSet<>();
+ clientNodeIds = new GridConcurrentHashSet<>();
+
+ clientsPerSrv = 2;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ stopAllClients(true);
+ stopAllServers(true);
+
+ nodeId = null;
+ clientIpFinder = null;
+ joinTimeout = TcpClientDiscoverySpi.DFLT_JOIN_TIMEOUT;
+
+ assert G.allGrids().isEmpty();
+ }
+
+ /**
+ *
+ * @throws Exception
+ */
+ public void testJoinTimeout() throws Exception {
+ clientIpFinder = new TcpDiscoveryVmIpFinder();
+ joinTimeout = 1000;
+
+ try {
+ startClientNodes(1);
+
+ fail("Client cannot be start because no server nodes run");
+ }
+ catch (IgniteCheckedException e) {
+ IgniteSpiException spiEx = e.getCause(IgniteSpiException.class);
+
+ assert spiEx != null : e;
+
+ assert spiEx.getMessage().contains("Join process timed out") : spiEx.getMessage();
+ }
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientNodeJoin() throws Exception {
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ srvJoinedLatch = new CountDownLatch(3);
+ clientJoinedLatch = new CountDownLatch(3);
+
+ attachListeners(3, 3);
+
+ startClientNodes(1);
+
+ await(srvJoinedLatch);
+ await(clientJoinedLatch);
+
+ checkNodes(3, 4);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientNodeLeave() throws Exception {
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ srvLeftLatch = new CountDownLatch(3);
+ clientLeftLatch = new CountDownLatch(2);
+
+ attachListeners(3, 3);
+
+ stopGrid("client-2");
+
+ await(srvLeftLatch);
+ await(clientLeftLatch);
+
+ checkNodes(3, 2);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientNodeFail() throws Exception {
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ srvFailedLatch = new CountDownLatch(3);
+ clientFailedLatch = new CountDownLatch(2);
+
+ attachListeners(3, 3);
+
+ failClient(2);
+
+ await(srvFailedLatch);
+ await(clientFailedLatch);
+
+ checkNodes(3, 2);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testServerNodeJoin() throws Exception {
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ srvJoinedLatch = new CountDownLatch(3);
+ clientJoinedLatch = new CountDownLatch(3);
+
+ attachListeners(3, 3);
+
+ startServerNodes(1);
+
+ await(srvJoinedLatch);
+ await(clientJoinedLatch);
+
+ checkNodes(4, 3);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testServerNodeLeave() throws Exception {
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ srvLeftLatch = new CountDownLatch(2);
+ clientLeftLatch = new CountDownLatch(3);
+
+ attachListeners(3, 3);
+
+ stopGrid("server-2");
+
+ await(srvLeftLatch);
+ await(clientLeftLatch);
+
+ checkNodes(2, 3);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testServerNodeFail() throws Exception {
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ srvFailedLatch = new CountDownLatch(2);
+ clientFailedLatch = new CountDownLatch(3);
+
+ attachListeners(3, 3);
+
+ assert U.<Map>field(G.ignite("server-2").configuration().getDiscoverySpi(), "clientMsgWorkers").isEmpty();
+
+ failServer(2);
+
+ await(srvFailedLatch);
+ await(clientFailedLatch);
+
+ checkNodes(2, 3);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testPing() throws Exception {
+ startServerNodes(2);
+ startClientNodes(1);
+
+ Ignite srv0 = G.ignite("server-0");
+ Ignite srv1 = G.ignite("server-1");
+ Ignite client = G.ignite("client-0");
+
+ assert ((IgniteEx)srv0).context().discovery().pingNode(client.cluster().localNode().id());
+ assert ((IgniteEx)srv1).context().discovery().pingNode(client.cluster().localNode().id());
+
+ assert ((IgniteEx)client).context().discovery().pingNode(srv0.cluster().localNode().id());
+ assert ((IgniteEx)client).context().discovery().pingNode(srv1.cluster().localNode().id());
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testPingFailedNodeFromClient() throws Exception {
+ startServerNodes(2);
+ startClientNodes(1);
+
+ Ignite srv0 = G.ignite("server-0");
+ Ignite srv1 = G.ignite("server-1");
+ Ignite client = G.ignite("client-0");
+
+ final CountDownLatch latch = new CountDownLatch(1);
+
+ ((TcpDiscoverySpi)srv1.configuration().getDiscoverySpi()).addIncomeConnectionListener(new IgniteInClosure<Socket>() {
+ @Override public void apply(Socket sock) {
+ try {
+ latch.await();
+ }
+ catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ });
+
+ assert ((IgniteEx)client).context().discovery().pingNode(srv0.cluster().localNode().id());
+ assert !((IgniteEx)client).context().discovery().pingNode(srv1.cluster().localNode().id());
+
+ latch.countDown();
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testPingFailedClientNode() throws Exception {
+ startServerNodes(2);
+ startClientNodes(1);
+
+ Ignite srv0 = G.ignite("server-0");
+ Ignite srv1 = G.ignite("server-1");
+ Ignite client = G.ignite("client-0");
+
+ ((TcpDiscoverySpiAdapter)srv0.configuration().getDiscoverySpi()).setAckTimeout(1000);
+
+ ((TestTcpClientDiscovery)client.configuration().getDiscoverySpi()).pauseSocketWrite();
+
+ assert !((IgniteEx)srv1).context().discovery().pingNode(client.cluster().localNode().id());
+ assert !((IgniteEx)srv0).context().discovery().pingNode(client.cluster().localNode().id());
+
+ ((TestTcpClientDiscovery)client.configuration().getDiscoverySpi()).resumeAll();
+
+ assert ((IgniteEx)srv1).context().discovery().pingNode(client.cluster().localNode().id());
+ assert ((IgniteEx)srv0).context().discovery().pingNode(client.cluster().localNode().id());
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientReconnectOnRouterFail() throws Exception {
+ clientsPerSrv = 1;
+
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ setClientRouter(2, 0);
+
+ srvFailedLatch = new CountDownLatch(2);
+ clientFailedLatch = new CountDownLatch(3);
+
+ attachListeners(2, 3);
+
+ failServer(2);
+
+ await(srvFailedLatch);
+ await(clientFailedLatch);
+
+ checkNodes(2, 3);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientReconnectOnNetworkProblem() throws Exception {
+ clientsPerSrv = 1;
+
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ setClientRouter(2, 0);
+
+ srvFailedLatch = new CountDownLatch(2);
+ clientFailedLatch = new CountDownLatch(3);
+
+ attachListeners(2, 3);
+
+ ((TcpClientDiscoverySpi)G.ignite("client-2").configuration().getDiscoverySpi()).brokeConnection();
+
+ G.ignite("client-2").message().remoteListen(null, new MessageListener()); // Send some discovery message.
+
+ checkNodes(3, 3);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testGetMissedMessagesOnReconnect() throws Exception {
+ clientsPerSrv = 1;
+
+ startServerNodes(3);
+ startClientNodes(2);
+
+ checkNodes(3, 2);
+
+ clientLeftLatch = new CountDownLatch(1);
+ srvLeftLatch = new CountDownLatch(2);
+
+ attachListeners(2, 2);
+
+ ((TestTcpClientDiscovery)G.ignite("client-1").configuration().getDiscoverySpi()).pauseAll();
+
+ stopGrid("server-2");
+
+ await(srvLeftLatch);
+ await(srvLeftLatch);
+
+ Thread.sleep(500);
+
+ assert G.ignite("client-0").cluster().nodes().size() == 4;
+ assert G.ignite("client-1").cluster().nodes().size() == 5;
+
+ clientLeftLatch = new CountDownLatch(1);
+
+ ((TestTcpClientDiscovery)G.ignite("client-1").configuration().getDiscoverySpi()).resumeAll();
+
+ await(clientLeftLatch);
+
+ checkNodes(2, 2);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientSegmentation() throws Exception {
+ clientsPerSrv = 1;
+
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ // setClientRouter(2, 2);
+
+ srvFailedLatch = new CountDownLatch(2 + 2);
+ clientFailedLatch = new CountDownLatch(2 + 2);
+
+ attachListeners(2, 2);
+
+ final CountDownLatch client2StoppedLatch = new CountDownLatch(1);
+
+ IgnitionListener lsnr = new IgnitionListener() {
+ @Override public void onStateChange(@Nullable String name, IgniteState state) {
+ if (state == IgniteState.STOPPED_ON_SEGMENTATION)
+ client2StoppedLatch.countDown();
+ }
+ };
+ G.addListener(lsnr);
+
+ try {
+ failServer(2);
+
+ await(srvFailedLatch);
+ await(clientFailedLatch);
+
+ await(client2StoppedLatch);
+
+ checkNodes(2, 2);
+ }
+ finally {
+ G.removeListener(lsnr);
+ }
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientNodeJoinOneServer() throws Exception {
+ startServerNodes(1);
+
+ srvJoinedLatch = new CountDownLatch(1);
+
+ attachListeners(1, 0);
+
+ startClientNodes(1);
+
+ await(srvJoinedLatch);
+
+ checkNodes(1, 1);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientNodeLeaveOneServer() throws Exception {
+ startServerNodes(1);
+ startClientNodes(1);
+
+ checkNodes(1, 1);
+
+ srvLeftLatch = new CountDownLatch(1);
+
+ attachListeners(1, 0);
+
+ stopGrid("client-0");
+
+ await(srvLeftLatch);
+
+ checkNodes(1, 0);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testClientNodeFailOneServer() throws Exception {
+ startServerNodes(1);
+ startClientNodes(1);
+
+ checkNodes(1, 1);
+
+ srvFailedLatch = new CountDownLatch(1);
+
+ attachListeners(1, 0);
+
+ failClient(0);
+
+ await(srvFailedLatch);
+
+ checkNodes(1, 0);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testMetrics() throws Exception {
+ startServerNodes(3);
+ startClientNodes(3);
+
+ checkNodes(3, 3);
+
+ attachListeners(3, 3);
+
+ assertTrue(checkMetrics(3, 3, 0));
+
+ G.ignite("client-0").compute().broadcast(F.noop());
+
+ assertTrue(GridTestUtils.waitForCondition(new PA() {
+ @Override public boolean apply() {
+ return checkMetrics(3, 3, 1);
+ }
+ }, 10000));
+
+ checkMetrics(3, 3, 1);
+
+ G.ignite("server-0").compute().broadcast(F.noop());
+
+ assertTrue(GridTestUtils.waitForCondition(new PA() {
+ @Override public boolean apply() {
+ return checkMetrics(3, 3, 2);
+ }
+ }, 10000));
+ }
+
+ /**
+ * @param srvCnt Number of Number of server nodes.
+ * @param clientCnt Number of client nodes.
+ * @param execJobsCnt Expected number of executed jobs.
+ * @return Whether metrics are correct.
+ */
+ private boolean checkMetrics(int srvCnt, int clientCnt, int execJobsCnt) {
+ for (int i = 0; i < srvCnt; i++) {
+ Ignite g = G.ignite("server-" + i);
+
+ for (ClusterNode n : g.cluster().nodes()) {
+ if (n.metrics().getTotalExecutedJobs() != execJobsCnt)
+ return false;
+ }
+ }
+
+ for (int i = 0; i < clientCnt; i++) {
+ Ignite g = G.ignite("client-" + i);
+
+ for (ClusterNode n : g.cluster().nodes()) {
+ if (n.metrics().getTotalExecutedJobs() != execJobsCnt)
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testDataExchangeFromServer() throws Exception {
+ testDataExchange("server-0");
+ }
+
+ /**
+ * TODO: IGNITE-587.
+ *
+ * @throws Exception If failed.
+ */
+ public void testDataExchangeFromClient() throws Exception {
+ testDataExchange("client-0");
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ private void testDataExchange(String masterName) throws Exception {
+ startServerNodes(2);
+ startClientNodes(2);
+
+ checkNodes(2, 2);
+
+ IgniteMessaging msg = grid(masterName).message();
+
+ UUID id = null;
+
+ try {
+ id = msg.remoteListen(null, new MessageListener());
+
- msgLatch = new CountDownLatch(4);
++ msgLatch = new CountDownLatch(2);
+
+ msg.send(null, "Message 1");
+
+ await(msgLatch);
+
+ startServerNodes(1);
+ startClientNodes(1);
+
+ checkNodes(3, 3);
+
- msgLatch = new CountDownLatch(6);
++ msgLatch = new CountDownLatch(3);
+
+ msg.send(null, "Message 2");
+
+ await(msgLatch);
+ }
+ finally {
+ if (id != null)
+ msg.stopRemoteListen(id);
+ }
+ }
+
+ /**
+ * @throws Exception If any error occurs.
+ */
+ public void testDuplicateId() throws Exception {
+ startServerNodes(2);
+
+ nodeId = G.ignite("server-1").cluster().localNode().id();
+
+ try {
+ startGrid("client-0");
+
+ assert false;
+ }
+ catch (IgniteCheckedException e) {
+ IgniteSpiException spiEx = e.getCause(IgniteSpiException.class);
+
+ assert spiEx != null : e;
+ assert spiEx.getMessage().contains("same ID") : spiEx.getMessage();
+ }
+ }
+
+ /**
+ * @throws Exception If any error occurs.
+ */
+ public void testTimeoutWaitingNodeAddedMessage() throws Exception {
+ startServerNodes(2);
+
+ final CountDownLatch cnt = new CountDownLatch(1);
+
+ ((TcpDiscoverySpi)G.ignite("server-1").configuration().getDiscoverySpi()).addSendMessageListener(
+ new IgniteInClosure<TcpDiscoveryAbstractMessage>() {
+ @Override public void apply(TcpDiscoveryAbstractMessage msg) {
+ try {
+ cnt.await(10, MINUTES);
+ }
+ catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+
+ throw new IgniteInterruptedException(e);
+ }
+ }
+ });
+
+ try {
+ startGrid("client-0");
+
+ assert false;
+ }
+ catch (IgniteCheckedException e) {
+ cnt.countDown();
+
+ IgniteSpiException spiEx = e.getCause(IgniteSpiException.class);
+
+ assert spiEx != null : e;
+ assert spiEx.getMessage().contains("Join process timed out") : spiEx.getMessage();
+ }
+ }
+
+ /**
+ * @throws Exception If any error occurs.
+ */
+ public void testGridStartTime() throws Exception {
+ startServerNodes(2);
+
+ startClientNodes(2);
+
+ long startTime = -1;
+
+ for (Ignite g : G.allGrids()) {
+ IgniteEx kernal = (IgniteKernal)g;
+
+ assertTrue(kernal.context().discovery().gridStartTime() > 0);
+
+ if (startTime == -1)
+ startTime = kernal.context().discovery().gridStartTime();
+ else
+ assertEquals(startTime, kernal.context().discovery().gridStartTime());
+ }
+ }
+
+ /**
+ * @param clientIdx Index.
+ * @throws Exception In case of error.
+ */
+ private void setClientRouter(int clientIdx, int srvIdx) throws Exception {
+ TcpClientDiscoverySpi disco =
+ (TcpClientDiscoverySpi)G.ignite("client-" + clientIdx).configuration().getDiscoverySpi();
+
+ TcpDiscoveryVmIpFinder ipFinder = (TcpDiscoveryVmIpFinder)disco.getIpFinder();
+
+ String addr = new ArrayList<>(IP_FINDER.getRegisteredAddresses()).get(srvIdx).toString();
+
+ if (addr.startsWith("/"))
+ addr = addr.substring(1);
+
+ ipFinder.setAddresses(Arrays.asList(addr));
+ }
+
+ /**
+ * @param cnt Number of nodes.
+ * @throws Exception In case of error.
+ */
+ private void startServerNodes(int cnt) throws Exception {
+ for (int i = 0; i < cnt; i++) {
+ Ignite g = startGrid("server-" + srvIdx.getAndIncrement());
+
+ srvNodeIds.add(g.cluster().localNode().id());
+ }
+ }
+
+ /**
+ * @param cnt Number of nodes.
+ * @throws Exception In case of error.
+ */
+ private void startClientNodes(int cnt) throws Exception {
+ for (int i = 0; i < cnt; i++) {
+ Ignite g = startGrid("client-" + clientIdx.getAndIncrement());
+
+ clientNodeIds.add(g.cluster().localNode().id());
+ }
+ }
+
+ /**
+ * @param idx Index.
+ */
+ private void failServer(int idx) {
+ ((TcpDiscoverySpi)G.ignite("server-" + idx).configuration().getDiscoverySpi()).simulateNodeFailure();
+ }
+
+ /**
+ * @param idx Index.
+ */
+ private void failClient(int idx) {
+ ((TcpClientDiscoverySpi)G.ignite("client-" + idx).configuration().getDiscoverySpi()).simulateNodeFailure();
+ }
+
+ /**
+ * @param srvCnt Number of server nodes.
+ * @param clientCnt Number of client nodes.
+ */
+ private void attachListeners(int srvCnt, int clientCnt) throws Exception {
+ if (srvJoinedLatch != null) {
+ for (int i = 0; i < srvCnt; i++) {
+ G.ignite("server-" + i).events().localListen(new IgnitePredicate<Event>() {
+ @Override public boolean apply(Event evt) {
+ info("Joined event fired on server: " + evt);
+
+ srvJoinedLatch.countDown();
+
+ return true;
+ }
+ }, EVT_NODE_JOINED);
+ }
+ }
+
+ if (srvLeftLatch != null) {
+ for (int i = 0; i < srvCnt; i++) {
+ G.ignite("server-" + i).events().localListen(new IgnitePredicate<Event>() {
+ @Override public boolean apply(Event evt) {
+ info("Left event fired on server: " + evt);
+
+ srvLeftLatch.countDown();
+
+ return true;
+ }
+ }, EVT_NODE_LEFT);
+ }
+ }
+
+ if (srvFailedLatch != null) {
+ for (int i = 0; i < srvCnt; i++) {
+ G.ignite("server-" + i).events().localListen(new IgnitePredicate<Event>() {
+ @Override public boolean apply(Event evt) {
+ info("Failed event fired on server: " + evt);
+
+ srvFailedLatch.countDown();
+
+ return true;
+ }
+ }, EVT_NODE_FAILED);
+ }
+ }
+
+ if (clientJoinedLatch != null) {
+ for (int i = 0; i < clientCnt; i++) {
+ G.ignite("client-" + i).events().localListen(new IgnitePredicate<Event>() {
+ @Override public boolean apply(Event evt) {
+ info("Joined event fired on client: " + evt);
+
+ clientJoinedLatch.countDown();
+
+ return true;
+ }
+ }, EVT_NODE_JOINED);
+ }
+ }
+
+ if (clientLeftLatch != null) {
+ for (int i = 0; i < clientCnt; i++) {
+ G.ignite("client-" + i).events().localListen(new IgnitePredicate<Event>() {
+ @Override public boolean apply(Event evt) {
+ info("Left event fired on client: " + evt);
+
+ clientLeftLatch.countDown();
+
+ return true;
+ }
+ }, EVT_NODE_LEFT);
+ }
+ }
+
+ if (clientFailedLatch != null) {
+ for (int i = 0; i < clientCnt; i++) {
+ G.ignite("client-" + i).events().localListen(new IgnitePredicate<Event>() {
+ @Override public boolean apply(Event evt) {
+ info("Failed event fired on client: " + evt);
+
+ clientFailedLatch.countDown();
+
+ return true;
+ }
+ }, EVT_NODE_FAILED);
+ }
+ }
+ }
+
+ /**
+ * @param srvCnt Number of server nodes.
+ * @param clientCnt Number of client nodes.
+ */
+ private void checkNodes(int srvCnt, int clientCnt) {
+ for (int i = 0; i < srvCnt; i++) {
+ Ignite g = G.ignite("server-" + i);
+
+ assertTrue(srvNodeIds.contains(g.cluster().localNode().id()));
+
+ assertFalse(g.cluster().localNode().isClient());
+
+ checkRemoteNodes(g, srvCnt + clientCnt - 1);
+ }
+
+ for (int i = 0; i < clientCnt; i++) {
+ Ignite g = G.ignite("client-" + i);
+
+ assertTrue(clientNodeIds.contains(g.cluster().localNode().id()));
+
+ assertTrue(g.cluster().localNode().isClient());
+
+ checkRemoteNodes(g, srvCnt + clientCnt - 1);
+ }
+ }
+
+ /**
+ * @param ignite Grid.
+ * @param expCnt Expected nodes count.
+ */
+ @SuppressWarnings("TypeMayBeWeakened")
+ private void checkRemoteNodes(Ignite ignite, int expCnt) {
+ Collection<ClusterNode> nodes = ignite.cluster().forRemotes().nodes();
+
+ assertEquals(expCnt, nodes.size());
+
+ for (ClusterNode node : nodes) {
+ UUID id = node.id();
+
+ if (clientNodeIds.contains(id))
+ assertTrue(node.isClient());
+ else if (srvNodeIds.contains(id))
+ assertFalse(node.isClient());
+ else
+ assert false : "Unexpected node ID: " + id;
+ }
+ }
+
+ /**
+ * @param latch Latch.
+ * @throws InterruptedException If interrupted.
+ */
+ private void await(CountDownLatch latch) throws InterruptedException {
+ assertTrue("Latch count: " + latch.getCount(), latch.await(10000, MILLISECONDS));
+ }
+
+ /**
+ */
+ private static class MessageListener implements IgniteBiPredicate<UUID, Object> {
+ @IgniteInstanceResource
+ private Ignite ignite;
+
+ /** {@inheritDoc} */
+ @Override public boolean apply(UUID uuid, Object msg) {
+ X.println(">>> Received [locNodeId=" + ignite.configuration().getNodeId() + ", msg=" + msg + ']');
+
+ msgLatch.countDown();
+
+ return true;
+ }
+ }
+
+ /**
+ *
+ */
+ private static class TestTcpClientDiscovery extends TcpClientDiscoverySpi {
+ /** */
+ private final Object mux = new Object();
+
+ /** */
+ private final AtomicBoolean writeLock = new AtomicBoolean();
+
+ /** */
+ private final AtomicBoolean openSockLock = new AtomicBoolean();
+
+ /**
+ * @param lock Lock.
+ */
+ private void waitFor(AtomicBoolean lock) {
+ try {
+ synchronized (mux) {
+ while (lock.get())
+ mux.wait();
+ }
+ }
+ catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * @param isPause Is lock.
+ * @param locks Locks.
+ */
+ private void pauseResumeOperation(boolean isPause, AtomicBoolean... locks) {
+ synchronized (mux) {
+ for (AtomicBoolean lock : locks)
+ lock.set(isPause);
+
+ mux.notifyAll();
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void writeToSocket(Socket sock, TcpDiscoveryAbstractMessage msg,
+ GridByteArrayOutputStream bout) throws IOException, IgniteCheckedException {
+ waitFor(writeLock);
+
+ super.writeToSocket(sock, msg, bout);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected Socket openSocket(InetSocketAddress sockAddr) throws IOException {
+ waitFor(openSockLock);
+
+ return super.openSocket(sockAddr);
+ }
+
+ /**
+ *
+ */
+ public void pauseSocketWrite() {
+ pauseResumeOperation(true, writeLock);
+ }
+
+ /**
+ *
+ */
+ public void pauseAll() {
+ pauseResumeOperation(true, openSockLock, writeLock);
+
+ brokeConnection();
+ }
+
+ /**
+ *
+ */
+ public void resumeAll() {
+ pauseResumeOperation(false, openSockLock, writeLock);
+ }
+ }
+ }
[44/50] [abbrv] incubator-ignite git commit: # Make
IgniteUtils.EMPTY_INTS public and use it in other classes.
Posted by se...@apache.org.
# Make IgniteUtils.EMPTY_INTS public and use it in other classes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f027ac54
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f027ac54
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f027ac54
Branch: refs/heads/ignite-836_2
Commit: f027ac54a8f679ea09727f526a47352ac5e3cb4f
Parents: 08360c9
Author: sevdokimov <se...@gridgain.com>
Authored: Tue May 12 18:31:26 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Tue May 12 18:31:26 2015 +0300
----------------------------------------------------------------------
.../apache/ignite/internal/direct/DirectByteBufferStream.java | 4 ++--
.../internal/managers/eventstorage/GridEventStorageManager.java | 5 +----
.../main/java/org/apache/ignite/internal/util/IgniteUtils.java | 4 ++--
3 files changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f027ac54/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java b/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
index 528de10..120350b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
@@ -66,10 +66,10 @@ public class DirectByteBufferStream {
private static final short[] SHORT_ARR_EMPTY = new short[0];
/** */
- private static final int[] INT_ARR_EMPTY = new int[0];
+ private static final int[] INT_ARR_EMPTY = U.EMPTY_INTS;
/** */
- private static final long[] LONG_ARR_EMPTY = new long[0];
+ private static final long[] LONG_ARR_EMPTY = U.EMPTY_LONGS;
/** */
private static final float[] FLOAT_ARR_EMPTY = new float[0];
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f027ac54/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
index 6ebe480..10cc99a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
@@ -50,9 +50,6 @@ import static org.apache.ignite.internal.managers.communication.GridIoPolicy.*;
* Grid event storage SPI manager.
*/
public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi> {
- /** */
- private static final int[] EMPTY = new int[0];
-
/** Local event listeners. */
private final ConcurrentMap<Integer, Set<GridLocalEventListener>> lsnrs = new ConcurrentHashMap8<>();
@@ -106,7 +103,7 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
int[] cfgInclEvtTypes0 = ctx.config().getIncludeEventTypes();
if (F.isEmpty(cfgInclEvtTypes0))
- cfgInclEvtTypes = EMPTY;
+ cfgInclEvtTypes = U.EMPTY_INTS;
else {
cfgInclEvtTypes0 = copy(cfgInclEvtTypes0);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f027ac54/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 06887d2..ffb4e99 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -108,10 +108,10 @@ public abstract class IgniteUtils {
private static final int[] GRID_EVTS;
/** Empty integers array. */
- private static final int[] EMPTY_INTS = new int[0];
+ public static final int[] EMPTY_INTS = new int[0];
/** Empty longs. */
- private static final long[] EMPTY_LONGS = new long[0];
+ public static final long[] EMPTY_LONGS = new long[0];
/** System line separator. */
private static final String NL = System.getProperty("line.separator");
[42/50] [abbrv] incubator-ignite git commit: # IGNITE-709 Improve
ping from server to client.
Posted by se...@apache.org.
# IGNITE-709 Improve ping from server to client.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a001312d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a001312d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a001312d
Branch: refs/heads/ignite-836_2
Commit: a001312d3a6b1175be4ef98e6113ea6eaf179246
Parents: 505a03e
Author: sevdokimov <se...@gridgain.com>
Authored: Tue May 12 16:30:34 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Tue May 12 16:30:34 2015 +0300
----------------------------------------------------------------------
.../internal/util/future/SettableFuture.java | 86 ++++++++++++
.../discovery/tcp/TcpClientDiscoverySpi.java | 11 ++
.../spi/discovery/tcp/TcpDiscoverySpi.java | 138 ++++++++++++++++---
.../tcp/TcpClientDiscoverySpiSelfTest.java | 37 ++++-
4 files changed, 248 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a001312d/modules/core/src/main/java/org/apache/ignite/internal/util/future/SettableFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/future/SettableFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/util/future/SettableFuture.java
new file mode 100644
index 0000000..673b6b6
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/future/SettableFuture.java
@@ -0,0 +1,86 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.internal.util.future;
+
+import java.util.concurrent.*;
+
+/**
+ * Simple implementation of {@link Future}
+ */
+public class SettableFuture<T> implements Future<T> {
+ /** */
+ private final CountDownLatch latch = new CountDownLatch(1);
+
+ /** Result of computation. */
+ private T res;
+
+ /** Exception threw during the computation. */
+ private ExecutionException err;
+
+ /** {@inheritDoc} */
+ @Override public boolean cancel(boolean mayInterruptIfRunning) {
+ throw new UnsupportedOperationException();
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean isCancelled() {
+ return false;
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean isDone() {
+ return latch.getCount() == 0;
+ }
+
+ /** {@inheritDoc} */
+ @Override public T get() throws InterruptedException, ExecutionException {
+ latch.await();
+
+ if (err != null)
+ throw err;
+
+ return res;
+ }
+
+ /** {@inheritDoc} */
+ @Override public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException,
+ TimeoutException {
+
+ if (!latch.await(timeout, unit))
+ throw new TimeoutException();
+
+ if (err != null)
+ throw err;
+
+ return res;
+ }
+
+ /**
+ * Computation is done successful.
+ *
+ * @param res Result of computation.
+ */
+ public void set(T res) {
+ this.res = res;
+
+ latch.countDown();
+ }
+
+ /**
+ * Computation failed.
+ *
+ * @param throwable Error.
+ */
+ public void setException(Throwable throwable) {
+ err = new ExecutionException(throwable);
+
+ latch.countDown();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a001312d/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
index d55d1c5..d1446a8 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
@@ -1109,6 +1109,8 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
processCustomMessage((TcpDiscoveryCustomEventMessage)msg);
else if (msg instanceof TcpDiscoveryClientPingResponse)
processClientPingResponse((TcpDiscoveryClientPingResponse)msg);
+ else if (msg instanceof TcpDiscoveryPingRequest)
+ processPingRequest((TcpDiscoveryPingRequest)msg);
stats.onMessageProcessingFinished(msg);
}
@@ -1416,6 +1418,15 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
}
/**
+ * Router want to ping this client.
+ *
+ * @param msg Message.
+ */
+ private void processPingRequest(TcpDiscoveryPingRequest msg) {
+ sockWriter.sendMessage(new TcpDiscoveryPingResponse(getLocalNodeId()));
+ }
+
+ /**
* @param nodeId Node ID.
* @param metrics Metrics.
* @param cacheMetrics Cache metrics.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a001312d/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index e00f798..f9c6130 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -51,6 +51,7 @@ import java.net.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
+import java.util.concurrent.atomic.*;
import static org.apache.ignite.events.EventType.*;
import static org.apache.ignite.internal.IgniteNodeAttributes.*;
@@ -204,7 +205,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
private int reconCnt = DFLT_RECONNECT_CNT;
/** */
- private final ThreadPoolExecutor utilityPool = new ThreadPoolExecutor(0, 10, 2000, TimeUnit.MILLISECONDS,
+ private final Executor utilityPool = new ThreadPoolExecutor(0, 10, 2000, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<Runnable>());
/** Nodes ring. */
@@ -1143,8 +1144,28 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
UUID locNodeId = getLocalNodeId();
- if (F.contains(locNodeAddrs, addr))
- return F.t(getLocalNodeId(), clientNodeId != null && clientMsgWorkers.containsKey(clientNodeId));
+ if (F.contains(locNodeAddrs, addr)) {
+ if (clientNodeId == null)
+ return F.t(getLocalNodeId(), false);
+
+ ClientMessageWorker clientWorker = clientMsgWorkers.get(clientNodeId);
+
+ if (clientWorker == null)
+ return F.t(getLocalNodeId(), false);
+
+ boolean clientPingRes;
+
+ try {
+ clientPingRes = clientWorker.ping();
+ }
+ catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+
+ throw new IgniteInterruptedCheckedException(e);
+ }
+
+ return F.t(getLocalNodeId(), clientPingRes);
+ }
GridFutureAdapter<IgniteBiTuple<UUID, Boolean>> fut = new GridFutureAdapter<>();
@@ -2659,6 +2680,9 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
else if (msg instanceof TcpDiscoveryClientPingRequest)
processClientPingRequest((TcpDiscoveryClientPingRequest)msg);
+ else if (msg instanceof TcpDiscoveryPingResponse)
+ processPingResponse((TcpDiscoveryPingResponse)msg);
+
else
assert false : "Unknown message type: " + msg.getClass().getSimpleName();
@@ -4499,6 +4523,16 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
/**
* @param msg Message.
*/
+ private void processPingResponse(final TcpDiscoveryPingResponse msg) {
+ ClientMessageWorker clientWorker = clientMsgWorkers.get(msg.creatorNodeId());
+
+ if (clientWorker != null)
+ clientWorker.pingResult(true);
+ }
+
+ /**
+ * @param msg Message.
+ */
private void processCustomMessage(TcpDiscoveryCustomEventMessage msg) {
if (isLocalNodeCoordinator()) {
if (msg.verified()) {
@@ -4660,9 +4694,6 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
/** */
private volatile UUID nodeId;
- /** */
- private volatile boolean client;
-
/**
* Constructor.
*
@@ -4682,6 +4713,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
@Override protected void body() throws InterruptedException {
UUID locNodeId = getLocalNodeId();
+ ClientMessageWorker clientMsgWrk = null;
+
try {
InputStream in;
@@ -4746,8 +4779,12 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
TcpDiscoveryPingResponse res = new TcpDiscoveryPingResponse(locNodeId);
- if (req.clientNodeId() != null)
- res.clientExists(clientMsgWorkers.containsKey(req.clientNodeId()));
+ if (req.clientNodeId() != null) {
+ ClientMessageWorker clientWorker = clientMsgWorkers.get(req.clientNodeId());
+
+ if (clientWorker != null)
+ res.clientExists(clientWorker.ping());
+ }
writeToSocket(sock, res);
}
@@ -4761,10 +4798,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
TcpDiscoveryHandshakeRequest req = (TcpDiscoveryHandshakeRequest)msg;
UUID nodeId = req.creatorNodeId();
- boolean client = req.client();
this.nodeId = nodeId;
- this.client = client;
TcpDiscoveryHandshakeResponse res =
new TcpDiscoveryHandshakeResponse(locNodeId, locNode.internalOrder());
@@ -4774,7 +4809,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
// It can happen if a remote node is stopped and it has a loopback address in the list of addresses,
// the local node sends a handshake request message on the loopback address, so we get here.
if (locNodeId.equals(nodeId)) {
- assert !client;
+ assert !req.client();
if (log.isDebugEnabled())
log.debug("Handshake request from local node: " + req);
@@ -4782,12 +4817,12 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
return;
}
- if (client) {
+ if (req.client()) {
if (log.isDebugEnabled())
log.debug("Created client message worker [locNodeId=" + locNodeId +
", rmtNodeId=" + nodeId + ", sock=" + sock + ']');
- ClientMessageWorker clientMsgWrk = new ClientMessageWorker(sock, nodeId);
+ clientMsgWrk = new ClientMessageWorker(sock, nodeId);
clientMsgWrk.start();
@@ -4796,11 +4831,11 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
if (log.isDebugEnabled())
log.debug("Initialized connection with remote node [nodeId=" + nodeId +
- ", client=" + client + ']');
+ ", client=" + req.client() + ']');
if (debugMode)
debugLog("Initialized connection with remote node [nodeId=" + nodeId +
- ", client=" + client + ']');
+ ", client=" + req.client() + ']');
}
catch (IOException e) {
if (log.isDebugEnabled())
@@ -4881,7 +4916,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
if (!req.responded()) {
boolean ok = processJoinRequestMessage(req);
- if (client && ok)
+ if (clientMsgWrk != null && ok)
continue;
else
// Direct join request - no need to handle this socket anymore.
@@ -4889,7 +4924,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
}
}
else if (msg instanceof TcpDiscoveryClientReconnectMessage) {
- if (client) {
+ if (clientMsgWrk != null) {
TcpDiscoverySpiState state = spiStateCopy();
if (state == CONNECTED) {
@@ -5026,7 +5061,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
msgWorker.addMessage(msg);
// Send receipt back.
- if (!client)
+ if (clientMsgWrk == null)
writeToSocket(sock, RES_OK);
}
catch (IgniteCheckedException e) {
@@ -5080,12 +5115,14 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
}
}
finally {
- if (client) {
+ if (clientMsgWrk != null) {
if (log.isDebugEnabled())
log.debug("Client connection failed [sock=" + sock + ", locNodeId=" + locNodeId +
", rmtNodeId=" + nodeId + ']');
- U.interrupt(clientMsgWorkers.remove(nodeId));
+ clientMsgWorkers.remove(nodeId, clientMsgWrk);
+
+ U.interrupt(clientMsgWrk);
}
U.closeQuiet(sock);
@@ -5238,6 +5275,9 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
/** Current client metrics. */
private volatile ClusterMetrics metrics;
+ /** */
+ private final AtomicReference<SettableFuture<Boolean>> pingFut = new AtomicReference<>();
+
/**
* @param sock Socket.
* @param nodeId Node ID.
@@ -5300,16 +5340,72 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
onException("Client connection failed [sock=" + sock + ", locNodeId="
+ getLocalNodeId() + ", rmtNodeId=" + nodeId + ", msg=" + msg + ']', e);
- U.interrupt(clientMsgWorkers.remove(nodeId));
+ clientMsgWorkers.remove(nodeId, this);
+
+ U.interrupt(this);
U.closeQuiet(sock);
}
}
+ /**
+ *
+ */
+ public void pingResult(boolean res) {
+ SettableFuture<Boolean> fut = pingFut.getAndSet(null);
+
+ if (fut != null)
+ fut.set(res);
+ }
+
+ /**
+ *
+ */
+ public boolean ping() throws InterruptedException {
+ if (isNodeStopping())
+ return false;
+
+ SettableFuture<Boolean> fut;
+
+ while (true) {
+ fut = pingFut.get();
+
+ if (fut != null)
+ break;
+
+ fut = new SettableFuture<>();
+
+ if (pingFut.compareAndSet(null, fut)) {
+ TcpDiscoveryPingRequest pingReq = new TcpDiscoveryPingRequest(getLocalNodeId(), nodeId);
+
+ pingReq.verify(getLocalNodeId());
+
+ addMessage(pingReq);
+
+ break;
+ }
+ }
+
+ try {
+ return fut.get(ackTimeout, TimeUnit.MILLISECONDS);
+ }
+ catch (ExecutionException e) {
+ throw new IgniteSpiException("Internal error: ping future cannot be done with exception", e);
+ }
+ catch (TimeoutException ignored) {
+ if (pingFut.compareAndSet(fut, null))
+ fut.set(false);
+
+ return false;
+ }
+ }
+
/** {@inheritDoc} */
@Override protected void cleanup() {
super.cleanup();
+ pingResult(false);
+
U.closeQuiet(sock);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a001312d/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
index 49ef4aa..507b3e7 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
@@ -383,6 +383,30 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ public void testPingFailedClientNode() throws Exception {
+ startServerNodes(2);
+ startClientNodes(1);
+
+ Ignite srv0 = G.ignite("server-0");
+ Ignite srv1 = G.ignite("server-1");
+ Ignite client = G.ignite("client-0");
+
+ ((TcpDiscoverySpiAdapter)srv0.configuration().getDiscoverySpi()).setAckTimeout(1000);
+
+ ((TestTcpClientDiscovery)client.configuration().getDiscoverySpi()).pauseSocketWrite();
+
+ assert !((IgniteEx)srv1).context().discovery().pingNode(client.cluster().localNode().id());
+ assert !((IgniteEx)srv0).context().discovery().pingNode(client.cluster().localNode().id());
+
+ ((TestTcpClientDiscovery)client.configuration().getDiscoverySpi()).resumeAll();
+
+ assert ((IgniteEx)srv1).context().discovery().pingNode(client.cluster().localNode().id());
+ assert ((IgniteEx)srv0).context().discovery().pingNode(client.cluster().localNode().id());
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
public void testClientReconnectOnRouterFail() throws Exception {
clientsPerSrv = 1;
@@ -461,7 +485,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
clientLeftLatch = new CountDownLatch(1);
- ((TestTcpClientDiscovery)G.ignite("client-1").configuration().getDiscoverySpi()).resume();
+ ((TestTcpClientDiscovery)G.ignite("client-1").configuration().getDiscoverySpi()).resumeAll();
await(clientLeftLatch);
@@ -1042,7 +1066,14 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
/**
*
*/
- private void pauseAll() {
+ public void pauseSocketWrite() {
+ pauseResumeOperation(true, writeLock);
+ }
+
+ /**
+ *
+ */
+ public void pauseAll() {
pauseResumeOperation(true, openSockLock, writeLock);
brokeConnection();
@@ -1051,7 +1082,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
/**
*
*/
- private void resume() {
+ public void resumeAll() {
pauseResumeOperation(false, openSockLock, writeLock);
}
}
[14/50] [abbrv] incubator-ignite git commit: #ignite-481: "Server
nodes not found" warning in IgfsDeleteWorker use LT.
Posted by se...@apache.org.
#ignite-481: "Server nodes not found" warning in IgfsDeleteWorker use LT.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f62afc62
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f62afc62
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f62afc62
Branch: refs/heads/ignite-836_2
Commit: f62afc62a5794272411d0fe25b46e8724fd77209
Parents: ef2bed9
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri May 8 14:25:36 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri May 8 14:25:36 2015 +0300
----------------------------------------------------------------------
.../apache/ignite/internal/processors/igfs/IgfsDeleteWorker.java | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f62afc62/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteWorker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteWorker.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteWorker.java
index 250b3a0..1b2d3fe 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteWorker.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteWorker.java
@@ -21,6 +21,7 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.events.*;
import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.cluster.*;
import org.apache.ignite.internal.managers.communication.*;
import org.apache.ignite.internal.managers.eventstorage.*;
import org.apache.ignite.internal.util.future.*;
@@ -155,6 +156,9 @@ public class IgfsDeleteWorker extends IgfsThread {
try {
info = meta.info(TRASH_ID);
}
+ catch(ClusterTopologyServerNotFoundException e) {
+ LT.warn(log, e, "Server nodes not found.");
+ }
catch (IgniteCheckedException e) {
U.error(log, "Cannot obtain trash directory info.", e);
}
[05/50] [abbrv] incubator-ignite git commit: # ignite-157
Posted by se...@apache.org.
# ignite-157
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/46dda3dd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/46dda3dd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/46dda3dd
Branch: refs/heads/ignite-836_2
Commit: 46dda3dd4c893c811f51e3e491e459422c0ddf06
Parents: 41d1a14
Author: sboikov <sb...@gridgain.com>
Authored: Fri May 8 12:12:30 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri May 8 12:15:51 2015 +0300
----------------------------------------------------------------------
.../GridCacheAbstractNodeRestartSelfTest.java | 11 +++++++----
.../GridCacheAtomicReplicatedFailoverSelfTest.java | 6 ++++++
.../replicated/GridCacheReplicatedFailoverSelfTest.java | 6 ++++++
.../ignite/testsuites/IgniteCacheRestartTestSuite.java | 4 ++--
4 files changed, 21 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46dda3dd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
index 85e2c7c..76020b8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache.distributed;
import org.apache.ignite.*;
import org.apache.ignite.cache.*;
-import org.apache.ignite.cluster.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -106,6 +105,10 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
disco.setIpFinder(ipFinder);
+ disco.setSocketTimeout(10_000);
+ disco.setAckTimeout(10_000);
+ disco.setNetworkTimeout(10_000);
+
c.setDiscoverySpi(disco);
return c;
@@ -512,7 +515,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
try {
cache.put(key, Integer.toString(key));
}
- catch (TransactionRollbackException | ClusterTopologyException | CacheException ignored) {
+ catch (IgniteException | CacheException ignored) {
// It is ok if primary node leaves grid.
}
@@ -668,7 +671,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
tx.commit();
}
}
- catch (ClusterTopologyException | CacheException ignored) {
+ catch (IgniteException | CacheException ignored) {
// It is ok if primary node leaves grid.
}
@@ -814,7 +817,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
tx.commit();
}
- catch (ClusterTopologyException | CacheException ignored) {
+ catch (IgniteException | CacheException ignored) {
// It is ok if primary node leaves grid.
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46dda3dd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicReplicatedFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicReplicatedFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicReplicatedFailoverSelfTest.java
index 0a2781b..1e57c09 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicReplicatedFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicReplicatedFailoverSelfTest.java
@@ -18,6 +18,7 @@
package org.apache.ignite.internal.processors.cache.distributed.dht.atomic;
import org.apache.ignite.cache.*;
+import org.apache.ignite.configuration.*;
import static org.apache.ignite.cache.CacheMode.*;
@@ -29,4 +30,9 @@ public class GridCacheAtomicReplicatedFailoverSelfTest extends GridCacheAtomicFa
@Override protected CacheMode cacheMode() {
return REPLICATED;
}
+
+ /** {@inheritDoc} */
+ @Override protected NearCacheConfiguration nearConfiguration() {
+ return null;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46dda3dd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFailoverSelfTest.java
index 326f57d..3461dd4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFailoverSelfTest.java
@@ -18,6 +18,7 @@
package org.apache.ignite.internal.processors.cache.distributed.replicated;
import org.apache.ignite.cache.*;
+import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.processors.cache.*;
import static org.apache.ignite.cache.CacheMode.*;
@@ -30,4 +31,9 @@ public class GridCacheReplicatedFailoverSelfTest extends GridCacheAbstractFailov
@Override protected CacheMode cacheMode() {
return REPLICATED;
}
+
+ /** {@inheritDoc} */
+ @Override protected NearCacheConfiguration nearConfiguration() {
+ return null;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46dda3dd/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
index a8f15dc..e5372e8 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
@@ -35,9 +35,9 @@ public class IgniteCacheRestartTestSuite extends TestSuite {
suite.addTestSuite(GridCachePartitionedTxSalvageSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedNodeRestartTest.class);
+ suite.addTestSuite(GridCachePartitionedOptimisticTxNodeRestartTest.class);
// TODO IGNITE-157.
- //suite.addTestSuite(GridCachePartitionedNodeRestartTest.class);
- //suite.addTestSuite(GridCachePartitionedOptimisticTxNodeRestartTest.class);
// suite.addTestSuite(GridCacheReplicatedNodeRestartSelfTest.class);
suite.addTestSuite(IgniteCacheAtomicNodeRestartTest.class);
[30/50] [abbrv] incubator-ignite git commit: # IGNITE-709 Use
joinTimeout instead of openConnTimeout.
Posted by se...@apache.org.
# IGNITE-709 Use joinTimeout instead of openConnTimeout.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/28498e99
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/28498e99
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/28498e99
Branch: refs/heads/ignite-836_2
Commit: 28498e99bafbd167257fd1cf836cde7902b8aa51
Parents: c4eab3c
Author: sevdokimov <se...@gridgain.com>
Authored: Fri May 8 18:29:35 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Fri May 8 18:29:35 2015 +0300
----------------------------------------------------------------------
.../discovery/tcp/TcpClientDiscoverySpi.java | 28 ++------------
.../spi/discovery/tcp/TcpDiscoverySpi.java | 31 ----------------
.../discovery/tcp/TcpDiscoverySpiAdapter.java | 39 ++++++++++++++++++++
.../tcp/TcpClientDiscoverySelfTest.java | 11 +++++-
.../TcpClientDiscoverySpiConfigSelfTest.java | 2 +-
5 files changed, 53 insertions(+), 58 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/28498e99/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
index 2513298..6752bf5 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
@@ -60,9 +60,6 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
/** Default disconnect check interval. */
public static final long DFLT_DISCONNECT_CHECK_INT = 2000;
- /** Default open connection. */
- public static final long DFLT_OPEN_CONN_TIMEOUT = 5000;
-
/** */
private static final Object JOIN_TIMEOUT = "JOIN_TIMEOUT";
@@ -109,9 +106,6 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
private final Timer timer = new Timer("TcpClientDiscoverySpi.timer");
/** */
- private long openConnTimeout = DFLT_OPEN_CONN_TIMEOUT;
-
- /** */
private MessageWorker msgWorker;
/** {@inheritDoc} */
@@ -144,20 +138,6 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
return netTimeout;
}
- /**
- * @return Timeout for opening socket.
- */
- public long getOpenConnectionTimeout() {
- return openConnTimeout;
- }
-
- /**
- * @param openConnTimeout Timeout for opening socket
- */
- public void setOpenConnectionTimeout(long openConnTimeout) {
- this.openConnTimeout = openConnTimeout;
- }
-
/** {@inheritDoc} */
@Override public int getThreadPriority() {
return threadPri;
@@ -233,7 +213,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
assertParameter(ackTimeout > 0, "ackTimeout > 0");
assertParameter(hbFreq > 0, "heartbeatFreq > 0");
assertParameter(threadPri > 0, "threadPri > 0");
- assertParameter(openConnTimeout > 0, "openConnectionTimeout > 0");
+ assertParameter(joinTimeout >= 0, "joinTimeout >= 0");
try {
locHost = U.resolveLocalHost(locAddr);
@@ -430,7 +410,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
/**
* @return Opened socket or {@code null} if timeout.
- * @see #openConnTimeout
+ * @see #joinTimeout
*/
@SuppressWarnings("BusyWait")
@Nullable private Socket joinTopology(boolean recon) throws IgniteSpiException, InterruptedException {
@@ -452,7 +432,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
else {
U.warn(log, "No addresses registered in the IP finder (will retry in 2000ms): " + ipFinder);
- if ((U.currentTimeMillis() - startTime) > openConnTimeout)
+ if ((U.currentTimeMillis() - startTime) > joinTimeout)
return null;
Thread.sleep(2000);
@@ -526,7 +506,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
U.warn(log, "Failed to connect to any address from IP finder (will retry to join topology " +
"in 2000ms): " + addrs0);
- if ((U.currentTimeMillis() - startTime) > openConnTimeout)
+ if ((U.currentTimeMillis() - startTime) > joinTimeout)
return null;
Thread.sleep(2000);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/28498e99/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index c1b60a7..3624791 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -152,9 +152,6 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
/** Default local port range (value is <tt>100</tt>). */
public static final int DFLT_PORT_RANGE = 100;
- /** Default timeout for joining topology (value is <tt>0</tt>). */
- public static final long DFLT_JOIN_TIMEOUT = 0;
-
/** Default reconnect attempts count (value is <tt>10</tt>). */
public static final int DFLT_RECONNECT_CNT = 10;
@@ -192,10 +189,6 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
/** Maximum message acknowledgement timeout. */
private long maxAckTimeout = DFLT_MAX_ACK_TIMEOUT;
- /** Join timeout. */
- @SuppressWarnings("RedundantFieldInitialization")
- private long joinTimeout = DFLT_JOIN_TIMEOUT;
-
/** Max heartbeats count node can miss without initiating status check. */
private int maxMissedHbs = DFLT_MAX_MISSED_HEARTBEATS;
@@ -367,30 +360,6 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
}
/** {@inheritDoc} */
- @Override public long getJoinTimeout() {
- return joinTimeout;
- }
-
- /**
- * Sets join timeout.
- * <p>
- * If non-shared IP finder is used and node fails to connect to
- * any address from IP finder, node keeps trying to join within this
- * timeout. If all addresses are still unresponsive, exception is thrown
- * and node startup fails.
- * <p>
- * If not specified, default is {@link #DFLT_JOIN_TIMEOUT}.
- *
- * @param joinTimeout Join timeout ({@code 0} means wait forever).
- *
- * @see TcpDiscoveryIpFinder#isShared()
- */
- @IgniteSpiConfiguration(optional = true)
- public void setJoinTimeout(long joinTimeout) {
- this.joinTimeout = joinTimeout;
- }
-
- /** {@inheritDoc} */
@Override public int getLocalPort() {
TcpDiscoveryNode locNode0 = locNode;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/28498e99/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
index 3133169..ac925d2 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
@@ -60,6 +60,9 @@ abstract class TcpDiscoverySpiAdapter extends IgniteSpiAdapter implements Discov
/** Default network timeout in milliseconds (value is <tt>5,000ms</tt>). */
public static final long DFLT_NETWORK_TIMEOUT = 5000;
+ /** Default timeout for joining topology (value is <tt>0</tt>). */
+ public static final long DFLT_JOIN_TIMEOUT = 0;
+
/** Default value for thread priority (value is <tt>10</tt>). */
public static final int DFLT_THREAD_PRI = 10;
@@ -93,6 +96,10 @@ abstract class TcpDiscoverySpiAdapter extends IgniteSpiAdapter implements Discov
/** Network timeout. */
protected long netTimeout = DFLT_NETWORK_TIMEOUT;
+ /** Join timeout. */
+ @SuppressWarnings("RedundantFieldInitialization")
+ protected long joinTimeout = DFLT_JOIN_TIMEOUT;
+
/** Thread priority for all threads started by SPI. */
protected int threadPri = DFLT_THREAD_PRI;
@@ -249,6 +256,38 @@ abstract class TcpDiscoverySpiAdapter extends IgniteSpiAdapter implements Discov
}
/**
+ * Join timeout.
+ * <p>
+ * If non-shared IP finder is used and node fails to connect to
+ * any address from IP finder, node keeps trying to join within this
+ * timeout. If all addresses are still unresponsive, exception is thrown
+ * and node startup fails.
+ * @return Join timeout in milliseconds, ({@code 0} means wait forever).
+ */
+ public long getJoinTimeout() {
+ return joinTimeout;
+ }
+
+ /**
+ * Sets join timeout.
+ * <p>
+ * If non-shared IP finder is used and node fails to connect to
+ * any address from IP finder, node keeps trying to join within this
+ * timeout. If all addresses are still unresponsive, exception is thrown
+ * and node startup fails.
+ * <p>
+ * If not specified, default is {@link #DFLT_JOIN_TIMEOUT}.
+ *
+ * @param joinTimeout Join timeout ({@code 0} means wait forever).
+ *
+ * @see TcpDiscoveryIpFinder#isShared()
+ */
+ @IgniteSpiConfiguration(optional = true)
+ public void setJoinTimeout(long joinTimeout) {
+ this.joinTimeout = joinTimeout;
+ }
+
+ /**
* Sets thread priority. All threads within SPI will be started with it.
* <p>
* If not provided, default value is {@link #DFLT_THREAD_PRI}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/28498e99/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySelfTest.java
index 15d9c64..2a123ce 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySelfTest.java
@@ -94,6 +94,9 @@ public class TcpClientDiscoverySelfTest extends GridCommonAbstractTest {
/** */
private TcpDiscoveryVmIpFinder clientIpFinder;
+ /** */
+ private long joinTimeout = TcpClientDiscoverySpi.DFLT_JOIN_TIMEOUT;
+
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
@@ -110,6 +113,8 @@ public class TcpClientDiscoverySelfTest extends GridCommonAbstractTest {
else if (gridName.startsWith("client")) {
TcpClientDiscoverySpi disco = new TestTcpClientDiscovery();
+ disco.setJoinTimeout(joinTimeout);
+
TcpDiscoveryVmIpFinder ipFinder;
if (clientIpFinder != null)
@@ -166,6 +171,7 @@ public class TcpClientDiscoverySelfTest extends GridCommonAbstractTest {
nodeId = null;
clientIpFinder = null;
+ joinTimeout = TcpClientDiscoverySpi.DFLT_JOIN_TIMEOUT;
assert G.allGrids().isEmpty();
}
@@ -174,8 +180,9 @@ public class TcpClientDiscoverySelfTest extends GridCommonAbstractTest {
*
* @throws Exception
*/
- public void testNodeJoinedTimeout() throws Exception {
+ public void testJoinTimeout() throws Exception {
clientIpFinder = new TcpDiscoveryVmIpFinder();
+ joinTimeout = 1000;
try {
startClientNodes(1);
@@ -670,7 +677,7 @@ public class TcpClientDiscoverySelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If any error occurs.
*/
- public void testJoinTimeout() throws Exception {
+ public void testTimeoutWaitingNodeAddedMessage() throws Exception {
startServerNodes(2);
final CountDownLatch cnt = new CountDownLatch(1);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/28498e99/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiConfigSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiConfigSelfTest.java
index 6dbd34e..3e8b231 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiConfigSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiConfigSelfTest.java
@@ -34,6 +34,6 @@ public class TcpClientDiscoverySpiConfigSelfTest extends GridSpiAbstractConfigTe
checkNegativeSpiProperty(new TcpClientDiscoverySpi(), "ackTimeout", 0);
checkNegativeSpiProperty(new TcpClientDiscoverySpi(), "heartbeatFrequency", 0);
checkNegativeSpiProperty(new TcpClientDiscoverySpi(), "threadPriority", -1);
- checkNegativeSpiProperty(new TcpClientDiscoverySpi(), "openConnectionTimeout", 0);
+ checkNegativeSpiProperty(new TcpClientDiscoverySpi(), "joinTimeout", -1);
}
}
[12/50] [abbrv] incubator-ignite git commit: # ignite-sprint-5 run on
TC tx recovery suite separately
Posted by se...@apache.org.
# ignite-sprint-5 run on TC tx recovery suite separately
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ef2bed9b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ef2bed9b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ef2bed9b
Branch: refs/heads/ignite-836_2
Commit: ef2bed9bfbbe5602f61ae57fac582cf13d235ed3
Parents: de19191
Author: sboikov <sb...@gridgain.com>
Authored: Fri May 8 13:35:22 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri May 8 13:35:22 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java | 3 ---
1 file changed, 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ef2bed9b/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 2e56b7a..9394693 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
@@ -132,9 +132,6 @@ public class IgniteCacheTestSuite3 extends TestSuite {
// Iterators.
suite.addTest(IgniteCacheIteratorsSelfTestSuite.suite());
- // Add tx recovery test suite.
- suite.addTest(IgniteCacheTxRecoverySelfTestSuite.suite());
-
// Cache interceptor tests.
suite.addTest(IgniteCacheInterceptorSelfTestSuite.suite());
[08/50] [abbrv] incubator-ignite git commit: Merge remote-tracking
branch 'remotes/origin/ignite-sprint-4-incubating' into ignite-sprint-4
Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-4-incubating' into ignite-sprint-4
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e9f2e6dd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e9f2e6dd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e9f2e6dd
Branch: refs/heads/ignite-836_2
Commit: e9f2e6dd4a9d553504904d018947fbbb95b12cdb
Parents: dea6118 dabcf1d
Author: avinogradov <av...@gridgain.com>
Authored: Fri May 8 12:42:55 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri May 8 12:42:55 2015 +0300
----------------------------------------------------------------------
pom.xml | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
[33/50] [abbrv] incubator-ignite git commit: Merge remote-tracking
branch 'remotes/origin/ignite-sprint-5' into ignite-157
Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-5' into ignite-157
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ab1f9dd2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ab1f9dd2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ab1f9dd2
Branch: refs/heads/ignite-836_2
Commit: ab1f9dd278a1c1e42cf36b21a2bedcd2f7e4129e
Parents: 250dd8e f6012f1
Author: sboikov <sb...@gridgain.com>
Authored: Tue May 12 09:05:47 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue May 12 09:05:47 2015 +0300
----------------------------------------------------------------------
.../processors/resource/GridResourceField.java | 11 +
.../processors/resource/GridResourceIoc.java | 387 ++++++-------------
.../processors/resource/GridResourceMethod.java | 13 +
.../resource/GridResourceProcessor.java | 4 +-
.../ignite/internal/util/IgniteUtils.java | 15 +
.../spi/discovery/tcp/TcpDiscoverySpi.java | 24 +-
parent/pom.xml | 2 +
pom.xml | 33 --
8 files changed, 193 insertions(+), 296 deletions(-)
----------------------------------------------------------------------
[06/50] [abbrv] incubator-ignite git commit: "Version changed
Posted by se...@apache.org.
"Version changed
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/de19191c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/de19191c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/de19191c
Branch: refs/heads/ignite-836_2
Commit: de19191c5a257522884f66ae1fe5c82aab188be4
Parents: 745cf7f
Author: Ignite Teamcity <ig...@apache.org>
Authored: Fri May 8 12:23:34 2015 +0300
Committer: Ignite Teamcity <ig...@apache.org>
Committed: Fri May 8 12:23:34 2015 +0300
----------------------------------------------------------------------
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
modules/clients/pom.xml | 2 +-
modules/cloud/pom.xml | 2 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 2 +-
modules/core/src/main/resources/ignite.properties | 2 +-
modules/extdata/p2p/pom.xml | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 2 +-
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/rest-http/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/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/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 +-
pom.xml | 2 +-
32 files changed, 32 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index 3ac5a80..064b804 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
</parent>
<artifactId>ignite-examples</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/aop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aop/pom.xml b/modules/aop/pom.xml
index 38a593e..a248f85 100644
--- a/modules/aop/pom.xml
+++ b/modules/aop/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-aop</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/aws/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aws/pom.xml b/modules/aws/pom.xml
index 83eced2..a6604f9 100644
--- a/modules/aws/pom.xml
+++ b/modules/aws/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-aws</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/clients/pom.xml
----------------------------------------------------------------------
diff --git a/modules/clients/pom.xml b/modules/clients/pom.xml
index c90173f..96b6542 100644
--- a/modules/clients/pom.xml
+++ b/modules/clients/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-clients</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/cloud/pom.xml
----------------------------------------------------------------------
diff --git a/modules/cloud/pom.xml b/modules/cloud/pom.xml
index 754491e..25d610e 100644
--- a/modules/cloud/pom.xml
+++ b/modules/cloud/pom.xml
@@ -29,7 +29,7 @@
</parent>
<artifactId>ignite-cloud</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<properties>
<jcloud.version>1.9.0</jcloud.version>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/codegen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/codegen/pom.xml b/modules/codegen/pom.xml
index 15c3d5d..ed4aa8f 100644
--- a/modules/codegen/pom.xml
+++ b/modules/codegen/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-codegen</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index e3a7b97..72d993f 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-core</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/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 432b2ad..80bffed 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.0.3
+ignite.version=1.0.4
ignite.build=0
ignite.revision=DEV
ignite.rel.date=01011970
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/extdata/p2p/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/pom.xml b/modules/extdata/p2p/pom.xml
index cc6843f..2357695 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.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/extdata/uri/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/pom.xml b/modules/extdata/uri/pom.xml
index 980db73..bffe625 100644
--- a/modules/extdata/uri/pom.xml
+++ b/modules/extdata/uri/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-extdata-uri</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/gce/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gce/pom.xml b/modules/gce/pom.xml
index b33d76f..310ba31 100644
--- a/modules/gce/pom.xml
+++ b/modules/gce/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-gce</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/geospatial/pom.xml
----------------------------------------------------------------------
diff --git a/modules/geospatial/pom.xml b/modules/geospatial/pom.xml
index dc7a454..b8111f1 100644
--- a/modules/geospatial/pom.xml
+++ b/modules/geospatial/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-geospatial</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/hadoop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hadoop/pom.xml b/modules/hadoop/pom.xml
index fba22c1..782f0c9 100644
--- a/modules/hadoop/pom.xml
+++ b/modules/hadoop/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-hadoop</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/hibernate/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hibernate/pom.xml b/modules/hibernate/pom.xml
index f7d0443..d9caf79 100644
--- a/modules/hibernate/pom.xml
+++ b/modules/hibernate/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-hibernate</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/indexing/pom.xml
----------------------------------------------------------------------
diff --git a/modules/indexing/pom.xml b/modules/indexing/pom.xml
index e808ca3..3ac136c 100644
--- a/modules/indexing/pom.xml
+++ b/modules/indexing/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-indexing</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/jcl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jcl/pom.xml b/modules/jcl/pom.xml
index 061e27c..d81c7cb 100644
--- a/modules/jcl/pom.xml
+++ b/modules/jcl/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-jcl</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/jta/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jta/pom.xml b/modules/jta/pom.xml
index b6e0928..e02e601 100644
--- a/modules/jta/pom.xml
+++ b/modules/jta/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-jta</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/log4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/log4j/pom.xml b/modules/log4j/pom.xml
index d855911..b07549f 100644
--- a/modules/log4j/pom.xml
+++ b/modules/log4j/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-log4j</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/rest-http/pom.xml
----------------------------------------------------------------------
diff --git a/modules/rest-http/pom.xml b/modules/rest-http/pom.xml
index 95800ac..4be6b4a 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.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/scalar/pom.xml
----------------------------------------------------------------------
diff --git a/modules/scalar/pom.xml b/modules/scalar/pom.xml
index 3160cc2..295d3de 100644
--- a/modules/scalar/pom.xml
+++ b/modules/scalar/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-scalar</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/schedule/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schedule/pom.xml b/modules/schedule/pom.xml
index 4cda672..1a36beb 100644
--- a/modules/schedule/pom.xml
+++ b/modules/schedule/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-schedule</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schema-import/pom.xml b/modules/schema-import/pom.xml
index 51b5ff0..0cda51b 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.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/slf4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/slf4j/pom.xml b/modules/slf4j/pom.xml
index d7109c2..d2fdcef 100644
--- a/modules/slf4j/pom.xml
+++ b/modules/slf4j/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-slf4j</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/spring/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spring/pom.xml b/modules/spring/pom.xml
index 26dfc14..8494ad0 100644
--- a/modules/spring/pom.xml
+++ b/modules/spring/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-spring</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/ssh/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ssh/pom.xml b/modules/ssh/pom.xml
index 82a7983..ba29b8a 100644
--- a/modules/ssh/pom.xml
+++ b/modules/ssh/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-ssh</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/tools/pom.xml
----------------------------------------------------------------------
diff --git a/modules/tools/pom.xml b/modules/tools/pom.xml
index b38de40..1e9f270 100644
--- a/modules/tools/pom.xml
+++ b/modules/tools/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-tools</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/urideploy/pom.xml
----------------------------------------------------------------------
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index c711902..b5f5b75 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-urideploy</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/visor-console/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml
index a70dd2c..45e0f30 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.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/visor-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-plugins/pom.xml b/modules/visor-plugins/pom.xml
index 96e7b17..edc45b6 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.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<!-- Ignite dependencies -->
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/web/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/pom.xml b/modules/web/pom.xml
index 92f9aa7..1479e79 100644
--- a/modules/web/pom.xml
+++ b/modules/web/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-web</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/modules/yardstick/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/pom.xml b/modules/yardstick/pom.xml
index 7298f6b..0c20fbb 100644
--- a/modules/yardstick/pom.xml
+++ b/modules/yardstick/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-yardstick</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<properties>
<yardstick.version>0.7.0</yardstick.version>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de19191c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c445fd3..c5a9e5d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
<groupId>org.apache.ignite</groupId>
<artifactId>ignite</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
[36/50] [abbrv] incubator-ignite git commit: ignite source-pack fix
Posted by se...@apache.org.
ignite source-pack fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7da0df9d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7da0df9d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7da0df9d
Branch: refs/heads/ignite-836_2
Commit: 7da0df9dffca55e4153bbdcfc02bb0c2fb417989
Parents: ecc7a50
Author: avinogradov <av...@gridgain.com>
Authored: Tue May 12 13:56:02 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Tue May 12 13:56:02 2015 +0300
----------------------------------------------------------------------
assembly/release-base.xml | 4 +-
bin/ignite-schema-import.bat | 2 +-
bin/ignite-schema-import.sh | 2 +-
bin/ignite.bat | 2 +-
bin/ignite.sh | 2 +-
bin/ignitevisorcmd.bat | 2 +-
bin/ignitevisorcmd.sh | 2 +-
bin/include/build-classpath.bat | 46 +++++++++++++++++++++++
bin/include/build-classpath.sh | 71 +++++++++++++++++++++++++++++++++++
bin/include/target-classpath.bat | 46 -----------------------
bin/include/target-classpath.sh | 71 -----------------------------------
pom.xml | 4 +-
12 files changed, 127 insertions(+), 127 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7da0df9d/assembly/release-base.xml
----------------------------------------------------------------------
diff --git a/assembly/release-base.xml b/assembly/release-base.xml
index 6d6465e..88f1d10 100644
--- a/assembly/release-base.xml
+++ b/assembly/release-base.xml
@@ -71,7 +71,7 @@
<excludes>
<exclude>**/*hadoop*.bat</exclude>
<exclude>igniterouter.bat</exclude>
- <exclude>**/target-classpath.bat</exclude>
+ <exclude>**/build-classpath.bat</exclude>
<exclude>ignitevisorcmd.bat</exclude>
<exclude>ignite-schema-import.bat</exclude>
</excludes>
@@ -87,7 +87,7 @@
<excludes>
<exclude>**/*hadoop*.sh</exclude>
<exclude>igniterouter.sh</exclude>
- <exclude>**/target-classpath.sh</exclude>
+ <exclude>**/build-classpath.sh</exclude>
<exclude>**/service.sh</exclude>
<exclude>ignitevisorcmd.sh</exclude>
<exclude>ignite-schema-import.sh</exclude>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7da0df9d/bin/ignite-schema-import.bat
----------------------------------------------------------------------
diff --git a/bin/ignite-schema-import.bat b/bin/ignite-schema-import.bat
index 4731105..d48234c 100644
--- a/bin/ignite-schema-import.bat
+++ b/bin/ignite-schema-import.bat
@@ -91,7 +91,7 @@ if /i "%SCRIPTS_HOME%\" == "%~dp0" goto run
:: Set IGNITE_LIBS
::
call "%SCRIPTS_HOME%\include\setenv.bat"
-call "%SCRIPTS_HOME%\include\target-classpath.bat" &:: Will be removed in release.
+call "%SCRIPTS_HOME%\include\build-classpath.bat" &:: Will be removed in release.
set CP=%JAVA_HOME%\jre\lib\jfxrt.jar;%IGNITE_HOME%\bin\include\schema-import\*;%IGNITE_LIBS%
::
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7da0df9d/bin/ignite-schema-import.sh
----------------------------------------------------------------------
diff --git a/bin/ignite-schema-import.sh b/bin/ignite-schema-import.sh
index 0a70d54..8f2a8d5 100755
--- a/bin/ignite-schema-import.sh
+++ b/bin/ignite-schema-import.sh
@@ -57,7 +57,7 @@ setIgniteHome
# Set IGNITE_LIBS.
#
. "${SCRIPTS_HOME}"/include/setenv.sh
-. "${SCRIPTS_HOME}"/include/target-classpath.sh # Will be removed in release.
+. "${SCRIPTS_HOME}"/include/build-classpath.sh # Will be removed in release.
CP="${JAVA_HOME}/jre/lib/jfxrt.jar${SEP}${IGNITE_HOME}/bin/include/schema-import/*${SEP}${IGNITE_LIBS}"
#
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7da0df9d/bin/ignite.bat
----------------------------------------------------------------------
diff --git a/bin/ignite.bat b/bin/ignite.bat
index 687db60..20836c0 100644
--- a/bin/ignite.bat
+++ b/bin/ignite.bat
@@ -102,7 +102,7 @@ if "%OS%" == "Windows_NT" set PROG_NAME=%~nx0%
:: Set IGNITE_LIBS
::
call "%SCRIPTS_HOME%\include\setenv.bat"
-call "%SCRIPTS_HOME%\include\target-classpath.bat" &:: Will be removed in release.
+call "%SCRIPTS_HOME%\include\build-classpath.bat" &:: Will be removed in release.
set CP=%IGNITE_LIBS%
::
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7da0df9d/bin/ignite.sh
----------------------------------------------------------------------
diff --git a/bin/ignite.sh b/bin/ignite.sh
index a246613..ee92d27 100755
--- a/bin/ignite.sh
+++ b/bin/ignite.sh
@@ -58,7 +58,7 @@ fi
# Set IGNITE_LIBS.
#
. "${SCRIPTS_HOME}"/include/setenv.sh
-. "${SCRIPTS_HOME}"/include/target-classpath.sh # Will be removed in release.
+. "${SCRIPTS_HOME}"/include/build-classpath.sh # Will be removed in release.
CP="${IGNITE_LIBS}"
RANDOM_NUMBER=$("$JAVA" -cp "${CP}" org.apache.ignite.startup.cmdline.CommandLineRandomNumberGenerator)
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7da0df9d/bin/ignitevisorcmd.bat
----------------------------------------------------------------------
diff --git a/bin/ignitevisorcmd.bat b/bin/ignitevisorcmd.bat
index 1cf2b26..fe06530 100644
--- a/bin/ignitevisorcmd.bat
+++ b/bin/ignitevisorcmd.bat
@@ -100,7 +100,7 @@ if "%OS%" == "Windows_NT" set PROG_NAME=%~nx0%
:: Set IGNITE_LIBS
::
call "%SCRIPTS_HOME%\include\setenv.bat"
-call "%SCRIPTS_HOME%\include\target-classpath.bat" &:: Will be removed in release.
+call "%SCRIPTS_HOME%\include\build-classpath.bat" &:: Will be removed in release.
set CP=%IGNITE_HOME%\bin\include\visor-common\*;%IGNITE_HOME%\bin\include\visorcmd\*;%IGNITE_LIBS%
::
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7da0df9d/bin/ignitevisorcmd.sh
----------------------------------------------------------------------
diff --git a/bin/ignitevisorcmd.sh b/bin/ignitevisorcmd.sh
index 6118560..91d6c5a 100755
--- a/bin/ignitevisorcmd.sh
+++ b/bin/ignitevisorcmd.sh
@@ -53,7 +53,7 @@ setIgniteHome
# Set IGNITE_LIBS.
#
. "${SCRIPTS_HOME}"/include/setenv.sh
-. "${SCRIPTS_HOME}"/include/target-classpath.sh # Will be removed in release.
+. "${SCRIPTS_HOME}"/include/build-classpath.sh # Will be removed in release.
CP="${IGNITE_HOME}/bin/include/visor-common/*${SEP}${IGNITE_HOME}/bin/include/visorcmd/*${SEP}${IGNITE_LIBS}"
#
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7da0df9d/bin/include/build-classpath.bat
----------------------------------------------------------------------
diff --git a/bin/include/build-classpath.bat b/bin/include/build-classpath.bat
new file mode 100644
index 0000000..5f932d3
--- /dev/null
+++ b/bin/include/build-classpath.bat
@@ -0,0 +1,46 @@
+::
+:: 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.
+::
+
+:: Target class path resolver.
+::
+:: Can be used like:
+:: call "%IGNITE_HOME%\bin\include\build-classpath.bat"
+:: in other scripts to set classpath using libs from target folder.
+::
+:: Will be excluded in release.
+
+@echo off
+
+for /D %%F in (modules\*) do if not %%F == "modules" call :includeToClassPath %%F
+
+for /D %%F in (%IGNITE_HOME%\modules\*) do if not %%F == "%IGNITE_HOME%\modules" call :includeToClassPath %%F
+
+goto :eof
+
+:includeToClassPath
+if exist "%1\target\" (
+ if exist "%1\target\classes\" call :concat %1\target\classes
+
+ if exist "%1\target\test-classes\" call :concat %1\target\test-classes
+
+ if exist "%1\target\libs\" call :concat %1\target\libs\*
+)
+goto :eof
+
+:concat
+set IGNITE_LIBS=%IGNITE_LIBS%;%1
+goto :eof
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7da0df9d/bin/include/build-classpath.sh
----------------------------------------------------------------------
diff --git a/bin/include/build-classpath.sh b/bin/include/build-classpath.sh
new file mode 100644
index 0000000..9f0c878
--- /dev/null
+++ b/bin/include/build-classpath.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+#
+# 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.
+#
+
+# Target class path resolver.
+#
+# Can be used like:
+# . "${IGNITE_HOME}"/bin/include/build-classpath.sh
+# in other scripts to set classpath using libs from target folder.
+#
+# Will be excluded in release.
+
+
+#
+# OS specific support.
+#
+SEP=":";
+
+case "`uname`" in
+ MINGW*)
+ SEP=";";
+ export IGNITE_HOME=`echo $IGNITE_HOME | sed -e 's/^\/\([a-zA-Z]\)/\1:/'`
+ ;;
+ CYGWIN*)
+ SEP=";";
+ export IGNITE_HOME=`echo $IGNITE_HOME | sed -e 's/^\/\([a-zA-Z]\)/\1:/'`
+ ;;
+esac
+
+includeToClassPath() {
+ for file in $1/*
+ do
+ if [ -d ${file} ] && [ -d "${file}/target" ]; then
+ if [ -d "${file}/target/classes" ]; then
+ IGNITE_LIBS=${IGNITE_LIBS}${SEP}${file}/target/classes
+ fi
+
+ if [ -d "${file}/target/test-classes" ]; then
+ IGNITE_LIBS=${IGNITE_LIBS}${SEP}${file}/target/test-classes
+ fi
+
+ if [ -d "${file}/target/libs" ]; then
+ IGNITE_LIBS=${IGNITE_LIBS}${SEP}${file}/target/libs/*
+ fi
+ fi
+ done
+}
+
+#
+# Include target libraries for enterprise modules to classpath.
+#
+includeToClassPath modules
+
+#
+# Include target libraries for opensourse modules to classpath.
+#
+includeToClassPath ${IGNITE_HOME}/modules
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7da0df9d/bin/include/target-classpath.bat
----------------------------------------------------------------------
diff --git a/bin/include/target-classpath.bat b/bin/include/target-classpath.bat
deleted file mode 100644
index 4416557..0000000
--- a/bin/include/target-classpath.bat
+++ /dev/null
@@ -1,46 +0,0 @@
-::
-:: Licensed to the Apache Software Foundation (ASF) under one or more
-:: contributor license agreements. See the NOTICE file distributed with
-:: this work for additional information regarding copyright ownership.
-:: The ASF licenses this file to You under the Apache License, Version 2.0
-:: (the "License"); you may not use this file except in compliance with
-:: the License. You may obtain a copy of the License at
-::
-:: http://www.apache.org/licenses/LICENSE-2.0
-::
-:: Unless required by applicable law or agreed to in writing, software
-:: distributed under the License is distributed on an "AS IS" BASIS,
-:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-:: See the License for the specific language governing permissions and
-:: limitations under the License.
-::
-
-:: Target class path resolver.
-::
-:: Can be used like:
-:: call "%IGNITE_HOME%\bin\include\target-classpath.bat"
-:: in other scripts to set classpath using libs from target folder.
-::
-:: Will be excluded in release.
-
-@echo off
-
-for /D %%F in (modules\*) do if not %%F == "modules" call :includeToClassPath %%F
-
-for /D %%F in (%IGNITE_HOME%\modules\*) do if not %%F == "%IGNITE_HOME%\modules" call :includeToClassPath %%F
-
-goto :eof
-
-:includeToClassPath
-if exist "%1\target\" (
- if exist "%1\target\classes\" call :concat %1\target\classes
-
- if exist "%1\target\test-classes\" call :concat %1\target\test-classes
-
- if exist "%1\target\libs\" call :concat %1\target\libs\*
-)
-goto :eof
-
-:concat
-set IGNITE_LIBS=%IGNITE_LIBS%;%1
-goto :eof
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7da0df9d/bin/include/target-classpath.sh
----------------------------------------------------------------------
diff --git a/bin/include/target-classpath.sh b/bin/include/target-classpath.sh
deleted file mode 100644
index 871d517..0000000
--- a/bin/include/target-classpath.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/sh
-#
-# 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.
-#
-
-# Target class path resolver.
-#
-# Can be used like:
-# . "${IGNITE_HOME}"/bin/include/target-classpath.sh
-# in other scripts to set classpath using libs from target folder.
-#
-# Will be excluded in release.
-
-
-#
-# OS specific support.
-#
-SEP=":";
-
-case "`uname`" in
- MINGW*)
- SEP=";";
- export IGNITE_HOME=`echo $IGNITE_HOME | sed -e 's/^\/\([a-zA-Z]\)/\1:/'`
- ;;
- CYGWIN*)
- SEP=";";
- export IGNITE_HOME=`echo $IGNITE_HOME | sed -e 's/^\/\([a-zA-Z]\)/\1:/'`
- ;;
-esac
-
-includeToClassPath() {
- for file in $1/*
- do
- if [ -d ${file} ] && [ -d "${file}/target" ]; then
- if [ -d "${file}/target/classes" ]; then
- IGNITE_LIBS=${IGNITE_LIBS}${SEP}${file}/target/classes
- fi
-
- if [ -d "${file}/target/test-classes" ]; then
- IGNITE_LIBS=${IGNITE_LIBS}${SEP}${file}/target/test-classes
- fi
-
- if [ -d "${file}/target/libs" ]; then
- IGNITE_LIBS=${IGNITE_LIBS}${SEP}${file}/target/libs/*
- fi
- fi
- done
-}
-
-#
-# Include target libraries for enterprise modules to classpath.
-#
-includeToClassPath modules
-
-#
-# Include target libraries for opensourse modules to classpath.
-#
-includeToClassPath ${IGNITE_HOME}/modules
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7da0df9d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c445fd3..1b44d5e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -275,7 +275,7 @@
</replaceregexp>
<replaceregexp byline="true">
- <regexp pattern="\. "\$\{SCRIPTS_HOME\}"/include/target-classpath.sh(\s*#.*)?" />
+ <regexp pattern="\. "\$\{SCRIPTS_HOME\}"/include/build-classpath.sh(\s*#.*)?" />
<substitution expression="" />
<fileset dir="${basedir}/target/release-package/bin">
<include name="**/*.sh" />
@@ -283,7 +283,7 @@
</replaceregexp>
<replaceregexp byline="true">
- <regexp pattern="call "%SCRIPTS_HOME%\\include\\target-classpath.bat"(\s*&::.*)?" />
+ <regexp pattern="call "%SCRIPTS_HOME%\\include\\build-classpath.bat"(\s*&::.*)?" />
<substitution expression="" />
<fileset dir="${basedir}/target/release-package/bin">
<include name="**/*.bat" />
[03/50] [abbrv] incubator-ignite git commit: #ignite-286: Make cache
full api test work in OFFHEAP_TIERED mode.
Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest.java
index 62e4452..216832c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest.java
@@ -17,13 +17,17 @@
package org.apache.ignite.internal.processors.cache.distributed.dht;
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
/**
* Tests colocated cache with values being stored off-heap.
*/
public class GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest
extends GridCachePartitionedNearDisabledMultiNodeFullApiSelfTest {
/** {@inheritDoc} */
- @Override protected boolean offHeapValues() {
- return true;
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_VALUES;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest.java
new file mode 100644
index 0000000..875a913
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest.java
@@ -0,0 +1,56 @@
+/*
+ * 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.dht;
+
+import org.apache.ignite.cache.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.processors.cache.distributed.near.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
+/**
+ * Tests colocated cache with off-heap tiered mode.
+ */
+public class GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest extends
+ GridCachePartitionedFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicityMode atomicityMode() {
+ return ATOMIC;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected boolean txEnabled() {
+ return false;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected boolean lockingEnabled() {
+ return false;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected NearCacheConfiguration nearConfiguration() {
+ return null;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_TIERED;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest.java
new file mode 100644
index 0000000..bab26f7
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this 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.dht;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
+/**
+ * Tests colocated cache with off-heap tiered mode.
+ */
+public class GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest extends
+ GridCachePartitionedNearDisabledOffHeapFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_TIERED;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..022f26b
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this 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.dht;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
+/**
+ * Tests colocated cache with off-heap tiered mode.
+ */
+public class GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest extends
+ GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_TIERED;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredFullApiSelfTest.java
new file mode 100644
index 0000000..b0d13e0
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredFullApiSelfTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.near;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
+/**
+ * Tests partitioned cache with off-heap tiered mode.
+ */
+public class GridCacheAtomicOffHeapTieredFullApiSelfTest extends GridCacheAtomicOffHeapFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_TIERED;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..b3adf14
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this 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.near;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
+/**
+ * Tests partitioned cache with off-heap tiered mode.
+ */
+public class GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest extends
+ GridCacheAtomicOffHeapMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_TIERED;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest.java
new file mode 100644
index 0000000..41e98b2
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this 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.near;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
+/**
+ * Tests partitioned cache with off-heap tiered mode.
+ */
+public class GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest extends
+ GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_TIERED;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..f29cdd0
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this 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.near;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
+/**
+ * Tests partitioned cache with off-heap tiered mode.
+ */
+public class GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest extends
+ GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_TIERED;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
index caacc2b..84594a2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
@@ -27,7 +27,6 @@ import org.apache.ignite.internal.*;
import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.lang.*;
-import javax.cache.*;
import java.util.*;
import java.util.concurrent.atomic.*;
@@ -138,12 +137,12 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti
int size = 10;
- IgniteCache<Object, Object> prj0 = grid(0).cache(null);
+ IgniteCache<Object, Object> chache0 = grid(0).cache(null);
for (int i = 0; i < size; i++) {
info("Putting value [i=" + i + ']');
- prj0.put(i, i);
+ chache0.put(i, i);
info("Finished putting value [i=" + i + ']');
}
@@ -156,26 +155,30 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti
for (int k = 0; k < size; k++) {
if (affinity(cache).isPrimaryOrBackup(node, k))
- assertEquals("Check failed for node: " + node.id(), k, cache.localPeek(k, ONHEAP));
+ assertEquals("Check failed for node: " + node.id(), k,
+ cache.localPeek(k, CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP));
}
}
for (int i = 0; i < size; i++) {
info("Putting value 2 [i=" + i + ']');
- assertEquals(i, prj0.getAndPutIfAbsent(i, i * i));
+ assertEquals(i, chache0.getAndPutIfAbsent(i, i * i));
info("Finished putting value 2 [i=" + i + ']');
}
for (int i = 0; i < size; i++)
- assertEquals(i, prj0.get(i));
+ assertEquals(i, chache0.get(i));
}
/**
* @throws Exception If failed.
*/
public void testUnswapShort() throws Exception {
+ if (memoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
+ return;
+
final AtomicInteger swapEvts = new AtomicInteger(0);
final AtomicInteger unswapEvts = new AtomicInteger(0);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapFullApiSelfTest.java
index d77efcf..78c8ab7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapFullApiSelfTest.java
@@ -17,12 +17,16 @@
package org.apache.ignite.internal.processors.cache.distributed.near;
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
/**
* Tests partitioned cache with values being stored off-heap.
*/
public class GridCachePartitionedOffHeapFullApiSelfTest extends GridCachePartitionedFullApiSelfTest {
/** {@inheritDoc} */
- @Override protected boolean offHeapValues() {
- return true;
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_VALUES;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapMultiNodeFullApiSelfTest.java
index c7a04fc..4724d9d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapMultiNodeFullApiSelfTest.java
@@ -17,12 +17,16 @@
package org.apache.ignite.internal.processors.cache.distributed.near;
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
/**
* Tests partitioned cache with values being stored off-heap.
*/
public class GridCachePartitionedOffHeapMultiNodeFullApiSelfTest extends GridCachePartitionedMultiNodeFullApiSelfTest {
/** {@inheritDoc} */
- @Override protected boolean offHeapValues() {
- return true;
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_VALUES;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredFullApiSelfTest.java
new file mode 100644
index 0000000..365e9aa
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredFullApiSelfTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.near;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
+/**
+ * Tests partitioned cache with off-heap tiered mode.
+ */
+public class GridCachePartitionedOffHeapTieredFullApiSelfTest extends GridCachePartitionedOffHeapFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_TIERED;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..4392365
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest.java
@@ -0,0 +1,72 @@
+/*
+ * 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.near;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
+/**
+ * Tests partitioned cache with off-heap tiered mode.
+ */
+public class GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest extends GridCachePartitionedOffHeapMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_TIERED;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testPut() throws Exception {
+ IgniteCache<String, Integer> cache = grid(0).cache(null);
+
+ assert gridCount() > 3;
+ String key = null;
+
+ for (int i = 0; i < 250; ++i) {
+ String testKey = "key_" + i;
+
+ if (!grid(0).affinity(null).isPrimaryOrBackup(grid(0).localNode(), testKey)) {
+ key = testKey;
+
+ break;
+ }
+ }
+
+ assert key != null;
+
+ IgniteCache<String, Integer> primaryCache = primaryCache(key);
+
+ assertFalse(grid(0).affinity(null).isPrimary(grid(0).localNode(), key));
+ assertFalse(grid(0).affinity(null).isBackup(grid(0).localNode(), key));
+
+ primaryCache.put(key, 4); // Put from primary.
+
+ assertNull(primaryCache.localPeek(key, CachePeekMode.ONHEAP));
+ assertEquals(4, primaryCache.localPeek(key, CachePeekMode.OFFHEAP).intValue());
+
+ cache.put(key, 5); // Put from near to add reader on primary.
+
+ assertEquals(5, primaryCache.localPeek(key, CachePeekMode.ONHEAP).intValue());
+ assertEquals(5, primaryCache.localPeek(key, CachePeekMode.OFFHEAP).intValue());
+ assertEquals(5, cache.get(key).intValue());
+ assertEquals(5, map.get(key));
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapFullApiSelfTest.java
index c9b9072..1cb5df5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapFullApiSelfTest.java
@@ -17,12 +17,16 @@
package org.apache.ignite.internal.processors.cache.distributed.replicated;
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
/**
* Tests replicated cache with values being stored off-heap.
*/
public class GridCacheReplicatedOffHeapFullApiSelfTest extends GridCacheReplicatedFullApiSelfTest {
/** {@inheritDoc} */
- @Override protected boolean offHeapValues() {
- return true;
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_VALUES;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest.java
index 382b0f9..f79f898 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest.java
@@ -17,12 +17,16 @@
package org.apache.ignite.internal.processors.cache.distributed.replicated;
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
/**
* Tests replicated cache with values being stored off-heap.
*/
public class GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest extends GridCacheReplicatedMultiNodeFullApiSelfTest {
/** {@inheritDoc} */
- @Override protected boolean offHeapValues() {
- return true;
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_VALUES;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredFullApiSelfTest.java
new file mode 100644
index 0000000..8162c8e
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredFullApiSelfTest.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this 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.replicated;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
+/**
+ * Tests replicated cache with off-heap tiered mode.
+ */
+public class GridCacheReplicatedOffHeapTieredFullApiSelfTest extends
+ GridCacheReplicatedOffHeapFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_TIERED;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..0e2bf90
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this 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.replicated;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
+/**
+ * Tests replicated cache with off-heap tiered mode.
+ */
+public class GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest extends
+ GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest{
+ /** {@inheritDoc} */
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_TIERED;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapTieredFullApiSelfTest.java
new file mode 100644
index 0000000..b4e8cf1
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapTieredFullApiSelfTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.local;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
+/**
+ * Tests local cache in atomic mode with off-heap tiered mode.
+ */
+public class GridCacheLocalAtomicOffHeapTieredFullApiSelfTest extends GridCacheLocalAtomicOffHeapFullApiSelfTest{
+ /** {@inheritDoc} */
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_TIERED;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapFullApiSelfTest.java
index 31b8bee..e2621ce 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapFullApiSelfTest.java
@@ -17,12 +17,14 @@
package org.apache.ignite.internal.processors.cache.local;
+import org.apache.ignite.cache.*;
+
/**
* Tests local cache with values being stored offheap.
*/
public class GridCacheLocalOffHeapFullApiSelfTest extends GridCacheLocalFullApiSelfTest {
/** {@inheritDoc} */
- @Override protected boolean offHeapValues() {
- return true;
+ @Override protected CacheMemoryMode memoryMode() {
+ return CacheMemoryMode.OFFHEAP_VALUES;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapTieredFullApiSelfTest.java
new file mode 100644
index 0000000..c6ce9da
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapTieredFullApiSelfTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.local;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
+/**
+ * Tests local cache with off-heap tired memory mode.
+ */
+public class GridCacheLocalOffHeapTieredFullApiSelfTest extends GridCacheLocalOffHeapFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMemoryMode memoryMode() {
+ return OFFHEAP_TIERED;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index d5760ee..56ff951 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@ -73,6 +73,7 @@ public class IgniteBasicTestSuite extends TestSuite {
suite.addTestSuite(GridLifecycleAwareSelfTest.class);
suite.addTestSuite(GridMessageListenSelfTest.class);
suite.addTestSuite(GridFailFastNodeFailureDetectionSelfTest.class);
+ suite.addTestSuite(OffHeapTieredTransactionSelfTest.class);
return suite;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
index acf6c64..369e041 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
@@ -60,6 +60,16 @@ public class IgniteCacheFullApiSelfTestSuite extends TestSuite {
suite.addTestSuite(GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest.class);
suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapFullApiSelfTest.class);
+ // One node with off-heap tiered mode.
+ suite.addTestSuite(GridCacheLocalOffHeapTieredFullApiSelfTest.class);
+ suite.addTestSuite(GridCacheLocalAtomicOffHeapTieredFullApiSelfTest.class);
+ suite.addTestSuite(GridCacheReplicatedOffHeapTieredFullApiSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedOffHeapTieredFullApiSelfTest.class);
+ suite.addTestSuite(GridCacheAtomicOffHeapTieredFullApiSelfTest.class);
+ suite.addTestSuite(GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest.class);
+
// Multi-node.
suite.addTestSuite(GridCacheReplicatedMultiNodeFullApiSelfTest.class);
suite.addTestSuite(GridCacheReplicatedMultiNodeP2PDisabledFullApiSelfTest.class);
@@ -112,6 +122,14 @@ public class IgniteCacheFullApiSelfTestSuite extends TestSuite {
suite.addTestSuite(GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest.class);
suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest.class);
+ // Multi-node with off-heap tiered mode.
+ suite.addTestSuite(GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest.class);
+ suite.addTestSuite(GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest.class);
+ suite.addTestSuite(GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.class);
+
// Private cache API.
suite.addTestSuite(GridCacheExLocalFullApiSelfTest.class);
suite.addTestSuite(GridCacheExReplicatedFullApiSelfTest.class);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedOffHeapTiredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedOffHeapTiredSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedOffHeapTiredSelfTest.java
new file mode 100644
index 0000000..8b09d0f
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedOffHeapTiredSelfTest.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import org.apache.ignite.cache.*;
+import org.apache.ignite.configuration.*;
+
+/**
+ * Test queries in off-heap tired mode.
+ */
+public class IgniteCacheQueryMultiThreadedOffHeapTiredSelfTest extends IgniteCacheQueryMultiThreadedSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheConfiguration cacheConfiguration() {
+ CacheConfiguration ccfg = super.cacheConfiguration();
+
+ ccfg.setCacheMode(CacheMode.REPLICATED);
+ ccfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
+ ccfg.setOffHeapMaxMemory(0);
+
+ return ccfg;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
index daca7dc..54bc814 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
@@ -86,6 +86,17 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
cfg.setSwapSpaceSpi(new FileSwapSpaceSpi());
cfg.setMarshaller(new OptimizedMarshaller(false));
+ cfg.setCacheConfiguration(cacheConfiguration());
+
+ GridQueryProcessor.idxCls = FakeIndexing.class;
+
+ return cfg;
+ }
+
+ /**
+ * @return Cache configuration.
+ */
+ protected CacheConfiguration cacheConfiguration() {
CacheConfiguration<?,?> cacheCfg = defaultCacheConfiguration();
cacheCfg.setCacheMode(PARTITIONED);
@@ -106,11 +117,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
if (offheapEnabled())
cacheCfg.setOffHeapMaxMemory(evictsEnabled() ? 1000 : 0); // Small offheap for evictions.
- cfg.setCacheConfiguration(cacheCfg);
-
- GridQueryProcessor.idxCls = FakeIndexing.class;
-
- return cfg;
+ return cacheCfg;
}
/**
@@ -235,6 +242,9 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
final IgniteCache<Integer, String> c = g.cache(null);
final IgniteCache<Integer, Long> cl = g.cache(null);
+ if (c.getConfiguration(CacheConfiguration.class).getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
+ return;
+
assertEquals(0, g.cache(null).localSize());
assertEquals(0, c.query(new SqlQuery(String.class, "1 = 1")).getAll().size());
assertEquals(0, cl.query(new SqlQuery(Long.class, "1 = 1")).getAll().size());
@@ -307,6 +317,9 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
final IgniteCache<Integer, Long> c = g.cache(null);
final IgniteCache<Integer, String> c1 = g.cache(null);
+ if (c.getConfiguration(CacheConfiguration.class).getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
+ return;
+
assertEquals(0, g.cache(null).localSize());
assertEquals(0, c1.query(new SqlQuery(String.class, "1 = 1")).getAll().size());
assertEquals(0, c.query(new SqlQuery(Long.class, "1 = 1")).getAll().size());
@@ -379,6 +392,9 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
// Put test values into cache.
final IgniteCache<Integer, Object> c = g.cache(null);
+ if (c.getConfiguration(CacheConfiguration.class).getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
+ return;
+
assertEquals(0, g.cache(null).size());
assertEquals(0, c.query(new SqlQuery(Object.class, "1 = 1")).getAll().size());
@@ -450,6 +466,9 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
// Put test values into cache.
final IgniteCache<Integer, TestValue> c = g.cache(null);
+ if (c.getConfiguration(CacheConfiguration.class).getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
+ return;
+
assertEquals(0, g.cache(null).localSize());
assertEquals(0, c.query(new SqlQuery(TestValue.class, "1 = 1")).getAll().size());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/745cf7f9/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 69d7548..f42963a 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
@@ -59,6 +59,7 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
suite.addTestSuite(IgniteCacheLargeResultSelfTest.class);
suite.addTestSuite(GridCacheQueryInternalKeysSelfTest.class);
suite.addTestSuite(IgniteCacheQueryMultiThreadedSelfTest.class);
+ suite.addTestSuite(IgniteCacheQueryMultiThreadedOffHeapTiredSelfTest.class);
suite.addTestSuite(IgniteCacheQueryEvictsMultiThreadedSelfTest.class);
suite.addTestSuite(IgniteCacheQueryOffheapMultiThreadedSelfTest.class);
suite.addTestSuite(IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.class);
[20/50] [abbrv] incubator-ignite git commit: # ignite-157
Posted by se...@apache.org.
# ignite-157
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/250dd8ea
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/250dd8ea
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/250dd8ea
Branch: refs/heads/ignite-836_2
Commit: 250dd8ea6ec9c3298eed28f0f2d5c9e40508c8f9
Parents: d245dc8
Author: sboikov <sb...@gridgain.com>
Authored: Fri May 8 15:35:40 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri May 8 15:35:40 2015 +0300
----------------------------------------------------------------------
.../processors/cache/distributed/dht/GridDhtTxLocalAdapter.java | 2 +-
.../processors/cache/GridCacheAbstractFailoverSelfTest.java | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/250dd8ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
index d886989..444085f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
@@ -887,7 +887,7 @@ public abstract class GridDhtTxLocalAdapter extends IgniteTxLocalAdapter {
protected abstract void clearPrepareFuture(GridDhtTxPrepareFuture fut);
/**
- * @return {@code True} if transaction if finished on prepare step.
+ * @return {@code True} if transaction is finished on prepare step.
*/
protected final boolean commitOnPrepare() {
return onePhaseCommit() && !near();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/250dd8ea/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
index 6f6355a..5d9ad35 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
@@ -31,7 +31,6 @@ import org.apache.ignite.transactions.*;
import org.jetbrains.annotations.*;
import javax.cache.*;
-import java.util.*;
import java.util.concurrent.atomic.*;
import static org.apache.ignite.cache.CacheRebalanceMode.*;
[37/50] [abbrv] incubator-ignite git commit: devlibs should be
cleared each time. even if profile is off
Posted by se...@apache.org.
devlibs should be cleared each time. even if profile is off
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a4c96535
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a4c96535
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a4c96535
Branch: refs/heads/ignite-836_2
Commit: a4c96535d61b1473ea6967be60bdabc6fec2cd5c
Parents: 7da0df9
Author: avinogradov <av...@gridgain.com>
Authored: Tue May 12 14:03:17 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Tue May 12 14:03:17 2015 +0300
----------------------------------------------------------------------
pom.xml | 44 ++++++++++++++++++++++++--------------------
1 file changed, 24 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a4c96535/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 1b44d5e..451812a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -122,26 +122,6 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clean-plugin</artifactId>
- <executions>
- <execution>
- <phase>clean</phase>
- <goals>
- <goal>clean</goal>
- </goals>
- <configuration>
- <filesets>
- <fileset>
- <directory>libs</directory>
- </fileset>
- </filesets>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<inherited>false</inherited>
@@ -740,4 +720,28 @@
</build>
</profile>
</profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>clean</phase>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>libs</directory>
+ </fileset>
+ </filesets>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
[15/50] [abbrv] incubator-ignite git commit: # ignite-157
Posted by se...@apache.org.
# ignite-157
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/50ec7f34
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/50ec7f34
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/50ec7f34
Branch: refs/heads/ignite-836_2
Commit: 50ec7f34c4f3b9527bb2eb068b4662042a376856
Parents: 30d306a
Author: sboikov <sb...@gridgain.com>
Authored: Fri May 8 15:11:30 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri May 8 15:11:30 2015 +0300
----------------------------------------------------------------------
.../distributed/near/GridNearOptimisticTxPrepareFuture.java | 8 +++++---
.../distributed/near/GridNearPessimisticTxPrepareFuture.java | 8 +++++---
.../ignite/testsuites/IgniteCacheRestartTestSuite.java | 8 ++++----
3 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/50ec7f34/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 1f2c439..51c7ccd 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
@@ -646,14 +646,16 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearTxPrepareFutureAd
/** {@inheritDoc} */
@Override public String toString() {
- Collection<String> pendingFuts = F.viewReadOnly(pending(), new C1<IgniteInternalFuture<?>, String>() {
+ Collection<String> futs = F.viewReadOnly(futures(), new C1<IgniteInternalFuture<?>, String>() {
@Override public String apply(IgniteInternalFuture<?> f) {
- return "[node=" + ((MiniFuture)f).node().id() + ", loc=" + ((MiniFuture)f).node().isLocal() + "]";
+ return "[node=" + ((MiniFuture)f).node().id() +
+ ", loc=" + ((MiniFuture)f).node().isLocal() +
+ ", done=" + f.isDone() + "]";
}
});
return S.toString(GridNearOptimisticTxPrepareFuture.class, this,
- "pendingFuts", pendingFuts,
+ "futs", futs,
"super", super.toString());
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/50ec7f34/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
index ba8b92c..998df9e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
@@ -255,14 +255,16 @@ public class GridNearPessimisticTxPrepareFuture extends GridNearTxPrepareFutureA
/** {@inheritDoc} */
@Override public String toString() {
- Collection<String> pendingFuts = F.viewReadOnly(pending(), new C1<IgniteInternalFuture<?>, String>() {
+ Collection<String> futs = F.viewReadOnly(futures(), new C1<IgniteInternalFuture<?>, String>() {
@Override public String apply(IgniteInternalFuture<?> f) {
- return "[node=" + ((MiniFuture)f).node().id() + ", loc=" + ((MiniFuture)f).node().isLocal() + "]";
+ return "[node=" + ((MiniFuture)f).node().id() +
+ ", loc=" + ((MiniFuture)f).node().isLocal() +
+ ", done=" + f.isDone() + "]";
}
});
return S.toString(GridNearPessimisticTxPrepareFuture.class, this,
- "pendingFuts", pendingFuts,
+ "futs", futs,
"super", super.toString());
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/50ec7f34/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
index 983d447..24945dd 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
@@ -21,7 +21,6 @@ import junit.framework.*;
import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.processors.cache.distributed.*;
import org.apache.ignite.internal.processors.cache.distributed.near.*;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.*;
/**
* In-Memory Data Grid stability test suite on changing topology.
@@ -36,9 +35,10 @@ public class IgniteCacheRestartTestSuite extends TestSuite {
suite.addTestSuite(GridCachePartitionedTxSalvageSelfTest.class);
- suite.addTestSuite(GridCachePartitionedNodeRestartTest.class);
- suite.addTestSuite(GridCachePartitionedOptimisticTxNodeRestartTest.class);
- suite.addTestSuite(GridCacheReplicatedNodeRestartSelfTest.class);
+ // TODO IGNITE-882.
+ //suite.addTestSuite(GridCachePartitionedNodeRestartTest.class);
+ //suite.addTestSuite(GridCachePartitionedOptimisticTxNodeRestartTest.class);
+ //suite.addTestSuite(GridCacheReplicatedNodeRestartSelfTest.class);
suite.addTestSuite(IgniteCacheAtomicNodeRestartTest.class);
// suite.addTestSuite(IgniteCacheAtomicReplicatedNodeRestartSelfTest.class); // TODO IGNITE-747
[25/50] [abbrv] incubator-ignite git commit: i-709 review
Posted by se...@apache.org.
i-709 review
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c4eab3c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c4eab3c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c4eab3c2
Branch: refs/heads/ignite-836_2
Commit: c4eab3c26260ac97a4499ca6b2ec6ecb4fcf3d3b
Parents: 16a6aa0
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Fri May 8 17:13:27 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Fri May 8 17:13:27 2015 +0300
----------------------------------------------------------------------
.../spi/discovery/tcp/TcpClientDiscoverySpi.java | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4eab3c2/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
index e0b67d0..2513298 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
@@ -85,7 +85,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
private SocketReader sockReader;
/** */
- private boolean segmentation;
+ private boolean segmented;
/** Last message ID. */
private volatile IgniteUuid lastMsgId;
@@ -738,7 +738,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
private Socket sock;
/** */
- private final Queue<TcpDiscoveryAbstractMessage> queue = new LinkedList<>();
+ private final Queue<TcpDiscoveryAbstractMessage> queue = new ArrayDeque<>();
/**
*
@@ -821,7 +821,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
}
}
catch (IgniteCheckedException e) {
- log.error("Failed to send message: " + msg, e);
+ U.error(log, "Failed to send message: " + msg, e);
msg = null;
}
@@ -854,7 +854,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
/** {@inheritDoc} */
@Override protected void body() throws InterruptedException {
- assert !segmentation;
+ assert !segmented;
boolean success = false;
@@ -862,7 +862,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
sock = joinTopology(true);
if (sock == null) {
- log.error("Failed to reconnect to cluster: timeout.");
+ U.error(log, "Failed to reconnect to cluster: timeout.");
return;
}
@@ -896,7 +896,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
}
}
catch (IOException | IgniteCheckedException e) {
- log.error("Failed to reconnect", e);
+ U.error(log, "Failed to reconnect", e);
}
finally {
if (!success) {
@@ -997,7 +997,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
joinLatch.countDown();
}
else {
- if (getSpiContext().isStopping() || segmentation)
+ if (getSpiContext().isStopping() || segmented)
leaveLatch.countDown();
else {
assert reconnector == null;
@@ -1015,8 +1015,8 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
}
}
else if (msg == SPI_RECONNECT_FAILED || msg == RECONNECT_TIMEOUT) {
- if (!segmentation) {
- segmentation = true;
+ if (!segmented) {
+ segmented = true;
reconnector.cancel();
reconnector.join();
[07/50] [abbrv] incubator-ignite git commit: rat fix
Posted by se...@apache.org.
rat fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/dea61181
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/dea61181
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/dea61181
Branch: refs/heads/ignite-836_2
Commit: dea6118127da7426c2ba212bbbe2bec1e5e1f3b8
Parents: 0c13a08
Author: avinogradov <av...@gridgain.com>
Authored: Fri May 8 12:35:43 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri May 8 12:35:43 2015 +0300
----------------------------------------------------------------------
parent/pom.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dea61181/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 661b310..e3f70b4 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -628,6 +628,7 @@
<exclude>src/test/java/org/apache/ignite/spi/deployment/uri/META-INF/ignite.empty</exclude><!--should be empty-->
<exclude>src/test/java/org/apache/ignite/spi/deployment/uri/META-INF/ignite.brokenxml</exclude><!--test resource-->
<exclude>src/test/java/org/apache/ignite/internal/processors/hadoop/books/*.txt</exclude><!--books examples-->
+ <exclude>src/main/java/org/apache/ignite/examples/streaming/wordcount/*.txt</exclude><!--books examples-->
<exclude>examples/src/main/java/org/apache/ignite/examples/streaming/wordcount/*.txt</exclude><!--books examples-->
<exclude>src/main/java/META-INF/services/javax.cache.spi.CachingProvider</exclude><!--cannot be changed-->
<exclude>src/main/java/org/jetbrains/annotations/*.java</exclude><!--copyright-->
[21/50] [abbrv] incubator-ignite git commit: rat fix
Posted by se...@apache.org.
rat fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ecc7a50a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ecc7a50a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ecc7a50a
Branch: refs/heads/ignite-836_2
Commit: ecc7a50a0e45102ba9e5025435bb33e2cd5d0a96
Parents: 2d4a3fb
Author: avinogradov <av...@gridgain.com>
Authored: Fri May 8 16:13:34 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri May 8 16:13:34 2015 +0300
----------------------------------------------------------------------
parent/pom.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ecc7a50a/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index e3f70b4..cd098d9 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -619,6 +619,7 @@
<exclude>**/keystore/*.pfx</exclude><!--bin-files-->
<!--special excludes-->
<exclude>DEVNOTES.txt</exclude>
+ <exclude>DEPENDENCIES</exclude><!--automatically generated file. presents at source pack-->
<exclude>src/main/java/org/apache/ignite/internal/util/offheap/unsafe/GridOffHeapSnapTreeMap.java</exclude><!--BSD license-->
<exclude>src/main/java/org/apache/ignite/internal/util/snaptree/*.java</exclude><!--BSD license-->
<exclude>src/main/java/org/jsr166/*.java</exclude>
[22/50] [abbrv] incubator-ignite git commit: Merge branches
'ignite-478' and 'ignite-sprint-5' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-478
Posted by se...@apache.org.
Merge branches 'ignite-478' and 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-478
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d0810461
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d0810461
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d0810461
Branch: refs/heads/ignite-836_2
Commit: d0810461d61f35cc855998515beb467b49b74246
Parents: eae6f5e 2361640
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Fri May 8 16:30:30 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Fri May 8 16:30:30 2015 +0300
----------------------------------------------------------------------
DEVNOTES.txt | 34 +-
RELEASE_NOTES.txt | 13 +-
assembly/release-base.xml | 2 +
assembly/release-schema-import.xml | 50 +
dev-tools/.gitignore | 2 +
dev-tools/build.gradle | 45 +
dev-tools/src/main/groovy/jiraslurp.groovy | 146 +
examples/pom.xml | 2 +-
.../streaming/wordcount/CacheConfig.java | 5 -
modules/aop/pom.xml | 2 +-
.../aop/aspectj/GridifyAspectJAspect.java | 2 +-
.../aspectj/GridifySetToSetAspectJAspect.java | 2 +-
.../aspectj/GridifySetToValueAspectJAspect.java | 2 +-
.../aop/spring/GridifySetToSetSpringAspect.java | 2 +-
.../spring/GridifySetToValueSpringAspect.java | 2 +-
.../gridify/aop/spring/GridifySpringAspect.java | 2 +-
modules/aws/pom.xml | 2 +-
.../spi/checkpoint/s3/S3CheckpointSpi.java | 2 +-
.../config/grid-client-config.properties | 50 +-
modules/clients/pom.xml | 2 +-
.../ClientPropertiesConfigurationSelfTest.java | 12 +-
.../clients/src/test/resources/spring-cache.xml | 4 +-
.../src/test/resources/spring-server-node.xml | 4 +-
.../test/resources/spring-server-ssl-node.xml | 4 +-
modules/cloud/README.txt | 32 +
modules/cloud/licenses/apache-2.0.txt | 202 +
modules/cloud/pom.xml | 106 +
.../cloud/TcpDiscoveryCloudIpFinder.java | 433 ++
.../tcp/ipfinder/cloud/package-info.java | 21 +
.../TcpDiscoveryCloudIpFinderSelfTest.java | 122 +
.../tcp/ipfinder/cloud/package-info.java | 22 +
.../ignite/testsuites/IgniteCloudTestSuite.java | 112 +
modules/codegen/pom.xml | 2 +-
.../ignite/codegen/MessageCodeGenerator.java | 30 +-
modules/core/pom.xml | 2 +-
.../java/org/apache/ignite/IgniteCache.java | 5 +
.../org/apache/ignite/IgniteJdbcDriver.java | 81 +-
.../java/org/apache/ignite/IgniteLogger.java | 8 +-
.../java/org/apache/ignite/IgniteServices.java | 2 +-
.../main/java/org/apache/ignite/Ignition.java | 46 +-
.../apache/ignite/cache/CacheInterceptor.java | 9 +-
.../cache/CacheServerNotFoundException.java | 12 +-
.../apache/ignite/cache/CachingProvider.java | 3 +
.../eviction/sorted/SortedEvictionPolicy.java | 2 +-
.../configuration/CacheConfiguration.java | 277 +-
.../configuration/ConnectorConfiguration.java | 2 +-
.../configuration/IgniteConfiguration.java | 445 +-
.../ignite/configuration/TopologyValidator.java | 35 +
.../ignite/events/CacheQueryExecutedEvent.java | 3 +-
.../ignite/events/CacheQueryReadEvent.java | 3 +-
.../ignite/internal/GridDirectCollection.java | 3 +
.../ignite/internal/GridJobContextImpl.java | 7 +-
.../ignite/internal/GridUpdateNotifier.java | 66 +-
.../ignite/internal/IgniteComponentType.java | 36 +-
.../apache/ignite/internal/IgniteKernal.java | 98 +-
.../org/apache/ignite/internal/IgnitionEx.java | 196 +-
.../ignite/internal/MarshallerContextImpl.java | 2 +-
.../client/GridClientConfiguration.java | 2 +-
.../connection/GridClientNioTcpConnection.java | 9 +-
.../internal/cluster/ClusterGroupAdapter.java | 16 +
.../ClusterTopologyServerNotFoundException.java | 12 +-
.../managers/communication/GridIoManager.java | 69 +-
.../communication/GridIoMessageFactory.java | 12 +-
.../GridLifecycleAwareMessageFilter.java | 35 +
.../deployment/GridDeploymentClassLoader.java | 2 +-
.../deployment/GridDeploymentManager.java | 2 +-
.../GridDeploymentPerVersionStore.java | 3 +-
.../discovery/GridDiscoveryManager.java | 21 +-
.../eventstorage/GridEventStorageManager.java | 6 +
.../managers/indexing/GridIndexingManager.java | 14 +-
.../affinity/GridAffinityAssignmentCache.java | 4 +-
.../processors/cache/CacheInvokeResult.java | 24 +-
.../processors/cache/CacheObjectImpl.java | 2 +-
.../cache/CacheStoreBalancingWrapper.java | 6 +
.../cache/DynamicCacheDescriptor.java | 16 +-
.../processors/cache/GridCacheAdapter.java | 555 +-
.../cache/GridCacheAffinityManager.java | 12 -
.../processors/cache/GridCacheEntryEx.java | 4 +
.../cache/GridCacheEvictionManager.java | 2 +-
.../processors/cache/GridCacheIoManager.java | 320 +-
.../processors/cache/GridCacheMapEntry.java | 51 +-
.../processors/cache/GridCacheMessage.java | 8 +-
.../processors/cache/GridCacheMvccManager.java | 2 +-
.../GridCachePartitionExchangeManager.java | 10 +-
.../processors/cache/GridCacheProcessor.java | 192 +-
.../processors/cache/GridCacheProxyImpl.java | 24 -
.../processors/cache/GridCacheReturn.java | 5 +-
.../cache/GridCacheSharedContext.java | 2 +-
.../processors/cache/GridCacheSwapManager.java | 250 +-
.../processors/cache/GridCacheTtlManager.java | 156 +-
.../processors/cache/GridCacheUtils.java | 59 +-
.../processors/cache/IgniteCacheProxy.java | 25 +-
.../processors/cache/IgniteInternalCache.java | 27 -
.../cache/affinity/GridCacheAffinityImpl.java | 2 +-
...ridCacheOptimisticCheckPreparedTxFuture.java | 383 -
...idCacheOptimisticCheckPreparedTxRequest.java | 232 -
...dCacheOptimisticCheckPreparedTxResponse.java | 179 -
.../distributed/GridCacheTxRecoveryFuture.java | 506 ++
.../distributed/GridCacheTxRecoveryRequest.java | 261 +
.../GridCacheTxRecoveryResponse.java | 182 +
.../GridDistributedCacheAdapter.java | 20 +-
.../distributed/GridDistributedLockRequest.java | 99 +-
.../GridDistributedTxRemoteAdapter.java | 5 +-
.../distributed/dht/GridDhtCacheAdapter.java | 4 +-
.../cache/distributed/dht/GridDhtGetFuture.java | 9 +-
.../distributed/dht/GridDhtLocalPartition.java | 2 +-
.../distributed/dht/GridDhtLockFuture.java | 38 +-
.../distributed/dht/GridDhtLockRequest.java | 45 +-
.../distributed/dht/GridDhtTopologyFuture.java | 8 +
.../dht/GridDhtTransactionalCacheAdapter.java | 21 +-
.../distributed/dht/GridDhtTxFinishFuture.java | 102 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 9 +
.../distributed/dht/GridDhtTxLocalAdapter.java | 49 +-
.../distributed/dht/GridDhtTxPrepareFuture.java | 16 +-
.../cache/distributed/dht/GridDhtTxRemote.java | 14 +-
.../dht/GridPartitionedGetFuture.java | 9 +-
.../dht/atomic/GridDhtAtomicCache.java | 44 +-
.../dht/atomic/GridDhtAtomicUpdateResponse.java | 8 +
.../dht/atomic/GridNearAtomicUpdateFuture.java | 47 +-
.../dht/atomic/GridNearAtomicUpdateRequest.java | 49 +-
.../atomic/GridNearAtomicUpdateResponse.java | 18 +-
.../dht/colocated/GridDhtColocatedCache.java | 56 +-
.../colocated/GridDhtColocatedLockFuture.java | 44 +-
.../dht/preloader/GridDhtForceKeysFuture.java | 6 +
.../dht/preloader/GridDhtForceKeysResponse.java | 54 +-
.../preloader/GridDhtPartitionSupplyPool.java | 2 +-
.../GridDhtPartitionsExchangeFuture.java | 20 +
.../dht/preloader/GridDhtPreloader.java | 2 +-
.../distributed/near/GridNearAtomicCache.java | 7 +-
.../distributed/near/GridNearCacheAdapter.java | 20 +-
.../distributed/near/GridNearCacheEntry.java | 10 +-
.../distributed/near/GridNearGetFuture.java | 17 +-
.../distributed/near/GridNearGetResponse.java | 8 +-
.../distributed/near/GridNearLockFuture.java | 41 +-
.../distributed/near/GridNearLockRequest.java | 61 +-
.../near/GridNearTransactionalCache.java | 45 +-
.../near/GridNearTxFinishFuture.java | 3 +
.../cache/distributed/near/GridNearTxLocal.java | 13 +-
.../near/GridNearTxPrepareFuture.java | 20 +
.../distributed/near/GridNearTxRemote.java | 7 +-
.../processors/cache/local/GridLocalCache.java | 8 +-
.../local/atomic/GridLocalAtomicCache.java | 92 +-
.../query/GridCacheDistributedQueryManager.java | 3 +
.../cache/query/GridCacheLocalQueryFuture.java | 3 +
.../query/GridCacheQueryFutureAdapter.java | 3 +
.../cache/query/GridCacheQueryManager.java | 63 +-
.../cache/query/GridCacheSqlQuery.java | 137 +-
.../cache/query/GridCacheTwoStepQuery.java | 25 +-
.../jdbc/GridCacheQueryJdbcMetadataTask.java | 3 +
.../cache/transactions/IgniteInternalTx.java | 10 +-
.../cache/transactions/IgniteTxAdapter.java | 19 +-
.../cache/transactions/IgniteTxEntry.java | 74 +-
.../cache/transactions/IgniteTxHandler.java | 116 +-
.../transactions/IgniteTxLocalAdapter.java | 122 +-
.../cache/transactions/IgniteTxLocalEx.java | 4 +-
.../cache/transactions/IgniteTxManager.java | 286 +-
.../IgniteCacheObjectProcessorImpl.java | 2 +-
.../closure/GridClosureProcessor.java | 16 +-
.../datastreamer/DataStreamProcessor.java | 28 +-
.../datastreamer/DataStreamerImpl.java | 5 +-
.../datastreamer/DataStreamerRequest.java | 38 +-
.../processors/igfs/IgfsDataManager.java | 3 +
.../processors/igfs/IgfsDeleteWorker.java | 4 +
.../processors/igfs/IgfsFileWorkerBatch.java | 3 +
.../processors/igfs/IgfsMetaManager.java | 2 +-
.../internal/processors/igfs/IgfsThread.java | 8 +-
.../internal/processors/igfs/IgfsUtils.java | 11 +-
.../processors/job/GridJobProcessor.java | 6 +
.../internal/processors/job/GridJobWorker.java | 9 +
.../offheap/GridOffHeapProcessor.java | 17 +
.../portable/GridPortableInputStream.java | 26 -
.../processors/query/GridQueryIndexing.java | 23 +-
.../processors/query/GridQueryProcessor.java | 83 +-
.../messages/GridQueryNextPageResponse.java | 68 +-
.../h2/twostep/messages/GridQueryRequest.java | 21 +-
.../processors/rest/GridRestProcessor.java | 3 +
.../top/GridTopologyCommandHandler.java | 3 +-
.../service/GridServiceProcessor.java | 9 +
.../processors/task/GridTaskWorker.java | 12 +
.../timeout/GridTimeoutProcessor.java | 3 +
.../ignite/internal/util/GridJavaProcess.java | 4 +
.../ignite/internal/util/IgniteUtils.java | 22 +-
.../util/ipc/loopback/IpcServerTcpEndpoint.java | 2 +-
.../shmem/IpcSharedMemoryServerEndpoint.java | 2 +-
.../util/lang/GridFilteredIterator.java | 2 +-
.../ignite/internal/util/lang/GridFunc.java | 7218 +++++-------------
.../ignite/internal/util/nio/GridNioServer.java | 6 +
.../util/offheap/GridOffHeapPartitionedMap.java | 9 +
.../unsafe/GridUnsafePartitionedMap.java | 155 +-
.../util/spring/IgniteSpringHelper.java | 56 +-
.../util/tostring/GridToStringBuilder.java | 2 +-
.../apache/ignite/internal/util/typedef/X.java | 2 +-
.../ignite/internal/util/worker/GridWorker.java | 3 +
.../ignite/internal/visor/cache/VisorCache.java | 92 +-
.../visor/cache/VisorCacheConfiguration.java | 7 -
.../internal/visor/cache/VisorCacheMetrics.java | 53 +-
.../cache/VisorCacheNearConfiguration.java | 4 +-
.../visor/cache/VisorCacheNodesTask.java | 74 +
.../visor/cache/VisorCacheStartTask.java | 155 +
.../cache/VisorCacheStoreConfiguration.java | 35 -
.../cache/VisorCacheTypeFieldMetadata.java | 36 +-
.../visor/cache/VisorCacheTypeMetadata.java | 99 +-
.../internal/visor/igfs/VisorIgfsMetrics.java | 128 +-
.../visor/misc/VisorResolveHostNameTask.java | 2 +-
.../visor/node/VisorBasicConfiguration.java | 11 +
.../visor/node/VisorNodeDataCollectorJob.java | 8 +-
.../node/VisorNodeEventsCollectorTask.java | 58 +-
.../internal/visor/query/VisorQueryArg.java | 31 +-
.../internal/visor/query/VisorQueryCursor.java | 1 -
.../internal/visor/query/VisorQueryJob.java | 11 +-
.../internal/visor/query/VisorQueryTask.java | 41 -
.../internal/visor/util/VisorEventMapper.java | 13 +
.../internal/visor/util/VisorTaskUtils.java | 12 +-
.../apache/ignite/lang/IgniteAsyncSupport.java | 4 +-
.../apache/ignite/logger/java/JavaLogger.java | 12 +-
.../apache/ignite/marshaller/Marshaller.java | 14 +-
.../ignite/marshaller/jdk/JdkMarshaller.java | 10 +-
.../optimized/OptimizedMarshaller.java | 8 +-
.../ignite/messaging/MessagingListenActor.java | 3 +
.../apache/ignite/resources/LoggerResource.java | 2 +-
.../apache/ignite/resources/SpringResource.java | 2 +-
.../org/apache/ignite/services/Service.java | 2 +-
.../ignite/services/ServiceConfiguration.java | 2 +-
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 19 +-
.../org/apache/ignite/spi/IgniteSpiThread.java | 3 +
.../checkpoint/cache/CacheCheckpointSpi.java | 2 +-
.../spi/checkpoint/jdbc/JdbcCheckpointSpi.java | 2 +-
.../sharedfs/SharedFsCheckpointSpi.java | 4 +-
.../fifoqueue/FifoQueueCollisionSpi.java | 10 +-
.../jobstealing/JobStealingCollisionSpi.java | 14 +-
.../PriorityQueueCollisionSpi.java | 6 +-
.../communication/tcp/TcpCommunicationSpi.java | 12 +-
.../discovery/tcp/TcpClientDiscoverySpi.java | 4 -
.../spi/discovery/tcp/TcpDiscoverySpi.java | 39 +-
.../discovery/tcp/TcpDiscoverySpiAdapter.java | 18 +-
.../memory/MemoryEventStorageSpi.java | 10 +-
.../spi/failover/always/AlwaysFailoverSpi.java | 10 +-
.../jobstealing/JobStealingFailoverSpi.java | 6 +-
.../spi/failover/never/NeverFailoverSpi.java | 8 +-
.../apache/ignite/spi/indexing/IndexingSpi.java | 4 +-
.../adaptive/AdaptiveLoadBalancingSpi.java | 12 +-
.../roundrobin/RoundRobinLoadBalancingSpi.java | 10 +-
.../WeightedRandomLoadBalancingSpi.java | 10 +-
.../spi/swapspace/file/FileSwapSpaceSpi.java | 10 +-
.../startup/cmdline/CommandLineStartup.java | 5 +-
.../startup/cmdline/CommandLineTransformer.java | 3 +
.../resources/META-INF/classnames.properties | 64 +-
.../core/src/main/resources/ignite.properties | 2 +-
.../src/test/config/load/merge-sort-base.xml | 2 +-
.../internal/GridDiscoveryEventSelfTest.java | 30 +-
.../internal/GridUpdateNotifierSelfTest.java | 30 +-
.../processors/cache/CacheGetFromJobTest.java | 110 +
.../GridCacheAbstractFailoverSelfTest.java | 4 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 731 +-
.../cache/GridCacheAbstractSelfTest.java | 4 +-
.../cache/GridCacheSwapReloadSelfTest.java | 20 +-
.../processors/cache/GridCacheTestEntryEx.java | 2 +
...ProjectionForCachesOnDaemonNodeSelfTest.java | 147 +
.../IgniteCacheEntryListenerAbstractTest.java | 4 +-
.../IgniteCacheP2pUnmarshallingErrorTest.java | 189 +
...gniteCacheP2pUnmarshallingNearErrorTest.java | 56 +
...CacheP2pUnmarshallingRebalanceErrorTest.java | 80 +
.../IgniteCacheP2pUnmarshallingTxErrorTest.java | 109 +
.../cache/IgniteCachePeekModesAbstractTest.java | 15 +-
.../cache/IgniteCachePutAllRestartTest.java | 203 +
.../cache/IgniteCacheTxPreloadNoWriteTest.java | 29 +-
.../cache/IgniteExchangeFutureHistoryTest.java | 77 +
...gniteTopologyValidatorAbstractCacheTest.java | 183 +
...iteTopologyValidatorAbstractTxCacheTest.java | 125 +
...ValidatorNearPartitionedAtomicCacheTest.java | 30 +
...logyValidatorNearPartitionedTxCacheTest.java | 30 +
...logyValidatorPartitionedAtomicCacheTest.java | 49 +
...TopologyValidatorPartitionedTxCacheTest.java | 30 +
...ologyValidatorReplicatedAtomicCacheTest.java | 49 +
...eTopologyValidatorReplicatedTxCacheTest.java | 30 +
.../cache/OffHeapTieredTransactionSelfTest.java | 127 +
...CacheLoadingConcurrentGridStartSelfTest.java | 163 +
.../CacheNoValueClassOnServerNodeTest.java | 129 +
.../GridCacheAbstractNodeRestartSelfTest.java | 94 +-
...GridCacheLoadingConcurrentGridStartTest.java | 154 -
.../distributed/GridCacheLockAbstractTest.java | 75 +
.../IgniteCachePutGetRestartAbstractTest.java | 2 +-
...arDisabledFairAffinityPutGetRestartTest.java | 35 +
...xOriginatingNodeFailureAbstractSelfTest.java | 8 +-
...cOriginatingNodeFailureAbstractSelfTest.java | 7 +-
.../dht/GridCacheDhtPreloadSelfTest.java | 2 +-
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 43 +
...ionedNearDisabledOffHeapFullApiSelfTest.java | 8 +-
...DisabledOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...abledOffHeapTieredAtomicFullApiSelfTest.java | 56 +
...earDisabledOffHeapTieredFullApiSelfTest.java | 33 +
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
...itionedTxOriginatingNodeFailureSelfTest.java | 2 -
...rDisabledPrimaryNodeFailureRecoveryTest.java | 31 +
...rtitionedPrimaryNodeFailureRecoveryTest.java | 31 +
...woBackupsPrimaryNodeFailureRecoveryTest.java | 37 +
...ePrimaryNodeFailureRecoveryAbstractTest.java | 533 ++
...CacheAtomicOffHeapTieredFullApiSelfTest.java | 32 +
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
...yWriteOrderOffHeapTieredFullApiSelfTest.java | 33 +
...erOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
...achePartitionedMultiNodeFullApiSelfTest.java | 15 +-
.../GridCachePartitionedNodeRestartTest.java | 4 +-
...dCachePartitionedOffHeapFullApiSelfTest.java | 8 +-
...titionedOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...PartitionedOffHeapTieredFullApiSelfTest.java | 32 +
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 72 +
...ePartitionedOptimisticTxNodeRestartTest.java | 4 +-
.../near/IgniteCacheNearTxRollbackTest.java | 133 +
.../GridCacheReplicatedNodeRestartSelfTest.java | 2 +
...idCacheReplicatedOffHeapFullApiSelfTest.java | 8 +-
...plicatedOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...eReplicatedOffHeapTieredFullApiSelfTest.java | 33 +
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
...acheSortedEvictionPolicyPerformanceTest.java | 13 +-
.../IgniteCacheExpiryPolicyAbstractTest.java | 2 +-
.../IgniteCacheExpiryPolicyTestSuite.java | 2 +
.../expiry/IgniteCacheTtlCleanupSelfTest.java | 85 +
...LocalAtomicOffHeapTieredFullApiSelfTest.java | 32 +
.../GridCacheLocalIsolatedNodesSelfTest.java | 102 +
.../GridCacheLocalOffHeapFullApiSelfTest.java | 6 +-
...dCacheLocalOffHeapTieredFullApiSelfTest.java | 32 +
.../DataStreamerMultiThreadedSelfTest.java | 112 +
.../igfs/IgfsClientCacheSelfTest.java | 132 +
.../processors/igfs/IgfsOneClientNodeTest.java | 133 +
.../processors/igfs/IgfsStreamsSelfTest.java | 2 +-
...idFileSwapSpaceSpiMultithreadedLoadTest.java | 4 +-
.../logger/java/IgniteJavaLoggerTest.java | 65 -
.../ignite/logger/java/JavaLoggerTest.java | 65 +
.../tcp/TcpClientDiscoverySelfTest.java | 8 +
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 70 +-
.../GridSwapSpaceSpiAbstractSelfTest.java | 2 +-
.../testframework/junits/GridAbstractTest.java | 15 +
.../junits/logger/GridTestLog4jLogger.java | 10 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 4 +
.../IgniteCacheFailoverTestSuite.java | 11 +-
.../IgniteCacheFullApiSelfTestSuite.java | 18 +
...gniteCacheP2pUnmarshallingErrorTestSuit.java | 41 +
.../testsuites/IgniteCacheRestartTestSuite.java | 8 +-
.../ignite/testsuites/IgniteCacheTestSuite.java | 291 +-
.../testsuites/IgniteCacheTestSuite2.java | 141 +
.../testsuites/IgniteCacheTestSuite3.java | 140 +
.../testsuites/IgniteCacheTestSuite4.java | 131 +
.../IgniteCacheTxRecoverySelfTestSuite.java | 4 +
.../ignite/testsuites/IgniteIgfsTestSuite.java | 3 +
.../testsuites/IgniteLoggingSelfTestSuite.java | 2 +-
.../IgniteTopologyValidatorTestSuit.java | 43 +
modules/extdata/p2p/pom.xml | 2 +-
.../CacheNoValueClassOnServerTestClient.java | 88 +
.../apache/ignite/tests/p2p/cache/Person.java | 42 +
.../CacheConfigurationP2PTestClient.java | 1 -
modules/extdata/uri/pom.xml | 2 +-
modules/gce/README.txt | 32 +
modules/gce/licenses/apache-2.0.txt | 202 +
modules/gce/pom.xml | 92 +
.../gce/TcpDiscoveryGoogleStorageIpFinder.java | 380 +
.../tcp/ipfinder/gce/package-info.java | 22 +
...pDiscoveryGoogleStorageIpFinderSelfTest.java | 73 +
.../tcp/ipfinder/gce/package-info.java | 22 +
.../ignite/testsuites/IgniteGCETestSuite.java | 71 +
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 2 +-
.../processors/hadoop/HadoopDefaultJobInfo.java | 3 +
.../processors/hadoop/HadoopProcessor.java | 2 +-
.../processors/hadoop/igfs/HadoopIgfsIpcIo.java | 3 +
.../hadoop/jobtracker/HadoopJobTracker.java | 5 +-
.../hadoop/taskexecutor/HadoopRunnableTask.java | 3 +
.../external/HadoopExternalTaskExecutor.java | 3 +
.../processors/hadoop/v2/HadoopV2Job.java | 11 +-
.../hadoop/v2/HadoopV2TaskContext.java | 9 +
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
.../processors/query/h2/IgniteH2Indexing.java | 179 +-
.../query/h2/opt/GridH2AbstractKeyValueRow.java | 92 +-
.../query/h2/opt/GridH2KeyValueRowOffheap.java | 7 +-
.../query/h2/opt/GridH2KeyValueRowOnheap.java | 6 +-
.../query/h2/opt/GridH2RowDescriptor.java | 14 +-
.../processors/query/h2/opt/GridH2Table.java | 10 +-
.../query/h2/opt/GridH2ValueCacheObject.java | 191 +
.../query/h2/opt/GridLuceneIndex.java | 84 +-
.../processors/query/h2/sql/GridSqlQuery.java | 20 +
.../query/h2/sql/GridSqlQueryParser.java | 10 +-
.../query/h2/sql/GridSqlQuerySplitter.java | 11 +-
.../processors/query/h2/sql/GridSqlSelect.java | 2 +-
.../processors/query/h2/sql/GridSqlUnion.java | 2 +-
.../query/h2/twostep/GridMapQueryExecutor.java | 61 +-
.../query/h2/twostep/GridMergeIndex.java | 6 +-
.../h2/twostep/GridMergeIndexUnsorted.java | 4 +-
.../h2/twostep/GridReduceQueryExecutor.java | 162 +-
.../query/h2/twostep/GridResultPage.java | 80 +-
.../query/h2/twostep/msg/GridH2Array.java | 124 +
.../query/h2/twostep/msg/GridH2Boolean.java | 112 +
.../query/h2/twostep/msg/GridH2Byte.java | 113 +
.../query/h2/twostep/msg/GridH2Bytes.java | 113 +
.../query/h2/twostep/msg/GridH2CacheObject.java | 148 +
.../query/h2/twostep/msg/GridH2Date.java | 115 +
.../query/h2/twostep/msg/GridH2Decimal.java | 134 +
.../query/h2/twostep/msg/GridH2Double.java | 113 +
.../query/h2/twostep/msg/GridH2Float.java | 113 +
.../query/h2/twostep/msg/GridH2Geometry.java | 134 +
.../query/h2/twostep/msg/GridH2Integer.java | 113 +
.../query/h2/twostep/msg/GridH2JavaObject.java | 113 +
.../query/h2/twostep/msg/GridH2Long.java | 113 +
.../query/h2/twostep/msg/GridH2Null.java | 78 +
.../query/h2/twostep/msg/GridH2Short.java | 113 +
.../query/h2/twostep/msg/GridH2String.java | 115 +
.../query/h2/twostep/msg/GridH2Time.java | 116 +
.../query/h2/twostep/msg/GridH2Timestamp.java | 133 +
.../query/h2/twostep/msg/GridH2Uuid.java | 133 +
.../h2/twostep/msg/GridH2ValueMessage.java | 49 +
.../twostep/msg/GridH2ValueMessageFactory.java | 201 +
.../GridCacheAbstractFieldsQuerySelfTest.java | 1284 ----
.../cache/GridCacheOffHeapAndSwapSelfTest.java | 11 +-
.../cache/GridCacheOffHeapSelfTest.java | 11 +-
.../IgniteCacheAbstractFieldsQuerySelfTest.java | 256 +-
...niteCacheP2pUnmarshallingQueryErrorTest.java | 56 +
...eQueryMultiThreadedOffHeapTiredSelfTest.java | 37 +
.../IgniteCacheQueryMultiThreadedSelfTest.java | 35 +-
...artitionedFieldsQueryP2PEnabledSelfTest.java | 34 -
...GridCachePartitionedFieldsQuerySelfTest.java | 115 -
...rtitionedFieldsQueryP2PDisabledSelfTest.java | 34 -
...artitionedFieldsQueryP2PEnabledSelfTest.java | 34 +
...eReplicatedFieldsQueryP2PEnableSelfTest.java | 34 -
.../GridCacheReplicatedFieldsQuerySelfTest.java | 157 -
...eplicatedFieldsQueryP2PDisabledSelfTest.java | 34 -
...ReplicatedFieldsQueryP2PEnabledSelfTest.java | 34 +
.../h2/GridIndexingSpiAbstractSelfTest.java | 132 +-
.../query/h2/sql/BaseH2CompareQueryTest.java | 32 +-
.../IgniteCacheQuerySelfTestSuite.java | 8 +-
modules/jcl/pom.xml | 2 +-
.../ignite/logger/jcl/IgniteJclLogger.java | 167 -
.../org/apache/ignite/logger/jcl/JclLogger.java | 167 +
.../ignite/logger/jcl/IgniteJclLoggerTest.java | 48 -
.../apache/ignite/logger/jcl/JclLoggerTest.java | 48 +
.../ignite/testsuites/IgniteJclTestSuite.java | 2 +-
modules/jta/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
.../apache/ignite/logger/log4j/Log4JLogger.java | 8 +-
modules/rest-http/pom.xml | 2 +-
.../http/jetty/GridJettyRestHandler.java | 3 +
modules/scalar/pom.xml | 2 +-
.../ignite/scalar/ScalarConversions.scala | 8 -
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 8 +-
.../ignite/schema/generator/CodeGenerator.java | 105 +-
.../ignite/schema/ui/SchemaImportApp.java | 8 +-
modules/slf4j/pom.xml | 2 +-
.../ignite/logger/slf4j/GridSlf4jLogger.java | 138 -
.../apache/ignite/logger/slf4j/Slf4jLogger.java | 138 +
modules/spring/pom.xml | 2 +-
.../util/spring/IgniteSpringHelperImpl.java | 217 +-
.../ignite/internal/GridFactorySelfTest.java | 3 +-
.../IgniteStartFromStreamConfigurationTest.java | 50 +
.../testsuites/IgniteSpringTestSuite.java | 2 +
modules/ssh/pom.xml | 2 +-
...gniteProjectionStartStopRestartSelfTest.java | 26 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
.../uri/GridUriDeploymentClassLoader.java | 4 +-
.../spi/deployment/uri/UriDeploymentSpi.java | 2 +-
modules/visor-console/pom.xml | 2 +-
.../ignite/visor/commands/VisorConsole.scala | 314 +-
.../visor/commands/VisorConsoleCommand.scala | 77 -
.../ignite/visor/commands/VisorTextTable.scala | 539 --
.../visor/commands/ack/VisorAckCommand.scala | 42 +-
.../commands/alert/VisorAlertCommand.scala | 35 +-
.../commands/cache/VisorCacheClearCommand.scala | 51 +-
.../commands/cache/VisorCacheCommand.scala | 36 +-
.../commands/cache/VisorCacheScanCommand.scala | 60 +-
.../commands/cache/VisorCacheStopCommand.scala | 30 +-
.../commands/cache/VisorCacheSwapCommand.scala | 66 +-
.../commands/common/VisorConsoleCommand.scala | 90 +
.../visor/commands/common/VisorTextTable.scala | 543 ++
.../config/VisorConfigurationCommand.scala | 438 +-
.../commands/deploy/VisorDeployCommand.scala | 47 +-
.../commands/disco/VisorDiscoveryCommand.scala | 58 +-
.../commands/events/VisorEventsCommand.scala | 338 +-
.../visor/commands/gc/VisorGcCommand.scala | 130 +-
.../visor/commands/kill/VisorKillCommand.scala | 53 +-
.../visor/commands/node/VisorNodeCommand.scala | 47 +-
.../visor/commands/ping/VisorPingCommand.scala | 41 +-
.../commands/start/VisorStartCommand.scala | 34 +-
.../commands/tasks/VisorTasksCommand.scala | 76 +-
.../commands/top/VisorTopologyCommand.scala | 36 +-
.../visor/commands/vvm/VisorVvmCommand.scala | 32 +-
.../scala/org/apache/ignite/visor/visor.scala | 286 +-
.../ignite/visor/VisorTextTableSpec.scala | 3 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 237 +-
491 files changed, 21924 insertions(+), 13692 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d0810461/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
[46/50] [abbrv] incubator-ignite git commit: Merge remote-tracking
branch 'remotes/origin/ignite-157' into ignite-sprint-5
Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-157' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/bbc21a6a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/bbc21a6a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/bbc21a6a
Branch: refs/heads/ignite-836_2
Commit: bbc21a6acba0193695e8b924b540bae4a647f3b8
Parents: 3861fbd ab1f9dd
Author: sboikov <sb...@gridgain.com>
Authored: Wed May 13 10:04:14 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed May 13 10:04:14 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheMvccManager.java | 4 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 32 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 27 +
.../cache/distributed/dht/GridDhtTxMapping.java | 2 +-
.../distributed/dht/GridDhtTxPrepareFuture.java | 81 +-
.../colocated/GridDhtColocatedLockFuture.java | 25 +-
.../colocated/GridDhtDetachedCacheEntry.java | 4 +-
.../distributed/near/GridNearCacheEntry.java | 4 +-
.../distributed/near/GridNearLockFuture.java | 5 -
.../near/GridNearOptimisticTxPrepareFuture.java | 779 +++++++++++++
.../GridNearPessimisticTxPrepareFuture.java | 349 ++++++
.../cache/distributed/near/GridNearTxLocal.java | 84 +-
.../near/GridNearTxPrepareFuture.java | 1050 ------------------
.../near/GridNearTxPrepareFutureAdapter.java | 226 ++++
.../cache/transactions/IgniteInternalTx.java | 4 +-
.../cache/transactions/IgniteTxAdapter.java | 2 +-
.../cache/transactions/IgniteTxHandler.java | 68 +-
.../transactions/IgniteTxLocalAdapter.java | 2 +-
.../cache/transactions/IgniteTxManager.java | 12 +-
.../GridCacheAbstractFailoverSelfTest.java | 8 +-
.../GridCacheAbstractNodeRestartSelfTest.java | 11 +-
.../distributed/IgniteTxGetAfterStopTest.java | 131 +++
...ePrimaryNodeFailureRecoveryAbstractTest.java | 4 +-
...idCacheAtomicReplicatedFailoverSelfTest.java | 6 +
.../GridCacheReplicatedFailoverSelfTest.java | 6 +
.../GridCacheReplicatedNodeRestartSelfTest.java | 80 ++
.../IgniteCacheFailoverTestSuite.java | 10 +-
.../testsuites/IgniteCacheRestartTestSuite.java | 8 +-
.../testsuites/IgniteCacheTestSuite3.java | 2 +
29 files changed, 1759 insertions(+), 1267 deletions(-)
----------------------------------------------------------------------
[39/50] [abbrv] incubator-ignite git commit: Merge remote-tracking
branch 'remotes/origin/ignite-sprint-4' into ignite-sprint-5
Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-4' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c2357116
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c2357116
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c2357116
Branch: refs/heads/ignite-836_2
Commit: c235711673fcfaf1cb01bbee82e124d08544d875
Parents: f6012f1 b95d2ae
Author: avinogradov <av...@gridgain.com>
Authored: Tue May 12 15:35:58 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Tue May 12 15:35:58 2015 +0300
----------------------------------------------------------------------
assembly/release-base.xml | 4 +-
bin/ignite-schema-import.bat | 2 +-
bin/ignite-schema-import.sh | 2 +-
bin/ignite.bat | 2 +-
bin/ignite.sh | 2 +-
bin/ignitevisorcmd.bat | 2 +-
bin/ignitevisorcmd.sh | 2 +-
bin/include/build-classpath.bat | 46 +++++++++++++++++++++++
bin/include/build-classpath.sh | 71 +++++++++++++++++++++++++++++++++++
bin/include/target-classpath.bat | 46 -----------------------
bin/include/target-classpath.sh | 71 -----------------------------------
pom.xml | 50 ++++++++++++------------
12 files changed, 152 insertions(+), 148 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c2357116/pom.xml
----------------------------------------------------------------------
[18/50] [abbrv] incubator-ignite git commit: # ignite-157
Posted by se...@apache.org.
# ignite-157
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f9c5fbec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f9c5fbec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f9c5fbec
Branch: refs/heads/ignite-836_2
Commit: f9c5fbec3e4cf36c720320e4ee7ef0b91d9f014b
Parents: 50ec7f3
Author: sboikov <sb...@gridgain.com>
Authored: Fri May 8 15:20:27 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri May 8 15:20:27 2015 +0300
----------------------------------------------------------------------
.../ignite/testsuites/IgniteCacheFailoverTestSuite.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f9c5fbec/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java
index 2cc6a5a..dd3ce27 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java
@@ -61,9 +61,10 @@ public class IgniteCacheFailoverTestSuite extends TestSuite {
suite.addTestSuite(IgniteCacheTxNearDisabledPutGetRestartTest.class);
suite.addTestSuite(IgniteCacheTxNearDisabledFairAffinityPutGetRestartTest.class);
- suite.addTestSuite(GridCachePartitionedFailoverSelfTest.class);
- suite.addTestSuite(GridCacheColocatedFailoverSelfTest.class);
- suite.addTestSuite(GridCacheReplicatedFailoverSelfTest.class);
+ // TODO IGNITE-882.
+ //suite.addTestSuite(GridCachePartitionedFailoverSelfTest.class);
+ //suite.addTestSuite(GridCacheColocatedFailoverSelfTest.class);
+ //suite.addTestSuite(GridCacheReplicatedFailoverSelfTest.class);
return suite;
}
[32/50] [abbrv] incubator-ignite git commit: Merge remote-tracking
branch 'origin/ignite-sprint-5' into ignite-sprint-5
Posted by se...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-5' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f6012f1e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f6012f1e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f6012f1e
Branch: refs/heads/ignite-836_2
Commit: f6012f1e802be3ade9efd53d79ec6b85df5a4c8c
Parents: e6ca757 f4a3591
Author: avinogradov <av...@gridgain.com>
Authored: Fri May 8 18:54:49 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri May 8 18:54:49 2015 +0300
----------------------------------------------------------------------
.../processors/resource/GridResourceField.java | 11 +
.../processors/resource/GridResourceIoc.java | 387 ++++++-------------
.../processors/resource/GridResourceMethod.java | 13 +
.../resource/GridResourceProcessor.java | 4 +-
.../ignite/internal/util/IgniteUtils.java | 15 +
.../spi/discovery/tcp/TcpDiscoverySpi.java | 24 +-
6 files changed, 191 insertions(+), 263 deletions(-)
----------------------------------------------------------------------
[17/50] [abbrv] incubator-ignite git commit: Merge branch
'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
into ignite-sprint-5
Posted by se...@apache.org.
Merge branch 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/23616406
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/23616406
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/23616406
Branch: refs/heads/ignite-836_2
Commit: 23616406ee0989c743bbb2e9f088db3dcdc6d6e1
Parents: a983125 f62afc6
Author: Denis Magda <dm...@gridgain.com>
Authored: Fri May 8 15:16:37 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Fri May 8 15:16:37 2015 +0300
----------------------------------------------------------------------
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
modules/clients/pom.xml | 2 +-
modules/cloud/pom.xml | 2 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 2 +-
.../processors/cache/GridCacheAdapter.java | 26 ++-
.../cache/GridCacheEvictionManager.java | 2 +-
.../processors/cache/GridCacheProxyImpl.java | 24 --
.../processors/cache/GridCacheSwapManager.java | 215 +++++++++++++-----
.../processors/cache/IgniteInternalCache.java | 27 ---
.../colocated/GridDhtColocatedLockFuture.java | 2 +
.../distributed/near/GridNearCacheAdapter.java | 10 -
.../processors/cache/local/GridLocalCache.java | 8 +-
.../local/atomic/GridLocalAtomicCache.java | 27 ++-
.../cache/query/GridCacheQueryManager.java | 21 +-
.../transactions/IgniteTxLocalAdapter.java | 12 +-
.../processors/igfs/IgfsDeleteWorker.java | 4 +
.../offheap/GridOffHeapProcessor.java | 17 ++
.../util/offheap/GridOffHeapPartitionedMap.java | 9 +
.../unsafe/GridUnsafePartitionedMap.java | 155 ++++++-------
.../core/src/main/resources/ignite.properties | 2 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 227 +++++++++++--------
.../cache/GridCacheAbstractSelfTest.java | 4 +-
.../cache/OffHeapTieredTransactionSelfTest.java | 127 +++++++++++
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 43 ++++
...ionedNearDisabledOffHeapFullApiSelfTest.java | 8 +-
...DisabledOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...abledOffHeapTieredAtomicFullApiSelfTest.java | 56 +++++
...earDisabledOffHeapTieredFullApiSelfTest.java | 33 +++
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +++
...CacheAtomicOffHeapTieredFullApiSelfTest.java | 32 +++
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +++
...yWriteOrderOffHeapTieredFullApiSelfTest.java | 33 +++
...erOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +++
...achePartitionedMultiNodeFullApiSelfTest.java | 15 +-
...dCachePartitionedOffHeapFullApiSelfTest.java | 8 +-
...titionedOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...PartitionedOffHeapTieredFullApiSelfTest.java | 32 +++
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 72 ++++++
...idCacheReplicatedOffHeapFullApiSelfTest.java | 8 +-
...plicatedOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...eReplicatedOffHeapTieredFullApiSelfTest.java | 33 +++
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +++
...LocalAtomicOffHeapTieredFullApiSelfTest.java | 32 +++
.../GridCacheLocalOffHeapFullApiSelfTest.java | 6 +-
...dCacheLocalOffHeapTieredFullApiSelfTest.java | 32 +++
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
.../IgniteCacheFullApiSelfTestSuite.java | 18 ++
.../testsuites/IgniteCacheTestSuite3.java | 3 -
modules/extdata/p2p/pom.xml | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 2 +-
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
...eQueryMultiThreadedOffHeapTiredSelfTest.java | 37 +++
.../IgniteCacheQueryMultiThreadedSelfTest.java | 29 ++-
.../IgniteCacheQuerySelfTestSuite.java | 1 +
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/rest-http/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/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/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 +-
pom.xml | 6 +-
78 files changed, 1269 insertions(+), 404 deletions(-)
----------------------------------------------------------------------
[09/50] [abbrv] incubator-ignite git commit: devnotes security fix
Posted by se...@apache.org.
devnotes security fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2d4a3fb7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2d4a3fb7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2d4a3fb7
Branch: refs/heads/ignite-836_2
Commit: 2d4a3fb790e64df897247820013d80cb4fefbbae
Parents: e9f2e6d
Author: avinogradov <av...@gridgain.com>
Authored: Fri May 8 12:49:06 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri May 8 12:49:06 2015 +0300
----------------------------------------------------------------------
DEVNOTES.txt | 6 ------
1 file changed, 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2d4a3fb7/DEVNOTES.txt
----------------------------------------------------------------------
diff --git a/DEVNOTES.txt b/DEVNOTES.txt
index 7618e6c..dfba3a9 100644
--- a/DEVNOTES.txt
+++ b/DEVNOTES.txt
@@ -58,12 +58,6 @@ Deploy Ignite release to maven repository and site:
mvn deploy -P apache-release,gpg,release,scala,lgpl,deploy-ignite-site -Dignite.edition=fabric -DskipTests -Dignite.site=scp://people.apache.org:/home/<username>/public_html -B
-You might need to allow connection to people.apache.org. Just do following at console:
-
-ssh people.apache.org
-
-and type "yes" + enter.
-
In case you want to release both fabric and hadoop editions you have to build hadoop first, save /target/bin/*.zip, make "mvn clean" and
restore them before deploy step.
[45/50] [abbrv] incubator-ignite git commit: ignite-676: Fix ignite
Start Nodes on public TC
Posted by se...@apache.org.
ignite-676: Fix ignite Start Nodes on public TC
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3861fbda
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3861fbda
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3861fbda
Branch: refs/heads/ignite-836_2
Commit: 3861fbda0e54be505edc6dc5993edc4d70f16d59
Parents: f027ac5
Author: Artem Shutak <as...@gridgain.com>
Authored: Tue May 12 20:32:46 2015 +0300
Committer: Artem Shutak <as...@gridgain.com>
Committed: Tue May 12 20:32:46 2015 +0300
----------------------------------------------------------------------
bin/include/functions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3861fbda/bin/include/functions.sh
----------------------------------------------------------------------
diff --git a/bin/include/functions.sh b/bin/include/functions.sh
index f0430c1..b18b150 100755
--- a/bin/include/functions.sh
+++ b/bin/include/functions.sh
@@ -34,7 +34,7 @@
checkJava() {
# Check JAVA_HOME.
if [ "$JAVA_HOME" = "" ]; then
- JAVA=`which java`
+ JAVA=`type -p java`
RETCODE=$?
if [ $RETCODE -ne 0 ]; then
[26/50] [abbrv] incubator-ignite git commit: Merge remote-tracking
branch 'remotes/origin/ignite-sprint-4' into ignite-sprint-5
Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-4' into ignite-sprint-5
Conflicts:
DEVNOTES.txt
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c9cd92ef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c9cd92ef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c9cd92ef
Branch: refs/heads/ignite-836_2
Commit: c9cd92ef29e2387e3290310a04809347808419d4
Parents: 2361640 ecc7a50
Author: avinogradov <av...@gridgain.com>
Authored: Fri May 8 17:50:26 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri May 8 17:50:26 2015 +0300
----------------------------------------------------------------------
parent/pom.xml | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
[49/50] [abbrv] incubator-ignite git commit: i-709 review
Posted by se...@apache.org.
i-709 review
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/16e211ee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/16e211ee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/16e211ee
Branch: refs/heads/ignite-836_2
Commit: 16e211ee2f867921ac38f802ff59f81ba15a818e
Parents: ae38a24
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed May 13 13:50:33 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed May 13 13:50:33 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java | 1 +
.../java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/16e211ee/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
index d1446a8..7ecfe48 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
@@ -1286,6 +1286,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
leaveLatch.countDown();
}
}
+
return;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/16e211ee/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index 3478646..53522c7 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -1068,7 +1068,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
assert nodeId != null;
if (log.isDebugEnabled())
- log.debug("Ping node. NodeId: [" + nodeId + "].");
+ log.debug("Pinging node: " + nodeId + "].");
if (nodeId == getLocalNodeId())
return true;