You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by nt...@apache.org on 2015/08/11 10:46:31 UTC
[01/50] incubator-ignite git commit: IGNITE-1185 Locate configuration
in class path. (cherry picked from commit 518b623)
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-1108 74e6ac64b -> 69cee3a17
IGNITE-1185 Locate configuration in class path.
(cherry picked from commit 518b623)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/754da7a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/754da7a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/754da7a1
Branch: refs/heads/ignite-1108
Commit: 754da7a19b8d645c6497b2cdfee320cb922990fc
Parents: 41c76a7
Author: sevdokimov <se...@gridgain.com>
Authored: Mon Aug 3 12:48:35 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Mon Aug 3 14:15:19 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/internal/IgnitionEx.java | 17 +----------------
.../apache/ignite/internal/util/IgniteUtils.java | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/754da7a1/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 73de99a..3790703 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -583,22 +583,7 @@ public class IgnitionEx {
public static IgniteBiTuple<Collection<IgniteConfiguration>, ? extends GridSpringResourceContext>
loadConfigurations(String springCfgPath) throws IgniteCheckedException {
A.notNull(springCfgPath, "springCfgPath");
-
- URL url;
-
- try {
- url = new URL(springCfgPath);
- }
- catch (MalformedURLException e) {
- url = U.resolveIgniteUrl(springCfgPath);
-
- if (url == null)
- throw new IgniteCheckedException("Spring XML configuration path is invalid: " + springCfgPath +
- ". Note that this path should be either absolute or a relative local file system path, " +
- "relative to META-INF in classpath or valid URL to IGNITE_HOME.", e);
- }
-
- return loadConfigurations(url);
+ return loadConfigurations(IgniteUtils.resolveSpringUrl(springCfgPath));
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/754da7a1/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 6bd361f..ee07743 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -3308,6 +3308,9 @@ public abstract class IgniteUtils {
url = U.resolveIgniteUrl(springCfgPath);
if (url == null)
+ url = resolveInClasspath(springCfgPath);
+
+ if (url == null)
throw new IgniteCheckedException("Spring XML configuration path is invalid: " + springCfgPath +
". Note that this path should be either absolute or a relative local file system path, " +
"relative to META-INF in classpath or valid URL to IGNITE_HOME.", e);
@@ -3317,6 +3320,19 @@ public abstract class IgniteUtils {
}
/**
+ * @param path Resource path.
+ * @return Resource URL inside jar. Or {@code null}.
+ */
+ @Nullable private static URL resolveInClasspath(String path) {
+ ClassLoader clsLdr = Thread.currentThread().getContextClassLoader();
+
+ if (clsLdr == null)
+ return null;
+
+ return clsLdr.getResource(path.replaceAll("\\\\", "/"));
+ }
+
+ /**
* Gets URL representing the path passed in. First the check is made if path is absolute.
* If not, then the check is made if path is relative to {@code META-INF} folder in classpath.
* If not, then the check is made if path is relative to ${IGNITE_HOME}.
[21/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/master'
Posted by nt...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/38810b63
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/38810b63
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/38810b63
Branch: refs/heads/ignite-1108
Commit: 38810b639fbcf6f5a07302f02c48226f4156de9d
Parents: e1f0152 52c1dfa
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue Aug 4 17:52:08 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue Aug 4 17:52:08 2015 +0300
----------------------------------------------------------------------
.../yardstick/config/benchmark-query.properties | 3 +-
modules/yardstick/config/ignite-base-config.xml | 2 -
.../yardstick/IgniteBenchmarkArguments.java | 11 ++
.../cache/IgniteJdbcSqlQueryBenchmark.java | 134 +++++++++++++++++++
4 files changed, 147 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[44/50] incubator-ignite git commit: Merge branch 'ignite-1189'
Posted by nt...@apache.org.
Merge branch 'ignite-1189'
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/cd844a7f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/cd844a7f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/cd844a7f
Branch: refs/heads/ignite-1108
Commit: cd844a7f959c79e3b5e9364ab9993f1c3d4fc91e
Parents: d9acbd1 e42f954
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Aug 10 13:34:03 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Aug 10 13:34:03 2015 +0300
----------------------------------------------------------------------
.../configuration/IgniteConfiguration.java | 1 -
.../dht/atomic/GridDhtAtomicCache.java | 36 ++++++++++++++------
2 files changed, 26 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
[32/50] incubator-ignite git commit: msg format
Posted by nt...@apache.org.
msg format
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d7623b47
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d7623b47
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d7623b47
Branch: refs/heads/ignite-1108
Commit: d7623b47abea23c685856b36ade75027efbb3cc5
Parents: 2173b0e
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Aug 6 12:38:24 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Thu Aug 6 12:38:24 2015 +0300
----------------------------------------------------------------------
.../ignite/spi/discovery/tcp/ClientImpl.java | 27 +++++++++++++++-----
1 file changed, 21 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7623b47/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
index 0f9c100..d5d6ea2 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
@@ -29,6 +29,7 @@ import org.apache.ignite.lang.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.discovery.*;
import org.apache.ignite.spi.discovery.tcp.internal.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.*;
import org.apache.ignite.spi.discovery.tcp.messages.*;
import org.jetbrains.annotations.*;
import org.jsr166.*;
@@ -159,7 +160,9 @@ class ClientImpl extends TcpDiscoveryImpl {
/** {@inheritDoc} */
@Override public void spiStart(@Nullable String gridName) throws IgniteSpiException {
- spi.initLocalNode(0, true);
+ spi.initLocalNode(
+ 0,
+ true);
locNode = spi.locNode;
@@ -190,7 +193,10 @@ class ClientImpl extends TcpDiscoveryImpl {
throw new IgniteSpiException("Thread has been interrupted.", e);
}
- timer.schedule(new HeartbeatSender(), spi.hbFreq, spi.hbFreq);
+ timer.schedule(
+ new HeartbeatSender(),
+ spi.hbFreq,
+ spi.hbFreq);
spi.printStartInfo();
}
@@ -408,7 +414,11 @@ class ClientImpl extends TcpDiscoveryImpl {
if (timeout > 0 && (U.currentTimeMillis() - startTime) > timeout)
return null;
- LT.warn(log, null, "No addresses registered in the IP finder (will retry in 2000ms): "
+ LT.warn(log, null, "IP finder returned empty addresses list. " +
+ "Please check IP finder configuration" +
+ (spi.ipFinder instanceof TcpDiscoveryMulticastIpFinder ?
+ " and make sure multicast works on your network. " : ". ") +
+ "Will retry every 2 secs."
+ spi.ipFinder, true);
Thread.sleep(2000);
@@ -460,7 +470,7 @@ class ClientImpl extends TcpDiscoveryImpl {
return null;
LT.warn(log, null, "Failed to connect to any address from IP finder (will retry to join topology " +
- "in 2000ms): " + toOrderedList(addrs0), true);
+ "every 2 secs): " + toOrderedList(addrs0), true);
Thread.sleep(2000);
}
@@ -682,7 +692,9 @@ class ClientImpl extends TcpDiscoveryImpl {
U.interrupt(msgWorker);
U.join(sockWriter, log);
- U.join(msgWorker, log);
+ U.join(
+ msgWorker,
+ log);
}
/** {@inheritDoc} */
@@ -987,7 +999,10 @@ class ClientImpl extends TcpDiscoveryImpl {
}
}
- spi.writeToSocket(sock, msg, socketTimeout);
+ spi.writeToSocket(
+ sock,
+ msg,
+ socketTimeout);
msg = null;
[37/50] incubator-ignite git commit: Added comment in
benchmark-multicast.properties
Posted by nt...@apache.org.
Added comment in benchmark-multicast.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/b94c1302
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b94c1302
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b94c1302
Branch: refs/heads/ignite-1108
Commit: b94c13026e9097adb2d318548832ce870152c95f
Parents: 6e496e6
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Thu Aug 6 15:39:54 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Thu Aug 6 15:39:54 2015 +0300
----------------------------------------------------------------------
modules/yardstick/config/benchmark-multicast.properties | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b94c1302/modules/yardstick/config/benchmark-multicast.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-multicast.properties b/modules/yardstick/config/benchmark-multicast.properties
index 74b152c..82bf766 100644
--- a/modules/yardstick/config/benchmark-multicast.properties
+++ b/modules/yardstick/config/benchmark-multicast.properties
@@ -45,6 +45,7 @@ BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe,DStatProbe
# Packages where the specified benchmark is searched by reflection mechanism.
BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick
+# Restart servers for each benchmark.
RESTART_SERVERS=true
# Probe point writer class name.
[15/50] incubator-ignite git commit: ignite-1189: 4 reproducing
deadlock
Posted by nt...@apache.org.
ignite-1189: 4 reproducing deadlock
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/132562b4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/132562b4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/132562b4
Branch: refs/heads/ignite-1108
Commit: 132562b431bc3250abe56ec48725c5ebe6083964
Parents: 28c9977
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 12:26:00 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 12:26:00 2015 +0300
----------------------------------------------------------------------
.../dht/atomic/GridDhtAtomicCache.java | 8 ++--
.../IgniteCacheAtomicNodeRestartTest.java | 45 ++++++++++++++++++++
2 files changed, 48 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/132562b4/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 4d73fb2..cd6e28d 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
@@ -1152,11 +1152,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
e.printStackTrace();
}
- catch (Exception e) {
- U.error(log, "FUCK ERROR", e);
-
- throw e;
- }
finally {
if (locked != null)
unlockEntries(locked, req.topologyVersion());
@@ -1179,6 +1174,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
remap = true;
}
+ catch (Exception e) {
+ U.error(log, "Unexpected exception during cache update", e);
+ }
if (remap) {
assert dhtFut == null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/132562b4/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
index 70e6c4c..caee4d0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
@@ -36,7 +36,52 @@ public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRe
super.testRestartWithPutTenNodesTwoBackups();
}
+ public void testRestartWithPutTenNodesTwoBackups2() throws Throwable {
+ super.testRestartWithPutTenNodesTwoBackups();
+ }
+ public void testRestartWithPutTenNodesTwoBackups3() throws Throwable {
+ super.testRestartWithPutTenNodesTwoBackups();
+ }
+ public void testRestartWithPutTenNodesTwoBackups4() throws Throwable {
+ super.testRestartWithPutTenNodesTwoBackups();
+ }
+ public void testRestartWithPutTenNodesTwoBackups5() throws Throwable {
+ super.testRestartWithPutTenNodesTwoBackups();
+ }
+ public void testRestartWithPutTenNodesTwoBackups6() throws Throwable {
+ super.testRestartWithPutTenNodesTwoBackups();
+ }
+ public void testRestartWithPutTenNodesTwoBackups7() throws Throwable {
+ super.testRestartWithPutTenNodesTwoBackups();
+ }
+ public void testRestartWithPutTenNodesTwoBackups8() throws Throwable {
+ super.testRestartWithPutTenNodesTwoBackups();
+ }
+ public void testRestartWithPutTenNodesTwoBackups9() throws Throwable {
+ super.testRestartWithPutTenNodesTwoBackups();
+ }
+ public void testRestartWithPutTenNodesTwoBackups10() throws Throwable {
+ super.testRestartWithPutTenNodesTwoBackups();
+ }
+ public void testRestartWithPutTenNodesTwoBackups11() throws Throwable {
+ super.testRestartWithPutTenNodesTwoBackups();
+ }
+ public void testRestartWithPutTenNodesTwoBackups12() throws Throwable {
+ super.testRestartWithPutTenNodesTwoBackups();
+ }
+ public void testRestartWithPutTenNodesTwoBackups13() throws Throwable {
+ super.testRestartWithPutTenNodesTwoBackups();
+ }
+ public void testRestartWithPutTenNodesTwoBackups14() throws Throwable {
+ super.testRestartWithPutTenNodesTwoBackups();
+ }
+
+ @Override protected long getTestTimeout() {
+ return Long.MAX_VALUE;
+ }
+
@Override public void testRestart() throws Exception {
+
}
@Override public void testRestartWithPutTwoNodesNoBackups() throws Throwable {
[41/50] incubator-ignite git commit: Renaming
Posted by nt...@apache.org.
Renaming
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ebcdb4bf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ebcdb4bf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ebcdb4bf
Branch: refs/heads/ignite-1108
Commit: ebcdb4bf5cfe508670129389637984b8dba43146
Parents: d7dd4a0
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Aug 6 16:44:21 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Thu Aug 6 16:44:21 2015 +0300
----------------------------------------------------------------------
.../internal/processors/cache/query/GridCacheSqlQuery.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ebcdb4bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
index d5eb379..77bbe39 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
@@ -53,7 +53,7 @@ public class GridCacheSqlQuery implements Message {
/** */
@GridToStringInclude
@GridDirectTransient
- private LinkedHashMap<String, ?> columns;
+ private LinkedHashMap<String, ?> cols;
/**
* For {@link Message}.
@@ -78,7 +78,7 @@ public class GridCacheSqlQuery implements Message {
* @return Columns.
*/
public LinkedHashMap<String, ?> columns() {
- return columns;
+ return cols;
}
/**
@@ -86,7 +86,7 @@ public class GridCacheSqlQuery implements Message {
* @return {@code this}.
*/
public GridCacheSqlQuery columns(LinkedHashMap<String, ?> columns) {
- this.columns = columns;
+ this.cols = columns;
return this;
}
[39/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/master'
Posted by nt...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/63944d41
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/63944d41
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/63944d41
Branch: refs/heads/ignite-1108
Commit: 63944d41d9bb7e9e74366f935b9f620e01bc36ce
Parents: 56efb6b b94c130
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Aug 6 15:54:01 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Thu Aug 6 15:54:01 2015 +0300
----------------------------------------------------------------------
assembly/release-hadoop.xml | 5 +
.../config/benchmark-multicast.properties | 1 +
parent/pom.xml | 97 ++++++++++----------
3 files changed, 54 insertions(+), 49 deletions(-)
----------------------------------------------------------------------
[16/50] incubator-ignite git commit: ignite-1189: fixing deadlock
Posted by nt...@apache.org.
ignite-1189: fixing deadlock
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4d528bec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4d528bec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4d528bec
Branch: refs/heads/ignite-1108
Commit: 4d528becc1cd3db9d4d2d6db2053895043aa3918
Parents: 132562b
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 13:04:35 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 13:04:35 2015 +0300
----------------------------------------------------------------------
.../dht/atomic/GridDhtAtomicCache.java | 29 +++++++++++++-------
1 file changed, 19 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4d528bec/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 cd6e28d..470efdd 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
@@ -1176,6 +1176,12 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
catch (Exception e) {
U.error(log, "Unexpected exception during cache update", e);
+
+ res.addFailedKeys(keys, e);
+
+ completionCb.apply(req, res);
+
+ return;
}
if (remap) {
@@ -2167,19 +2173,22 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
// Enqueue entries while holding locks.
Collection<KeyCacheObject> skip = null;
- for (GridCacheMapEntry entry : locked) {
- if (entry != null && entry.deleted()) {
- if (skip == null)
- skip = new HashSet<>(locked.size(), 1.0f);
+ try {
+ for (GridCacheMapEntry entry : locked) {
+ if (entry != null && entry.deleted()) {
+ if (skip == null)
+ skip = new HashSet<>(locked.size(), 1.0f);
- skip.add(entry.key());
+ skip.add(entry.key());
+ }
}
}
-
- // Release locks.
- for (GridCacheMapEntry entry : locked) {
- if (entry != null)
- UNSAFE.monitorExit(entry);
+ finally {
+ // Release locks.
+ for (GridCacheMapEntry entry : locked) {
+ if (entry != null)
+ UNSAFE.monitorExit(entry);
+ }
}
// Try evict partitions.
[23/50] incubator-ignite git commit: master - query restart tests fix2
Posted by nt...@apache.org.
master - query restart tests fix2
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/246b94a8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/246b94a8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/246b94a8
Branch: refs/heads/ignite-1108
Commit: 246b94a8bdc9901935db1865a0607a9fe48f5b23
Parents: 90adeae
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue Aug 4 21:05:13 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue Aug 4 21:05:13 2015 +0300
----------------------------------------------------------------------
.../query/h2/twostep/GridMergeIndex.java | 7 +++
.../h2/twostep/GridMergeIndexUnsorted.java | 23 +++++++--
.../query/h2/twostep/GridMergeTable.java | 51 ++++++++------------
.../h2/twostep/GridReduceQueryExecutor.java | 28 +----------
4 files changed, 45 insertions(+), 64 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/246b94a8/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndex.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndex.java
index 2b2996d..71b207d 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndex.java
@@ -68,6 +68,13 @@ public abstract class GridMergeIndex extends BaseIndex {
}
/**
+ * @return Return source nodes for this merge index.
+ */
+ public Set<UUID> sources() {
+ return remainingRows.keySet();
+ }
+
+ /**
* @param nodeId Node ID.
* @return {@code true} If this index needs data from the given source node.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/246b94a8/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
index e0a07ec..276d25b 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
@@ -64,11 +64,24 @@ public class GridMergeIndexUnsorted extends GridMergeIndex {
while (!iter.hasNext()) {
GridResultPage page;
- try {
- page = queue.take();
- }
- catch (InterruptedException e) {
- throw new CacheException("Query execution was interrupted.", e);
+ for (;;) {
+ try {
+ page = queue.poll(500, TimeUnit.MILLISECONDS);
+ }
+ catch (InterruptedException e) {
+ throw new CacheException("Query execution was interrupted.", e);
+ }
+
+ if (page != null)
+ break;
+
+ UUID nodeId = ((GridMergeTable)table).checkSourceNodesAlive();
+
+ if (nodeId != null) {
+ fail(nodeId);
+
+ assert !queue.isEmpty();
+ }
}
if (page.isLast())
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/246b94a8/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
index c9cdff2..fd9eec3 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
@@ -17,7 +17,7 @@
package org.apache.ignite.internal.processors.query.h2.twostep;
-import org.h2.api.*;
+import org.apache.ignite.internal.*;
import org.h2.command.ddl.*;
import org.h2.engine.*;
import org.h2.index.*;
@@ -32,6 +32,9 @@ import java.util.*;
*/
public class GridMergeTable extends TableBase {
/** */
+ private final GridKernalContext ctx;
+
+ /** */
private final ArrayList<Index> idxs = new ArrayList<>(1);
/** */
@@ -39,15 +42,29 @@ public class GridMergeTable extends TableBase {
/**
* @param data Data.
+ * @param ctx Kernal context.
*/
- public GridMergeTable(CreateTableData data) {
+ public GridMergeTable(CreateTableData data, GridKernalContext ctx) {
super(data);
+ this.ctx = ctx;
idx = new GridMergeIndexUnsorted(this, "merge_scan");
idxs.add(idx);
}
+ /**
+ * @return Failed node or {@code null} if all alive.
+ */
+ public UUID checkSourceNodesAlive() {
+ for (UUID nodeId : idx.sources()) {
+ if (!ctx.discovery().alive(nodeId))
+ return nodeId;
+ }
+
+ return null;
+ }
+
/** {@inheritDoc} */
@Override public void lock(Session session, boolean exclusive, boolean force) {
// No-op.
@@ -153,34 +170,4 @@ public class GridMergeTable extends TableBase {
@Override public void checkRename() {
throw DbException.getUnsupportedException("rename");
}
-
- /**
- * Engine.
- */
- public static class Engine implements TableEngine {
- /** */
- private static ThreadLocal<GridMergeTable> createdTbl = new ThreadLocal<>();
-
- /**
- * @return Created table.
- */
- public static GridMergeTable getCreated() {
- GridMergeTable tbl = createdTbl.get();
-
- assert tbl != null;
-
- createdTbl.remove();
-
- return tbl;
- }
-
- /** {@inheritDoc} */
- @Override public Table createTable(CreateTableData data) {
- GridMergeTable tbl = new GridMergeTable(data);
-
- createdTbl.set(tbl);
-
- return tbl;
- }
- }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/246b94a8/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
index ac269db..ad8ab34 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
@@ -1096,7 +1096,7 @@ public class GridReduceQueryExecutor {
else
data.columns = planColumns();
- return new GridMergeTable(data);
+ return new GridMergeTable(data, ctx);
}
catch (Exception e) {
U.closeQuiet(conn);
@@ -1117,32 +1117,6 @@ public class GridReduceQueryExecutor {
}
/**
- * @param conn Connection.
- * @param qry Query.
- * @return Table.
- * @throws IgniteCheckedException If failed.
- */
- private GridMergeTable createTable(Connection conn, GridCacheSqlQuery qry) throws IgniteCheckedException {
- try {
- try (PreparedStatement s = conn.prepareStatement(
- "CREATE LOCAL TEMPORARY TABLE " + qry.alias() +
- " ENGINE \"" + GridMergeTable.Engine.class.getName() + "\" " +
- " AS SELECT * FROM (" + qry.query() + ") WHERE FALSE")) {
- h2.bindParameters(s, F.asList(qry.parameters()));
-
- s.execute();
- }
-
- return GridMergeTable.Engine.getCreated();
- }
- catch (SQLException e) {
- U.closeQuiet(conn);
-
- throw new IgniteCheckedException(e);
- }
- }
-
- /**
* @param reconnectFut Reconnect future.
*/
public void onDisconnected(IgniteFuture<?> reconnectFut) {
[26/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/master'
Posted by nt...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c087be21
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c087be21
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c087be21
Branch: refs/heads/ignite-1108
Commit: c087be21760dd8ab34a0b2a43f7f10f7a5203e41
Parents: b683b8f 01c3e09
Author: S.Vladykin <sv...@gridgain.com>
Authored: Wed Aug 5 00:27:37 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Wed Aug 5 00:27:37 2015 +0300
----------------------------------------------------------------------
.../internal/processors/cache/GridCacheSwapPreloadSelfTest.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
[10/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-1157' into ignite-1.3.3
Posted by nt...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-1157' into ignite-1.3.3
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7d747d2a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7d747d2a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7d747d2a
Branch: refs/heads/ignite-1108
Commit: 7d747d2aca6bdee21ca1c300b17d9cad709f38a2
Parents: 015d9cd a1543cf
Author: sevdokimov <se...@gridgain.com>
Authored: Mon Aug 3 16:21:04 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Mon Aug 3 16:21:04 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/util/GridLogThrottle.java | 63 +++++++++++++++-----
.../ignite/spi/discovery/tcp/ClientImpl.java | 5 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 5 +-
.../spi/discovery/tcp/TcpDiscoveryImpl.java | 15 +++++
4 files changed, 70 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
[09/50] incubator-ignite git commit: minor
Posted by nt...@apache.org.
minor
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d0a6f559
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d0a6f559
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d0a6f559
Branch: refs/heads/ignite-1108
Commit: d0a6f5590445dea45c3d850733e4b7397879edf8
Parents: 3c19212
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Aug 3 15:59:28 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Aug 3 15:59:28 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/processors/cache/GridCacheProcessor.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d0a6f559/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index f5ccaec..3040621 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -1764,7 +1764,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
GridCacheIoManager ioMgr = new GridCacheIoManager();
CacheJtaManagerAdapter jta = JTA.createOptional();
-
+
return new GridCacheSharedContext(
kernalCtx,
tm,
[08/50] incubator-ignite git commit: IGNITE-1157 Fix problems found
on review.
Posted by nt...@apache.org.
IGNITE-1157 Fix problems found on review.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a1543cfe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a1543cfe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a1543cfe
Branch: refs/heads/ignite-1108
Commit: a1543cfe4ce435adcc08e3680d19da8b63a3d945
Parents: 45aa598
Author: sevdokimov <se...@gridgain.com>
Authored: Mon Aug 3 15:22:27 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Mon Aug 3 15:22:27 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/util/GridLogThrottle.java | 36 ++++++++++++++------
1 file changed, 26 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1543cfe/modules/core/src/main/java/org/apache/ignite/internal/util/GridLogThrottle.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridLogThrottle.java b/modules/core/src/main/java/org/apache/ignite/internal/util/GridLogThrottle.java
index f37cfea..607b17b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridLogThrottle.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridLogThrottle.java
@@ -18,9 +18,9 @@
package org.apache.ignite.internal.util;
import org.apache.ignite.*;
-import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
import org.jetbrains.annotations.*;
import org.jsr166.*;
@@ -42,7 +42,7 @@ public class GridLogThrottle {
private static int throttleTimeout = DFLT_THROTTLE_TIMEOUT;
/** Errors. */
- private static final ConcurrentMap<GridTuple3<Class<? extends Throwable>, String, Boolean>, Long> errors =
+ private static final ConcurrentMap<IgniteBiTuple<Class<? extends Throwable>, String>, Long> errors =
new ConcurrentHashMap8<>();
/**
@@ -95,6 +95,7 @@ public class GridLogThrottle {
* @param log Logger.
* @param e Error (optional).
* @param msg Message.
+ * @param quite Print warning anyway.
*/
public static void warn(@Nullable IgniteLogger log, @Nullable Throwable e, String msg, boolean quite) {
assert !F.isEmpty(msg);
@@ -121,11 +122,22 @@ public class GridLogThrottle {
*
* @param log Logger.
* @param msg Message.
+ * @param quite Print info anyway.
*/
- public static void info(@Nullable IgniteLogger log, String msg) {
+ public static void info(@Nullable IgniteLogger log, String msg, boolean quite) {
assert !F.isEmpty(msg);
- log(log, null, msg, null, LogLevel.INFO, false);
+ log(log, null, msg, null, LogLevel.INFO, quite);
+ }
+
+ /**
+ * Logs info if needed.
+ *
+ * @param log Logger.
+ * @param msg Message.
+ */
+ public static void info(@Nullable IgniteLogger log, String msg) {
+ info(log, msg, false);
}
/**
@@ -149,9 +161,9 @@ public class GridLogThrottle {
LogLevel level, boolean quiet) {
assert !F.isEmpty(longMsg);
- GridTuple3<Class<? extends Throwable>, String, Boolean> tup =
- e != null ? F.<Class<? extends Throwable>, String, Boolean>t(e.getClass(), e.getMessage(), quiet) :
- F.<Class<? extends Throwable>, String, Boolean>t(null, longMsg, quiet);
+ IgniteBiTuple<Class<? extends Throwable>, String> tup =
+ e != null ? F.<Class<? extends Throwable>, String>t(e.getClass(), e.getMessage()) :
+ F.<Class<? extends Throwable>, String>t(null, longMsg);
while (true) {
Long loggedTs = errors.get(tup);
@@ -177,7 +189,7 @@ public class GridLogThrottle {
* @param newStamp New timestamp.
* @return {@code True} if throttle value was replaced.
*/
- private static boolean replace(GridTuple3<Class<? extends Throwable>, String, Boolean> t, @Nullable Long oldStamp,
+ private static boolean replace(IgniteBiTuple<Class<? extends Throwable>, String> t, @Nullable Long oldStamp,
Long newStamp) {
assert newStamp != null;
@@ -222,8 +234,12 @@ public class GridLogThrottle {
/** Info level. */
INFO {
@Override public void doLog(IgniteLogger log, String longMsg, String shortMsg, Throwable e, boolean quiet) {
- if (log.isInfoEnabled())
- log.info(longMsg);
+ if (quiet)
+ U.quietAndInfo(log, longMsg);
+ else {
+ if (log.isInfoEnabled())
+ log.info(longMsg);
+ }
}
};
[42/50] incubator-ignite git commit: # ignite-1209
Posted by nt...@apache.org.
# ignite-1209
Signed-off-by: Yakov Zhdanov <yz...@gridgain.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d9acbd1d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d9acbd1d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d9acbd1d
Branch: refs/heads/ignite-1108
Commit: d9acbd1da16efac59d3cc44c18c16af2db5f50f2
Parents: ebcdb4b
Author: ashutak <as...@gridgain.com>
Authored: Thu Aug 6 18:21:08 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Thu Aug 6 18:29:44 2015 +0300
----------------------------------------------------------------------
scripts/git-apply-patch.sh | 94 -------------------------------------
scripts/git-patch-functions.sh | 56 ++--------------------
2 files changed, 4 insertions(+), 146 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d9acbd1d/scripts/git-apply-patch.sh
----------------------------------------------------------------------
diff --git a/scripts/git-apply-patch.sh b/scripts/git-apply-patch.sh
deleted file mode 100755
index 757cd26..0000000
--- a/scripts/git-apply-patch.sh
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-#
-# Git patch-file applier.
-#
-echo 'Usage: scripts/git-apply-patch.sh <ignite-task> [-ih|--ignitehome <path>] [-idb|--ignitedefbranch <branch-name>] [-ph|--patchhome <path>]'
-echo "It should be called from IGNITE_HOME directory."
-echo "Patch will be applied to DEFAULT_BRANCH from PATCHES_HOME."
-echo "Note: you can use ${IGNITE_HOME}/scripts/git-patch-prop-local.sh to set your own local properties (to rewrite settings at git-patch-prop-local.sh). "
-echo
-
-#
-# Init home and import properties and functions.
-#
-if [ -z ${IGNITE_HOME} ] # Script can be called from not IGNITE_HOME if IGNITE_HOME was set.
- then IGNITE_HOME=$PWD
-fi
-
-. ${IGNITE_HOME}/scripts/git-patch-prop.sh # Import properties.
-. ${IGNITE_HOME}/scripts/git-patch-functions.sh # Import patch functions.
-
-if [ -f ${IGNITE_HOME}/scripts/git-patch-prop-local.sh ] # Whether a local user properties file exists.
- then . ${IGNITE_HOME}/scripts/git-patch-prop-local.sh # Import user properties (it will rewrite global properties).
-fi
-
-#
-# Ignite task.
-#
-IGNITE_TASK=$1
-
-#
-# Read command line params.
-#
-while [[ $# > 1 ]]
-do
- key="$1"
-
- case $key in
- -ih|--ignitehome)
- IGNITE_HOME="$2"
- shift
- ;;
-
- -idb|--ignitedefbranch)
- IGNITE_DEFAULT_BRANCH="$2"
- shift
- ;;
-
- -ph|--patchhome)
- PATCHES_HOME="$2"
- shift
- ;;
- *)
-
- echo "Unknown parameter: ${key}"
- ;;
- esac
- shift
-done
-
-echo "IGNITE_HOME : ${IGNITE_HOME}"
-echo "Default branch : ${IGNITE_DEFAULT_BRANCH}"
-echo "Ignite task : ${IGNITE_TASK}"
-echo
-echo "PATCHES_HOME : ${PATCHES_HOME}"
-echo
-
-#
-# Main script logic.
-#
-
-currentAndDefaultBranchesShouldBeEqual ${IGNITE_HOME} ${IGNITE_DEFAULT_BRANCH}
-
-requireCleanWorkTree ${IGNITE_HOME}
-
-IGNITE_PATCH_FILE=${PATCHES_HOME}/${IGNITE_DEFAULT_BRANCH}_${IGNITE_TASK}.patch
-
-applyPatch ${IGNITE_HOME} ${IGNITE_DEFAULT_BRANCH} ${IGNITE_PATCH_FILE}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d9acbd1d/scripts/git-patch-functions.sh
----------------------------------------------------------------------
diff --git a/scripts/git-patch-functions.sh b/scripts/git-patch-functions.sh
index 3cc1bb0..cade691 100644
--- a/scripts/git-patch-functions.sh
+++ b/scripts/git-patch-functions.sh
@@ -50,13 +50,16 @@ formatPatch () {
cd ${GIT_HOME}
git checkout ${DEFAULT_BRANCH}
+
+ DEF_BRANCH_REV="$(git rev-parse --short HEAD)"
+
git checkout -b tmppatch
# Merge to make only one commit.
git merge --squash ${PATCHED_BRANCH}
git commit -a -m "# ${PATCHED_BRANCH}"
- PATCH_FILE=${PATCHES_HOME}'/'${DEFAULT_BRANCH}_${PATCHED_BRANCH}${PATCH_SUFFIX}
+ PATCH_FILE=${PATCHES_HOME}'/'${DEFAULT_BRANCH}_${DEF_BRANCH_REV}_${PATCHED_BRANCH}${PATCH_SUFFIX}
git format-patch ${DEFAULT_BRANCH} --stdout > ${PATCH_FILE}
echo "Patch file created."
@@ -125,55 +128,4 @@ requireCleanWorkTree () {
fi
}
-#
-# Applies patch. Applies patch file created by formatPatch method.
-#
-# Params:
-# - Git home.
-# - Default branch.
-# - File with patch.
-#
-applyPatch () {
- GIT_HOME=$1
- DEFAULT_BRANCH=$2
- PATCH_FILE=$3
-
- cd ${GIT_HOME}
-
- if [ ! -f ${PATCH_FILE} ]
- then
- echo $0", ERROR:"
- echo "Expected patch file not found: $PATCH_FILE."
-
- exit 1
- fi
-
- echo "Patch $PATCH_FILE will be applied to $DEFAULT_BRANCH branch."
-
- git am ${PATCH_FILE}
-}
-
-#
-# Checks that given Default branch and Current branch are equal.
-# Exit with code 1 in error case.
-#
-# Params:
-# - Git home.
-# - Default branch.
-#
-currentAndDefaultBranchesShouldBeEqual () {
- GIT_HOME=$1
- DEFAULT_BRANCH=$2
-
- cd ${GIT_HOME}
-
- CURRENT_BRANCH=$( determineCurrentBranch ${GIT_HOME} )
-
- if [ "$CURRENT_BRANCH" != "$DEFAULT_BRANCH" ]
- then
- echo $0", ERROR:"
- echo "You are not on an expected branch. Your current branch at $GIT_HOME is $CURRENT_BRANCH, should be $DEFAULT_BRANCH."
- exit 1
- fi
-}
[18/50] incubator-ignite git commit: ignite-1189: eventually fixed
the deadlock
Posted by nt...@apache.org.
ignite-1189: eventually fixed the deadlock
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/67706063
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/67706063
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/67706063
Branch: refs/heads/ignite-1108
Commit: 67706063d2e8d8cc3ed8d55cdfffccc0a21005c6
Parents: d78e4c8
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 13:34:19 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 13:34:19 2015 +0300
----------------------------------------------------------------------
.../dht/atomic/GridDhtAtomicCache.java | 6 +-
.../IgniteCacheAtomicNodeRestartTest.java | 92 --------------------
2 files changed, 5 insertions(+), 93 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/67706063/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 470efdd..14b4680 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
@@ -1175,6 +1175,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
remap = true;
}
catch (Exception e) {
+ // At least RuntimeException can be thrown by the code above when GridCacheContext is cleaned and there is
+ // an attempt to use cleaned resources.
U.error(log, "Unexpected exception during cache update", e);
res.addFailedKeys(keys, e);
@@ -2184,7 +2186,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
}
finally {
- // Release locks.
+ // At least RuntimeException can be thrown by the code above when GridCacheContext is cleaned and there is
+ // an attempt to use cleaned resources.
+ // That's why releasing locks in the finally block..
for (GridCacheMapEntry entry : locked) {
if (entry != null)
UNSAFE.monitorExit(entry);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/67706063/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
index caee4d0..1c4e616 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
@@ -30,96 +30,4 @@ public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRe
@Override protected CacheAtomicityMode atomicityMode() {
return ATOMIC;
}
-
- /** {@inheritDoc} */
- @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable {
- super.testRestartWithPutTenNodesTwoBackups();
- }
-
- public void testRestartWithPutTenNodesTwoBackups2() throws Throwable {
- super.testRestartWithPutTenNodesTwoBackups();
- }
- public void testRestartWithPutTenNodesTwoBackups3() throws Throwable {
- super.testRestartWithPutTenNodesTwoBackups();
- }
- public void testRestartWithPutTenNodesTwoBackups4() throws Throwable {
- super.testRestartWithPutTenNodesTwoBackups();
- }
- public void testRestartWithPutTenNodesTwoBackups5() throws Throwable {
- super.testRestartWithPutTenNodesTwoBackups();
- }
- public void testRestartWithPutTenNodesTwoBackups6() throws Throwable {
- super.testRestartWithPutTenNodesTwoBackups();
- }
- public void testRestartWithPutTenNodesTwoBackups7() throws Throwable {
- super.testRestartWithPutTenNodesTwoBackups();
- }
- public void testRestartWithPutTenNodesTwoBackups8() throws Throwable {
- super.testRestartWithPutTenNodesTwoBackups();
- }
- public void testRestartWithPutTenNodesTwoBackups9() throws Throwable {
- super.testRestartWithPutTenNodesTwoBackups();
- }
- public void testRestartWithPutTenNodesTwoBackups10() throws Throwable {
- super.testRestartWithPutTenNodesTwoBackups();
- }
- public void testRestartWithPutTenNodesTwoBackups11() throws Throwable {
- super.testRestartWithPutTenNodesTwoBackups();
- }
- public void testRestartWithPutTenNodesTwoBackups12() throws Throwable {
- super.testRestartWithPutTenNodesTwoBackups();
- }
- public void testRestartWithPutTenNodesTwoBackups13() throws Throwable {
- super.testRestartWithPutTenNodesTwoBackups();
- }
- public void testRestartWithPutTenNodesTwoBackups14() throws Throwable {
- super.testRestartWithPutTenNodesTwoBackups();
- }
-
- @Override protected long getTestTimeout() {
- return Long.MAX_VALUE;
- }
-
- @Override public void testRestart() throws Exception {
-
- }
-
- @Override public void testRestartWithPutTwoNodesNoBackups() throws Throwable {
- }
-
- @Override public void testRestartWithPutTwoNodesOneBackup() throws Throwable {
- }
-
- @Override public void testRestartWithPutFourNodesNoBackups() throws Throwable {
- }
-
- @Override public void testRestartWithPutFourNodesOneBackups() throws Throwable {
- }
-
- @Override public void testRestartWithPutSixNodesTwoBackups() throws Throwable {
- }
-
- @Override public void testRestartWithPutEightNodesTwoBackups() throws Throwable {
- }
-
- @Override public void testRestartWithTxEightNodesTwoBackups() throws Throwable {
- }
-
- @Override public void testRestartWithTxFourNodesNoBackups() throws Throwable {
- }
-
- @Override public void testRestartWithTxFourNodesOneBackups() throws Throwable {
- }
-
- @Override public void testRestartWithTxSixNodesTwoBackups() throws Throwable {
- }
-
- @Override public void testRestartWithTxTenNodesTwoBackups() throws Throwable {
- }
-
- @Override public void testRestartWithTxTwoNodesNoBackups() throws Throwable {
- }
-
- @Override public void testRestartWithTxTwoNodesOneBackup() throws Throwable {
- }
}
[13/50] incubator-ignite git commit: ignite-1189: 2 reproducing
deadlock
Posted by nt...@apache.org.
ignite-1189: 2 reproducing deadlock
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3ce3c8b7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3ce3c8b7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3ce3c8b7
Branch: refs/heads/ignite-1108
Commit: 3ce3c8b71064ff4d8abd78cd95f4678cb7a74811
Parents: efa7e99
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 10:33:57 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 10:33:57 2015 +0300
----------------------------------------------------------------------
.../dht/atomic/GridDhtAtomicCache.java | 40 +++-----------------
1 file changed, 5 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3ce3c8b7/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 18911fd..d6163c2 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
@@ -85,8 +85,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
/** */
private GridNearAtomicCache<K, V> near;
- private ThreadLocal<List<GridDhtCacheEntry>> lockedEntries = new ThreadLocal<>();
-
/**
* Empty constructor required by {@link Externalizable}.
*/
@@ -992,20 +990,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
final GridNearAtomicUpdateRequest req,
final CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb
) {
- boolean printKeys = false;
-
- if (lockedEntries.get() != null) {
- for (GridDhtCacheEntry entry : lockedEntries.get())
- U.error(log, "Locked entry [entry=" + entry + ']');
-
- printKeys = true;
- }
-
- if (printKeys) {
- for (KeyCacheObject obj : req.keys())
- U.error(log, "Key requested: " + obj);
- }
-
IgniteInternalFuture<Object> forceFut = preldr.request(req.keys(), req.topologyVersion());
if (forceFut.isDone())
@@ -1048,26 +1032,10 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
IgniteCacheExpiryPolicy expiry = null;
try {
- boolean printKeys = false;
-
- if (lockedEntries.get() != null) {
- for (GridDhtCacheEntry entry : lockedEntries.get())
- U.error(log, "Locked entry (2) [entry=" + entry + ']');
-
- printKeys = true;
- }
-
- if (printKeys) {
- for (KeyCacheObject obj : keys)
- U.error(log, "Key requested: " + obj);
- }
-
// If batch store update is enabled, we need to lock all entries.
// First, need to acquire locks on cache entries, then check filter.
List<GridDhtCacheEntry> locked = lockEntries(keys, req.topologyVersion());
- lockedEntries.set(locked);
-
Collection<IgniteBiTuple<GridDhtCacheEntry, GridCacheVersion>> deleted = null;
try {
@@ -1184,11 +1152,13 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
e.printStackTrace();
}
+ catch (Exception e) {
+ if (X.hasCause(e, InterruptedException.class))
+ U.error(log, "FUCK Interrupted", e);
+ }
finally {
- if (locked != null) {
- lockedEntries.set(null);
+ if (locked != null)
unlockEntries(locked, req.topologyVersion());
- }
// Enqueue if necessary after locks release.
if (deleted != null) {
[07/50] incubator-ignite git commit: Merge branches 'ignite-1.3.3'
and 'ignite-support804' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into
ignite-support804
Posted by nt...@apache.org.
Merge branches 'ignite-1.3.3' and 'ignite-support804' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-support804
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/015d9cd5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/015d9cd5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/015d9cd5
Branch: refs/heads/ignite-1108
Commit: 015d9cd5397d9d24489cfe757df36192b83ebcfe
Parents: 23377fe 12cbe22
Author: S.Vladykin <sv...@gridgain.com>
Authored: Mon Aug 3 15:12:10 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Mon Aug 3 15:12:10 2015 +0300
----------------------------------------------------------------------
.../apache/ignite/IgniteSystemProperties.java | 2 +-
.../org/apache/ignite/internal/IgnitionEx.java | 17 +-------
.../processors/cache/GridCacheProcessor.java | 10 ++++-
.../processors/cache/GridCacheUtils.java | 1 -
.../ignite/internal/util/IgniteUtils.java | 16 ++++++++
.../parser/dialect/OracleMetadataDialect.java | 4 +-
.../src/test/java/config/ignite-test-config.xml | 43 ++++++++++++++++++++
.../ignite/internal/GridFactorySelfTest.java | 9 ++++
8 files changed, 80 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
[27/50] incubator-ignite git commit: Merge branch 'ignite-1.3.3'
Posted by nt...@apache.org.
Merge branch 'ignite-1.3.3'
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/44aaceca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/44aaceca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/44aaceca
Branch: refs/heads/ignite-1108
Commit: 44aaceca596f5d4b738f9da8d12e9af4e0431379
Parents: c087be2 7d747d2
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Aug 5 11:27:50 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Aug 5 11:27:50 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheProcessor.java | 10 +++-
.../processors/cache/GridCacheUtils.java | 1 -
.../ignite/internal/util/GridLogThrottle.java | 63 +++++++++++++++-----
.../ignite/spi/discovery/tcp/ClientImpl.java | 5 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 5 +-
.../spi/discovery/tcp/TcpDiscoveryImpl.java | 15 +++++
.../query/h2/twostep/GridMapQueryExecutor.java | 7 ++-
.../h2/twostep/GridReduceQueryExecutor.java | 7 ++-
8 files changed, 87 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44aaceca/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44aaceca/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44aaceca/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44aaceca/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44aaceca/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44aaceca/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
[12/50] incubator-ignite git commit: ignite-1189: reproducing deadlock
Posted by nt...@apache.org.
ignite-1189: reproducing deadlock
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/efa7e99b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/efa7e99b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/efa7e99b
Branch: refs/heads/ignite-1108
Commit: efa7e99bbad76ce35a55e6ad9faa9aac8e57b5f4
Parents: 6b237e1
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 09:12:12 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 09:12:12 2015 +0300
----------------------------------------------------------------------
.../dht/atomic/GridDhtAtomicCache.java | 36 +++++++++++++++-
.../IgniteCacheAtomicNodeRestartTest.java | 43 ++++++++++++++++++++
2 files changed, 78 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/efa7e99b/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 0a21979..18911fd 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
@@ -85,6 +85,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
/** */
private GridNearAtomicCache<K, V> near;
+ private ThreadLocal<List<GridDhtCacheEntry>> lockedEntries = new ThreadLocal<>();
+
/**
* Empty constructor required by {@link Externalizable}.
*/
@@ -990,6 +992,20 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
final GridNearAtomicUpdateRequest req,
final CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb
) {
+ boolean printKeys = false;
+
+ if (lockedEntries.get() != null) {
+ for (GridDhtCacheEntry entry : lockedEntries.get())
+ U.error(log, "Locked entry [entry=" + entry + ']');
+
+ printKeys = true;
+ }
+
+ if (printKeys) {
+ for (KeyCacheObject obj : req.keys())
+ U.error(log, "Key requested: " + obj);
+ }
+
IgniteInternalFuture<Object> forceFut = preldr.request(req.keys(), req.topologyVersion());
if (forceFut.isDone())
@@ -1032,10 +1048,26 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
IgniteCacheExpiryPolicy expiry = null;
try {
+ boolean printKeys = false;
+
+ if (lockedEntries.get() != null) {
+ for (GridDhtCacheEntry entry : lockedEntries.get())
+ U.error(log, "Locked entry (2) [entry=" + entry + ']');
+
+ printKeys = true;
+ }
+
+ if (printKeys) {
+ for (KeyCacheObject obj : keys)
+ U.error(log, "Key requested: " + obj);
+ }
+
// If batch store update is enabled, we need to lock all entries.
// First, need to acquire locks on cache entries, then check filter.
List<GridDhtCacheEntry> locked = lockEntries(keys, req.topologyVersion());
+ lockedEntries.set(locked);
+
Collection<IgniteBiTuple<GridDhtCacheEntry, GridCacheVersion>> deleted = null;
try {
@@ -1153,8 +1185,10 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
e.printStackTrace();
}
finally {
- if (locked != null)
+ if (locked != null) {
+ lockedEntries.set(null);
unlockEntries(locked, req.topologyVersion());
+ }
// Enqueue if necessary after locks release.
if (deleted != null) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/efa7e99b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
index fa8898f..70e6c4c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
@@ -31,7 +31,50 @@ public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRe
return ATOMIC;
}
+ /** {@inheritDoc} */
@Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable {
+ super.testRestartWithPutTenNodesTwoBackups();
+ }
+
+ @Override public void testRestart() throws Exception {
+ }
+
+ @Override public void testRestartWithPutTwoNodesNoBackups() throws Throwable {
+ }
+
+ @Override public void testRestartWithPutTwoNodesOneBackup() throws Throwable {
+ }
+
+ @Override public void testRestartWithPutFourNodesNoBackups() throws Throwable {
+ }
+
+ @Override public void testRestartWithPutFourNodesOneBackups() throws Throwable {
+ }
+
+ @Override public void testRestartWithPutSixNodesTwoBackups() throws Throwable {
+ }
+
+ @Override public void testRestartWithPutEightNodesTwoBackups() throws Throwable {
+ }
+
+ @Override public void testRestartWithTxEightNodesTwoBackups() throws Throwable {
+ }
+
+ @Override public void testRestartWithTxFourNodesNoBackups() throws Throwable {
+ }
+
+ @Override public void testRestartWithTxFourNodesOneBackups() throws Throwable {
+ }
+
+ @Override public void testRestartWithTxSixNodesTwoBackups() throws Throwable {
+ }
+
+ @Override public void testRestartWithTxTenNodesTwoBackups() throws Throwable {
+ }
+
+ @Override public void testRestartWithTxTwoNodesNoBackups() throws Throwable {
+ }
+ @Override public void testRestartWithTxTwoNodesOneBackup() throws Throwable {
}
}
[45/50] incubator-ignite git commit: # Fixed potential NPE in
GridCachePartitionExchangeManager.dumpDebugInfo
Posted by nt...@apache.org.
# Fixed potential NPE in GridCachePartitionExchangeManager.dumpDebugInfo
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/bd770a54
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/bd770a54
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/bd770a54
Branch: refs/heads/ignite-1108
Commit: bd770a54a554c8c22f36ea00f8c735218c29b330
Parents: d9acbd1
Author: sboikov <sb...@gridgain.com>
Authored: Mon Aug 10 16:08:10 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Aug 10 16:08:10 2015 +0300
----------------------------------------------------------------------
.../cache/GridCachePartitionExchangeManager.java | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bd770a54/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index c26f5c3..cf49197 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -962,15 +962,19 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
for (GridDhtPartitionsExchangeFuture fut : pendingExchangeFuts)
U.warn(log, ">>> " + fut);
- U.warn(log, "Last 10 exchange futures (total: " + exchFuts.size() + "):");
+ ExchangeFutureSet exchFuts = this.exchFuts;
- int cnt = 0;
+ if (exchFuts != null) {
+ U.warn(log, "Last 10 exchange futures (total: " + exchFuts.size() + "):");
- for (GridDhtPartitionsExchangeFuture fut : exchFuts) {
- U.warn(log, ">>> " + fut);
+ int cnt = 0;
+
+ for (GridDhtPartitionsExchangeFuture fut : exchFuts) {
+ U.warn(log, ">>> " + fut);
- if (++cnt == 10)
- break;
+ if (++cnt == 10)
+ break;
+ }
}
dumpPendingObjects();
[36/50] incubator-ignite git commit: License generation hotfix
Posted by nt...@apache.org.
License generation hotfix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6e496e67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6e496e67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6e496e67
Branch: refs/heads/ignite-1108
Commit: 6e496e67e7b3a1c7cd6e31555a3198a833252f1d
Parents: b031525
Author: Anton Vinogradov <vi...@gmail.com>
Authored: Thu Aug 6 13:44:36 2015 +0300
Committer: Anton Vinogradov <vi...@gmail.com>
Committed: Thu Aug 6 13:44:36 2015 +0300
----------------------------------------------------------------------
parent/pom.xml | 97 ++++++++++++++++++++++++++---------------------------
1 file changed, 48 insertions(+), 49 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e496e67/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index e703502..efa6494 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -140,6 +140,13 @@
<version>4.11</version>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-apache-license-gen</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope><!-- hack to have ignite-apache-license-gen at first place at mvn reactor -->
+ </dependency>
</dependencies>
<build>
@@ -567,60 +574,52 @@
</execution>
</executions>
</plugin>
+
+ <plugin><!-- generates dependencies licenses -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-remote-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>ignite-dependencies</id>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ <configuration>
+ <resourceBundles>
+ <resourceBundle>org.apache.ignite:ignite-apache-license-gen:${project.version}</resourceBundle>
+ </resourceBundles>
+ <excludeTransitive>true</excludeTransitive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <id>licenses-file-rename</id>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <phase>compile</phase>
+ <configuration>
+ <target>
+ <!-- moving licenses generated by "ignite-dependencies" -->
+ <move file="${basedir}/target/classes/META-INF/licenses.txt" tofile="${basedir}/target/licenses/${project.artifactId}-licenses.txt"/>
+ </target>
+ <failOnError>false</failOnError>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<profiles>
<profile>
- <id>apache-release</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-remote-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>ignite-dependencies</id>
- <goals>
- <goal>process</goal>
- </goals>
- <configuration>
- <resourceBundles>
- <resourceBundle>org.apache.ignite:ignite-apache-license-gen:${project.version}</resourceBundle>
- </resourceBundles>
- <excludeTransitive>true</excludeTransitive>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.7</version>
- <executions>
- <execution>
- <id>licenses-file-rename</id>
- <goals>
- <goal>run</goal>
- </goals>
- <phase>compile</phase>
- <configuration>
- <target>
- <!-- moving licenses generated by "ignite-dependencies" -->
- <move file="${basedir}/target/classes/META-INF/licenses.txt" tofile="${basedir}/target/licenses/${project.artifactId}-licenses.txt"/>
- </target>
- <failOnError>false</failOnError>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
- </profile>
-
- <profile>
<id>check-licenses</id>
<build>
<plugins>
[11/50] incubator-ignite git commit: Fixed tests.
Posted by nt...@apache.org.
Fixed 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/b056a739
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b056a739
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b056a739
Branch: refs/heads/ignite-1108
Commit: b056a739ebf001d3c63ebc8afa52dba520055221
Parents: d0a6f55
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Aug 3 18:26:26 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Aug 3 18:26:26 2015 +0300
----------------------------------------------------------------------
.../integration/ClientAbstractMultiNodeSelfTest.java | 4 ++--
.../managers/communication/GridIoManager.java | 2 +-
.../internal/GridJobMasterLeaveAwareSelfTest.java | 10 ++++++----
.../internal/IgniteClientReconnectAbstractTest.java | 5 +++--
.../internal/IgniteClientReconnectCacheTest.java | 5 +++--
.../GridDeploymentMessageCountSelfTest.java | 5 +++--
.../cache/CacheStopAndDestroySelfTest.java | 8 ++++----
.../cache/GridCacheAtomicMessageCountSelfTest.java | 6 ++++--
.../GridCacheReplicatedSynchronousCommitTest.java | 5 +++--
.../cache/IgniteCacheAbstractStopBusySelfTest.java | 6 ++++--
.../cache/IgniteCacheNearLockValueSelfTest.java | 6 ++++--
...IgniteDynamicCacheStartNoExchangeTimeoutTest.java | 4 ++--
.../cache/IgniteTxReentryAbstractSelfTest.java | 5 +++--
.../IgniteCacheClientNodeChangingTopologyTest.java | 6 ++++--
.../IgniteCacheClientNodePartitionsExchangeTest.java | 4 ++--
...niteTxOriginatingNodeFailureAbstractSelfTest.java | 6 +++---
...misticOriginatingNodeFailureAbstractSelfTest.java | 6 +++---
.../dht/GridCacheDhtPreloadMessageCountTest.java | 5 +++--
...eCachePrimaryNodeFailureRecoveryAbstractTest.java | 6 ++++--
...dCacheAtomicInvalidPartitionHandlingSelfTest.java | 5 +++--
.../near/IgniteCacheNearTxRollbackTest.java | 6 ++++--
.../GridCacheReplicatedInvalidateSelfTest.java | 6 ++++--
.../apache/ignite/util/TestTcpCommunicationSpi.java | 6 ++++--
.../CacheScanPartitionQueryFallbackSelfTest.java | 15 +++++++++------
24 files changed, 85 insertions(+), 57 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java
index cf1b735..66f266a 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java
@@ -456,11 +456,11 @@ public abstract class ClientAbstractMultiNodeSelfTest extends GridCommonAbstract
@SuppressWarnings("unchecked")
private static class TestCommunicationSpi extends TcpCommunicationSpi {
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg)
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
throws IgniteSpiException {
checkSyncFlags((GridIoMessage)msg);
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index 53ccdfe..85e8421 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@ -1039,7 +1039,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
* <p>
* How to use it:
* <ol>
- * <li>Replace {@link #send(ClusterNode, Object, int, Message, byte, boolean, long, boolean)}
+ * <li>Replace {@link #send(ClusterNode, Object, int, Message, byte, boolean, long, boolean, IgniteInClosure)}
* with this method.</li>
* <li>Start all grids for your test, then set {@link #TURBO_DEBUG_MODE} to {@code true}.</li>
* <li>Perform test operations on the topology. No network will be there.</li>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java
index 55fc2f7..355c795 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java
@@ -730,9 +730,9 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
private CountDownLatch waitLatch = new CountDownLatch(1);
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg)
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
throws IgniteSpiException {
- sendMessage0(node, msg);
+ sendMessage0(node, msg, ackClosure);
}
/**
@@ -741,9 +741,11 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
*
* @param node Destination node.
* @param msg Message to be sent.
+ * @param ackClosure Ack closure.
* @throws org.apache.ignite.spi.IgniteSpiException If failed.
*/
- private void sendMessage0(ClusterNode node, Message msg) throws IgniteSpiException {
+ private void sendMessage0(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
+ throws IgniteSpiException {
if (msg instanceof GridIoMessage) {
GridIoMessage msg0 = (GridIoMessage)msg;
@@ -762,7 +764,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
}
if (!block)
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectAbstractTest.java
index 7247d54..38522af 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectAbstractTest.java
@@ -315,7 +315,8 @@ public abstract class IgniteClientReconnectAbstractTest extends GridCommonAbstra
private IgniteLogger log;
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
+ throws IgniteSpiException {
Class msgCls0 = msgCls;
if (collectStart.get() && msg instanceof GridIoMessage)
@@ -328,7 +329,7 @@ public abstract class IgniteClientReconnectAbstractTest extends GridCommonAbstra
return;
}
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java
index be3234d..073f6f3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java
@@ -1138,7 +1138,8 @@ public class IgniteClientReconnectCacheTest extends IgniteClientReconnectAbstrac
private Map<Class<?>, Set<UUID>> blockCls = new HashMap<>();
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
+ throws IgniteSpiException {
if (msg instanceof GridIoMessage) {
Object msg0 = ((GridIoMessage)msg).message();
@@ -1156,7 +1157,7 @@ public class IgniteClientReconnectCacheTest extends IgniteClientReconnectAbstrac
}
}
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java
index 9df66b3..728be6b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java
@@ -23,6 +23,7 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.managers.communication.*;
+import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.communication.tcp.*;
@@ -169,12 +170,12 @@ public class GridDeploymentMessageCountSelfTest extends GridCommonAbstractTest {
private AtomicInteger msgCnt = new AtomicInteger();
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg)
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
throws IgniteSpiException {
if (isDeploymentMessage((GridIoMessage)msg))
msgCnt.incrementAndGet();
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
index 20284a8..803789e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
@@ -18,13 +18,12 @@
package org.apache.ignite.internal.processors.cache;
import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.*;
import org.apache.ignite.internal.managers.communication.*;
import org.apache.ignite.internal.processors.cache.distributed.dht.*;
import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.communication.tcp.*;
@@ -121,8 +120,9 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
public static UUID nodeFilter;
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
- super.sendMessage(node, msg);
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
+ throws IgniteSpiException {
+ super.sendMessage(node, msg, ackClosure);
if (nodeFilter != null &&
node.id().equals(nodeFilter) &&
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java
index db4061a..f2be20a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java
@@ -17,12 +17,14 @@
package org.apache.ignite.internal.processors.cache;
+import org.apache.ignite.*;
import org.apache.ignite.cache.*;
import org.apache.ignite.cache.affinity.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.managers.communication.*;
import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.*;
+import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.communication.tcp.*;
@@ -193,14 +195,14 @@ public class GridCacheAtomicMessageCountSelfTest extends GridCommonAbstractTest
private Map<Class<?>, AtomicInteger> cntMap = new HashMap<>();
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg)
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
throws IgniteSpiException {
AtomicInteger cntr = cntMap.get(((GridIoMessage)msg).message().getClass());
if (cntr != null)
cntr.incrementAndGet();
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java
index 6c04ed8..2352352 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java
@@ -24,6 +24,7 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.*;
import org.apache.ignite.internal.managers.communication.*;
import org.apache.ignite.internal.processors.cache.distributed.*;
+import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.communication.tcp.*;
@@ -185,7 +186,7 @@ public class GridCacheReplicatedSynchronousCommitTest extends GridCommonAbstract
}
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg)
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
throws IgniteSpiException {
Object obj = ((GridIoMessage)msg).message();
@@ -196,7 +197,7 @@ public class GridCacheReplicatedSynchronousCommitTest extends GridCommonAbstract
return;
}
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
index 9c30f23..16e9c74 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
@@ -25,6 +25,7 @@ import org.apache.ignite.internal.*;
import org.apache.ignite.internal.managers.communication.*;
import org.apache.ignite.internal.processors.cache.distributed.near.*;
import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.communication.tcp.*;
@@ -343,7 +344,8 @@ public abstract class IgniteCacheAbstractStopBusySelfTest extends GridCommonAbst
*/
private class TestTpcCommunicationSpi extends TcpCommunicationSpi {
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
+ throws IgniteSpiException {
if (suspended.get()) {
assert bannedMsg.get() != null;
@@ -355,7 +357,7 @@ public abstract class IgniteCacheAbstractStopBusySelfTest extends GridCommonAbst
}
}
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNearLockValueSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNearLockValueSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNearLockValueSelfTest.java
index c500bbf..d3eef68 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNearLockValueSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNearLockValueSelfTest.java
@@ -24,6 +24,7 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.*;
import org.apache.ignite.internal.managers.communication.*;
import org.apache.ignite.internal.processors.cache.distributed.near.*;
+import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.communication.tcp.*;
@@ -122,7 +123,8 @@ public class IgniteCacheNearLockValueSelfTest extends GridCommonAbstractTest {
private Collection<GridNearLockRequest> reqs = new ConcurrentLinkedDeque<>();
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
+ throws IgniteSpiException {
if (msg instanceof GridIoMessage) {
GridIoMessage ioMsg = (GridIoMessage)msg;
@@ -130,7 +132,7 @@ public class IgniteCacheNearLockValueSelfTest extends GridCommonAbstractTest {
reqs.add((GridNearLockRequest)ioMsg.message());
}
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
index 5011e5f..ec48bd1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
@@ -453,14 +453,14 @@ public class IgniteDynamicCacheStartNoExchangeTimeoutTest extends GridCommonAbst
*/
private static class TestCommunicationSpi extends TcpCommunicationSpi {
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg)
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
throws IgniteSpiException {
Object msg0 = ((GridIoMessage)msg).message();
if (msg0 instanceof GridDhtPartitionsSingleRequest) // Sent in case of exchange timeout.
fail("Unexpected message: " + msg0);
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java
index de62955..9614613 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java
@@ -25,6 +25,7 @@ import org.apache.ignite.internal.managers.communication.*;
import org.apache.ignite.internal.processors.cache.distributed.*;
import org.apache.ignite.internal.processors.cache.distributed.dht.*;
import org.apache.ignite.internal.processors.cache.distributed.near.*;
+import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.communication.tcp.*;
@@ -136,11 +137,11 @@ public abstract class IgniteTxReentryAbstractSelfTest extends GridCommonAbstract
private AtomicInteger dhtLocks = new AtomicInteger();
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg)
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
throws IgniteSpiException {
countMsg((GridIoMessage)msg);
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
index 6782ff4..58c5f95 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
@@ -32,6 +32,7 @@ import org.apache.ignite.internal.processors.cache.version.*;
import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.resources.*;
import org.apache.ignite.spi.*;
@@ -1701,7 +1702,8 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
private List<Object> recordedMsgs = new ArrayList<>();
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
+ throws IgniteSpiException {
if (msg instanceof GridIoMessage) {
Object msg0 = ((GridIoMessage)msg).message();
@@ -1722,7 +1724,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
}
}
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
index 5a51a1b..822b807 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
@@ -609,8 +609,8 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
private IgniteLogger log;
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg) {
- super.sendMessage(node, msg);
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure) {
+ super.sendMessage(node, msg, ackClosure);
Object msg0 = ((GridIoMessage)msg).message();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
index d664aa8..cf17094 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
@@ -239,10 +239,10 @@ public abstract class IgniteTxOriginatingNodeFailureAbstractSelfTest extends Gri
IgniteConfiguration cfg = super.getConfiguration(gridName);
cfg.setCommunicationSpi(new TcpCommunicationSpi() {
- @Override public void sendMessage(ClusterNode node, Message msg)
- throws IgniteSpiException {
+ @Override public void sendMessage(ClusterNode node, Message msg,
+ IgniteInClosure<IgniteException> ackClosure) throws IgniteSpiException {
if (!F.eq(ignoreMsgNodeId, node.id()) || !ignoredMessage((GridIoMessage)msg))
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
index 13fadc4..da5b14b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
@@ -432,8 +432,8 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest
IgniteConfiguration cfg = super.getConfiguration(gridName);
cfg.setCommunicationSpi(new TcpCommunicationSpi() {
- @Override public void sendMessage(ClusterNode node, Message msg)
- throws IgniteSpiException {
+ @Override public void sendMessage(ClusterNode node, Message msg,
+ IgniteInClosure<IgniteException> ackClosure) throws IgniteSpiException {
if (getSpiContext().localNode().id().equals(failingNodeId)) {
if (ignoredMessage((GridIoMessage)msg) && ignoreMsgNodeIds != null) {
for (UUID ignored : ignoreMsgNodeIds) {
@@ -443,7 +443,7 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest
}
}
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java
index 0650436..f8c346b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java
@@ -25,6 +25,7 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.managers.communication.*;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.*;
import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.communication.tcp.*;
@@ -141,11 +142,11 @@ public class GridCacheDhtPreloadMessageCountTest extends GridCommonAbstractTest
private Collection<GridDhtPartitionsSingleMessage> sentMsgs = new ConcurrentLinkedQueue<>();
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg)
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
throws IgniteSpiException {
recordMessage((GridIoMessage)msg);
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java
index f996877..7504645 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java
@@ -30,6 +30,7 @@ import org.apache.ignite.internal.processors.cache.transactions.*;
import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.resources.*;
import org.apache.ignite.spi.*;
@@ -488,7 +489,8 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends
private List<T2<ClusterNode, GridIoMessage>> blockedMsgs = new ArrayList<>();
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
+ throws IgniteSpiException {
if (msg instanceof GridIoMessage) {
Object msg0 = ((GridIoMessage)msg).message();
@@ -505,7 +507,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends
}
}
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/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 d3bcf67..34ae647 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
@@ -28,6 +28,7 @@ import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.processors.cache.version.*;
import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.communication.tcp.*;
@@ -365,7 +366,7 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
*/
private static class DelayCommunicationSpi extends TcpCommunicationSpi {
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg)
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
throws IgniteSpiException {
try {
if (delayMessage((GridIoMessage)msg))
@@ -375,7 +376,7 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
throw new IgniteSpiException(e);
}
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java
index 8df7fb1..82ca6d7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java
@@ -24,6 +24,7 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.managers.communication.*;
import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.communication.tcp.*;
@@ -119,7 +120,8 @@ public class IgniteCacheNearTxRollbackTest extends IgniteCacheAbstractTest {
private volatile boolean sndFail;
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
+ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackClosure)
+ throws IgniteSpiException {
if (msg instanceof GridIoMessage) {
Object msg0 = ((GridIoMessage)msg).message();
@@ -127,7 +129,7 @@ public class IgniteCacheNearTxRollbackTest extends IgniteCacheAbstractTest {
throw new IgniteSpiException("Test error");
}
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedInvalidateSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedInvalidateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedInvalidateSelfTest.java
index 7a2e8b3..759e9d2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedInvalidateSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedInvalidateSelfTest.java
@@ -22,6 +22,7 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.managers.communication.*;
import org.apache.ignite.internal.processors.clock.*;
+import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.communication.tcp.*;
@@ -215,7 +216,8 @@ public class GridCacheReplicatedInvalidateSelfTest extends GridCommonAbstractTes
}
/** {@inheritDoc} */
- @Override public void sendMessage(ClusterNode destNode, Message msg)
+ @Override public void sendMessage(ClusterNode destNode, Message msg,
+ IgniteInClosure<IgniteException> ackClosure)
throws IgniteSpiException {
Object msg0 = ((GridIoMessage)msg).message();
@@ -231,7 +233,7 @@ public class GridCacheReplicatedInvalidateSelfTest extends GridCommonAbstractTes
}
}
- super.sendMessage(destNode, msg);
+ super.sendMessage(destNode, msg, ackClosure);
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/core/src/test/java/org/apache/ignite/util/TestTcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/util/TestTcpCommunicationSpi.java b/modules/core/src/test/java/org/apache/ignite/util/TestTcpCommunicationSpi.java
index 6e4e50b..5b618a2 100644
--- a/modules/core/src/test/java/org/apache/ignite/util/TestTcpCommunicationSpi.java
+++ b/modules/core/src/test/java/org/apache/ignite/util/TestTcpCommunicationSpi.java
@@ -20,6 +20,7 @@ package org.apache.ignite.util;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.internal.managers.communication.*;
+import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.communication.tcp.*;
@@ -35,14 +36,15 @@ public class TestTcpCommunicationSpi extends TcpCommunicationSpi {
private Class ignoreMsg;
/** {@inheritDoc} */
- @Override public void sendMessage(final ClusterNode node, final Message msg) throws IgniteSpiException {
+ @Override public void sendMessage(final ClusterNode node, final Message msg,
+ IgniteInClosure<IgniteException> ackClosure) throws IgniteSpiException {
if (stopped)
return;
if (ignoreMsg != null && ((GridIoMessage)msg).message().getClass().equals(ignoreMsg))
return;
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b056a739/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java
index b7f5fa8..84ceafd 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java
@@ -345,13 +345,14 @@ public class CacheScanPartitionQueryFallbackSelfTest extends GridCommonAbstractT
/** {@inheritDoc} */
@Override public TcpCommunicationSpi create() {
return new TcpCommunicationSpi() {
- @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
+ @Override public void sendMessage(ClusterNode node, Message msg,
+ IgniteInClosure<IgniteException> ackClosure) throws IgniteSpiException {
Object origMsg = ((GridIoMessage)msg).message();
if (origMsg instanceof GridCacheQueryRequest)
fail(); //should use local node
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
};
}
@@ -364,13 +365,14 @@ public class CacheScanPartitionQueryFallbackSelfTest extends GridCommonAbstractT
/** {@inheritDoc} */
@Override public TcpCommunicationSpi create() {
return new TcpCommunicationSpi() {
- @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
+ @Override public void sendMessage(ClusterNode node, Message msg,
+ IgniteInClosure<IgniteException> ackClosure) throws IgniteSpiException {
Object origMsg = ((GridIoMessage)msg).message();
if (origMsg instanceof GridCacheQueryRequest)
assertEquals(expNodeId, node.id());
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
};
}
@@ -383,7 +385,8 @@ public class CacheScanPartitionQueryFallbackSelfTest extends GridCommonAbstractT
/** {@inheritDoc} */
@Override public TcpCommunicationSpi create() {
return new TcpCommunicationSpi() {
- @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
+ @Override public void sendMessage(ClusterNode node, Message msg,
+ IgniteInClosure<IgniteException> ackClosure) throws IgniteSpiException {
Object origMsg = ((GridIoMessage)msg).message();
if (origMsg instanceof GridCacheQueryRequest) {
@@ -400,7 +403,7 @@ public class CacheScanPartitionQueryFallbackSelfTest extends GridCommonAbstractT
}
}
- super.sendMessage(node, msg);
+ super.sendMessage(node, msg, ackClosure);
}
};
}
[43/50] incubator-ignite git commit: IGNITE-1189 Removed unnecessary
comment.
Posted by nt...@apache.org.
IGNITE-1189 Removed unnecessary comment.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e42f954f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e42f954f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e42f954f
Branch: refs/heads/ignite-1108
Commit: e42f954f043b6690dfcc10b7eb8817194eb898e2
Parents: 6770606
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Aug 10 13:33:28 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Aug 10 13:33:28 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/configuration/IgniteConfiguration.java | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e42f954f/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
index e1aff25..546c382 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
@@ -194,7 +194,6 @@ public class IgniteConfiguration {
/** Default failure detection timeout in millis. */
@SuppressWarnings("UnnecessaryBoxing")
-// public static final Long DFLT_FAILURE_DETECTION_TIMEOUT = new Long(10_000);
public static final Long DFLT_FAILURE_DETECTION_TIMEOUT = new Long(10_000);
/** Optional grid name. */
[02/50] incubator-ignite git commit: IGNITE-1185 Locate configuration
in class path: Add tests. (cherry picked from commit 79f27f4)
Posted by nt...@apache.org.
IGNITE-1185 Locate configuration in class path: Add tests.
(cherry picked from commit 79f27f4)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c66a877a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c66a877a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c66a877a
Branch: refs/heads/ignite-1108
Commit: c66a877ad5cacfca310341e7301d7e2e96d6c6dc
Parents: 754da7a
Author: sevdokimov <se...@gridgain.com>
Authored: Mon Aug 3 13:46:40 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Mon Aug 3 14:15:26 2015 +0300
----------------------------------------------------------------------
.../src/test/java/config/ignite-test-config.xml | 43 ++++++++++++++++++++
.../ignite/internal/GridFactorySelfTest.java | 9 ++++
2 files changed, 52 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c66a877a/modules/spring/src/test/java/config/ignite-test-config.xml
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/config/ignite-test-config.xml b/modules/spring/src/test/java/config/ignite-test-config.xml
new file mode 100644
index 0000000..145d124
--- /dev/null
+++ b/modules/spring/src/test/java/config/ignite-test-config.xml
@@ -0,0 +1,43 @@
+<?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.
+-->
+
+<!--
+ Ignite configuration with all defaults and enabled p2p deployment and enabled events.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="localHost" value="127.0.0.1" />
+
+ <property name="gridName" value="config-in-classpath"/>
+
+ <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
+ <property name="discoverySpi">
+ <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+ <property name="ipFinder">
+ <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
+ <property name="shared" value="true"/>
+ </bean>
+ </property>
+ </bean>
+ </property>
+ </bean>
+</beans>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c66a877a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
index ecc7fb7..fb8cbfe 100644
--- a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
@@ -824,6 +824,15 @@ public class GridFactorySelfTest extends GridCommonAbstractTest {
}
/**
+ * @throws Exception If failed.
+ */
+ public void testConfigInClassPath() throws Exception {
+ try (Ignite ignite = Ignition.start("config/ignite-test-config.xml")) {
+ assert "config-in-classpath".equals(ignite.name());
+ }
+ }
+
+ /**
* Test task.
*/
private static class TestTask extends ComputeTaskSplitAdapter<Void, Void> {
[33/50] incubator-ignite git commit: msg format
Posted by nt...@apache.org.
msg format
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5ce8bc69
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5ce8bc69
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5ce8bc69
Branch: refs/heads/ignite-1108
Commit: 5ce8bc692cdc5e7662ccd6ac5f6e8f5b2fd493e4
Parents: d7623b4
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Aug 6 12:52:59 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Thu Aug 6 12:52:59 2015 +0300
----------------------------------------------------------------------
.../main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5ce8bc69/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
index d5d6ea2..5e81a3e 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
@@ -418,8 +418,7 @@ class ClientImpl extends TcpDiscoveryImpl {
"Please check IP finder configuration" +
(spi.ipFinder instanceof TcpDiscoveryMulticastIpFinder ?
" and make sure multicast works on your network. " : ". ") +
- "Will retry every 2 secs."
- + spi.ipFinder, true);
+ "Will retry every 2 secs.", true);
Thread.sleep(2000);
}
[34/50] incubator-ignite git commit: master ignite-1207
Posted by nt...@apache.org.
master ignite-1207
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/33e174bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/33e174bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/33e174bb
Branch: refs/heads/ignite-1108
Commit: 33e174bb9a8c9d79c66962449cf0d5403b921aed
Parents: 2173b0e
Author: Anton Vinogradov <vi...@gmail.com>
Authored: Thu Aug 6 13:03:44 2015 +0300
Committer: Anton Vinogradov <vi...@gmail.com>
Committed: Thu Aug 6 13:03:44 2015 +0300
----------------------------------------------------------------------
assembly/release-hadoop.xml | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/33e174bb/assembly/release-hadoop.xml
----------------------------------------------------------------------
diff --git a/assembly/release-hadoop.xml b/assembly/release-hadoop.xml
index 7b94144..3f61ec9 100644
--- a/assembly/release-hadoop.xml
+++ b/assembly/release-hadoop.xml
@@ -58,6 +58,11 @@
<source>modules/hadoop/config/hive-site.ignite.xml</source>
<outputDirectory>/config/hadoop</outputDirectory>
</file>
+
+ <file>
+ <source>modules/hadoop/docs/HADOOP_README.txt</source>
+ <outputDirectory>/</outputDirectory>
+ </file>
</files>
<fileSets>
[04/50] incubator-ignite git commit: IGNITE-1172 Fixed review notes.
Posted by nt...@apache.org.
IGNITE-1172 Fixed review notes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3ace82ac
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3ace82ac
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3ace82ac
Branch: refs/heads/ignite-1108
Commit: 3ace82ac5ea85da5cd0883eb4da794f0609a8218
Parents: 4ba8b6f
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Aug 3 14:22:08 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Aug 3 14:22:08 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/processors/cache/GridCacheProcessor.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3ace82ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index a83fd4c..8e2b20e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -497,8 +497,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
cleanup(cfg, cfg.getAffinityMapper(), false);
cleanup(cfg, cctx.store().configuredStore(), false);
- if (!CU.isUtilityCache(cctx.cache().name()) && !CU.isSystemCache(cctx.cache().name()))
- unregisterMbean(cctx.cache().mxBean(), U.maskName(cctx.cache().name()) + "_" + ctx.gridName(), false);
+ if (!CU.isUtilityCache(cfg.getName()) && !CU.isSystemCache(cfg.getName()))
+ unregisterMbean(cctx.cache().mxBean(), cfg.getName(), false);
NearCacheConfiguration nearCfg = cfg.getNearConfiguration();
@@ -1360,7 +1360,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
}
if (!CU.isUtilityCache(cache.name()) && !CU.isSystemCache(cache.name()))
- registerMbean(cache.mxBean(), U.maskName(cache.name()) + "_" + ctx.gridName(), false);
+ registerMbean(cache.mxBean(), cache.name(), false);
return ret;
}
[38/50] incubator-ignite git commit: minor
Posted by nt...@apache.org.
minor
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/56efb6b1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/56efb6b1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/56efb6b1
Branch: refs/heads/ignite-1108
Commit: 56efb6b112abd03f673ee65ca8061b4728e1205d
Parents: 5ce8bc6
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Aug 6 15:53:48 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Thu Aug 6 15:53:48 2015 +0300
----------------------------------------------------------------------
.../tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56efb6b1/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
index bdc7865..b93c547 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
@@ -330,9 +330,10 @@ public class TcpDiscoveryMulticastIpFinder extends TcpDiscoveryVmIpFinder {
reqItfs.add(mcastAddr);
}
catch (IOException e) {
- log.debug("Failed to create multicast socket [mcastAddr=" + mcastAddr +
- ", mcastGrp=" + mcastGrp + ", mcastPort=" + mcastPort + ", locAddr=" + mcastAddr +
- ", err=" + e + ']');
+ if (log.isDebugEnabled())
+ log.debug("Failed to create multicast socket [mcastAddr=" + mcastAddr +
+ ", mcastGrp=" + mcastGrp + ", mcastPort=" + mcastPort + ", locAddr=" + mcastAddr +
+ ", err=" + e + ']');
}
}
}
[40/50] incubator-ignite git commit: # ignite-1142
Posted by nt...@apache.org.
# ignite-1142
Signed-off-by: Yakov Zhdanov <yz...@gridgain.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d7dd4a02
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d7dd4a02
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d7dd4a02
Branch: refs/heads/ignite-1108
Commit: d7dd4a0272aff8e00324254ac97f47393d05f70c
Parents: 63944d4
Author: S.Vladykin <sv...@gridgain.com>
Authored: Thu Aug 6 16:24:56 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Thu Aug 6 16:27:59 2015 +0300
----------------------------------------------------------------------
.../cache/query/GridCacheSqlQuery.java | 33 ++-
.../cache/query/GridCacheTwoStepQuery.java | 34 +--
.../processors/query/h2/IgniteH2Indexing.java | 27 +-
.../processors/query/h2/sql/GridSqlElement.java | 18 +-
.../query/h2/sql/GridSqlFunction.java | 17 +-
.../processors/query/h2/sql/GridSqlQuery.java | 4 +-
.../query/h2/sql/GridSqlQueryParser.java | 94 ++++---
.../query/h2/sql/GridSqlQuerySplitter.java | 117 +++++----
.../processors/query/h2/sql/GridSqlSelect.java | 76 +++---
.../processors/query/h2/sql/GridSqlType.java | 24 +-
.../processors/query/h2/sql/GridSqlUnion.java | 2 +-
.../h2/twostep/GridReduceQueryExecutor.java | 211 ++++++---------
.../query/h2/twostep/GridThreadLocalTable.java | 262 +++++++++++++++++++
.../IgniteCacheAbstractFieldsQuerySelfTest.java | 2 +-
14 files changed, 614 insertions(+), 307 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7dd4a02/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
index 7a0e140..d5eb379 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
@@ -26,6 +26,7 @@ import org.apache.ignite.marshaller.*;
import org.apache.ignite.plugin.extensions.communication.*;
import java.nio.*;
+import java.util.*;
/**
* Query.
@@ -38,9 +39,6 @@ public class GridCacheSqlQuery implements Message {
public static final Object[] EMPTY_PARAMS = {};
/** */
- private String alias;
-
- /** */
@GridToStringInclude
private String qry;
@@ -52,6 +50,11 @@ public class GridCacheSqlQuery implements Message {
/** */
private byte[] paramsBytes;
+ /** */
+ @GridToStringInclude
+ @GridDirectTransient
+ private LinkedHashMap<String, ?> columns;
+
/**
* For {@link Message}.
*/
@@ -60,24 +63,32 @@ public class GridCacheSqlQuery implements Message {
}
/**
- * @param alias Alias.
* @param qry Query.
* @param params Query parameters.
*/
- public GridCacheSqlQuery(String alias, String qry, Object[] params) {
+ public GridCacheSqlQuery(String qry, Object[] params) {
A.ensure(!F.isEmpty(qry), "qry must not be empty");
- this.alias = alias;
this.qry = qry;
this.params = F.isEmpty(params) ? EMPTY_PARAMS : params;
}
/**
- * @return Alias.
+ * @return Columns.
*/
- public String alias() {
- return alias;
+ public LinkedHashMap<String, ?> columns() {
+ return columns;
+ }
+
+ /**
+ * @param columns Columns.
+ * @return {@code this}.
+ */
+ public GridCacheSqlQuery columns(LinkedHashMap<String, ?> columns) {
+ this.columns = columns;
+
+ return this;
}
/**
@@ -138,7 +149,7 @@ public class GridCacheSqlQuery implements Message {
switch (writer.state()) {
case 0:
- if (!writer.writeString("alias", alias))
+ if (!writer.writeString("alias", null))
return false;
writer.incrementState();
@@ -169,7 +180,7 @@ public class GridCacheSqlQuery implements Message {
switch (reader.state()) {
case 0:
- alias = reader.readString("alias");
+ reader.readString("alias");
if (!reader.isLastRead())
return false;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7dd4a02/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java
index 1dacd10..83a79e3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java
@@ -17,10 +17,7 @@
package org.apache.ignite.internal.processors.cache.query;
-import org.apache.ignite.*;
-import org.apache.ignite.internal.util.*;
import org.apache.ignite.internal.util.tostring.*;
-import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
import java.util.*;
@@ -34,11 +31,11 @@ public class GridCacheTwoStepQuery {
/** */
@GridToStringInclude
- private Map<String, GridCacheSqlQuery> mapQrys;
+ private List<GridCacheSqlQuery> mapQrys = new ArrayList<>();
/** */
@GridToStringInclude
- private GridCacheSqlQuery reduce;
+ private GridCacheSqlQuery rdc;
/** */
private int pageSize = DFLT_PAGE_SIZE;
@@ -51,13 +48,14 @@ public class GridCacheTwoStepQuery {
/**
* @param spaces All spaces accessed in query.
- * @param qry Reduce query.
- * @param params Reduce query parameters.
+ * @param rdc Reduce query.
*/
- public GridCacheTwoStepQuery(Set<String> spaces, String qry, Object ... params) {
+ public GridCacheTwoStepQuery(Set<String> spaces, GridCacheSqlQuery rdc) {
+ assert rdc != null;
+
this.spaces = spaces;
- reduce = new GridCacheSqlQuery(null, qry, params);
+ this.rdc = rdc;
}
/**
@@ -89,32 +87,24 @@ public class GridCacheTwoStepQuery {
}
/**
- * @param alias Alias.
* @param qry SQL Query.
- * @param params Query parameters.
*/
- public void addMapQuery(String alias, String qry, Object ... params) {
- A.ensure(!F.isEmpty(alias), "alias must not be empty");
-
- if (mapQrys == null)
- mapQrys = new GridLeanMap<>();
-
- if (mapQrys.put(alias, new GridCacheSqlQuery(alias, qry, params)) != null)
- throw new IgniteException("Failed to add query, alias already exists: " + alias + ".");
+ public void addMapQuery(GridCacheSqlQuery qry) {
+ mapQrys.add(qry);
}
/**
* @return Reduce query.
*/
public GridCacheSqlQuery reduceQuery() {
- return reduce;
+ return rdc;
}
/**
* @return Map queries.
*/
- public Collection<GridCacheSqlQuery> mapQueries() {
- return mapQrys.values();
+ public List<GridCacheSqlQuery> mapQueries() {
+ return mapQrys;
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7dd4a02/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index c76dbe7..dc61d76 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -599,6 +599,9 @@ public class IgniteH2Indexing implements GridQueryIndexing {
String name = rsMeta.getColumnLabel(i);
String type = rsMeta.getColumnClassName(i);
+ if (type == null) // Expression always returns NULL.
+ type = Void.class.getName();
+
meta.add(new SqlFieldMetadata(schemaName, typeName, name, type));
}
@@ -852,6 +855,14 @@ public class IgniteH2Indexing implements GridQueryIndexing {
throw new CacheException("Failed to parse query: " + sqlQry, e);
}
+ try {
+ bindParameters(stmt, F.asList(qry.getArgs()));
+ }
+ catch (IgniteCheckedException e) {
+ throw new CacheException("Failed to bind parameters: [qry=" + sqlQry + ", params=" +
+ Arrays.deepToString(qry.getArgs()) + "]", e);
+ }
+
GridCacheTwoStepQuery twoStepQry;
List<GridQueryFieldMetadata> meta;
@@ -1318,14 +1329,20 @@ public class IgniteH2Indexing implements GridQueryIndexing {
}
}
- executeStatement("INFORMATION_SCHEMA", "SHUTDOWN");
-
for (Connection c : conns)
U.close(c, log);
conns.clear();
schemas.clear();
+ try (Connection c = DriverManager.getConnection(dbUrl);
+ Statement s = c.createStatement()) {
+ s.execute("SHUTDOWN");
+ }
+ catch (SQLException e) {
+ U.error(log, "Failed to shutdown database.", e);
+ }
+
if (log.isDebugEnabled())
log.debug("Cache query index stopped.");
}
@@ -1341,9 +1358,6 @@ public class IgniteH2Indexing implements GridQueryIndexing {
createSchema(schema);
- executeStatement(schema, "CREATE ALIAS " + GridSqlQuerySplitter.TABLE_FUNC_NAME +
- " NOBUFFER FOR \"" + GridReduceQueryExecutor.class.getName() + ".mergeTableFunction\"");
-
createSqlFunctions(schema, ccfg.getSqlFunctionClasses());
}
@@ -1881,8 +1895,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
* @param type Type.
*/
SqlFieldMetadata(@Nullable String schemaName, @Nullable String typeName, String name, String type) {
- assert name != null;
- assert type != null;
+ assert name != null && type != null : schemaName + " | " + typeName + " | " + name + " | " + type;
this.schemaName = schemaName;
this.typeName = typeName;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7dd4a02/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlElement.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlElement.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlElement.java
index 44705de..0f98a33 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlElement.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlElement.java
@@ -27,7 +27,7 @@ public abstract class GridSqlElement implements Iterable<GridSqlElement> {
protected List<GridSqlElement> children;
/** */
- private GridSqlType expressionResultType;
+ private GridSqlType resultType;
/**
* @param children Initial child list.
@@ -41,15 +41,18 @@ public abstract class GridSqlElement implements Iterable<GridSqlElement> {
/**
* @return Optional expression result type (if this is an expression and result type is known).
*/
- public GridSqlType expressionResultType() {
- return expressionResultType;
+ public GridSqlType resultType() {
+ return resultType;
}
/**
* @param type Optional expression result type (if this is an expression and result type is known).
+ * @return {@code this}.
*/
- public void expressionResultType(GridSqlType type) {
- expressionResultType = type;
+ public GridSqlElement resultType(GridSqlType type) {
+ resultType = type;
+
+ return this;
}
/**
@@ -110,4 +113,9 @@ public abstract class GridSqlElement implements Iterable<GridSqlElement> {
@Override public Iterator<GridSqlElement> iterator() {
return children.iterator();
}
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return getSQL();
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7dd4a02/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlFunction.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlFunction.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlFunction.java
index c41bbb7..77039b0 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlFunction.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlFunction.java
@@ -50,9 +50,6 @@ public class GridSqlFunction extends GridSqlElement {
/** */
protected final GridSqlFunctionType type;
- /** */
- private String castType;
-
/**
* @param type Function type.
*/
@@ -87,16 +84,6 @@ public class GridSqlFunction extends GridSqlElement {
this(schema, TYPE_MAP.get(name), name);
}
- /**
- * @param castType Type for {@link GridSqlFunctionType#CAST} function.
- * @return {@code this}.
- */
- public GridSqlFunction setCastType(String castType) {
- this.castType = castType;
-
- return this;
- }
-
/** {@inheritDoc} */
@Override public String getSQL() {
StatementBuilder buff = new StatementBuilder();
@@ -123,12 +110,16 @@ public class GridSqlFunction extends GridSqlElement {
buff.append('(');
if (type == CAST) {
+ String castType = resultType().sql();
+
assert !F.isEmpty(castType) : castType;
assert size() == 1;
buff.append(child().getSQL()).append(" AS ").append(castType);
}
else if (type == CONVERT) {
+ String castType = resultType().sql();
+
assert !F.isEmpty(castType) : castType;
assert size() == 1;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7dd4a02/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuery.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuery.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuery.java
index ad13dfe..329304a 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuery.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuery.java
@@ -134,7 +134,7 @@ public abstract class GridSqlQuery {
* @param col Column index.
* @return Expression for column index.
*/
- protected abstract GridSqlElement expression(int col);
+ protected abstract GridSqlElement column(int col);
/**
* @param buff Statement builder.
@@ -157,7 +157,7 @@ public abstract class GridSqlQuery {
if (idx < visibleCols)
buff.append(idx + 1);
else {
- GridSqlElement expr = expression(idx);
+ GridSqlElement expr = column(idx);
if (expr == null) // For plain select should never be null, for union H2 itself can't parse query.
throw new IllegalStateException("Failed to build query: " + buff.toString());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7dd4a02/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
index 4267b4a..a52f3b0 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
@@ -22,7 +22,6 @@ import org.h2.command.*;
import org.h2.command.dml.*;
import org.h2.engine.*;
import org.h2.expression.*;
-import org.h2.expression.Parameter;
import org.h2.jdbc.*;
import org.h2.result.*;
import org.h2.table.*;
@@ -205,12 +204,12 @@ public class GridSqlQueryParser {
res = new GridSqlSubquery(parse(qry));
}
else if (tbl instanceof FunctionTable)
- res = parseExpression(FUNC_EXPR.get((FunctionTable)tbl));
+ res = parseExpression(FUNC_EXPR.get((FunctionTable)tbl), false);
else if (tbl instanceof RangeTable) {
res = new GridSqlFunction(GridSqlFunctionType.SYSTEM_RANGE);
- res.addChild(parseExpression(RANGE_MIN.get((RangeTable)tbl)));
- res.addChild(parseExpression(RANGE_MAX.get((RangeTable)tbl)));
+ res.addChild(parseExpression(RANGE_MIN.get((RangeTable)tbl), false));
+ res.addChild(parseExpression(RANGE_MAX.get((RangeTable)tbl), false));
}
else
assert0(false, filter.getSelect().getSQL());
@@ -242,7 +241,7 @@ public class GridSqlQueryParser {
res.distinct(select.isDistinct());
Expression where = CONDITION.get(select);
- res.where(parseExpression(where));
+ res.where(parseExpression(where, false));
Set<TableFilter> allFilters = new HashSet<>(select.getTopFilters());
@@ -257,7 +256,7 @@ public class GridSqlQueryParser {
GridSqlElement gridFilter = parseTable(filter);
from = from == null ? gridFilter : new GridSqlJoin(from, gridFilter, filter.isJoinOuter(),
- parseExpression(filter.getJoinCondition()));
+ parseExpression(filter.getJoinCondition(), false));
allFilters.remove(filter);
@@ -272,7 +271,7 @@ public class GridSqlQueryParser {
ArrayList<Expression> expressions = select.getExpressions();
for (int i = 0; i < expressions.size(); i++)
- res.addSelectExpression(parseExpression(expressions.get(i)), i < select.getColumnCount());
+ res.addColumn(parseExpression(expressions.get(i), true), i < select.getColumnCount());
int[] grpIdx = GROUP_INDEXES.get(select);
@@ -286,8 +285,8 @@ public class GridSqlQueryParser {
processSortOrder(select.getSortOrder(), res);
- res.limit(parseExpression(select.getLimit()));
- res.offset(parseExpression(select.getOffset()));
+ res.limit(parseExpression(select.getLimit(), false));
+ res.offset(parseExpression(select.getOffset(), false));
return res;
}
@@ -346,8 +345,8 @@ public class GridSqlQueryParser {
res.unionType(union.getUnionType());
- res.limit(parseExpression(union.getLimit()));
- res.offset(parseExpression(union.getOffset()));
+ res.limit(parseExpression(union.getLimit(), false));
+ res.offset(parseExpression(union.getOffset(), false));
processSortOrder(UNION_SORT.get(union), res);
@@ -358,22 +357,29 @@ public class GridSqlQueryParser {
/**
* @param expression Expression.
+ * @param calcTypes Calculate types for all the expressions.
+ * @return Parsed expression.
*/
- private GridSqlElement parseExpression(@Nullable Expression expression) {
+ private GridSqlElement parseExpression(@Nullable Expression expression, boolean calcTypes) {
if (expression == null)
return null;
GridSqlElement res = (GridSqlElement)h2ObjToGridObj.get(expression);
if (res == null) {
- res = parseExpression0(expression);
+ res = parseExpression0(expression, calcTypes);
- if (expression.getType() != Value.UNKNOWN) {
- Column c = new Column(null, expression.getType(), expression.getPrecision(), expression.getScale(),
- expression.getDisplaySize());
+ if (calcTypes) {
+ GridSqlType type = GridSqlType.UNKNOWN;
- res.expressionResultType(new GridSqlType(c.getType(), c.getScale(), c.getPrecision(), c.getDisplaySize(),
- c.getCreateSQL()));
+ if (expression.getType() != Value.UNKNOWN) {
+ Column c = new Column(null, expression.getType(), expression.getPrecision(), expression.getScale(),
+ expression.getDisplaySize());
+
+ type = new GridSqlType(c.getType(), c.getScale(), c.getPrecision(), c.getDisplaySize(), c.getCreateSQL());
+ }
+
+ res.resultType(type);
}
h2ObjToGridObj.put(expression, res);
@@ -384,8 +390,10 @@ public class GridSqlQueryParser {
/**
* @param expression Expression.
+ * @param calcTypes Calculate types for all the expressions.
+ * @return Parsed expression.
*/
- private GridSqlElement parseExpression0(Expression expression) {
+ private GridSqlElement parseExpression0(Expression expression, boolean calcTypes) {
if (expression instanceof ExpressionColumn) {
TableFilter tblFilter = ((ExpressionColumn)expression).getTableFilter();
@@ -395,7 +403,8 @@ public class GridSqlQueryParser {
}
if (expression instanceof Alias)
- return new GridSqlAlias(expression.getAlias(), parseExpression(expression.getNonAliasExpression()), true);
+ return new GridSqlAlias(expression.getAlias(),
+ parseExpression(expression.getNonAliasExpression(), calcTypes), true);
if (expression instanceof ValueExpression)
return new GridSqlConst(expression.getValue(null));
@@ -408,12 +417,13 @@ public class GridSqlQueryParser {
if (type == Operation.NEGATE) {
assert OPERATION_RIGHT.get(operation) == null;
- return new GridSqlOperation(GridSqlOperationType.NEGATE, parseExpression(OPERATION_LEFT.get(operation)));
+ return new GridSqlOperation(GridSqlOperationType.NEGATE,
+ parseExpression(OPERATION_LEFT.get(operation), calcTypes));
}
return new GridSqlOperation(OPERATION_OP_TYPES[type],
- parseExpression(OPERATION_LEFT.get(operation)),
- parseExpression(OPERATION_RIGHT.get(operation)));
+ parseExpression(OPERATION_LEFT.get(operation), calcTypes),
+ parseExpression(OPERATION_RIGHT.get(operation), calcTypes));
}
if (expression instanceof Comparison) {
@@ -423,18 +433,18 @@ public class GridSqlQueryParser {
assert opType != null : COMPARISON_TYPE.get(cmp);
- GridSqlElement left = parseExpression(COMPARISON_LEFT.get(cmp));
+ GridSqlElement left = parseExpression(COMPARISON_LEFT.get(cmp), calcTypes);
if (opType.childrenCount() == 1)
return new GridSqlOperation(opType, left);
- GridSqlElement right = parseExpression(COMPARISON_RIGHT.get(cmp));
+ GridSqlElement right = parseExpression(COMPARISON_RIGHT.get(cmp), calcTypes);
return new GridSqlOperation(opType, left, right);
}
if (expression instanceof ConditionNot)
- return new GridSqlOperation(NOT, parseExpression(expression.getNotIfPossible(null)));
+ return new GridSqlOperation(NOT, parseExpression(expression.getNotIfPossible(null), calcTypes));
if (expression instanceof ConditionAndOr) {
ConditionAndOr andOr = (ConditionAndOr)expression;
@@ -444,7 +454,7 @@ public class GridSqlQueryParser {
assert type == ConditionAndOr.AND || type == ConditionAndOr.OR;
return new GridSqlOperation(type == ConditionAndOr.AND ? AND : OR,
- parseExpression(ANDOR_LEFT.get(andOr)), parseExpression(ANDOR_RIGHT.get(andOr)));
+ parseExpression(ANDOR_LEFT.get(andOr), calcTypes), parseExpression(ANDOR_RIGHT.get(andOr), calcTypes));
}
if (expression instanceof Subquery) {
@@ -458,12 +468,12 @@ public class GridSqlQueryParser {
if (expression instanceof ConditionIn) {
GridSqlOperation res = new GridSqlOperation(IN);
- res.addChild(parseExpression(LEFT_CI.get((ConditionIn)expression)));
+ res.addChild(parseExpression(LEFT_CI.get((ConditionIn)expression), calcTypes));
List<Expression> vals = VALUE_LIST_CI.get((ConditionIn)expression);
for (Expression val : vals)
- res.addChild(parseExpression(val));
+ res.addChild(parseExpression(val, calcTypes));
return res;
}
@@ -471,12 +481,12 @@ public class GridSqlQueryParser {
if (expression instanceof ConditionInConstantSet) {
GridSqlOperation res = new GridSqlOperation(IN);
- res.addChild(parseExpression(LEFT_CICS.get((ConditionInConstantSet) expression)));
+ res.addChild(parseExpression(LEFT_CICS.get((ConditionInConstantSet)expression), calcTypes));
List<Expression> vals = VALUE_LIST_CICS.get((ConditionInConstantSet)expression);
for (Expression val : vals)
- res.addChild(parseExpression(val));
+ res.addChild(parseExpression(val, calcTypes));
return res;
}
@@ -490,7 +500,7 @@ public class GridSqlQueryParser {
assert0(!all, expression);
assert0(compareType == Comparison.EQUAL, expression);
- res.addChild(parseExpression(LEFT_CIS.get((ConditionInSelect) expression)));
+ res.addChild(parseExpression(LEFT_CIS.get((ConditionInSelect) expression), calcTypes));
Query qry = QUERY.get((ConditionInSelect)expression);
@@ -506,8 +516,9 @@ public class GridSqlQueryParser {
boolean regexp = REGEXP_CL.get((CompareLike)expression);
- return new GridSqlOperation(regexp ? REGEXP : LIKE, parseExpression(LEFT.get((CompareLike) expression)),
- parseExpression(RIGHT.get((CompareLike) expression)));
+ return new GridSqlOperation(regexp ? REGEXP : LIKE,
+ parseExpression(LEFT.get((CompareLike)expression), calcTypes),
+ parseExpression(RIGHT.get((CompareLike)expression), calcTypes));
}
if (expression instanceof Function) {
@@ -524,13 +535,16 @@ public class GridSqlQueryParser {
res.addChild(GridSqlPlaceholder.EMPTY);
}
else
- res.addChild(parseExpression(arg));
+ res.addChild(parseExpression(arg, calcTypes));
}
}
- if (f.getFunctionType() == Function.CAST || f.getFunctionType() == Function.CONVERT)
- res.setCastType(new Column(null, f.getType(), f.getPrecision(), f.getScale(), f.getDisplaySize())
- .getCreateSQL());
+ if (f.getFunctionType() == Function.CAST || f.getFunctionType() == Function.CONVERT) {
+ Column c = new Column(null, f.getType(), f.getPrecision(), f.getScale(), f.getDisplaySize());
+
+ res.resultType(new GridSqlType(c.getType(), c.getScale(), c.getPrecision(),
+ c.getDisplaySize(), c.getCreateSQL()));
+ }
return res;
}
@@ -544,7 +558,7 @@ public class GridSqlQueryParser {
if (f.getArgs() != null) {
for (Expression arg : f.getArgs())
- res.addChild(parseExpression(arg));
+ res.addChild(parseExpression(arg, calcTypes));
}
return res;
@@ -560,7 +574,7 @@ public class GridSqlQueryParser {
Expression on = ON.get((Aggregate)expression);
if (on != null)
- res.addChild(parseExpression(on));
+ res.addChild(parseExpression(on, calcTypes));
return res;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7dd4a02/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
index 502366d..2f8bcdd 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
@@ -22,7 +22,6 @@ import org.apache.ignite.internal.processors.cache.query.*;
import org.apache.ignite.internal.processors.query.h2.*;
import org.apache.ignite.internal.util.typedef.*;
import org.h2.jdbc.*;
-import org.h2.value.*;
import org.jetbrains.annotations.*;
import java.util.*;
@@ -35,20 +34,20 @@ import static org.apache.ignite.internal.processors.query.h2.sql.GridSqlPlacehol
*/
public class GridSqlQuerySplitter {
/** */
- private static final String TABLE_PREFIX = "__T";
+ private static final String TABLE_SCHEMA = "PUBLIC";
/** */
- private static final String COLUMN_PREFIX = "__C";
+ private static final String TABLE_PREFIX = "__T";
/** */
- public static final String TABLE_FUNC_NAME = "__Z0";
+ private static final String COLUMN_PREFIX = "__C";
/**
* @param idx Index of table.
- * @return Table name.
+ * @return Table.
*/
- private static String table(int idx) {
- return TABLE_PREFIX + idx;
+ public static GridSqlTable table(int idx) {
+ return new GridSqlTable(TABLE_SCHEMA, TABLE_PREFIX + idx);
}
/**
@@ -88,7 +87,9 @@ public class GridSqlQuerySplitter {
int c = 0;
- for (GridSqlElement expr : left.select(true)) {
+ for (GridSqlElement expr : left.columns(true)) {
+ GridSqlType type = expr.resultType();
+
String colName;
if (expr instanceof GridSqlAlias)
@@ -101,12 +102,14 @@ public class GridSqlQuerySplitter {
expr = alias(colName, expr);
// Set generated alias to the expression.
- left.setSelectExpression(c, expr);
+ left.setColumn(c, expr);
}
GridSqlColumn col = column(colName);
- wrapQry.addSelectExpression(col, true);
+ col.resultType(type);
+
+ wrapQry.addColumn(col, true);
c++;
}
@@ -137,17 +140,15 @@ public class GridSqlQuerySplitter {
// nullifying or updating things, have to make sure that we will not need them in the original form later.
final GridSqlSelect mapQry = wrapUnion(collectAllSpaces(GridSqlQueryParser.parse(stmt), spaces));
- final String mergeTable = TABLE_FUNC_NAME + "()"; // table(0); TODO IGNITE-1142
-
final boolean explain = mapQry.explain();
mapQry.explain(false);
- GridSqlSelect rdcQry = new GridSqlSelect().from(new GridSqlFunction(null, TABLE_FUNC_NAME)); // table(mergeTable)); TODO IGNITE-1142
+ GridSqlSelect rdcQry = new GridSqlSelect().from(table(0));
// Split all select expressions into map-reduce parts.
List<GridSqlElement> mapExps = F.addAll(new ArrayList<GridSqlElement>(mapQry.allColumns()),
- mapQry.select(false));
+ mapQry.columns(false));
GridSqlElement[] rdcExps = new GridSqlElement[mapQry.visibleColumns()];
@@ -159,16 +160,16 @@ public class GridSqlQuerySplitter {
aggregateFound |= splitSelectExpression(mapExps, rdcExps, colNames, i, collocated);
// Fill select expressions.
- mapQry.clearSelect();
+ mapQry.clearColumns();
for (GridSqlElement exp : mapExps) // Add all map expressions as visible.
- mapQry.addSelectExpression(exp, true);
+ mapQry.addColumn(exp, true);
for (GridSqlElement rdcExp : rdcExps) // Add corresponding visible reduce columns.
- rdcQry.addSelectExpression(rdcExp, true);
+ rdcQry.addColumn(rdcExp, true);
for (int i = rdcExps.length; i < mapExps.size(); i++) // Add all extra map columns as invisible reduce columns.
- rdcQry.addSelectExpression(column(((GridSqlAlias)mapExps.get(i)).alias()), false);
+ rdcQry.addColumn(column(((GridSqlAlias)mapExps.get(i)).alias()), false);
// -- GROUP BY
if (mapQry.groupColumns() != null && !collocated)
@@ -214,11 +215,12 @@ public class GridSqlQuerySplitter {
}
// Build resulting two step query.
- GridCacheTwoStepQuery res = new GridCacheTwoStepQuery(spaces, rdcQry.getSQL(),
- findParams(rdcQry, params, new ArrayList<>()).toArray());
+ GridCacheTwoStepQuery res = new GridCacheTwoStepQuery(spaces, new GridCacheSqlQuery(rdcQry.getSQL(),
+ findParams(rdcQry, params, new ArrayList<>()).toArray()));
- res.addMapQuery(mergeTable, mapQry.getSQL(),
- findParams(mapQry, params, new ArrayList<>(params.length)).toArray());
+ res.addMapQuery(new GridCacheSqlQuery(mapQry.getSQL(),
+ findParams(mapQry, params, new ArrayList<>(params.length)).toArray())
+ .columns(collectColumns(mapExps)));
res.explain(explain);
@@ -226,6 +228,37 @@ public class GridSqlQuerySplitter {
}
/**
+ * @param cols Columns from SELECT clause.
+ * @return Map of columns with types.
+ */
+ private static LinkedHashMap<String,?> collectColumns(List<GridSqlElement> cols) {
+ LinkedHashMap<String, GridSqlType> res = new LinkedHashMap<>(cols.size(), 1f, false);
+
+ for (int i = 0; i < cols.size(); i++) {
+ GridSqlElement col = cols.get(i);
+ GridSqlType t = col.resultType();
+
+ if (t == null)
+ throw new NullPointerException("Column type.");
+
+ if (t == GridSqlType.UNKNOWN)
+ throw new IllegalStateException("Unknown type: " + col);
+
+ String alias;
+
+ if (col instanceof GridSqlAlias)
+ alias = ((GridSqlAlias)col).alias();
+ else
+ alias = columnName(i);
+
+ if (res.put(alias, t) != null)
+ throw new IllegalStateException("Alias already exists: " + alias);
+ }
+
+ return res;
+ }
+
+ /**
* @param qry Query.
* @param spaces Space names.
* @return Query.
@@ -242,7 +275,7 @@ public class GridSqlQuerySplitter {
collectAllSpacesInFrom(select.from(), spaces);
- for (GridSqlElement el : select.select(false))
+ for (GridSqlElement el : select.columns(false))
collectAllSpacesInSubqueries(el, spaces);
collectAllSpacesInSubqueries(select.where(), spaces);
@@ -325,7 +358,7 @@ public class GridSqlQuerySplitter {
if (params.length == 0)
return target;
- for (GridSqlElement el : qry.select(false))
+ for (GridSqlElement el : qry.columns(false))
findParams(el, params, target);
findParams(qry.from(), params, target);
@@ -422,11 +455,6 @@ public class GridSqlQuerySplitter {
if (idx < rdcSelect.length) { // SELECT __C0 AS original_alias
GridSqlElement rdcEl = column(mapColAlias);
- GridSqlType type = el.expressionResultType();
-
- if (type != null && type.type() == Value.UUID) // There is no JDBC type UUID, so conversion to bytes occurs.
- rdcEl = function(CAST).setCastType("UUID").addChild(rdcEl); // TODO IGNITE-1142 - remove this cast when table function removed
-
if (colNames.add(rdcColAlias)) // To handle column name duplication (usually wildcard for few tables).
rdcEl = alias(rdcColAlias, rdcEl);
@@ -499,6 +527,8 @@ public class GridSqlQuerySplitter {
) {
GridSqlAggregateFunction agg = parentExpr.child(aggIdx);
+ assert agg.resultType() != null;
+
GridSqlElement mapAgg, rdcAgg;
// Create stubbed map alias to fill it with correct expression later.
@@ -513,7 +543,8 @@ public class GridSqlQuerySplitter {
switch (agg.type()) {
case AVG: // SUM( AVG(CAST(x AS DOUBLE))*COUNT(x) )/SUM( COUNT(x) ).
//-- COUNT(x) map
- GridSqlElement cntMapAgg = aggregate(agg.distinct(), COUNT).addChild(agg.child());
+ GridSqlElement cntMapAgg = aggregate(agg.distinct(), COUNT)
+ .resultType(GridSqlType.BIGINT).addChild(agg.child());
// Add generated alias to COUNT(x).
// Using size as index since COUNT will be added as the last select element to the map query.
@@ -524,8 +555,8 @@ public class GridSqlQuerySplitter {
mapSelect.add(cntMapAgg);
//-- AVG(CAST(x AS DOUBLE)) map
- mapAgg = aggregate(agg.distinct(), AVG).addChild( // Add function argument.
- function(CAST).setCastType("DOUBLE").addChild(agg.child()));
+ mapAgg = aggregate(agg.distinct(), AVG).resultType(GridSqlType.DOUBLE).addChild(
+ function(CAST).resultType(GridSqlType.DOUBLE).addChild(agg.child()));
//-- SUM( AVG(x)*COUNT(x) )/SUM( COUNT(x) ) reduce
GridSqlElement sumUpRdc = aggregate(false, SUM).addChild(
@@ -542,20 +573,20 @@ public class GridSqlQuerySplitter {
case SUM: // SUM( SUM(x) )
case MAX: // MAX( MAX(x) )
case MIN: // MIN( MIN(x) )
- mapAgg = aggregate(agg.distinct(), agg.type()).addChild(agg.child());
+ mapAgg = aggregate(agg.distinct(), agg.type()).resultType(agg.resultType()).addChild(agg.child());
rdcAgg = aggregate(agg.distinct(), agg.type()).addChild(column(mapAggAlias.alias()));
break;
case COUNT_ALL: // CAST(SUM( COUNT(*) ) AS BIGINT)
case COUNT: // CAST(SUM( COUNT(x) ) AS BIGINT)
- mapAgg = aggregate(agg.distinct(), agg.type());
+ mapAgg = aggregate(agg.distinct(), agg.type()).resultType(GridSqlType.BIGINT);
if (agg.type() == COUNT)
mapAgg.addChild(agg.child());
rdcAgg = aggregate(false, SUM).addChild(column(mapAggAlias.alias()));
- rdcAgg = function(CAST).setCastType("BIGINT").addChild(rdcAgg);
+ rdcAgg = function(CAST).resultType(GridSqlType.BIGINT).addChild(rdcAgg);
break;
@@ -564,9 +595,11 @@ public class GridSqlQuerySplitter {
}
assert !(mapAgg instanceof GridSqlAlias);
+ assert mapAgg.resultType() != null;
// Fill the map alias with aggregate.
mapAggAlias.child(0, mapAgg);
+ mapAggAlias.resultType(mapAgg.resultType());
// Replace in original expression aggregate with reduce aggregate.
parentExpr.child(aggIdx, rdcAgg);
@@ -595,7 +628,11 @@ public class GridSqlQuerySplitter {
* @return Alias.
*/
private static GridSqlAlias alias(String alias, GridSqlElement child) {
- return new GridSqlAlias(alias, child);
+ GridSqlAlias res = new GridSqlAlias(alias, child);
+
+ res.resultType(child.resultType());
+
+ return res;
}
/**
@@ -615,12 +652,4 @@ public class GridSqlQuerySplitter {
private static GridSqlFunction function(GridSqlFunctionType type) {
return new GridSqlFunction(type);
}
-
- /**
- * @param name Table name.
- * @return Table.
- */
- private static GridSqlTable table(String name) {
- return new GridSqlTable(null, name);
- }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7dd4a02/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSelect.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSelect.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSelect.java
index fb2643e..6705c48 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSelect.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSelect.java
@@ -26,10 +26,10 @@ import java.util.*;
*/
public class GridSqlSelect extends GridSqlQuery {
/** */
- private List<GridSqlElement> allExprs = new ArrayList<>();
+ private List<GridSqlElement> cols = new ArrayList<>();
/** */
- private List<GridSqlElement> select = new ArrayList<>();
+ private int visibleCols;
/** */
private int[] grpCols;
@@ -45,19 +45,19 @@ public class GridSqlSelect extends GridSqlQuery {
/** {@inheritDoc} */
@Override public int visibleColumns() {
- return select.size();
+ return visibleCols;
}
/**
* @return Number of columns is select including invisible ones.
*/
public int allColumns() {
- return allExprs.size();
+ return cols.size();
}
/** {@inheritDoc} */
- @Override protected GridSqlElement expression(int col) {
- return allExprs.get(col);
+ @Override protected GridSqlElement column(int col) {
+ return cols.get(col);
}
/** {@inheritDoc} */
@@ -67,7 +67,7 @@ public class GridSqlSelect extends GridSqlQuery {
if (distinct)
buff.append(" DISTINCT");
- for (GridSqlElement expression : select) {
+ for (GridSqlElement expression : columns(true)) {
buff.appendExceptFirst(",");
buff.append('\n');
buff.append(expression.getSQL());
@@ -86,14 +86,14 @@ public class GridSqlSelect extends GridSqlQuery {
for (int grpCol : grpCols) {
buff.appendExceptFirst(", ");
- addAlias(buff, allExprs.get(grpCol));
+ addAlias(buff, cols.get(grpCol));
}
}
if (havingCol >= 0) {
buff.append("\nHAVING ");
- addAlias(buff, allExprs.get(havingCol));
+ addAlias(buff, cols.get(havingCol));
}
getSortLimitSQL(buff);
@@ -114,52 +114,59 @@ public class GridSqlSelect extends GridSqlQuery {
/**
* @param visibleOnly If only visible expressions needed.
- * @return Select phrase expressions.
+ * @return Select clause expressions.
*/
- public Iterable<GridSqlElement> select(boolean visibleOnly) {
- return visibleOnly ? select : allExprs;
+ public Iterable<GridSqlElement> columns(boolean visibleOnly) {
+ assert visibleCols <= cols.size();
+
+ return visibleOnly && visibleCols != cols.size() ?
+ cols.subList(0, visibleCols) : cols;
}
/**
- * Clears select list.
+ * Clears select expressions list.
+ * @return {@code this}.
*/
- public void clearSelect() {
- select = new ArrayList<>();
- allExprs = new ArrayList<>();
+ public GridSqlSelect clearColumns() {
+ visibleCols = 0;
+ cols = new ArrayList<>();
+
+ return this;
}
/**
* @param expression Expression.
* @param visible Expression is visible in select phrase.
+ * @return {@code this}.
*/
- public void addSelectExpression(GridSqlElement expression, boolean visible) {
+ public GridSqlSelect addColumn(GridSqlElement expression, boolean visible) {
if (expression == null)
throw new NullPointerException();
if (visible) {
- if (select.size() != allExprs.size())
+ if (visibleCols != cols.size())
throw new IllegalStateException("Already started adding invisible columns.");
- select.add(expression);
+ visibleCols++;
}
- else if (select.isEmpty())
- throw new IllegalStateException("No visible columns.");
- allExprs.add(expression);
+ cols.add(expression);
+
+ return this;
}
/**
* @param colIdx Column index.
* @param expression Expression.
+ * @return {@code this}.
*/
- public void setSelectExpression(int colIdx, GridSqlElement expression) {
+ public GridSqlSelect setColumn(int colIdx, GridSqlElement expression) {
if (expression == null)
throw new NullPointerException();
- if (colIdx < select.size()) // Assuming that all the needed expressions were already added.
- select.set(colIdx, expression);
+ cols.set(colIdx, expression);
- allExprs.set(colIdx, expression);
+ return this;
}
/**
@@ -171,9 +178,12 @@ public class GridSqlSelect extends GridSqlQuery {
/**
* @param grpCols Group columns.
+ * @return {@code this}.
*/
- public void groupColumns(int[] grpCols) {
+ public GridSqlSelect groupColumns(int[] grpCols) {
this.grpCols = grpCols;
+
+ return this;
}
/**
@@ -202,9 +212,12 @@ public class GridSqlSelect extends GridSqlQuery {
/**
* @param where New where.
+ * @return {@code this}.
*/
- public void where(GridSqlElement where) {
+ public GridSqlSelect where(GridSqlElement where) {
this.where = where;
+
+ return this;
}
/**
@@ -226,16 +239,19 @@ public class GridSqlSelect extends GridSqlQuery {
* @return Having.
*/
public GridSqlElement having() {
- return havingCol >= 0 ? allExprs.get(havingCol) : null;
+ return havingCol >= 0 ? column(havingCol) : null;
}
/**
* @param col Index of HAVING column.
+ * @return {@code this}.
*/
- public void havingColumn(int col) {
+ public GridSqlSelect havingColumn(int col) {
assert col >= -1 : col;
havingCol = col;
+
+ return this;
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7dd4a02/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlType.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlType.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlType.java
index 1dbcd46..aeee562 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlType.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlType.java
@@ -17,10 +17,27 @@
package org.apache.ignite.internal.processors.query.h2.sql;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.h2.value.*;
+
/**
* SQL Data type based on H2.
*/
-public class GridSqlType {
+public final class GridSqlType {
+ /** */
+ public static final GridSqlType UNKNOWN = new GridSqlType(Value.UNKNOWN, 0, 0, 0, null);
+
+ /** */
+ public static final GridSqlType BIGINT = new GridSqlType(Value.LONG, 0, ValueLong.PRECISION,
+ ValueLong.DISPLAY_SIZE, "BIGINT");
+
+ /** */
+ public static final GridSqlType DOUBLE = new GridSqlType(Value.DOUBLE, 0, ValueDouble.PRECISION,
+ ValueDouble.DISPLAY_SIZE, "DOUBLE");
+
+ /** */
+ public static final GridSqlType UUID = new GridSqlType(Value.UUID, 0, Integer.MAX_VALUE, 36, "UUID");
+
/** H2 type. */
private final int type;
@@ -91,4 +108,9 @@ public class GridSqlType {
public String sql() {
return sql;
}
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(GridSqlType.class, this);
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7dd4a02/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlUnion.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlUnion.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlUnion.java
index 721c288..2900470 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlUnion.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlUnion.java
@@ -41,7 +41,7 @@ public class GridSqlUnion extends GridSqlQuery {
}
/** {@inheritDoc} */
- @Override protected GridSqlElement expression(int col) {
+ @Override protected GridSqlElement column(int col) {
throw new IllegalStateException();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7dd4a02/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
index 5510e9e..03500e6 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
@@ -29,6 +29,7 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.*;
import org.apache.ignite.internal.processors.cache.query.*;
import org.apache.ignite.internal.processors.query.*;
import org.apache.ignite.internal.processors.query.h2.*;
+import org.apache.ignite.internal.processors.query.h2.sql.*;
import org.apache.ignite.internal.processors.query.h2.twostep.messages.*;
import org.apache.ignite.internal.util.*;
import org.apache.ignite.internal.util.typedef.*;
@@ -36,16 +37,11 @@ import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.marshaller.*;
import org.apache.ignite.plugin.extensions.communication.*;
-import org.h2.command.*;
import org.h2.command.ddl.*;
-import org.h2.command.dml.*;
import org.h2.engine.*;
-import org.h2.expression.*;
-import org.h2.index.*;
import org.h2.jdbc.*;
import org.h2.result.*;
import org.h2.table.*;
-import org.h2.tools.*;
import org.h2.util.*;
import org.h2.value.*;
import org.jetbrains.annotations.*;
@@ -55,9 +51,9 @@ import javax.cache.*;
import java.lang.reflect.*;
import java.sql.*;
import java.util.*;
-import java.util.Set;
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
+import java.util.concurrent.locks.*;
import static org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion.*;
@@ -84,7 +80,10 @@ public class GridReduceQueryExecutor {
private final ConcurrentMap<Long, QueryRun> runs = new ConcurrentHashMap8<>();
/** */
- private static ThreadLocal<GridMergeTable> curFunTbl = new ThreadLocal<>();
+ private volatile List<GridThreadLocalTable> fakeTbls = Collections.emptyList();
+
+ /** */
+ private final Lock fakeTblsLock = new ReentrantLock();
/** */
private static final Constructor<JdbcResultSet> CONSTRUCTOR;
@@ -475,11 +474,13 @@ public class GridReduceQueryExecutor {
nodes = Collections.singleton(F.rand(nodes));
}
+ int tblIdx = 0;
+
for (GridCacheSqlQuery mapQry : qry.mapQueries()) {
GridMergeTable tbl;
try {
- tbl = createFunctionTable(r.conn, mapQry, qry.explain()); // createTable(r.conn, mapQry); TODO
+ tbl = createMergeTable(r.conn, mapQry, qry.explain());
}
catch (IgniteCheckedException e) {
throw new IgniteException(e);
@@ -492,7 +493,7 @@ public class GridReduceQueryExecutor {
r.tbls.add(tbl);
- curFunTbl.set(tbl);
+ fakeTable(r.conn, tblIdx++).setInnerTable(tbl);
}
r.latch = new CountDownLatch(r.tbls.size() * nodes.size());
@@ -512,7 +513,7 @@ public class GridReduceQueryExecutor {
mapQrys = new ArrayList<>(qry.mapQueries().size());
for (GridCacheSqlQuery mapQry : qry.mapQueries())
- mapQrys.add(new GridCacheSqlQuery(mapQry.alias(), "EXPLAIN " + mapQry.query(), mapQry.parameters()));
+ mapQrys.add(new GridCacheSqlQuery("EXPLAIN " + mapQry.query(), mapQry.parameters()));
}
if (nodes.size() != 1 || !F.first(nodes).isLocal()) { // Marshall params for remotes.
@@ -565,8 +566,6 @@ public class GridReduceQueryExecutor {
for (GridMergeTable tbl : r.tbls) {
if (!tbl.getScanIndex(null).fetchedAll()) // We have to explicitly cancel queries on remote nodes.
send(nodes, new GridQueryCancelRequest(qryReqId), null);
-
-// dropTable(r.conn, tbl.getName()); TODO
}
if (retry) {
@@ -600,7 +599,8 @@ public class GridReduceQueryExecutor {
if (!runs.remove(qryReqId, r))
U.warn(log, "Query run was already removed: " + qryReqId);
- curFunTbl.remove();
+ for (int i = 0, mapQrys = qry.mapQueries().size(); i < mapQrys; i++)
+ fakeTable(null, i).setInnerTable(null); // Drop all merge tables.
}
}
}
@@ -626,6 +626,54 @@ public class GridReduceQueryExecutor {
}
/**
+ * @param idx Table index.
+ * @return Table name.
+ */
+ private static String table(int idx) {
+ return GridSqlQuerySplitter.table(idx).getSQL();
+ }
+
+ /**
+ * Gets or creates new fake table for index.
+ *
+ * @param idx Index of table.
+ * @return Table.
+ */
+ private GridThreadLocalTable fakeTable(Connection c, int idx) {
+ List<GridThreadLocalTable> tbls = fakeTbls;
+
+ assert tbls.size() >= idx;
+
+ if (tbls.size() == idx) { // If table for such index does not exist, create one.
+ fakeTblsLock.lock();
+
+ try {
+ if ((tbls = fakeTbls).size() == idx) { // Double check inside of lock.
+ try (Statement stmt = c.createStatement()) {
+ stmt.executeUpdate("CREATE TABLE " + table(idx) +
+ "(fake BOOL) ENGINE \"" + GridThreadLocalTable.Engine.class.getName() + '"');
+ }
+ catch (SQLException e) {
+ throw new IllegalStateException(e);
+ }
+
+ List<GridThreadLocalTable> newTbls = new ArrayList<>(tbls.size() + 1);
+
+ newTbls.addAll(tbls);
+ newTbls.add(GridThreadLocalTable.Engine.getCreated());
+
+ fakeTbls = tbls = newTbls;
+ }
+ }
+ finally {
+ fakeTblsLock.unlock();
+ }
+ }
+
+ return tbls.get(idx);
+ }
+
+ /**
* Calculates data nodes for replicated caches on unstable topology.
*
* @param cctx Cache context for main space.
@@ -858,16 +906,18 @@ public class GridReduceQueryExecutor {
throws IgniteCheckedException {
List<List<?>> lists = new ArrayList<>();
- for (GridCacheSqlQuery mapQry : qry.mapQueries()) {
- ResultSet rs = h2.executeSqlQueryWithTimer(space, c, "SELECT PLAN FROM " + mapQry.alias(), null);
+ for (int i = 0, mapQrys = qry.mapQueries().size(); i < mapQrys; i++) {
+ ResultSet rs = h2.executeSqlQueryWithTimer(space, c, "SELECT PLAN FROM " + table(i), null);
lists.add(F.asList(getPlan(rs)));
}
+ int tblIdx = 0;
+
for (GridCacheSqlQuery mapQry : qry.mapQueries()) {
- GridMergeTable tbl = createFunctionTable(c, mapQry, false);
+ GridMergeTable tbl = createMergeTable(c, mapQry, false);
- curFunTbl.set(tbl); // Now it will be only a single table.
+ fakeTable(c, tblIdx++).setInnerTable(tbl);
}
GridCacheSqlQuery rdc = qry.reduceQuery();
@@ -961,118 +1011,12 @@ public class GridReduceQueryExecutor {
/**
* @param conn Connection.
- * @param tblName Table name.
- * @throws SQLException If failed.
- */
- private void dropTable(Connection conn, String tblName) throws SQLException {
- try (Statement s = conn.createStatement()) {
- s.execute("DROP TABLE " + tblName);
- }
- }
-
- /**
- * @return Merged result set.
- */
- public static ResultSet mergeTableFunction(JdbcConnection c) throws Exception {
- GridMergeTable tbl = curFunTbl.get();
-
- Session ses = (Session)c.getSession();
-
- String url = c.getMetaData().getURL();
-
- // URL is either "jdbc:default:connection" or "jdbc:columnlist:connection"
- final Cursor cursor = url.charAt(5) == 'c' ? null : tbl.getScanIndex(ses).find(ses, null, null);
-
- final Column[] cols = tbl.getColumns();
-
- SimpleResultSet rs = new SimpleResultSet(cursor == null ? null : new SimpleRowSource() {
- @Override public Object[] readRow() throws SQLException {
- if (!cursor.next())
- return null;
-
- Row r = cursor.get();
-
- Object[] row = new Object[cols.length];
-
- for (int i = 0; i < row.length; i++)
- row[i] = r.getValue(i).getObject();
-
- return row;
- }
-
- @Override public void close() {
- // No-op.
- }
-
- @Override public void reset() throws SQLException {
- throw new SQLException("Unsupported.");
- }
- }) {
- @Override public byte[] getBytes(int colIdx) throws SQLException {
- assert cursor != null;
-
- return cursor.get().getValue(colIdx - 1).getBytes();
- }
-
- @Override public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
- throw new UnsupportedOperationException();
- }
-
- @Override public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
- throw new UnsupportedOperationException();
- }
- };
-
- for (Column col : cols)
- rs.addColumn(col.getName(), DataType.convertTypeToSQLType(col.getType()),
- MathUtils.convertLongToInt(col.getPrecision()), col.getScale());
-
- return rs;
- }
-
- /**
- * @param asQuery Query.
- * @return List of columns.
- */
- private static ArrayList<Column> generateColumnsFromQuery(org.h2.command.dml.Query asQuery) {
- int columnCount = asQuery.getColumnCount();
- ArrayList<Expression> expressions = asQuery.getExpressions();
- ArrayList<Column> cols = new ArrayList<>();
- for (int i = 0; i < columnCount; i++) {
- Expression expr = expressions.get(i);
- int type = expr.getType();
- String name = expr.getAlias();
- long precision = expr.getPrecision();
- int displaySize = expr.getDisplaySize();
- DataType dt = DataType.getDataType(type);
- if (precision > 0 && (dt.defaultPrecision == 0 ||
- (dt.defaultPrecision > precision && dt.defaultPrecision < Byte.MAX_VALUE))) {
- // dont' set precision to MAX_VALUE if this is the default
- precision = dt.defaultPrecision;
- }
- int scale = expr.getScale();
- if (scale > 0 && (dt.defaultScale == 0 ||
- (dt.defaultScale > scale && dt.defaultScale < precision))) {
- scale = dt.defaultScale;
- }
- if (scale > precision) {
- precision = scale;
- }
- Column col = new Column(name, type, precision, scale, displaySize);
- cols.add(col);
- }
-
- return cols;
- }
-
- /**
- * @param conn Connection.
* @param qry Query.
* @param explain Explain.
* @return Table.
* @throws IgniteCheckedException
*/
- private GridMergeTable createFunctionTable(JdbcConnection conn, GridCacheSqlQuery qry, boolean explain)
+ private GridMergeTable createMergeTable(JdbcConnection conn, GridCacheSqlQuery qry, boolean explain)
throws IgniteCheckedException {
try {
Session ses = (Session)conn.getSession();
@@ -1084,17 +1028,24 @@ public class GridReduceQueryExecutor {
data.create = true;
if (!explain) {
- Prepared prepare = ses.prepare(qry.query(), false);
+ LinkedHashMap<String,?> colsMap = qry.columns();
+
+ assert colsMap != null;
+
+ ArrayList<Column> cols = new ArrayList<>(colsMap.size());
+
+ for (Map.Entry<String,?> e : colsMap.entrySet()) {
+ String alias = e.getKey();
+ GridSqlType t = (GridSqlType)e.getValue();
- List<org.h2.expression.Parameter> parsedParams = prepare.getParameters();
+ assert !F.isEmpty(alias);
- for (int i = Math.min(parsedParams.size(), qry.parameters().length); --i >= 0; ) {
- Object val = qry.parameters()[i];
+ Column c = new Column(alias, t.type(), t.precision(), t.scale(), t.displaySize());
- parsedParams.get(i).setValue(DataType.convertToValue(ses, val, Value.UNKNOWN));
+ cols.add(c);
}
- data.columns = generateColumnsFromQuery((Query)prepare);
+ data.columns = cols;
}
else
data.columns = planColumns();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7dd4a02/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridThreadLocalTable.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridThreadLocalTable.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridThreadLocalTable.java
new file mode 100644
index 0000000..c468371
--- /dev/null
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridThreadLocalTable.java
@@ -0,0 +1,262 @@
+/*
+ * 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.query.h2.twostep;
+
+import org.h2.api.*;
+import org.h2.command.ddl.*;
+import org.h2.engine.*;
+import org.h2.index.*;
+import org.h2.result.*;
+import org.h2.schema.*;
+import org.h2.table.*;
+import org.h2.value.*;
+
+import java.util.*;
+
+/**
+ * Thread local table wrapper for another table instance.
+ */
+public class GridThreadLocalTable extends Table {
+ /** Delegate table */
+ private final ThreadLocal<Table> tbl = new ThreadLocal<>();
+
+ /**
+ * @param schema Schema.
+ * @param id ID.
+ * @param name Table name.
+ * @param persistIndexes Persist indexes.
+ * @param persistData Persist data.
+ */
+ public GridThreadLocalTable(Schema schema, int id, String name, boolean persistIndexes, boolean persistData) {
+ super(schema, id, name, persistIndexes, persistData);
+ }
+
+ /**
+ * @param t Table or {@code null} to reset existing.
+ */
+ public void setInnerTable(Table t) {
+ if (t == null)
+ tbl.remove();
+ else
+ tbl.set(t);
+ }
+
+ /** {@inheritDoc} */
+ @Override public Index getPrimaryKey() {
+ return tbl.get().getPrimaryKey();
+ }
+
+ /** {@inheritDoc} */
+ @Override public Column getRowIdColumn() {
+ return tbl.get().getRowIdColumn();
+ }
+
+ /** {@inheritDoc} */
+ @Override public PlanItem getBestPlanItem(Session session, int[] masks, TableFilter filter, SortOrder sortOrder) {
+ return tbl.get().getBestPlanItem(session, masks, filter, sortOrder);
+ }
+
+ /** {@inheritDoc} */
+ @Override public Value getDefaultValue(Session session, Column column) {
+ return tbl.get().getDefaultValue(session, column);
+ }
+
+ /** {@inheritDoc} */
+ @Override public SearchRow getTemplateSimpleRow(boolean singleColumn) {
+ return tbl.get().getTemplateSimpleRow(singleColumn);
+ }
+
+ /** {@inheritDoc} */
+ @Override public Row getTemplateRow() {
+ return tbl.get().getTemplateRow();
+ }
+
+ /** {@inheritDoc} */
+ @Override public Column getColumn(String columnName) {
+ return tbl.get().getColumn(columnName);
+ }
+
+ /** {@inheritDoc} */
+ @Override public Column getColumn(int index) {
+ return tbl.get().getColumn(index);
+ }
+
+ /** {@inheritDoc} */
+ @Override public Index getIndexForColumn(Column column) {
+ return tbl.get().getIndexForColumn(column);
+ }
+
+ /** {@inheritDoc} */
+ @Override public Column[] getColumns() {
+ return tbl.get().getColumns();
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void setColumns(Column[] columns) {
+ throw new IllegalStateException("Cols: " + Arrays.asList(columns));
+ }
+
+ /** {@inheritDoc} */
+ @Override public void lock(Session session, boolean exclusive, boolean force) {
+ tbl.get().lock(session, exclusive, force);
+ }
+
+ /** {@inheritDoc} */
+ @Override public void close(Session session) {
+ // No-op.
+ }
+
+ /** {@inheritDoc} */
+ @Override public void unlock(Session s) {
+ tbl.get().unlock(s);
+ }
+
+ /** {@inheritDoc} */
+ @Override public Index addIndex(Session session, String indexName, int indexId, IndexColumn[] cols,
+ IndexType indexType, boolean create, String indexComment) {
+ return tbl.get().addIndex(session, indexName, indexId, cols, indexType, create, indexComment);
+ }
+
+ /** {@inheritDoc} */
+ @Override public void removeRow(Session session, Row row) {
+ tbl.get().removeRow(session, row);
+ }
+
+ /** {@inheritDoc} */
+ @Override public void truncate(Session session) {
+ tbl.get().truncate(session);
+ }
+
+ /** {@inheritDoc} */
+ @Override public void addRow(Session session, Row row) {
+ tbl.get().addRow(session, row);
+ }
+
+ /** {@inheritDoc} */
+ @Override public void checkSupportAlter() {
+ tbl.get().checkSupportAlter();
+ }
+
+ /** {@inheritDoc} */
+ @Override public String getTableType() {
+ return tbl.get().getTableType();
+ }
+
+ /** {@inheritDoc} */
+ @Override public Index getUniqueIndex() {
+ return tbl.get().getUniqueIndex();
+ }
+
+ /** {@inheritDoc} */
+ @Override public Index getScanIndex(Session session) {
+ return tbl.get().getScanIndex(session);
+ }
+
+ /** {@inheritDoc} */
+ @Override public ArrayList<Index> getIndexes() {
+ return tbl.get().getIndexes();
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean isLockedExclusively() {
+ return tbl.get().isLockedExclusively();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getMaxDataModificationId() {
+ return tbl.get().getMaxDataModificationId();
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean isDeterministic() {
+ return tbl.get().isDeterministic();
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean canGetRowCount() {
+ return tbl.get().canGetRowCount();
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean canDrop() {
+ return tbl.get().canDrop();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getRowCount(Session session) {
+ return tbl.get().getRowCount(session);
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getRowCountApproximation() {
+ return tbl.get().getRowCountApproximation();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getDiskSpaceUsed() {
+ return tbl.get().getDiskSpaceUsed();
+ }
+
+ /** {@inheritDoc} */
+ @Override public String getCreateSQL() {
+ return "";
+ }
+
+ /** {@inheritDoc} */
+ @Override public String getDropSQL() {
+ return tbl.get().getDropSQL();
+ }
+
+ /** {@inheritDoc} */
+ @Override public void checkRename() {
+ tbl.get().checkRename();
+ }
+
+ /**
+ * Engine.
+ */
+ public static class Engine implements TableEngine {
+ /** */
+ private static ThreadLocal<GridThreadLocalTable> createdTbl = new ThreadLocal<>();
+
+ /**
+ * @return Created table.
+ */
+ public static GridThreadLocalTable getCreated() {
+ GridThreadLocalTable tbl = createdTbl.get();
+
+ assert tbl != null;
+
+ createdTbl.remove();
+
+ return tbl;
+ }
+
+ /** {@inheritDoc} */
+ @Override public Table createTable(CreateTableData d) {
+ assert createdTbl.get() == null;
+
+ GridThreadLocalTable tbl = new GridThreadLocalTable(d.schema, d.id, d.tableName, d.persistIndexes,
+ d.persistData);
+
+ createdTbl.set(tbl);
+
+ return tbl;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7dd4a02/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
index ccb3115..18bfd57 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
@@ -316,7 +316,7 @@ public abstract class IgniteCacheAbstractFieldsQuerySelfTest extends GridCommonA
if (cacheMode() == PARTITIONED) {
assertEquals(2, res.size());
- assertTrue(((String)res.get(1).get(0)).contains(GridSqlQuerySplitter.TABLE_FUNC_NAME));
+ assertTrue(((String)res.get(1).get(0)).contains(GridSqlQuerySplitter.table(0).getSQL()));
}
else
assertEquals(1, res.size());
[31/50] incubator-ignite git commit: # ignite-1198
Posted by nt...@apache.org.
# ignite-1198
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2173b0e1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2173b0e1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2173b0e1
Branch: refs/heads/ignite-1108
Commit: 2173b0e1500d3dbc198a610042fca9b92d4f7de7
Parents: 023ffe0
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Wed Aug 5 14:05:07 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Wed Aug 5 14:25:13 2015 -0700
----------------------------------------------------------------------
.../org/apache/ignite/spark/IgniteContext.scala | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2173b0e1/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
----------------------------------------------------------------------
diff --git a/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala b/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
index 5267244a..6e48017 100644
--- a/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
+++ b/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
@@ -19,7 +19,8 @@ package org.apache.ignite.spark
import org.apache.ignite.internal.IgnitionEx
-import org.apache.ignite.{Ignition, Ignite}
+import org.apache.ignite.internal.util.IgniteUtils
+import org.apache.ignite.{IgniteSystemProperties, Ignition, Ignite}
import org.apache.ignite.configuration.{CacheConfiguration, IgniteConfiguration}
import org.apache.spark.{Logging, SparkContext}
import org.apache.spark.sql.SQLContext
@@ -41,8 +42,12 @@ class IgniteContext[K, V](
private val cfgClo = new Once(cfgF)
+ private val igniteHome = IgniteUtils.getIgniteHome
+
if (!client) {
- val workers = sparkContext.getExecutorStorageStatus.length - 1
+ // Get required number of executors with default equals to number of available executors.
+ val workers = sparkContext.getConf.getInt("spark.executor.instances",
+ sparkContext.getExecutorStorageStatus.length)
if (workers <= 0)
throw new IllegalStateException("No Spark executors found to start Ignite nodes.")
@@ -125,6 +130,16 @@ class IgniteContext[K, V](
* @return Ignite instance.
*/
def ignite(): Ignite = {
+ val home = IgniteUtils.getIgniteHome
+
+ if (home == null && igniteHome != null) {
+ logInfo("Setting IGNITE_HOME from driver not as it is not available on this worker: " + igniteHome)
+
+ IgniteUtils.nullifyHomeDirectory()
+
+ System.setProperty(IgniteSystemProperties.IGNITE_HOME, igniteHome)
+ }
+
val igniteCfg = cfgClo()
try {
[17/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/master' into ignite-1189
Posted by nt...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-1189
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d78e4c8e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d78e4c8e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d78e4c8e
Branch: refs/heads/ignite-1108
Commit: d78e4c8eef921775d2d5d1fcd5adf151c3d46923
Parents: 4d528be b056a73
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 13:32:45 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 13:32:45 2015 +0300
----------------------------------------------------------------------
.../ClientAbstractMultiNodeSelfTest.java | 4 +-
.../apache/ignite/IgniteSystemProperties.java | 2 +-
.../store/jdbc/CacheAbstractJdbcStore.java | 21 +-
.../apache/ignite/internal/IgniteKernal.java | 2 +-
.../org/apache/ignite/internal/IgnitionEx.java | 43 +-
.../managers/communication/GridIoManager.java | 188 +++++++-
.../processors/cache/GridCacheMvccManager.java | 73 +--
.../processors/cache/GridCacheProcessor.java | 2 +-
.../processors/cache/GridCacheProxyImpl.java | 42 +-
.../processors/cache/GridCacheSwapManager.java | 2 +-
.../distributed/near/GridNearGetFuture.java | 20 +-
.../ignite/internal/util/IgniteUtils.java | 16 +
.../util/nio/GridCommunicationClient.java | 5 +-
.../util/nio/GridNioFinishedFuture.java | 12 +
.../ignite/internal/util/nio/GridNioFuture.java | 14 +
.../internal/util/nio/GridNioFutureImpl.java | 15 +
.../util/nio/GridNioRecoveryDescriptor.java | 13 +-
.../ignite/internal/util/nio/GridNioServer.java | 5 +
.../util/nio/GridNioSessionMetaKey.java | 5 +-
.../util/nio/GridShmemCommunicationClient.java | 7 +-
.../util/nio/GridTcpNioCommunicationClient.java | 14 +-
.../communication/tcp/TcpCommunicationSpi.java | 43 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 2 +-
.../src/test/config/io-manager-benchmark.xml | 3 +-
.../GridJobMasterLeaveAwareSelfTest.java | 10 +-
.../IgniteClientReconnectAbstractTest.java | 5 +-
.../IgniteClientReconnectCacheTest.java | 5 +-
.../GridDeploymentMessageCountSelfTest.java | 5 +-
.../cache/CacheStopAndDestroySelfTest.java | 8 +-
.../GridCacheAtomicMessageCountSelfTest.java | 6 +-
.../processors/cache/GridCacheMvccSelfTest.java | 1 -
...ridCacheReplicatedSynchronousCommitTest.java | 5 +-
.../IgniteCacheAbstractStopBusySelfTest.java | 6 +-
.../cache/IgniteCacheNearLockValueSelfTest.java | 6 +-
...eDynamicCacheStartNoExchangeTimeoutTest.java | 4 +-
.../cache/IgniteTxReentryAbstractSelfTest.java | 5 +-
...niteCacheClientNodeChangingTopologyTest.java | 6 +-
...teCacheClientNodePartitionsExchangeTest.java | 4 +-
.../IgniteCacheNearOffheapGetSelfTest.java | 131 ++++++
...xOriginatingNodeFailureAbstractSelfTest.java | 6 +-
...cOriginatingNodeFailureAbstractSelfTest.java | 6 +-
.../GridCacheDhtPreloadMessageCountTest.java | 5 +-
...ePrimaryNodeFailureRecoveryAbstractTest.java | 6 +-
...eAtomicInvalidPartitionHandlingSelfTest.java | 5 +-
.../near/IgniteCacheNearTxRollbackTest.java | 6 +-
.../GridCacheReplicatedInvalidateSelfTest.java | 6 +-
...CommunicationRecoveryAckClosureSelfTest.java | 464 +++++++++++++++++++
.../testsuites/IgniteCacheTestSuite2.java | 1 +
.../IgniteSpiCommunicationSelfTestSuite.java | 1 +
.../ignite/util/TestTcpCommunicationSpi.java | 6 +-
...CacheScanPartitionQueryFallbackSelfTest.java | 15 +-
.../parser/dialect/OracleMetadataDialect.java | 4 +-
.../src/test/java/config/ignite-test-config.xml | 43 ++
.../ignite/internal/GridFactorySelfTest.java | 9 +
.../visor/commands/kill/VisorKillCommand.scala | 2 +-
55 files changed, 1148 insertions(+), 197 deletions(-)
----------------------------------------------------------------------
[05/50] incubator-ignite git commit: ignite-1189: trying to reproduce
failures
Posted by nt...@apache.org.
ignite-1189: trying to reproduce failures
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6b237e11
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6b237e11
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6b237e11
Branch: refs/heads/ignite-1108
Commit: 6b237e119caad68474cc785c0373da8ce31011d8
Parents: ac6d75d
Author: Denis Magda <dm...@gridgain.com>
Authored: Mon Aug 3 14:45:40 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Mon Aug 3 14:45:40 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/internal/IgnitionEx.java | 21 +++++---------------
.../IgniteCacheAtomicNodeRestartTest.java | 4 ++++
2 files changed, 9 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6b237e11/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index d355085..5cbe377 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -261,11 +261,8 @@ public class IgnitionEx {
public static boolean stop(@Nullable String name, boolean cancel) {
IgniteNamedInstance grid = name != null ? grids.get(name) : dfltGrid;
- if (grid != null) {
- IgniteState state = grid.state();
-
- if (state == STARTED)
- grid.stop(cancel);
+ if (grid != null && grid.state() == STARTED) {
+ grid.stop(cancel);
boolean fireEvt;
@@ -280,18 +277,10 @@ public class IgnitionEx {
}
}
- if (state == STARTED) {
- if (fireEvt)
- notifyStateChange(grid.getName(), grid.state());
-
- return true;
- }
- else {
- U.warn(null, "Ignoring stopping grid instance (has not been in STARTED state): [grid=" + name +
- ", state=" + state + ']');
+ if (fireEvt)
+ notifyStateChange(grid.getName(), grid.state());
- return false;
- }
+ return true;
}
// We don't have log at this point...
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6b237e11/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
index 1c4e616..fa8898f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
@@ -30,4 +30,8 @@ public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRe
@Override protected CacheAtomicityMode atomicityMode() {
return ATOMIC;
}
+
+ @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable {
+
+ }
}
[03/50] incubator-ignite git commit: IGNITE-1185 Fix javadoc. (cherry
picked from commit 3c19212)
Posted by nt...@apache.org.
IGNITE-1185 Fix javadoc.
(cherry picked from commit 3c19212)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b0dd9320
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b0dd9320
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b0dd9320
Branch: refs/heads/ignite-1108
Commit: b0dd9320f26af01a67f27842bf501049bac43665
Parents: c66a877
Author: sevdokimov <se...@gridgain.com>
Authored: Mon Aug 3 14:11:58 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Mon Aug 3 14:15:33 2015 +0300
----------------------------------------------------------------------
.../src/main/java/org/apache/ignite/internal/util/IgniteUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b0dd9320/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index ee07743..3366256 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -3321,7 +3321,7 @@ public abstract class IgniteUtils {
/**
* @param path Resource path.
- * @return Resource URL inside jar. Or {@code null}.
+ * @return Resource URL inside classpath or {@code null}.
*/
@Nullable private static URL resolveInClasspath(String path) {
ClassLoader clsLdr = Thread.currentThread().getContextClassLoader();
[30/50] incubator-ignite git commit: typo + msg format
Posted by nt...@apache.org.
typo + msg format
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/023ffe0e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/023ffe0e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/023ffe0e
Branch: refs/heads/ignite-1108
Commit: 023ffe0eee38663fe78dacd9b63d5f121226008b
Parents: 19310d3
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Aug 5 17:29:24 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Aug 5 17:29:24 2015 +0300
----------------------------------------------------------------------
.../main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/023ffe0e/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
----------------------------------------------------------------------
diff --git a/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java b/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
index 19f43e6..7ea490a 100644
--- a/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
+++ b/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
@@ -237,7 +237,7 @@ public class Log4J2Logger implements IgniteLogger, LoggerNodeIdAware {
}
}
catch (IllegalAccessException | NoSuchFieldException e) {
- error("Faild to get file name. Looks like the implementation of log4j 2 was changed.", e);
+ error("Failed to get file name (was the implementation of log4j2 changed?).", e);
}
}
}
[06/50] incubator-ignite git commit: Merge branch 'ignite-1172' into
ignite-1.3.3
Posted by nt...@apache.org.
Merge branch 'ignite-1172' into ignite-1.3.3
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/12cbe229
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/12cbe229
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/12cbe229
Branch: refs/heads/ignite-1108
Commit: 12cbe2294c9f19dfa6225c98797c9d9f3ff015b3
Parents: b0dd932 3ace82a
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Aug 3 14:49:08 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Aug 3 14:49:08 2015 +0300
----------------------------------------------------------------------
.../internal/processors/cache/GridCacheProcessor.java | 10 ++++++++--
.../ignite/internal/processors/cache/GridCacheUtils.java | 1 -
2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[28/50] incubator-ignite git commit: minor
Posted by nt...@apache.org.
minor
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c391165e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c391165e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c391165e
Branch: refs/heads/ignite-1108
Commit: c391165e6eed8b37def78663db9870f5d809da19
Parents: 44aacec
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Aug 5 15:01:00 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Aug 5 15:01:00 2015 +0300
----------------------------------------------------------------------
.../ignite/spi/discovery/tcp/TcpDiscoverySpi.java | 5 +++++
modules/log4j2/README.txt | 15 ++++++++++++++-
2 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c391165e/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index 3216166..18a540c 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -1889,6 +1889,11 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi, T
impl.brakeConnection();
}
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(TcpDiscoverySpi.class, this);
+ }
+
/**
* Socket timeout object.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c391165e/modules/log4j2/README.txt
----------------------------------------------------------------------
diff --git a/modules/log4j2/README.txt b/modules/log4j2/README.txt
index 47d01d2..6e21b7a 100644
--- a/modules/log4j2/README.txt
+++ b/modules/log4j2/README.txt
@@ -5,7 +5,20 @@ Apache Ignite Log4J2 module provides IgniteLogger implementation based on Apache
To enable Log4J2 module when starting a standalone node, move 'optional/ignite-log4j2' folder to
'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
-be added to classpath in this case.
+be added to classpath in this case. Also it is needed to configure ignite logger with Log4J2Logger
+and provide log4j2 configuration.
+
+To enable ignite logging with default configuration use:
+
+<bean class="org.apache.ignite.configuration.IgniteConfiguration">
+ ...
+ <property name="gridLogger">
+ <bean class="org.apache.ignite.logger.log4j2.Log4J2Logger">
+ <constructor-arg type="java.lang.String" value="config/ignite-log4j2.xml"/>
+ </bean>
+ </property>
+ ...
+</bean>
Importing Log4J2 Module In Maven Project
---------------------------------------
[50/50] incubator-ignite git commit: IGNITE-1108 Fixed review notes.
Posted by nt...@apache.org.
IGNITE-1108 Fixed review notes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/69cee3a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/69cee3a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/69cee3a1
Branch: refs/heads/ignite-1108
Commit: 69cee3a17f2b6b4f340f4c07fe81f729e65ef508
Parents: 45299a0
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Tue Aug 11 11:45:17 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Tue Aug 11 11:45:17 2015 +0300
----------------------------------------------------------------------
.../apache/ignite/internal/IgniteKernal.java | 9 +-
.../plugin/IgnitePluginProcessor.java | 90 +++++++++++++++++---
2 files changed, 82 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/69cee3a1/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index bf47f63..289c8a4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -790,13 +790,6 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
startProcessor(new GridServiceProcessor(ctx));
startProcessor(new DataStructuresProcessor(ctx));
- // Start plugins.
- for (PluginProvider provider : ctx.plugins().allProviders()) {
- ctx.add(new GridPluginComponent(provider));
-
- provider.start(ctx.plugins().pluginContextForProvider(provider));
- }
-
gw.writeLock();
try {
@@ -1815,6 +1808,8 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
}
}
+ ctx.plugins().onAfterStopNotify(cancel);
+
// Stops lifecycle aware components.
U.stopLifecycleAware(log, lifecycleAwares(cfg));
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/69cee3a1/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
index aa9778f..0abbf1e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
@@ -31,12 +31,15 @@ import java.lang.reflect.*;
import java.util.*;
/**
- *
+ * Plugin processor.
*/
public class IgnitePluginProcessor extends GridProcessorAdapter {
/** */
private final Map<String, PluginProvider> plugins = new LinkedHashMap<>();
+ /** Started plugins. */
+ private List<PluginProvider> startedPlugins = new LinkedList<>();
+
/** */
private final Map<PluginProvider, GridPluginContext> pluginCtxMap = new IdentityHashMap<>();
@@ -132,29 +135,96 @@ public class IgnitePluginProcessor extends GridProcessorAdapter {
/** {@inheritDoc} */
@Override public void start() throws IgniteCheckedException {
- for (Map.Entry<PluginProvider, GridPluginContext> e : pluginCtxMap.entrySet())
- e.getKey().onBeforeStart(e.getValue());
+ // Before start.
+ for (PluginProvider provider : plugins.values())
+ provider.onBeforeStart(pluginCtxMap.get(provider));
+
+ // Start plugins.
+ for (PluginProvider provider : plugins.values())
+ startPlugin(provider, pluginCtxMap.get(provider));
ackPluginsInfo();
}
+ /**
+ * @param plugin Plugin.
+ * @param pluginCtx Plugin context.
+ * @throws IgniteCheckedException If start plugin failed.
+ */
+ private void startPlugin(PluginProvider plugin, PluginContext pluginCtx) throws IgniteCheckedException {
+ try {
+ plugin.start(pluginCtx);
+
+ startedPlugins.add(plugin);
+
+ if (log.isDebugEnabled())
+ log.debug("Plugin started: " + plugin);
+ }
+ catch (IgniteCheckedException e) {
+ throw new IgniteCheckedException("Failed to start plugin: " + plugin, e);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public void onKernalStart() throws IgniteCheckedException {
+ for (PluginProvider provider : startedPlugins)
+ provider.onAfterStart();
+ }
+
/** {@inheritDoc} */
@Override public void stop(boolean cancel) throws IgniteCheckedException {
- boolean errOnStop = false;
+ for (ListIterator<PluginProvider> it = startedPlugins.listIterator(startedPlugins.size()); it.hasPrevious();) {
+ PluginProvider plugin = it.previous();
+
+ try {
+ plugin.stop(cancel);
+
+ if (log.isDebugEnabled())
+ log.debug("Plugin stopped: " + plugin);
+ }
+ catch (Throwable e) {
+ U.error(log, "Failed to stop plugin (ignoring):" + plugin, e);
+
+ if (e instanceof Error)
+ throw e;
+ }
+ }
+ }
+
+ /**
+ * Notify plugin that processors was stopped.
+ */
+ public void onAfterStopNotify(boolean cancel) {
+ for (ListIterator<PluginProvider> it = startedPlugins.listIterator(startedPlugins.size()); it.hasPrevious();) {
+ PluginProvider plugin = it.previous();
- for (PluginProvider plugin : plugins.values()) {
try {
plugin.onAfterStop(cancel);
}
- catch (Exception e) {
- errOnStop = true;
+ catch (Throwable e) {
+ U.error(log, "Failed to after-stop plugin: " + plugin, e);
- U.error(log, "Failed to invoke afterStop for plugin (ignoring): " + plugin, e);
+ if (e instanceof Error)
+ throw (Error)e;
}
}
+ }
+
+ /** {@inheritDoc} */
+ @Override public void onKernalStop(boolean cancel) {
+ for (ListIterator<PluginProvider> it = startedPlugins.listIterator(startedPlugins.size()); it.hasPrevious();) {
+ PluginProvider plugin = it.previous();
+
+ try {
+ plugin.onBeforeStop(cancel);
+ }
+ catch (Throwable e) {
+ U.error(log, "Failed to pre-stop plugin: " + plugin, e);
- if (errOnStop)
- throw new IgniteCheckedException("Failed to stop plugins.");
+ if (e instanceof Error)
+ throw (Error)e;
+ }
+ }
}
/** {@inheritDoc} */
[46/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/master'
Posted by nt...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0798e6f1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0798e6f1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0798e6f1
Branch: refs/heads/ignite-1108
Commit: 0798e6f1764aaf3e8101383b7a8ac3d7ed9b9d2c
Parents: bd770a5 cd844a7
Author: sboikov <sb...@gridgain.com>
Authored: Mon Aug 10 16:08:49 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Aug 10 16:08:49 2015 +0300
----------------------------------------------------------------------
.../configuration/IgniteConfiguration.java | 1 -
.../dht/atomic/GridDhtAtomicCache.java | 36 ++++++++++++++------
2 files changed, 26 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
[14/50] incubator-ignite git commit: ignite-1189: 3 reproducing
deadlock
Posted by nt...@apache.org.
ignite-1189: 3 reproducing deadlock
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/28c9977b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/28c9977b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/28c9977b
Branch: refs/heads/ignite-1108
Commit: 28c9977bb8344f2d73c65d45656b673a9a4c634b
Parents: 3ce3c8b
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 11:41:48 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 11:41:48 2015 +0300
----------------------------------------------------------------------
.../cache/distributed/dht/atomic/GridDhtAtomicCache.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/28c9977b/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 d6163c2..4d73fb2 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
@@ -1153,8 +1153,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
e.printStackTrace();
}
catch (Exception e) {
- if (X.hasCause(e, InterruptedException.class))
- U.error(log, "FUCK Interrupted", e);
+ U.error(log, "FUCK ERROR", e);
+
+ throw e;
}
finally {
if (locked != null)
[29/50] incubator-ignite git commit: removed unused file.
Posted by nt...@apache.org.
removed unused file.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/19310d34
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/19310d34
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/19310d34
Branch: refs/heads/ignite-1108
Commit: 19310d3468ff9ed9307fe30a5a5769829dfe4219
Parents: c391165
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Aug 5 16:35:44 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Aug 5 16:35:44 2015 +0300
----------------------------------------------------------------------
.../ignite/logger/log4j2/Log4j2FileAware.java | 35 --------------------
1 file changed, 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19310d34/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4j2FileAware.java
----------------------------------------------------------------------
diff --git a/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4j2FileAware.java b/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4j2FileAware.java
deleted file mode 100644
index c389e69..0000000
--- a/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4j2FileAware.java
+++ /dev/null
@@ -1,35 +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.logger.log4j2;
-
-import org.apache.ignite.lang.IgniteClosure;
-
-/**
- * Porting for the Log4j2, the interface is useless with the new implementation
- * of the module
- *
- * @author Gianfranco Murador
- */
-public interface Log4j2FileAware {
-
- /**
- * Sets closure that later evaluate file path.
- *
- * @param filePathClos Closure that generates actual file path.
- */
- void updateFilePath(IgniteClosure<String, String> filePathClos);
-}
[22/50] incubator-ignite git commit: master - query restart tests fix
Posted by nt...@apache.org.
master - query restart tests fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/90adeae9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/90adeae9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/90adeae9
Branch: refs/heads/ignite-1108
Commit: 90adeae9dd57f0aaaabe5f244d5167853a0b48dc
Parents: 38810b6
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue Aug 4 20:30:00 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue Aug 4 20:30:00 2015 +0300
----------------------------------------------------------------------
.../h2/twostep/GridReduceQueryExecutor.java | 34 ++++++++++++++++++--
1 file changed, 31 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90adeae9/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
index cde3288..ac269db 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
@@ -150,8 +150,7 @@ public class GridReduceQueryExecutor {
for (QueryRun r : runs.values()) {
for (GridMergeTable tbl : r.tbls) {
if (tbl.getScanIndex(null).hasSource(nodeId)) {
- // Will attempt to retry. If reduce query was started it will fail on next page fetching.
- retry(r, h2.readyTopologyVersion(), nodeId);
+ handleNodeLeft(r, nodeId);
break;
}
@@ -162,6 +161,15 @@ public class GridReduceQueryExecutor {
}
/**
+ * @param r Query run.
+ * @param nodeId Left node ID.
+ */
+ private void handleNodeLeft(QueryRun r, UUID nodeId) {
+ // Will attempt to retry. If reduce query was started it will fail on next page fetching.
+ retry(r, h2.readyTopologyVersion(), nodeId);
+ }
+
+ /**
* @param nodeId Node ID.
* @param msg Message.
*/
@@ -515,7 +523,7 @@ public class GridReduceQueryExecutor {
if (send(nodes,
new GridQueryRequest(qryReqId, r.pageSize, space, mapQrys, topVer, extraSpaces, null), partsMap)) {
- U.await(r.latch);
+ awaitAllReplies(r, nodes);
Object state = r.state.get();
@@ -595,6 +603,26 @@ public class GridReduceQueryExecutor {
}
/**
+ * @param r Query run.
+ * @param nodes Nodes to check periodically if they alive.
+ * @throws IgniteInterruptedCheckedException If interrupted.
+ */
+ private void awaitAllReplies(QueryRun r, Collection<ClusterNode> nodes)
+ throws IgniteInterruptedCheckedException {
+ while (!U.await(r.latch, 500, TimeUnit.MILLISECONDS)) {
+ for (ClusterNode node : nodes) {
+ if (!ctx.discovery().alive(node)) {
+ handleNodeLeft(r, node.id());
+
+ assert r.latch.getCount() == 0;
+
+ return;
+ }
+ }
+ }
+ }
+
+ /**
* Calculates data nodes for replicated caches on unstable topology.
*
* @param cctx Cache context for main space.
[24/50] incubator-ignite git commit: # Muted hanging test
Posted by nt...@apache.org.
# Muted hanging 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/01c3e092
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/01c3e092
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/01c3e092
Branch: refs/heads/ignite-1108
Commit: 01c3e0928fbba8d1dfa24b97d4e2506816472703
Parents: 246b94a
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Tue Aug 4 11:25:48 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Tue Aug 4 11:25:48 2015 -0700
----------------------------------------------------------------------
.../internal/processors/cache/GridCacheSwapPreloadSelfTest.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01c3e092/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
index 6176da4..f8e1bff 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
@@ -153,6 +153,8 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest {
/** @throws Exception If failed. */
private void checkSwapMultithreaded() throws Exception {
+ fail("https://issues.apache.org/jira/browse/IGNITE-614");
+
final AtomicBoolean done = new AtomicBoolean();
IgniteInternalFuture<?> fut = null;
[47/50] incubator-ignite git commit: ignite-1222
Posted by nt...@apache.org.
ignite-1222
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/fbda19d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/fbda19d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/fbda19d4
Branch: refs/heads/ignite-1108
Commit: fbda19d4b530051f0ab6784379afe66be7d44c76
Parents: cd844a7
Author: Anton Vinogradov <vi...@gmail.com>
Authored: Mon Aug 10 16:11:46 2015 +0300
Committer: Anton Vinogradov <vi...@gmail.com>
Committed: Mon Aug 10 16:11:46 2015 +0300
----------------------------------------------------------------------
.../cache/CacheStopAndDestroySelfTest.java | 87 --------------------
1 file changed, 87 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbda19d4/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
index 803789e..17f0db7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
@@ -712,93 +712,6 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
}
/**
- * Tests concurrent close.
- *
- * @throws Exception If failed.
- */
- public void testConcurrentCloseSetWithTry() throws Exception {
- final AtomicInteger a1 = new AtomicInteger();
- final AtomicInteger a2 = new AtomicInteger();
- final AtomicInteger a3 = new AtomicInteger();
- final AtomicInteger a4 = new AtomicInteger();
-
- Thread t1 = new Thread(new Runnable() {
- @Override public void run() {
- Thread.currentThread().setName("test-thread-1");
-
- closeWithTry(a1, 0);
- }
- });
- Thread t2 = new Thread(new Runnable() {
- @Override public void run() {
- Thread.currentThread().setName("test-thread-2");
-
- closeWithTry(a2, 0);
- }
- });
- Thread t3 = new Thread(new Runnable() {
- @Override public void run() {
- Thread.currentThread().setName("test-thread-3");
-
- closeWithTry(a3, 2);
- }
- });
- Thread t4 = new Thread(new Runnable() {
- @Override public void run() {
- Thread.currentThread().setName("test-thread-4");
-
- closeWithTry(a4, 2);
- }
- });
-
- IgniteCache<Object, Object> cache = grid(0).getOrCreateCache(getDhtConfig());
-
- cache.close();
-
- t1.start();
- t2.start();
- t3.start();
- t4.start();
-
- try {
- U.sleep(1000);
- }
- finally {
- stop = true;
- }
-
- t1.join();
- t2.join();
- t3.join();
- t4.join();
-
- assert a1.get() > 1;
- assert a2.get() > 1;
- assert a3.get() > 1;
- assert a4.get() > 1;
-
- checkUsageFails(cache);
- }
-
- /**
- * @param a AtomicInteger.
- * @param node Node.
- */
- public void closeWithTry(AtomicInteger a, int node) {
- while (!stop) {
- try (IgniteCache<String, String> cache = grid(node).getOrCreateCache(getDhtConfig())) {
- a.incrementAndGet();
-
- assert cache.get(KEY_VAL) == null || cache.get(KEY_VAL).equals(KEY_VAL);
-
- cache.put(KEY_VAL, KEY_VAL);
-
- assert cache.get(KEY_VAL).equals(KEY_VAL);
- }
- }
- }
-
- /**
* Tests start -> destroy -> start -> close using CacheManager.
*/
public void testTckStyleCreateDestroyClose() {
[49/50] incubator-ignite git commit: Merge branch 'master' into
ignite-1108
Posted by nt...@apache.org.
Merge branch 'master' into ignite-1108
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/45299a0c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/45299a0c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/45299a0c
Branch: refs/heads/ignite-1108
Commit: 45299a0cad1fb16b999ef709e26a9f0bad4dae65
Parents: eaf9c31 19fb305
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Aug 10 17:00:24 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Aug 10 17:00:24 2015 +0300
----------------------------------------------------------------------
assembly/release-hadoop.xml | 5 +
.../ClientAbstractMultiNodeSelfTest.java | 4 +-
.../JettyRestProcessorAbstractSelfTest.java | 14 +-
.../apache/ignite/IgniteSystemProperties.java | 2 +-
.../store/jdbc/CacheAbstractJdbcStore.java | 21 +-
.../configuration/IgniteConfiguration.java | 1 -
.../apache/ignite/internal/IgniteKernal.java | 2 +-
.../org/apache/ignite/internal/IgnitionEx.java | 43 +-
.../managers/communication/GridIoManager.java | 188 +++++++-
.../processors/cache/GridCacheMvccManager.java | 73 +--
.../GridCachePartitionExchangeManager.java | 16 +-
.../processors/cache/GridCacheProcessor.java | 12 +-
.../processors/cache/GridCacheProxyImpl.java | 42 +-
.../processors/cache/GridCacheSwapManager.java | 2 +-
.../processors/cache/GridCacheUtils.java | 1 -
.../dht/atomic/GridDhtAtomicCache.java | 36 +-
.../GridDhtPartitionsExchangeFuture.java | 20 +-
.../distributed/near/GridNearGetFuture.java | 20 +-
.../cache/query/GridCacheSqlQuery.java | 33 +-
.../cache/query/GridCacheTwoStepQuery.java | 34 +-
.../handlers/query/QueryCommandHandler.java | 6 +-
.../ignite/internal/util/GridLogThrottle.java | 63 ++-
.../ignite/internal/util/IgniteUtils.java | 16 +
.../util/nio/GridCommunicationClient.java | 5 +-
.../util/nio/GridNioFinishedFuture.java | 12 +
.../ignite/internal/util/nio/GridNioFuture.java | 14 +
.../internal/util/nio/GridNioFutureImpl.java | 15 +
.../util/nio/GridNioRecoveryDescriptor.java | 13 +-
.../ignite/internal/util/nio/GridNioServer.java | 5 +
.../util/nio/GridNioSessionMetaKey.java | 5 +-
.../util/nio/GridShmemCommunicationClient.java | 7 +-
.../util/nio/GridTcpNioCommunicationClient.java | 14 +-
.../communication/tcp/TcpCommunicationSpi.java | 84 +++-
.../ignite/spi/discovery/tcp/ClientImpl.java | 29 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 50 +-
.../spi/discovery/tcp/TcpDiscoveryImpl.java | 15 +
.../spi/discovery/tcp/TcpDiscoverySpi.java | 7 +-
.../TcpDiscoveryMulticastIpFinder.java | 7 +-
.../src/test/config/io-manager-benchmark.xml | 3 +-
.../GridJobMasterLeaveAwareSelfTest.java | 10 +-
.../IgniteClientReconnectAbstractTest.java | 5 +-
.../IgniteClientReconnectCacheTest.java | 5 +-
.../GridDeploymentMessageCountSelfTest.java | 5 +-
.../cache/CacheStopAndDestroySelfTest.java | 95 +---
.../GridCacheAtomicMessageCountSelfTest.java | 6 +-
.../processors/cache/GridCacheMvccSelfTest.java | 1 -
...ridCacheReplicatedSynchronousCommitTest.java | 5 +-
.../cache/GridCacheSwapPreloadSelfTest.java | 2 +
.../IgniteCacheAbstractStopBusySelfTest.java | 6 +-
.../cache/IgniteCacheNearLockValueSelfTest.java | 6 +-
...eDynamicCacheStartNoExchangeTimeoutTest.java | 4 +-
.../cache/IgniteTxReentryAbstractSelfTest.java | 5 +-
...niteCacheClientNodeChangingTopologyTest.java | 6 +-
...teCacheClientNodePartitionsExchangeTest.java | 4 +-
.../IgniteCacheNearOffheapGetSelfTest.java | 131 ++++++
...xOriginatingNodeFailureAbstractSelfTest.java | 6 +-
...cOriginatingNodeFailureAbstractSelfTest.java | 6 +-
.../GridCacheDhtPreloadMessageCountTest.java | 5 +-
...ePrimaryNodeFailureRecoveryAbstractTest.java | 6 +-
...eAtomicInvalidPartitionHandlingSelfTest.java | 5 +-
.../near/IgniteCacheNearTxRollbackTest.java | 6 +-
.../GridCacheReplicatedInvalidateSelfTest.java | 6 +-
...CommunicationRecoveryAckClosureSelfTest.java | 464 +++++++++++++++++++
.../tcp/TcpDiscoveryMultiThreadedTest.java | 8 +-
.../testsuites/IgniteCacheTestSuite2.java | 1 +
.../IgniteSpiCommunicationSelfTestSuite.java | 1 +
.../ignite/util/TestTcpCommunicationSpi.java | 6 +-
.../processors/query/h2/IgniteH2Indexing.java | 27 +-
.../processors/query/h2/sql/GridSqlElement.java | 18 +-
.../query/h2/sql/GridSqlFunction.java | 17 +-
.../processors/query/h2/sql/GridSqlQuery.java | 4 +-
.../query/h2/sql/GridSqlQueryParser.java | 94 ++--
.../query/h2/sql/GridSqlQuerySplitter.java | 117 +++--
.../processors/query/h2/sql/GridSqlSelect.java | 76 +--
.../processors/query/h2/sql/GridSqlType.java | 24 +-
.../processors/query/h2/sql/GridSqlUnion.java | 2 +-
.../query/h2/twostep/GridMapQueryExecutor.java | 7 +-
.../query/h2/twostep/GridMergeIndex.java | 7 +
.../h2/twostep/GridMergeIndexUnsorted.java | 17 +-
.../query/h2/twostep/GridMergeTable.java | 52 +--
.../h2/twostep/GridReduceQueryExecutor.java | 280 +++++------
.../query/h2/twostep/GridThreadLocalTable.java | 262 +++++++++++
...CacheScanPartitionQueryFallbackSelfTest.java | 15 +-
...idCacheReduceQueryMultithreadedSelfTest.java | 21 +-
.../IgniteCacheAbstractFieldsQuerySelfTest.java | 2 +-
modules/log4j2/README.txt | 15 +-
.../ignite/logger/log4j2/Log4J2Logger.java | 2 +-
.../ignite/logger/log4j2/Log4j2FileAware.java | 35 --
.../http/jetty/GridJettyRestHandler.java | 12 +-
.../parser/dialect/OracleMetadataDialect.java | 4 +-
.../org/apache/ignite/spark/IgniteContext.scala | 19 +-
.../src/test/java/config/ignite-test-config.xml | 43 ++
.../ignite/internal/GridFactorySelfTest.java | 9 +
.../visor/commands/kill/VisorKillCommand.scala | 2 +-
.../config/benchmark-multicast.properties | 1 +
.../yardstick/config/benchmark-query.properties | 3 +-
modules/yardstick/config/ignite-base-config.xml | 2 -
.../yardstick/IgniteBenchmarkArguments.java | 11 +
.../cache/IgniteJdbcSqlQueryBenchmark.java | 134 ++++++
parent/pom.xml | 97 ++--
scripts/git-apply-patch.sh | 94 ----
scripts/git-patch-functions.sh | 56 +--
102 files changed, 2335 insertions(+), 1001 deletions(-)
----------------------------------------------------------------------
[20/50] incubator-ignite git commit: master - test fix
Posted by nt...@apache.org.
master - test fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e1f01529
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e1f01529
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e1f01529
Branch: refs/heads/ignite-1108
Commit: e1f01529fa9d19641cb276551375cd8bd739da6d
Parents: b056a73
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue Aug 4 17:51:40 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue Aug 4 17:51:40 2015 +0300
----------------------------------------------------------------------
...idCacheReduceQueryMultithreadedSelfTest.java | 21 +++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e1f01529/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
index c3290a6..f890dee 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
@@ -21,6 +21,9 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.*;
import org.apache.ignite.internal.processors.cache.query.*;
import org.apache.ignite.internal.util.typedef.*;
+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 java.util.*;
import java.util.concurrent.*;
@@ -39,6 +42,9 @@ public class GridCacheReduceQueryMultithreadedSelfTest extends GridCacheAbstract
/** */
private static final int TEST_TIMEOUT = 2 * 60 * 1000;
+ /** */
+ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+
/** {@inheritDoc} */
@Override protected int gridCount() {
return GRID_CNT;
@@ -50,8 +56,21 @@ public class GridCacheReduceQueryMultithreadedSelfTest extends GridCacheAbstract
}
/** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+ disco.setIpFinder(ipFinder);
+
+ cfg.setDiscoverySpi(disco);
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
@Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception {
- CacheConfiguration cfg = super.cacheConfiguration(gridName);
+ CacheConfiguration<?,?> cfg = super.cacheConfiguration(gridName);
cfg.setCacheMode(PARTITIONED);
cfg.setBackups(1);
[35/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/master'
Posted by nt...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b0315250
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b0315250
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b0315250
Branch: refs/heads/ignite-1108
Commit: b03152504cb5d8da0d57b3a712cadd9a4aea4a83
Parents: 33e174b 5ce8bc6
Author: Anton Vinogradov <vi...@gmail.com>
Authored: Thu Aug 6 13:05:43 2015 +0300
Committer: Anton Vinogradov <vi...@gmail.com>
Committed: Thu Aug 6 13:05:43 2015 +0300
----------------------------------------------------------------------
.../ignite/spi/discovery/tcp/ClientImpl.java | 28 +++++++++++++++-----
1 file changed, 21 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
[25/50] incubator-ignite git commit: master - minor refactoring
Posted by nt...@apache.org.
master - minor refactoring
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b683b8f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b683b8f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b683b8f8
Branch: refs/heads/ignite-1108
Commit: b683b8f80b59696933d52ad2c79321b374e4e6b4
Parents: 246b94a
Author: S.Vladykin <sv...@gridgain.com>
Authored: Wed Aug 5 00:27:18 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Wed Aug 5 00:27:18 2015 +0300
----------------------------------------------------------------------
.../query/h2/twostep/GridMergeIndexUnsorted.java | 8 +-------
.../processors/query/h2/twostep/GridMergeTable.java | 13 +++++++------
2 files changed, 8 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b683b8f8/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
index 276d25b..61aaa80 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
@@ -75,13 +75,7 @@ public class GridMergeIndexUnsorted extends GridMergeIndex {
if (page != null)
break;
- UUID nodeId = ((GridMergeTable)table).checkSourceNodesAlive();
-
- if (nodeId != null) {
- fail(nodeId);
-
- assert !queue.isEmpty();
- }
+ ((GridMergeTable)table).checkSourceNodesAlive();
}
if (page.isLast())
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b683b8f8/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
index fd9eec3..0b335d3 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
@@ -54,15 +54,16 @@ public class GridMergeTable extends TableBase {
}
/**
- * @return Failed node or {@code null} if all alive.
+ * Fails merge table if any source node is left.
*/
- public UUID checkSourceNodesAlive() {
+ public void checkSourceNodesAlive() {
for (UUID nodeId : idx.sources()) {
- if (!ctx.discovery().alive(nodeId))
- return nodeId;
- }
+ if (!ctx.discovery().alive(nodeId)) {
+ idx.fail(nodeId);
- return null;
+ return;
+ }
+ }
}
/** {@inheritDoc} */
[19/50] incubator-ignite git commit: Added benchmarks for jdbc.
Posted by nt...@apache.org.
Added benchmarks for jdbc.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/52c1dfa3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/52c1dfa3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/52c1dfa3
Branch: refs/heads/ignite-1108
Commit: 52c1dfa32d86183c07c82bb3c34a03316d6fd7b5
Parents: b056a73
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Tue Aug 4 17:51:05 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Tue Aug 4 17:51:05 2015 +0300
----------------------------------------------------------------------
.../yardstick/config/benchmark-query.properties | 3 +-
modules/yardstick/config/ignite-base-config.xml | 2 -
.../yardstick/IgniteBenchmarkArguments.java | 11 ++
.../cache/IgniteJdbcSqlQueryBenchmark.java | 134 +++++++++++++++++++
4 files changed, 147 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52c1dfa3/modules/yardstick/config/benchmark-query.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-query.properties b/modules/yardstick/config/benchmark-query.properties
index d6a8b9e..1a75926 100644
--- a/modules/yardstick/config/benchmark-query.properties
+++ b/modules/yardstick/config/benchmark-query.properties
@@ -63,5 +63,6 @@ CONFIGS="\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryJoinBenchmark -sn IgniteNode -ds sql-query-join-1-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryJoinOffHeapBenchmark -sn IgniteNode -ds sql-query-join-offheap-1-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryPutBenchmark -sn IgniteNode -ds sql-query-put-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds sql-query-put-offheap-1-backup\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds sql-query-put-offheap-1-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -jdbc jdbc:ignite://127.0.0.1/query -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcSqlQueryBenchmark -sn IgniteNode -ds sql-query-jdbc-1-backup\
"
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52c1dfa3/modules/yardstick/config/ignite-base-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-base-config.xml b/modules/yardstick/config/ignite-base-config.xml
index b2c976a..c77cc9a 100644
--- a/modules/yardstick/config/ignite-base-config.xml
+++ b/modules/yardstick/config/ignite-base-config.xml
@@ -180,8 +180,6 @@
</list>
</property>
- <property name="connectorConfiguration"><null/></property>
-
<property name="includeEventTypes">
<list/>
</property>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52c1dfa3/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
index 1562b26..5eb7060 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
@@ -106,6 +106,17 @@ public class IgniteBenchmarkArguments {
@Parameter(names = {"-col", "--collocated"}, description = "Collocated")
private boolean collocated;
+ /** */
+ @Parameter(names = {"-jdbc", "--jdbcUrl"}, description = "JDBC url")
+ private String jdbcUrl;
+
+ /**
+ * @return JDBC url.
+ */
+ public String jdbcUrl() {
+ return jdbcUrl;
+ }
+
/**
* @return Transaction concurrency.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52c1dfa3/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteJdbcSqlQueryBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteJdbcSqlQueryBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteJdbcSqlQueryBenchmark.java
new file mode 100644
index 0000000..0ded2bd
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteJdbcSqlQueryBenchmark.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.yardstick.cache;
+
+import org.apache.ignite.*;
+import org.apache.ignite.yardstick.cache.model.Person;
+import org.yardstickframework.BenchmarkConfiguration;
+
+import javax.cache.Cache;
+import java.sql.*;
+import java.util.*;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.ThreadLocalRandom;
+
+import static org.yardstickframework.BenchmarkUtils.println;
+
+/**
+ * Ignite benchmark that performs query operations.
+ */
+public class IgniteJdbcSqlQueryBenchmark extends IgniteCacheAbstractBenchmark {
+ /** Statements for closing. */
+ Set<PreparedStatement> stms = Collections.synchronizedSet(new HashSet<PreparedStatement>());
+
+ /** {@inheritDoc} */
+ @Override public void setUp(BenchmarkConfiguration cfg) throws Exception {
+ super.setUp(cfg);
+
+ println(cfg, "Populating query data...");
+
+ long start = System.nanoTime();
+
+ try (IgniteDataStreamer<Integer, Person> dataLdr = ignite().dataStreamer(cache.getName())) {
+ for (int i = 0; i < args.range() && !Thread.currentThread().isInterrupted(); i++) {
+ dataLdr.addData(i, new Person(i, "firstName" + i, "lastName" + i, i * 1000));
+
+ if (i % 100000 == 0)
+ println(cfg, "Populated persons: " + i);
+ }
+ }
+
+ println(cfg, "Finished populating query data in " + ((System.nanoTime() - start) / 1_000_000) + " ms.");
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ PreparedStatement stm = (PreparedStatement)ctx.get(0);
+
+ if (stm == null) {
+ stm = createStatement();
+
+ stms.add(stm);
+
+ ctx.put(0, stm);
+ }
+
+ double salary = ThreadLocalRandom.current().nextDouble() * args.range() * 1000;
+
+ double maxSalary = salary + 1000;
+
+ stm.clearParameters();
+
+ stm.setDouble(1, salary);
+ stm.setDouble(2, maxSalary);
+
+ ResultSet rs = stm.executeQuery();
+
+ while (rs.next()) {
+ double sal = rs.getDouble("salary");
+
+ if (sal < salary || sal > maxSalary)
+ throw new Exception("Invalid person retrieved [min=" + salary + ", max=" + maxSalary + ']');
+ }
+
+ return true;
+ }
+
+ /** {@inheritDoc} */
+ @Override public void tearDown() throws Exception {
+ for (PreparedStatement stm : stms) {
+ try {
+ stm.getConnection().close();
+
+ stm.close();
+ }
+ catch (Exception ignore) {
+ println("Failed to close connection." + stm);
+ }
+ }
+
+ super.tearDown();
+ }
+
+ /**
+ * @return Prepared statement.
+ * @throws Exception
+ */
+ private PreparedStatement createStatement() throws Exception {
+ Class.forName("org.apache.ignite.IgniteJdbcDriver");
+
+ Connection conn = null;
+
+ try {
+ conn = DriverManager.getConnection(args.jdbcUrl());
+
+ return conn.prepareStatement("select * from Person where salary >= ? and salary <= ?");
+ }
+ catch (Exception e) {
+ if (conn != null)
+ conn.close();
+
+ throw new IgniteException("Failed to create prepare statement.", e);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteCache<Integer, Object> cache() {
+ return ignite().cache("query");
+ }
+}
[48/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/master'
Posted by nt...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/19fb305d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/19fb305d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/19fb305d
Branch: refs/heads/ignite-1108
Commit: 19fb305d5ceff430911d8dc25685686f6446ea21
Parents: fbda19d 0798e6f
Author: Anton Vinogradov <vi...@gmail.com>
Authored: Mon Aug 10 16:12:53 2015 +0300
Committer: Anton Vinogradov <vi...@gmail.com>
Committed: Mon Aug 10 16:12:53 2015 +0300
----------------------------------------------------------------------
.../cache/GridCachePartitionExchangeManager.java | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------