You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/06/30 11:06:18 UTC
[01/13] incubator-ignite git commit: # init marshaller cache on
daemon nodes
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-gg-9908 f45f96d0c -> bade9f16b
# init marshaller cache on daemon nodes
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3231f933
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3231f933
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3231f933
Branch: refs/heads/ignite-gg-9908
Commit: 3231f93373a2f84b7e0ea64d969b53121b6fe323
Parents: 01d842a
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jun 26 14:34:24 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jun 26 15:28:52 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/GridKernalContextImpl.java | 2 +-
.../processors/cache/GridCacheProcessor.java | 62 ++++--
.../IgniteDaemonNodeMarshallerCacheTest.java | 192 +++++++++++++++++++
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
4 files changed, 245 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3231f933/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
index 65107a7..8abb135 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
@@ -899,7 +899,7 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable
/** {@inheritDoc} */
@Override public boolean clientNode() {
- return cfg.isClientMode();
+ return cfg.isClientMode() || cfg.isDaemon();
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3231f933/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 2f7f22c..8124594 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -265,7 +265,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
// Suppress warning if at least one ATOMIC cache found.
perf.add("Enable ATOMIC mode if not using transactions (set 'atomicityMode' to ATOMIC)",
- cfg.getAtomicityMode() == ATOMIC);
+ cfg.getAtomicityMode() == ATOMIC);
// Suppress warning if at least one non-FULL_SYNC mode found.
perf.add("Disable fully synchronous writes (set 'writeSynchronizationMode' to PRIMARY_SYNC or FULL_ASYNC)",
@@ -341,8 +341,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
"Serializable transactions are disabled while default transaction isolation is SERIALIZABLE " +
"(most likely misconfiguration - either update 'isTxSerializableEnabled' or " +
"'defaultTxIsolationLevel' properties) for cache: " + U.maskName(cc.getName()),
- "Serializable transactions are disabled while default transaction isolation is SERIALIZABLE " +
- "for cache: " + U.maskName(cc.getName()));
+ "Serializable transactions are disabled while default transaction isolation is SERIALIZABLE " +
+ "for cache: " + U.maskName(cc.getName()));
if (cc.isWriteBehindEnabled()) {
if (cfgStore == null)
@@ -527,8 +527,14 @@ public class GridCacheProcessor extends GridProcessorAdapter {
/** {@inheritDoc} */
@SuppressWarnings( {"unchecked"})
@Override public void start() throws IgniteCheckedException {
- if (ctx.config().isDaemon())
+ if (ctx.config().isDaemon()) {
+ sharedCtx = createSharedContext(ctx, CU.startStoreSessionListeners(ctx, null));
+
+ for (GridCacheSharedManager mgr : sharedCtx.managers())
+ mgr.start(sharedCtx);
+
return;
+ }
DeploymentMode depMode = ctx.config().getDeploymentMode();
@@ -667,8 +673,45 @@ public class GridCacheProcessor extends GridProcessorAdapter {
@SuppressWarnings("unchecked")
@Override public void onKernalStart() throws IgniteCheckedException {
try {
- if (ctx.config().isDaemon())
+ if (ctx.config().isDaemon()) {
+ for (CacheConfiguration ccfg : ctx.config().getCacheConfiguration()) {
+ if (CU.isMarshallerCache(ccfg.getName())) {
+ CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(ccfg);
+
+ initialize(ccfg, cacheObjCtx);
+
+ GridCacheContext ctx = createCache(ccfg, null, CacheType.MARSHALLER, cacheObjCtx, true);
+
+ ctx.dynamicDeploymentId(IgniteUuid.randomUuid());
+
+ sharedCtx.addCacheContext(ctx);
+
+ GridCacheAdapter cache = ctx.cache();
+
+ String name = ccfg.getName();
+
+ caches.put(maskNull(name), cache);
+
+ startCache(cache);
+
+ break;
+ }
+ }
+
+ marshallerCache().context().preloader().syncFuture().listen(new CIX1<IgniteInternalFuture<?>>() {
+ @Override public void applyx(IgniteInternalFuture<?> f) throws IgniteCheckedException {
+ ctx.marshallerContext().onMarshallerCachePreloaded(ctx);
+ }
+ });
+
+ for (GridCacheSharedManager<?, ?> mgr : sharedCtx.managers())
+ mgr.onKernalStart();
+
+ for (GridCacheAdapter<?, ?> cache : caches.values())
+ onKernalStart(cache);
+
return;
+ }
ClusterNode locNode = ctx.discovery().localNode();
@@ -808,9 +851,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public void stop(boolean cancel) throws IgniteCheckedException {
- if (ctx.config().isDaemon())
- return;
-
for (String cacheName : stopSeq) {
GridCacheAdapter<?, ?> cache = caches.remove(maskNull(cacheName));
@@ -850,9 +890,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
@Override public void onKernalStop(boolean cancel) {
cacheStartedLatch.countDown();
- if (ctx.config().isDaemon())
- return;
-
for (String cacheName : stopSeq) {
GridCacheAdapter<?, ?> cache = caches.get(maskNull(cacheName));
@@ -1390,6 +1427,9 @@ public class GridCacheProcessor extends GridProcessorAdapter {
Collection<DynamicCacheChangeRequest> reqs,
AffinityTopologyVersion topVer
) throws IgniteCheckedException {
+ if (ctx.isDaemon())
+ return;
+
for (DynamicCacheChangeRequest req : reqs) {
assert req.start() : req;
assert req.cacheType() != null : req;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3231f933/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java
new file mode 100644
index 0000000..a0f4074
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java
@@ -0,0 +1,192 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import org.apache.ignite.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.resources.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.io.*;
+
+import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.cache.CacheRebalanceMode.*;
+import static org.apache.ignite.internal.IgniteNodeAttributes.*;
+
+/**
+ *
+ */
+public class IgniteDaemonNodeMarshallerCacheTest extends GridCommonAbstractTest {
+ /** */
+ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+
+ /** */
+ private boolean daemon;
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ cfg.setDaemon(daemon);
+
+ ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ super.afterTest();
+
+ stopAllGrids();
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testMarshalOnDaemonNode1() throws Exception {
+ marshalOnDaemonNode(true);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testMarshalOnDaemonNode2() throws Exception {
+ marshalOnDaemonNode(false);
+ }
+
+ /**
+ * @param startFirst If {@code true} daemon node is started first.
+ * @throws Exception If failed.
+ */
+ public void marshalOnDaemonNode(boolean startFirst) throws Exception {
+ int nodeIdx = 0;
+
+ if (!startFirst) {
+ Ignite ignite1 = startGrid(nodeIdx++);
+
+ assertFalse("true".equals(ignite1.cluster().localNode().attribute(ATTR_DAEMON)));
+ }
+
+ daemon = true;
+
+ Ignite daemonNode = startGrid(nodeIdx++);
+
+ assertEquals("true", daemonNode.cluster().localNode().attribute(ATTR_DAEMON));
+
+ daemon = false;
+
+ if (startFirst) {
+ Ignite ignite1 = startGrid(nodeIdx++);
+
+ assertFalse("true".equals(ignite1.cluster().localNode().attribute(ATTR_DAEMON)));
+ }
+
+ awaitPartitionMapExchange();
+
+ TestClass1 res1 = daemonNode.compute(daemonNode.cluster().forRemotes()).call(new TestCallable1());
+
+ assertNotNull(res1);
+ assertEquals(111, res1.val);
+
+ Ignite ignite2 = startGrid(nodeIdx);
+
+ CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
+
+ ccfg.setRebalanceMode(SYNC);
+ ccfg.setCacheMode(REPLICATED);
+
+ IgniteCache<Object, Object> cache = ignite2.getOrCreateCache(ccfg);
+
+ awaitPartitionMapExchange();
+
+ cache.put(1, new TestClass1(1));
+ cache.put(2, new TestClass2(2));
+
+ TestClass2 res2 = daemonNode.compute(daemonNode.cluster().forRemotes()).call(new TestCallable2());
+
+ assertNotNull(res2);
+ assertEquals(222, res2.val);
+ }
+
+ /**
+ *
+ */
+ private static class TestCallable1 implements IgniteCallable<TestClass1> {
+ /** */
+ @IgniteInstanceResource
+ private Ignite ignite;
+
+ /** {@inheritDoc} */
+ @Override public TestClass1 call() throws Exception {
+ assertFalse("true".equals(ignite.cluster().localNode().attribute(ATTR_DAEMON)));
+
+ return new TestClass1(111);
+ }
+ }
+
+ /**
+ *
+ */
+ private static class TestCallable2 implements IgniteCallable<TestClass2> {
+ /** */
+ @IgniteInstanceResource
+ private Ignite ignite;
+
+ /** {@inheritDoc} */
+ @Override public TestClass2 call() throws Exception {
+ assertFalse("true".equals(ignite.cluster().localNode().attribute(ATTR_DAEMON)));
+
+ return new TestClass2(222);
+ }
+ }
+
+ /**
+ *
+ */
+ private static class TestClass1 implements Serializable {
+ /** */
+ public int val;
+
+ /**
+ * @param val Value.
+ */
+ public TestClass1(int val) {
+ this.val = val;
+ }
+ }
+
+ /**
+ *
+ */
+ private static class TestClass2 implements Serializable {
+ /** */
+ public int val;
+
+ /**
+ * @param val Value.
+ */
+ public TestClass2(int val) {
+ this.val = val;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3231f933/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index 6ff83e2..df22290 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@ -94,6 +94,7 @@ public class IgniteBasicTestSuite extends TestSuite {
suite.addTestSuite(GridFailFastNodeFailureDetectionSelfTest.class);
suite.addTestSuite(OffHeapTieredTransactionSelfTest.class);
suite.addTestSuite(IgniteSlowClientDetectionSelfTest.class);
+ suite.addTestSuite(IgniteDaemonNodeMarshallerCacheTest.class);
return suite;
}
[10/13] incubator-ignite git commit: # sprint-7 Minor fixes in
javadocs.
Posted by vo...@apache.org.
# sprint-7 Minor fixes in javadocs.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/596c5389
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/596c5389
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/596c5389
Branch: refs/heads/ignite-gg-9908
Commit: 596c5389b0faf1de1be5cbe2a88b5579a93683b2
Parents: 1a21477
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue Jun 30 10:26:12 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue Jun 30 10:26:12 2015 +0700
----------------------------------------------------------------------
.../main/java/org/apache/ignite/schema/model/PojoDescriptor.java | 2 ++
.../src/main/java/org/apache/ignite/schema/model/PojoField.java | 1 +
.../apache/ignite/schema/parser/dialect/OracleMetadataDialect.java | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/596c5389/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
index 4ef8b00..5e1da06 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
@@ -304,6 +304,8 @@ public class PojoDescriptor {
/**
* Gets indexes groups.
+ *
+ * @return Map with indexes.
*/
public Map<String, Map<String, IndexItem>> groups() {
Map<String, Map<String, Boolean>> idxs = tbl.indexes();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/596c5389/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoField.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoField.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoField.java
index 10939d9..88e4008 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoField.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoField.java
@@ -184,6 +184,7 @@ public class PojoField {
/**
* @param jdbcType String name for JDBC type.
+ * @return String name for JDBC type.
*/
private static String jdbcTypeName(int jdbcType) {
switch (jdbcType) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/596c5389/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
index 6b16042..855c9f7 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
@@ -189,7 +189,7 @@ public class OracleMetadataDialect extends DatabaseMetadataDialect {
* @param owner DB owner.
* @param tbl Table name.
* @return Index columns.
- * @throws SQLException If failed to retrieve indexe columns.
+ * @throws SQLException If failed to retrieve indexes columns.
*/
private Map<String, Map<String, Boolean>> indexes(PreparedStatement stmt, String owner, String tbl)
throws SQLException {
[05/13] incubator-ignite git commit: minor fix
Posted by vo...@apache.org.
minor fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a2266666
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a2266666
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a2266666
Branch: refs/heads/ignite-gg-9908
Commit: a226666663f0d5de94284a3662a6103c1d9c2b17
Parents: f45f96d
Author: avinogradov <av...@gridgain.com>
Authored: Mon Jun 29 15:55:41 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Mon Jun 29 15:55:41 2015 +0300
----------------------------------------------------------------------
pom.xml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a2266666/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b935b2e..4f2441c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -604,12 +604,12 @@
</copy>
<!-- appending filename to md5 and sha1 files. to be improved. -->
- <concat destfile="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.md5" append="true"> ${project.artifactId}-fabric-${project.version}-bin.zip</concat>
- <concat destfile="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.sha1" append="true"> ${project.artifactId}-fabric-${project.version}-bin.zip</concat>
- <concat destfile="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.md5" append="true"> ${project.artifactId}-hadoop-${project.version}-bin.zip</concat>
- <concat destfile="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.sha1" append="true"> ${project.artifactId}-hadoop-${project.version}-bin.zip</concat>
- <concat destfile="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.md5" append="true"> ${project.artifactId}-${project.version}-src.zip</concat>
- <concat destfile="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.sha1" append="true"> ${project.artifactId}-${project.version}-src.zip</concat>
+ <echo file="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.md5" append="true" message=" ${project.artifactId}-fabric-${project.version}-bin.zip"/>
+ <echo file="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.sha1" append="true" message=" ${project.artifactId}-fabric-${project.version}-bin.zip"/>
+ <echo file="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.md5" append="true" message=" ${project.artifactId}-hadoop-${project.version}-bin.zip"/>
+ <echo file="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.sha1" append="true" message=" ${project.artifactId}-hadoop-${project.version}-bin.zip"/>
+ <echo file="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.md5" append="true" message=" ${project.artifactId}-${project.version}-src.zip"/>
+ <echo file="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.sha1" append="true" message=" ${project.artifactId}-${project.version}-src.zip"/>
<copy file="${basedir}/KEYS" todir="${basedir}/target/site" failonerror="false" />
</target>
[02/13] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-sprint-7' into ignite-gg-10453
Posted by vo...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-7' into ignite-gg-10453
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d86882c3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d86882c3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d86882c3
Branch: refs/heads/ignite-gg-9908
Commit: d86882c3597080c62877ba36b916dda29089b900
Parents: 3231f93 6e23608
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jun 26 16:55:32 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jun 26 16:55:32 2015 +0300
----------------------------------------------------------------------
.../GridCachePartitionExchangeManager.java | 6 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 151 ++++++-----
.../ignite/spi/discovery/tcp/ServerImpl.java | 103 +++++--
.../spi/discovery/tcp/TcpDiscoverySpi.java | 3 +-
...achePartitionedMultiNodeFullApiSelfTest.java | 4 +-
.../tcp/TcpClientDiscoverySpiSelfTest.java | 265 ++++++++++++++++++-
6 files changed, 451 insertions(+), 81 deletions(-)
----------------------------------------------------------------------
[11/13] incubator-ignite git commit: IGNITE-1061 - Fixed as discussed.
Posted by vo...@apache.org.
IGNITE-1061 - Fixed as discussed.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b467822d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b467822d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b467822d
Branch: refs/heads/ignite-gg-9908
Commit: b467822d55c8f796de2d7b3c2aa80b46f81811c1
Parents: 68c21ac
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Mon Jun 29 20:33:20 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Mon Jun 29 20:33:20 2015 -0700
----------------------------------------------------------------------
.../core/src/test/config/spark/spark-config.xml | 46 ++++++++++++++++++
.../org/apache/ignite/spark/IgniteContext.scala | 50 ++++++++++++++++++--
.../org/apache/ignite/spark/IgniteRddSpec.scala | 18 +++++++
3 files changed, 110 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b467822d/modules/core/src/test/config/spark/spark-config.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/spark/spark-config.xml b/modules/core/src/test/config/spark/spark-config.xml
new file mode 100644
index 0000000..4b7ffe1
--- /dev/null
+++ b/modules/core/src/test/config/spark/spark-config.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ 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.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="localHost" value="127.0.0.1"/>
+
+ <property name="discoverySpi">
+ <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+ <property name="ipFinder">
+ <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
+ <property name="addresses">
+ <list>
+ <value>127.0.0.1:47500</value>
+ <value>127.0.0.1:47501</value>
+ <value>127.0.0.1:47502</value>
+ <value>127.0.0.1:47503</value>
+ <value>127.0.0.1:47504</value>
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+ </property>
+ </bean>
+</beans>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b467822d/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
----------------------------------------------------------------------
diff --git a/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala b/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
index e52555a..5dbb1d3 100644
--- a/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
+++ b/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
@@ -33,11 +33,13 @@ import org.apache.spark.sql.SQLContext
* @tparam V Value type.
*/
class IgniteContext[K, V](
- @scala.transient val sparkContext: SparkContext,
+ @transient val sparkContext: SparkContext,
cfgF: () ⇒ IgniteConfiguration,
client: Boolean = true
) extends Serializable with Logging {
- @scala.transient private val driver = true
+ @transient private val driver = true
+
+ private val cfgClo = new Once(cfgF)
if (!client) {
val workers = sparkContext.getExecutorStorageStatus.length - 1
@@ -51,6 +53,15 @@ class IgniteContext[K, V](
sparkContext.parallelize(1 to workers, workers).foreach(it ⇒ ignite())
}
+ // Make sure to start Ignite on context creation.
+ ignite()
+
+ /**
+ * Creates an instance of IgniteContext with the given spring configuration.
+ *
+ * @param sc Spark context.
+ * @param springUrl Spring configuration path.
+ */
def this(
sc: SparkContext,
springUrl: String
@@ -58,6 +69,17 @@ class IgniteContext[K, V](
this(sc, () ⇒ IgnitionEx.loadConfiguration(springUrl).get1())
}
+ /**
+ * Creates an instance of IgniteContext with default Ignite configuration.
+ * By default this method will use grid configuration defined in `IGNITE_HOME/config/default-config.xml`
+ * configuration file.
+ *
+ * @param sc Spark context.
+ */
+ def this(sc: SparkContext) {
+ this(sc, IgnitionEx.DFLT_CFG)
+ }
+
val sqlContext = new SQLContext(sparkContext)
/**
@@ -89,7 +111,7 @@ class IgniteContext[K, V](
* @return Ignite instance.
*/
def ignite(): Ignite = {
- val igniteCfg = cfgF()
+ val igniteCfg = cfgClo()
try {
Ignition.ignite(igniteCfg.getGridName)
@@ -112,8 +134,28 @@ class IgniteContext[K, V](
* a no-op.
*/
def close() = {
- val igniteCfg = cfgF()
+ val igniteCfg = cfgClo()
Ignition.stop(igniteCfg.getGridName, false)
}
}
+
+/**
+ * Auxiliary closure that ensures that passed in closure is executed only once.
+ *
+ * @param clo Closure to wrap.
+ */
+private class Once(clo: () ⇒ IgniteConfiguration) extends Serializable {
+ @transient @volatile var res: IgniteConfiguration = null
+
+ def apply(): IgniteConfiguration = {
+ if (res == null) {
+ this.synchronized {
+ if (res == null)
+ res = clo()
+ }
+ }
+
+ res
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b467822d/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteRddSpec.scala
----------------------------------------------------------------------
diff --git a/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteRddSpec.scala b/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteRddSpec.scala
index 26ce693..8fa6949 100644
--- a/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteRddSpec.scala
+++ b/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteRddSpec.scala
@@ -147,6 +147,24 @@ class IgniteRddSpec extends FunSpec with Matchers with BeforeAndAfterAll with Be
sc.stop()
}
}
+
+ it("should successfully start spark context with XML configuration") {
+ val sc = new SparkContext("local[*]", "test")
+
+ try {
+ val ic = new IgniteContext[String, String](sc,
+ "modules/core/src/test/config/spark/spark-config.xml")
+
+ val cache: IgniteRDD[String, String] = ic.fromCache(PARTITIONED_CACHE_NAME)
+
+ cache.savePairs(sc.parallelize(1 to 1000, 2).map(i ⇒ (String.valueOf(i), "val" + i)))
+
+ assert(1000 == cache.count())
+ }
+ finally {
+ sc.stop()
+ }
+ }
}
override protected def beforeEach() = {
[13/13] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-7' into ignite-sprint-7
Posted by vo...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-7' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/bade9f16
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/bade9f16
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/bade9f16
Branch: refs/heads/ignite-gg-9908
Commit: bade9f16b64416b4ea032699a8a651d0a3ad064f
Parents: 596c538 8c55f8a
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue Jun 30 10:39:09 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue Jun 30 10:39:09 2015 +0700
----------------------------------------------------------------------
.../ignite/internal/GridKernalContextImpl.java | 2 +-
.../discovery/GridDiscoveryManager.java | 6 +
.../cache/GridCacheDeploymentManager.java | 10 +-
.../processors/cache/GridCacheProcessor.java | 62 ++++--
.../shmem/IpcSharedMemoryServerEndpoint.java | 10 +-
.../core/src/test/config/spark/spark-config.xml | 46 +++++
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 ------------
.../IgniteDaemonNodeMarshallerCacheTest.java | 192 +++++++++++++++++++
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
.../testsuites/IgniteCacheTestSuite3.java | 1 -
.../org/apache/ignite/spark/IgniteContext.scala | 50 ++++-
.../org/apache/ignite/spark/IgniteRddSpec.scala | 18 ++
pom.xml | 12 +-
13 files changed, 380 insertions(+), 149 deletions(-)
----------------------------------------------------------------------
[04/13] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-gg-10453' into ignite-sprint-7
Posted by vo...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-gg-10453' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/15f3612d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/15f3612d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/15f3612d
Branch: refs/heads/ignite-gg-9908
Commit: 15f3612d31a1f39046d4bf5cc7be6e0aed7d02c8
Parents: f45f96d d51db29
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 29 15:25:53 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 29 15:25:53 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/GridKernalContextImpl.java | 2 +-
.../processors/cache/GridCacheProcessor.java | 62 ++++--
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 ------------
.../IgniteDaemonNodeMarshallerCacheTest.java | 192 +++++++++++++++++++
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
.../testsuites/IgniteCacheTestSuite3.java | 1 -
6 files changed, 245 insertions(+), 132 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15f3612d/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
[06/13] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-7' into ignite-sprint-7
Posted by vo...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-7' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5dff89c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5dff89c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5dff89c6
Branch: refs/heads/ignite-gg-9908
Commit: 5dff89c650575b6fe92450492027e77ffce48186
Parents: a226666 15f3612
Author: avinogradov <av...@gridgain.com>
Authored: Mon Jun 29 15:56:02 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Mon Jun 29 15:56:02 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/GridKernalContextImpl.java | 2 +-
.../processors/cache/GridCacheProcessor.java | 62 ++++--
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 ------------
.../IgniteDaemonNodeMarshallerCacheTest.java | 192 +++++++++++++++++++
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
.../testsuites/IgniteCacheTestSuite3.java | 1 -
6 files changed, 245 insertions(+), 132 deletions(-)
----------------------------------------------------------------------
[07/13] incubator-ignite git commit: #ignite-18: Property
segmentationResolveAttempts seems to be ignored.
Posted by vo...@apache.org.
#ignite-18: Property segmentationResolveAttempts seems to be ignored.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/1d5cfbcc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1d5cfbcc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1d5cfbcc
Branch: refs/heads/ignite-gg-9908
Commit: 1d5cfbcc6ef79dd8da99dc46a2797952dbcf4eab
Parents: 5dff89c
Author: ivasilinets <iv...@gridgain.com>
Authored: Mon Jun 29 17:50:49 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Mon Jun 29 17:50:49 2015 +0300
----------------------------------------------------------------------
.../internal/managers/discovery/GridDiscoveryManager.java | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1d5cfbcc/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index 1e4b972..5e7600f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -326,6 +326,12 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
U.warn(log, "Configuration parameter 'segmentCheckFrequency' is too low " +
"(at least 2000 ms recommended): " + segChkFreq);
+ int segResAttemp = ctx.config().getSegmentationResolveAttempts();
+
+ if (segResAttemp < 1)
+ throw new IgniteCheckedException(
+ "Segment resolve attempts cannot be negative or zero: " + segResAttemp);
+
checkSegmentOnStart();
}
[09/13] incubator-ignite git commit: # fixed delays on node stop
Posted by vo...@apache.org.
# fixed delays on node stop
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/68c21ac4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/68c21ac4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/68c21ac4
Branch: refs/heads/ignite-gg-9908
Commit: 68c21ac4c924caac6b6e4f7dd287ba1326f4fc11
Parents: 6929a0c
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Jun 29 11:44:17 2015 -0700
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Jun 29 11:44:17 2015 -0700
----------------------------------------------------------------------
.../util/ipc/shmem/IpcSharedMemoryServerEndpoint.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/68c21ac4/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
index 102c5b1..8c3f29e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
@@ -531,7 +531,9 @@ public class IpcSharedMemoryServerEndpoint implements IpcServerEndpoint {
while (true) {
try {
- Thread.sleep(GC_FREQ);
+ // Sleep only if not cancelled.
+ if (lastRunNeeded)
+ Thread.sleep(GC_FREQ);
}
catch (InterruptedException ignored) {
// No-op.
@@ -559,8 +561,12 @@ public class IpcSharedMemoryServerEndpoint implements IpcServerEndpoint {
}
if (isCancelled()) {
- if (lastRunNeeded)
+ if (lastRunNeeded) {
lastRunNeeded = false;
+
+ // Clear interrupted status.
+ Thread.interrupted();
+ }
else {
Thread.currentThread().interrupt();
[08/13] incubator-ignite git commit: # suppress undeployed message if
nothing has
Posted by vo...@apache.org.
# suppress undeployed message if nothing has
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6929a0cb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6929a0cb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6929a0cb
Branch: refs/heads/ignite-gg-9908
Commit: 6929a0cbb382d4b924f127ed65b9fbbe4b232780
Parents: 1d5cfbc
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Jun 29 11:08:37 2015 -0700
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Jun 29 11:08:37 2015 -0700
----------------------------------------------------------------------
.../processors/cache/GridCacheDeploymentManager.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6929a0cb/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
index ff109ed..677377e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
@@ -255,17 +255,17 @@ public class GridCacheDeploymentManager<K, V> extends GridCacheSharedManagerAdap
cacheCtx.near().dht().context().swap().onUndeploy(ldr) :
cacheCtx.swap().onUndeploy(ldr);
- if (cacheCtx.userCache()) {
+ if (cacheCtx.userCache() && (!keys.isEmpty() || swapUndeployCnt != 0)) {
U.quietAndWarn(log, "");
U.quietAndWarn(
log,
- "Cleared all cache entries for undeployed class loader [[cacheName=" + cacheCtx.namexx() +
+ "Cleared all cache entries for undeployed class loader [cacheName=" + cacheCtx.namexx() +
", undeployCnt=" + keys.size() + ", swapUndeployCnt=" + swapUndeployCnt +
- ", clsLdr=" + ldr.getClass().getName() + ']',
- "Cleared all cache entries for undeployed class loader for cache: " + cacheCtx.namexx());
+ ", clsLdr=" + ldr.getClass().getName() + ']');
U.quietAndWarn(
log,
- " ^-- Cache auto-undeployment happens in SHARED deployment mode (to turn off, switch to CONTINUOUS mode)");
+ " ^-- Cache auto-undeployment happens in SHARED deployment mode " +
+ "(to turn off, switch to CONTINUOUS mode)");
U.quietAndWarn(log, "");
}
[12/13] incubator-ignite git commit: sprint-7 - Merge branch
ignite-1061 into ignite-sprint-7
Posted by vo...@apache.org.
sprint-7 - Merge branch ignite-1061 into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8c55f8ab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8c55f8ab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8c55f8ab
Branch: refs/heads/ignite-gg-9908
Commit: 8c55f8abe8c8e56b5f28c26482027190d5e908d7
Parents: 68c21ac b467822
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Mon Jun 29 20:34:29 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Mon Jun 29 20:34:29 2015 -0700
----------------------------------------------------------------------
.../core/src/test/config/spark/spark-config.xml | 46 ++++++++++++++++++
.../org/apache/ignite/spark/IgniteContext.scala | 50 ++++++++++++++++++--
.../org/apache/ignite/spark/IgniteRddSpec.scala | 18 +++++++
3 files changed, 110 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
[03/13] incubator-ignite git commit: # ignite-gg-10453 removed test
(test is invalid after fix)
Posted by vo...@apache.org.
# ignite-gg-10453 removed test (test is invalid after fix)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d51db291
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d51db291
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d51db291
Branch: refs/heads/ignite-gg-9908
Commit: d51db291037866b03ac828430cfdcc914c2f79ed
Parents: d86882c
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 29 09:21:05 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 29 09:21:05 2015 +0300
----------------------------------------------------------------------
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 -------------------
.../testsuites/IgniteCacheTestSuite3.java | 1 -
2 files changed, 120 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d51db291/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeStopSelfTest.java
deleted file mode 100644
index c56ad1c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeStopSelfTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.*;
-import org.apache.ignite.spi.discovery.tcp.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-import org.apache.ignite.testframework.*;
-import org.apache.ignite.testframework.junits.common.*;
-
-import java.util.concurrent.*;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.*;
-import static org.apache.ignite.cache.CacheMode.*;
-
-/**
- * Test cache operations with daemon node.
- */
-public class GridCacheDaemonNodeStopSelfTest extends GridCommonAbstractTest {
- /** */
- private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
- /** Daemon flag. */
- protected boolean daemon;
-
- /** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- super.beforeTest();
-
- daemon = false;
- }
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
- IgniteConfiguration c = super.getConfiguration(gridName);
-
- c.setDaemon(daemon);
-
- TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
- disco.setIpFinder(ipFinder);
-
- c.setDiscoverySpi(disco);
-
- c.setConnectorConfiguration(null);
-
- CacheConfiguration cc = defaultCacheConfiguration();
-
- cc.setCacheMode(LOCAL);
- cc.setAtomicityMode(ATOMIC);
-
- TransactionConfiguration cfg = new TransactionConfiguration();
-
- c.setTransactionConfiguration(cfg);
-
- c.setCacheConfiguration(cc);
-
- return c;
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testStartStop() throws Exception {
- try {
- daemon = true;
-
- final IgniteEx daemonNode = startGrid(0);
-
- final IgniteInternalFuture<Object> f = GridTestUtils.runAsync(new Callable<Object>() {
- @Override public Object call() throws Exception {
- daemonNode.context().marshallerContext().getClass(1,
- GridCacheDaemonNodeStopSelfTest.class.getClassLoader());
-
- return null;
- }
- });
-
- GridTestUtils.assertThrowsWithCause(new Callable<Object>() {
- @Override public Object call() throws Exception {
- f.get(300);
-
- return null;
- }
- }, IgniteFutureTimeoutCheckedException.class);
-
- // Stop grid.
- stopGrid(0);
-
- GridTestUtils.assertThrowsWithCause(new Callable<Object>() {
- @Override public Object call() throws Exception {
- f.get(5, TimeUnit.SECONDS);
-
- return null;
- }
- }, IllegalStateException.class);
- }
- finally {
- stopAllGrids();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d51db291/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
index b83f50f..5947d33 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
@@ -100,7 +100,6 @@ public class IgniteCacheTestSuite3 extends TestSuite {
suite.addTestSuite(GridCacheDaemonNodeLocalSelfTest.class);
suite.addTestSuite(GridCacheDaemonNodePartitionedSelfTest.class);
suite.addTestSuite(GridCacheDaemonNodeReplicatedSelfTest.class);
- suite.addTestSuite(GridCacheDaemonNodeStopSelfTest.class);
// Write-behind.
suite.addTest(IgniteCacheWriteBehindTestSuite.suite());