ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [07/50] [abbrv] incubator-ignite git commit: ignite-sql-tests - fixes
Date Wed, 18 Mar 2015 04:45:00 GMT
ignite-sql-tests - fixes


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2933a78c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2933a78c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2933a78c

Branch: refs/heads/ignite-496
Commit: 2933a78cd07ddbbc28e0a6feb2b0242acc90d97a
Parents: cef2130
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Fri Mar 13 04:00:03 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Fri Mar 13 04:00:03 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/IgniteCacheProxy.java |  9 +++++++--
 .../processors/query/h2/IgniteH2Indexing.java       |  3 ++-
 .../query/h2/twostep/GridReduceQueryExecutor.java   | 16 ++++++++++------
 modules/yardstick/pom.xml                           |  8 ++++++--
 4 files changed, 25 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2933a78c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index e3e9755..793ec87 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -298,8 +298,13 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
 
             fut = qry.execute(((SpiQuery)filter).getArgs());
         }
-        else
-            throw new IgniteException("Unsupported query predicate: " + filter);
+        else {
+            if (filter instanceof SqlFieldsQuery)
+                throw new CacheException("Use methods 'queryFields' and 'localQueryFields'
for " +
+                    SqlFieldsQuery.class.getSimpleName() + ".");
+
+            throw new CacheException("Unsupported query type: " + filter);
+        }
 
         return new QueryCursorImpl<>(new GridCloseableIteratorAdapter<Entry<K,V>>()
{
             /** */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2933a78c/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 b210f4d..1080fa1 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
@@ -1249,7 +1249,8 @@ public class IgniteH2Indexing implements GridQueryIndexing {
     public void registerCache(CacheConfiguration<?,?> ccfg) throws IgniteCheckedException
{
         String schema = schema(ccfg.getName());
 
-        if (schemas.putIfAbsent(schema, new Schema(ccfg.getName(), ccfg.getOffHeapMaxMemory()
>= 0 ?
+        if (schemas.putIfAbsent(schema, new Schema(ccfg.getName(),
+            ccfg.getOffHeapMaxMemory() >= 0 || ccfg.getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED
?
             new GridUnsafeMemory(0) : null, ccfg)) != null)
             throw new IgniteCheckedException("Cache already registered: " + ccfg.getName());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2933a78c/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 642a5ba..d1d8faa 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
@@ -280,14 +280,18 @@ public class GridReduceQueryExecutor implements GridMessageListener
{
     private void send(Collection<ClusterNode> nodes, Message msg) throws IgniteCheckedException
{
         for (ClusterNode node : nodes) {
             if (node.isLocal()) {
-                ArrayList<ClusterNode> remotes = new ArrayList<>(nodes.size()
- 1);
+                if (nodes.size() > 1) {
+                    ArrayList<ClusterNode> remotes = new ArrayList<>(nodes.size()
- 1);
 
-                for (ClusterNode node0 : nodes) {
-                    if (node0 != node)
-                        remotes.add(node0);
-                }
+                    for (ClusterNode node0 : nodes) {
+                        if (!node0.isLocal())
+                            remotes.add(node0);
+                    }
+
+                    assert remotes.size() == nodes.size() - 1;
 
-                ctx.io().send(remotes, GridTopic.TOPIC_QUERY, msg, GridIoPolicy.PUBLIC_POOL);
+                    ctx.io().send(remotes, GridTopic.TOPIC_QUERY, msg, GridIoPolicy.PUBLIC_POOL);
+                }
 
                 // Local node goes the last to allow parallel execution.
                 h2.mapQueryExecutor().onMessage(ctx.localNodeId(), msg);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2933a78c/modules/yardstick/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/pom.xml b/modules/yardstick/pom.xml
index 15b8f10..87ecb61 100644
--- a/modules/yardstick/pom.xml
+++ b/modules/yardstick/pom.xml
@@ -51,14 +51,12 @@
             <groupId>org.apache.ignite</groupId>
             <artifactId>ignite-spring</artifactId>
             <version>${ignite.version}</version>
-            <scope>test</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.ignite</groupId>
             <artifactId>ignite-indexing</artifactId>
             <version>${ignite.version}</version>
-            <scope>test</scope>
         </dependency>
 
         <dependency>
@@ -96,6 +94,12 @@
             <artifactId>spring-expression</artifactId>
             <version>${spring.version}</version>
         </dependency>
+
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-aop</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
     </dependencies>
 
     <build>


Mime
View raw message