ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [07/30] incubator-ignite git commit: ignite-sql-old - rename
Date Sun, 15 Feb 2015 08:02:48 GMT
ignite-sql-old - rename


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

Branch: refs/heads/ignite-nio
Commit: cb65ec550fc3f89ac04f1eef09f31a8d4e206e21
Parents: 5cb1fb4
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Sat Feb 14 01:31:32 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Sat Feb 14 01:31:32 2015 +0300

----------------------------------------------------------------------
 .../datagrid/CachePopularNumbersExample.java    |   2 +-
 .../examples/datagrid/CacheQueryExample.java    |   2 +-
 .../starschema/CacheStarSchemaExample.java      |   2 +-
 .../apache/ignite/cache/CacheProjection.java    |   4 +-
 .../cache/query/CacheContinuousQuery.java       |   1 +
 .../apache/ignite/cache/query/CacheQueries.java | 152 ----------
 .../apache/ignite/cache/query/CacheQuery.java   | 295 ------------------
 .../ignite/cache/query/CacheQueryFuture.java    |  66 -----
 .../ignite/cache/query/CacheQueryType.java      |  47 ---
 .../apache/ignite/cache/query/QueryMetrics.java |   2 +
 .../cache/query/annotations/QuerySqlField.java  |   2 +-
 .../cache/query/annotations/QueryTextField.java |   2 +-
 .../ignite/events/CacheQueryExecutedEvent.java  |   1 +
 .../ignite/events/CacheQueryReadEvent.java      |   1 +
 .../cache/CacheWeakQueryIteratorsHolder.java    |   2 +-
 .../processors/cache/GridCacheAdapter.java      |   1 -
 .../cache/GridCacheProjectionImpl.java          |   1 -
 .../processors/cache/GridCacheProxyImpl.java    |   1 -
 .../processors/cache/query/CacheQueries.java    | 153 ++++++++++
 .../processors/cache/query/CacheQuery.java      | 296 +++++++++++++++++++
 .../cache/query/CacheQueryFuture.java           |  66 +++++
 .../processors/cache/query/CacheQueryType.java  |  47 +++
 .../query/GridCacheDistributedQueryManager.java |   1 -
 .../cache/query/GridCacheLocalQueryManager.java |   1 -
 .../cache/query/GridCacheQueriesEx.java         |   1 -
 .../cache/query/GridCacheQueriesImpl.java       |   2 +-
 .../cache/query/GridCacheQueryErrorFuture.java  |   1 -
 .../query/GridCacheQueryFutureAdapter.java      |   1 -
 .../cache/query/GridCacheQueryManager.java      |  18 +-
 .../cache/query/GridCacheQueryType.java         |   4 +-
 .../GridCacheContinuousQueryHandler.java        |   1 +
 .../query/jdbc/GridCacheQueryJdbcTask.java      |   1 -
 .../datastructures/GridCacheSetImpl.java        |   1 -
 .../cache/GridCacheQueryCommandHandler.java     |   1 -
 .../internal/visor/query/VisorQueryTask.java    |   1 -
 .../internal/visor/query/VisorQueryUtils.java   |   2 +-
 .../GridCacheConcurrentTxMultiNodeTest.java     |   2 +-
 .../GridCacheFieldsQueryNoDataSelfTest.java     |   2 +-
 ...CacheFullTextQueryMultithreadedSelfTest.java |   2 +-
 .../cache/GridCacheQueryIndexSelfTest.java      |   2 +-
 .../GridCacheQueryIndexingDisabledSelfTest.java |   2 +-
 .../cache/IgniteTxMultiNodeAbstractTest.java    |   2 +-
 ...achePartitionedPreloadLifecycleSelfTest.java |   2 +-
 ...hePartitionedQueryMultiThreadedSelfTest.java |   2 +-
 ...CacheReplicatedPreloadLifecycleSelfTest.java |   2 +-
 .../GridCacheSwapScanQueryAbstractSelfTest.java |   1 -
 ...ridCacheContinuousQueryAbstractSelfTest.java |   2 +-
 ...dCacheAbstractReduceFieldsQuerySelfTest.java |   2 +-
 ...cheReduceFieldsQueryPartitionedSelfTest.java |   2 +-
 .../query/h2/GridH2IndexingGeoSelfTest.java     |   2 +-
 .../GridCacheAbstractFieldsQuerySelfTest.java   |   1 -
 .../cache/GridCacheAbstractQuerySelfTest.java   |   3 +-
 .../cache/GridCacheCrossCacheQuerySelfTest.java |   1 -
 .../cache/GridCacheQueryMetricsSelfTest.java    |   1 +
 .../GridCacheQueryMultiThreadedSelfTest.java    |   1 -
 ...idCacheReduceQueryMultithreadedSelfTest.java |   2 +-
 .../GridCacheSqlQueryMultiThreadedSelfTest.java |   2 +-
 .../cache/GridIndexingWithNoopSwapSelfTest.java |   2 +-
 .../GridCacheAtomicFieldsQuerySelfTest.java     |   2 +-
 ...GridCachePartitionedFieldsQuerySelfTest.java |   2 +-
 .../near/GridCachePartitionedQuerySelfTest.java |   2 +-
 .../near/GridCacheQueryNodeRestartSelfTest.java |   2 +-
 .../GridCacheReplicatedFieldsQuerySelfTest.java |   2 +-
 .../GridCacheReplicatedQuerySelfTest.java       |   1 -
 .../local/GridCacheLocalQuerySelfTest.java      |   2 +-
 .../query/h2/GridH2IndexRebuildTest.java        |   2 +-
 .../tcp/GridOrderedMessageCancelSelfTest.java   |   1 -
 .../cache/IgniteSqlQueryBenchmark.java          |   2 +-
 .../cache/IgniteSqlQueryJoinBenchmark.java      |   2 +-
 .../cache/IgniteSqlQueryPutBenchmark.java       |   2 +-
 70 files changed, 617 insertions(+), 627 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePopularNumbersExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePopularNumbersExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePopularNumbersExample.java
index d42ec28..e793f70 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePopularNumbersExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePopularNumbersExample.java
@@ -19,8 +19,8 @@ package org.apache.ignite.examples.datagrid;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 
 import javax.cache.processor.*;
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
index 238429c..fe5bf7f 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
@@ -20,8 +20,8 @@ package org.apache.ignite.examples.datagrid;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cache.query.annotations.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.lang.*;
 
 import java.io.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
index 7465b89..a5212d2 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
@@ -19,8 +19,8 @@ package org.apache.ignite.examples.datagrid.starschema;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.examples.datagrid.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 
 import java.util.*;
 import java.util.concurrent.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java
index f156b3f..d1a768d 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java
@@ -18,11 +18,11 @@
 package org.apache.ignite.cache;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cache.store.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.processors.cache.transactions.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.transactions.*;
@@ -100,7 +100,7 @@ import java.util.concurrent.*;
  *  operations within a transaction (see {@link IgniteTx} for more information).
  * </li>
  * <li>
- *  {@link #queries()} method to get an instance of {@link org.apache.ignite.cache.query.CacheQueries} service for working
+ *  {@link #queries()} method to get an instance of {@link CacheQueries} service for working
  *  with distributed cache queries.
  * </li>
  * <li>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/cache/query/CacheContinuousQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheContinuousQuery.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheContinuousQuery.java
index bddb7a4..eaac9b8 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheContinuousQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheContinuousQuery.java
@@ -19,6 +19,7 @@ package org.apache.ignite.cache.query;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.lang.*;
 import org.jetbrains.annotations.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueries.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueries.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueries.java
deleted file mode 100644
index 2003172..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueries.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.query;
-
-import org.apache.ignite.internal.*;
-import org.apache.ignite.lang.*;
-import org.jetbrains.annotations.*;
-
-import java.util.*;
-
-/**
- * Facade for creating distributed queries. It contains various {@code 'createXxxQuery(..)'}
- * methods for {@code SQL}, {@code TEXT}, and {@code SCAN} query creation (see {@link CacheQuery}
- * for more information).
- * <p>
- * Instance of {@code CacheQueries} is obtained from cache projection as follows:
- * <pre name="code" class="java">
- * CacheQueries q = Ignition.ignite().cache("myCache").queries();
- * </pre>
- */
-public interface CacheQueries<K, V> {
-    /**
-     * Creates user's SQL query, queried class, and query clause which is generally
-     * a where clause. For more information refer to {@link CacheQuery} documentation.
-     *
-     * @param cls Query class.
-     * @param clause Query clause.
-     * @return Created query.
-     */
-    public CacheQuery<Map.Entry<K, V>> createSqlQuery(Class<?> cls, String clause);
-
-    /**
-     * Creates user's SQL query, queried class, and query clause which is generally
-     * a where clause. For more information refer to {@link CacheQuery} documentation.
-     *
-     * @param clsName Query class name.
-     * @param clause Query clause.
-     * @return Created query.
-     */
-    public CacheQuery<Map.Entry<K, V>> createSqlQuery(String clsName, String clause);
-
-    /**
-     * 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 user's full text query, queried class, and query clause.
-     * For more information refer to {@link CacheQuery} documentation.
-     *
-     * @param cls Query class.
-     * @param search Search clause.
-     * @return Created query.
-     */
-    public CacheQuery<Map.Entry<K, V>> createFullTextQuery(Class<?> cls, String search);
-
-    /**
-     * Creates user's predicate based scan query.
-     *
-     * @param filter Scan filter.
-     * @return Created query.
-     */
-    public CacheQuery<Map.Entry<K, V>> createScanQuery(@Nullable IgniteBiPredicate<K, V> filter);
-
-    /**
-     * Creates new continuous query.
-     * <p>
-     * For more information refer to {@link CacheContinuousQuery} documentation.
-     *
-     * @return Created continuous query.
-     * @see CacheContinuousQuery
-     */
-    public CacheContinuousQuery<K, V> createContinuousQuery();
-
-    /**
-     * Forces this cache to rebuild all search indexes of given value type. Sometimes indexes
-     * may hold references to objects that have already been removed from cache. Although
-     * not affecting query results, these objects may consume extra memory. Rebuilding
-     * indexes will remove any redundant references that may have temporarily got stuck
-     * inside in-memory index.
-     *
-     * @param cls Value type to rebuild indexes for.
-     *
-     * @return Future that will be completed when rebuilding of all indexes is finished.
-     */
-    public IgniteInternalFuture<?> rebuildIndexes(Class<?> cls);
-
-    /**
-     * Forces this cache to rebuild all search indexes of given value type. Sometimes indexes
-     * may hold references to objects that have already been removed from cache. Although
-     * not affecting query results, these objects may consume extra memory. Rebuilding
-     * indexes will remove any redundant references that may have temporarily got stuck
-     * inside in-memory index.
-     *
-     * @param typeName Value type name to rebuild indexes for.
-     *
-     * @return Future that will be completed when rebuilding of all indexes is finished.
-     */
-    public IgniteInternalFuture<?> rebuildIndexes(String typeName);
-
-    /**
-     * Forces this cache to rebuild search indexes of all types. Sometimes indexes
-     * may hold references to objects that have already been removed from cache. Although
-     * not affecting query results, these objects may consume extra memory. Rebuilding
-     * indexes will remove any redundant references that may have temporarily got stuck
-     * inside in-memory index.
-     *
-     * @return Future that will be completed when rebuilding of all indexes is finished.
-     */
-    public IgniteInternalFuture<?> rebuildAllIndexes();
-
-    /**
-     * Accumulated metrics for all queries executed for this cache.
-     *
-     * @return Cache query metrics.
-     */
-    public QueryMetrics metrics();
-
-    /**
-     * Resets accumulated metrics.
-     */
-    public void resetMetrics();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java
deleted file mode 100644
index f16eba2..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.query;
-
-import org.apache.ignite.cache.query.annotations.*;
-import org.apache.ignite.cluster.*;
-import org.apache.ignite.lang.*;
-import org.jetbrains.annotations.*;
-
-/**
- * Main API for configuring and executing cache queries.
- * <p>
- * Cache queries are created from {@link CacheQueries} API via any of the available
- * {@code createXXXQuery(...)} methods.
- * <h1 class="header">SQL Queries</h1>
- * {@code SQL} query allows to execute distributed cache
- * queries using standard SQL syntax. All values participating in where clauses
- * or joins must be annotated with {@link QuerySqlField} annotation. Query can be created
- * with {@link CacheQueries#createSqlQuery(Class, String)} method.
- * <h2 class="header">Field Queries</h2>
- * By default {@code select} clause is ignored as query result contains full objects.
- * If it is needed to select individual fields, use {@link CacheQueries#createSqlFieldsQuery(String)} method.
- * This type of query replaces full objects with individual fields. Note that selected fields
- * must be annotated with {@link QuerySqlField} annotation.
- * <h2 class="header">Cross-Cache Queries</h2>
- * You are allowed to query data from several caches. Cache that this query was created on is
- * treated as default schema in this case. Other caches can be referenced by their names.
- * <p>
- * Note that cache name is case sensitive and has to always be specified in double quotes.
- * Here is an example of cross cache query (note that 'replicated' and 'partitioned' are
- * cache names for replicated and partitioned caches accordingly):
- * <pre name="code" class="java">
- * CacheQuery&lt;Map.Entry&lt;Integer, FactPurchase&gt;&gt; storePurchases = cache.queries().createSqlQuery(
- *     Purchase.class,
- *     "from \"replicated\".Store, \"partitioned\".Purchase where Store.id=Purchase.storeId and Store.id=?");
- * </pre>
- * <h2 class="header">Custom functions in SQL queries.</h2>
- * It is possible to write custom Java methods and call then form SQL queries. These methods must be public static
- * and annotated with {@link QuerySqlFunction}. Classes containing these methods must be registered in
- * {@link org.apache.ignite.configuration.QueryConfiguration#setIndexCustomFunctionClasses(Class[])}.
- * <h1 class="header">Full Text Queries</h1>
- * Ignite supports full text queries based on Apache Lucene engine. This queries are created by
- * {@link CacheQueries#createFullTextQuery(Class, String)} method. Note that all fields that
- * are expected to show up in text query results must be annotated with {@link QueryTextField}
- * annotation.
- * <h1 class="header">Scan Queries</h1>
- * Sometimes when it is known in advance that SQL query will cause a full data scan, or whenever data set
- * is relatively small, the full scan query may be used. This query will iterate over all cache
- * entries, skipping over entries that don't pass the optionally provided key-value filter
- * (see {@link CacheQueries#createScanQuery(org.apache.ignite.lang.IgniteBiPredicate)} method).
- * <h2 class="header">Limitations</h2>
- * Data in Ignite cache is usually distributed across several nodes,
- * so some queries may not work as expected. Keep in mind following limitations
- * (not applied if data is queried from one node only):
- * <ul>
- *     <li>
- *         {@code Group by} and {@code sort by} statements are applied separately
- *         on each node, so result set will likely be incorrectly grouped or sorted
- *         after results from multiple remote nodes are grouped together.
- *     </li>
- *     <li>
- *         Aggregation functions like {@code sum}, {@code max}, {@code avg}, etc.
- *         are also applied on each node. Therefore you will get several results
- *         containing aggregated values, one for each node.
- *     </li>
- *     <li>
- *         Joins will work correctly only if joined objects are stored in
- *         collocated mode or at least one side of the join is stored in
- *         {@link org.apache.ignite.cache.CacheMode#REPLICATED} cache. Refer to
- *         {@link org.apache.ignite.cache.affinity.CacheAffinityKey} javadoc for more information about colocation.
- *     </li>
- * </ul>
- * <h1 class="header">Query usage</h1>
- * As an example, suppose we have data model consisting of {@code 'Employee'} and {@code 'Organization'}
- * classes defined as follows:
- * <pre name="code" class="java">
- * public class Organization {
- *     // Indexed field.
- *     &#64;QuerySqlField(index = true)
- *     private long id;
- *
- *     // Indexed field.
- *     &#64;QuerySqlField(index = true)
- *     private String name;
- *     ...
- * }
- *
- * public class Person {
- *     // Indexed field.
- *     &#64;QuerySqlField(index = true)
- *     private long id;
- *
- *     // Indexed field (Organization ID, used as a foreign key).
- *     &#64;QuerySqlField(index = true)
- *     private long orgId;
- *
- *     // Without SQL field annotation, this field cannot be used in queries.
- *     private String name;
- *
- *     // Not indexed field.
- *     &#64;QuerySqlField
- *     private double salary;
- *
- *     // Index for text search.
- *     &#64;QueryTextField
- *     private String resume;
- *     ...
- * }
- * </pre>
- * Then you can create and execute queries that check various salary ranges like so:
- * <pre name="code" class="java">
- * Cache&lt;Long, Person&gt; cache = G.grid().cache();
- * ...
- * // Create query which selects salaries based on range for all employees
- * // that work for a certain company.
- * CacheQuery&lt;Map.Entry&lt;Long, Person&gt;&gt; qry = cache.queries().createSqlQuery(Person.class,
- *     "from Person, Organization where Person.orgId = Organization.id " +
- *         "and Organization.name = ? and Person.salary &gt; ? and Person.salary &lt;= ?");
- *
- * // Query all nodes to find all cached Ignite employees
- * // with salaries less than 1000.
- * qry.execute("Ignition", 0, 1000);
- *
- * // Query only remote nodes to find all remotely cached Ignite employees
- * // with salaries greater than 1000 and less than 2000.
- * qry.projection(grid.remoteProjection()).execute("Ignition", 1000, 2000);
- * </pre>
- * Here is a possible query that will use Lucene text search to scan all resumes to
- * check if employees have {@code Master} degree:
- * <pre name="code" class="java">
- * CacheQuery&lt;Map.Entry&lt;Long, Person&gt;&gt; mastersQry =
- *     cache.queries().createFullTextQuery(Person.class, "Master");
- *
- * // Query all cache nodes.
- * mastersQry.execute();
- * </pre>
- * <h1 class="header">Geo-Spatial Indexes and Queries</h1>
- * Ignite also support <b>Geo-Spatial Indexes</b>. Here is an example of geo-spatial index:
- * <pre name="code" class="java">
- * private class MapPoint implements Serializable {
- *     // Geospatial index.
- *     &#64;QuerySqlField(index = true)
- *     private com.vividsolutions.jts.geom.Point location;
- *
- *     // Not indexed field.
- *     &#64;QuerySqlField
- *     private String name;
- *
- *     public MapPoint(com.vividsolutions.jts.geom.Point location, String name) {
- *         this.location = location;
- *         this.name = name;
- *     }
- * }
- * </pre>
- * Example of spatial query on the geo-indexed field from above:
- * <pre name="code" class="java">
- * com.vividsolutions.jts.geom.GeometryFactory factory = new com.vividsolutions.jts.geom.GeometryFactory();
- *
- * com.vividsolutions.jts.geom.Polygon square = factory.createPolygon(new Coordinate[] {
- *     new com.vividsolutions.jts.geom.Coordinate(0, 0),
- *     new com.vividsolutions.jts.geom.Coordinate(0, 100),
- *     new com.vividsolutions.jts.geom.Coordinate(100, 100),
- *     new com.vividsolutions.jts.geom.Coordinate(100, 0),
- *     new com.vividsolutions.jts.geom.Coordinate(0, 0)
- * });
- *
- * Map.Entry<String, UserData> records = cache.queries().createSqlQuery(MapPoint.class, "select * from MapPoint where location && ?")
- *     .queryArguments(square)
- *     .execute()
- *     .get();
- * </pre>
- */
-public interface CacheQuery<T> {
-    /** Default query page size. */
-    public static final int DFLT_PAGE_SIZE = 1024;
-
-    /**
-     * Sets result page size. If not provided, {@link #DFLT_PAGE_SIZE} will be used.
-     * Results are returned from queried nodes one page at a tme.
-     *
-     * @param pageSize Page size.
-     * @return {@code this} query instance for chaining.
-     */
-    public CacheQuery<T> pageSize(int pageSize);
-
-    /**
-     * Sets query timeout. {@code 0} means there is no timeout (this
-     * is a default value).
-     *
-     * @param timeout Query timeout.
-     * @return {@code this} query instance for chaining.
-     */
-    public CacheQuery<T> timeout(long timeout);
-
-    /**
-     * Sets whether or not to keep all query results local. If not - only the current page
-     * is kept locally. Default value is {@code true}.
-     *
-     * @param keepAll Keep results or not.
-     * @return {@code this} query instance for chaining.
-     */
-    public CacheQuery<T> keepAll(boolean keepAll);
-
-    /**
-     * Sets whether or not to include backup entries into query result. This flag
-     * is {@code false} by default.
-     *
-     * @param incBackups Query {@code includeBackups} flag.
-     * @return {@code this} query instance for chaining.
-     */
-    public CacheQuery<T> includeBackups(boolean incBackups);
-
-    /**
-     * Sets whether or not to deduplicate query result set. If this flag is {@code true}
-     * then query result will not contain some key more than once even if several nodes
-     * returned entries with the same keys. Default value is {@code false}.
-     *
-     * @param dedup Query {@code enableDedup} flag.
-     * @return {@code this} query instance for chaining.
-     */
-    public CacheQuery<T> enableDedup(boolean dedup);
-
-    /**
-     * Sets optional grid projection to execute this query on.
-     *
-     * @param prj Projection.
-     * @return {@code this} query instance for chaining.
-     */
-    public CacheQuery<T> projection(ClusterGroup prj);
-
-    /**
-     * Executes the query and returns the query future. Caller may decide to iterate
-     * over the returned future directly in which case the iterator may block until
-     * the next value will become available, or wait for the whole query to finish
-     * by calling any of the {@code 'get(..)'} methods on the returned future. If
-     * {@link #keepAll(boolean)} flag is set to {@code false}, then {@code 'get(..)'}
-     * methods will only return the last page received, otherwise all pages will be
-     * accumulated and returned to user as a collection.
-     * <p>
-     * Note that if the passed in grid projection is a local node, then query
-     * will be executed locally without distribution to other nodes.
-     * <p>
-     * Also note that query state cannot be changed (clause, timeout etc.), except
-     * arguments, if this method was called at least once.
-     *
-     * @param args Optional arguments.
-     * @return Future for the query result.
-     */
-    public CacheQueryFuture<T> execute(@Nullable Object... args);
-
-    /**
-     * Executes the query the same way as {@link #execute(Object...)} method but reduces result remotely.
-     *
-     * @param rmtReducer Remote reducer.
-     * @param args Optional arguments.
-     * @return Future for the query result.
-     */
-    public <R> CacheQueryFuture<R> execute(IgniteReducer<T, R> rmtReducer, @Nullable Object... args);
-
-    /**
-     * Executes the query the same way as {@link #execute(Object...)} method but transforms result remotely.
-     *
-     * @param rmtTransform Remote transformer.
-     * @param args Optional arguments.
-     * @return Future for the query result.
-     */
-    public <R> CacheQueryFuture<R> execute(IgniteClosure<T, R> rmtTransform, @Nullable Object... args);
-
-    /**
-     * Gets metrics for this query.
-     *
-     * @return Query metrics.
-     */
-    public QueryMetrics metrics();
-
-    /**
-     * Resets metrics for this query.
-     */
-    public void resetMetrics();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryFuture.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryFuture.java
deleted file mode 100644
index 6f68f29..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryFuture.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.query;
-
-import org.apache.ignite.*;
-import org.apache.ignite.internal.*;
-import org.jetbrains.annotations.*;
-
-import java.util.*;
-
-/**
- * Cache query future returned by query execution.
- * Refer to {@link CacheQuery} documentation for more information.
- */
-public interface CacheQueryFuture<T> extends IgniteInternalFuture<Collection<T>> {
-    /**
-     * Returns number of elements that are already fetched and can
-     * be returned from {@link #next()} method without blocking.
-     *
-     * @return Number of fetched elements which are available immediately.
-     * @throws IgniteCheckedException In case of error.
-     */
-    public int available() throws IgniteCheckedException;
-
-    /**
-     * Returns next element from result set.
-     * <p>
-     * This is a blocking call which will wait if there are no
-     * elements available immediately.
-     *
-     * @return Next fetched element or {@code null} if all the elements have been fetched.
-     * @throws IgniteCheckedException If failed.
-     */
-    @Nullable public T next() throws IgniteCheckedException;
-
-    /**
-     * Checks if all data is fetched by the query.
-     *
-     * @return {@code True} if all data is fetched, {@code false} otherwise.
-     */
-    @Override public boolean isDone();
-
-    /**
-     * Cancels this query future and stop receiving any further results for the query
-     * associated with this future.
-     *
-     * @return {@inheritDoc}
-     * @throws IgniteCheckedException {@inheritDoc}
-     */
-    @Override public boolean cancel() throws IgniteCheckedException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryType.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryType.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryType.java
deleted file mode 100644
index 7347892..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryType.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.query;
-
-/**
- * Cache query type.
- * <p>
- * Used in {@link org.apache.ignite.events.CacheQueryExecutedEvent} and {@link org.apache.ignite.events.CacheQueryReadEvent}
- * to identify the type of query for which an event was fired.
- *
- * @see org.apache.ignite.events.CacheQueryExecutedEvent#queryType()
- * @see org.apache.ignite.events.CacheQueryReadEvent#queryType()
- */
-public enum CacheQueryType {
-    /** SQL query. */
-    SQL,
-
-    /** SQL fields query. */
-    SQL_FIELDS,
-
-    /** Full text query. */
-    FULL_TEXT,
-
-    /** Scan query. */
-    SCAN,
-
-    /** Continuous query. */
-    CONTINUOUS,
-
-    /** SPI query. */
-    SPI
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java
index b0eea8d..d178fe0 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java
@@ -17,6 +17,8 @@
 
 package org.apache.ignite.cache.query;
 
+import org.apache.ignite.internal.processors.cache.query.*;
+
 /**
  * Cache query metrics used to obtain statistics on query. You can get metrics for
  * particular query via {@link CacheQuery#metrics()} method or accumulated metrics

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlField.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlField.java b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlField.java
index 08575ad..db35671 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlField.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlField.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.cache.query.annotations;
 
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 
 import java.lang.annotation.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryTextField.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryTextField.java b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryTextField.java
index c10141f..280ebc3 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryTextField.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryTextField.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.cache.query.annotations;
 
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 
 import java.lang.annotation.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/events/CacheQueryExecutedEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/events/CacheQueryExecutedEvent.java b/modules/core/src/main/java/org/apache/ignite/events/CacheQueryExecutedEvent.java
index d44ebd8..51810a2 100644
--- a/modules/core/src/main/java/org/apache/ignite/events/CacheQueryExecutedEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/events/CacheQueryExecutedEvent.java
@@ -19,6 +19,7 @@ package org.apache.ignite.events;
 
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/events/CacheQueryReadEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/events/CacheQueryReadEvent.java b/modules/core/src/main/java/org/apache/ignite/events/CacheQueryReadEvent.java
index cd0ff4c..79b5eca 100644
--- a/modules/core/src/main/java/org/apache/ignite/events/CacheQueryReadEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/events/CacheQueryReadEvent.java
@@ -19,6 +19,7 @@ package org.apache.ignite.events;
 
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheWeakQueryIteratorsHolder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheWeakQueryIteratorsHolder.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheWeakQueryIteratorsHolder.java
index 0dbe917..b349ef1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheWeakQueryIteratorsHolder.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheWeakQueryIteratorsHolder.java
@@ -18,7 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.jdk8.backport.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 70f8a5a..032d340 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index 4f5b1ac..0059845 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.dr.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
index bc70f4b..39bea6e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/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
new file mode 100644
index 0000000..c1aede1
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
@@ -0,0 +1,153 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.query;
+
+import org.apache.ignite.cache.query.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.lang.*;
+import org.jetbrains.annotations.*;
+
+import java.util.*;
+
+/**
+ * Facade for creating distributed queries. It contains various {@code 'createXxxQuery(..)'}
+ * methods for {@code SQL}, {@code TEXT}, and {@code SCAN} query creation (see {@link CacheQuery}
+ * for more information).
+ * <p>
+ * Instance of {@code CacheQueries} is obtained from cache projection as follows:
+ * <pre name="code" class="java">
+ * CacheQueries q = Ignition.ignite().cache("myCache").queries();
+ * </pre>
+ */
+public interface CacheQueries<K, V> {
+    /**
+     * Creates user's SQL query, queried class, and query clause which is generally
+     * a where clause. For more information refer to {@link CacheQuery} documentation.
+     *
+     * @param cls Query class.
+     * @param clause Query clause.
+     * @return Created query.
+     */
+    public CacheQuery<Map.Entry<K, V>> createSqlQuery(Class<?> cls, String clause);
+
+    /**
+     * Creates user's SQL query, queried class, and query clause which is generally
+     * a where clause. For more information refer to {@link CacheQuery} documentation.
+     *
+     * @param clsName Query class name.
+     * @param clause Query clause.
+     * @return Created query.
+     */
+    public CacheQuery<Map.Entry<K, V>> createSqlQuery(String clsName, String clause);
+
+    /**
+     * 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 user's full text query, queried class, and query clause.
+     * For more information refer to {@link CacheQuery} documentation.
+     *
+     * @param cls Query class.
+     * @param search Search clause.
+     * @return Created query.
+     */
+    public CacheQuery<Map.Entry<K, V>> createFullTextQuery(Class<?> cls, String search);
+
+    /**
+     * Creates user's predicate based scan query.
+     *
+     * @param filter Scan filter.
+     * @return Created query.
+     */
+    public CacheQuery<Map.Entry<K, V>> createScanQuery(@Nullable IgniteBiPredicate<K, V> filter);
+
+    /**
+     * Creates new continuous query.
+     * <p>
+     * For more information refer to {@link CacheContinuousQuery} documentation.
+     *
+     * @return Created continuous query.
+     * @see CacheContinuousQuery
+     */
+    public CacheContinuousQuery<K, V> createContinuousQuery();
+
+    /**
+     * Forces this cache to rebuild all search indexes of given value type. Sometimes indexes
+     * may hold references to objects that have already been removed from cache. Although
+     * not affecting query results, these objects may consume extra memory. Rebuilding
+     * indexes will remove any redundant references that may have temporarily got stuck
+     * inside in-memory index.
+     *
+     * @param cls Value type to rebuild indexes for.
+     *
+     * @return Future that will be completed when rebuilding of all indexes is finished.
+     */
+    public IgniteInternalFuture<?> rebuildIndexes(Class<?> cls);
+
+    /**
+     * Forces this cache to rebuild all search indexes of given value type. Sometimes indexes
+     * may hold references to objects that have already been removed from cache. Although
+     * not affecting query results, these objects may consume extra memory. Rebuilding
+     * indexes will remove any redundant references that may have temporarily got stuck
+     * inside in-memory index.
+     *
+     * @param typeName Value type name to rebuild indexes for.
+     *
+     * @return Future that will be completed when rebuilding of all indexes is finished.
+     */
+    public IgniteInternalFuture<?> rebuildIndexes(String typeName);
+
+    /**
+     * Forces this cache to rebuild search indexes of all types. Sometimes indexes
+     * may hold references to objects that have already been removed from cache. Although
+     * not affecting query results, these objects may consume extra memory. Rebuilding
+     * indexes will remove any redundant references that may have temporarily got stuck
+     * inside in-memory index.
+     *
+     * @return Future that will be completed when rebuilding of all indexes is finished.
+     */
+    public IgniteInternalFuture<?> rebuildAllIndexes();
+
+    /**
+     * Accumulated metrics for all queries executed for this cache.
+     *
+     * @return Cache query metrics.
+     */
+    public QueryMetrics metrics();
+
+    /**
+     * Resets accumulated metrics.
+     */
+    public void resetMetrics();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java
new file mode 100644
index 0000000..14025f4
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java
@@ -0,0 +1,296 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.query;
+
+import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.lang.*;
+import org.jetbrains.annotations.*;
+
+/**
+ * Main API for configuring and executing cache queries.
+ * <p>
+ * Cache queries are created from {@link CacheQueries} API via any of the available
+ * {@code createXXXQuery(...)} methods.
+ * <h1 class="header">SQL Queries</h1>
+ * {@code SQL} query allows to execute distributed cache
+ * queries using standard SQL syntax. All values participating in where clauses
+ * or joins must be annotated with {@link QuerySqlField} annotation. Query can be created
+ * with {@link CacheQueries#createSqlQuery(Class, String)} method.
+ * <h2 class="header">Field Queries</h2>
+ * By default {@code select} clause is ignored as query result contains full objects.
+ * If it is needed to select individual fields, use {@link CacheQueries#createSqlFieldsQuery(String)} method.
+ * This type of query replaces full objects with individual fields. Note that selected fields
+ * must be annotated with {@link QuerySqlField} annotation.
+ * <h2 class="header">Cross-Cache Queries</h2>
+ * You are allowed to query data from several caches. Cache that this query was created on is
+ * treated as default schema in this case. Other caches can be referenced by their names.
+ * <p>
+ * Note that cache name is case sensitive and has to always be specified in double quotes.
+ * Here is an example of cross cache query (note that 'replicated' and 'partitioned' are
+ * cache names for replicated and partitioned caches accordingly):
+ * <pre name="code" class="java">
+ * CacheQuery&lt;Map.Entry&lt;Integer, FactPurchase&gt;&gt; storePurchases = cache.queries().createSqlQuery(
+ *     Purchase.class,
+ *     "from \"replicated\".Store, \"partitioned\".Purchase where Store.id=Purchase.storeId and Store.id=?");
+ * </pre>
+ * <h2 class="header">Custom functions in SQL queries.</h2>
+ * It is possible to write custom Java methods and call then form SQL queries. These methods must be public static
+ * and annotated with {@link QuerySqlFunction}. Classes containing these methods must be registered in
+ * {@link org.apache.ignite.configuration.QueryConfiguration#setIndexCustomFunctionClasses(Class[])}.
+ * <h1 class="header">Full Text Queries</h1>
+ * Ignite supports full text queries based on Apache Lucene engine. This queries are created by
+ * {@link CacheQueries#createFullTextQuery(Class, String)} method. Note that all fields that
+ * are expected to show up in text query results must be annotated with {@link QueryTextField}
+ * annotation.
+ * <h1 class="header">Scan Queries</h1>
+ * Sometimes when it is known in advance that SQL query will cause a full data scan, or whenever data set
+ * is relatively small, the full scan query may be used. This query will iterate over all cache
+ * entries, skipping over entries that don't pass the optionally provided key-value filter
+ * (see {@link CacheQueries#createScanQuery(org.apache.ignite.lang.IgniteBiPredicate)} method).
+ * <h2 class="header">Limitations</h2>
+ * Data in Ignite cache is usually distributed across several nodes,
+ * so some queries may not work as expected. Keep in mind following limitations
+ * (not applied if data is queried from one node only):
+ * <ul>
+ *     <li>
+ *         {@code Group by} and {@code sort by} statements are applied separately
+ *         on each node, so result set will likely be incorrectly grouped or sorted
+ *         after results from multiple remote nodes are grouped together.
+ *     </li>
+ *     <li>
+ *         Aggregation functions like {@code sum}, {@code max}, {@code avg}, etc.
+ *         are also applied on each node. Therefore you will get several results
+ *         containing aggregated values, one for each node.
+ *     </li>
+ *     <li>
+ *         Joins will work correctly only if joined objects are stored in
+ *         collocated mode or at least one side of the join is stored in
+ *         {@link org.apache.ignite.cache.CacheMode#REPLICATED} cache. Refer to
+ *         {@link org.apache.ignite.cache.affinity.CacheAffinityKey} javadoc for more information about colocation.
+ *     </li>
+ * </ul>
+ * <h1 class="header">Query usage</h1>
+ * As an example, suppose we have data model consisting of {@code 'Employee'} and {@code 'Organization'}
+ * classes defined as follows:
+ * <pre name="code" class="java">
+ * public class Organization {
+ *     // Indexed field.
+ *     &#64;QuerySqlField(index = true)
+ *     private long id;
+ *
+ *     // Indexed field.
+ *     &#64;QuerySqlField(index = true)
+ *     private String name;
+ *     ...
+ * }
+ *
+ * public class Person {
+ *     // Indexed field.
+ *     &#64;QuerySqlField(index = true)
+ *     private long id;
+ *
+ *     // Indexed field (Organization ID, used as a foreign key).
+ *     &#64;QuerySqlField(index = true)
+ *     private long orgId;
+ *
+ *     // Without SQL field annotation, this field cannot be used in queries.
+ *     private String name;
+ *
+ *     // Not indexed field.
+ *     &#64;QuerySqlField
+ *     private double salary;
+ *
+ *     // Index for text search.
+ *     &#64;QueryTextField
+ *     private String resume;
+ *     ...
+ * }
+ * </pre>
+ * Then you can create and execute queries that check various salary ranges like so:
+ * <pre name="code" class="java">
+ * Cache&lt;Long, Person&gt; cache = G.grid().cache();
+ * ...
+ * // Create query which selects salaries based on range for all employees
+ * // that work for a certain company.
+ * CacheQuery&lt;Map.Entry&lt;Long, Person&gt;&gt; qry = cache.queries().createSqlQuery(Person.class,
+ *     "from Person, Organization where Person.orgId = Organization.id " +
+ *         "and Organization.name = ? and Person.salary &gt; ? and Person.salary &lt;= ?");
+ *
+ * // Query all nodes to find all cached Ignite employees
+ * // with salaries less than 1000.
+ * qry.execute("Ignition", 0, 1000);
+ *
+ * // Query only remote nodes to find all remotely cached Ignite employees
+ * // with salaries greater than 1000 and less than 2000.
+ * qry.projection(grid.remoteProjection()).execute("Ignition", 1000, 2000);
+ * </pre>
+ * Here is a possible query that will use Lucene text search to scan all resumes to
+ * check if employees have {@code Master} degree:
+ * <pre name="code" class="java">
+ * CacheQuery&lt;Map.Entry&lt;Long, Person&gt;&gt; mastersQry =
+ *     cache.queries().createFullTextQuery(Person.class, "Master");
+ *
+ * // Query all cache nodes.
+ * mastersQry.execute();
+ * </pre>
+ * <h1 class="header">Geo-Spatial Indexes and Queries</h1>
+ * Ignite also support <b>Geo-Spatial Indexes</b>. Here is an example of geo-spatial index:
+ * <pre name="code" class="java">
+ * private class MapPoint implements Serializable {
+ *     // Geospatial index.
+ *     &#64;QuerySqlField(index = true)
+ *     private com.vividsolutions.jts.geom.Point location;
+ *
+ *     // Not indexed field.
+ *     &#64;QuerySqlField
+ *     private String name;
+ *
+ *     public MapPoint(com.vividsolutions.jts.geom.Point location, String name) {
+ *         this.location = location;
+ *         this.name = name;
+ *     }
+ * }
+ * </pre>
+ * Example of spatial query on the geo-indexed field from above:
+ * <pre name="code" class="java">
+ * com.vividsolutions.jts.geom.GeometryFactory factory = new com.vividsolutions.jts.geom.GeometryFactory();
+ *
+ * com.vividsolutions.jts.geom.Polygon square = factory.createPolygon(new Coordinate[] {
+ *     new com.vividsolutions.jts.geom.Coordinate(0, 0),
+ *     new com.vividsolutions.jts.geom.Coordinate(0, 100),
+ *     new com.vividsolutions.jts.geom.Coordinate(100, 100),
+ *     new com.vividsolutions.jts.geom.Coordinate(100, 0),
+ *     new com.vividsolutions.jts.geom.Coordinate(0, 0)
+ * });
+ *
+ * Map.Entry<String, UserData> records = cache.queries().createSqlQuery(MapPoint.class, "select * from MapPoint where location && ?")
+ *     .queryArguments(square)
+ *     .execute()
+ *     .get();
+ * </pre>
+ */
+public interface CacheQuery<T> {
+    /** Default query page size. */
+    public static final int DFLT_PAGE_SIZE = 1024;
+
+    /**
+     * Sets result page size. If not provided, {@link #DFLT_PAGE_SIZE} will be used.
+     * Results are returned from queried nodes one page at a tme.
+     *
+     * @param pageSize Page size.
+     * @return {@code this} query instance for chaining.
+     */
+    public CacheQuery<T> pageSize(int pageSize);
+
+    /**
+     * Sets query timeout. {@code 0} means there is no timeout (this
+     * is a default value).
+     *
+     * @param timeout Query timeout.
+     * @return {@code this} query instance for chaining.
+     */
+    public CacheQuery<T> timeout(long timeout);
+
+    /**
+     * Sets whether or not to keep all query results local. If not - only the current page
+     * is kept locally. Default value is {@code true}.
+     *
+     * @param keepAll Keep results or not.
+     * @return {@code this} query instance for chaining.
+     */
+    public CacheQuery<T> keepAll(boolean keepAll);
+
+    /**
+     * Sets whether or not to include backup entries into query result. This flag
+     * is {@code false} by default.
+     *
+     * @param incBackups Query {@code includeBackups} flag.
+     * @return {@code this} query instance for chaining.
+     */
+    public CacheQuery<T> includeBackups(boolean incBackups);
+
+    /**
+     * Sets whether or not to deduplicate query result set. If this flag is {@code true}
+     * then query result will not contain some key more than once even if several nodes
+     * returned entries with the same keys. Default value is {@code false}.
+     *
+     * @param dedup Query {@code enableDedup} flag.
+     * @return {@code this} query instance for chaining.
+     */
+    public CacheQuery<T> enableDedup(boolean dedup);
+
+    /**
+     * Sets optional grid projection to execute this query on.
+     *
+     * @param prj Projection.
+     * @return {@code this} query instance for chaining.
+     */
+    public CacheQuery<T> projection(ClusterGroup prj);
+
+    /**
+     * Executes the query and returns the query future. Caller may decide to iterate
+     * over the returned future directly in which case the iterator may block until
+     * the next value will become available, or wait for the whole query to finish
+     * by calling any of the {@code 'get(..)'} methods on the returned future. If
+     * {@link #keepAll(boolean)} flag is set to {@code false}, then {@code 'get(..)'}
+     * methods will only return the last page received, otherwise all pages will be
+     * accumulated and returned to user as a collection.
+     * <p>
+     * Note that if the passed in grid projection is a local node, then query
+     * will be executed locally without distribution to other nodes.
+     * <p>
+     * Also note that query state cannot be changed (clause, timeout etc.), except
+     * arguments, if this method was called at least once.
+     *
+     * @param args Optional arguments.
+     * @return Future for the query result.
+     */
+    public CacheQueryFuture<T> execute(@Nullable Object... args);
+
+    /**
+     * Executes the query the same way as {@link #execute(Object...)} method but reduces result remotely.
+     *
+     * @param rmtReducer Remote reducer.
+     * @param args Optional arguments.
+     * @return Future for the query result.
+     */
+    public <R> CacheQueryFuture<R> execute(IgniteReducer<T, R> rmtReducer, @Nullable Object... args);
+
+    /**
+     * Executes the query the same way as {@link #execute(Object...)} method but transforms result remotely.
+     *
+     * @param rmtTransform Remote transformer.
+     * @param args Optional arguments.
+     * @return Future for the query result.
+     */
+    public <R> CacheQueryFuture<R> execute(IgniteClosure<T, R> rmtTransform, @Nullable Object... args);
+
+    /**
+     * Gets metrics for this query.
+     *
+     * @return Query metrics.
+     */
+    public QueryMetrics metrics();
+
+    /**
+     * Resets metrics for this query.
+     */
+    public void resetMetrics();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryFuture.java
new file mode 100644
index 0000000..b81f2e2
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryFuture.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.query;
+
+import org.apache.ignite.*;
+import org.apache.ignite.internal.*;
+import org.jetbrains.annotations.*;
+
+import java.util.*;
+
+/**
+ * Cache query future returned by query execution.
+ * Refer to {@link CacheQuery} documentation for more information.
+ */
+public interface CacheQueryFuture<T> extends IgniteInternalFuture<Collection<T>> {
+    /**
+     * Returns number of elements that are already fetched and can
+     * be returned from {@link #next()} method without blocking.
+     *
+     * @return Number of fetched elements which are available immediately.
+     * @throws IgniteCheckedException In case of error.
+     */
+    public int available() throws IgniteCheckedException;
+
+    /**
+     * Returns next element from result set.
+     * <p>
+     * This is a blocking call which will wait if there are no
+     * elements available immediately.
+     *
+     * @return Next fetched element or {@code null} if all the elements have been fetched.
+     * @throws IgniteCheckedException If failed.
+     */
+    @Nullable public T next() throws IgniteCheckedException;
+
+    /**
+     * Checks if all data is fetched by the query.
+     *
+     * @return {@code True} if all data is fetched, {@code false} otherwise.
+     */
+    @Override public boolean isDone();
+
+    /**
+     * Cancels this query future and stop receiving any further results for the query
+     * associated with this future.
+     *
+     * @return {@inheritDoc}
+     * @throws IgniteCheckedException {@inheritDoc}
+     */
+    @Override public boolean cancel() throws IgniteCheckedException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryType.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryType.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryType.java
new file mode 100644
index 0000000..fa0f3df
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryType.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.query;
+
+/**
+ * Cache query type.
+ * <p>
+ * Used in {@link org.apache.ignite.events.CacheQueryExecutedEvent} and {@link org.apache.ignite.events.CacheQueryReadEvent}
+ * to identify the type of query for which an event was fired.
+ *
+ * @see org.apache.ignite.events.CacheQueryExecutedEvent#queryType()
+ * @see org.apache.ignite.events.CacheQueryReadEvent#queryType()
+ */
+public enum CacheQueryType {
+    /** SQL query. */
+    SQL,
+
+    /** SQL fields query. */
+    SQL_FIELDS,
+
+    /** Full text query. */
+    FULL_TEXT,
+
+    /** Scan query. */
+    SCAN,
+
+    /** Continuous query. */
+    CONTINUOUS,
+
+    /** SPI query. */
+    SPI
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
index fad48fd..c08f047 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.query;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalQueryManager.java
index 077e1c9..9e1af79 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalQueryManager.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.query;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.processors.query.*;
 import org.jetbrains.annotations.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java
index 4f39316..8d3c2be 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.query;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.internal.*;
 
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
index 82f021d..368dae7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
@@ -33,7 +33,7 @@ import java.util.*;
 import static org.apache.ignite.internal.processors.cache.query.GridCacheQueryType.*;
 
 /**
- * {@link org.apache.ignite.cache.query.CacheQueries} implementation.
+ * {@link CacheQueries} implementation.
  */
 public class GridCacheQueriesImpl<K, V> implements GridCacheQueriesEx<K, V>, Externalizable {
     /** */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryErrorFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryErrorFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryErrorFuture.java
index dd385d1..f4fcb37 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryErrorFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryErrorFuture.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.query;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.future.*;
 import org.jetbrains.annotations.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryFutureAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryFutureAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryFutureAdapter.java
index 49866ba..0748936 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryFutureAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryFutureAdapter.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.query;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.timeout.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/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 673ac59..42a8aae 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
@@ -487,7 +487,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                             cctx.localNode(),
                             "SQL query executed.",
                             EVT_CACHE_QUERY_EXECUTED,
-                            org.apache.ignite.cache.query.CacheQueryType.SQL,
+                            CacheQueryType.SQL,
                             cctx.namex(),
                             qry.queryClassName(),
                             qry.clause(),
@@ -509,7 +509,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                             cctx.localNode(),
                             "Scan query executed.",
                             EVT_CACHE_QUERY_EXECUTED,
-                            org.apache.ignite.cache.query.CacheQueryType.SCAN,
+                            CacheQueryType.SCAN,
                             cctx.namex(),
                             null,
                             null,
@@ -530,7 +530,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                             cctx.localNode(),
                             "Full text query executed.",
                             EVT_CACHE_QUERY_EXECUTED,
-                            org.apache.ignite.cache.query.CacheQueryType.FULL_TEXT,
+                            CacheQueryType.FULL_TEXT,
                             cctx.namex(),
                             qry.queryClassName(),
                             qry.clause(),
@@ -604,7 +604,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                     cctx.localNode(),
                     "SQL fields query executed.",
                     EVT_CACHE_QUERY_EXECUTED,
-                    org.apache.ignite.cache.query.CacheQueryType.SQL_FIELDS,
+                    CacheQueryType.SQL_FIELDS,
                     cctx.namex(),
                     null,
                     qry.clause(),
@@ -636,7 +636,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                     cctx.localNode(),
                     "SPI query executed.",
                     EVT_CACHE_QUERY_EXECUTED,
-                    org.apache.ignite.cache.query.CacheQueryType.SPI,
+                    CacheQueryType.SPI,
                     cctx.namex(),
                     null,
                     null,
@@ -1122,7 +1122,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                             cctx.localNode(),
                             "SQL fields query result set row read.",
                             EVT_CACHE_QUERY_OBJECT_READ,
-                            org.apache.ignite.cache.query.CacheQueryType.SQL_FIELDS,
+                            CacheQueryType.SQL_FIELDS,
                             cctx.namex(),
                             null,
                             qry.clause(),
@@ -1323,7 +1323,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                                     cctx.localNode(),
                                     "SQL query entry read.",
                                     EVT_CACHE_QUERY_OBJECT_READ,
-                                    org.apache.ignite.cache.query.CacheQueryType.SQL,
+                                    CacheQueryType.SQL,
                                     cctx.namex(),
                                     qry.queryClassName(),
                                     qry.clause(),
@@ -1344,7 +1344,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                                     cctx.localNode(),
                                     "Full text query entry read.",
                                     EVT_CACHE_QUERY_OBJECT_READ,
-                                    org.apache.ignite.cache.query.CacheQueryType.FULL_TEXT,
+                                    CacheQueryType.FULL_TEXT,
                                     cctx.namex(),
                                     qry.queryClassName(),
                                     qry.clause(),
@@ -1365,7 +1365,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                                     cctx.localNode(),
                                     "Scan query entry read.",
                                     EVT_CACHE_QUERY_OBJECT_READ,
-                                    org.apache.ignite.cache.query.CacheQueryType.SCAN,
+                                    CacheQueryType.SCAN,
                                     cctx.namex(),
                                     null,
                                     null,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryType.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryType.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryType.java
index f7d45a5..5805725 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryType.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryType.java
@@ -21,8 +21,8 @@ import org.jetbrains.annotations.*;
 
 /**
  * Defines different cache query types. For more information on cache query types
- * and their usage see {@link org.apache.ignite.cache.query.CacheQuery} documentation.
- * @see org.apache.ignite.cache.query.CacheQuery
+ * and their usage see {@link CacheQuery} documentation.
+ * @see CacheQuery
  */
 public enum GridCacheQueryType {
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
index 52356f7..d10c09f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
@@ -24,6 +24,7 @@ import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.managers.deployment.*;
 import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.processors.continuous.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
index fc4015f..4c6f8e4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache.query.jdbc;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.internal.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetImpl.java
index 46b4f0e..7e68ca4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetImpl.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.datastructures;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.query.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
index c1ebfb3..bd5e84b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.rest.handlers.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
index 4480861..f05b9d1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.visor.query;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.query.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb65ec55/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
index 190f6da..46f3669 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
@@ -18,7 +18,7 @@
 package org.apache.ignite.internal.visor.query;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.*;
 import org.apache.ignite.lang.*;
 


Mime
View raw message