You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by iv...@apache.org on 2015/07/03 16:26:13 UTC
[01/41] incubator-ignite git commit: # ignite-gg-10416 Fixed spring
exclude properties.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-964-1 27bfca241 -> 3d39744e3
# ignite-gg-10416 Fixed spring exclude properties.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/178c4f85
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/178c4f85
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/178c4f85
Branch: refs/heads/ignite-964-1
Commit: 178c4f85dca8d050754994b8baaaa48f011e84bc
Parents: 4375529
Author: Andrey <an...@gridgain.com>
Authored: Fri Jun 12 05:48:12 2015 +0300
Committer: Andrey <an...@gridgain.com>
Committed: Fri Jun 12 05:48:12 2015 +0300
----------------------------------------------------------------------
.../util/spring/IgniteSpringHelperImpl.java | 58 +++++++++++++-------
.../scala/org/apache/ignite/visor/visor.scala | 3 +-
2 files changed, 39 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/178c4f85/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
index 2c7c7e1..4cc080a 100644
--- a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
+++ b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
@@ -405,32 +405,48 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
GenericApplicationContext springCtx = new GenericApplicationContext();
BeanFactoryPostProcessor postProc = new BeanFactoryPostProcessor() {
- @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
- throws BeansException {
- for (String beanName : beanFactory.getBeanDefinitionNames()) {
- BeanDefinition def = beanFactory.getBeanDefinition(beanName);
-
- if (def.getBeanClassName() != null) {
- try {
- Class.forName(def.getBeanClassName());
- }
- catch (ClassNotFoundException ignored) {
- ((BeanDefinitionRegistry) beanFactory).removeBeanDefinition(beanName);
-
- continue;
+ /**
+ * @param beanFactory The bean factory used by the application context.
+ * @param beanName Bean name.
+ * @param def Registered BeanDefinition.
+ * @throws BeansException in case of errors.
+ */
+ private void processBeanDefinition(ConfigurableListableBeanFactory beanFactory, String beanName,
+ BeanDefinition def) throws BeansException {
+ if (def.getBeanClassName() != null) {
+ try {
+ Class.forName(def.getBeanClassName());
+
+ MutablePropertyValues vals = def.getPropertyValues();
+
+ for (PropertyValue val : new ArrayList<>(vals.getPropertyValueList())) {
+ for (String excludedProp : excludedProps) {
+ if (val.getName().equals(excludedProp)) {
+ vals.removePropertyValue(val);
+
+ return;
+ }
+ }
+
+ if (val.getValue() instanceof Iterable)
+ for (Object beanDef : (Iterable)val.getValue())
+ if (beanDef instanceof BeanDefinitionHolder)
+ processBeanDefinition(beanFactory, beanName,
+ ((BeanDefinitionHolder)beanDef).getBeanDefinition());
}
}
-
- MutablePropertyValues vals = def.getPropertyValues();
-
- for (PropertyValue val : new ArrayList<>(vals.getPropertyValueList())) {
- for (String excludedProp : excludedProps) {
- if (val.getName().equals(excludedProp))
- vals.removePropertyValue(val);
- }
+ catch (ClassNotFoundException ignored) {
+ ((BeanDefinitionRegistry) beanFactory).removeBeanDefinition(beanName);
}
}
}
+
+ /** {@inheritDoc} */
+ @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
+ throws BeansException {
+ for (String beanName : beanFactory.getBeanDefinitionNames())
+ processBeanDefinition(beanFactory, beanName, beanFactory.getBeanDefinition(beanName));
+ }
};
springCtx.addBeanFactoryPostProcessor(postProc);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/178c4f85/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
index c943fc5..5f63f23 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
@@ -1573,7 +1573,8 @@ object visor extends VisorTag {
try
// Cache, IGFS, streamer and DR configurations should be excluded from daemon node config.
spring.loadConfigurations(url, "cacheConfiguration", "fileSystemConfiguration",
- "streamerConfiguration", "drSenderConfiguration", "drReceiverConfiguration").get1()
+ "streamerConfiguration", "drSenderConfiguration", "drReceiverConfiguration",
+ "interopConfiguration", "indexingSpi").get1()
finally {
if (log4jTup != null)
U.removeLog4jNoOpLogger(log4jTup)
[22/41] incubator-ignite git commit: IGNITE-621 - Fixed compilation.
Posted by iv...@apache.org.
IGNITE-621 - Fixed compilation.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d8c1cc2f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d8c1cc2f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d8c1cc2f
Branch: refs/heads/ignite-964-1
Commit: d8c1cc2f0160e80226b5e3f02130fc91843633d3
Parents: 45b0f09
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Thu Jun 25 17:19:17 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Thu Jun 25 17:19:17 2015 -0700
----------------------------------------------------------------------
.../atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java | 2 --
1 file changed, 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d8c1cc2f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
index b255558..8e69853 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
@@ -237,8 +237,6 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
System.err.println("FINISHED PUTS");
- GridCacheMapEntry.debug = true;
-
// Start put threads.
IgniteInternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
[23/41] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-621
Posted by iv...@apache.org.
Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-621
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d24658d5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d24658d5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d24658d5
Branch: refs/heads/ignite-964-1
Commit: d24658d5a149da56f37a040b33ef12f3e9a3ad04
Parents: d8c1cc2 2ee616d
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Fri Jun 26 14:25:25 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Fri Jun 26 14:25:25 2015 -0700
----------------------------------------------------------------------
.../org/apache/ignite/cluster/ClusterGroup.java | 9 +-
.../internal/cluster/ClusterGroupAdapter.java | 12 +-
.../cluster/IgniteClusterAsyncImpl.java | 7 +-
.../GridCachePartitionExchangeManager.java | 6 +-
.../processors/rest/GridRestProcessor.java | 4 +-
.../handlers/task/GridTaskCommandHandler.java | 12 +-
.../processors/task/GridTaskWorker.java | 4 +-
.../visor/query/VisorQueryCleanupTask.java | 14 +
.../util/VisorClusterGroupEmptyException.java | 33 +++
.../ignite/spi/discovery/tcp/ClientImpl.java | 151 ++++++-----
.../ignite/spi/discovery/tcp/ServerImpl.java | 103 +++++--
.../spi/discovery/tcp/TcpDiscoverySpi.java | 3 +-
.../internal/ClusterForHostsSelfTest.java | 113 --------
.../internal/ClusterGroupHostsSelfTest.java | 141 ++++++++++
.../internal/GridDiscoveryEventSelfTest.java | 12 +-
...achePartitionedMultiNodeFullApiSelfTest.java | 4 +-
.../tcp/TcpClientDiscoverySpiSelfTest.java | 265 ++++++++++++++++++-
.../ignite/testsuites/IgniteBasicTestSuite.java | 2 +-
18 files changed, 684 insertions(+), 211 deletions(-)
----------------------------------------------------------------------
[20/41] incubator-ignite git commit: IGNITE-621 - Fixing remap logic.
Posted by iv...@apache.org.
IGNITE-621 - Fixing remap logic.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c2c90b52
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c2c90b52
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c2c90b52
Branch: refs/heads/ignite-964-1
Commit: c2c90b52972bec53919d97ec07d2aeab4d0d55e8
Parents: a9d0662
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Thu Jun 25 17:06:31 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Thu Jun 25 17:06:31 2015 -0700
----------------------------------------------------------------------
.../apache/ignite/IgniteSystemProperties.java | 3 +
.../processors/cache/GridCacheAdapter.java | 2 +-
.../processors/cache/GridCacheAtomicFuture.java | 12 ++-
.../processors/cache/GridCacheMvccManager.java | 8 +-
.../dht/atomic/GridDhtAtomicUpdateFuture.java | 12 ++-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 88 ++++++++++++++++++--
.../communication/tcp/TcpCommunicationSpi.java | 2 +-
...eAtomicInvalidPartitionHandlingSelfTest.java | 7 +-
8 files changed, 110 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c2c90b52/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
index 542fa30..40fc873 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -343,6 +343,9 @@ public final class IgniteSystemProperties {
/** Maximum size for affinity assignment history. */
public static final String IGNITE_AFFINITY_HISTORY_SIZE = "IGNITE_AFFINITY_HISTORY_SIZE";
+ /** Number of cache operation retries in case of topology exceptions. */
+ public static final String IGNITE_CACHE_RETRIES_COUNT = "IGNITE_CACHE_RETRIES_COUNT";
+
/**
* Enforces singleton.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c2c90b52/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 f993527..e138520 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
@@ -79,7 +79,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
public static final int CLEAR_ALL_SPLIT_THRESHOLD = 10000;
/** Maximum number of retries when topology changes. */
- public static final int MAX_RETRIES = 100;
+ public static final int MAX_RETRIES = IgniteSystemProperties.getInteger(IGNITE_CACHE_RETRIES_COUNT, 100);
/** Deserialization stash. */
private static final ThreadLocal<IgniteBiTuple<String, String>> stash = new ThreadLocal<IgniteBiTuple<String,
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c2c90b52/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
index 35d3ec5..8724d3a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
@@ -17,6 +17,7 @@
package org.apache.ignite.internal.processors.cache;
+import org.apache.ignite.internal.*;
import org.apache.ignite.internal.processors.affinity.*;
import java.util.*;
@@ -26,14 +27,17 @@ import java.util.*;
*/
public interface GridCacheAtomicFuture<R> extends GridCacheFuture<R> {
/**
- * @return {@code True} if partition exchange should wait for this future to complete.
+ * @return Future topology version.
*/
- public boolean waitForPartitionExchange();
+ public AffinityTopologyVersion topologyVersion();
/**
- * @return Future topology version.
+ * Gets future that will be completed when it is safe when update is finished on the given version of topology.
+ *
+ * @param topVer Topology version to finish.
+ * @return Future or {@code null} if no need to wait.
*/
- public AffinityTopologyVersion topologyVersion();
+ public IgniteInternalFuture<Void> completeFuture(AffinityTopologyVersion topVer);
/**
* @return Future keys.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c2c90b52/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
index c528e08..f24cf01 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
@@ -338,7 +338,7 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
public void addAtomicFuture(GridCacheVersion futVer, GridCacheAtomicFuture<?> fut) {
IgniteInternalFuture<?> old = atomicFuts.put(futVer, fut);
- assert old == null;
+ assert old == null : "Old future is not null [futVer=" + futVer + ", fut=" + fut + ", old=" + old + ']';
}
/**
@@ -1002,8 +1002,10 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
res.ignoreChildFailures(ClusterTopologyCheckedException.class, CachePartialUpdateCheckedException.class);
for (GridCacheAtomicFuture<?> fut : atomicFuts.values()) {
- if (fut.waitForPartitionExchange() && fut.topologyVersion().compareTo(topVer) < 0)
- res.add((IgniteInternalFuture<Object>)fut);
+ IgniteInternalFuture<Void> complete = fut.completeFuture(topVer);
+
+ if (complete != null)
+ res.add((IgniteInternalFuture)complete);
}
res.markInitialized();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c2c90b52/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
index ff8454e..37b57e6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.distributed.dht.atomic;
import org.apache.ignite.*;
import org.apache.ignite.cache.*;
import org.apache.ignite.cluster.*;
+import org.apache.ignite.internal.*;
import org.apache.ignite.internal.cluster.*;
import org.apache.ignite.internal.processors.affinity.*;
import org.apache.ignite.internal.processors.cache.*;
@@ -170,13 +171,16 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter<Void>
}
/** {@inheritDoc} */
- @Override public boolean waitForPartitionExchange() {
- return waitForExchange;
+ @Override public AffinityTopologyVersion topologyVersion() {
+ return updateReq.topologyVersion();
}
/** {@inheritDoc} */
- @Override public AffinityTopologyVersion topologyVersion() {
- return updateReq.topologyVersion();
+ @Override public IgniteInternalFuture<Void> completeFuture(AffinityTopologyVersion topVer) {
+ if (waitForExchange && topologyVersion().compareTo(topVer) < 0)
+ return this;
+
+ return null;
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c2c90b52/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index 536eb40..ea9b335 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -105,7 +105,10 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
private final ExpiryPolicy expiryPlc;
/** Future map topology version. */
- private AffinityTopologyVersion topVer = AffinityTopologyVersion.ZERO;
+ private volatile AffinityTopologyVersion topVer = AffinityTopologyVersion.ZERO;
+
+ /** Completion future for a particular topology version. */
+ private GridFutureAdapter<Void> topCompleteFut;
/** Optional filter. */
private final CacheEntryPredicate[] filter;
@@ -246,8 +249,10 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
return F.view(F.viewReadOnly(mappings.keySet(), U.id2Node(cctx.kernalContext())), F.notNull());
}
- /** {@inheritDoc} */
- @Override public boolean waitForPartitionExchange() {
+ /**
+ * @return {@code True} if this future should block partition map exchange.
+ */
+ private boolean waitForPartitionExchange() {
// Wait fast-map near atomic update futures in CLOCK mode.
return fastMap;
}
@@ -323,13 +328,36 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
else {
topLocked = true;
- // Cannot remap.
- remapCnt.set(1);
+ synchronized (this) {
+ this.topVer = topVer;
+
+ // Cannot remap.
+ remapCnt.set(1);
+ }
map0(topVer, null, false, null);
}
}
+ /** {@inheritDoc} */
+ @Override public IgniteInternalFuture<Void> completeFuture(AffinityTopologyVersion topVer) {
+ if (waitForPartitionExchange() && topologyVersion().compareTo(topVer) < 0) {
+ synchronized (this) {
+ if (this.topVer == AffinityTopologyVersion.ZERO)
+ return null;
+
+ if (this.topVer.compareTo(topVer) < 0) {
+ if (topCompleteFut == null)
+ topCompleteFut = new GridFutureAdapter<>();
+
+ return topCompleteFut;
+ }
+ }
+ }
+
+ return null;
+ }
+
/**
* @param failed Keys to remap.
*/
@@ -339,14 +367,20 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
Collection<Object> remapKeys = new ArrayList<>(failed.size());
Collection<Object> remapVals = vals != null ? new ArrayList<>(failed.size()) : null;
+ Collection<GridCacheDrInfo> remapConflictPutVals = conflictPutVals != null ? new ArrayList<GridCacheDrInfo>(failed.size()) : null;
+ Collection<GridCacheVersion> remapConflictRmvVals = conflictRmvVals != null ? new ArrayList<GridCacheVersion>(failed.size()) : null;
Iterator<?> keyIt = keys.iterator();
Iterator<?> valsIt = vals != null ? vals.iterator() : null;
+ Iterator<GridCacheDrInfo> conflictPutValsIt = conflictPutVals != null ? conflictPutVals.iterator() : null;
+ Iterator<GridCacheVersion> conflictRmvValsIt = conflictRmvVals != null ? conflictRmvVals.iterator() : null;
for (Object key : failed) {
while (keyIt.hasNext()) {
Object nextKey = keyIt.next();
Object nextVal = valsIt != null ? valsIt.next() : null;
+ GridCacheDrInfo nextConflictPutVal = conflictPutValsIt != null ? conflictPutValsIt.next() : null;
+ GridCacheVersion nextConflictRmvVal = conflictRmvValsIt != null ? conflictRmvValsIt.next() : null;
if (F.eq(key, nextKey)) {
remapKeys.add(nextKey);
@@ -354,6 +388,12 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
if (remapVals != null)
remapVals.add(nextVal);
+ if (remapConflictPutVals != null)
+ remapConflictPutVals.add(nextConflictPutVal);
+
+ if (remapConflictRmvVals != null)
+ remapConflictRmvVals.add(nextConflictRmvVal);
+
break;
}
}
@@ -361,13 +401,29 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
keys = remapKeys;
vals = remapVals;
+ conflictPutVals = remapConflictPutVals;
+ conflictRmvVals = remapConflictRmvVals;
- mappings = new ConcurrentHashMap8<>(keys.size(), 1.0f);
single = null;
futVer = null;
err = null;
opRes = null;
- topVer = AffinityTopologyVersion.ZERO;
+
+ GridFutureAdapter<Void> fut0;
+
+ synchronized (this) {
+ mappings = new ConcurrentHashMap8<>(keys.size(), 1.0f);
+
+ topVer = AffinityTopologyVersion.ZERO;
+
+ fut0 = topCompleteFut;
+
+ topCompleteFut = null;
+ }
+
+ if (fut0 != null)
+ fut0.onDone();
+
singleNodeId = null;
singleReq = null;
fastMapRemap = false;
@@ -405,6 +461,15 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
if (futVer != null)
cctx.mvcc().removeAtomicFuture(version());
+ GridFutureAdapter<Void> fut0;
+
+ synchronized (this) {
+ fut0 = topCompleteFut;
+ }
+
+ if (fut0 != null)
+ fut0.onDone();
+
return true;
}
@@ -544,6 +609,10 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
return;
}
+
+ synchronized (this) {
+ this.topVer = topVer;
+ }
}
finally {
cache.topology().readUnlock();
@@ -559,7 +628,8 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
boolean remap = false;
synchronized (this) {
- if ((syncMode == FULL_ASYNC && cctx.config().getAtomicWriteOrderMode() == PRIMARY) || mappings.isEmpty()) {
+ if (topVer != AffinityTopologyVersion.ZERO &&
+ ((syncMode == FULL_ASYNC && cctx.config().getAtomicWriteOrderMode() == PRIMARY) || mappings.isEmpty())) {
CachePartialUpdateCheckedException err0 = err;
if (err0 != null)
@@ -1040,7 +1110,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
if (err0 == null)
err0 = this.err = new CachePartialUpdateCheckedException("Failed to update keys (retry update if possible).");
- List<Object> keys = new ArrayList<>(failedKeys.size());
+ Collection<Object> keys = new ArrayList<>(failedKeys.size());
for (KeyCacheObject key : failedKeys)
keys.add(key.value(cctx.cacheObjectContext(), false));
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c2c90b52/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index addf243d..4ca2995 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -210,7 +210,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
public static final int DFLT_ACK_SND_THRESHOLD = 16;
/** Default socket write timeout. */
- public static final long DFLT_SOCK_WRITE_TIMEOUT = 200;
+ public static final long DFLT_SOCK_WRITE_TIMEOUT = 2000;
/** No-op runnable. */
private static final IgniteRunnable NOOP = new IgniteRunnable() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c2c90b52/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
index 054a110..b255558 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
@@ -41,6 +41,7 @@ import org.jsr166.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
+import java.util.concurrent.locks.*;
import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.*;
import static org.apache.ignite.cache.CacheMode.*;
@@ -236,6 +237,8 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
System.err.println("FINISHED PUTS");
+ GridCacheMapEntry.debug = true;
+
// Start put threads.
IgniteInternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
@@ -340,12 +343,12 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
}
catch (AssertionError e) {
if (r == 9) {
- System.err.println("Failed to verify cache contents: " + e.getMessage());
+ info("Failed to verify cache contents: " + e.getMessage());
throw e;
}
- System.err.println("Failed to verify cache contents, will retry: " + e.getMessage());
+ info("Failed to verify cache contents, will retry: " + e.getMessage());
// Give some time to finish async updates.
U.sleep(1000);
[13/41] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-2
Posted by iv...@apache.org.
Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-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/b7bb2514
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b7bb2514
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b7bb2514
Branch: refs/heads/ignite-964-1
Commit: b7bb251493e314ab05227052eab7a1eda9402ee5
Parents: 4b5e89f 2bb6e0f
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue Jun 23 15:29:32 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue Jun 23 15:29:32 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/hadoop/HadoopJobInfo.java | 4 +-
.../hadoop/counter/HadoopCounterWriter.java | 5 +-
.../processors/task/GridTaskProcessor.java | 23 +-
.../core/src/main/resources/ignite.properties | 2 +-
.../GridTaskFailoverAffinityRunTest.java | 170 +++++++++++++
...ridCachePartitionNotLoadedEventSelfTest.java | 82 +++++++
.../distributed/IgniteCacheManyClientsTest.java | 1 +
.../IgniteCacheTxMessageRecoveryTest.java | 5 +
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 2 +-
.../GridCacheReplicatedFailoverSelfTest.java | 5 +
.../testframework/junits/GridAbstractTest.java | 2 +-
.../ignite/testsuites/IgniteCacheTestSuite.java | 4 +-
.../testsuites/IgniteComputeGridTestSuite.java | 1 +
.../ignite/util/TestTcpCommunicationSpi.java | 21 ++
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 | 80 +-----
.../fs/IgniteHadoopFileSystemCounterWriter.java | 9 +-
.../processors/hadoop/HadoopClassLoader.java | 29 +++
.../processors/hadoop/HadoopDefaultJobInfo.java | 27 +--
.../internal/processors/hadoop/HadoopUtils.java | 237 ------------------
.../hadoop/SecondaryFileSystemProvider.java | 3 +-
.../hadoop/fs/HadoopFileSystemCacheUtils.java | 241 +++++++++++++++++++
.../hadoop/fs/HadoopFileSystemsUtils.java | 11 +
.../hadoop/fs/HadoopLazyConcurrentMap.java | 5 +
.../hadoop/jobtracker/HadoopJobTracker.java | 25 +-
.../child/HadoopChildProcessRunner.java | 3 +-
.../processors/hadoop/v2/HadoopV2Job.java | 84 ++++++-
.../hadoop/v2/HadoopV2JobResourceManager.java | 22 +-
.../hadoop/v2/HadoopV2TaskContext.java | 37 ++-
.../apache/ignite/igfs/IgfsEventsTestSuite.java | 5 +-
.../processors/hadoop/HadoopMapReduceTest.java | 2 +-
.../processors/hadoop/HadoopTasksV1Test.java | 7 +-
.../processors/hadoop/HadoopTasksV2Test.java | 7 +-
.../processors/hadoop/HadoopV2JobSelfTest.java | 6 +-
.../collections/HadoopAbstractMapTest.java | 3 +-
.../testsuites/IgniteHadoopTestSuite.java | 2 +-
.../IgniteIgfsLinuxAndMacOSTestSuite.java | 3 +-
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
...QueryOffheapEvictsMultiThreadedSelfTest.java | 5 +
.../IgniteCacheQuerySelfTestSuite.java | 2 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/mesos/pom.xml | 2 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar-2.10/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spark-2.10/pom.xml | 2 +-
modules/spark/pom.xml | 2 +-
modules/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console-2.10/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
.../IgniteWebSessionSelfTestSuite.java | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 2 +-
74 files changed, 825 insertions(+), 429 deletions(-)
----------------------------------------------------------------------
[29/41] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-2
Posted by iv...@apache.org.
Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-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/1a465a2e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1a465a2e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1a465a2e
Branch: refs/heads/ignite-964-1
Commit: 1a465a2eae96e5a008d351323d3786e1ed69d649
Parents: 234a809 af3cfdf
Author: S.Vladykin <sv...@gridgain.com>
Authored: Wed Jul 1 11:25:18 2015 -0700
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Wed Jul 1 11:25:18 2015 -0700
----------------------------------------------------------------------
modules/extdata/uri/modules/uri-dependency/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
[27/41] incubator-ignite git commit: Merge branches 'ignite-973-2'
and 'ignite-sprint-7' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-2
Posted by iv...@apache.org.
Merge branches 'ignite-973-2' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-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/712e7d5c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/712e7d5c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/712e7d5c
Branch: refs/heads/ignite-964-1
Commit: 712e7d5c070db6d3cb189343cbb585a72a7d2717
Parents: 211ad65 e91bc48
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue Jun 30 18:27:33 2015 -0700
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue Jun 30 18:27:33 2015 -0700
----------------------------------------------------------------------
.../ClientAbstractConnectivitySelfTest.java | 4 +-
.../org/apache/ignite/cluster/ClusterGroup.java | 18 +-
.../org/apache/ignite/cluster/ClusterNode.java | 2 +
.../ignite/compute/ComputeTaskSplitAdapter.java | 2 +-
.../configuration/CacheConfiguration.java | 105 +--
.../configuration/NearCacheConfiguration.java | 10 +-
.../ignite/internal/GridKernalContextImpl.java | 5 +-
.../internal/cluster/ClusterGroupAdapter.java | 50 +-
.../cluster/IgniteClusterAsyncImpl.java | 12 +-
.../discovery/GridDiscoveryManager.java | 32 +-
.../cache/GridCacheDeploymentManager.java | 10 +-
.../GridCachePartitionExchangeManager.java | 6 +-
.../processors/cache/GridCacheProcessor.java | 62 +-
.../processors/clock/GridClockServer.java | 21 +-
.../processors/plugin/CachePluginManager.java | 10 +-
.../processors/rest/GridRestProcessor.java | 4 +-
.../handlers/task/GridTaskCommandHandler.java | 12 +-
.../processors/task/GridTaskWorker.java | 4 +-
.../internal/util/GridConfigurationFinder.java | 55 +-
.../ignite/internal/util/IgniteUtils.java | 6 +-
.../shmem/IpcSharedMemoryServerEndpoint.java | 10 +-
.../apache/ignite/internal/visor/VisorJob.java | 2 +
.../internal/visor/log/VisorLogSearchTask.java | 2 +-
.../visor/node/VisorNodeDataCollectorJob.java | 4 +
.../visor/query/VisorQueryCleanupTask.java | 14 +
.../util/VisorClusterGroupEmptyException.java | 37 +
.../ignite/spi/discovery/tcp/ClientImpl.java | 151 ++--
.../ignite/spi/discovery/tcp/ServerImpl.java | 103 ++-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 3 +-
.../TcpDiscoveryMulticastIpFinder.java | 74 +-
.../core/src/test/config/spark/spark-config.xml | 46 ++
.../internal/ClusterGroupAbstractTest.java | 777 ++++++++++++++++++
.../internal/ClusterGroupHostsSelfTest.java | 141 ++++
.../ignite/internal/ClusterGroupSelfTest.java | 251 ++++++
.../internal/GridDiscoveryEventSelfTest.java | 12 +-
.../internal/GridProjectionAbstractTest.java | 784 -------------------
.../ignite/internal/GridProjectionSelfTest.java | 251 ------
.../apache/ignite/internal/GridSelfTest.java | 2 +-
.../IgniteTopologyPrintFormatSelfTest.java | 289 +++++++
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 ---
.../IgniteDaemonNodeMarshallerCacheTest.java | 192 +++++
...achePartitionedMultiNodeFullApiSelfTest.java | 4 +-
.../internal/util/IgniteUtilsSelfTest.java | 22 +
.../tcp/TcpClientDiscoverySpiSelfTest.java | 265 ++++++-
.../ignite/testsuites/IgniteBasicTestSuite.java | 7 +-
.../testsuites/IgniteCacheTestSuite3.java | 1 -
.../testsuites/IgniteKernalSelfTestSuite.java | 1 +
.../p2p/GridP2PContinuousDeploymentTask1.java | 2 +-
.../ignite/schema/model/PojoDescriptor.java | 2 +
.../apache/ignite/schema/model/PojoField.java | 1 +
.../parser/dialect/OracleMetadataDialect.java | 2 +-
.../org/apache/ignite/spark/IgniteContext.scala | 50 +-
.../org/apache/ignite/spark/IgniteRddSpec.scala | 18 +
.../commands/cache/VisorCacheCommand.scala | 7 +-
pom.xml | 12 +-
scripts/git-patch-prop.sh | 2 +-
56 files changed, 2685 insertions(+), 1405 deletions(-)
----------------------------------------------------------------------
[07/41] incubator-ignite git commit: IGNITE-621 - Added automatic
retries.
Posted by iv...@apache.org.
IGNITE-621 - Added automatic retries.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3787a9d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3787a9d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3787a9d3
Branch: refs/heads/ignite-964-1
Commit: 3787a9d3353c0c146141a79e3e87e1bbc5128031
Parents: 415264e
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Fri Jun 19 17:15:02 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Fri Jun 19 17:15:02 2015 -0700
----------------------------------------------------------------------
.../java/org/apache/ignite/IgniteCache.java | 5 +
.../processors/cache/CacheOperationContext.java | 44 +++++-
.../processors/cache/GridCacheAdapter.java | 91 +++++++------
.../processors/cache/GridCacheProxyImpl.java | 10 +-
.../processors/cache/IgniteCacheProxy.java | 36 ++++-
.../dht/atomic/GridDhtAtomicCache.java | 18 ++-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 87 ++++++++++--
.../IgniteCachePutRetryAbstractSelfTest.java | 134 +++++++++++++++++++
.../dht/IgniteCachePutRetryAtomicSelfTest.java | 34 +++++
...gniteCachePutRetryTransactionalSelfTest.java | 35 +++++
10 files changed, 422 insertions(+), 72 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3787a9d3/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
index 2b97e55..c8d6d7a 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -106,6 +106,11 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
public IgniteCache<K, V> withSkipStore();
/**
+ * @return Cache with no-retries behavior enabled.
+ */
+ public IgniteCache<K, V> withNoRetries();
+
+ /**
* Executes {@link #localLoadCache(IgniteBiPredicate, Object...)} on all cache nodes.
*
* @param p Optional predicate (may be {@code null}). If provided, will be used to
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3787a9d3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java
index 34d2bf4..343a2f0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java
@@ -36,6 +36,10 @@ public class CacheOperationContext implements Serializable {
@GridToStringInclude
private final boolean skipStore;
+ /** No retries flag. */
+ @GridToStringInclude
+ private final boolean noRetries;
+
/** Client ID which operates over this projection. */
private final UUID subjId;
@@ -56,6 +60,8 @@ public class CacheOperationContext implements Serializable {
keepPortable = false;
expiryPlc = null;
+
+ noRetries = false;
}
/**
@@ -68,7 +74,8 @@ public class CacheOperationContext implements Serializable {
boolean skipStore,
@Nullable UUID subjId,
boolean keepPortable,
- @Nullable ExpiryPolicy expiryPlc) {
+ @Nullable ExpiryPolicy expiryPlc,
+ boolean noRetries) {
this.skipStore = skipStore;
this.subjId = subjId;
@@ -76,6 +83,8 @@ public class CacheOperationContext implements Serializable {
this.keepPortable = keepPortable;
this.expiryPlc = expiryPlc;
+
+ this.noRetries = noRetries;
}
/**
@@ -95,7 +104,8 @@ public class CacheOperationContext implements Serializable {
skipStore,
subjId,
true,
- expiryPlc);
+ expiryPlc,
+ noRetries);
}
/**
@@ -118,7 +128,8 @@ public class CacheOperationContext implements Serializable {
skipStore,
subjId,
keepPortable,
- expiryPlc);
+ expiryPlc,
+ noRetries);
}
/**
@@ -139,7 +150,8 @@ public class CacheOperationContext implements Serializable {
skipStore,
subjId,
keepPortable,
- expiryPlc);
+ expiryPlc,
+ noRetries);
}
/**
@@ -160,7 +172,29 @@ public class CacheOperationContext implements Serializable {
skipStore,
subjId,
true,
- plc);
+ plc,
+ noRetries);
+ }
+
+ /**
+ * @param noRetries No retries flag.
+ * @return Operation context.
+ */
+ public CacheOperationContext setNoRetries(boolean noRetries) {
+ return new CacheOperationContext(
+ skipStore,
+ subjId,
+ keepPortable,
+ expiryPlc,
+ noRetries
+ );
+ }
+
+ /**
+ * @return No retries flag.
+ */
+ public boolean noRetries() {
+ return noRetries;
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3787a9d3/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 7335d72..f993527 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
@@ -78,6 +78,9 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
/** clearLocally() split threshold. */
public static final int CLEAR_ALL_SPLIT_THRESHOLD = 10000;
+ /** Maximum number of retries when topology changes. */
+ public static final int MAX_RETRIES = 100;
+
/** Deserialization stash. */
private static final ThreadLocal<IgniteBiTuple<String, String>> stash = new ThreadLocal<IgniteBiTuple<String,
String>>() {
@@ -363,7 +366,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
/** {@inheritDoc} */
@Override public GridCacheProxyImpl<K, V> forSubjectId(UUID subjId) {
- CacheOperationContext opCtx = new CacheOperationContext(false, subjId, false, null);
+ CacheOperationContext opCtx = new CacheOperationContext(false, subjId, false, null, false);
return new GridCacheProxyImpl<>(ctx, this, opCtx);
}
@@ -375,14 +378,14 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
/** {@inheritDoc} */
@Override public GridCacheProxyImpl<K, V> setSkipStore(boolean skipStore) {
- CacheOperationContext opCtx = new CacheOperationContext(true, null, false, null);
+ CacheOperationContext opCtx = new CacheOperationContext(true, null, false, null, false);
return new GridCacheProxyImpl<>(ctx, this, opCtx);
}
/** {@inheritDoc} */
@Override public <K1, V1> GridCacheProxyImpl<K1, V1> keepPortable() {
- CacheOperationContext opCtx = new CacheOperationContext(false, null, true, null);
+ CacheOperationContext opCtx = new CacheOperationContext(false, null, true, null, false);
return new GridCacheProxyImpl<>((GridCacheContext<K1, V1>)ctx, (GridCacheAdapter<K1, V1>)this, opCtx);
}
@@ -399,7 +402,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
assert !CU.isAtomicsCache(ctx.name());
assert !CU.isMarshallerCache(ctx.name());
- CacheOperationContext opCtx = new CacheOperationContext(false, null, false, plc);
+ CacheOperationContext opCtx = new CacheOperationContext(false, null, false, plc, false);
return new GridCacheProxyImpl<>(ctx, this, opCtx);
}
@@ -2301,7 +2304,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
* @return Putx operation future.
*/
public IgniteInternalFuture<Boolean> putAsync0(final K key, final V val,
- @Nullable final CacheEntryPredicate... filter) {
+ @Nullable final CacheEntryPredicate... filter) {
A.notNull(key, "key", val, "val");
if (keyCheck)
@@ -3930,51 +3933,63 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
if (tx == null || tx.implicit()) {
TransactionConfiguration tCfg = ctx.gridConfig().getTransactionConfiguration();
- tx = ctx.tm().newTx(
- true,
- op.single(),
- ctx.systemTx() ? ctx : null,
- OPTIMISTIC,
- READ_COMMITTED,
- tCfg.getDefaultTxTimeout(),
- !ctx.skipStore(),
- 0
- );
+ CacheOperationContext opCtx = ctx.operationContextPerCall();
- assert tx != null;
+ int retries = opCtx != null && opCtx.noRetries() ? 1 : MAX_RETRIES;
- try {
- T t = op.op(tx);
+ for (int i = 0; i < retries; i++) {
+ tx = ctx.tm().newTx(
+ true,
+ op.single(),
+ ctx.systemTx() ? ctx : null,
+ OPTIMISTIC,
+ READ_COMMITTED,
+ tCfg.getDefaultTxTimeout(),
+ !ctx.skipStore(),
+ 0
+ );
- assert tx.done() : "Transaction is not done: " + tx;
+ assert tx != null;
- return t;
- }
- catch (IgniteInterruptedCheckedException | IgniteTxHeuristicCheckedException |
- IgniteTxRollbackCheckedException e) {
- throw e;
- }
- catch (IgniteCheckedException e) {
try {
- tx.rollback();
+ T t = op.op(tx);
- e = new IgniteTxRollbackCheckedException("Transaction has been rolled back: " +
- tx.xid(), e);
+ assert tx.done() : "Transaction is not done: " + tx;
+
+ return t;
+ }
+ catch (IgniteInterruptedCheckedException | IgniteTxHeuristicCheckedException |
+ IgniteTxRollbackCheckedException e) {
+ throw e;
}
- catch (IgniteCheckedException | AssertionError | RuntimeException e1) {
- U.error(log, "Failed to rollback transaction (cache may contain stale locks): " + tx, e1);
+ catch (IgniteCheckedException e) {
+ try {
+ tx.rollback();
+
+ e = new IgniteTxRollbackCheckedException("Transaction has been rolled back: " +
+ tx.xid(), e);
+ }
+ catch (IgniteCheckedException | AssertionError | RuntimeException e1) {
+ U.error(log, "Failed to rollback transaction (cache may contain stale locks): " + tx, e1);
+
+ U.addLastCause(e, e1, log);
+ }
+
+ if (X.hasCause(e, ClusterTopologyCheckedException.class) && i != retries - 1)
+ continue;
- U.addLastCause(e, e1, log);
+ throw e;
}
+ finally {
+ ctx.tm().resetContext();
- throw e;
+ if (ctx.isNear())
+ ctx.near().dht().context().tm().resetContext();
+ }
}
- finally {
- ctx.tm().resetContext();
- if (ctx.isNear())
- ctx.near().dht().context().tm().resetContext();
- }
+ // Should not happen.
+ throw new IgniteCheckedException("Failed to perform cache operation (maximum number of retries exceeded).");
}
else
return op.op(tx);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3787a9d3/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 63ba242..cec8c53 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
@@ -118,7 +118,7 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte
CacheOperationContext prev = gate.enter(opCtx);
try {
- return opCtx != null ? opCtx.skipStore() : false;
+ return opCtx != null && opCtx.skipStore();
}
finally {
gate.leave(prev);
@@ -198,7 +198,7 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte
/** {@inheritDoc} */
@Override public GridCacheProxyImpl<K, V> forSubjectId(UUID subjId) {
return new GridCacheProxyImpl<>(ctx, delegate,
- opCtx != null ? opCtx.forSubjectId(subjId) : new CacheOperationContext(false, subjId, false, null));
+ opCtx != null ? opCtx.forSubjectId(subjId) : new CacheOperationContext(false, subjId, false, null, false));
}
/** {@inheritDoc} */
@@ -210,7 +210,7 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte
return this;
return new GridCacheProxyImpl<>(ctx, delegate,
- opCtx != null ? opCtx.setSkipStore(skipStore) : new CacheOperationContext(true, null, false, null));
+ opCtx != null ? opCtx.setSkipStore(skipStore) : new CacheOperationContext(true, null, false, null, false));
}
finally {
gate.leave(prev);
@@ -224,7 +224,7 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte
return new GridCacheProxyImpl<>((GridCacheContext<K1, V1>)ctx,
(GridCacheAdapter<K1, V1>)delegate,
- opCtx != null ? opCtx.keepPortable() : new CacheOperationContext(false, null, true, null));
+ opCtx != null ? opCtx.keepPortable() : new CacheOperationContext(false, null, true, null, false));
}
/** {@inheritDoc} */
@@ -1515,7 +1515,7 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte
try {
return new GridCacheProxyImpl<>(ctx, delegate,
- opCtx != null ? opCtx.withExpiryPolicy(plc) : new CacheOperationContext(false, null, false, plc));
+ opCtx != null ? opCtx.withExpiryPolicy(plc) : new CacheOperationContext(false, null, false, plc, false));
}
finally {
gate.leave(prev);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3787a9d3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index 48fd259..0ad2a9a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -246,7 +246,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
try {
CacheOperationContext prj0 = opCtx != null ? opCtx.withExpiryPolicy(plc) :
- new CacheOperationContext(false, null, false, plc);
+ new CacheOperationContext(false, null, false, plc, false);
return new IgniteCacheProxy<>(ctx, delegate, prj0, isAsync(), lock);
}
@@ -261,6 +261,30 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
}
/** {@inheritDoc} */
+ @Override public IgniteCache<K, V> withNoRetries() {
+ CacheOperationContext prev = onEnter(opCtx);
+
+ try {
+ boolean noRetries = opCtx != null && opCtx.noRetries();
+
+ if (noRetries)
+ return this;
+
+ CacheOperationContext opCtx0 = opCtx != null ? opCtx.setNoRetries(true) :
+ new CacheOperationContext(false, null, false, null, true);
+
+ return new IgniteCacheProxy<>(ctx,
+ delegate,
+ opCtx0,
+ isAsync(),
+ lock);
+ }
+ finally {
+ onLeave(prev);
+ }
+ }
+
+ /** {@inheritDoc} */
@Override public void loadCache(@Nullable IgniteBiPredicate<K, V> p, @Nullable Object... args) {
try {
CacheOperationContext prev = onEnter(opCtx);
@@ -1498,10 +1522,11 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
try {
CacheOperationContext opCtx0 =
new CacheOperationContext(
- opCtx != null ? opCtx.skipStore() : false,
+ opCtx != null && opCtx.skipStore(),
opCtx != null ? opCtx.subjectId() : null,
true,
- opCtx != null ? opCtx.expiry() : null);
+ opCtx != null ? opCtx.expiry() : null,
+ opCtx != null && opCtx.noRetries());
return new IgniteCacheProxy<>((GridCacheContext<K1, V1>)ctx,
(GridCacheAdapter<K1, V1>)delegate,
@@ -1529,8 +1554,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
CacheOperationContext opCtx0 =
new CacheOperationContext(true,
opCtx != null ? opCtx.subjectId() : null,
- opCtx != null ? opCtx.isKeepPortable() : false,
- opCtx != null ? opCtx.expiry() : null);
+ opCtx != null && opCtx.isKeepPortable(),
+ opCtx != null ? opCtx.expiry() : null,
+ opCtx != null && opCtx.noRetries());
return new IgniteCacheProxy<>(ctx,
delegate,
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3787a9d3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 8630421..2863ae8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -767,11 +767,13 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
filter,
subjId,
taskNameHash,
- opCtx != null && opCtx.skipStore());
+ opCtx != null && opCtx.skipStore(),
+ opCtx != null && opCtx.noRetries() ? 1 : MAX_RETRIES,
+ waitTopFut);
return asyncOp(new CO<IgniteInternalFuture<Object>>() {
@Override public IgniteInternalFuture<Object> apply() {
- updateFut.map(waitTopFut);
+ updateFut.map();
return updateFut;
}
@@ -830,14 +832,16 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
filter,
subjId,
taskNameHash,
- opCtx != null && opCtx.skipStore());
+ opCtx != null && opCtx.skipStore(),
+ opCtx != null && opCtx.noRetries() ? 1 : MAX_RETRIES,
+ true);
if (statsEnabled)
updateFut.listen(new UpdateRemoveTimeStatClosure<>(metrics0(), start));
return asyncOp(new CO<IgniteInternalFuture<Object>>() {
@Override public IgniteInternalFuture<Object> apply() {
- updateFut.map(true);
+ updateFut.map();
return updateFut;
}
@@ -2273,9 +2277,11 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
req.filter(),
req.subjectId(),
req.taskNameHash(),
- req.skipStore());
+ req.skipStore(),
+ MAX_RETRIES,
+ true);
- updateFut.map(true);
+ updateFut.map();
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3787a9d3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index 07f5ecf..53150cc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -90,7 +90,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
/** Mappings. */
@GridToStringInclude
- private final ConcurrentMap<UUID, GridNearAtomicUpdateRequest> mappings;
+ private ConcurrentMap<UUID, GridNearAtomicUpdateRequest> mappings;
/** Error. */
private volatile CachePartialUpdateCheckedException err;
@@ -123,7 +123,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
private GridNearAtomicUpdateRequest singleReq;
/** Raw return value flag. */
- private boolean rawRetval;
+ private final boolean rawRetval;
/** Fast map flag. */
private final boolean fastMap;
@@ -149,6 +149,12 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
/** Skip store flag. */
private final boolean skipStore;
+ /** Wait for topology future flag. */
+ private final boolean waitTopFut;
+
+ /** Remap count. */
+ private AtomicInteger remapCnt;
+
/**
* @param cctx Cache context.
* @param cache Cache instance.
@@ -183,7 +189,9 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
final CacheEntryPredicate[] filter,
UUID subjId,
int taskNameHash,
- boolean skipStore
+ boolean skipStore,
+ int remapCnt,
+ boolean waitTopFut
) {
this.rawRetval = rawRetval;
@@ -207,6 +215,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
this.subjId = subjId;
this.taskNameHash = taskNameHash;
this.skipStore = skipStore;
+ this.waitTopFut = waitTopFut;
if (log == null)
log = U.logger(cctx.kernalContext(), logRef, GridFutureAdapter.class);
@@ -218,6 +227,8 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
!(cctx.writeThrough() && cctx.config().getInterceptor() != null);
nearEnabled = CU.isNearEnabled(cctx);
+
+ this.remapCnt = new AtomicInteger(remapCnt);
}
/** {@inheritDoc} */
@@ -295,10 +306,8 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
/**
* Performs future mapping.
- *
- * @param waitTopFut Whether to wait for topology future.
*/
- public void map(boolean waitTopFut) {
+ public void map() {
AffinityTopologyVersion topVer = null;
IgniteInternalTx tx = cctx.tm().anyActiveThreadTx();
@@ -310,14 +319,62 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
topVer = cctx.mvcc().lastExplicitLockTopologyVersion(Thread.currentThread().getId());
if (topVer == null)
- mapOnTopology(null, false, null, waitTopFut);
+ mapOnTopology(null, false, null);
else {
topLocked = true;
+ // Cannot remap.
+ remapCnt.set(1);
+
map0(topVer, null, false, null);
}
}
+ /**
+ * @param failed Keys to remap.
+ */
+ private void remap(Collection<?> failed) {
+ if (futVer != null)
+ cctx.mvcc().removeAtomicFuture(version());
+
+ Collection<Object> remapKeys = new ArrayList<>(failed.size());
+ Collection<Object> remapVals = new ArrayList<>(failed.size());
+
+ Iterator<?> keyIt = keys.iterator();
+ Iterator<?> valsIt = vals.iterator();
+
+ for (Object key : failed) {
+ while (keyIt.hasNext()) {
+ Object nextKey = keyIt.next();
+ Object nextVal = valsIt.next();
+
+ if (F.eq(key, nextKey)) {
+ remapKeys.add(nextKey);
+ remapVals.add(nextVal);
+
+ break;
+ }
+ }
+ }
+
+ keys = remapKeys;
+ vals = remapVals;
+
+ mappings = new ConcurrentHashMap8<>(keys.size(), 1.0f);
+ single = null;
+ futVer = null;
+ err = null;
+ opRes = null;
+ topVer = AffinityTopologyVersion.ZERO;
+ singleNodeId = null;
+ singleReq = null;
+ fastMapRemap = false;
+ updVer = null;
+ topLocked = false;
+
+ map();
+ }
+
/** {@inheritDoc} */
@SuppressWarnings("ConstantConditions")
@Override public boolean onDone(@Nullable Object res, @Nullable Throwable err) {
@@ -331,6 +388,12 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
if (op == TRANSFORM && retval == null)
retval = Collections.emptyMap();
+ if (err != null && X.hasCause(err, CachePartialUpdateCheckedException.class) && remapCnt.decrementAndGet() > 0) {
+ remap(X.cause(err, CachePartialUpdateCheckedException.class).failedKeys());
+
+ return false;
+ }
+
if (super.onDone(retval, err)) {
if (futVer != null)
cctx.mvcc().removeAtomicFuture(version());
@@ -353,7 +416,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
Collection<KeyCacheObject> remapKeys = fastMap ? null : res.remapKeys();
- mapOnTopology(remapKeys, true, nodeId, true);
+ mapOnTopology(remapKeys, true, nodeId);
return;
}
@@ -431,10 +494,8 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
* @param keys Keys to map.
* @param remap Boolean flag indicating if this is partial future remap.
* @param oldNodeId Old node ID if remap.
- * @param waitTopFut Whether to wait for topology future.
*/
- private void mapOnTopology(final Collection<?> keys, final boolean remap, final UUID oldNodeId,
- final boolean waitTopFut) {
+ private void mapOnTopology(final Collection<?> keys, final boolean remap, final UUID oldNodeId) {
cache.topology().readLock();
AffinityTopologyVersion topVer = null;
@@ -465,7 +526,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
@Override public void apply(IgniteInternalFuture<AffinityTopologyVersion> t) {
cctx.kernalContext().closure().runLocalSafe(new Runnable() {
@Override public void run() {
- mapOnTopology(keys, remap, oldNodeId, waitTopFut);
+ mapOnTopology(keys, remap, oldNodeId);
}
});
}
@@ -509,7 +570,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
}
if (remap)
- mapOnTopology(null, true, null, true);
+ mapOnTopology(null, true, null);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3787a9d3/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
new file mode 100644
index 0000000..89d1040
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
@@ -0,0 +1,134 @@
+/*
+ * 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.*;
+import org.apache.ignite.internal.cluster.*;
+import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.testframework.*;
+
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.*;
+
+/**
+ *
+ */
+public abstract class IgniteCachePutRetryAbstractSelfTest extends GridCacheAbstractSelfTest {
+ /** {@inheritDoc} */
+ @Override protected int gridCount() {
+ return 4;
+ }
+
+ /**
+ * @return Keys count for the test.
+ */
+ protected abstract int keysCount();
+
+ /** {@inheritDoc} */
+ @Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception {
+ CacheConfiguration cfg = super.cacheConfiguration(gridName);
+
+ cfg.setBackups(1);
+
+ return cfg;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testPut() throws Exception {
+ final AtomicBoolean finished = new AtomicBoolean();
+
+ IgniteInternalFuture<Object> fut = GridTestUtils.runAsync(new Callable<Object>() {
+ @Override public Object call() throws Exception {
+ while (!finished.get()) {
+ stopGrid(3);
+
+ U.sleep(300);
+
+ startGrid(3);
+ }
+
+ return null;
+ }
+ });
+
+ int keysCnt = keysCount();
+
+ for (int i = 0; i < keysCnt; i++)
+ ignite(0).cache(null).put(i, i);
+
+ finished.set(true);
+ fut.get();
+
+ for (int i = 0; i < keysCnt; i++)
+ assertEquals(i, ignite(0).cache(null).get(i));
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testFailWithNoRetries() throws Exception {
+ final AtomicBoolean finished = new AtomicBoolean();
+
+ IgniteInternalFuture<Object> fut = GridTestUtils.runAsync(new Callable<Object>() {
+ @Override public Object call() throws Exception {
+ while (!finished.get()) {
+ stopGrid(3);
+
+ U.sleep(300);
+
+ startGrid(3);
+ }
+
+ return null;
+ }
+ });
+
+ int keysCnt = keysCount();
+
+ boolean exceptionThrown = false;
+
+ for (int i = 0; i < keysCnt; i++) {
+ try {
+ ignite(0).cache(null).withNoRetries().put(i, i);
+ }
+ catch (Exception e) {
+ assertTrue("Invalid exception: " + e, X.hasCause(e, ClusterTopologyCheckedException.class) || X.hasCause(e, CachePartialUpdateException.class));
+
+ exceptionThrown = true;
+
+ break;
+ }
+ }
+
+ assertTrue(exceptionThrown);
+
+ finished.set(true);
+ fut.get();
+ }
+
+ /** {@inheritDoc} */
+ @Override protected long getTestTimeout() {
+ return 3 * 60 * 1000;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3787a9d3/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java
new file mode 100644
index 0000000..e76663a
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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.*;
+
+/**
+ *
+ */
+public class IgniteCachePutRetryAtomicSelfTest extends IgniteCachePutRetryAbstractSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicityMode atomicityMode() {
+ return CacheAtomicityMode.ATOMIC;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected int keysCount() {
+ return 60_000;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3787a9d3/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
new file mode 100644
index 0000000..e65459a
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
@@ -0,0 +1,35 @@
+/*
+ * 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.*;
+
+/**
+ *
+ */
+public class IgniteCachePutRetryTransactionalSelfTest extends IgniteCachePutRetryAbstractSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicityMode atomicityMode() {
+ return CacheAtomicityMode.TRANSACTIONAL;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected int keysCount() {
+ return 20_000;
+ }
+}
[36/41] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-7' into ignite-sprint-7
Posted by iv...@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/ea90d863
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ea90d863
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ea90d863
Branch: refs/heads/ignite-964-1
Commit: ea90d8633265723076f729b2dca02873c033ce55
Parents: 1427d75 a0a31e2
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Thu Jul 2 12:10:38 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Thu Jul 2 12:10:38 2015 -0700
----------------------------------------------------------------------
.../processors/cache/GridCacheSwapManager.java | 257 ++++++++++++-------
.../inmemory/GridTestSwapSpaceSpi.java | 3 +-
.../query/h2/opt/GridH2KeyValueRowOffheap.java | 8 +-
.../processors/query/h2/opt/GridH2Table.java | 2 +-
.../cache/IgniteCacheOffheapEvictQueryTest.java | 2 +-
.../IgniteCacheQueryMultiThreadedSelfTest.java | 4 +-
...QueryOffheapEvictsMultiThreadedSelfTest.java | 5 -
.../IgniteCacheQueryNodeRestartSelfTest2.java | 5 +
8 files changed, 179 insertions(+), 107 deletions(-)
----------------------------------------------------------------------
[06/41] incubator-ignite git commit: # ignite-gg-10416 Exclude nested
beans only if exclude properties exists(visor).
Posted by iv...@apache.org.
# ignite-gg-10416 Exclude nested beans only if exclude properties exists(visor).
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0acdc2f9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0acdc2f9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0acdc2f9
Branch: refs/heads/ignite-964-1
Commit: 0acdc2f9f56d1c1f104de82211b38e36388ddb43
Parents: e5fba8b
Author: Andrey <an...@gridgain.com>
Authored: Thu Jun 18 18:15:53 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jun 18 18:21:49 2015 +0700
----------------------------------------------------------------------
.../util/spring/IgniteSpringHelperImpl.java | 93 +++++++++++---------
.../IgniteExcludeInConfigurationTest.java | 78 ++++++++++++++++
.../IgniteStartExcludesConfigurationTest.java | 80 -----------------
.../testsuites/IgniteSpringTestSuite.java | 2 +-
4 files changed, 129 insertions(+), 124 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0acdc2f9/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
index df53ca7..6cfca36 100644
--- a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
+++ b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
@@ -421,63 +421,70 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
private static GenericApplicationContext prepareSpringContext(final String... excludedProps){
GenericApplicationContext springCtx = new GenericApplicationContext();
- BeanFactoryPostProcessor postProc = new BeanFactoryPostProcessor() {
- /**
- * @param def Registered BeanDefinition.
- * @throws BeansException in case of errors.
- */
- private void processNested(BeanDefinition def) throws BeansException {
- MutablePropertyValues vals = def.getPropertyValues();
-
- for (PropertyValue val : new ArrayList<>(vals.getPropertyValueList())) {
- for (String excludedProp : excludedProps) {
- if (val.getName().equals(excludedProp)) {
- vals.removePropertyValue(val);
-
- return;
+ if (excludedProps.length > 0) {
+ BeanFactoryPostProcessor postProc = new BeanFactoryPostProcessor() {
+ /**
+ * @param def Registered BeanDefinition.
+ * @throws BeansException in case of errors.
+ */
+ private void processNested(BeanDefinition def) throws BeansException {
+ Iterator<PropertyValue> iterVals = def.getPropertyValues().getPropertyValueList().iterator();
+
+ while (iterVals.hasNext()) {
+ PropertyValue val = iterVals.next();
+
+ for (String excludedProp : excludedProps) {
+ if (val.getName().equals(excludedProp)) {
+ iterVals.remove();
+
+ return;
+ }
}
- }
- if (val.getValue() instanceof Collection) {
- Collection<?> nestedVals = (Collection) val.getValue();
+ if (val.getValue() instanceof Iterable) {
+ Iterator iterNested = ((Iterable)val.getValue()).iterator();
- for (Object item : new ArrayList<>(nestedVals))
- if (item instanceof BeanDefinitionHolder) {
- BeanDefinitionHolder holder = (BeanDefinitionHolder)item;
+ while (iterNested.hasNext()) {
+ Object item = iterNested.next();
- try {
- if (holder.getBeanDefinition().getBeanClassName() != null)
- Class.forName(holder.getBeanDefinition().getBeanClassName());
+ if (item instanceof BeanDefinitionHolder) {
+ BeanDefinitionHolder h = (BeanDefinitionHolder)item;
- processNested(holder.getBeanDefinition());
- }
- catch (ClassNotFoundException ignored) {
- nestedVals.remove(item);
+ try {
+ if (h.getBeanDefinition().getBeanClassName() != null)
+ Class.forName(h.getBeanDefinition().getBeanClassName());
+
+ processNested(h.getBeanDefinition());
+ }
+ catch (ClassNotFoundException ignored) {
+ iterNested.remove();
+ }
}
}
+ }
}
}
- }
- /** {@inheritDoc} */
- @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
- throws BeansException {
- for (String beanName : beanFactory.getBeanDefinitionNames())
- try {
- BeanDefinition def = beanFactory.getBeanDefinition(beanName);
+ @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
+ throws BeansException {
+ for (String beanName : beanFactory.getBeanDefinitionNames()) {
+ try {
+ BeanDefinition def = beanFactory.getBeanDefinition(beanName);
- if (def.getBeanClassName() != null)
- Class.forName(def.getBeanClassName());
+ if (def.getBeanClassName() != null)
+ Class.forName(def.getBeanClassName());
- processNested(def);
- }
- catch (ClassNotFoundException ignored) {
- ((BeanDefinitionRegistry)beanFactory).removeBeanDefinition(beanName);
+ processNested(def);
+ }
+ catch (ClassNotFoundException ignored) {
+ ((BeanDefinitionRegistry)beanFactory).removeBeanDefinition(beanName);
+ }
}
- }
- };
+ }
+ };
- springCtx.addBeanFactoryPostProcessor(postProc);
+ springCtx.addBeanFactoryPostProcessor(postProc);
+ }
return springCtx;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0acdc2f9/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
new file mode 100644
index 0000000..1edca77
--- /dev/null
+++ b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
@@ -0,0 +1,78 @@
+/*
+ * 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.spring;
+
+import org.apache.ignite.cache.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.util.spring.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.net.*;
+import java.util.*;
+
+import static org.apache.ignite.internal.IgniteComponentType.*;
+
+/**
+ * Checks excluding properties, beans with not existing classes in spring.
+ */
+public class IgniteExcludeInConfigurationTest extends GridCommonAbstractTest {
+ private URL cfgLocation = U.resolveIgniteUrl(
+ "modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml");
+
+ /** Spring should exclude properties by list and ignore beans with class not existing in classpath. */
+ public void testExclude() throws Exception {
+ IgniteSpringHelper spring = SPRING.create(false);
+
+ Collection<IgniteConfiguration> cfgs = spring.loadConfigurations(cfgLocation, "typeMetadata").get1();
+
+ assertNotNull(cfgs);
+ assertEquals(1, cfgs.size());
+
+ IgniteConfiguration cfg = cfgs.iterator().next();
+
+ assertEquals(1, cfg.getCacheConfiguration().length);
+ assertNull(cfg.getCacheConfiguration()[0].getTypeMetadata());
+
+ cfgs = spring.loadConfigurations(cfgLocation, "keyType").get1();
+
+ assertNotNull(cfgs);
+ assertEquals(1, cfgs.size());
+
+ cfg = cfgs.iterator().next();
+
+ assertEquals(1, cfg.getCacheConfiguration().length);
+
+ Collection<CacheTypeMetadata> typeMetadatas = cfg.getCacheConfiguration()[0].getTypeMetadata();
+
+ assertEquals(1, typeMetadatas.size());
+ assertNull(typeMetadatas.iterator().next().getKeyType());
+ }
+
+ /** Spring should fail if bean class not exist in classpath. */
+ public void testFail() throws Exception {
+ IgniteSpringHelper spring = SPRING.create(false);
+
+ try {
+ assertNotNull(spring.loadConfigurations(cfgLocation).get1());
+ } catch (Exception e) {
+ assertTrue(X.hasCause(e, ClassNotFoundException.class));
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0acdc2f9/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartExcludesConfigurationTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartExcludesConfigurationTest.java b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartExcludesConfigurationTest.java
deleted file mode 100644
index f1332e0..0000000
--- a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartExcludesConfigurationTest.java
+++ /dev/null
@@ -1,80 +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.spring;
-
-import org.apache.ignite.cache.*;
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.util.spring.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.testframework.junits.common.*;
-
-import java.net.*;
-import java.util.*;
-
-import static org.apache.ignite.internal.IgniteComponentType.*;
-
-/**
- * Checks exclude properties in spring, exclude beans with not existing classes.
- */
-public class IgniteStartExcludesConfigurationTest extends GridCommonAbstractTest {
- /** Tests spring exclude properties. */
- public void testExcludes() throws Exception {
- URL cfgLocation = U.resolveIgniteUrl(
- "modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml");
-
- IgniteSpringHelper spring = SPRING.create(false);
-
- Collection<IgniteConfiguration> cfgs = spring.loadConfigurations(cfgLocation, "typeMetadata").get1();
-
- assert cfgs != null && cfgs.size() == 1;
-
- IgniteConfiguration cfg = cfgs.iterator().next();
-
- assert cfg.getCacheConfiguration().length == 1;
-
- assert cfg.getCacheConfiguration()[0].getTypeMetadata() == null;
-
- cfgs = spring.loadConfigurations(cfgLocation, "keyType").get1();
-
- assert cfgs != null && cfgs.size() == 1;
-
- cfg = cfgs.iterator().next();
-
- assert cfg.getCacheConfiguration().length == 1;
-
- Collection<CacheTypeMetadata> typeMetadatas = cfg.getCacheConfiguration()[0].getTypeMetadata();
-
- assert typeMetadatas.size() == 1;
-
- assert typeMetadatas.iterator().next().getKeyType() == null;
-
- cfgs = spring.loadConfigurations(cfgLocation).get1();
-
- assert cfgs != null && cfgs.size() == 1;
-
- cfg = cfgs.iterator().next();
-
- assert cfg.getCacheConfiguration().length == 1;
-
- typeMetadatas = cfg.getCacheConfiguration()[0].getTypeMetadata();
-
- assert typeMetadatas.size() == 1;
-
- assert "java.lang.Integer".equals(typeMetadatas.iterator().next().getKeyType());
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0acdc2f9/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java
index 3ff927a..75d29fb 100644
--- a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java
+++ b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java
@@ -40,7 +40,7 @@ public class IgniteSpringTestSuite extends TestSuite {
suite.addTest(IgniteResourceSelfTestSuite.suite());
- suite.addTest(new TestSuite(IgniteStartExcludesConfigurationTest.class));
+ suite.addTest(new TestSuite(IgniteExcludeInConfigurationTest.class));
// Tests moved to this suite since they require Spring functionality.
suite.addTest(new TestSuite(GridP2PUserVersionChangeSelfTest.class));
[26/41] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-621
Posted by iv...@apache.org.
Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-621
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ac93958d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ac93958d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ac93958d
Branch: refs/heads/ignite-964-1
Commit: ac93958d21ef33d98bb223904131bf1bf54a7cf2
Parents: 0cb2d97 68c21ac
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Mon Jun 29 17:40:01 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Mon Jun 29 17:40:01 2015 -0700
----------------------------------------------------------------------
.../ignite/internal/GridKernalContextImpl.java | 2 +-
.../discovery/GridDiscoveryManager.java | 6 +
.../cache/GridCacheDeploymentManager.java | 10 +-
.../processors/cache/GridCacheProcessor.java | 62 ++++--
.../shmem/IpcSharedMemoryServerEndpoint.java | 10 +-
.../apache/ignite/internal/visor/VisorJob.java | 2 +
.../internal/visor/log/VisorLogSearchTask.java | 2 +-
.../visor/node/VisorNodeDataCollectorJob.java | 4 +
.../util/VisorClusterGroupEmptyException.java | 6 +-
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 ------------
.../IgniteDaemonNodeMarshallerCacheTest.java | 192 +++++++++++++++++++
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
.../testsuites/IgniteCacheTestSuite3.java | 1 -
pom.xml | 12 +-
14 files changed, 282 insertions(+), 147 deletions(-)
----------------------------------------------------------------------
[12/41] incubator-ignite git commit: ignite-973-2 - simplify test
Posted by iv...@apache.org.
ignite-973-2 - simplify 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/4b5e89fa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4b5e89fa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4b5e89fa
Branch: refs/heads/ignite-964-1
Commit: 4b5e89fa8246c36322b6f66af10379f6941091c6
Parents: 260dc2d
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue Jun 23 15:28:51 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue Jun 23 15:28:51 2015 +0300
----------------------------------------------------------------------
.../processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b5e89fa/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 3e50443..97426c9 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
@@ -32,7 +32,7 @@ import org.apache.ignite.internal.util.typedef.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.spi.swapspace.file.*;
+import org.apache.ignite.spi.swapspace.inmemory.*;
import org.apache.ignite.testframework.junits.common.*;
import org.jetbrains.annotations.*;
@@ -82,7 +82,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
cfg.setDiscoverySpi(disco);
- cfg.setSwapSpaceSpi(new FileSwapSpaceSpi());
+ cfg.setSwapSpaceSpi(new GridTestSwapSpaceSpi());
cfg.setCacheConfiguration(cacheConfiguration());
[21/41] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-621
Posted by iv...@apache.org.
Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-621
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/45b0f092
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/45b0f092
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/45b0f092
Branch: refs/heads/ignite-964-1
Commit: 45b0f0925fe1da0fb41c06a2dce6440a26490f93
Parents: c2c90b5 3e8ddb4
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Thu Jun 25 17:06:46 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Thu Jun 25 17:06:46 2015 -0700
----------------------------------------------------------------------
.../ClientAbstractConnectivitySelfTest.java | 4 +-
.../org/apache/ignite/cluster/ClusterGroup.java | 9 +
.../org/apache/ignite/cluster/ClusterNode.java | 2 +
.../ignite/compute/ComputeTaskSplitAdapter.java | 2 +-
.../ignite/internal/GridKernalContextImpl.java | 3 +
.../internal/cluster/ClusterGroupAdapter.java | 38 +
.../cluster/IgniteClusterAsyncImpl.java | 5 +
.../processors/plugin/CachePluginManager.java | 10 +-
.../internal/util/GridConfigurationFinder.java | 55 +-
.../ignite/internal/util/IgniteUtils.java | 6 +-
.../internal/ClusterForHostsSelfTest.java | 113 +++
.../internal/ClusterGroupAbstractTest.java | 777 ++++++++++++++++++
.../ignite/internal/ClusterGroupSelfTest.java | 251 ++++++
.../internal/GridProjectionAbstractTest.java | 784 -------------------
.../ignite/internal/GridProjectionSelfTest.java | 251 ------
.../apache/ignite/internal/GridSelfTest.java | 2 +-
.../internal/util/IgniteUtilsSelfTest.java | 22 +
.../ignite/testsuites/IgniteBasicTestSuite.java | 6 +-
.../p2p/GridP2PContinuousDeploymentTask1.java | 2 +-
.../commands/cache/VisorCacheCommand.scala | 7 +-
scripts/git-patch-prop.sh | 2 +-
21 files changed, 1273 insertions(+), 1078 deletions(-)
----------------------------------------------------------------------
[08/41] incubator-ignite git commit: IGNITE-621 - Added automatic
retries for atomics.
Posted by iv...@apache.org.
IGNITE-621 - Added automatic retries for atomics.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5505b4d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5505b4d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5505b4d3
Branch: refs/heads/ignite-964-1
Commit: 5505b4d3d50caf41246d1194c52298a6df47a239
Parents: 3787a9d
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Sun Jun 21 13:09:24 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Sun Jun 21 13:09:24 2015 -0700
----------------------------------------------------------------------
.../processors/cache/GridCacheUtils.java | 42 ++++++++++++++++++++
.../datastructures/GridCacheAtomicLongImpl.java | 25 ++++++------
.../GridCacheAtomicSequenceImpl.java | 11 ++---
.../GridCacheAtomicStampedImpl.java | 21 +++++-----
.../GridCacheCountDownLatchImpl.java | 16 +++-----
.../IgniteCachePutRetryAbstractSelfTest.java | 13 ++++++
...gniteCachePutRetryTransactionalSelfTest.java | 39 ++++++++++++++++++
.../IgniteCacheFailoverTestSuite.java | 3 ++
8 files changed, 131 insertions(+), 39 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5505b4d3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 8c26046..f88e288 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -30,6 +30,7 @@ import org.apache.ignite.internal.processors.cache.distributed.*;
import org.apache.ignite.internal.processors.cache.distributed.dht.*;
import org.apache.ignite.internal.processors.cache.transactions.*;
import org.apache.ignite.internal.processors.cache.version.*;
+import org.apache.ignite.internal.transactions.*;
import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.T2;
@@ -1699,4 +1700,45 @@ public class GridCacheUtils {
ctx.resource().cleanupGeneric(lsnr);
}
}
+
+ /**
+ * @param c Closure to retry.
+ * @param <S> Closure type.
+ * @return Wrapped closure.
+ */
+ public static <S> Callable<S> retryTopologySafe(final Callable<S> c ) {
+ return new Callable<S>() {
+ @Override public S call() throws Exception {
+ int retries = GridCacheAdapter.MAX_RETRIES;
+
+ IgniteCheckedException err = null;
+
+ for (int i = 0; i < retries; i++) {
+ try {
+ return c.call();
+ }
+ catch (IgniteCheckedException e) {
+ if (X.hasCause(e, ClusterTopologyCheckedException.class) ||
+ X.hasCause(e, IgniteTxRollbackCheckedException.class) ||
+ X.hasCause(e, CachePartialUpdateCheckedException.class)) {
+ if (i < retries - 1) {
+ err = e;
+
+ U.sleep(1);
+
+ continue;
+ }
+
+ throw e;
+ }
+ else
+ throw e;
+ }
+ }
+
+ // Should never happen.
+ throw err;
+ }
+ };
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5505b4d3/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongImpl.java
index b18d35a..5e9245d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongImpl.java
@@ -31,6 +31,7 @@ import java.util.concurrent.*;
import static org.apache.ignite.transactions.TransactionConcurrency.*;
import static org.apache.ignite.transactions.TransactionIsolation.*;
+import static org.apache.ignite.internal.util.typedef.internal.CU.*;
/**
* Cache atomic long implementation.
@@ -78,7 +79,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
};
/** Callable for {@link #incrementAndGet()}. */
- private final Callable<Long> incAndGetCall = new Callable<Long>() {
+ private final Callable<Long> incAndGetCall = retryTopologySafe(new Callable<Long>() {
@Override public Long call() throws Exception {
try (IgniteInternalTx tx = CU.txStartInternal(ctx, atomicView, PESSIMISTIC, REPEATABLE_READ)) {
GridCacheAtomicLongValue val = atomicView.get(key);
@@ -102,10 +103,10 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
throw e;
}
}
- };
+ });
/** Callable for {@link #getAndIncrement()}. */
- private final Callable<Long> getAndIncCall = new Callable<Long>() {
+ private final Callable<Long> getAndIncCall = retryTopologySafe(new Callable<Long>() {
@Override public Long call() throws Exception {
try (IgniteInternalTx tx = CU.txStartInternal(ctx, atomicView, PESSIMISTIC, REPEATABLE_READ)) {
GridCacheAtomicLongValue val = atomicView.get(key);
@@ -129,10 +130,10 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
throw e;
}
}
- };
+ });
/** Callable for {@link #decrementAndGet()}. */
- private final Callable<Long> decAndGetCall = new Callable<Long>() {
+ private final Callable<Long> decAndGetCall = retryTopologySafe(new Callable<Long>() {
@Override public Long call() throws Exception {
try (IgniteInternalTx tx = CU.txStartInternal(ctx, atomicView, PESSIMISTIC, REPEATABLE_READ)) {
GridCacheAtomicLongValue val = atomicView.get(key);
@@ -156,10 +157,10 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
throw e;
}
}
- };
+ });
/** Callable for {@link #getAndDecrement()}. */
- private final Callable<Long> getAndDecCall = new Callable<Long>() {
+ private final Callable<Long> getAndDecCall = retryTopologySafe(new Callable<Long>() {
@Override public Long call() throws Exception {
try (IgniteInternalTx tx = CU.txStartInternal(ctx, atomicView, PESSIMISTIC, REPEATABLE_READ)) {
GridCacheAtomicLongValue val = atomicView.get(key);
@@ -183,7 +184,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
throw e;
}
}
- };
+ });
/**
* Empty constructor required by {@link Externalizable}.
@@ -378,7 +379,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
* @return Callable for execution in async and sync mode.
*/
private Callable<Long> internalAddAndGet(final long l) {
- return new Callable<Long>() {
+ return retryTopologySafe(new Callable<Long>() {
@Override public Long call() throws Exception {
try (IgniteInternalTx tx = CU.txStartInternal(ctx, atomicView, PESSIMISTIC, REPEATABLE_READ)) {
GridCacheAtomicLongValue val = atomicView.get(key);
@@ -402,7 +403,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
throw e;
}
}
- };
+ });
}
/**
@@ -412,7 +413,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
* @return Callable for execution in async and sync mode.
*/
private Callable<Long> internalGetAndAdd(final long l) {
- return new Callable<Long>() {
+ return retryTopologySafe(new Callable<Long>() {
@Override public Long call() throws Exception {
try (IgniteInternalTx tx = CU.txStartInternal(ctx, atomicView, PESSIMISTIC, REPEATABLE_READ)) {
GridCacheAtomicLongValue val = atomicView.get(key);
@@ -436,7 +437,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
throw e;
}
}
- };
+ });
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5505b4d3/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
index e66c11e..2400a7e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
@@ -35,6 +35,7 @@ import java.util.concurrent.locks.*;
import static java.util.concurrent.TimeUnit.*;
import static org.apache.ignite.transactions.TransactionConcurrency.*;
import static org.apache.ignite.transactions.TransactionIsolation.*;
+import static org.apache.ignite.internal.util.typedef.internal.CU.*;
/**
* Cache sequence implementation.
@@ -435,11 +436,9 @@ public final class GridCacheAtomicSequenceImpl implements GridCacheAtomicSequenc
*/
@SuppressWarnings("TooBroadScope")
private Callable<Long> internalUpdate(final long l, final boolean updated) {
- return new Callable<Long>() {
+ return retryTopologySafe(new Callable<Long>() {
@Override public Long call() throws Exception {
- IgniteInternalTx tx = CU.txStartInternal(ctx, seqView, PESSIMISTIC, REPEATABLE_READ);
-
- try {
+ try (IgniteInternalTx tx = CU.txStartInternal(ctx, seqView, PESSIMISTIC, REPEATABLE_READ)) {
GridCacheAtomicSequenceValue seq = seqView.get(key);
checkRemoved();
@@ -506,11 +505,9 @@ public final class GridCacheAtomicSequenceImpl implements GridCacheAtomicSequenc
U.error(log, "Failed to get and add: " + this, e);
throw e;
- } finally {
- tx.close();
}
}
- };
+ });
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5505b4d3/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
index a898e58..76ea7ca 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
@@ -33,6 +33,7 @@ import java.util.concurrent.*;
import static org.apache.ignite.transactions.TransactionConcurrency.*;
import static org.apache.ignite.transactions.TransactionIsolation.*;
+import static org.apache.ignite.internal.util.typedef.internal.CU.*;
/**
* Cache atomic stamped implementation.
@@ -68,7 +69,7 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
private GridCacheContext ctx;
/** Callable for {@link #get()} operation */
- private final Callable<IgniteBiTuple<T, S>> getCall = new Callable<IgniteBiTuple<T, S>>() {
+ private final Callable<IgniteBiTuple<T, S>> getCall = retryTopologySafe(new Callable<IgniteBiTuple<T, S>>() {
@Override public IgniteBiTuple<T, S> call() throws Exception {
GridCacheAtomicStampedValue<T, S> stmp = atomicView.get(key);
@@ -77,10 +78,10 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
return stmp.get();
}
- };
+ });
/** Callable for {@link #value()} operation */
- private final Callable<T> valCall = new Callable<T>() {
+ private final Callable<T> valCall = retryTopologySafe(new Callable<T>() {
@Override public T call() throws Exception {
GridCacheAtomicStampedValue<T, S> stmp = atomicView.get(key);
@@ -89,10 +90,10 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
return stmp.value();
}
- };
+ });
/** Callable for {@link #stamp()} operation */
- private final Callable<S> stampCall = new Callable<S>() {
+ private final Callable<S> stampCall = retryTopologySafe(new Callable<S>() {
@Override public S call() throws Exception {
GridCacheAtomicStampedValue<T, S> stmp = atomicView.get(key);
@@ -101,7 +102,7 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
return stmp.stamp();
}
- };
+ });
/**
* Empty constructor required by {@link Externalizable}.
@@ -254,7 +255,7 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
* @return Callable for execution in async and sync mode.
*/
private Callable<Boolean> internalSet(final T val, final S stamp) {
- return new Callable<Boolean>() {
+ return retryTopologySafe(new Callable<Boolean>() {
@Override public Boolean call() throws Exception {
try (IgniteInternalTx tx = CU.txStartInternal(ctx, atomicView, PESSIMISTIC, REPEATABLE_READ)) {
GridCacheAtomicStampedValue<T, S> stmp = atomicView.get(key);
@@ -276,7 +277,7 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
throw e;
}
}
- };
+ });
}
/**
@@ -292,7 +293,7 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
private Callable<Boolean> internalCompareAndSet(final IgnitePredicate<T> expValPred,
final IgniteClosure<T, T> newValClos, final IgnitePredicate<S> expStampPred,
final IgniteClosure<S, S> newStampClos) {
- return new Callable<Boolean>() {
+ return retryTopologySafe(new Callable<Boolean>() {
@Override public Boolean call() throws Exception {
try (IgniteInternalTx tx = CU.txStartInternal(ctx, atomicView, PESSIMISTIC, REPEATABLE_READ)) {
GridCacheAtomicStampedValue<T, S> stmp = atomicView.get(key);
@@ -323,7 +324,7 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
throw e;
}
}
- };
+ });
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5505b4d3/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
index 33547d9..ea7924f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
@@ -32,6 +32,7 @@ import java.util.concurrent.atomic.*;
import static org.apache.ignite.transactions.TransactionConcurrency.*;
import static org.apache.ignite.transactions.TransactionIsolation.*;
+import static org.apache.ignite.internal.util.typedef.internal.CU.*;
/**
* Cache count down latch implementation.
@@ -179,12 +180,7 @@ public final class GridCacheCountDownLatchImpl implements GridCacheCountDownLatc
/** {@inheritDoc} */
@Override public int countDown() {
- try {
- return CU.outTx(new CountDownCallable(1), ctx);
- }
- catch (IgniteCheckedException e) {
- throw U.convertException(e);
- }
+ return countDown(1);
}
/** {@inheritDoc} */
@@ -192,7 +188,7 @@ public final class GridCacheCountDownLatchImpl implements GridCacheCountDownLatc
A.ensure(val > 0, "val should be positive");
try {
- return CU.outTx(new CountDownCallable(val), ctx);
+ return CU.outTx(retryTopologySafe(new CountDownCallable(val)), ctx);
}
catch (IgniteCheckedException e) {
throw U.convertException(e);
@@ -202,7 +198,7 @@ public final class GridCacheCountDownLatchImpl implements GridCacheCountDownLatc
/** {@inheritDoc}*/
@Override public void countDownAll() {
try {
- CU.outTx(new CountDownCallable(0), ctx);
+ CU.outTx(retryTopologySafe(new CountDownCallable(0)), ctx);
}
catch (IgniteCheckedException e) {
throw U.convertException(e);
@@ -248,7 +244,7 @@ public final class GridCacheCountDownLatchImpl implements GridCacheCountDownLatc
if (initGuard.compareAndSet(false, true)) {
try {
internalLatch = CU.outTx(
- new Callable<CountDownLatch>() {
+ retryTopologySafe(new Callable<CountDownLatch>() {
@Override public CountDownLatch call() throws Exception {
try (IgniteInternalTx tx = CU.txStartInternal(ctx, latchView, PESSIMISTIC, REPEATABLE_READ)) {
GridCacheCountDownLatchValue val = latchView.get(key);
@@ -267,7 +263,7 @@ public final class GridCacheCountDownLatchImpl implements GridCacheCountDownLatc
return new CountDownLatch(val.get());
}
}
- },
+ }),
ctx
);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5505b4d3/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
index 89d1040..bfddbe7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
@@ -52,6 +52,19 @@ public abstract class IgniteCachePutRetryAbstractSelfTest extends GridCacheAbstr
return cfg;
}
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ AtomicConfiguration acfg = new AtomicConfiguration();
+
+ acfg.setBackups(1);
+
+ cfg.setAtomicConfiguration(acfg);
+
+ return cfg;
+ }
+
/**
* @throws Exception If failed.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5505b4d3/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
index e65459a..91c454a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
@@ -17,7 +17,14 @@
package org.apache.ignite.internal.processors.cache.distributed.dht;
+import org.apache.ignite.*;
import org.apache.ignite.cache.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.testframework.*;
+
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.*;
/**
*
@@ -32,4 +39,36 @@ public class IgniteCachePutRetryTransactionalSelfTest extends IgniteCachePutRetr
@Override protected int keysCount() {
return 20_000;
}
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testAtomicLongRetries() throws Exception {
+ final AtomicBoolean finished = new AtomicBoolean();
+
+ IgniteAtomicLong atomic = ignite(0).atomicLong("TestAtomic", 0, true);
+
+ IgniteInternalFuture<Object> fut = GridTestUtils.runAsync(new Callable<Object>() {
+ @Override
+ public Object call() throws Exception {
+ while (!finished.get()) {
+ stopGrid(3);
+
+ U.sleep(300);
+
+ startGrid(3);
+ }
+
+ return null;
+ }
+ });
+
+ int keysCnt = keysCount();
+
+ for (int i = 0; i < keysCnt; i++)
+ atomic.incrementAndGet();
+
+ finished.set(true);
+ fut.get();
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5505b4d3/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 dda86c1..80bfbf2 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
@@ -72,6 +72,9 @@ public class IgniteCacheFailoverTestSuite extends TestSuite {
suite.addTestSuite(IgniteCacheTxNearDisabledPutGetRestartTest.class);
suite.addTestSuite(IgniteCacheTxNearDisabledFairAffinityPutGetRestartTest.class);
+ suite.addTestSuite(IgniteCachePutRetryAtomicSelfTest.class);
+ suite.addTestSuite(IgniteCachePutRetryTransactionalSelfTest.class);
+
return suite;
}
}
[32/41] incubator-ignite git commit: # ignite-gg-10416 Extract opne
command from visor cmd.
Posted by iv...@apache.org.
# ignite-gg-10416 Extract opne command from visor cmd.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/fcff50e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/fcff50e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/fcff50e3
Branch: refs/heads/ignite-964-1
Commit: fcff50e386d7f8e7ab1c00b86921f667d646d819
Parents: ad3e6af
Author: Andrey <an...@gridgain.com>
Authored: Thu Jul 2 11:31:31 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jul 2 13:53:00 2015 +0700
----------------------------------------------------------------------
.../ignite/visor/commands/VisorConsole.scala | 3 +-
.../visor/commands/open/VisorOpenCommand.scala | 319 +++++++++++++++++++
.../scala/org/apache/ignite/visor/visor.scala | 231 +-------------
.../ignite/visor/VisorRuntimeBaseSpec.scala | 2 +
.../commands/kill/VisorKillCommandSpec.scala | 1 +
.../commands/start/VisorStartCommandSpec.scala | 1 +
.../commands/tasks/VisorTasksCommandSpec.scala | 1 +
.../commands/vvm/VisorVvmCommandSpec.scala | 1 +
8 files changed, 340 insertions(+), 219 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
index d4ac39d..bcfc6e0 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
@@ -71,6 +71,7 @@ class VisorConsole {
org.apache.ignite.visor.commands.gc.VisorGcCommand
org.apache.ignite.visor.commands.kill.VisorKillCommand
org.apache.ignite.visor.commands.node.VisorNodeCommand
+ org.apache.ignite.visor.commands.open.VisorOpenCommand
org.apache.ignite.visor.commands.ping.VisorPingCommand
org.apache.ignite.visor.commands.start.VisorStartCommand
org.apache.ignite.visor.commands.tasks.VisorTasksCommand
@@ -178,7 +179,7 @@ class VisorConsole {
buf.append(line.dropRight(1))
}
else {
- if (buf.size != 0) {
+ if (buf.nonEmpty) {
buf.append(line)
line = buf.toString()
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala
new file mode 100644
index 0000000..6498baf
--- /dev/null
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala
@@ -0,0 +1,319 @@
+/*
+ *
+ * * 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.visor.commands.open
+
+import org.apache.ignite.IgniteSystemProperties._
+import org.apache.ignite.configuration.IgniteConfiguration
+import org.apache.ignite.internal.IgniteComponentType._
+import org.apache.ignite.internal.IgniteEx
+import org.apache.ignite.internal.util.scala.impl
+import org.apache.ignite.internal.util.spring.IgniteSpringHelper
+import org.apache.ignite.internal.util.{IgniteUtils => U}
+import org.apache.ignite.logger.NullLogger
+import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi
+import org.apache.ignite.visor.commands.common.{VisorConsoleCommand, VisorTextTable}
+import org.apache.ignite.visor.visor._
+import org.apache.ignite.visor.{VisorTag, visor}
+import org.apache.ignite.{IgniteException, IgniteSystemProperties, Ignition}
+
+import java.net.URL
+
+import scala.language.{implicitConversions, reflectiveCalls}
+
+/**
+ * ==Overview==
+ * Contains Visor command `node` implementation.
+ *
+ * ==Help==
+ * {{{
+ * +--------------------------------+
+ * | node | Prints node statistics. |
+ * +--------------------------------+
+ * }}}
+ *
+ * ====Specification====
+ * {{{
+ * node "{-id8=<node-id8>|-id=<node-id>} {-a}"
+ * node
+ * }}}
+ *
+ * ====Arguments====
+ * {{{
+ * -id8=<node-id8>
+ * ID8 of node. Either '-id8' or '-id' can be specified.
+ * If neither specified - command starts in interactive mode.
+ * -id=<node-id>
+ * Full ID of node. Either '-id8' or '-id' can be specified.
+ * If neither specified - command starts in interactive mode.
+ * -a
+ * Print extended information.
+ * By default - only abbreviated statistics is printed.
+ * }}}
+ *
+ * ====Examples====
+ * {{{
+ * node
+ * Starts command in interactive mode.
+ * node "-id8=12345678"
+ * Prints statistics for specified node.
+ * node "-id8=12345678 -a"
+ * Prints full statistics for specified node.
+ * }}}
+ */
+class VisorOpenCommand extends VisorConsoleCommand {
+ @impl protected val name = "open"
+
+ /** Default configuration path relative to Ignite home. */
+ private final val DFLT_CFG = "config/default-config.xml"
+
+ /**
+ * ==Command==
+ * Connects Visor console to the default grid.
+ *
+ * ==Example==
+ * <ex>open</ex>
+ * Connects to the default grid.
+ */
+ def open() {
+ open("")
+ }
+
+ /**
+ * ==Command==
+ * Connects Visor console to default or named grid.
+ *
+ * ==Examples==
+ * <ex>open -g=mygrid</ex>
+ * Connects to 'mygrid' grid.
+ *
+ * @param args Command arguments.
+ */
+ def open(args: String) {
+ assert(args != null)
+
+ if (isConnected) {
+ warn("Visor is already connected. Disconnect first.")
+
+ return
+ }
+
+ try {
+ def configuration(path: String): IgniteConfiguration = {
+ assert(path != null)
+
+ val url =
+ try
+ new URL(path)
+ catch {
+ case e: Exception =>
+ val url = U.resolveIgniteUrl(path)
+
+ if (url == null)
+ throw new IgniteException("Ignite configuration path is invalid: " + path, e)
+
+ url
+ }
+
+ // Add no-op logger to remove no-appender warning.
+ val log4jTup =
+ if (classOf[Ignition].getClassLoader.getResource("org/apache/log4j/Appender.class") != null)
+ U.addLog4jNoOpLogger()
+ else
+ null
+
+ val spring: IgniteSpringHelper = SPRING.create(false)
+
+ val cfgs =
+ try
+ // Cache, IGFS, indexing SPI configurations should be excluded from daemon node config.
+ spring.loadConfigurations(url, "cacheConfiguration", "fileSystemConfiguration",
+ "indexingSpi").get1()
+ finally {
+ if (log4jTup != null)
+ U.removeLog4jNoOpLogger(log4jTup)
+ }
+
+ if (cfgs == null || cfgs.isEmpty)
+ throw new IgniteException("Can't find grid configuration in: " + url)
+
+ if (cfgs.size > 1)
+ throw new IgniteException("More than one grid configuration found in: " + url)
+
+ val cfg = cfgs.iterator().next()
+
+ // Setting up 'Config URL' for properly print in console.
+ System.setProperty(IgniteSystemProperties.IGNITE_CONFIG_URL, url.getPath)
+
+ var cpuCnt = Runtime.getRuntime.availableProcessors
+
+ if (cpuCnt < 4)
+ cpuCnt = 4
+
+ cfg.setConnectorConfiguration(null)
+
+ // All thread pools are overridden to have size equal to number of CPUs.
+ cfg.setPublicThreadPoolSize(cpuCnt)
+ cfg.setSystemThreadPoolSize(cpuCnt)
+ cfg.setPeerClassLoadingThreadPoolSize(cpuCnt)
+
+ var ioSpi = cfg.getCommunicationSpi
+
+ if (ioSpi == null)
+ ioSpi = new TcpCommunicationSpi()
+
+ cfg
+ }
+
+ val argLst = parseArgs(args)
+
+ val path = argValue("cpath", argLst)
+ val dflt = hasArgFlag("d", argLst)
+
+ val (cfg, cfgPath) =
+ if (path.isDefined)
+ (configuration(path.get), path.get)
+ else if (dflt)
+ (configuration(DFLT_CFG), "<default>")
+ else {
+ // If configuration file is not defined in arguments,
+ // ask to choose from the list
+ askConfigFile() match {
+ case Some(p) =>
+ nl()
+
+ (VisorTextTable() +=("Using configuration", p)) render()
+
+ nl()
+
+ (configuration(p), p)
+ case None =>
+ return
+ }
+ }
+
+ open(cfg, cfgPath)
+ }
+ catch {
+ case e: IgniteException =>
+ warn(e.getMessage)
+ warn("Type 'help open' to see how to use this command.")
+
+ status("q")
+ }
+ }
+
+ /**
+ * Connects Visor console to configuration with path.
+ *
+ * @param cfg Configuration.
+ * @param cfgPath Configuration path.
+ */
+ def open(cfg: IgniteConfiguration, cfgPath: String) = {
+ val daemon = Ignition.isDaemon
+
+ val shutdownHook = IgniteSystemProperties.getString(IGNITE_NO_SHUTDOWN_HOOK, "false")
+
+ // Make sure Visor console starts as daemon node.
+ Ignition.setDaemon(true)
+
+ // Make sure visor starts without shutdown hook.
+ System.setProperty(IGNITE_NO_SHUTDOWN_HOOK, "true")
+
+ // Set NullLoger in quite mode.
+ if ("true".equalsIgnoreCase(sys.props.getOrElse(IGNITE_QUIET, "true")))
+ cfg.setGridLogger(new NullLogger)
+
+ val startedGridName = try {
+ Ignition.start(cfg).name
+ }
+ finally {
+ Ignition.setDaemon(daemon)
+
+ System.setProperty(IGNITE_NO_SHUTDOWN_HOOK, shutdownHook)
+ }
+
+ ignite =
+ try
+ Ignition.ignite(startedGridName).asInstanceOf[IgniteEx]
+ catch {
+ case _: IllegalStateException =>
+ throw new IgniteException("Named grid unavailable: " + startedGridName)
+ }
+
+ visor.open(startedGridName, cfgPath)
+ }
+}
+
+/**
+ * Companion object that does initialization of the command.
+ */
+object VisorOpenCommand {
+ /** Singleton command. */
+ private val cmd = new VisorOpenCommand
+
+ // Adds command's help to visor.
+ addHelp(
+ name = "open",
+ shortInfo = "Connects Visor console to the grid.",
+ longInfo = Seq(
+ "Connects Visor console to the grid. Note that P2P class loading",
+ "should be enabled on all nodes.",
+ " ",
+ "If neither '-cpath' or '-d' are provided, command will ask",
+ "user to select Ignite configuration file in interactive mode."
+ ),
+ spec = Seq(
+ "open -cpath=<path>",
+ "open -d"
+ ),
+ args = Seq(
+ "-cpath=<path>" -> Seq(
+ "Ignite configuration path.",
+ "Can be absolute, relative to Ignite home folder or any well formed URL."
+ ),
+ "-d" -> Seq(
+ "Flag forces the command to connect to grid using default Ignite configuration file.",
+ "without interactive mode."
+ )
+ ),
+ examples = Seq(
+ "open" ->
+ "Prompts user to select Ignite configuration file in interactive mode.",
+ "open -d" ->
+ "Connects Visor console to grid using default Ignite configuration file.",
+ "open -cpath=/gg/config/mycfg.xml" ->
+ "Connects Visor console to grid using Ignite configuration from provided file."
+ ),
+ emptyArgs = cmd.open,
+ withArgs = cmd.open
+ )
+
+ /**
+ * Singleton.
+ */
+ def apply() = cmd
+
+ /**
+ * Implicit converter from visor to commands "pimp".
+ *
+ * @param vs Visor tagging trait.
+ */
+ implicit def fromNode2Visor(vs: VisorTag): VisorOpenCommand = cmd
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
index 5f63f23..67e3d70 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
@@ -17,23 +17,17 @@
package org.apache.ignite.visor
-import org.apache.ignite.IgniteSystemProperties._
import org.apache.ignite._
import org.apache.ignite.cluster.{ClusterGroup, ClusterGroupEmptyException, ClusterMetrics, ClusterNode}
-import org.apache.ignite.configuration.IgniteConfiguration
import org.apache.ignite.events.EventType._
import org.apache.ignite.events.{DiscoveryEvent, Event}
-import org.apache.ignite.internal.IgniteComponentType._
import org.apache.ignite.internal.IgniteEx
import org.apache.ignite.internal.IgniteNodeAttributes._
import org.apache.ignite.internal.cluster.ClusterGroupEmptyCheckedException
import org.apache.ignite.internal.util.lang.{GridFunc => F}
-import org.apache.ignite.internal.util.spring.IgniteSpringHelper
import org.apache.ignite.internal.util.typedef._
import org.apache.ignite.internal.util.{GridConfigurationFinder, IgniteUtils => U}
import org.apache.ignite.lang._
-import org.apache.ignite.logger.NullLogger
-import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi
import org.apache.ignite.thread.IgniteThreadPoolExecutor
import org.apache.ignite.visor.commands.common.VisorTextTable
@@ -213,9 +207,6 @@ object visor extends VisorTag {
*/
private final val DFLT_LOG_PATH = "visor/visor-log"
- /** Default configuration path relative to Ignite home. */
- private final val DFLT_CFG = "config/default-config.xml"
-
/** Log file. */
private var logFile: File = null
@@ -429,42 +420,6 @@ object visor extends VisorTag {
withArgs = status
)
- addHelp(
- name = "open",
- shortInfo = "Connects Visor console to the grid.",
- longInfo = Seq(
- "Connects Visor console to the grid. Note that P2P class loading",
- "should be enabled on all nodes.",
- " ",
- "If neither '-cpath' or '-d' are provided, command will ask",
- "user to select Ignite configuration file in interactive mode."
- ),
- spec = Seq(
- "open -cpath=<path>",
- "open -d"
- ),
- args = Seq(
- "-cpath=<path>" -> Seq(
- "Ignite configuration path.",
- "Can be absolute, relative to Ignite home folder or any well formed URL."
- ),
- "-d" -> Seq(
- "Flag forces the command to connect to grid using default Ignite configuration file.",
- "without interactive mode."
- )
- ),
- examples = Seq(
- "open" ->
- "Prompts user to select Ignite configuration file in interactive mode.",
- "open -d" ->
- "Connects Visor console to grid using default Ignite configuration file.",
- "open -cpath=/gg/config/mycfg.xml" ->
- "Connects Visor console to grid using Ignite configuration from provided file."
- ),
- emptyArgs = open,
- withArgs = open
- )
-
/**
* @param name - command name.
*/
@@ -980,7 +935,7 @@ object visor extends VisorTag {
val sb = new StringBuilder()
- for (i <- 0 until lst.size if lst(i).nonEmpty || sb.size != 0) {
+ for (i <- 0 until lst.size if lst(i).nonEmpty || sb.nonEmpty) {
val arg = sb.toString + lst(i)
arg match {
@@ -1007,7 +962,7 @@ object visor extends VisorTag {
def hasArgValue(@Nullable v: String, args: ArgList): Boolean = {
assert(args != null)
- args.find(_._2 == v).nonEmpty
+ args.exists(_._2 == v)
}
/**
@@ -1019,7 +974,7 @@ object visor extends VisorTag {
def hasArgName(@Nullable n: String, args: ArgList): Boolean = {
assert(args != null)
- args.find(_._1 == n).nonEmpty
+ args.exists(_._1 == n)
}
/**
@@ -1032,7 +987,7 @@ object visor extends VisorTag {
def hasArgFlag(n: String, args: ArgList): Boolean = {
assert(n != null && args != null)
- args.find((a) => a._1 == n && a._2 == null).nonEmpty
+ args.exists((a) => a._1 == n && a._2 == null)
}
/**
@@ -1525,170 +1480,22 @@ object visor extends VisorTag {
private def blank(len: Int) = new String().padTo(len, ' ')
/**
- * ==Command==
- * Connects Visor console to default or named grid.
- *
- * ==Examples==
- * <ex>open -g=mygrid</ex>
- * Connects to 'mygrid' grid.
- *
- * @param args Command arguments.
- */
- def open(args: String) {
- assert(args != null)
-
- if (isConnected) {
- warn("Visor is already connected. Disconnect first.")
-
- return
- }
-
- try {
- def configuration(path: String): IgniteConfiguration = {
- assert(path != null)
-
- val url =
- try
- new URL(path)
- catch {
- case e: Exception =>
- val url = U.resolveIgniteUrl(path)
-
- if (url == null)
- throw new IgniteException("Ignite configuration path is invalid: " + path, e)
-
- url
- }
-
- // Add no-op logger to remove no-appender warning.
- val log4jTup =
- if (classOf[Ignition].getClassLoader.getResource("org/apache/log4j/Appender.class") != null)
- U.addLog4jNoOpLogger()
- else
- null
-
- val spring: IgniteSpringHelper = SPRING.create(false)
-
- val cfgs =
- try
- // Cache, IGFS, streamer and DR configurations should be excluded from daemon node config.
- spring.loadConfigurations(url, "cacheConfiguration", "fileSystemConfiguration",
- "streamerConfiguration", "drSenderConfiguration", "drReceiverConfiguration",
- "interopConfiguration", "indexingSpi").get1()
- finally {
- if (log4jTup != null)
- U.removeLog4jNoOpLogger(log4jTup)
- }
-
- if (cfgs == null || cfgs.isEmpty)
- throw new IgniteException("Can't find grid configuration in: " + url)
-
- if (cfgs.size > 1)
- throw new IgniteException("More than one grid configuration found in: " + url)
-
- val cfg = cfgs.iterator().next()
-
- // Setting up 'Config URL' for properly print in console.
- System.setProperty(IgniteSystemProperties.IGNITE_CONFIG_URL, url.getPath)
-
- var cpuCnt = Runtime.getRuntime.availableProcessors
-
- if (cpuCnt < 4)
- cpuCnt = 4
-
- cfg.setConnectorConfiguration(null)
-
- // All thread pools are overridden to have size equal to number of CPUs.
- cfg.setPublicThreadPoolSize(cpuCnt)
- cfg.setSystemThreadPoolSize(cpuCnt)
- cfg.setPeerClassLoadingThreadPoolSize(cpuCnt)
-
- var ioSpi = cfg.getCommunicationSpi
-
- if (ioSpi == null)
- ioSpi = new TcpCommunicationSpi()
-
- cfg
- }
-
- val argLst = parseArgs(args)
-
- val path = argValue("cpath", argLst)
- val dflt = hasArgFlag("d", argLst)
-
- val (cfg, cfgPath) =
- if (path.isDefined)
- (configuration(path.get), path.get)
- else if (dflt)
- (configuration(DFLT_CFG), "<default>")
- else {
- // If configuration file is not defined in arguments,
- // ask to choose from the list
- askConfigFile() match {
- case Some(p) =>
- nl()
-
- (VisorTextTable() +=("Using configuration", p)) render()
-
- nl()
-
- (configuration(p), p)
- case None =>
- return
- }
- }
-
- open(cfg, cfgPath)
- }
- catch {
- case e: IgniteException =>
- warn(e.getMessage)
- warn("Type 'help open' to see how to use this command.")
-
- status("q")
- }
- }
-
- /**
* Connects Visor console to configuration with path.
*
- * @param cfg Configuration.
+ * @param gridName Name of grid instance.
* @param cfgPath Configuration path.
*/
- def open(cfg: IgniteConfiguration, cfgPath: String) {
- val daemon = Ignition.isDaemon
-
- val shutdownHook = IgniteSystemProperties.getString(IGNITE_NO_SHUTDOWN_HOOK, "false")
-
- // Make sure Visor console starts as daemon node.
- Ignition.setDaemon(true)
-
- // Make sure visor starts without shutdown hook.
- System.setProperty(IGNITE_NO_SHUTDOWN_HOOK, "true")
-
- // Set NullLoger in quite mode.
- if ("true".equalsIgnoreCase(sys.props.getOrElse(IGNITE_QUIET, "true")))
- cfg.setGridLogger(new NullLogger)
-
- val startedGridName = try {
- Ignition.start(cfg).name
- }
- finally {
- Ignition.setDaemon(daemon)
-
- System.setProperty(IGNITE_NO_SHUTDOWN_HOOK, shutdownHook)
- }
-
+ def open(gridName: String, cfgPath: String) {
this.cfgPath = cfgPath
ignite =
try
- Ignition.ignite(startedGridName).asInstanceOf[IgniteEx]
+ Ignition.ignite(gridName).asInstanceOf[IgniteEx]
catch {
case _: IllegalStateException =>
this.cfgPath = null
- throw new IgniteException("Named grid unavailable: " + startedGridName)
+ throw new IgniteException("Named grid unavailable: " + gridName)
}
assert(cfgPath != null)
@@ -1824,18 +1631,6 @@ object visor extends VisorTag {
}
/**
- * ==Command==
- * Connects Visor console to the default grid.
- *
- * ==Example==
- * <ex>open</ex>
- * Connects to the default grid.
- */
- def open() {
- open("")
- }
-
- /**
* Returns string with node id8, its memory variable, if available, and its
* IP address (first internal address), if node is alive.
*
@@ -2016,7 +1811,7 @@ object visor extends VisorTag {
else if (nodes.size == 1)
Some(nodes.head.id)
else {
- (0 until nodes.size) foreach (i => {
+ nodes.indices foreach (i => {
val n = nodes(i)
val m = n.metrics
@@ -2080,7 +1875,7 @@ object visor extends VisorTag {
None
}
else {
- (0 until neighborhood.size) foreach (i => {
+ neighborhood.indices foreach (i => {
val neighbors = neighborhood(i)
var ips = immutable.Set.empty[String]
@@ -2229,7 +2024,7 @@ object visor extends VisorTag {
val ids = ignite.cluster.forRemotes().nodes().map(nid8).toList
- (0 until ids.size).foreach(i => println((i + 1) + ": " + ids(i)))
+ ids.indices.foreach(i => println((i + 1) + ": " + ids(i)))
nl()
@@ -2758,7 +2553,7 @@ object visor extends VisorTag {
help()
}
- lazy val commands = cmdLst.map(_.name) ++ cmdLst.map(_.aliases).flatten
+ lazy val commands = cmdLst.map(_.name) ++ cmdLst.flatMap(_.aliases)
def searchCmd(cmd: String) = cmdLst.find(c => c.name.equals(cmd) || (c.aliases != null && c.aliases.contains(cmd)))
@@ -2851,7 +2646,7 @@ object visor extends VisorTag {
var dec = BigDecimal.valueOf(0L)
- for (i <- 0 until octets.length) dec += octets(i).toLong * math.pow(256, octets.length - 1 - i).toLong
+ for (i <- octets.indices) dec += octets(i).toLong * math.pow(256, octets.length - 1 - i).toLong
dec
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/test/scala/org/apache/ignite/visor/VisorRuntimeBaseSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/VisorRuntimeBaseSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/VisorRuntimeBaseSpec.scala
index f27bae3..1c5e232 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/VisorRuntimeBaseSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/VisorRuntimeBaseSpec.scala
@@ -19,6 +19,8 @@ package org.apache.ignite.visor
import org.apache.ignite.Ignition
import org.apache.ignite.configuration.IgniteConfiguration
+import org.apache.ignite.visor.commands.open.VisorOpenCommand._
+
import org.scalatest._
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala
index 2c659b5..4719606 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala
@@ -20,6 +20,7 @@ package org.apache.ignite.visor.commands.kill
import org.apache.ignite.visor.visor
import org.scalatest._
+import org.apache.ignite.visor.commands.open.VisorOpenCommand._
import org.apache.ignite.visor.commands.kill.VisorKillCommand._
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala
index c6404b5..49a861c 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala
@@ -20,6 +20,7 @@ package org.apache.ignite.visor.commands.start
import org.apache.ignite.visor.visor
import org.scalatest._
+import org.apache.ignite.visor.commands.open.VisorOpenCommand._
import org.apache.ignite.visor.commands.start.VisorStartCommand._
import org.apache.ignite.visor.commands.top.VisorTopologyCommand._
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala
index db07543..fe364bc 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala
@@ -26,6 +26,7 @@ import org.scalatest._
import java.util
+import org.apache.ignite.visor.commands.open.VisorOpenCommand._
import org.apache.ignite.visor.commands.tasks.VisorTasksCommand._
import scala.collection.JavaConversions._
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala
index 1a4bc3e..022f6d6 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala
@@ -20,6 +20,7 @@ package org.apache.ignite.visor.commands.vvm
import org.apache.ignite.visor.visor
import org.scalatest._
+import org.apache.ignite.visor.commands.open.VisorOpenCommand._
import org.apache.ignite.visor.commands.vvm.VisorVvmCommand._
/**
[04/41] incubator-ignite git commit: # ignite-gg-10416 Fixed exclude
nested beans with missing classes.
Posted by iv...@apache.org.
# ignite-gg-10416 Fixed exclude nested beans with missing 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/99b82841
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/99b82841
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/99b82841
Branch: refs/heads/ignite-964-1
Commit: 99b82841e31d48580f5320d8d46e905b284f27e9
Parents: ce31bae
Author: Andrey <an...@gridgain.com>
Authored: Thu Jun 18 16:21:58 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jun 18 16:21:58 2015 +0700
----------------------------------------------------------------------
.../util/spring/IgniteSpringHelperImpl.java | 59 +++++++++------
.../IgniteStartExcludesConfigurationTest.java | 80 ++++++++++++++++++++
.../org/apache/ignite/spring/sprint-exclude.xml | 57 ++++++++++++++
3 files changed, 172 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/99b82841/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
index e9f88ad..df53ca7 100644
--- a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
+++ b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
@@ -423,37 +423,38 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
BeanFactoryPostProcessor postProc = new BeanFactoryPostProcessor() {
/**
- * @param beanFactory The bean factory used by the application context.
- * @param beanName Bean name.
* @param def Registered BeanDefinition.
* @throws BeansException in case of errors.
*/
- private void processBeanDefinition(ConfigurableListableBeanFactory beanFactory, String beanName,
- BeanDefinition def) throws BeansException {
- if (def.getBeanClassName() != null) {
- try {
- Class.forName(def.getBeanClassName());
+ private void processNested(BeanDefinition def) throws BeansException {
+ MutablePropertyValues vals = def.getPropertyValues();
+
+ for (PropertyValue val : new ArrayList<>(vals.getPropertyValueList())) {
+ for (String excludedProp : excludedProps) {
+ if (val.getName().equals(excludedProp)) {
+ vals.removePropertyValue(val);
+
+ return;
+ }
+ }
- MutablePropertyValues vals = def.getPropertyValues();
+ if (val.getValue() instanceof Collection) {
+ Collection<?> nestedVals = (Collection) val.getValue();
- for (PropertyValue val : new ArrayList<>(vals.getPropertyValueList())) {
- for (String excludedProp : excludedProps) {
- if (val.getName().equals(excludedProp)) {
- vals.removePropertyValue(val);
+ for (Object item : new ArrayList<>(nestedVals))
+ if (item instanceof BeanDefinitionHolder) {
+ BeanDefinitionHolder holder = (BeanDefinitionHolder)item;
- return;
+ try {
+ if (holder.getBeanDefinition().getBeanClassName() != null)
+ Class.forName(holder.getBeanDefinition().getBeanClassName());
+
+ processNested(holder.getBeanDefinition());
+ }
+ catch (ClassNotFoundException ignored) {
+ nestedVals.remove(item);
}
}
-
- if (val.getValue() instanceof Iterable)
- for (Object beanDef : (Iterable)val.getValue())
- if (beanDef instanceof BeanDefinitionHolder)
- processBeanDefinition(beanFactory, beanName,
- ((BeanDefinitionHolder)beanDef).getBeanDefinition());
- }
- }
- catch (ClassNotFoundException ignored) {
- ((BeanDefinitionRegistry) beanFactory).removeBeanDefinition(beanName);
}
}
}
@@ -462,7 +463,17 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
@Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
throws BeansException {
for (String beanName : beanFactory.getBeanDefinitionNames())
- processBeanDefinition(beanFactory, beanName, beanFactory.getBeanDefinition(beanName));
+ try {
+ BeanDefinition def = beanFactory.getBeanDefinition(beanName);
+
+ if (def.getBeanClassName() != null)
+ Class.forName(def.getBeanClassName());
+
+ processNested(def);
+ }
+ catch (ClassNotFoundException ignored) {
+ ((BeanDefinitionRegistry)beanFactory).removeBeanDefinition(beanName);
+ }
}
};
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/99b82841/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartExcludesConfigurationTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartExcludesConfigurationTest.java b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartExcludesConfigurationTest.java
new file mode 100644
index 0000000..f1332e0
--- /dev/null
+++ b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartExcludesConfigurationTest.java
@@ -0,0 +1,80 @@
+/*
+ * 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.spring;
+
+import org.apache.ignite.cache.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.util.spring.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.net.*;
+import java.util.*;
+
+import static org.apache.ignite.internal.IgniteComponentType.*;
+
+/**
+ * Checks exclude properties in spring, exclude beans with not existing classes.
+ */
+public class IgniteStartExcludesConfigurationTest extends GridCommonAbstractTest {
+ /** Tests spring exclude properties. */
+ public void testExcludes() throws Exception {
+ URL cfgLocation = U.resolveIgniteUrl(
+ "modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml");
+
+ IgniteSpringHelper spring = SPRING.create(false);
+
+ Collection<IgniteConfiguration> cfgs = spring.loadConfigurations(cfgLocation, "typeMetadata").get1();
+
+ assert cfgs != null && cfgs.size() == 1;
+
+ IgniteConfiguration cfg = cfgs.iterator().next();
+
+ assert cfg.getCacheConfiguration().length == 1;
+
+ assert cfg.getCacheConfiguration()[0].getTypeMetadata() == null;
+
+ cfgs = spring.loadConfigurations(cfgLocation, "keyType").get1();
+
+ assert cfgs != null && cfgs.size() == 1;
+
+ cfg = cfgs.iterator().next();
+
+ assert cfg.getCacheConfiguration().length == 1;
+
+ Collection<CacheTypeMetadata> typeMetadatas = cfg.getCacheConfiguration()[0].getTypeMetadata();
+
+ assert typeMetadatas.size() == 1;
+
+ assert typeMetadatas.iterator().next().getKeyType() == null;
+
+ cfgs = spring.loadConfigurations(cfgLocation).get1();
+
+ assert cfgs != null && cfgs.size() == 1;
+
+ cfg = cfgs.iterator().next();
+
+ assert cfg.getCacheConfiguration().length == 1;
+
+ typeMetadatas = cfg.getCacheConfiguration()[0].getTypeMetadata();
+
+ assert typeMetadatas.size() == 1;
+
+ assert "java.lang.Integer".equals(typeMetadatas.iterator().next().getKeyType());
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/99b82841/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml b/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
new file mode 100644
index 0000000..494f786
--- /dev/null
+++ b/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
@@ -0,0 +1,57 @@
+<?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.
+-->
+
+<!--
+ GridGain Spring configuration file to startup grid cache.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd">
+ <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+ <!-- Cache configurations (all properties are optional). -->
+ <property name="cacheConfiguration">
+ <list>
+ <bean class="org.apache.ignite.configuration.CacheConfiguration">
+ <!-- Configure type metadata to enable queries. -->
+ <property name="typeMetadata">
+ <list>
+ <bean class="org.apache.ignite.cache.CacheTypeMetadata">
+ <property name="keyType" value="java.lang.Integer"/>
+ <property name="valueType" value="Organization"/>
+ <property name="ascendingFields">
+ <map>
+ <entry key="name" value="java.lang.String"/>
+ </map>
+ </property>
+ </bean>
+ <bean class="org.apache.ignite.cache.CacheTypeMetadata2"/>
+ </list>
+ </property>
+ </bean>
+ </list>
+ </property>
+ </bean>
+
+ <bean id="grid.cfg.failed" class="org.apache.ignite.configuration.IgniteConfiguration2"/>
+</beans>
[37/41] incubator-ignite git commit: Merge branches 'ignite-gg-10416'
and 'ignite-sprint-7' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10416
Posted by iv...@apache.org.
Merge branches 'ignite-gg-10416' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10416
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/beb697af
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/beb697af
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/beb697af
Branch: refs/heads/ignite-964-1
Commit: beb697afabec3342195d301d1c68a58b3154b689
Parents: fcff50e ea90d86
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Jul 3 10:07:42 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Jul 3 10:07:42 2015 +0700
----------------------------------------------------------------------
.../java/org/apache/ignite/IgniteCache.java | 5 +
.../apache/ignite/IgniteSystemProperties.java | 3 +
.../apache/ignite/internal/IgniteKernal.java | 1 -
.../managers/communication/GridIoManager.java | 124 +++++++--
.../managers/communication/GridIoMessage.java | 15 +-
.../managers/communication/GridIoPolicy.java | 32 +--
.../eventstorage/GridEventStorageManager.java | 2 +-
.../processors/cache/CacheOperationContext.java | 44 +++-
.../internal/processors/cache/CacheType.java | 8 +-
.../processors/cache/GridCacheAdapter.java | 91 ++++---
.../processors/cache/GridCacheAtomicFuture.java | 12 +-
.../processors/cache/GridCacheContext.java | 4 +-
.../processors/cache/GridCacheIoManager.java | 12 +-
.../processors/cache/GridCacheMvccManager.java | 8 +-
.../processors/cache/GridCacheProxyImpl.java | 10 +-
.../processors/cache/GridCacheSwapManager.java | 257 ++++++++++++-------
.../processors/cache/GridCacheUtils.java | 42 +++
.../processors/cache/IgniteCacheProxy.java | 36 ++-
.../GridDistributedTxFinishRequest.java | 11 +-
.../GridDistributedTxPrepareRequest.java | 9 +-
.../GridDistributedTxRemoteAdapter.java | 3 +-
.../distributed/dht/GridDhtTxFinishRequest.java | 3 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 3 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 3 +-
.../cache/distributed/dht/GridDhtTxRemote.java | 5 +-
.../dht/atomic/GridDhtAtomicCache.java | 18 +-
.../dht/atomic/GridDhtAtomicUpdateFuture.java | 15 +-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 177 +++++++++++--
.../near/GridNearTxFinishRequest.java | 3 +-
.../cache/distributed/near/GridNearTxLocal.java | 3 +-
.../distributed/near/GridNearTxRemote.java | 5 +-
.../cache/transactions/IgniteInternalTx.java | 3 +-
.../cache/transactions/IgniteTxAdapter.java | 11 +-
.../transactions/IgniteTxLocalAdapter.java | 3 +-
.../datastructures/GridCacheAtomicLongImpl.java | 25 +-
.../GridCacheAtomicSequenceImpl.java | 11 +-
.../GridCacheAtomicStampedImpl.java | 21 +-
.../GridCacheCountDownLatchImpl.java | 16 +-
.../internal/processors/igfs/IgfsContext.java | 5 +-
.../plugin/IgnitePluginProcessor.java | 3 +-
.../plugin/extensions/communication/IoPool.java | 42 +++
.../communication/tcp/TcpCommunicationSpi.java | 2 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 5 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 5 +-
.../TcpDiscoveryMulticastIpFinder.java | 2 +-
.../communication/GridIoManagerSelfTest.java | 2 +-
.../cache/IgniteInternalCacheTypesTest.java | 3 +-
.../IgniteCachePutRetryAbstractSelfTest.java | 147 +++++++++++
.../dht/IgniteCachePutRetryAtomicSelfTest.java | 34 +++
...gniteCachePutRetryTransactionalSelfTest.java | 74 ++++++
...eAtomicInvalidPartitionHandlingSelfTest.java | 5 +-
.../GridCacheEvictionFilterSelfTest.java | 2 -
.../inmemory/GridTestSwapSpaceSpi.java | 3 +-
.../IgniteCacheFailoverTestSuite.java | 3 +
.../query/h2/opt/GridH2KeyValueRowOffheap.java | 8 +-
.../processors/query/h2/opt/GridH2Table.java | 2 +-
.../cache/IgniteCacheOffheapEvictQueryTest.java | 2 +-
.../IgniteCacheQueryMultiThreadedSelfTest.java | 4 +-
...QueryOffheapEvictsMultiThreadedSelfTest.java | 5 -
.../IgniteCacheQueryNodeRestartSelfTest2.java | 5 +
modules/urideploy/pom.xml | 14 -
61 files changed, 1053 insertions(+), 378 deletions(-)
----------------------------------------------------------------------
[05/41] incubator-ignite git commit: # ignite-gg-10416 Fixed exclude
nested beans with missing classes.
Posted by iv...@apache.org.
# ignite-gg-10416 Fixed exclude nested beans with missing 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/e5fba8b3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e5fba8b3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e5fba8b3
Branch: refs/heads/ignite-964-1
Commit: e5fba8b3a04d982e9b4c1617be416a77880e78ef
Parents: 99b8284
Author: Andrey <an...@gridgain.com>
Authored: Thu Jun 18 16:23:40 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jun 18 16:23:40 2015 +0700
----------------------------------------------------------------------
.../java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e5fba8b3/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java
index 0c2e99e..3ff927a 100644
--- a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java
+++ b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java
@@ -40,6 +40,8 @@ public class IgniteSpringTestSuite extends TestSuite {
suite.addTest(IgniteResourceSelfTestSuite.suite());
+ suite.addTest(new TestSuite(IgniteStartExcludesConfigurationTest.class));
+
// Tests moved to this suite since they require Spring functionality.
suite.addTest(new TestSuite(GridP2PUserVersionChangeSelfTest.class));
[18/41] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-2
Posted by iv...@apache.org.
Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-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/211ad65c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/211ad65c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/211ad65c
Branch: refs/heads/ignite-964-1
Commit: 211ad65cff1a7c3997e865668dfc51e44aefe0c0
Parents: 4902e8f b29ff1c
Author: S.Vladykin <sv...@gridgain.com>
Authored: Wed Jun 24 18:41:48 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Wed Jun 24 18:41:48 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheContext.java | 2 +-
.../distributed/dht/GridDhtLockFuture.java | 2 +-
.../GridDhtPartitionsExchangeFuture.java | 46 +-
.../datastructures/DataStructuresProcessor.java | 64 +--
.../CacheReadThroughAtomicRestartSelfTest.java | 32 ++
...heReadThroughLocalAtomicRestartSelfTest.java | 32 ++
.../CacheReadThroughLocalRestartSelfTest.java | 32 ++
...dThroughReplicatedAtomicRestartSelfTest.java | 32 ++
...cheReadThroughReplicatedRestartSelfTest.java | 32 ++
.../cache/CacheReadThroughRestartSelfTest.java | 133 ++++++
.../cache/GridCacheAbstractSelfTest.java | 2 +-
...eDynamicCacheStartNoExchangeTimeoutTest.java | 466 +++++++++++++++++++
.../cache/IgniteDynamicCacheStartSelfTest.java | 37 ++
...GridCacheQueueMultiNodeAbstractSelfTest.java | 4 +-
.../GridCacheSetAbstractSelfTest.java | 22 +-
.../IgniteDataStructureWithJobTest.java | 111 +++++
.../distributed/IgniteCache150ClientsTest.java | 189 ++++++++
...teCacheClientNodePartitionsExchangeTest.java | 1 +
.../distributed/IgniteCacheManyClientsTest.java | 1 +
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 5 -
...achePartitionedMultiNodeFullApiSelfTest.java | 49 +-
.../IgniteCacheTxStoreSessionTest.java | 4 +
.../IgniteCacheDataStructuresSelfTestSuite.java | 1 +
.../testsuites/IgniteCacheTestSuite4.java | 8 +
.../testsuites/IgniteClientTestSuite.java | 38 ++
25 files changed, 1263 insertions(+), 82 deletions(-)
----------------------------------------------------------------------
[35/41] incubator-ignite git commit: IGNITE-621 - Merge branch
ignite-621 into sprint-7
Posted by iv...@apache.org.
IGNITE-621 - Merge branch ignite-621 into 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/1427d75b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1427d75b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1427d75b
Branch: refs/heads/ignite-964-1
Commit: 1427d75b9ea46d3044caddc51b44c03abc71901d
Parents: c866902 ac93958
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Thu Jul 2 12:10:09 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Thu Jul 2 12:10:09 2015 -0700
----------------------------------------------------------------------
.../java/org/apache/ignite/IgniteCache.java | 5 +
.../apache/ignite/IgniteSystemProperties.java | 3 +
.../processors/cache/CacheOperationContext.java | 44 ++++-
.../processors/cache/GridCacheAdapter.java | 91 ++++++----
.../processors/cache/GridCacheAtomicFuture.java | 12 +-
.../processors/cache/GridCacheMvccManager.java | 8 +-
.../processors/cache/GridCacheProxyImpl.java | 10 +-
.../processors/cache/GridCacheUtils.java | 42 +++++
.../processors/cache/IgniteCacheProxy.java | 36 +++-
.../dht/atomic/GridDhtAtomicCache.java | 18 +-
.../dht/atomic/GridDhtAtomicUpdateFuture.java | 15 +-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 177 +++++++++++++++++--
.../datastructures/GridCacheAtomicLongImpl.java | 25 +--
.../GridCacheAtomicSequenceImpl.java | 11 +-
.../GridCacheAtomicStampedImpl.java | 21 +--
.../GridCacheCountDownLatchImpl.java | 16 +-
.../communication/tcp/TcpCommunicationSpi.java | 2 +-
.../IgniteCachePutRetryAbstractSelfTest.java | 147 +++++++++++++++
.../dht/IgniteCachePutRetryAtomicSelfTest.java | 34 ++++
...gniteCachePutRetryTransactionalSelfTest.java | 74 ++++++++
...eAtomicInvalidPartitionHandlingSelfTest.java | 5 +-
.../IgniteCacheFailoverTestSuite.java | 3 +
22 files changed, 665 insertions(+), 134 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1427d75b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
[09/41] incubator-ignite git commit: IGNITE-621 - Retries.
Posted by iv...@apache.org.
IGNITE-621 - Retries.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c94c0c47
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c94c0c47
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c94c0c47
Branch: refs/heads/ignite-964-1
Commit: c94c0c475b8d8ac5c31302235d0de36f791fc3a0
Parents: 5505b4d
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Sun Jun 21 22:40:01 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Sun Jun 21 22:40:01 2015 -0700
----------------------------------------------------------------------
.../dht/atomic/GridNearAtomicUpdateFuture.java | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c94c0c47/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index 53150cc..536eb40 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -338,19 +338,21 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
cctx.mvcc().removeAtomicFuture(version());
Collection<Object> remapKeys = new ArrayList<>(failed.size());
- Collection<Object> remapVals = new ArrayList<>(failed.size());
+ Collection<Object> remapVals = vals != null ? new ArrayList<>(failed.size()) : null;
Iterator<?> keyIt = keys.iterator();
- Iterator<?> valsIt = vals.iterator();
+ Iterator<?> valsIt = vals != null ? vals.iterator() : null;
for (Object key : failed) {
while (keyIt.hasNext()) {
Object nextKey = keyIt.next();
- Object nextVal = valsIt.next();
+ Object nextVal = valsIt != null ? valsIt.next() : null;
if (F.eq(key, nextKey)) {
remapKeys.add(nextKey);
- remapVals.add(nextVal);
+
+ if (remapVals != null)
+ remapVals.add(nextVal);
break;
}
@@ -388,8 +390,13 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
if (op == TRANSFORM && retval == null)
retval = Collections.emptyMap();
- if (err != null && X.hasCause(err, CachePartialUpdateCheckedException.class) && remapCnt.decrementAndGet() > 0) {
- remap(X.cause(err, CachePartialUpdateCheckedException.class).failedKeys());
+ if (err != null && X.hasCause(err, CachePartialUpdateCheckedException.class) &&
+ X.hasCause(err, ClusterTopologyCheckedException.class) &&
+ remapCnt.decrementAndGet() > 0) {
+
+ CachePartialUpdateCheckedException cause = X.cause(err, CachePartialUpdateCheckedException.class);
+
+ remap(cause.failedKeys());
return false;
}
[34/41] incubator-ignite git commit: Merge branches 'ignite-973-2'
and 'ignite-sprint-7' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-2
Posted by iv...@apache.org.
Merge branches 'ignite-973-2' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-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/a0a31e22
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a0a31e22
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a0a31e22
Branch: refs/heads/ignite-964-1
Commit: a0a31e221b215a3ac0477d083064200991c241e2
Parents: cbbb6a1 c866902
Author: S.Vladykin <sv...@gridgain.com>
Authored: Thu Jul 2 10:56:22 2015 -0700
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Thu Jul 2 10:56:22 2015 -0700
----------------------------------------------------------------------
.../apache/ignite/internal/IgniteKernal.java | 1 -
.../managers/communication/GridIoManager.java | 124 +++++++++++++++----
.../managers/communication/GridIoMessage.java | 15 ++-
.../managers/communication/GridIoPolicy.java | 32 ++---
.../eventstorage/GridEventStorageManager.java | 2 +-
.../internal/processors/cache/CacheType.java | 8 +-
.../processors/cache/GridCacheContext.java | 4 +-
.../processors/cache/GridCacheIoManager.java | 12 +-
.../GridDistributedTxFinishRequest.java | 11 +-
.../GridDistributedTxPrepareRequest.java | 9 +-
.../GridDistributedTxRemoteAdapter.java | 3 +-
.../distributed/dht/GridDhtTxFinishRequest.java | 3 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 3 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 3 +-
.../cache/distributed/dht/GridDhtTxRemote.java | 5 +-
.../near/GridNearTxFinishRequest.java | 3 +-
.../cache/distributed/near/GridNearTxLocal.java | 3 +-
.../distributed/near/GridNearTxRemote.java | 5 +-
.../cache/transactions/IgniteInternalTx.java | 3 +-
.../cache/transactions/IgniteTxAdapter.java | 11 +-
.../transactions/IgniteTxLocalAdapter.java | 3 +-
.../internal/processors/igfs/IgfsContext.java | 5 +-
.../plugin/IgnitePluginProcessor.java | 3 +-
.../plugin/extensions/communication/IoPool.java | 42 +++++++
.../ignite/spi/discovery/tcp/ClientImpl.java | 5 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 5 +-
.../TcpDiscoveryMulticastIpFinder.java | 2 +-
.../communication/GridIoManagerSelfTest.java | 2 +-
.../cache/IgniteInternalCacheTypesTest.java | 3 +-
.../GridCacheEvictionFilterSelfTest.java | 2 -
.../extdata/uri/modules/uri-dependency/pom.xml | 30 ++---
.../deployment/uri/tasks/gar-spring-bean.xml | 30 ++---
modules/urideploy/pom.xml | 14 ---
33 files changed, 239 insertions(+), 167 deletions(-)
----------------------------------------------------------------------
[38/41] incubator-ignite git commit: #ignite-964: wip.
Posted by iv...@apache.org.
#ignite-964: wip.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2d1669ed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2d1669ed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2d1669ed
Branch: refs/heads/ignite-964-1
Commit: 2d1669edf72635bf63f26c045c4d419b07bd312e
Parents: 27bfca2
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Jul 3 16:32:38 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Jul 3 16:32:38 2015 +0300
----------------------------------------------------------------------
.../processors/rest/handlers/scripting/JSONCacheObject.java | 1 -
.../internal/processors/scripting/IgniteScriptProcessor.java | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2d1669ed/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/JSONCacheObject.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/JSONCacheObject.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/JSONCacheObject.java
index 0725b89..b8f7510 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/JSONCacheObject.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/JSONCacheObject.java
@@ -203,7 +203,6 @@ public class JSONCacheObject implements JSObject {
}
@Override public double toNumber() {
- System.out.println("!!!!toNumber");
return 0;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2d1669ed/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptProcessor.java
index 950c956..54a178e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptProcessor.java
@@ -30,7 +30,7 @@ import static javax.script.ScriptContext.*;
*/
public class IgniteScriptProcessor extends GridProcessorAdapter {
/** Javascript engine name. */
- public static final String JAVA_SCRIPT_ENGINE_NAME = "JavaScript";
+ public static final String JAVA_SCRIPT_ENGINE_NAME = "nashorn";
/** Javascript engine. */
private ScriptEngine jsEngine;
[10/41] incubator-ignite git commit: Merge branch 'ignite-sprint-6'
of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-621
Posted by iv...@apache.org.
Merge branch 'ignite-sprint-6' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-621
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a4e31be6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a4e31be6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a4e31be6
Branch: refs/heads/ignite-964-1
Commit: a4e31be6a018f1711ec0cb385c6b88b35c9dffed
Parents: c94c0c4 285d790
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Mon Jun 22 15:29:47 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Mon Jun 22 15:29:47 2015 -0700
----------------------------------------------------------------------
.../apache/ignite/IgniteSystemProperties.java | 3 +
.../ignite/internal/MarshallerContextImpl.java | 12 +-
.../processors/cache/GridCacheIoManager.java | 64 ++++--
.../GridCachePartitionExchangeManager.java | 70 +++----
.../processors/cache/GridCacheSwapManager.java | 12 +-
.../GridDhtPartitionsExchangeFuture.java | 49 +++--
.../offheap/GridOffHeapProcessor.java | 19 +-
.../apache/ignite/internal/util/GridDebug.java | 37 ++--
.../communication/tcp/TcpCommunicationSpi.java | 61 +++---
.../tcp/TcpCommunicationSpiMBean.java | 8 +
.../ignite/spi/discovery/tcp/ClientImpl.java | 68 ++++---
.../GridCacheAbstractFailoverSelfTest.java | 6 +-
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 +++++++++++
.../GridTcpCommunicationSpiConfigSelfTest.java | 1 -
.../testsuites/IgniteCacheTestSuite3.java | 1 +
.../processors/query/h2/IgniteH2Indexing.java | 2 +
.../query/h2/twostep/GridMapQueryExecutor.java | 23 ++-
.../cache/IgniteCacheOffheapEvictQueryTest.java | 196 +++++++++++++++++++
.../IgniteCacheQuerySelfTestSuite.java | 1 +
19 files changed, 590 insertions(+), 162 deletions(-)
----------------------------------------------------------------------
[40/41] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
into ignite-964-1
Posted by iv...@apache.org.
Merge branch 'ignite-sprint-7' into ignite-964-1
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4d81938b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4d81938b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4d81938b
Branch: refs/heads/ignite-964-1
Commit: 4d81938b9112b8316a81f5e43c075241d7798e61
Parents: 2d1669e 7828d19
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Jul 3 17:00:15 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Jul 3 17:00:15 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/IgniteCache.java | 5 +
.../apache/ignite/IgniteSystemProperties.java | 3 +
.../processors/cache/CacheOperationContext.java | 44 ++-
.../processors/cache/GridCacheAdapter.java | 91 +++---
.../processors/cache/GridCacheAtomicFuture.java | 12 +-
.../processors/cache/GridCacheMvccManager.java | 8 +-
.../processors/cache/GridCacheProxyImpl.java | 10 +-
.../processors/cache/GridCacheSwapManager.java | 257 +++++++++------
.../processors/cache/GridCacheUtils.java | 42 +++
.../processors/cache/IgniteCacheProxy.java | 36 ++-
.../dht/atomic/GridDhtAtomicCache.java | 18 +-
.../dht/atomic/GridDhtAtomicUpdateFuture.java | 15 +-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 177 ++++++++--
.../datastructures/GridCacheAtomicLongImpl.java | 25 +-
.../GridCacheAtomicSequenceImpl.java | 11 +-
.../GridCacheAtomicStampedImpl.java | 21 +-
.../GridCacheCountDownLatchImpl.java | 16 +-
.../communication/tcp/TcpCommunicationSpi.java | 2 +-
.../IgniteCachePutRetryAbstractSelfTest.java | 147 +++++++++
.../dht/IgniteCachePutRetryAtomicSelfTest.java | 34 ++
...gniteCachePutRetryTransactionalSelfTest.java | 74 +++++
...eAtomicInvalidPartitionHandlingSelfTest.java | 5 +-
.../GridCachePartitionedFailoverSelfTest.java | 5 +
.../GridCacheEvictionFilterSelfTest.java | 2 -
.../inmemory/GridTestSwapSpaceSpi.java | 3 +-
.../IgniteCacheFailoverTestSuite.java | 3 +
.../query/h2/opt/GridH2KeyValueRowOffheap.java | 8 +-
.../processors/query/h2/opt/GridH2Table.java | 2 +-
.../cache/IgniteCacheOffheapEvictQueryTest.java | 2 +-
.../IgniteCacheQueryMultiThreadedSelfTest.java | 4 +-
...QueryOffheapEvictsMultiThreadedSelfTest.java | 5 -
.../IgniteCacheQueryNodeRestartSelfTest2.java | 5 +
.../util/spring/IgniteSpringHelperImpl.java | 72 +++--
.../IgniteExcludeInConfigurationTest.java | 78 +++++
.../org/apache/ignite/spring/sprint-exclude.xml | 57 ++++
.../testsuites/IgniteSpringTestSuite.java | 2 +
.../ignite/visor/commands/VisorConsole.scala | 3 +-
.../visor/commands/open/VisorOpenCommand.scala | 319 +++++++++++++++++++
.../scala/org/apache/ignite/visor/visor.scala | 230 +------------
.../ignite/visor/VisorRuntimeBaseSpec.scala | 2 +
.../commands/kill/VisorKillCommandSpec.scala | 1 +
.../commands/start/VisorStartCommandSpec.scala | 1 +
.../commands/tasks/VisorTasksCommandSpec.scala | 1 +
.../commands/vvm/VisorVvmCommandSpec.scala | 1 +
44 files changed, 1379 insertions(+), 480 deletions(-)
----------------------------------------------------------------------
[33/41] incubator-ignite git commit: ignite-820
GridCacheEvictionFilterSelfTest#testPartitionedMixed enabled
Posted by iv...@apache.org.
ignite-820 GridCacheEvictionFilterSelfTest#testPartitionedMixed enabled
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c866902b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c866902b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c866902b
Branch: refs/heads/ignite-964-1
Commit: c866902b2abbedd26ef1d968aabae1cd74657c95
Parents: b437ec7
Author: agura <ag...@gridgain.com>
Authored: Thu Jul 2 16:10:25 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Thu Jul 2 16:10:25 2015 +0300
----------------------------------------------------------------------
.../processors/cache/eviction/GridCacheEvictionFilterSelfTest.java | 2 --
1 file changed, 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c866902b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
index ea926ee..3cdb3d9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
@@ -185,8 +185,6 @@ public class GridCacheEvictionFilterSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testPartitionedMixed() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-820");
-
mode = PARTITIONED;
nearEnabled = false;
[24/41] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
into ignite-gg-10416
Posted by iv...@apache.org.
Merge branch 'ignite-sprint-7' into ignite-gg-10416
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7e82a682
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7e82a682
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7e82a682
Branch: refs/heads/ignite-964-1
Commit: 7e82a6826233f94c1601d0c68526a179d5d1104b
Parents: 0acdc2f c6187a9
Author: Andrey <an...@gridgain.com>
Authored: Mon Jun 29 13:32:10 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Mon Jun 29 13:32:10 2015 +0700
----------------------------------------------------------------------
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
.../s3/S3CheckpointManagerSelfTest.java | 2 +-
.../checkpoint/s3/S3CheckpointSpiSelfTest.java | 4 +-
.../s3/S3CheckpointSpiStartStopSelfTest.java | 2 +-
.../s3/S3SessionCheckpointSelfTest.java | 2 +-
.../s3/TcpDiscoveryS3IpFinderSelfTest.java | 2 +-
modules/clients/pom.xml | 2 +-
.../ClientAbstractConnectivitySelfTest.java | 4 +-
modules/cloud/pom.xml | 2 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 2 +-
.../apache/ignite/IgniteSystemProperties.java | 3 +
.../org/apache/ignite/cluster/ClusterGroup.java | 18 +-
.../org/apache/ignite/cluster/ClusterNode.java | 2 +
.../ignite/compute/ComputeTaskSplitAdapter.java | 2 +-
.../configuration/IgniteReflectionFactory.java | 81 +-
.../ignite/internal/GridKernalContextImpl.java | 3 +
.../ignite/internal/MarshallerContextImpl.java | 12 +-
.../client/GridClientConfiguration.java | 4 +-
.../internal/cluster/ClusterGroupAdapter.java | 50 +-
.../cluster/IgniteClusterAsyncImpl.java | 12 +-
.../internal/managers/GridManagerAdapter.java | 8 +-
.../discovery/GridDiscoveryManager.java | 30 +-
.../affinity/AffinityTopologyVersion.java | 7 -
.../processors/cache/GridCacheAdapter.java | 4 +
.../processors/cache/GridCacheContext.java | 2 +-
.../processors/cache/GridCacheIoManager.java | 64 +-
.../GridCachePartitionExchangeManager.java | 77 +-
.../processors/cache/GridCacheSwapManager.java | 12 +-
.../processors/cache/GridCacheUtils.java | 9 +
.../processors/cache/IgniteCacheProxy.java | 12 +
.../distributed/dht/GridDhtLocalPartition.java | 59 +-
.../distributed/dht/GridDhtLockFuture.java | 2 +-
.../dht/GridDhtPartitionTopologyImpl.java | 4 +-
.../dht/GridDhtPartitionsReservation.java | 292 +++++++
.../dht/GridDhtTransactionalCacheAdapter.java | 2 +-
.../cache/distributed/dht/GridReservable.java | 35 +
.../dht/atomic/GridDhtAtomicCache.java | 9 +-
.../dht/preloader/GridDhtPartitionMap.java | 26 +-
.../GridDhtPartitionsExchangeFuture.java | 95 ++-
.../cache/query/GridCacheQueryManager.java | 33 -
.../cache/query/GridCacheTwoStepQuery.java | 22 +-
.../continuous/CacheContinuousQueryHandler.java | 8 +
.../cache/transactions/IgniteTxHandler.java | 2 +-
.../transactions/IgniteTxLocalAdapter.java | 12 +-
.../datastructures/DataStructuresProcessor.java | 64 +-
.../dr/IgniteDrDataStreamerCacheUpdater.java | 7 +-
.../processors/hadoop/HadoopJobInfo.java | 4 +-
.../hadoop/counter/HadoopCounterWriter.java | 5 +-
.../offheap/GridOffHeapProcessor.java | 19 +-
.../processors/plugin/CachePluginManager.java | 10 +-
.../processors/query/GridQueryIndexing.java | 14 +-
.../processors/query/GridQueryProcessor.java | 21 +-
.../messages/GridQueryNextPageResponse.java | 34 +-
.../h2/twostep/messages/GridQueryRequest.java | 111 ++-
.../processors/rest/GridRestProcessor.java | 4 +-
.../handlers/task/GridTaskCommandHandler.java | 12 +-
.../processors/task/GridTaskProcessor.java | 23 +-
.../processors/task/GridTaskWorker.java | 4 +-
.../internal/util/GridConfigurationFinder.java | 55 +-
.../apache/ignite/internal/util/GridDebug.java | 48 +-
.../ignite/internal/util/IgniteUtils.java | 6 +-
.../ignite/internal/util/nio/GridNioServer.java | 64 +-
.../apache/ignite/internal/visor/VisorJob.java | 2 +
.../internal/visor/log/VisorLogSearchTask.java | 2 +-
.../visor/node/VisorNodeDataCollectorJob.java | 4 +
.../visor/query/VisorQueryCleanupTask.java | 14 +
.../util/VisorClusterGroupEmptyException.java | 33 +
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 7 +-
.../org/apache/ignite/spi/IgniteSpiContext.java | 9 +-
.../communication/tcp/TcpCommunicationSpi.java | 146 +++-
.../tcp/TcpCommunicationSpiMBean.java | 19 +
.../ignite/spi/discovery/DiscoverySpi.java | 3 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 229 ++++--
.../ignite/spi/discovery/tcp/ServerImpl.java | 155 +++-
.../spi/discovery/tcp/TcpDiscoveryImpl.java | 3 +-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 51 +-
.../tcp/internal/TcpDiscoveryNode.java | 18 +
.../messages/TcpDiscoveryNodeFailedMessage.java | 18 +
.../core/src/main/resources/ignite.properties | 2 +-
.../internal/ClusterGroupAbstractTest.java | 777 ++++++++++++++++++
.../internal/ClusterGroupHostsSelfTest.java | 141 ++++
.../ignite/internal/ClusterGroupSelfTest.java | 251 ++++++
.../internal/GridDiscoveryEventSelfTest.java | 12 +-
...ridFailFastNodeFailureDetectionSelfTest.java | 17 +-
.../internal/GridProjectionAbstractTest.java | 784 -------------------
.../ignite/internal/GridProjectionSelfTest.java | 251 ------
.../apache/ignite/internal/GridSelfTest.java | 22 +-
.../GridTaskFailoverAffinityRunTest.java | 170 ++++
.../IgniteSlowClientDetectionSelfTest.java | 187 +++++
.../CacheReadThroughAtomicRestartSelfTest.java | 32 +
...heReadThroughLocalAtomicRestartSelfTest.java | 32 +
.../CacheReadThroughLocalRestartSelfTest.java | 32 +
...dThroughReplicatedAtomicRestartSelfTest.java | 32 +
...cheReadThroughReplicatedRestartSelfTest.java | 32 +
.../cache/CacheReadThroughRestartSelfTest.java | 133 ++++
.../CacheStoreUsageMultinodeAbstractTest.java | 305 ++++++++
...eUsageMultinodeDynamicStartAbstractTest.java | 169 ++++
...oreUsageMultinodeDynamicStartAtomicTest.java | 32 +
...heStoreUsageMultinodeDynamicStartTxTest.java | 32 +
...reUsageMultinodeStaticStartAbstractTest.java | 158 ++++
...toreUsageMultinodeStaticStartAtomicTest.java | 32 +
...cheStoreUsageMultinodeStaticStartTxTest.java | 32 +
.../GridCacheAbstractFailoverSelfTest.java | 6 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 24 +-
.../cache/GridCacheAbstractSelfTest.java | 2 +-
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 +++
.../IgniteCacheAbstractStopBusySelfTest.java | 30 +-
.../IgniteCacheAtomicStopBusySelfTest.java | 8 +-
.../IgniteCacheP2pUnmarshallingTxErrorTest.java | 19 +-
...gniteCacheTransactionalStopBusySelfTest.java | 8 +-
...eDynamicCacheStartNoExchangeTimeoutTest.java | 466 +++++++++++
.../cache/IgniteDynamicCacheStartSelfTest.java | 37 +
...GridCacheQueueMultiNodeAbstractSelfTest.java | 4 +-
.../GridCacheSetAbstractSelfTest.java | 22 +-
.../IgniteDataStructureWithJobTest.java | 111 +++
.../distributed/IgniteCache150ClientsTest.java | 189 +++++
...teCacheClientNodePartitionsExchangeTest.java | 1 +
.../distributed/IgniteCacheManyClientsTest.java | 2 +
.../IgniteCacheTxMessageRecoveryTest.java | 5 +
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 5 -
...achePartitionedMultiNodeFullApiSelfTest.java | 53 +-
.../GridCacheReplicatedFailoverSelfTest.java | 5 +
.../IgniteCacheTxStoreSessionTest.java | 4 +
.../DataStreamerMultiThreadedSelfTest.java | 3 +
.../internal/util/IgniteUtilsSelfTest.java | 22 +
.../GridTcpCommunicationSpiConfigSelfTest.java | 1 -
.../tcp/TcpClientDiscoverySpiSelfTest.java | 265 ++++++-
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 44 +-
.../testframework/GridSpiTestContext.java | 7 +-
.../testframework/junits/GridAbstractTest.java | 2 +-
.../junits/GridTestKernalContext.java | 2 +-
.../junits/common/GridCommonAbstractTest.java | 8 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 7 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 1 +
.../ignite/testsuites/IgniteCacheTestSuite.java | 4 +-
.../testsuites/IgniteCacheTestSuite3.java | 1 +
.../testsuites/IgniteCacheTestSuite4.java | 12 +
.../testsuites/IgniteClientTestSuite.java | 38 +
.../testsuites/IgniteComputeGridTestSuite.java | 1 +
modules/extdata/p2p/pom.xml | 2 +-
.../p2p/GridP2PContinuousDeploymentTask1.java | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 80 +-
.../fs/IgniteHadoopFileSystemCounterWriter.java | 9 +-
.../processors/hadoop/HadoopClassLoader.java | 29 +
.../processors/hadoop/HadoopDefaultJobInfo.java | 27 +-
.../internal/processors/hadoop/HadoopUtils.java | 237 ------
.../hadoop/SecondaryFileSystemProvider.java | 3 +-
.../hadoop/fs/HadoopFileSystemCacheUtils.java | 241 ++++++
.../hadoop/fs/HadoopFileSystemsUtils.java | 11 +
.../hadoop/fs/HadoopLazyConcurrentMap.java | 5 +
.../hadoop/jobtracker/HadoopJobTracker.java | 25 +-
.../child/HadoopChildProcessRunner.java | 3 +-
.../processors/hadoop/v2/HadoopV2Job.java | 84 +-
.../hadoop/v2/HadoopV2JobResourceManager.java | 22 +-
.../hadoop/v2/HadoopV2TaskContext.java | 37 +-
.../apache/ignite/igfs/IgfsEventsTestSuite.java | 5 +-
.../processors/hadoop/HadoopMapReduceTest.java | 2 +-
.../processors/hadoop/HadoopTasksV1Test.java | 7 +-
.../processors/hadoop/HadoopTasksV2Test.java | 7 +-
.../processors/hadoop/HadoopV2JobSelfTest.java | 6 +-
.../collections/HadoopAbstractMapTest.java | 3 +-
.../testsuites/IgniteHadoopTestSuite.java | 2 +-
.../IgniteIgfsLinuxAndMacOSTestSuite.java | 3 +-
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
.../processors/query/h2/IgniteH2Indexing.java | 81 +-
.../query/h2/sql/GridSqlQuerySplitter.java | 49 +-
.../query/h2/twostep/GridMapQueryExecutor.java | 321 ++++++--
.../query/h2/twostep/GridMergeIndex.java | 17 +-
.../h2/twostep/GridMergeIndexUnsorted.java | 7 +-
.../h2/twostep/GridReduceQueryExecutor.java | 650 ++++++++++++---
.../query/h2/twostep/GridResultPage.java | 21 +-
.../cache/GridCacheCrossCacheQuerySelfTest.java | 3 +-
.../cache/IgniteCacheOffheapEvictQueryTest.java | 196 +++++
.../IgniteCacheQueryMultiThreadedSelfTest.java | 1 -
...QueryOffheapEvictsMultiThreadedSelfTest.java | 5 +
...lientQueryReplicatedNodeRestartSelfTest.java | 419 ++++++++++
.../IgniteCacheQueryNodeRestartSelfTest.java | 36 +-
.../IgniteCacheQueryNodeRestartSelfTest2.java | 383 +++++++++
.../IgniteCacheQuerySelfTestSuite.java | 5 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
.../cache/jta/GridCacheXAResource.java | 18 +-
.../processors/cache/GridCacheJtaSelfTest.java | 2 +-
modules/log4j/pom.xml | 2 +-
modules/mesos/pom.xml | 2 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar-2.10/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spark-2.10/pom.xml | 2 +-
modules/spark/pom.xml | 2 +-
modules/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console-2.10/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
.../commands/cache/VisorCacheCommand.scala | 7 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
.../IgniteWebSessionSelfTestSuite.java | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 2 +-
scripts/git-patch-prop.sh | 2 +-
213 files changed, 8348 insertions(+), 2249 deletions(-)
----------------------------------------------------------------------
[17/41] incubator-ignite git commit: ignite-973-2 - metrics tests
Posted by iv...@apache.org.
ignite-973-2 - metrics tests
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4902e8f6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4902e8f6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4902e8f6
Branch: refs/heads/ignite-964-1
Commit: 4902e8f657b02531afb72b097a85ffc951e61f9d
Parents: 108788b
Author: S.Vladykin <sv...@gridgain.com>
Authored: Wed Jun 24 18:41:38 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Wed Jun 24 18:41:38 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheSwapManager.java | 31 +++++++++++++-------
1 file changed, 20 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4902e8f6/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 7595a1d..9e9c958 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
@@ -584,14 +584,14 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
ClassLoader ldr = cctx.deploy().globalLoader();
- GridCacheQueryManager qryMgr = cctx.queries();
+ final GridCacheQueryManager qryMgr = cctx.queries();
if (qryMgr != null && !readSwapBeforeRemove(key, swapKey, ldr))
return null; // Not found.
swapMgr.remove(spaceName, swapKey, new CI1<byte[]>() {
@Override public void apply(byte[] rmv) {
- if (cctx.config().isStatisticsEnabled())
+ if (qryMgr == null && cctx.config().isStatisticsEnabled())
cctx.cache().metrics0().onSwapRead(rmv != null);
if (rmv != null) {
@@ -748,14 +748,14 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
else {
byte[] entryBytes = offheap.remove(spaceName, part, key, keyBytes);
- if (entryBytes != null) {
- if (cctx.config().isStatisticsEnabled())
- cctx.cache().metrics0().onOffHeapRemove();
+ if (cctx.config().isStatisticsEnabled()) {
+ cctx.cache().metrics0().onOffHeapRead(entryBytes != null);
- entry = swapEntry(unmarshalSwapEntry(entryBytes));
+ if (entryBytes != null)
+ cctx.cache().metrics0().onOffHeapRemove();
}
- else
- entry = null;
+
+ entry = entryBytes == null ? null : swapEntry(unmarshalSwapEntry(entryBytes));
}
return entry;
@@ -857,6 +857,9 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
unprocessedKeys,
new IgniteBiInClosure<SwapKey, byte[]>() {
@Override public void apply(SwapKey swapKey, byte[] rmv) {
+ if (qryMgr == null && cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onSwapRead(rmv != null);
+
if (rmv != null) {
try {
GridCacheSwapEntry entry = swapEntry(unmarshalSwapEntry(rmv));
@@ -974,10 +977,13 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
throws IgniteCheckedException {
assert cctx.queries() != null;
- byte[] val = offheap.get(spaceName, part, key, keyBytes);
+ byte[] entryBytes = offheap.get(spaceName, part, key, keyBytes);
+
+ if (cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onOffHeapRead(entryBytes != null);
- if (val != null) {
- GridCacheSwapEntry entry = swapEntry(unmarshalSwapEntry(val));
+ if (entryBytes != null) {
+ GridCacheSwapEntry entry = swapEntry(unmarshalSwapEntry(entryBytes));
if (entry != null) {
cctx.queries().onUnswap(key, entry.value());
@@ -1004,6 +1010,9 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
byte[] entryBytes = swapMgr.read(spaceName, swapKey, ldr);
+ if (cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onSwapRead(entryBytes != null);
+
if (entryBytes == null)
return false;
[15/41] incubator-ignite git commit: ignite-973-2 - swap read before
remove
Posted by iv...@apache.org.
ignite-973-2 - swap read before remove
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e1243b40
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e1243b40
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e1243b40
Branch: refs/heads/ignite-964-1
Commit: e1243b40537ac883271eb7cab492e8ef86f7b330
Parents: e0b573b
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue Jun 23 23:13:03 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue Jun 23 23:13:03 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheSwapManager.java | 98 +++++++++++++-------
.../inmemory/GridTestSwapSpaceSpi.java | 3 +-
.../processors/query/h2/opt/GridH2Table.java | 2 +-
.../cache/IgniteCacheOffheapEvictQueryTest.java | 2 +-
4 files changed, 66 insertions(+), 39 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e1243b40/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 e45ec2d..7595a1d 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
@@ -582,6 +582,13 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
part,
key.valueBytes(cctx.cacheObjectContext()));
+ ClassLoader ldr = cctx.deploy().globalLoader();
+
+ GridCacheQueryManager qryMgr = cctx.queries();
+
+ if (qryMgr != null && !readSwapBeforeRemove(key, swapKey, ldr))
+ return null; // Not found.
+
swapMgr.remove(spaceName, swapKey, new CI1<byte[]>() {
@Override public void apply(byte[] rmv) {
if (cctx.config().isStatisticsEnabled())
@@ -597,7 +604,6 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
t.set(entry);
CacheObject v = entry.value();
- byte[] valBytes = entry.valueBytes();
// Event notification.
if (cctx.events().isRecordable(EVT_CACHE_OBJECT_UNSWAPPED)) {
@@ -621,18 +627,13 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
// Always fire this event, since preloading depends on it.
onUnswapped(part, key, entry);
-
- GridCacheQueryManager qryMgr = cctx.queries();
-
- if (qryMgr != null)
- qryMgr.onUnswap(key, v);
}
catch (IgniteCheckedException e) {
err.set(e);
}
}
}
- }, cctx.deploy().globalLoader());
+ }, ldr);
if (err.get() != null)
throw err.get();
@@ -839,7 +840,17 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
assert swapEnabled;
assert unprocessedKeys != null;
- // Swap is enabled.
+ ClassLoader ldr = cctx.deploy().globalLoader();
+
+ if (qryMgr != null) { // Unswap for indexing.
+ Iterator<SwapKey> iter = unprocessedKeys.iterator();
+
+ while (iter.hasNext()) {
+ if (!readSwapBeforeRemove(null, iter.next(), ldr))
+ iter.remove(); // We will not do unswapping further -> need to skip the key.
+ }
+ }
+
final GridTuple<IgniteCheckedException> err = F.t1();
swapMgr.removeAll(spaceName,
@@ -891,9 +902,6 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
// Always fire this event, since preloading depends on it.
onUnswapped(swapKey.partition(), key, entry);
-
- if (qryMgr != null)
- qryMgr.onUnswap(key, entry.value());
}
catch (IgniteCheckedException e) {
err.set(e);
@@ -901,7 +909,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
}
}
},
- cctx.deploy().globalLoader());
+ ldr);
if (err.get() != null)
throw err.get();
@@ -923,7 +931,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
boolean rmv = offheap.removex(spaceName, part, key, key.valueBytes(cctx.cacheObjectContext()));
- if(rmv && cctx.config().isStatisticsEnabled())
+ if (rmv && cctx.config().isStatisticsEnabled())
cctx.cache().metrics0().onOffHeapRemove();
return rmv;
@@ -982,6 +990,37 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
}
/**
+ * Reads value from swap and unswaps it to indexing.
+ *
+ * @param key Key.
+ * @param swapKey Swap key.
+ * @param ldr Class loader.
+ * @return {@code true} If read and unswapped successfully.
+ * @throws IgniteCheckedException If failed.
+ */
+ private boolean readSwapBeforeRemove(@Nullable KeyCacheObject key, SwapKey swapKey, ClassLoader ldr)
+ throws IgniteCheckedException {
+ assert cctx.queries() != null;
+
+ byte[] entryBytes = swapMgr.read(spaceName, swapKey, ldr);
+
+ if (entryBytes == null)
+ return false;
+
+ GridCacheSwapEntry entry = swapEntry(unmarshalSwapEntry(entryBytes));
+
+ if (entry == null)
+ return false;
+
+ if (key == null)
+ key = cctx.toCacheKeyObject(swapKey.keyBytes());
+
+ cctx.queries().onUnswap(key, entry.value());
+
+ return true;
+ }
+
+ /**
* @param key Key to remove.
* @throws IgniteCheckedException If failed.
*/
@@ -1013,33 +1052,20 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
part,
key.valueBytes(cctx.cacheObjectContext()));
+ ClassLoader ldr = cctx.deploy().globalLoader();
+
+ if (qryMgr != null && !readSwapBeforeRemove(key, swapKey, ldr))
+ return; // Not found.
+
swapMgr.remove(spaceName,
swapKey,
- new CI1<byte[]>() {
+ cctx.config().isStatisticsEnabled() ? new CI1<byte[]>() {
@Override public void apply(byte[] rmv) {
- if (rmv == null)
- return;
-
- try {
- if (cctx.config().isStatisticsEnabled())
- cctx.cache().metrics0().onSwapRemove();
-
- if (qryMgr == null)
- return;
-
- GridCacheSwapEntry entry = swapEntry(unmarshalSwapEntry(rmv));
-
- if (entry == null)
- return;
-
- qryMgr.onUnswap(key, entry.value());
- }
- catch (IgniteCheckedException e) {
- throw new IgniteException(e);
- }
+ if (rmv != null)
+ cctx.cache().metrics0().onSwapRemove();
}
- },
- cctx.deploy().globalLoader());
+ } : null,
+ ldr);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e1243b40/modules/core/src/test/java/org/apache/ignite/spi/swapspace/inmemory/GridTestSwapSpaceSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/swapspace/inmemory/GridTestSwapSpaceSpi.java b/modules/core/src/test/java/org/apache/ignite/spi/swapspace/inmemory/GridTestSwapSpaceSpi.java
index d8303a4..2a3c940 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/swapspace/inmemory/GridTestSwapSpaceSpi.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/swapspace/inmemory/GridTestSwapSpaceSpi.java
@@ -285,7 +285,8 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements SwapSpaceS
byte[] val = data.remove(key);
if (val != null) {
- c.apply(val);
+ if (c != null)
+ c.apply(val);
fireEvent(EVT_SWAP_SPACE_DATA_REMOVED, name, key.keyBytes());
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e1243b40/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
index 92991af..86dbf06 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
@@ -393,7 +393,7 @@ public class GridH2Table extends TableBase {
for (int i = 2, len = idxs.size(); i < len; i++) {
Row res = index(i).remove(old);
- assert eq(pk, res, old): "\n" + old + "\n" + res;
+ assert eq(pk, res, old): "\n" + old + "\n" + res + "\n" + i + " -> " + index(i).getName();
}
}
else
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e1243b40/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
index 45d744e..f9ff69e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
@@ -86,7 +86,7 @@ public class IgniteCacheOffheapEvictQueryTest extends GridCommonAbstractTest {
*/
public void testEvictAndRemove() throws Exception {
final int KEYS_CNT = 3000;
- final int THREADS_CNT = 50;
+ final int THREADS_CNT = 250;
final IgniteCache<Integer,Integer> c = startGrid().cache(null);
[19/41] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-621
Posted by iv...@apache.org.
Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-621
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a9d0662b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a9d0662b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a9d0662b
Branch: refs/heads/ignite-964-1
Commit: a9d0662b1d084a770b1364295c48aa61e2c0dcfa
Parents: a4e31be b29ff1c
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Wed Jun 24 15:25:40 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Wed Jun 24 15:25:40 2015 -0700
----------------------------------------------------------------------
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 +-
.../configuration/IgniteReflectionFactory.java | 81 +++-
.../processors/cache/GridCacheContext.java | 2 +-
.../distributed/dht/GridDhtLocalPartition.java | 3 +-
.../distributed/dht/GridDhtLockFuture.java | 2 +-
.../dht/atomic/GridDhtAtomicCache.java | 9 +-
.../GridDhtPartitionsExchangeFuture.java | 46 +-
.../datastructures/DataStructuresProcessor.java | 64 +--
.../processors/hadoop/HadoopJobInfo.java | 4 +-
.../hadoop/counter/HadoopCounterWriter.java | 5 +-
.../processors/task/GridTaskProcessor.java | 23 +-
.../core/src/main/resources/ignite.properties | 2 +-
.../GridTaskFailoverAffinityRunTest.java | 170 +++++++
.../CacheReadThroughAtomicRestartSelfTest.java | 32 ++
...heReadThroughLocalAtomicRestartSelfTest.java | 32 ++
.../CacheReadThroughLocalRestartSelfTest.java | 32 ++
...dThroughReplicatedAtomicRestartSelfTest.java | 32 ++
...cheReadThroughReplicatedRestartSelfTest.java | 32 ++
.../cache/CacheReadThroughRestartSelfTest.java | 133 ++++++
.../cache/GridCacheAbstractSelfTest.java | 2 +-
...eDynamicCacheStartNoExchangeTimeoutTest.java | 466 +++++++++++++++++++
.../cache/IgniteDynamicCacheStartSelfTest.java | 37 ++
...GridCacheQueueMultiNodeAbstractSelfTest.java | 4 +-
.../GridCacheSetAbstractSelfTest.java | 22 +-
.../IgniteDataStructureWithJobTest.java | 111 +++++
...ridCachePartitionNotLoadedEventSelfTest.java | 82 ++++
.../distributed/IgniteCache150ClientsTest.java | 189 ++++++++
...teCacheClientNodePartitionsExchangeTest.java | 1 +
.../distributed/IgniteCacheManyClientsTest.java | 2 +
.../IgniteCacheTxMessageRecoveryTest.java | 5 +
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 5 -
...achePartitionedMultiNodeFullApiSelfTest.java | 49 +-
.../GridCacheReplicatedFailoverSelfTest.java | 5 +
.../IgniteCacheTxStoreSessionTest.java | 4 +
.../testframework/junits/GridAbstractTest.java | 2 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 1 +
.../ignite/testsuites/IgniteCacheTestSuite.java | 4 +-
.../testsuites/IgniteCacheTestSuite4.java | 8 +
.../testsuites/IgniteClientTestSuite.java | 38 ++
.../testsuites/IgniteComputeGridTestSuite.java | 1 +
.../ignite/util/TestTcpCommunicationSpi.java | 21 +
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 | 80 +---
.../fs/IgniteHadoopFileSystemCounterWriter.java | 9 +-
.../processors/hadoop/HadoopClassLoader.java | 29 ++
.../processors/hadoop/HadoopDefaultJobInfo.java | 27 +-
.../internal/processors/hadoop/HadoopUtils.java | 237 ----------
.../hadoop/SecondaryFileSystemProvider.java | 3 +-
.../hadoop/fs/HadoopFileSystemCacheUtils.java | 241 ++++++++++
.../hadoop/fs/HadoopFileSystemsUtils.java | 11 +
.../hadoop/fs/HadoopLazyConcurrentMap.java | 5 +
.../hadoop/jobtracker/HadoopJobTracker.java | 25 +-
.../child/HadoopChildProcessRunner.java | 3 +-
.../processors/hadoop/v2/HadoopV2Job.java | 84 +++-
.../hadoop/v2/HadoopV2JobResourceManager.java | 22 +-
.../hadoop/v2/HadoopV2TaskContext.java | 37 +-
.../apache/ignite/igfs/IgfsEventsTestSuite.java | 5 +-
.../processors/hadoop/HadoopMapReduceTest.java | 2 +-
.../processors/hadoop/HadoopTasksV1Test.java | 7 +-
.../processors/hadoop/HadoopTasksV2Test.java | 7 +-
.../processors/hadoop/HadoopV2JobSelfTest.java | 6 +-
.../collections/HadoopAbstractMapTest.java | 3 +-
.../testsuites/IgniteHadoopTestSuite.java | 2 +-
.../IgniteIgfsLinuxAndMacOSTestSuite.java | 3 +-
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
...QueryOffheapEvictsMultiThreadedSelfTest.java | 5 +
.../IgniteCacheQuerySelfTestSuite.java | 2 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/mesos/pom.xml | 2 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar-2.10/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spark-2.10/pom.xml | 2 +-
modules/spark/pom.xml | 2 +-
modules/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console-2.10/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
.../IgniteWebSessionSelfTestSuite.java | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 2 +-
100 files changed, 2169 insertions(+), 521 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a9d0662b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
[14/41] incubator-ignite git commit: ignite-973-2 - enabled test
Posted by iv...@apache.org.
ignite-973-2 - enabled 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/e0b573b1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e0b573b1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e0b573b1
Branch: refs/heads/ignite-964-1
Commit: e0b573b1337b88691f2d69087ac64cad531c8b9e
Parents: b7bb251
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue Jun 23 15:30:59 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue Jun 23 15:30:59 2015 +0300
----------------------------------------------------------------------
.../IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.java | 5 -----
1 file changed, 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e0b573b1/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.java
index e131470..dc25af5 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.java
@@ -22,11 +22,6 @@ package org.apache.ignite.internal.processors.cache;
*/
public class IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest extends IgniteCacheQueryOffheapMultiThreadedSelfTest {
/** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-971");
- }
-
- /** {@inheritDoc} */
@Override protected boolean evictsEnabled() {
return true;
}
[30/41] incubator-ignite git commit: ignite-973-2 - stop nodes after
test
Posted by iv...@apache.org.
ignite-973-2 - stop nodes after 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/cbbb6a11
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/cbbb6a11
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/cbbb6a11
Branch: refs/heads/ignite-964-1
Commit: cbbb6a1198426398ad344282854f9c5e65054f6c
Parents: 1a465a2
Author: S.Vladykin <sv...@gridgain.com>
Authored: Wed Jul 1 15:59:51 2015 -0700
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Wed Jul 1 15:59:51 2015 -0700
----------------------------------------------------------------------
.../distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbbb6a11/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java
index 93831cc..e65d152 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java
@@ -325,6 +325,11 @@ public class IgniteCacheQueryNodeRestartSelfTest2 extends GridCommonAbstractTest
info("Queries stopped.");
}
+ /** {@inheritDoc} */
+ @Override protected void afterTestsStopped() throws Exception {
+ stopAllGrids();
+ }
+
/**
*
*/
[02/41] incubator-ignite git commit: # Merge branches
'ignite-gg-10416' and 'ignite-sprint-6' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into
Posted by iv...@apache.org.
# Merge branches 'ignite-gg-10416' and 'ignite-sprint-6' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b12c8030
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b12c8030
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b12c8030
Branch: refs/heads/ignite-964-1
Commit: b12c803026da422244856e11d4720510df50ce91
Parents: 178c4f8 b087aca
Author: Andrey <an...@gridgain.com>
Authored: Fri Jun 12 11:42:23 2015 +0300
Committer: Andrey <an...@gridgain.com>
Committed: Fri Jun 12 11:42:23 2015 +0300
----------------------------------------------------------------------
DEVNOTES.txt | 15 +
examples/config/example-cache.xml | 2 +
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
modules/clients/pom.xml | 2 +-
.../client/router/TcpSslRouterSelfTest.java | 5 +
.../client/suite/IgniteClientTestSuite.java | 3 +-
modules/cloud/pom.xml | 2 +-
.../cloud/TcpDiscoveryCloudIpFinder.java | 25 +-
.../TcpDiscoveryCloudIpFinderSelfTest.java | 3 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 2 +-
.../apache/ignite/cache/query/ScanQuery.java | 5 +-
.../ignite/internal/GridPluginContext.java | 6 +
.../apache/ignite/internal/IgniteKernal.java | 2 +-
.../internal/MarshallerContextAdapter.java | 30 +-
.../ignite/internal/MarshallerContextImpl.java | 10 +-
.../internal/interop/InteropIgnition.java | 54 +-
.../internal/interop/InteropProcessor.java | 8 +
.../processors/cache/GridCacheMessage.java | 51 --
.../processors/cache/GridCacheProcessor.java | 27 +-
.../processors/cache/KeyCacheObjectImpl.java | 11 +-
.../cache/query/GridCacheQueryManager.java | 5 +-
.../cacheobject/IgniteCacheObjectProcessor.java | 9 +-
.../IgniteCacheObjectProcessorImpl.java | 12 +-
.../continuous/GridContinuousProcessor.java | 15 +-
.../datastreamer/DataStreamerCacheUpdaters.java | 2 +-
.../datastreamer/DataStreamerImpl.java | 8 +-
.../portable/GridPortableInputStream.java | 10 +
.../processors/query/GridQueryProcessor.java | 2 +-
.../ignite/internal/util/IgniteUtils.java | 3 +
.../util/ipc/shmem/IpcSharedMemoryUtils.java | 4 +-
.../internal/visor/VisorMultiNodeTask.java | 2 +-
.../ignite/marshaller/MarshallerContext.java | 8 +
.../org/apache/ignite/plugin/PluginContext.java | 6 +
.../java/org/jsr166/ConcurrentHashMap8.java | 8 +-
.../java/org/jsr166/ConcurrentLinkedDeque8.java | 586 ++++++-------------
.../src/main/java/org/jsr166/LongAdder8.java | 35 +-
.../core/src/main/java/org/jsr166/README.txt | 11 +
.../src/main/java/org/jsr166/Striped64_8.java | 22 +-
.../java/org/jsr166/ThreadLocalRandom8.java | 19 +-
.../src/main/java/org/jsr166/package-info.java | 12 +-
.../core/src/main/resources/ignite.properties | 2 +-
modules/core/src/test/config/tests.properties | 2 +-
.../ignite/GridSuppressedExceptionSelfTest.java | 4 +-
.../internal/GridDiscoveryEventSelfTest.java | 6 +-
...ridFailFastNodeFailureDetectionSelfTest.java | 2 +
.../GridFailoverTaskWithPredicateSelfTest.java | 3 -
.../GridJobMasterLeaveAwareSelfTest.java | 2 -
.../internal/GridJobStealingSelfTest.java | 3 -
...ectionLocalJobMultipleArgumentsSelfTest.java | 2 -
.../GridTaskExecutionContextSelfTest.java | 9 -
.../IgniteComputeEmptyClusterGroupTest.java | 3 -
.../IgniteComputeTopologyExceptionTest.java | 9 -
.../GridDiscoveryManagerAliveCacheSelfTest.java | 5 +
.../cache/GridCacheAbstractSelfTest.java | 3 -
.../cache/GridCacheAffinityRoutingSelfTest.java | 4 +-
.../cache/GridCacheDeploymentSelfTest.java | 3 -
.../cache/GridCacheEntryMemorySizeSelfTest.java | 91 +--
.../cache/GridCacheMemoryModeSelfTest.java | 2 -
...inodeUpdateNearEnabledNoBackupsSelfTest.java | 2 +-
...CacheMultinodeUpdateNearEnabledSelfTest.java | 2 +-
.../processors/cache/GridCacheOffHeapTest.java | 28 +-
.../cache/GridCachePutAllFailoverSelfTest.java | 5 +
.../GridCacheReferenceCleanupSelfTest.java | 3 -
.../processors/cache/GridCacheStopSelfTest.java | 5 +
.../cache/GridCacheVersionMultinodeTest.java | 2 +-
.../cache/IgniteCacheAbstractTest.java | 3 -
.../IgniteCacheEntryListenerAbstractTest.java | 14 +-
.../IgniteCacheInterceptorSelfTestSuite.java | 2 +-
.../cache/IgniteCacheInvokeReadThroughTest.java | 5 +
...gniteCacheTransactionalStopBusySelfTest.java | 5 +
...teStartCacheInTransactionAtomicSelfTest.java | 32 +
.../IgniteStartCacheInTransactionSelfTest.java | 254 ++++++++
.../IgniteTxMultiThreadedAbstractTest.java | 4 +-
...cheAtomicReferenceMultiNodeAbstractTest.java | 11 -
...GridCacheQueueMultiNodeAbstractSelfTest.java | 2 -
...dCacheQueueMultiNodeConsistencySelfTest.java | 5 +
...CacheQueueRotativeMultiNodeAbstractTest.java | 10 -
.../GridCacheSetAbstractSelfTest.java | 9 -
...omicOffheapQueueCreateMultiNodeSelfTest.java | 5 +
...ionedAtomicQueueCreateMultiNodeSelfTest.java | 5 +
...rtitionedDataStructuresFailoverSelfTest.java | 5 +
...edOffheapDataStructuresFailoverSelfTest.java | 5 +
...PartitionedQueueCreateMultiNodeSelfTest.java | 5 +
...dCachePartitionedQueueEntryMoveSelfTest.java | 5 +
...nedQueueFailoverDataConsistencySelfTest.java | 5 +
...eplicatedDataStructuresFailoverSelfTest.java | 5 +
...CacheLoadingConcurrentGridStartSelfTest.java | 5 +
.../GridCacheAbstractJobExecutionTest.java | 3 -
.../GridCachePreloadLifecycleAbstractTest.java | 2 -
...heAbstractTransformWriteThroughSelfTest.java | 3 -
.../dht/GridCacheColocatedFailoverSelfTest.java | 5 +
.../GridCacheColocatedTxExceptionSelfTest.java | 5 +
...ePartitionedNearDisabledMetricsSelfTest.java | 4 +-
...dCachePartitionedTopologyChangeSelfTest.java | 5 +
.../near/GridCacheNearEvictionSelfTest.java | 3 -
.../near/GridCacheNearTxExceptionSelfTest.java | 5 +
.../GridCachePartitionedFailoverSelfTest.java | 5 +
...PartitionedFullApiMultithreadedSelfTest.java | 5 +
...idCachePartitionedHitsAndMissesSelfTest.java | 3 -
.../GridCachePartitionedNodeRestartTest.java | 5 +
...ePartitionedOptimisticTxNodeRestartTest.java | 5 +
...CachePartitionedTxMultiThreadedSelfTest.java | 5 +
.../GridCacheReplicatedFailoverSelfTest.java | 5 +
...eReplicatedFullApiMultithreadedSelfTest.java | 5 +
.../GridCacheReplicatedInvalidateSelfTest.java | 4 +-
...ridCacheReplicatedMultiNodeLockSelfTest.java | 5 +
.../GridCacheReplicatedMultiNodeSelfTest.java | 5 +
.../GridCacheReplicatedNodeRestartSelfTest.java | 5 +
.../GridCacheReplicatedTxExceptionSelfTest.java | 5 +
.../replicated/GridReplicatedTxPreloadTest.java | 2 +
...acheAtomicReplicatedNodeRestartSelfTest.java | 5 +
.../GridCacheEvictionFilterSelfTest.java | 4 +-
...cheSynchronousEvictionsFailoverSelfTest.java | 5 +
.../IgniteCacheExpiryPolicyAbstractTest.java | 10 +-
...eCacheExpiryPolicyWithStoreAbstractTest.java | 4 +-
...dCacheLocalFullApiMultithreadedSelfTest.java | 5 +
.../GridCacheLocalTxExceptionSelfTest.java | 5 +
.../GridCacheSwapScanQueryAbstractSelfTest.java | 3 -
...ridCacheContinuousQueryAbstractSelfTest.java | 2 -
.../closure/GridClosureProcessorSelfTest.java | 29 +-
.../continuous/GridEventConsumeSelfTest.java | 2 -
.../DataStreamProcessorSelfTest.java | 44 +-
.../processors/igfs/IgfsModesSelfTest.java | 4 +-
.../internal/util/nio/GridNioSelfTest.java | 13 +-
.../internal/util/nio/GridNioSslSelfTest.java | 2 +
.../unsafe/GridUnsafeMemorySelfTest.java | 4 +-
.../tostring/GridToStringBuilderSelfTest.java | 4 +-
.../marshaller/MarshallerContextTestImpl.java | 11 +-
.../ignite/messaging/GridMessagingSelfTest.java | 3 -
.../GridP2PContinuousDeploymentSelfTest.java | 2 +
.../p2p/GridP2PLocalDeploymentSelfTest.java | 6 +-
.../p2p/GridP2PRemoteClassLoadersSelfTest.java | 31 +-
.../spi/GridTcpSpiForwardingSelfTest.java | 3 -
.../ignite/testframework/GridTestUtils.java | 14 +
.../config/GridTestProperties.java | 14 +-
.../junits/IgniteTestResources.java | 16 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 29 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 24 +-
.../IgniteCacheEvictionSelfTestSuite.java | 3 +-
.../IgniteCacheFailoverTestSuite.java | 22 +-
.../IgniteCacheFullApiSelfTestSuite.java | 8 +-
...niteCacheP2pUnmarshallingErrorTestSuite.java | 20 +-
.../testsuites/IgniteCacheRestartTestSuite.java | 10 +-
.../ignite/testsuites/IgniteCacheTestSuite.java | 44 +-
.../testsuites/IgniteCacheTestSuite2.java | 4 +-
.../testsuites/IgniteCacheTestSuite3.java | 14 +-
.../testsuites/IgniteCacheTestSuite4.java | 13 +-
.../testsuites/IgniteKernalSelfTestSuite.java | 14 +-
.../IgniteMarshallerSelfTestSuite.java | 28 +-
.../testsuites/IgniteUtilSelfTestSuite.java | 18 +-
.../apache/ignite/util/GridRandomSelfTest.java | 4 +-
modules/extdata/p2p/pom.xml | 2 +-
.../tests/p2p/P2PTestTaskExternalPath1.java | 10 +-
.../tests/p2p/P2PTestTaskExternalPath2.java | 8 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 2 +-
.../HadoopIgfs20FileSystemAbstractSelfTest.java | 4 +-
.../IgniteHadoopFileSystemAbstractSelfTest.java | 2 +-
.../processors/hadoop/HadoopMapReduceTest.java | 21 +-
.../collections/HadoopHashMapSelfTest.java | 4 +-
.../HadoopExternalTaskExecutionSelfTest.java | 2 +
.../HadoopExternalCommunicationSelfTest.java | 5 +
.../testsuites/IgniteHadoopTestSuite.java | 7 +-
modules/hibernate/pom.xml | 2 +-
.../hibernate/HibernateL2CacheSelfTest.java | 5 +
.../HibernateL2CacheTransactionalSelfTest.java | 5 +
.../testsuites/IgniteHibernateTestSuite.java | 4 +-
modules/indexing/pom.xml | 18 +-
.../cache/GridCacheCrossCacheQuerySelfTest.java | 10 +-
.../cache/GridCacheOffHeapSelfTest.java | 1 -
...idCacheReduceQueryMultithreadedSelfTest.java | 10 -
.../processors/cache/GridCacheSwapSelfTest.java | 3 -
.../IgniteCacheAbstractFieldsQuerySelfTest.java | 13 +-
.../cache/IgniteCacheAbstractQuerySelfTest.java | 2 -
...hePartitionedQueryMultiThreadedSelfTest.java | 40 +-
.../IgniteCacheQueryMultiThreadedSelfTest.java | 1 -
.../IgniteCacheQueryNodeRestartSelfTest.java | 5 +
...dCacheAbstractReduceFieldsQuerySelfTest.java | 1 -
.../h2/GridIndexingSpiAbstractSelfTest.java | 4 +-
.../query/h2/sql/BaseH2CompareQueryTest.java | 4 +-
.../query/h2/sql/GridQueryParsingTest.java | 5 +-
.../IgniteCacheQuerySelfTestSuite.java | 2 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/mesos/README.txt | 2 +-
modules/mesos/pom.xml | 2 +-
.../apache/ignite/mesos/ClusterProperties.java | 15 +
.../apache/ignite/mesos/IgniteScheduler.java | 10 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar-2.10/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spark-2.10/pom.xml | 2 +-
modules/spark/pom.xml | 40 +-
modules/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console-2.10/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
.../IgniteWebSessionSelfTestSuite.java | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 2 +-
213 files changed, 1534 insertions(+), 1037 deletions(-)
----------------------------------------------------------------------
[31/41] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
of https://git-wip-us.apache.org/repos/asf/incubator-ignite into
ignite-gg-10416
Posted by iv...@apache.org.
Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10416
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ad3e6af4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ad3e6af4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ad3e6af4
Branch: refs/heads/ignite-964-1
Commit: ad3e6af49e9e86f49dd6092c29dc3de8946e0389
Parents: 7e82a68 d3783a1
Author: Andrey <an...@gridgain.com>
Authored: Thu Jul 2 09:50:59 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jul 2 09:50:59 2015 +0700
----------------------------------------------------------------------
assembly/dependencies-fabric.xml | 1 +
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 +-
.../ignite/compute/ComputeTaskSplitAdapter.java | 2 +-
.../configuration/CacheConfiguration.java | 105 +++----
.../configuration/NearCacheConfiguration.java | 10 +-
.../ignite/internal/GridKernalContextImpl.java | 2 +-
.../managers/communication/GridIoManager.java | 49 ++--
.../discovery/GridDiscoveryManager.java | 32 +-
.../cache/GridCacheDeploymentManager.java | 10 +-
.../processors/cache/GridCacheProcessor.java | 62 +++-
.../processors/cache/IgniteCacheFutureImpl.java | 42 +++
.../processors/cache/IgniteCacheProxy.java | 2 +-
.../processors/clock/GridClockServer.java | 21 +-
.../internal/util/future/IgniteFutureImpl.java | 18 +-
.../shmem/IpcSharedMemoryServerEndpoint.java | 10 +-
.../util/nio/GridNioMessageTracker.java | 23 +-
.../util/VisorClusterGroupEmptyException.java | 6 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 2 +-
.../TcpDiscoveryMulticastIpFinder.java | 74 ++++-
.../core/src/main/resources/ignite.properties | 2 +-
.../core/src/test/config/spark/spark-config.xml | 46 +++
modules/core/src/test/config/tests.properties | 6 +-
.../IgniteTopologyPrintFormatSelfTest.java | 289 +++++++++++++++++++
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 --------
.../IgniteDaemonNodeMarshallerCacheTest.java | 192 ++++++++++++
.../GridP2PContinuousDeploymentSelfTest.java | 2 -
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
.../testsuites/IgniteCacheTestSuite3.java | 1 -
.../testsuites/IgniteKernalSelfTestSuite.java | 1 +
modules/core/src/test/resources/helloworld.gar | Bin 6092 -> 0 bytes
modules/core/src/test/resources/helloworld1.gar | Bin 6092 -> 0 bytes
modules/core/src/test/resources/readme.txt | 6 -
modules/docker/Dockerfile | 55 ++++
modules/docker/README.txt | 11 +
modules/docker/build_users_libs.sh | 39 +++
modules/docker/download_ignite.sh | 49 ++++
modules/docker/execute.sh | 62 ++++
modules/docker/run.sh | 34 +++
modules/extdata/p2p/pom.xml | 4 +-
modules/extdata/uri/META-INF/ignite.xml | 38 +++
.../extdata/uri/modules/uri-dependency/pom.xml | 42 +++
.../deployment/uri/tasks/GarHelloWorldBean.java | 60 ++++
.../src/main/resources/gar-example.properties | 18 ++
modules/extdata/uri/pom.xml | 62 +++-
.../deployment/uri/tasks/GarHelloWorldTask.java | 81 ++++++
.../deployment/uri/tasks/gar-spring-bean.xml | 29 ++
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/mesos/pom.xml | 2 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar-2.10/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
.../ignite/schema/model/PojoDescriptor.java | 2 +
.../apache/ignite/schema/model/PojoField.java | 1 +
.../parser/dialect/OracleMetadataDialect.java | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spark-2.10/pom.xml | 2 +-
modules/spark/pom.xml | 2 +-
.../org/apache/ignite/spark/IgniteContext.scala | 50 +++-
.../org/apache/ignite/spark/IgniteRddSpec.scala | 18 ++
modules/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 16 +-
.../GridTaskUriDeploymentDeadlockSelfTest.java | 13 +-
.../ignite/p2p/GridP2PDisabledSelfTest.java | 2 +-
modules/visor-console-2.10/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 14 +-
86 files changed, 1577 insertions(+), 325 deletions(-)
----------------------------------------------------------------------
[39/41] incubator-ignite git commit: muted
GridCachePartitionedFailoverSelfTest
Posted by iv...@apache.org.
muted GridCachePartitionedFailoverSelfTest
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7828d19f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7828d19f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7828d19f
Branch: refs/heads/ignite-964-1
Commit: 7828d19f3fc2b3793c2882ac1305b95960646e5c
Parents: beb697a
Author: Denis Magda <dm...@gridgain.com>
Authored: Fri Jul 3 16:43:17 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Fri Jul 3 16:43:17 2015 +0300
----------------------------------------------------------------------
.../distributed/near/GridCachePartitionedFailoverSelfTest.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7828d19f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFailoverSelfTest.java
index 553d748..64e8f81 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFailoverSelfTest.java
@@ -27,6 +27,11 @@ import static org.apache.ignite.cache.CacheMode.*;
*/
public class GridCachePartitionedFailoverSelfTest extends GridCacheAbstractFailoverTxSelfTest {
/** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ fail("https://issues.apache.org/jira/browse/IGNITE-1092");
+ }
+
+ /** {@inheritDoc} */
@Override protected CacheMode cacheMode() {
return PARTITIONED;
}
[11/41] incubator-ignite git commit: ignite-973-2 - read offheap
value before remove
Posted by iv...@apache.org.
ignite-973-2 - read offheap value before remove
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/260dc2dd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/260dc2dd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/260dc2dd
Branch: refs/heads/ignite-964-1
Commit: 260dc2dd4978d0a57732b7edd0aa0b043d4eff4c
Parents: 285d790
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue Jun 23 15:28:24 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue Jun 23 15:28:24 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheSwapManager.java | 192 +++++++++++--------
.../query/h2/opt/GridH2KeyValueRowOffheap.java | 8 +-
2 files changed, 118 insertions(+), 82 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/260dc2dd/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 f709e03..e45ec2d 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
@@ -535,21 +535,9 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
// First try removing from offheap.
if (offheapEnabled) {
- byte[] entryBytes = offheap.remove(spaceName, part, key, key.valueBytes(cctx.cacheObjectContext()));
-
- if (cctx.config().isStatisticsEnabled()) {
- if (entryBytes != null)
- cctx.cache().metrics0().onOffHeapRemove();
-
- cctx.cache().metrics0().onOffHeapRead(entryBytes != null);
- }
-
- if (entryBytes != null) {
- GridCacheSwapEntry entry = swapEntry(unmarshalSwapEntry(entryBytes));
-
- if (entry == null)
- return null;
+ GridCacheSwapEntry entry = removeFromOffheap(key, key.valueBytes(cctx.cacheObjectContext()), part);
+ if (entry != null) {
// Always fire this event, since preloading depends on it.
onOffHeaped(part, key, entry);
@@ -569,11 +557,6 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
null,
null);
- GridCacheQueryManager qryMgr = cctx.queries();
-
- if (qryMgr != null)
- qryMgr.onUnswap(key, entry.value());
-
return entry;
}
}
@@ -737,6 +720,47 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
}
/**
+ * @param key Key.
+ * @param keyBytes Key bytes.
+ * @param part Partition.
+ * @return Swap entry.
+ * @throws IgniteCheckedException If failed.
+ */
+ @Nullable private GridCacheSwapEntry removeFromOffheap(KeyCacheObject key, byte[] keyBytes, int part)
+ throws IgniteCheckedException {
+ final GridCacheQueryManager qryMgr = cctx.queries();
+
+ GridCacheSwapEntry entry;
+
+ if (qryMgr != null) {
+ entry = readOffheapBeforeRemove(key, keyBytes, part);
+
+ if (entry != null) {
+ if (offheap.removex(spaceName, part, key, keyBytes)) {
+ if (cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onOffHeapRemove();
+ }
+ else
+ entry = null; // Failed to remove -> reset to null.
+ }
+ }
+ else {
+ byte[] entryBytes = offheap.remove(spaceName, part, key, keyBytes);
+
+ if (entryBytes != null) {
+ if (cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onOffHeapRemove();
+
+ entry = swapEntry(unmarshalSwapEntry(entryBytes));
+ }
+ else
+ entry = null;
+ }
+
+ return entry;
+ }
+
+ /**
* @param keys Collection of keys to remove from swap.
* @return Collection of swap entries.
* @throws IgniteCheckedException If failed,
@@ -759,40 +783,30 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
for (KeyCacheObject key : keys) {
int part = cctx.affinity().partition(key);
- byte[] entryBytes = offheap.remove(spaceName, part, key, key.valueBytes(cctx.cacheObjectContext()));
+ GridCacheSwapEntry entry = removeFromOffheap(key, key.valueBytes(cctx.cacheObjectContext()), part);
- if(entryBytes != null && cctx.config().isStatisticsEnabled())
- cctx.cache().metrics0().onOffHeapRemove();
+ if (entry != null) {
+ // Always fire this event, since preloading depends on it.
+ onOffHeaped(part, key, entry);
- if (entryBytes != null) {
- GridCacheSwapEntry entry = swapEntry(unmarshalSwapEntry(entryBytes));
+ if (cctx.events().isRecordable(EVT_CACHE_OBJECT_FROM_OFFHEAP))
+ cctx.events().addEvent(part, key, cctx.nodeId(), (IgniteUuid)null, null,
+ EVT_CACHE_OBJECT_FROM_OFFHEAP, null, false, null, true, null, null, null);
- if (entry != null) {
- // Always fire this event, since preloading depends on it.
- onOffHeaped(part, key, entry);
-
- if (cctx.events().isRecordable(EVT_CACHE_OBJECT_FROM_OFFHEAP))
- cctx.events().addEvent(part, key, cctx.nodeId(), (IgniteUuid)null, null,
- EVT_CACHE_OBJECT_FROM_OFFHEAP, null, false, null, true, null, null, null);
-
- if (qryMgr != null)
- qryMgr.onUnswap(key, entry.value());
-
- GridCacheBatchSwapEntry unswapped = new GridCacheBatchSwapEntry(key,
- part,
- ByteBuffer.wrap(entry.valueBytes()),
- entry.type(),
- entry.version(), entry.ttl(),
- entry.expireTime(),
- entry.keyClassLoaderId(),
- entry.valueClassLoaderId());
+ GridCacheBatchSwapEntry unswapped = new GridCacheBatchSwapEntry(key,
+ part,
+ ByteBuffer.wrap(entry.valueBytes()),
+ entry.type(),
+ entry.version(), entry.ttl(),
+ entry.expireTime(),
+ entry.keyClassLoaderId(),
+ entry.valueClassLoaderId());
- unswapped.value(entry.value());
+ unswapped.value(entry.value());
- res.add(unswapped);
+ res.add(unswapped);
- continue;
- }
+ continue;
}
if (swapEnabled) {
@@ -940,6 +954,34 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
}
/**
+ * Reads value from offheap and unswaps it for indexing.
+ *
+ * @param key Key.
+ * @param keyBytes Key bytes.
+ * @param part Partition.
+ * @return Swap entry.
+ * @throws IgniteCheckedException If failed.
+ */
+ public GridCacheSwapEntry readOffheapBeforeRemove(KeyCacheObject key, byte[] keyBytes, int part)
+ throws IgniteCheckedException {
+ assert cctx.queries() != null;
+
+ byte[] val = offheap.get(spaceName, part, key, keyBytes);
+
+ if (val != null) {
+ GridCacheSwapEntry entry = swapEntry(unmarshalSwapEntry(val));
+
+ if (entry != null) {
+ cctx.queries().onUnswap(key, entry.value());
+
+ return entry;
+ }
+ }
+
+ return null;
+ }
+
+ /**
* @param key Key to remove.
* @throws IgniteCheckedException If failed.
*/
@@ -951,42 +993,17 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
final GridCacheQueryManager qryMgr = cctx.queries();
- CI1<byte[]> c = qryMgr == null ? null : new CI1<byte[]>() {
- @Override public void apply(byte[] rmv) {
- if (rmv == null)
- return;
-
- try {
- if (cctx.config().isStatisticsEnabled())
- cctx.cache().metrics0().onSwapRemove();
-
- GridCacheSwapEntry entry = swapEntry(unmarshalSwapEntry(rmv));
-
- if (entry == null)
- return;
-
- qryMgr.onUnswap(key, entry.value());
- }
- catch (IgniteCheckedException e) {
- throw new IgniteException(e);
- }
- }
- };
-
int part = cctx.affinity().partition(key);
// First try offheap.
if (offheapEnabled) {
- // TODO Pass closure c to offheap.remove and apply it before the actual remove.
- byte[] val = offheap.remove(spaceName, part, key, key.valueBytes(cctx.cacheObjectContext()));
+ byte[] keyBytes = key.valueBytes(cctx.cacheObjectContext());
- if (val != null) {
+ if ((qryMgr == null || readOffheapBeforeRemove(key, keyBytes, part) != null) &&
+ offheap.removex(spaceName, part, key, keyBytes)) {
if (cctx.config().isStatisticsEnabled())
cctx.cache().metrics0().onOffHeapRemove();
- if (c != null)
- c.apply(val);
-
return;
}
}
@@ -998,7 +1015,30 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
swapMgr.remove(spaceName,
swapKey,
- c,
+ new CI1<byte[]>() {
+ @Override public void apply(byte[] rmv) {
+ if (rmv == null)
+ return;
+
+ try {
+ if (cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onSwapRemove();
+
+ if (qryMgr == null)
+ return;
+
+ GridCacheSwapEntry entry = swapEntry(unmarshalSwapEntry(rmv));
+
+ if (entry == null)
+ return;
+
+ qryMgr.onUnswap(key, entry.value());
+ }
+ catch (IgniteCheckedException e) {
+ throw new IgniteException(e);
+ }
+ }
+ },
cctx.deploy().globalLoader());
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/260dc2dd/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java
index f89591a..1f54713 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java
@@ -236,12 +236,8 @@ public class GridH2KeyValueRowOffheap extends GridH2AbstractKeyValueRow {
try {
GridUnsafeMemory mem = desc.memory();
- if (mem.readLongVolatile(p + OFFSET_VALUE_REF) != 0) {
- if (beforeRmv)
- return; // The offheap value is in its place, nothing to do here.
- else
- throw new IllegalStateException("Unswap without swap: " + p);
- }
+ if (mem.readLongVolatile(p + OFFSET_VALUE_REF) != 0)
+ return; // The offheap value is in its place, nothing to do here.
Value v = peekValue(VAL_COL);
[41/41] incubator-ignite git commit: #ignite-964: revert small
changes.
Posted by iv...@apache.org.
#ignite-964: revert small changes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3d39744e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3d39744e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3d39744e
Branch: refs/heads/ignite-964-1
Commit: 3d39744e3d09697f325b7250c5ddd71063c3f224
Parents: 4d81938
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Jul 3 17:25:54 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Jul 3 17:25:54 2015 +0300
----------------------------------------------------------------------
.../scripting/IgniteScriptingCommandHandler.java | 4 +---
.../rest/handlers/scripting/JSONCacheObject.java | 18 ++++++++++++++++--
modules/nodejs/src/test/js/test-cache-api.js | 4 ++--
.../http/jetty/GridJettyRestHandler.java | 2 +-
4 files changed, 20 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3d39744e/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
index 795a9b0..5fcbd2b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
@@ -17,8 +17,6 @@
package org.apache.ignite.internal.processors.rest.handlers.scripting;
-
-import net.sf.json.*;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
@@ -179,7 +177,7 @@ public class IgniteScriptingCommandHandler extends GridRestCommandHandlerAdapter
data[i] = results.get(i).getData();
}
- Object o = ctx.scripting().invokeJSFunction(reduceFunc, JSONSerializer.toJSON(data), null);
+ Object o = ctx.scripting().invokeJSFunction(reduceFunc, data, null);
return o;
}
catch (IgniteCheckedException e) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3d39744e/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/JSONCacheObject.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/JSONCacheObject.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/JSONCacheObject.java
index b8f7510..51225fd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/JSONCacheObject.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/JSONCacheObject.java
@@ -49,11 +49,25 @@ public class JSONCacheObject implements JSObject {
return fields.hashCode();
}
+ /** {@inheritDoc} */
@Override public boolean equals(Object obj) {
if (obj == null || !(obj instanceof JSONCacheObject))
return false;
- return fields.equals(((JSONCacheObject)obj).fields);
+ JSONCacheObject obj0 = (JSONCacheObject) obj;
+
+ if (fields.size() != obj0.fields.size())
+ return false;
+
+ for (Object key : obj0.fields.keySet()) {
+ if (!fields.containsKey(key))
+ return false;
+
+ if (!obj0.getField(key).equals(getField(key)))
+ return false;
+ }
+
+ return true;
}
/**
@@ -97,7 +111,7 @@ public class JSONCacheObject implements JSObject {
for (Object v : o1)
val.add(toSimpleObject(v));
- return val.toArray();
+ return val;
}
return o;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3d39744e/modules/nodejs/src/test/js/test-cache-api.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/js/test-cache-api.js b/modules/nodejs/src/test/js/test-cache-api.js
index d092d37..947a3f6 100644
--- a/modules/nodejs/src/test/js/test-cache-api.js
+++ b/modules/nodejs/src/test/js/test-cache-api.js
@@ -224,8 +224,8 @@ testGetAndReplaceObject = function() {
testReplaceValueObject = function() {
function replaceValue(cache, entry, next) {
- var newKey = {"key" :"7"};
- cache.replaceValue(entry[0], newKey, entry[1], onReplaceValue.bind(null, cache));
+ var newVal = {"key" :"7"};
+ cache.replaceValue(entry[0], newVal, entry[1], onReplaceValue.bind(null, cache));
function onReplaceValue(cache, err, res) {
assert(err === null, "Get error on get and put [err=" + err + "]");
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3d39744e/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
----------------------------------------------------------------------
diff --git a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
index 4b764f2..f9c4685 100644
--- a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
+++ b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
@@ -422,7 +422,7 @@ public class GridJettyRestHandler extends AbstractHandler {
else if (cmd == CACHE_GET_ALL || cmd == CACHE_REMOVE_ALL || cmd == CACHE_CONTAINS_KEYS) {
JSONCacheObject cacheObj = new JSONCacheObject(o);
- Object[] keys = (Object[])cacheObj.getField("keys");
+ List keys = (List)cacheObj.getField("keys");
for (Object key : keys)
map.put(key, null);
[03/41] incubator-ignite git commit: # Merge ignite-sprint-7 to
ignite-gg-10416.
Posted by iv...@apache.org.
# Merge ignite-sprint-7 to ignite-gg-10416.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ce31bae5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ce31bae5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ce31bae5
Branch: refs/heads/ignite-964-1
Commit: ce31bae57ed9f78d9ae5ce98f9261b26c9f89186
Parents: b12c803 489ab0f
Author: Andrey <an...@gridgain.com>
Authored: Thu Jun 18 13:34:41 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jun 18 13:34:41 2015 +0700
----------------------------------------------------------------------
RELEASE_NOTES.txt | 12 +
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 +-
.../apache/ignite/cache/query/ScanQuery.java | 23 +-
.../cache/store/jdbc/CacheJdbcBlobStore.java | 22 +-
.../store/jdbc/CacheJdbcBlobStoreFactory.java | 290 +++++++++++
.../cache/store/jdbc/CacheJdbcPojoStore.java | 6 +-
.../store/jdbc/CacheJdbcPojoStoreFactory.java | 148 ++++++
.../configuration/CacheConfiguration.java | 3 +-
.../ignite/internal/GridKernalContextImpl.java | 5 +-
.../apache/ignite/internal/IgniteKernal.java | 11 +-
.../internal/MarshallerContextAdapter.java | 18 +-
.../ignite/internal/MarshallerContextImpl.java | 14 +-
.../client/GridClientConfiguration.java | 4 +-
.../GridClientOptimizedMarshaller.java | 26 +
.../impl/GridTcpRouterNioListenerAdapter.java | 2 +-
.../internal/interop/InteropBootstrap.java | 3 +-
.../internal/interop/InteropIgnition.java | 5 +-
.../discovery/GridDiscoveryManager.java | 9 +-
.../processors/cache/GridCacheProcessor.java | 34 +-
.../distributed/GridCacheTxRecoveryRequest.java | 26 +-
.../GridCacheTxRecoveryResponse.java | 14 +-
.../distributed/GridDistributedBaseMessage.java | 77 +--
.../distributed/GridDistributedLockRequest.java | 54 +-
.../GridDistributedLockResponse.java | 14 +-
.../GridDistributedTxFinishRequest.java | 46 +-
.../GridDistributedTxPrepareRequest.java | 62 +--
.../GridDistributedTxPrepareResponse.java | 64 +--
.../GridDistributedUnlockRequest.java | 6 +-
.../distributed/dht/GridDhtLockRequest.java | 72 ++-
.../distributed/dht/GridDhtLockResponse.java | 18 +-
.../distributed/dht/GridDhtTxFinishRequest.java | 38 +-
.../dht/GridDhtTxPrepareRequest.java | 54 +-
.../dht/GridDhtTxPrepareResponse.java | 22 +-
.../distributed/dht/GridDhtUnlockRequest.java | 6 +-
.../dht/preloader/GridDhtPreloader.java | 2 +-
.../distributed/near/GridNearLockRequest.java | 58 +--
.../distributed/near/GridNearLockResponse.java | 26 +-
.../near/GridNearTxFinishRequest.java | 26 +-
.../near/GridNearTxPrepareRequest.java | 50 +-
.../near/GridNearTxPrepareResponse.java | 46 +-
.../distributed/near/GridNearUnlockRequest.java | 2 +-
.../cache/transactions/IgniteTxHandler.java | 3 -
.../transactions/IgniteTxLocalAdapter.java | 6 +-
.../datastructures/DataStructuresProcessor.java | 67 ++-
.../plugin/IgnitePluginProcessor.java | 16 +-
.../processors/query/GridQueryProcessor.java | 102 ++--
.../messages/GridQueryNextPageResponse.java | 1 +
.../rest/client/message/GridRouterRequest.java | 18 +
.../rest/client/message/GridRouterResponse.java | 18 +
.../rest/protocols/tcp/GridTcpRestProtocol.java | 3 +-
.../ignite/internal/util/IgniteUtils.java | 21 +
.../util/spring/IgniteSpringHelper.java | 10 +
.../SpringApplicationContextResource.java | 4 +-
.../apache/ignite/resources/SpringResource.java | 6 +-
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 28 +-
.../communication/tcp/TcpCommunicationSpi.java | 2 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 498 +++++++++++++------
.../ignite/spi/discovery/tcp/ServerImpl.java | 221 ++++----
.../spi/discovery/tcp/TcpDiscoveryImpl.java | 66 +++
.../ipfinder/TcpDiscoveryIpFinderAdapter.java | 34 +-
.../TcpDiscoveryMulticastIpFinder.java | 19 +-
.../messages/TcpDiscoveryAbstractMessage.java | 10 +-
.../core/src/main/resources/ignite.properties | 2 +-
.../apache/ignite/internal/GridSelfTest.java | 12 +-
.../GridDiscoveryManagerAliveCacheSelfTest.java | 17 +-
.../cache/CacheClientStoreSelfTest.java | 228 +++++++++
...acheReadOnlyTransactionalClientSelfTest.java | 327 ------------
.../GridCacheAbstractFailoverSelfTest.java | 2 +
...ridCacheMultinodeUpdateAbstractSelfTest.java | 9 +
.../cache/GridCachePutAllFailoverSelfTest.java | 5 -
.../cache/GridCacheVersionMultinodeTest.java | 8 +-
...CacheP2pUnmarshallingRebalanceErrorTest.java | 15 +-
.../IgniteCacheP2pUnmarshallingTxErrorTest.java | 14 +-
...ridCachePartitionNotLoadedEventSelfTest.java | 82 +++
.../IgniteCacheClientNodeConcurrentStart.java | 14 +-
.../distributed/IgniteCacheManyClientsTest.java | 189 ++++++-
.../dht/GridCacheColocatedFailoverSelfTest.java | 5 -
.../GridCachePartitionedFailoverSelfTest.java | 5 -
.../GridCachePartitionedTxSalvageSelfTest.java | 37 +-
.../GridCacheReplicatedFailoverSelfTest.java | 5 -
...CacheClientWriteBehindStoreAbstractTest.java | 104 ++++
...teCacheClientWriteBehindStoreAtomicTest.java | 38 ++
.../IgnteCacheClientWriteBehindStoreTxTest.java | 32 ++
.../DataStreamProcessorSelfTest.java | 3 +-
.../marshaller/MarshallerContextTestImpl.java | 18 +
.../tcp/TcpClientDiscoverySpiSelfTest.java | 73 ++-
.../junits/GridTestKernalContext.java | 1 +
.../junits/common/GridCommonAbstractTest.java | 11 +-
.../IgniteCacheFailoverTestSuite.java | 8 -
.../IgniteCacheFailoverTestSuite2.java | 47 ++
.../testsuites/IgniteCacheTestSuite4.java | 6 +-
.../IgniteCacheWriteBehindTestSuite.java | 2 +
.../testsuites/IgniteKernalSelfTestSuite.java | 2 +-
.../ignite/util/TestTcpCommunicationSpi.java | 21 +
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 | 16 +-
.../hibernate/CacheHibernateBlobStore.java | 87 +---
.../CacheHibernateBlobStoreFactory.java | 235 +++++++++
.../hibernate/src/test/config/factory-cache.xml | 59 +++
.../src/test/config/factory-cache1.xml | 61 +++
.../config/factory-incorrect-store-cache.xml | 56 +++
.../CacheHibernateStoreFactorySelfTest.java | 273 ++++++++++
.../testsuites/IgniteHibernateTestSuite.java | 2 +
modules/indexing/pom.xml | 2 +-
.../CacheAbstractQueryMetricsSelfTest.java | 205 ++++++++
.../CachePartitionedQueryMetricsSelfTest.java | 32 ++
.../CacheReplicatedQueryMetricsSelfTest.java | 32 ++
.../cache/GridCacheQueryMetricsSelfTest.java | 206 --------
.../query/h2/sql/BaseH2CompareQueryTest.java | 2 +-
.../IgniteCacheQuerySelfTestSuite.java | 4 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/mesos/pom.xml | 2 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar-2.10/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spark-2.10/pom.xml | 2 +-
modules/spark/pom.xml | 2 +-
modules/spring/pom.xml | 9 +-
.../GridResourceSpringBeanInjector.java | 2 +-
.../util/spring/IgniteSpringHelperImpl.java | 17 +
.../src/test/config/incorrect-store-cache.xml | 57 +++
modules/spring/src/test/config/node.xml | 43 ++
modules/spring/src/test/config/node1.xml | 45 ++
.../test/config/pojo-incorrect-store-cache.xml | 56 +++
modules/spring/src/test/config/store-cache.xml | 59 +++
modules/spring/src/test/config/store-cache1.xml | 62 +++
.../jdbc/CacheJdbcBlobStoreFactorySelfTest.java | 172 +++++++
.../jdbc/CacheJdbcPojoStoreFactorySelfTest.java | 193 +++++++
.../testsuites/IgniteSpringTestSuite.java | 5 +
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
.../ignite/tools/classgen/ClassesGenerator.java | 30 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console-2.10/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 2 +-
154 files changed, 4386 insertions(+), 1615 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ce31bae5/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
----------------------------------------------------------------------
[25/41] incubator-ignite git commit: IGNITE-621 - Fixing tests.
Posted by iv...@apache.org.
IGNITE-621 - Fixing tests.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0cb2d97c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0cb2d97c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0cb2d97c
Branch: refs/heads/ignite-964-1
Commit: 0cb2d97c61603017909ff6ffc4908f93b2384ec0
Parents: d24658d
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Mon Jun 29 17:39:42 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Mon Jun 29 17:39:42 2015 -0700
----------------------------------------------------------------------
.../dht/atomic/GridDhtAtomicUpdateFuture.java | 3 ---
.../dht/atomic/GridNearAtomicUpdateFuture.java | 23 ++++++++++----------
2 files changed, 12 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0cb2d97c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
index 37b57e6..4b1a58f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
@@ -146,9 +146,6 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter<Void>
GridDhtAtomicUpdateRequest req = mappings.get(nodeId);
if (req != null) {
- updateRes.addFailedKeys(req.keys(), new ClusterTopologyCheckedException("Failed to write keys on backup " +
- "(node left grid before response is received): " + nodeId));
-
// Remove only after added keys to failed set.
mappings.remove(nodeId);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0cb2d97c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index ea9b335..41cc400 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -328,12 +328,8 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
else {
topLocked = true;
- synchronized (this) {
- this.topVer = topVer;
-
- // Cannot remap.
- remapCnt.set(1);
- }
+ // Cannot remap.
+ remapCnt.set(1);
map0(topVer, null, false, null);
}
@@ -452,6 +448,9 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
CachePartialUpdateCheckedException cause = X.cause(err, CachePartialUpdateCheckedException.class);
+ if (F.isEmpty(cause.failedKeys()))
+ cause.printStackTrace();
+
remap(cause.failedKeys());
return false;
@@ -609,10 +608,6 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
return;
}
-
- synchronized (this) {
- this.topVer = topVer;
- }
}
finally {
cache.topology().readUnlock();
@@ -786,7 +781,11 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
conflictVer,
true);
- single = true;
+ synchronized (this) {
+ this.topVer = topVer;
+
+ single = true;
+ }
// Optimize mapping for single key.
mapSingle(primary.id(), req);
@@ -942,6 +941,8 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
}
}
+ this.topVer = topVer;
+
fastMapRemap = false;
}
[28/41] incubator-ignite git commit: Merge branches 'ignite-973-2'
and 'ignite-sprint-7' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-2
Posted by iv...@apache.org.
Merge branches 'ignite-973-2' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-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/234a8095
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/234a8095
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/234a8095
Branch: refs/heads/ignite-964-1
Commit: 234a809597bb07a7b78a51f4810ad217d9ab45a4
Parents: 712e7d5 44b187d
Author: S.Vladykin <sv...@gridgain.com>
Authored: Wed Jul 1 10:39:44 2015 -0700
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Wed Jul 1 10:39:44 2015 -0700
----------------------------------------------------------------------
assembly/dependencies-fabric.xml | 1 +
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 +-
.../ignite/compute/ComputeTaskSplitAdapter.java | 2 +-
.../managers/communication/GridIoManager.java | 49 ++++++-----
.../processors/cache/IgniteCacheFutureImpl.java | 42 ++++++++++
.../processors/cache/IgniteCacheProxy.java | 2 +-
.../internal/util/future/IgniteFutureImpl.java | 18 ++++-
.../util/nio/GridNioMessageTracker.java | 23 +++++-
.../ignite/spi/discovery/tcp/ServerImpl.java | 2 +-
.../core/src/main/resources/ignite.properties | 2 +-
modules/core/src/test/config/tests.properties | 6 +-
.../GridP2PContinuousDeploymentSelfTest.java | 2 -
modules/core/src/test/resources/helloworld.gar | Bin 6092 -> 0 bytes
modules/core/src/test/resources/helloworld1.gar | Bin 6092 -> 0 bytes
modules/core/src/test/resources/readme.txt | 6 --
modules/docker/Dockerfile | 55 +++++++++++++
modules/docker/README.txt | 11 +++
modules/docker/build_users_libs.sh | 39 +++++++++
modules/docker/download_ignite.sh | 49 +++++++++++
modules/docker/execute.sh | 62 ++++++++++++++
modules/docker/run.sh | 34 ++++++++
modules/extdata/p2p/pom.xml | 4 +-
modules/extdata/uri/META-INF/ignite.xml | 38 +++++++++
.../extdata/uri/modules/uri-dependency/pom.xml | 42 ++++++++++
.../deployment/uri/tasks/GarHelloWorldBean.java | 60 ++++++++++++++
.../src/main/resources/gar-example.properties | 18 +++++
modules/extdata/uri/pom.xml | 62 ++++++++++++--
.../deployment/uri/tasks/GarHelloWorldTask.java | 81 +++++++++++++++++++
.../deployment/uri/tasks/gar-spring-bean.xml | 29 +++++++
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/mesos/pom.xml | 2 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar-2.10/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spark-2.10/pom.xml | 2 +-
modules/spark/pom.xml | 2 +-
modules/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 16 +++-
.../GridTaskUriDeploymentDeadlockSelfTest.java | 13 +--
.../ignite/p2p/GridP2PDisabledSelfTest.java | 2 +-
modules/visor-console-2.10/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 14 ++--
64 files changed, 747 insertions(+), 101 deletions(-)
----------------------------------------------------------------------
[16/41] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-2
Posted by iv...@apache.org.
Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-973-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/108788b9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/108788b9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/108788b9
Branch: refs/heads/ignite-964-1
Commit: 108788b979306fe3398996eb60057a4c3c5afc39
Parents: e1243b4 359b431
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue Jun 23 23:13:27 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue Jun 23 23:13:27 2015 +0300
----------------------------------------------------------------------
.../configuration/IgniteReflectionFactory.java | 81 ++++++++++++++++++--
.../distributed/dht/GridDhtLocalPartition.java | 3 +-
.../dht/atomic/GridDhtAtomicCache.java | 9 +--
3 files changed, 82 insertions(+), 11 deletions(-)
----------------------------------------------------------------------