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/07/16 08:32:32 UTC
[1/7] incubator-ignite git commit: ignite-1085: reimplemented
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-gg-9615 cf2ff2d4b -> 43d7c8cc1
ignite-1085: reimplemented
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/24aae82f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/24aae82f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/24aae82f
Branch: refs/heads/ignite-gg-9615
Commit: 24aae82fabfebcbeb13516c3f3361ac5d726d20f
Parents: 7147f3d
Author: Denis Magda <dm...@gridgain.com>
Authored: Wed Jul 15 13:53:53 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Wed Jul 15 13:53:53 2015 +0300
----------------------------------------------------------------------
.../managers/discovery/GridDiscoveryManager.java | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/24aae82f/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 eae07ed..1bac4d0 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
@@ -376,6 +376,8 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
});
}
+ final CountDownLatch startLatch = new CountDownLatch(1);
+
spi.setListener(new DiscoverySpiListener() {
@Override public void onDiscovery(
int type,
@@ -464,6 +466,13 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
// If this is a local join event, just save it and do not notify listeners.
if (type == EVT_NODE_JOINED && node.id().equals(locNode.id())) {
+ updateTopologyVersionIfGreater(new AffinityTopologyVersion(locNode.order()),
+ new DiscoCache(localNode(), getSpi().getRemoteNodes()));
+
+ assert startLatch.getCount() == 1;
+
+ startLatch.countDown();
+
DiscoveryEvent discoEvt = new DiscoveryEvent();
discoEvt.node(ctx.discovery().localNode());
@@ -527,6 +536,13 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
startSpi();
+ try {
+ U.await(startLatch);
+ }
+ catch (IgniteInterruptedException e) {
+ throw new IgniteCheckedException("Failed to start discovery manager (thread has been interrupted).", e);
+ }
+
// Start segment check worker only if frequency is greater than 0.
if (hasRslvrs && segChkFreq > 0) {
segChkWrk = new SegmentCheckWorker();
@@ -538,9 +554,6 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
locNode = spi.getLocalNode();
- updateTopologyVersionIfGreater(new AffinityTopologyVersion(locNode.order()), new DiscoCache(localNode(),
- getSpi().getRemoteNodes()));
-
checkAttributes(discoCache().remoteNodes());
// Start discovery worker.
[6/7] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-1085'
Posted by vo...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-1085'
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/77da7288
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/77da7288
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/77da7288
Branch: refs/heads/ignite-gg-9615
Commit: 77da7288f61868cf344fde68ced65cfe747d765b
Parents: cd3a9b6 d11fc9b
Author: Denis Magda <dm...@gridgain.com>
Authored: Thu Jul 16 09:05:06 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Thu Jul 16 09:05:06 2015 +0300
----------------------------------------------------------------------
.../discovery/GridDiscoveryManager.java | 35 ++++++++++++--------
1 file changed, 22 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
[3/7] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/master' into ignite-1085
Posted by vo...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-1085
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d11fc9b0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d11fc9b0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d11fc9b0
Branch: refs/heads/ignite-gg-9615
Commit: d11fc9b0811f33e8d1e3f1d2eeabac0504952833
Parents: f0ace1f a6d33b1
Author: Denis Magda <dm...@gridgain.com>
Authored: Wed Jul 15 14:18:16 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Wed Jul 15 14:18:16 2015 +0300
----------------------------------------------------------------------
.../IgniteCacheAtomicReplicatedNodeRestartSelfTest.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
[4/7] incubator-ignite git commit: Minor fixes in Spring Caching
Posted by vo...@apache.org.
Minor fixes in Spring Caching
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d38a70d2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d38a70d2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d38a70d2
Branch: refs/heads/ignite-gg-9615
Commit: d38a70d2c12c640624c70bd0cb5634bb65b6d041
Parents: de7e06f
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Wed Jul 15 20:04:45 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Wed Jul 15 20:04:45 2015 -0700
----------------------------------------------------------------------
.../apache/ignite/cache/spring/SpringCache.java | 2 +-
.../ignite/cache/spring/SpringCacheManager.java | 22 +++++++++++---------
2 files changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d38a70d2/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCache.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCache.java b/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCache.java
index 7651fbe..08aa38b 100644
--- a/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCache.java
+++ b/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCache.java
@@ -48,7 +48,7 @@ class SpringCache implements Cache {
}
/** {@inheritDoc} */
- @Override public Cache.ValueWrapper get(Object key) {
+ @Override public ValueWrapper get(Object key) {
Object val = cache.get(key);
return val != null ? new SimpleValueWrapper(val) : null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d38a70d2/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java b/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java
index afadaee..260026e 100644
--- a/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java
+++ b/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java
@@ -41,15 +41,17 @@ import java.util.concurrent.*;
* you will need to do the following:
* <ul>
* <li>
- * Start a Ignite node with configured cache in the same JVM
- * where you application is running.
+ * Start an Ignite node with proper configuration in embedded mode
+ * (i.e., in the same JVM where the application is running). It can
+ * already have predefined caches, but it's not required - caches
+ * will be created automatically on first access if needed.
* </li>
* <li>
- * Configure {@code GridSpringCacheManager} as a cache provider
- * in Spring application context.
+ * Configure {@code SpringCacheManager} as a cache provider
+ * in the Spring application context.
* </li>
* </ul>
- * {@code GridSpringCacheManager} can start a node itself on its startup
+ * {@code SpringCacheManager} can start a node itself on its startup
* based on provided Ignite configuration. You can provide path to a
* Spring configuration XML file, like below (path can be absolute or
* relative to {@code IGNITE_HOME}):
@@ -61,9 +63,9 @@ import java.util.concurrent.*;
* http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
* http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">
* <-- Provide configuration file path. -->
- * <bean id="cacheManager" class="org.apache.ignite.cache.spring.GridSpringCacheManager">
+ * <bean id="cacheManager" class="org.apache.ignite.cache.spring.SpringCacheManager">
* <property name="configurationPath" value="examples/config/spring-cache.xml"/>
- * </bean>
+ * </bean>
*
* <-- Use annotation-driven caching configuration. -->
* <cache:annotation-driven/>
@@ -78,7 +80,7 @@ import java.util.concurrent.*;
* http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
* http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">
* <-- Provide configuration bean. -->
- * <bean id="cacheManager" class="org.apache.ignite.cache.spring.GridSpringCacheManager">
+ * <bean id="cacheManager" class="org.apache.ignite.cache.spring.SpringCacheManager">
* <property name="configuration">
* <bean id="gridCfg" class="org.apache.ignite.configuration.IgniteConfiguration">
* ...
@@ -104,7 +106,7 @@ import java.util.concurrent.*;
* http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
* http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">
* <-- Provide Grid name. -->
- * <bean id="cacheManager" class="org.apache.ignite.cache.spring.GridSpringCacheManager">
+ * <bean id="cacheManager" class="org.apache.ignite.cache.spring.SpringCacheManager">
* <property name="gridName" value="myGrid"/>
* </bean>
*
@@ -247,7 +249,7 @@ public class SpringCacheManager implements CacheManager, InitializingBean {
if (cfgPath != null && cfg != null) {
throw new IllegalArgumentException("Both 'configurationPath' and 'configuration' are " +
"provided. Set only one of these properties if you need to start a Ignite node inside of " +
- "GridSpringCacheManager. If you already have a node running, omit both of them and set" +
+ "SpringCacheManager. If you already have a node running, omit both of them and set" +
"'gridName' property.");
}
[2/7] incubator-ignite git commit: ignite-1085: reimplemented
Posted by vo...@apache.org.
ignite-1085: reimplemented
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f0ace1f9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f0ace1f9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f0ace1f9
Branch: refs/heads/ignite-gg-9615
Commit: f0ace1f997b3e7b7a0692870aba4fd80302f9813
Parents: 24aae82
Author: Denis Magda <dm...@gridgain.com>
Authored: Wed Jul 15 14:03:50 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Wed Jul 15 14:03:50 2015 +0300
----------------------------------------------------------------------
.../discovery/GridDiscoveryManager.java | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f0ace1f9/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 1bac4d0..b35628c 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
@@ -193,6 +193,9 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
super(ctx, ctx.config().getDiscoverySpi());
}
+ /** */
+ private final CountDownLatch startLatch = new CountDownLatch(1);
+
/**
* @return Memory usage of non-heap memory.
*/
@@ -376,8 +379,6 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
});
}
- final CountDownLatch startLatch = new CountDownLatch(1);
-
spi.setListener(new DiscoverySpiListener() {
@Override public void onDiscovery(
int type,
@@ -1052,6 +1053,8 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
/** {@inheritDoc} */
@Override public void onKernalStop0(boolean cancel) {
+ startLatch.countDown();
+
// Stop segment check worker.
if (segChkWrk != null) {
segChkWrk.cancel();
@@ -1224,16 +1227,9 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
* @return Discovery collection cache.
*/
public DiscoCache discoCache() {
- Snapshot cur;
-
- while ((cur = topSnap.get()) == null) {
- // Wrap the SPI collection to avoid possible floating collection.
- if (topSnap.compareAndSet(null, cur = new Snapshot(
- AffinityTopologyVersion.ZERO,
- new DiscoCache(localNode(), getSpi().getRemoteNodes())))) {
- return cur.discoCache;
- }
- }
+ Snapshot cur = topSnap.get();
+
+ assert cur != null;
return cur.discoCache;
}
[5/7] incubator-ignite git commit: Merge remote-tracking branch
'origin/master'
Posted by vo...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/cd3a9b61
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/cd3a9b61
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/cd3a9b61
Branch: refs/heads/ignite-gg-9615
Commit: cd3a9b61bbad20dc0cd2ba239de6399aa2754dc3
Parents: d38a70d bdd1762
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Wed Jul 15 20:04:53 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Wed Jul 15 20:04:53 2015 -0700
----------------------------------------------------------------------
.../internal/processors/query/GridQueryProcessor.java | 4 +++-
.../GridCacheAbstractNodeRestartSelfTest.java | 12 ++++++------
.../IgniteCacheAtomicReplicatedNodeRestartSelfTest.java | 5 +++++
3 files changed, 14 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
[7/7] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/master' into ignite-gg-9615
Posted by vo...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-gg-9615
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/43d7c8cc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/43d7c8cc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/43d7c8cc
Branch: refs/heads/ignite-gg-9615
Commit: 43d7c8cc114b2565a4e5d77e31b92ccb39791468
Parents: cf2ff2d 77da728
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Thu Jul 16 09:32:22 2015 +0300
Committer: Pavel Tupitsyn <pt...@gridgain.com>
Committed: Thu Jul 16 09:32:22 2015 +0300
----------------------------------------------------------------------
.../discovery/GridDiscoveryManager.java | 35 ++++++++++++--------
.../apache/ignite/cache/spring/SpringCache.java | 2 +-
.../ignite/cache/spring/SpringCacheManager.java | 22 ++++++------
3 files changed, 35 insertions(+), 24 deletions(-)
----------------------------------------------------------------------