ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [25/25] incubator-ignite git commit: IGNITE-389 - Fixing tests.
Date Wed, 10 Jun 2015 20:22:53 GMT
IGNITE-389 - Fixing tests.


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

Branch: refs/heads/ignite-389
Commit: 71f29e98e2ea571e437206a3712b7261e086e1db
Parents: 3417215
Author: Alexey Goncharuk <agoncharuk@gridgain.com>
Authored: Wed Jun 10 13:22:15 2015 -0700
Committer: Alexey Goncharuk <agoncharuk@gridgain.com>
Committed: Wed Jun 10 13:22:15 2015 -0700

----------------------------------------------------------------------
 .../ignite/internal/processors/query/GridQueryIndexing.java   | 4 +++-
 .../ignite/internal/processors/query/GridQueryProcessor.java  | 7 +++++--
 .../ignite/internal/processors/query/h2/IgniteH2Indexing.java | 7 ++++---
 .../processors/query/h2/twostep/GridReduceQueryExecutor.java  | 4 ++--
 4 files changed, 14 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/71f29e98/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
index cc0916a..7fcc284 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
@@ -58,9 +58,11 @@ public interface GridQueryIndexing {
      *
      * @param cctx Cache context.
      * @param qry Query.
+     * @param keepCacheObjects If {@code true}, cache objects representation will be preserved.
      * @return Cursor.
      */
-    public Iterable<List<?>> queryTwoStep(GridCacheContext<?,?> cctx, GridCacheTwoStepQuery
qry);
+    public Iterable<List<?>> queryTwoStep(GridCacheContext<?,?> cctx, GridCacheTwoStepQuery
qry,
+        boolean keepCacheObjects);
 
     /**
      * Parses SQL query into two step query and executes it.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/71f29e98/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 1be2a36..e187713 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -546,9 +546,12 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             throw new IllegalStateException("Failed to execute query (grid is stopping).");
 
         try {
+            GridCacheContext<Object, Object> cacheCtx = ctx.cache().internalCache(space).context();
+
             return idx.queryTwoStep(
-                ctx.cache().internalCache(space).context(),
-                qry);
+                cacheCtx,
+                qry,
+                cacheCtx.keepPortable());
         }
         finally {
             busyLock.leaveBusy();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/71f29e98/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 6ec329f..5e27c24 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
@@ -771,10 +771,11 @@ public class IgniteH2Indexing implements GridQueryIndexing {
     }
 
     /** {@inheritDoc} */
-    @Override public Iterable<List<?>> queryTwoStep(final GridCacheContext<?,?>
cctx, final GridCacheTwoStepQuery qry) {
+    @Override public Iterable<List<?>> queryTwoStep(final GridCacheContext<?,?>
cctx, final GridCacheTwoStepQuery qry,
+        final boolean keepCacheObj) {
         return new Iterable<List<?>>() {
             @Override public Iterator<List<?>> iterator() {
-                return rdcQryExec.query(cctx, qry);
+                return rdcQryExec.query(cctx, qry, keepCacheObj);
             }
         };
     }
@@ -872,7 +873,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
 
         twoStepQry.pageSize(qry.getPageSize());
 
-        QueryCursorImpl<List<?>> cursor = new QueryCursorImpl<>(queryTwoStep(cctx,
twoStepQry));
+        QueryCursorImpl<List<?>> cursor = new QueryCursorImpl<>(queryTwoStep(cctx,
twoStepQry, cctx.keepPortable()));
 
         cursor.fieldsMeta(meta);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/71f29e98/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 cfacfcf..11054b7 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
@@ -269,7 +269,7 @@ public class GridReduceQueryExecutor {
      * @param qry Query.
      * @return Cursor.
      */
-    public Iterator<List<?>> query(GridCacheContext<?,?> cctx, GridCacheTwoStepQuery
qry) {
+    public Iterator<List<?>> query(GridCacheContext<?,?> cctx, GridCacheTwoStepQuery
qry, boolean keepPortable) {
         long qryReqId = reqIdGen.incrementAndGet();
 
         QueryRun r = new QueryRun();
@@ -356,7 +356,7 @@ public class GridReduceQueryExecutor {
 //                dropTable(r.conn, tbl.getName()); TODO
             }
 
-            return new GridQueryCacheObjectsIterator(new Iter(res), cctx, cctx.keepPortable());
+            return new GridQueryCacheObjectsIterator(new Iter(res), cctx, keepPortable);
         }
         catch (IgniteCheckedException | InterruptedException | RuntimeException e) {
             U.closeQuiet(r.conn);


Mime
View raw message