ignite-sql-tests - compilation

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

Branch: refs/heads/ignite-sql-tests
Commit: 42c1213b1a5098dfa62b1da20283aeb148866c4c
Parents: 41bc772
Author: S.Vladykin <svlady...@gridgain.com>
Authored: Fri Feb 20 03:35:42 2015 +0300
Committer: S.Vladykin <svlady...@gridgain.com>
Committed: Fri Feb 20 03:35:42 2015 +0300

----------------------------------------------------------------------
 .../ignite/cache/query/ContinuousQuery.java     | 314 ++++++++++++
 .../processors/cache/IgniteCacheProxy.java      |   2 +-
 .../processors/cache/query/QueryCursorImpl.java |  87 ----
 .../cache/IgniteCacheQueryIndexSelfTest.java    |   5 -
 .../processors/query/h2/IgniteH2Indexing.java   |  19 -
 .../cache/GridIndexingWithNoopSwapSelfTest.java |   4 +-
 .../cache/IgniteCacheAbstractQuerySelfTest.java |  10 +-
 ...CachePartitionedQueryP2PEnabledSelfTest.java |  34 --
 .../near/GridCachePartitionedQuerySelfTest.java | 479 -------------------
 ...rtitionedFieldsQueryP2PDisabledSelfTest.java |   2 +-
 ...achePartitionedQueryP2PDisabledSelfTest.java |   2 +-
 .../IgniteCachePartitionedQuerySelfTest.java    |   2 +-
 ...dCacheReplicatedQueryP2PEnabledSelfTest.java |  34 --
 ...eplicatedFieldsQueryP2PDisabledSelfTest.java |   2 +-
 ...CacheReplicatedQueryP2PDisabledSelfTest.java |   2 +-
 .../IgniteCacheReplicatedQuerySelfTest.java     |   6 +-
 .../IgniteCacheQuerySelfTestSuite.java          |   1 -
 17 files changed, 328 insertions(+), 677 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/modules/core/src/main/java/org/apache/ignite/cache/query/ContinuousQuery.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/query/ContinuousQuery.java 
b/modules/core/src/main/java/org/apache/ignite/cache/query/ContinuousQuery.java
new file mode 100644
index 0000000..d99e95a
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/query/ContinuousQuery.java
@@ -0,0 +1,314 @@
+/*
+ * 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 javax.cache.event.*;
+
+/**
+ * API for configuring continuous cache queries.
+ * <p>
+ * Continuous queries allow to register a remote filter and a local listener
+ * for cache updates. If an update event passes the filter, it will be sent to
+ * the node that executed the query and local listener will be notified.
+ * <p>
+ * Additionally, you can execute initial query to get currently existing data.
+ * Query can be of any type (SQL, TEXT or SCAN) and can be set via {@link 
#setInitialPredicate(Query)}
+ * method.
+ * <p>
+ * Query can be executed either on all nodes in topology using {@link 
IgniteCache#query(Query)}
+ * method of only on the local node using {@link 
IgniteCache#localQuery(Query)} method.
+ * Note that in case query is distributed and a new node joins, it will get 
the remote
+ * filter for the query during discovery process before it actually joins 
topology,
+ * so no updates will be missed.
+ * <p>
+ * To create a new instance of continuous query use {@link Query#continuous()} 
factory method.
+ * <h1 class="header">Example</h1>
+ * As an example, suppose we have cache with {@code 'Person'} objects and we 
need
+ * to query all persons with salary above 1000.
+ * <p>
+ * Here is the {@code Person} class:
+ * <pre name="code" class="java">
+ * public class Person {
+ *     // Name.
+ *     private String name;
+ *
+ *     // Salary.
+ *     private double salary;
+ *
+ *     ...
+ * }
+ * </pre>
+ * <p>
+ * You can create and execute continuous query like so:
+ * <pre name="code" class="java">
+ * // Create new continuous query.
+ * ContinuousQuery qry = Query.continuous();
+ *
+ * // Initial iteration query will return all persons with salary above 1000.
+ * qry.setInitialPredicate(Query.scan(new IgniteBiPredicate&lt;UUID, 
Person&gt;() {
+ *     &#64;Override public boolean apply(UUID id, Person p) {
+ *         return p.getSalary() &gt; 1000;
+ *     }
+ * }));
+ *
+ *
+ * // Callback that is called locally when update notifications are received.
+ * // It simply prints out information about all created persons.
+ * qry.setLocalListener(new CacheEntryUpdatedListener&lt;UUID, Person&gt;() {
+ *     &#64;Override public void onUpdated(Iterable&lt;CacheEntryEvent&lt;? 
extends UUID, ? extends Person&gt;&gt; evts) {
+ *         for (CacheEntryEvent&lt;? extends UUID, ? extends Person&gt; e : 
evts) {
+ *             Person p = e.getValue();
+ *
+ *             X.println("&gt;&gt;&gt;");
+ *             X.println("&gt;&gt;&gt; " + p.getFirstName() + " " + 
p.getLastName() +
+ *                 "'s salary is " + p.getSalary());
+ *             X.println("&gt;&gt;&gt;");
+ *         }
+ *     }
+ * });
+ *
+ * // Continuous listener will be notified for persons with salary above 1000.
+ * qry.setRemoteFilter(new CacheEntryEventFilter&lt;UUID, Person&gt;() {
+ *     &#64;Override public boolean evaluate(CacheEntryEvent&lt;? extends 
UUID, ? extends Person&gt; e) {
+ *         return e.getValue().getSalary() &gt; 1000;
+ *     }
+ * });
+ *
+ * // Execute query and get cursor that iterates through initial data.
+ * QueryCursor&lt;Cache.Entry&lt;UUID, Person&gt;&gt; cur = cache.query(qry);
+ * </pre>
+ * This will execute query on all nodes that have cache you are working with 
and
+ * listener will start to receive notifications for cache updates.
+ * <p>
+ * To stop receiving updates call {@link QueryCursor#close()} method:
+ * <pre name="code" class="java">
+ * cur.close();
+ * </pre>
+ * Note that this works even if you didn't provide initial query. Cursor will
+ * be empty in this case, but it will still unregister listeners when {@link 
QueryCursor#close()}
+ * is called.
+ */
+public final class ContinuousQuery<K, V> extends Query<ContinuousQuery<K,V>> {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /**
+     * Default buffer size. Size of {@code 1} means that all entries
+     * will be sent to master node immediately (buffering is disabled).
+     */
+    public static final int DFLT_BUF_SIZE = 1;
+
+    /** Maximum default time interval after which buffer will be flushed (if 
buffering is enabled). */
+    public static final long DFLT_TIME_INTERVAL = 0;
+
+    /**
+     * Default value for automatic unsubscription flag. Remote filters
+     * will be unregistered by default if master node leaves topology.
+     */
+    public static final boolean DFLT_AUTO_UNSUBSCRIBE = true;
+
+    /** Initial filter. */
+    private Query initFilter;
+
+    /** Local listener. */
+    private CacheEntryUpdatedListener<K, V> locLsnr;
+
+    /** Remote filter. */
+    private CacheEntryEventFilter<K, V> rmtFilter;
+
+    /** Buffer size. */
+    private int bufSize = DFLT_BUF_SIZE;
+
+    /** Time interval. */
+    private long timeInterval = DFLT_TIME_INTERVAL;
+
+    /** Automatic unsubscription flag. */
+    private boolean autoUnsubscribe = DFLT_AUTO_UNSUBSCRIBE;
+
+    /**
+     * Sets initial query.
+     * <p>
+     * This query will be executed before continuous listener is registered
+     * which allows to iterate through entries which already existed at the
+     * time continuous query is executed.
+     *
+     * @param initFilter Initial query.
+     * @return {@code this} for chaining.
+     */
+    public ContinuousQuery<K, V> setInitialPredicate(Query initFilter) {
+        this.initFilter = initFilter;
+
+        return this;
+    }
+
+    /**
+     * Gets initial query.
+     *
+     * @return Initial query.
+     */
+    public Query getInitialPredicate() {
+        return initFilter;
+    }
+
+    /**
+     * Sets local callback. This callback is called only in local node when 
new updates are received.
+     * <p>
+     * The callback predicate accepts ID of the node from where updates are 
received and collection
+     * of received entries. Note that for removed entries value will be {@code 
null}.
+     * <p>
+     * If the predicate returns {@code false}, query execution will be 
cancelled.
+     * <p>
+     * <b>WARNING:</b> all operations that involve any kind of JVM-local or 
distributed locking (e.g.,
+     * synchronization or transactional cache operations), should be executed 
asynchronously without
+     * blocking the thread that called the callback. Otherwise, you can get 
deadlocks.
+     *
+     * @param locLsnr Local callback.
+     * @return {@code this} for chaining.
+     */
+    public ContinuousQuery<K, V> setLocalListener(CacheEntryUpdatedListener<K, 
V> locLsnr) {
+        this.locLsnr = locLsnr;
+
+        return this;
+    }
+
+    /**
+     * Gets local listener.
+     *
+     * @return Local listener.
+     */
+    public CacheEntryUpdatedListener<K, V> getLocalListener() {
+        return locLsnr;
+    }
+
+    /**
+     * Sets optional key-value filter. This filter is called before entry is 
sent to the master node.
+     * <p>
+     * <b>WARNING:</b> all operations that involve any kind of JVM-local or 
distributed locking
+     * (e.g., synchronization or transactional cache operations), should be 
executed asynchronously
+     * without blocking the thread that called the filter. Otherwise, you can 
get deadlocks.
+     *
+     * @param rmtFilter Key-value filter.
+     * @return {@code this} for chaining.
+     */
+    public ContinuousQuery<K, V> setRemoteFilter(CacheEntryEventFilter<K, V> 
rmtFilter) {
+        this.rmtFilter = rmtFilter;
+
+        return this;
+    }
+
+    /**
+     * Gets remote filter.
+     *
+     * @return Remote filter.
+     */
+    public CacheEntryEventFilter<K, V> getRemoteFilter() {
+        return rmtFilter;
+    }
+
+    /**
+     * Sets buffer size.
+     * <p>
+     * When a cache update happens, entry is first put into a buffer. Entries 
from buffer will be
+     * sent to the master node only if the buffer is full or time provided via 
{@link #setTimeInterval(long)} method is
+     * exceeded.
+     * <p>
+     * Default buffer size is {@code 1} which means that entries will be sent 
immediately (buffering is
+     * disabled).
+     *
+     * @param bufSize Buffer size.
+     * @return {@code this} for chaining.
+     */
+    public ContinuousQuery<K, V> setBufferSize(int bufSize) {
+        if (bufSize <= 0)
+            throw new IllegalArgumentException("Buffer size must be above 
zero.");
+
+        this.bufSize = bufSize;
+
+        return this;
+    }
+
+    /**
+     * Gets buffer size.
+     *
+     * @return Buffer size.
+     */
+    public int getBufferSize() {
+        return bufSize;
+    }
+
+    /**
+     * Sets time interval.
+     * <p>
+     * When a cache update happens, entry is first put into a buffer. Entries 
from buffer will
+     * be sent to the master node only if the buffer is full (its size can be 
provided via {@link #setBufferSize(int)}
+     * method) or time provided via this method is exceeded.
+     * <p>
+     * Default time interval is {@code 0} which means that
+     * time check is disabled and entries will be sent only when buffer is 
full.
+     *
+     * @param timeInterval Time interval.
+     * @return {@code this} for chaining.
+     */
+    public ContinuousQuery<K, V> setTimeInterval(long timeInterval) {
+        if (timeInterval < 0)
+            throw new IllegalArgumentException("Time interval can't be 
negative.");
+
+        this.timeInterval = timeInterval;
+
+        return this;
+    }
+
+    /**
+     * Gets time interval.
+     *
+     * @return Time interval.
+     */
+    public long getTimeInterval() {
+        return timeInterval;
+    }
+
+    /**
+     * Sets automatic unsubscribe flag.
+     * <p>
+     * This flag indicates that query filters on remote nodes should be
+     * automatically unregistered if master node (node that initiated the 
query) leaves topology. If this flag is
+     * {@code false}, filters will be unregistered only when the query is 
cancelled from master node, and won't ever be
+     * unregistered if master node leaves grid.
+     * <p>
+     * Default value for this flag is {@code true}.
+     *
+     * @param autoUnsubscribe Automatic unsubscription flag.
+     * @return {@code this} for chaining.
+     */
+    public ContinuousQuery<K, V> setAutoUnsubscribe(boolean autoUnsubscribe) {
+        this.autoUnsubscribe = autoUnsubscribe;
+
+        return this;
+    }
+
+    /**
+     * Gets automatic unsubscription flag value.
+     *
+     * @return Automatic unsubscription flag.
+     */
+    public boolean isAutoUnsubscribe() {
+        return autoUnsubscribe;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/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 1298e3d..9c25a8a 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
@@ -330,7 +330,7 @@ public class IgniteCacheProxy<K, V> extends 
AsyncSupportAdapter<IgniteCache<K, V
      * @return Local node cluster group.
      */
     private ClusterGroup projection(boolean local) {
-        return local || ctx.isLocal() || ctx.isReplicated() ? 
ctx.kernalContext().grid().forLocal() : null;
+        return local || ctx.isLocal() || ctx.isReplicated() ? 
ctx.kernalContext().grid().cluster().forLocal() : null;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/QueryCursorImpl.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/QueryCursorImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/QueryCursorImpl.java
deleted file mode 100644
index d7691e6..0000000
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/QueryCursorImpl.java
+++ /dev/null
@@ -1,87 +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.internal.processors.cache.query;
-
-import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
-
-import java.util.*;
-
-/**
- * Query cursor implementation.
- */
-public class QueryCursorImpl<T> implements QueryCursor<T> {
-    /** */
-    private Iterator<T> iter;
-
-    /** */
-    private boolean iterTaken;
-
-    /**
-     * @param iter Iterator.
-     */
-    public QueryCursorImpl(Iterator<T> iter) {
-        this.iter = iter;
-    }
-
-    /** {@inheritDoc} */
-    @Override public Iterator<T> iterator() {
-        if (iter == null)
-            throw new IgniteException("Cursor is closed.");
-
-        if (iterTaken)
-            throw new IgniteException("Iterator is already taken from this 
cursor.");
-
-        iterTaken = true;
-
-        return iter;
-    }
-
-    /** {@inheritDoc} */
-    @Override public List<T> getAll() {
-        ArrayList<T> all = new ArrayList<>();
-
-        try {
-            for (T t : this) // Implicitly calls iterator() to do all checks.
-                all.add(t);
-        }
-        finally {
-            close();
-        }
-
-        return all;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void close() {
-        Iterator<T> i;
-
-        if ((i = iter) != null) {
-            iter = null;
-
-            if (i instanceof AutoCloseable) {
-                try {
-                    ((AutoCloseable)i).close();
-                }
-                catch (Exception e) {
-                    throw new IgniteException(e);
-                }
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java
index 15e9576..b41424d 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java
@@ -21,9 +21,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cache.query.annotations.*;
-import org.apache.ignite.cache.query.annotations.*;
-import org.apache.ignite.internal.processors.cache.query.*;
-import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 
 import javax.cache.*;
@@ -73,8 +70,6 @@ public class IgniteCacheQueryIndexSelfTest extends 
GridCacheAbstractSelfTest {
 
         IgniteCache<Integer, CacheValue> cache0 = grid(0).jcache(null);
 
-        GridCache<Integer, CacheValue> cache0 = 
((IgniteKernal)grid(0)).cache(null);
-
         checkCache(cache0);
         checkQuery(cache0);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 917f9b3..db37b1d 100644
--- 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -21,7 +21,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cache.query.annotations.*;
-import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
@@ -1480,24 +1479,6 @@ public class IgniteH2Indexing implements 
GridQueryIndexing {
         return offheap == null ? -1 : offheap.allocatedSize();
     }
 
-    /** {@inheritDoc} */
-    @Override public IndexingQueryFilter backupFilter() {
-        return new IndexingQueryFilter() {
-            @Nullable @Override public <K, V> IgniteBiPredicate<K, V> 
forSpace(String spaceName) {
-                final GridCacheAdapter<Object, Object> cache = 
ctx.cache().internalCache(spaceName);
-
-                if (cache.context().isReplicated() || 
cache.configuration().getBackups() == 0)
-                    return null;
-
-                return new IgniteBiPredicate<K, V>() {
-                    @Override public boolean apply(K k, V v) {
-                        return 
cache.context().affinity().primary(ctx.discovery().localNode(), k, -1);
-                    }
-                };
-            }
-        };
-    }
-
     /**
      * @param spaceName Space name.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
index 99b29ec..ba1e519 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
@@ -21,10 +21,8 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.eviction.fifo.*;
 import org.apache.ignite.configuration.*;
-import 
org.apache.ignite.internal.processors.cache.IgniteCacheAbstractQuerySelfTest.*;
-import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.*;
-import 
org.apache.ignite.internal.processors.cache.GridCacheAbstractQuerySelfTest.*;
+import 
org.apache.ignite.internal.processors.cache.IgniteCacheAbstractQuerySelfTest.*;
 import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
index 6dc6fbc..aafca83 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
@@ -176,7 +176,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest 
extends GridCommonAbstrac
      * @throws Exception In case of error.
      */
     public void testDifferentKeyTypes() throws Exception {
-        GridCache<Object, Object> cache = ignite.cache(null);
+        GridCache<Object, Object> cache = ((IgniteKernal)ignite).cache(null);
 
         cache.putx("key", "value");
 
@@ -191,7 +191,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest 
extends GridCommonAbstrac
      * @throws Exception In case of error.
      */
     public void testDifferentValueTypes() throws Exception {
-        GridCache<Object, Object> cache = ignite.cache(null);
+        GridCache<Object, Object> cache = ((IgniteKernal)ignite).cache(null);
 
         cache.putx("key", "value");
 
@@ -476,7 +476,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest 
extends GridCommonAbstrac
             cache.put(i, new ObjectValue("test" + i, i));
 
         for (Ignite g : G.allGrids()) {
-            GridCache<Integer, ObjectValue> c = g.cache(null);
+            GridCache<Integer, ObjectValue> c = ((IgniteKernal)g).cache(null);
 
             for (int i = 0; i < cnt; i++) {
                 if (i % 2 == 0) {
@@ -604,8 +604,8 @@ public abstract class IgniteCacheAbstractQuerySelfTest 
extends GridCommonAbstrac
      * @throws Exception In case of error.
      */
     public void testRemoveIndex() throws Exception {
-        GridCache<Integer, ObjectValue> cache = ignite.cache(null);
-        GridCache<Integer, ObjectValue> cache1 = ignite.cache("c1");
+        GridCache<Integer, ObjectValue> cache = 
((IgniteKernal)ignite).cache(null);
+        GridCache<Integer, ObjectValue> cache1 = 
((IgniteKernal)ignite).cache("c1");
 
         ObjectValue val = new ObjectValue("test full text", 0);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryP2PEnabledSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryP2PEnabledSelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryP2PEnabledSelfTest.java
deleted file mode 100644
index 155f952..0000000
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryP2PEnabledSelfTest.java
+++ /dev/null
@@ -1,34 +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.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.configuration.*;
-
-/**
- * Tests for partitioned cache queries.
- */
-public class GridCachePartitionedQueryP2PEnabledSelfTest extends 
GridCachePartitionedQuerySelfTest {
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
-        IgniteConfiguration c = super.getConfiguration(gridName);
-
-        c.setPeerClassLoadingEnabled(true);
-
-        return c;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
deleted file mode 100644
index 4c2f588..0000000
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
+++ /dev/null
@@ -1,479 +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.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
-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.util.lang.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.jetbrains.annotations.*;
-
-import java.util.*;
-
-import static org.apache.ignite.cache.CacheMode.*;
-
-/**
- * Tests for partitioned cache queries.
- */
-public class GridCachePartitionedQuerySelfTest extends 
GridCacheAbstractQuerySelfTest {
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 3;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return PARTITIONED;
-    }
-
-    /**
-     * JUnit.
-     *
-     * @throws Exception If failed.
-     */
-    public void testSingleNodeQuery() throws Exception {
-        Person p1 = new Person("Jon", 1500);
-        Person p2 = new Person("Jane", 2000);
-        Person p3 = new Person("Mike", 1800);
-        Person p4 = new Person("Bob", 1900);
-
-        GridCache<UUID, Person> cache0 = ((IgniteKernal)grid(0)).cache(null);
-
-        cache0.put(p1.id(), p1);
-        cache0.put(p2.id(), p2);
-        cache0.put(p3.id(), p3);
-        cache0.put(p4.id(), p4);
-
-        assertEquals(4, cache0.size());
-
-        CacheQuery<Map.Entry<UUID, Person>> qry = 
cache0.queries().createSqlQuery(Person.class,
-            "salary < 2000").projection(grid(0).cluster().forLocal());
-
-        // Include backup entries.
-        qry.includeBackups(true);
-
-        // In order to get accumulated result from all queried nodes.
-        qry.keepAll(true);
-
-        Collection<Map.Entry<UUID, Person>> entries = qry.execute().get();
-
-        assert entries != null;
-
-        info("Queried persons: " + F.viewReadOnly(entries, 
F.<Person>mapEntry2Value()));
-
-        assertEquals(3, entries.size());
-
-        checkResult(entries, p1, p3, p4);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testFieldsQuery() throws Exception {
-        Person p1 = new Person("Jon", 1500);
-        Person p2 = new Person("Jane", 2000);
-        Person p3 = new Person("Mike", 1800);
-        Person p4 = new Person("Bob", 1900);
-
-        Ignite ignite0 = grid(0);
-
-        GridCache<UUID, Person> cache0 = ((IgniteKernal)ignite0).cache(null);
-
-        cache0.put(p1.id(), p1);
-        cache0.put(p2.id(), p2);
-        cache0.put(p3.id(), p3);
-        cache0.put(p4.id(), p4);
-
-        assertEquals(4, cache0.size());
-
-        // Fields query
-        CacheQuery<List<?>> qry = 
cache0.queries().createSqlFieldsQuery("select name from Person where salary > 
?").
-            projection(ignite0.cluster());
-
-        Collection<List<?>> res = qry.execute(1600).get();
-
-        assertEquals(3, res.size());
-
-        // Fields query count(*)
-        qry = cache0.queries().createSqlFieldsQuery("select count(*) from 
Person").projection(ignite0.cluster());
-
-        res = qry.execute().get();
-
-        int cnt = 0;
-
-        for (List<?> row : res)
-            cnt += (Long)row.get(0);
-
-        assertEquals(4, cnt);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testMultipleNodesQuery() throws Exception {
-        Person p1 = new Person("Jon", 1500);
-        Person p2 = new Person("Jane", 2000);
-        Person p3 = new Person("Mike", 1800);
-        Person p4 = new Person("Bob", 1900);
-
-        GridCache<UUID, Person> cache0 = ((IgniteKernal)grid(0)).cache(null);
-
-        cache0.put(p1.id(), p1);
-        cache0.put(p2.id(), p2);
-        cache0.put(p3.id(), p3);
-        cache0.put(p4.id(), p4);
-
-        assertEquals(4, cache0.size());
-
-        assert grid(0).cluster().nodes().size() == gridCount();
-
-        CacheQuery<Map.Entry<UUID, Person>> qry = 
cache0.queries().createSqlQuery(Person.class,
-            "salary < 2000");
-
-        // Include backup entries and disable de-duplication.
-        qry.includeBackups(true);
-        qry.enableDedup(false);
-
-        // In order to get accumulated result from all queried nodes.
-        qry.keepAll(true);
-
-        // Execute on full projection, duplicates are expected.
-        Collection<Map.Entry<UUID, Person>> entries = qry.execute().get();
-
-        assert entries != null;
-
-        info("Queried entries: " + entries);
-
-        info("Queried persons: " + F.viewReadOnly(entries, 
F.<Person>mapEntry2Value()));
-
-        // Expect result including backup persons.
-        assertEquals(3 * gridCount(), entries.size());
-
-        checkResult(entries, p1, p3, p4);
-
-        // Now do the same filtering but using projection.
-        qry = cache0.queries().createSqlQuery(Person.class, "salary < 2000");
-
-        qry.keepAll(true);
-
-        entries = qry.execute().get();
-
-        assert entries != null;
-
-        info("Queried persons: " + F.viewReadOnly(entries, 
F.<Person>mapEntry2Value()));
-
-        // Expect result including backup persons.
-        assertEquals(3, entries.size());
-
-        checkResult(entries, p1, p3, p4);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testIncludeBackupsAndEnableDedup() throws Exception {
-        Person p1 = new Person("Jon", 1500);
-        Person p2 = new Person("Jane", 2000);
-        Person p3 = new Person("Mike", 1800);
-        Person p4 = new Person("Bob", 1900);
-
-        GridCache<UUID, Person> cache0 = ((IgniteKernal)grid(0)).cache(null);
-
-        cache0.put(p1.id(), p1);
-        cache0.put(p2.id(), p2);
-        cache0.put(p3.id(), p3);
-        cache0.put(p4.id(), p4);
-
-        // Retry several times.
-        for (int i = 0; i < 10; i++) {
-            CacheQuery<Map.Entry<UUID, Person>> qry = 
cache0.queries().createSqlQuery(Person.class,
-                "salary < 2000");
-
-            // Include backup entries and disable de-duplication.
-            qry.includeBackups(true);
-            qry.enableDedup(false);
-
-            Collection<Map.Entry<UUID, Person>> entries = qry.execute().get();
-
-            info("Entries: " + entries);
-
-            assertEquals(gridCount() * 3, entries.size());
-
-            // Recreate query since we cannot use the old one.
-            qry = cache0.queries().createSqlQuery(Person.class, "salary < 
2000");
-
-            // Exclude backup entries and enable de-duplication.
-            qry.includeBackups(false);
-            qry.enableDedup(true);
-
-            entries = qry.execute().get();
-
-            assertEquals(3, entries.size());
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    @SuppressWarnings("FloatingPointEquality")
-    public void testScanReduceQuery() throws Exception {
-        GridCache<UUID, Person> c = ((IgniteKernal)ignite).cache(null);
-
-        Person p1 = new Person("Bob White", 1000);
-        Person p2 = new Person("Tom White", 2000);
-        Person p3 = new Person("Mike Green", 20000);
-
-        c.put(p1.id(), p1);
-        c.put(p2.id(), p2);
-        c.put(p3.id(), p3);
-
-        CacheQuery<Map.Entry<UUID, Person>> q = 
c.queries().createScanQuery(new P2<UUID, Person>() {
-            @Override public boolean apply(UUID k, Person p) {
-                return p.salary() < 20000;
-            }
-        });
-
-        R1<IgnitePair<Integer>, Double> locRdc = new R1<IgnitePair<Integer>, 
Double>() {
-            private double sum;
-
-            private int cnt;
-
-            @Override public boolean collect(IgnitePair<Integer> p) {
-                sum += p.get1();
-                cnt += p.get2();
-
-                return true;
-            }
-
-            @Override public Double reduce() {
-                return sum / cnt;
-            }
-        };
-
-        Collection<IgnitePair<Integer>> res = q.execute(new R1<Map.Entry<UUID, 
Person>, IgnitePair<Integer>>() {
-            private int sum;
-
-            private int cnt;
-
-            @Override public boolean collect(Map.Entry<UUID, Person> e) {
-                sum += e.getValue().salary();
-                cnt++;
-
-                return true;
-            }
-
-            @Override public IgnitePair<Integer> reduce() {
-                return new IgnitePair<>(sum, cnt);
-            }
-        }).get();
-
-        assertEquals(1500., F.reduce(res, locRdc));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    @SuppressWarnings("FloatingPointEquality")
-    public void testSqlReduceQuery() throws Exception {
-        GridCache<UUID, Person> c = ((IgniteKernal)ignite).cache(null);
-
-        Person p1 = new Person("Bob White", 1000);
-        Person p2 = new Person("Tom White", 2000);
-        Person p3 = new Person("Mike Green", 20000);
-
-        c.put(p1.id(), p1);
-        c.put(p2.id(), p2);
-        c.put(p3.id(), p3);
-
-        CacheQuery<Map.Entry<UUID, Person>> q = 
c.queries().createSqlQuery(Person.class, "salary < 20000");
-
-        R1<IgnitePair<Integer>, Double> locRdc = new R1<IgnitePair<Integer>, 
Double>() {
-            private double sum;
-
-            private int cnt;
-
-            @Override public boolean collect(IgnitePair<Integer> p) {
-                sum += p.get1();
-                cnt += p.get2();
-
-                return true;
-            }
-
-            @Override public Double reduce() {
-                return sum / cnt;
-            }
-        };
-
-        Collection<IgnitePair<Integer>> res = q.execute(new R1<Map.Entry<UUID, 
Person>, IgnitePair<Integer>>() {
-            private int sum;
-
-            private int cnt;
-
-            @Override public boolean collect(Map.Entry<UUID, Person> e) {
-                sum += e.getValue().salary();
-                cnt++;
-
-                return true;
-            }
-
-            @Override public IgnitePair<Integer> reduce() {
-                return new IgnitePair<>(sum, cnt);
-            }
-        }).get();
-
-        assert F.reduce(res, locRdc) == 1500;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    @SuppressWarnings("FloatingPointEquality")
-    public void testLuceneReduceQuery() throws Exception {
-        GridCache<UUID, Person> c = ((IgniteKernal)ignite).cache(null);
-
-        Person p1 = new Person("Bob White", 1000);
-        Person p2 = new Person("Tom White", 2000);
-        Person p3 = new Person("Mike Green", 20000);
-
-        c.put(p1.id(), p1);
-        c.put(p2.id(), p2);
-        c.put(p3.id(), p3);
-
-        CacheQuery<Map.Entry<UUID, Person>> q = 
c.queries().createFullTextQuery(Person.class, "White");
-
-        R1<IgnitePair<Integer>, Double> locRdc = new R1<IgnitePair<Integer>, 
Double>() {
-            private double sum;
-
-            private int cnt;
-
-            @Override public boolean collect(IgnitePair<Integer> p) {
-                sum += p.get1();
-                cnt += p.get2();
-
-                return true;
-            }
-
-            @Override public Double reduce() {
-                return sum / cnt;
-            }
-        };
-
-        Collection<IgnitePair<Integer>> res = q.execute(new R1<Map.Entry<UUID, 
Person>, IgnitePair<Integer>>() {
-            private int sum;
-
-            private int cnt;
-
-            @Override public boolean collect(Map.Entry<UUID, Person> e) {
-                sum += e.getValue().salary();
-                cnt++;
-
-                return true;
-            }
-
-            @Override public IgnitePair<Integer> reduce() {
-                return new IgnitePair<>(sum, cnt);
-            }
-        }).get();
-
-        assert F.reduce(res, locRdc) == 1500;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPaginationGet0() throws Exception {
-        int key = 0;
-
-        for (int i = 0; i < gridCount(); i++) {
-            int cnt = 0;
-
-            while (true) {
-                if 
(((IgniteKernal)grid(i)).cache(null).affinity().mapKeyToNode(key).equals(grid(i).localNode()))
 {
-                    assertTrue(((IgniteKernal)grid(i)).cache(null).putx(key, 
key));
-
-                    cnt++;
-                }
-
-                key++;
-
-                if (cnt == (i == 1 ? 2 : 3))
-                    break;
-            }
-        }
-
-        for (int i = 0; i < gridCount(); i++)
-            assertEquals(i == 1 ? 2 : 3, 
((IgniteKernal)grid(i)).cache(null).primarySize());
-
-        GridCache<Integer, Integer> cache = ((IgniteKernal)ignite).cache(null);
-
-        CacheQuery<Map.Entry<Integer, Integer>> q = 
cache.queries().createSqlQuery(Integer.class, "_key >= 0");
-
-        q.pageSize(2);
-        q.includeBackups(false);
-        q.enableDedup(true);
-
-        Collection<Map.Entry<Integer, Integer>> res = q.execute().get();
-
-        assertEquals(gridCount() * 3 - 1, res.size());
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testReduceWithPagination() throws Exception {
-        GridCache<Integer, Integer> c = ((IgniteKernal)grid(0)).cache(null);
-
-        for (int i = 0; i < 50; i++)
-            assertTrue(c.putx(i, 10));
-
-        CacheQuery<Map.Entry<Integer, Integer>> q = 
c.queries().createSqlQuery(Integer.class, "_key >= 0");
-
-        q.pageSize(10);
-
-        int res = F.sumInt(q.execute(new R1<Map.Entry<Integer, Integer>, 
Integer>() {
-            private int sum;
-
-            @Override public boolean collect(@Nullable Map.Entry<Integer, 
Integer> e) {
-                sum += e.getValue();
-
-                return true;
-            }
-
-            @Override public Integer reduce() {
-                return sum;
-            }
-        }).get());
-
-        assertEquals(500, res);
-    }
-
-    /**
-     * @param entries Queried result.
-     * @param persons Persons that should be in the result.
-     */
-    private void checkResult(Iterable<Map.Entry<UUID, Person>> entries, 
Person... persons) {
-        for (Map.Entry<UUID, Person> entry : entries) {
-            assertEquals(entry.getKey(), entry.getValue().id());
-
-            assert F.asList(persons).contains(entry.getValue());
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedFieldsQueryP2PDisabledSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedFieldsQueryP2PDisabledSelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedFieldsQueryP2PDisabledSelfTest.java
index 01353b4..1d874d8 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedFieldsQueryP2PDisabledSelfTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedFieldsQueryP2PDisabledSelfTest.java
@@ -27,7 +27,7 @@ public class 
IgniteCachePartitionedFieldsQueryP2PDisabledSelfTest extends Ignite
     @Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
         IgniteConfiguration c = super.getConfiguration(gridName);
 
-        c.setPeerClassLoadingEnabled(false);
+        c.setPeerClassLoadingEnabled(true);
 
         return c;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQueryP2PDisabledSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQueryP2PDisabledSelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQueryP2PDisabledSelfTest.java
index 4779a98..a7578b2 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQueryP2PDisabledSelfTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQueryP2PDisabledSelfTest.java
@@ -27,7 +27,7 @@ public class IgniteCachePartitionedQueryP2PDisabledSelfTest 
extends IgniteCacheP
     @Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
         IgniteConfiguration c = super.getConfiguration(gridName);
 
-        c.setPeerClassLoadingEnabled(false);
+        c.setPeerClassLoadingEnabled(true);
 
         return c;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQuerySelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQuerySelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQuerySelfTest.java
index 5cef6f1..fb9ad9a 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQuerySelfTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQuerySelfTest.java
@@ -102,7 +102,7 @@ public class IgniteCachePartitionedQuerySelfTest extends 
IgniteCacheAbstractQuer
 
         assertEquals(4, cache0.localSize());
 
-        assert grid(0).nodes().size() == gridCount();
+        assert grid(0).cluster().nodes().size() == gridCount();
 
         QueryCursor<Cache.Entry<UUID, Person>> qry =
             cache0.query(sql(Person.class, "salary < 2000"));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQueryP2PEnabledSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQueryP2PEnabledSelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQueryP2PEnabledSelfTest.java
deleted file mode 100644
index 6d70918..0000000
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQueryP2PEnabledSelfTest.java
+++ /dev/null
@@ -1,34 +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.internal.processors.cache.distributed.replicated;
-
-import org.apache.ignite.configuration.*;
-
-/**
- * Tests replicated query.
- */
-public class GridCacheReplicatedQueryP2PEnabledSelfTest extends 
GridCacheReplicatedQuerySelfTest {
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
-        IgniteConfiguration c = super.getConfiguration(gridName);
-
-        c.setPeerClassLoadingEnabled(true);
-
-        return c;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQueryP2PDisabledSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQueryP2PDisabledSelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQueryP2PDisabledSelfTest.java
index c22783a..cdfb051 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQueryP2PDisabledSelfTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQueryP2PDisabledSelfTest.java
@@ -27,7 +27,7 @@ public class 
IgniteCacheReplicatedFieldsQueryP2PDisabledSelfTest extends IgniteC
     @Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
         IgniteConfiguration c = super.getConfiguration(gridName);
 
-        c.setPeerClassLoadingEnabled(false);
+        c.setPeerClassLoadingEnabled(true);
 
         return c;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQueryP2PDisabledSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQueryP2PDisabledSelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQueryP2PDisabledSelfTest.java
index 017b75d..5c4ccf9 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQueryP2PDisabledSelfTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQueryP2PDisabledSelfTest.java
@@ -27,7 +27,7 @@ public class IgniteCacheReplicatedQueryP2PDisabledSelfTest 
extends IgniteCacheRe
     @Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
         IgniteConfiguration c = super.getConfiguration(gridName);
 
-        c.setPeerClassLoadingEnabled(false);
+        c.setPeerClassLoadingEnabled(true);
 
         return c;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java
index 25ab2ac..16749f8 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java
@@ -22,8 +22,6 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
-import org.apache.ignite.cache.query.annotations.*;
-import org.apache.ignite.cluster.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
@@ -180,7 +178,7 @@ public class IgniteCacheReplicatedQuerySelfTest extends 
IgniteCacheAbstractQuery
     public void testLocalQuery() throws Exception {
         cache1.clear();
 
-        IgniteTx tx = ignite1.transactions().txStart();
+        Transaction tx = ignite1.transactions().txStart();
 
         try {
             cache1.put(new CacheKey(1), new CacheValue("1"));
@@ -222,7 +220,7 @@ public class IgniteCacheReplicatedQuerySelfTest extends 
IgniteCacheAbstractQuery
         ignite2.events().localListen(lsnr, EventType.EVT_CACHE_OBJECT_PUT);
         ignite3.events().localListen(lsnr, EventType.EVT_CACHE_OBJECT_PUT);
 
-        IgniteTx tx = ignite1.transactions().txStart();
+        Transaction tx = ignite1.transactions().txStart();
 
         try {
             for (int i = 1; i <= keyCnt; i++)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42c1213b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
 
b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
index 83b63d8..c2bcad5 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
@@ -65,7 +65,6 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
         suite.addTestSuite(GridCacheReduceQueryMultithreadedSelfTest.class);
         suite.addTestSuite(GridCacheCrossCacheQuerySelfTest.class);
         suite.addTestSuite(GridCacheCrossCacheQuerySelfTestNewApi.class);
-        suite.addTestSuite(GridCacheSqlQueryMultiThreadedSelfTest.class);
 
         // Fields queries.
         suite.addTestSuite(IgniteCacheLocalFieldsQuerySelfTest.class);

Reply via email to