ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [11/51] [abbrv] incubator-ignite git commit: # ignite-53 fail query is there are no data nodes
Date Sat, 24 Jan 2015 11:33:48 GMT
# ignite-53 fail query is there are no data nodes


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

Branch: refs/heads/ignite-65
Commit: ae4cbca3286fcfe1c3fd91d1241d9b143cb29ef6
Parents: c927f68
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Jan 16 12:06:48 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Jan 16 12:06:48 2015 +0300

----------------------------------------------------------------------
 .../kernal/processors/cache/query/GridCacheQueryAdapter.java     | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae4cbca3/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java
index ab27191..65e5cd2 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java
@@ -24,6 +24,7 @@ import org.apache.ignite.plugin.security.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.query.*;
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.util.future.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
@@ -419,6 +420,9 @@ public class GridCacheQueryAdapter<T> implements GridCacheQuery<T>
{
 
         cctx.checkSecurity(GridSecurityPermission.CACHE_READ);
 
+        if (nodes.isEmpty())
+            return new GridCacheQueryErrorFuture<>(cctx.kernalContext(), new ClusterGroupEmptyException());
+
         if (log.isDebugEnabled())
             log.debug("Executing query [query=" + this + ", nodes=" + nodes + ']');
 


Mime
View raw message