ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [5/6] incubator-ignite git commit: #ignite-758: remove createSqlFieldsQuery and createFullTextQuery from CacheQueries.
Date Thu, 16 Apr 2015 20:28:52 GMT
#ignite-758: remove createSqlFieldsQuery and createFullTextQuery from CacheQueries.


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

Branch: refs/heads/ignite-758
Commit: 34b5b51b719ad9b7e694a38cd6dd50a5646af37b
Parents: 4b1789d
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Thu Apr 16 23:23:09 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Thu Apr 16 23:23:09 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheProxy.java      |  3 +-
 .../processors/cache/query/CacheQueries.java    | 27 --------
 .../cache/query/CacheQueriesImpl.java           | 40 ------------
 .../cache/query/GridCacheQueryManager.java      | 66 ++++++++++++++++++++
 ...CacheFullTextQueryMultithreadedSelfTest.java |  4 +-
 .../GridCacheAbstractFieldsQuerySelfTest.java   | 47 +++++++-------
 ...idCacheReduceQueryMultithreadedSelfTest.java |  3 +-
 ...GridCachePartitionedFieldsQuerySelfTest.java |  4 +-
 .../GridCacheReplicatedFieldsQuerySelfTest.java |  8 +--
 ...dCacheAbstractReduceFieldsQuerySelfTest.java |  9 +--
 ...cheReduceFieldsQueryPartitionedSelfTest.java |  4 +-
 11 files changed, 110 insertions(+), 105 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34b5b51b/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 b3512b3..e5add1d 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
@@ -331,7 +331,8 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
         else if (filter instanceof TextQuery) {
             TextQuery p = (TextQuery)filter;
 
-            qry = delegate.queries().createFullTextQuery(p.getType(), p.getText());
+            qry = ctx.queries().createFullTextQuery(p.getType(), p.getText(),
+                    prjCtx != null ? prjCtx.isKeepPortable() : false);
 
             if (grp != null)
                 qry.projection(grp);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34b5b51b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
index e99f31c..0fe373a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
@@ -26,31 +26,4 @@ import java.util.*;
  * Internal queries interface.
  */
 public interface CacheQueries<K, V> {
-    /**
-     * Creates user's SQL fields query for given clause. For more information refer to
-     * {@link CacheQuery} documentation.
-     *
-     * @param qry Query.
-     * @return Created query.
-     */
-    public CacheQuery<List<?>> createSqlFieldsQuery(String qry);
-
-    /**
-     * Creates user's full text query, queried class, and query clause.
-     * For more information refer to {@link CacheQuery} documentation.
-     *
-     * @param clsName Query class name.
-     * @param search Search clause.
-     * @return Created query.
-     */
-    public CacheQuery<Map.Entry<K, V>> createFullTextQuery(String clsName, String
search);
-
-    /**
-     * Creates SQL fields query which will include results metadata if needed.
-     *
-     * @param qry SQL query.
-     * @param incMeta Whether to include results metadata.
-     * @return Created query.
-     */
-    public CacheQuery<List<?>> createSqlFieldsQuery(String qry, boolean incMeta);
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34b5b51b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueriesImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueriesImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueriesImpl.java
index 7179e12..99017cd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueriesImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueriesImpl.java
@@ -47,44 +47,4 @@ public class CacheQueriesImpl<K, V> implements CacheQueries<K,
V> {
         this.ctx = ctx;
         this.keepPortable = keepPortable;
     }
-
-    /** {@inheritDoc} */
-    @Override public CacheQuery<List<?>> createSqlFieldsQuery(String qry) {
-        A.notNull(qry, "qry");
-
-        return new GridCacheQueryAdapter<>(ctx,
-            SQL_FIELDS,
-            null,
-            qry,
-            null,
-            false,
-            keepPortable);
-    }
-
-    /** {@inheritDoc} */
-    @Override public CacheQuery<Map.Entry<K, V>> createFullTextQuery(String clsName,
String search) {
-        A.notNull("clsName", clsName);
-        A.notNull("search", search);
-
-        return new GridCacheQueryAdapter<>(ctx,
-            TEXT,
-            clsName,
-            search,
-            null,
-            false,
-            keepPortable);
-    }
-
-    /** {@inheritDoc} */
-    @Override public CacheQuery<List<?>> createSqlFieldsQuery(String qry, boolean
incMeta) {
-        assert qry != null;
-
-        return new GridCacheQueryAdapter<>(ctx,
-            SQL_FIELDS,
-            null,
-            qry,
-            null,
-            incMeta,
-            keepPortable);
-    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34b5b51b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index 9c2c0dd..ecf57d2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@ -2902,6 +2902,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
     /**
      * Query for {@link IndexingSpi}.
      *
+     * @param keepPortable Keep portable flag.
      * @return Query.
      */
     public <R> CacheQuery<R> createSpiQuery(boolean keepPortable) {
@@ -2918,6 +2919,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
      * Creates user's predicate based scan query.
      *
      * @param filter Scan filter.
+     * @param keepPortable Keep portable flag.
      * @return Created query.
      */
     @SuppressWarnings("unchecked")
@@ -2931,4 +2933,68 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                 false,
                 keepPortable);
     }
+
+    /**
+     * Creates user's full text query, queried class, and query clause.
+     * For more information refer to {@link CacheQuery} documentation.
+     *
+     * @param clsName Query class name.
+     * @param search Search clause.
+     * @param keepPortable Keep portable flag.
+     * @return Created query.
+     */
+    public CacheQuery<Map.Entry<K, V>> createFullTextQuery(String clsName,
+                                                           String search, boolean keepPortable)
{
+        A.notNull("clsName", clsName);
+        A.notNull("search", search);
+
+        return new GridCacheQueryAdapter<>(cctx,
+                TEXT,
+                clsName,
+                search,
+                null,
+                false,
+                keepPortable);
+    }
+
+
+    /**
+     * Creates user's SQL fields query for given clause. For more information refer to
+     * {@link CacheQuery} documentation.
+     *
+     * @param qry Query.
+     * @param keepPortable Keep portable flag.
+     * @return Created query.
+     */
+     public CacheQuery<List<?>> createSqlFieldsQuery(String qry, boolean keepPortable)
{
+        A.notNull(qry, "qry");
+
+        return new GridCacheQueryAdapter<>(cctx,
+                SQL_FIELDS,
+                null,
+                qry,
+                null,
+                false,
+                keepPortable);
+    }
+
+    /**
+     * Creates SQL fields query which will include results metadata if needed.
+     *
+     * @param qry SQL query.
+     * @param incMeta Whether to include results metadata.
+     * @param keepPortable Keep portable flag.
+     * @return Created query.
+     */
+    public CacheQuery<List<?>> createSqlFieldsQuery(String qry, boolean incMeta,
boolean keepPortable) {
+        assert qry != null;
+
+        return new GridCacheQueryAdapter<>(cctx,
+                SQL_FIELDS,
+                null,
+                qry,
+                null,
+                incMeta,
+                keepPortable);
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34b5b51b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
index da1d137..a661ee5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
@@ -90,8 +90,8 @@ public class GridCacheFullTextQueryMultithreadedSelfTest extends GridCacheAbstra
             }, 1);
 
         // Create query.
-        final CacheQuery<Map.Entry<Integer, H2TextValue>> qry = c.queries().createFullTextQuery(
-            H2TextValue.class.getName(), txt);
+        final CacheQuery<Map.Entry<Integer, H2TextValue>> qry = c.context().queries().createFullTextQuery(
+            H2TextValue.class.getName(), txt, false);
 
         qry.enableDedup(false);
         qry.includeBackups(false);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34b5b51b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
index 1808516..55ad281 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
@@ -269,8 +269,8 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
 
     /** @throws Exception If failed. */
     public void testExecute() throws Exception {
-        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).queries().createSqlFieldsQuery(
-            "select _KEY, name, age from Person");
+        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).context().queries().createSqlFieldsQuery(
+            "select _KEY, name, age from Person", false);
 
         CacheQueryFuture<List<?>> fut = qry.execute();
 
@@ -319,8 +319,8 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
 
     /** @throws Exception If failed. */
     public void testExecuteWithArguments() throws Exception {
-        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).queries().createSqlFieldsQuery(
-            "select _KEY, name, age from Person where age > ?");
+        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).context().queries().createSqlFieldsQuery(
+            "select _KEY, name, age from Person where age > ?", false);
 
         CacheQueryFuture<List<?>> fut = qry.execute(30);
 
@@ -364,10 +364,10 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
 
     /** @throws Exception If failed. */
     public void testExecuteWithMetaData() throws Exception {
-        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).queries().createSqlFieldsQuery(
+        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).context().queries().createSqlFieldsQuery(
             "select p._KEY, p.name, p.age, o.name " +
                 "from Person p, Organization o where p.orgId = o.id",
-            true);
+            true, false);
 
         CacheQueryFuture<List<?>> fut = qry.execute();
 
@@ -465,9 +465,9 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
 
     /** @throws Exception If failed. */
     public void testSelectAllJoined() throws Exception {
-        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).queries().createSqlFieldsQuery(
+        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).context().queries().createSqlFieldsQuery(
             "select * from Person p, Organization o where p.orgId = o.id",
-            true);
+            true, false);
 
         CacheQueryFuture<List<?>> fut = qry.execute();
 
@@ -630,8 +630,8 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
 
     /** @throws Exception If failed. */
     public void testEmptyResult() throws Exception {
-        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).queries().createSqlFieldsQuery(
-            "select name from Person where age = 0", true);
+        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).context().queries().createSqlFieldsQuery(
+            "select name from Person where age = 0", true, false);
 
         CacheQueryFuture<List<?>> fut = qry.execute();
 
@@ -658,7 +658,8 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
 
     /** @throws Exception If failed. */
     public void testQueryString() throws Exception {
-        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).queries().createSqlFieldsQuery("select
* from String");
+        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).context().queries().
+                createSqlFieldsQuery("select * from String", false);
 
         Collection<List<?>> res = qry.execute().get();
 
@@ -675,8 +676,8 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
 
     /** @throws Exception If failed. */
     public void testQueryIntegersWithJoin() throws Exception {
-        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).queries().createSqlFieldsQuery(
-            "select i._KEY, i._VAL, j._KEY, j._VAL from Integer i join Integer j where i._VAL
>= 100", true)
+        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).context().queries().createSqlFieldsQuery(
+            "select i._KEY, i._VAL, j._KEY, j._VAL from Integer i join Integer j where i._VAL
>= 100", true, false)
             .projection(grid(0).cluster());
 
         CacheQueryFuture<List<?>> fut = qry.execute();
@@ -743,7 +744,8 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
 
     /** @throws Exception If failed. */
     public void testPagination() throws Exception {
-        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).queries().createSqlFieldsQuery("select
* from Integer");
+        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).context().queries().
+                createSqlFieldsQuery("select * from Integer", false);
 
         qry.pageSize(20);
 
@@ -792,7 +794,7 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
 
         assert F.first(metas).types().isEmpty() : "Non empty types: " + F.first(metas).types();
 
-        CacheQuery<List<?>> qry = cache.queries().createSqlFieldsQuery("select
* from String");
+        CacheQuery<List<?>> qry = cache.context().queries().createSqlFieldsQuery("select
* from String", false);
 
         assert qry.execute().get().isEmpty();
 
@@ -864,7 +866,8 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
             cnt++;
         }
 
-        Collection<List<?>> res = cache.queries().createSqlFieldsQuery("select
* from Person").execute().get();
+        Collection<List<?>> res = cache.context().queries().
+                createSqlFieldsQuery("select * from Person", false).execute().get();
 
         assertEquals(1, res.size());
 
@@ -907,8 +910,8 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
      * @throws Exception If failed.
      */
     private void testPaginationIterator(@Nullable String cacheName) throws Exception {
-        CacheQuery<List<?>> q = ((IgniteKernal)grid(0)).getCache(cacheName).queries().createSqlFieldsQuery("select
_key, _val from " +
-            "Integer")
+        CacheQuery<List<?>> q = ((IgniteKernal)grid(0)).getCache(cacheName).context().queries().
+                createSqlFieldsQuery("select _key, _val from " + "Integer", false)
             .projection(grid(0).cluster());
 
         q.pageSize(10);
@@ -940,8 +943,8 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
 
     /** @throws Exception If failed. */
     public void testPaginationIteratorKeepAll() throws Exception {
-        CacheQuery<List<?>> q = ((IgniteKernal)grid(0)).getCache(null).queries().createSqlFieldsQuery(
-            "select _key, _val from Integer");
+        CacheQuery<List<?>> q = ((IgniteKernal)grid(0)).getCache(null).context().queries().
+                createSqlFieldsQuery("select _key, _val from Integer", false);
 
         q.pageSize(10);
         q.keepAll(true);
@@ -999,8 +1002,8 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
      * @throws Exception If failed.
      */
     private void testPaginationGet(@Nullable String cacheName) throws Exception {
-        CacheQuery<List<?>> q = ((IgniteKernal)grid(0)).getCache(cacheName).queries().createSqlFieldsQuery("select
_key, _val from " +
-            "Integer");
+        CacheQuery<List<?>> q = ((IgniteKernal)grid(0)).getCache(cacheName).context().queries().
+                createSqlFieldsQuery("select _key, _val from " + "Integer", false);
 
         q.pageSize(10);
         q.keepAll(true);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34b5b51b/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 4d71437..08300e0 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
@@ -101,7 +101,8 @@ public class GridCacheReduceQueryMultithreadedSelfTest extends GridCacheAbstract
         }, 1);
 
         // Create query.
-        final CacheQuery<List<?>> sumQry = c.queries().createSqlFieldsQuery("select
_val from Integer").timeout(TEST_TIMEOUT);
+        final CacheQuery<List<?>> sumQry = c.context().queries().
+                createSqlFieldsQuery("select _val from Integer", false).timeout(TEST_TIMEOUT);
 
         final R1<List<?>, Integer> rmtRdc = new R1<List<?>, Integer>()
{
             /** */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34b5b51b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java
index 19b2d5a..8f6b800 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java
@@ -68,8 +68,8 @@ public class GridCachePartitionedFieldsQuerySelfTest extends GridCacheAbstractFi
      * @throws Exception If failed.
      */
     public void testIncludeBackups() throws Exception {
-        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).internalCache(null).queries().createSqlFieldsQuery(
-            "select _KEY, name, age from Person");
+        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).internalCache(null).context().queries().createSqlFieldsQuery(
+            "select _KEY, name, age from Person", false);
 
         qry.includeBackups(true);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34b5b51b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQuerySelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQuerySelfTest.java
index a904994..f129fe7 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQuerySelfTest.java
@@ -68,8 +68,8 @@ public class GridCacheReplicatedFieldsQuerySelfTest extends GridCacheAbstractFie
 
             GridCacheAdapter<Integer, Integer> cache = ((IgniteKernal)g).internalCache(null);
 
-            CacheQuery<List<?>> q = cache.queries().createSqlFieldsQuery("select
_key from Integer where _key >= " +
-                "0 order by _key");
+            CacheQuery<List<?>> q = cache.context().queries().createSqlFieldsQuery("select
_key from Integer where _key >= " +
+                "0 order by _key", false);
 
             q.pageSize(50);
 
@@ -126,8 +126,8 @@ public class GridCacheReplicatedFieldsQuerySelfTest extends GridCacheAbstractFie
         CacheQueryFuture<List<?>> fut = null;
 
         for (int i = 0; i < GridCacheQueryManager.MAX_ITERATORS + 1; i++) {
-            CacheQuery<List<?>> q = cache.queries().createSqlFieldsQuery(
-                "select _key from Integer where _key >= 0 order by _key").projection(grid(0).cluster());
+            CacheQuery<List<?>> q = cache.context().queries().createSqlFieldsQuery(
+                "select _key from Integer where _key >= 0 order by _key", false).projection(grid(0).cluster());
 
             q.pageSize(50);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34b5b51b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
index fb9bda0..f185d77 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
@@ -162,7 +162,7 @@ public abstract class GridCacheAbstractReduceFieldsQuerySelfTest extends
GridCom
      */
     public void testNoDataInCache() throws Exception {
         CacheQuery<List<?>> qry = ((IgniteKernal)grid(0))
-            .getCache(null).queries().createSqlFieldsQuery("select age from Person where
orgId = 999");
+            .getCache(null).context().queries().createSqlFieldsQuery("select age from Person
where orgId = 999", false);
 
         Collection<IgniteBiTuple<Integer, Integer>> res = qry.execute(new AverageRemoteReducer()).get();
 
@@ -173,7 +173,8 @@ public abstract class GridCacheAbstractReduceFieldsQuerySelfTest extends
GridCom
      * @throws Exception If failed.
      */
     public void testAverageQuery() throws Exception {
-        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).queries().createSqlFieldsQuery("select
age from Person");
+        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).context().queries().
+                createSqlFieldsQuery("select age from Person", false);
 
         Collection<IgniteBiTuple<Integer, Integer>> res = qry.execute(new AverageRemoteReducer()).get();
 
@@ -184,8 +185,8 @@ public abstract class GridCacheAbstractReduceFieldsQuerySelfTest extends
GridCom
      * @throws Exception If failed.
      */
     public void testAverageQueryWithArguments() throws Exception {
-        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).queries().createSqlFieldsQuery(
-            "select age from Person where orgId = ?");
+        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).context().queries().createSqlFieldsQuery(
+            "select age from Person where orgId = ?", false);
 
         Collection<IgniteBiTuple<Integer, Integer>> res = qry.execute(new AverageRemoteReducer(),
1).get();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34b5b51b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheReduceFieldsQueryPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheReduceFieldsQueryPartitionedSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheReduceFieldsQueryPartitionedSelfTest.java
index 5726d94..48fbf86 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheReduceFieldsQueryPartitionedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheReduceFieldsQueryPartitionedSelfTest.java
@@ -44,8 +44,8 @@ public class GridCacheReduceFieldsQueryPartitionedSelfTest extends GridCacheAbst
      * @throws Exception If failed.
      */
     public void testIncludeBackups() throws Exception {
-        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).queries().
-            createSqlFieldsQuery("select age from Person");
+        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).getCache(null).context().queries().
+            createSqlFieldsQuery("select age from Person", false);
 
         qry.includeBackups(true);
 


Mime
View raw message