ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [19/50] ignite git commit: Removed unused argument.
Date Mon, 14 Aug 2017 10:30:29 GMT
Removed unused argument.


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

Branch: refs/heads/ignite-5991-6019
Commit: c7c122aee8c379ed0f0240e1bde34c345ce6d14a
Parents: 9dc947d
Author: devozerov <vozerov@gridgain.com>
Authored: Thu Aug 10 17:25:16 2017 +0300
Committer: devozerov <vozerov@gridgain.com>
Committed: Thu Aug 10 17:25:16 2017 +0300

----------------------------------------------------------------------
 .../query/h2/twostep/GridMapQueryExecutor.java  | 77 ++++++++++++--------
 .../h2/twostep/msg/GridH2QueryRequest.java      |  4 +
 2 files changed, 51 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c7c122ae/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
index dbbf59c..f77c66f 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
@@ -438,31 +438,51 @@ public class GridMapQueryExecutor {
 
             final int segment = i;
 
-            ctx.closure().callLocal(
-                new Callable<Void>() {
-                    @Override public Void call() throws Exception {
-                        onQueryRequest0(node,
-                            req.requestId(),
-                            segment,
-                            req.schemaName(),
-                            req.queries(),
-                            cacheIds,
-                            req.topologyVersion(),
-                            partsMap,
-                            parts,
-                            req.tables(),
-                            req.pageSize(),
-                            joinMode,
-                            enforceJoinOrder,
-                            false,
-                            req.timeout(),
-                            params,
-                            lazy);
-
-                        return null;
+            if (lazy) {
+                onQueryRequest0(node,
+                    req.requestId(),
+                    0,
+                    req.schemaName(),
+                    req.queries(),
+                    cacheIds,
+                    req.topologyVersion(),
+                    partsMap,
+                    parts,
+                    req.pageSize(),
+                    joinMode,
+                    enforceJoinOrder,
+                    false, // Replicated is always false here (see condition above).
+                    req.timeout(),
+                    params,
+                    true); // Lazy = true.
+            }
+            else {
+                ctx.closure().callLocal(
+                    new Callable<Void>() {
+                        @Override
+                        public Void call() throws Exception {
+                            onQueryRequest0(node,
+                                req.requestId(),
+                                segment,
+                                req.schemaName(),
+                                req.queries(),
+                                cacheIds,
+                                req.topologyVersion(),
+                                partsMap,
+                                parts,
+                                req.pageSize(),
+                                joinMode,
+                                enforceJoinOrder,
+                                false,
+                                req.timeout(),
+                                params,
+                                false); // Lazy = false.
+
+                            return null;
+                        }
                     }
-                }
-                , QUERY_POOL);
+                    , QUERY_POOL);
+            }
         }
 
         onQueryRequest0(node,
@@ -474,7 +494,6 @@ public class GridMapQueryExecutor {
             req.topologyVersion(),
             partsMap,
             parts,
-            req.tables(),
             req.pageSize(),
             joinMode,
             enforceJoinOrder,
@@ -494,10 +513,9 @@ public class GridMapQueryExecutor {
      * @param topVer Topology version.
      * @param partsMap Partitions map for unstable topology.
      * @param parts Explicit partitions for current node.
-     * @param tbls Tables.
      * @param pageSize Page size.
      * @param distributedJoinMode Query distributed join mode.
-     * @param streaming Streaming flag.
+     * @param lazy Streaming flag.
      */
     private void onQueryRequest0(
         ClusterNode node,
@@ -509,14 +527,13 @@ public class GridMapQueryExecutor {
         AffinityTopologyVersion topVer,
         Map<UUID, int[]> partsMap,
         int[] parts,
-        Collection<QueryTable> tbls,
         int pageSize,
         DistributedJoinMode distributedJoinMode,
         boolean enforceJoinOrder,
         boolean replicated,
         int timeout,
         Object[] params,
-        boolean streaming
+        boolean lazy
     ) {
         // Prepare to run queries.
         GridCacheContext<?, ?> mainCctx =
@@ -575,7 +592,7 @@ public class GridMapQueryExecutor {
                 }
 
                 // Run queries.
-                if (streaming) {
+                if (lazy) {
                     GridCacheSqlQuery qry = qrys.iterator().next();
 
                     h2.executeSqlStreaming(conn, qry.query(), F.asList(qry.parameters(params)));

http://git-wip-us.apache.org/repos/asf/ignite/blob/c7c122ae/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
index 94a3cc1..4e1fadb 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
@@ -190,6 +190,10 @@ public class GridH2QueryRequest implements Message, GridCacheQueryMarshallable
{
     }
 
     /**
+     * Get tables.
+     * <p>
+     * N.B.: Was used in AI 1.9 for snapshots. Unused at the moment, but should be kept for
compatibility reasons.
+     *
      * @return Tables.
      */
     public Collection<QueryTable> tables() {


Mime
View raw message