Ignite-53 review
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/fbf6e60a Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/fbf6e60a Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/fbf6e60a Branch: refs/heads/ignite-86 Commit: fbf6e60aeb6bad52c1473485cc4b5d267240b530 Parents: e8de0fc Author: Yakov Zhdanov <yzhda...@gridgain.com> Authored: Thu Jan 22 21:14:07 2015 +0300 Committer: Yakov Zhdanov <yzhda...@gridgain.com> Committed: Thu Jan 22 21:14:07 2015 +0300 ---------------------------------------------------------------------- .../internal/processors/cache/IgniteCacheProxy.java | 9 +++------ .../processors/cache/query/GridCacheQueryAdapter.java | 11 ++--------- .../processors/cache/query/GridCacheQueryManager.java | 3 ++- .../cache/GridCacheAbstractFullApiSelfTest.java | 10 +++++++--- 4 files changed, 14 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbf6e60a/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 fadb7be..51d03f4 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 @@ -878,12 +878,9 @@ public class IgniteCacheProxy<K, V> extends IgniteAsyncSupportAdapter implements GridCacheProjectionImpl<K, V> prev = gate.enter(prj); try { - GridCacheQuery<Map.Entry<K, V>> query = delegate.queries().createScanQuery(null); - - query.includeBackups(false); - query.keepAll(false); - - GridCacheQueryFuture<Map.Entry<K, V>> fut = query.execute(); + GridCacheQueryFuture<Map.Entry<K, V>> fut = delegate.queries().createScanQuery(null) + .keepAll(false) + .execute(); return ctx.itHolder().iterator(fut, new CacheIteratorConverter<Entry<K, V>, Map.Entry<K, V>>() { @Override protected Entry<K, V> convert(Map.Entry<K, V> e) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbf6e60a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java index ba4512c..38ecc74 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java @@ -65,13 +65,13 @@ public class GridCacheQueryAdapter<T> implements GridCacheQuery<T> { private volatile GridCacheQueryMetricsAdapter metrics; /** */ - private volatile int pageSize; + private volatile int pageSize = DFLT_PAGE_SIZE; /** */ private volatile long timeout; /** */ - private volatile boolean keepAll; + private volatile boolean keepAll = true; /** */ private volatile boolean incBackups; @@ -123,13 +123,6 @@ public class GridCacheQueryAdapter<T> implements GridCacheQuery<T> { log = cctx.logger(getClass()); - pageSize = DFLT_PAGE_SIZE; - timeout = 0; - keepAll = true; - incBackups = false; - dedup = false; - prj = null; - metrics = new GridCacheQueryMetricsAdapter(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbf6e60a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java index b65c566..adedf89 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java @@ -757,7 +757,8 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte GridIterator<IgniteBiTuple<K, V>> heapIt = new GridIteratorAdapter<IgniteBiTuple<K, V>>() { private IgniteBiTuple<K, V> next; - private Iterator<K> iter = qry.includeBackups() ? prj.keySet().iterator() : prj.primaryKeySet().iterator(); + private Iterator<K> iter = qry.includeBackups() || cctx.isReplicated() ? + prj.keySet().iterator() : prj.primaryKeySet().iterator(); { advance(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbf6e60a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java index b29fe67..cf4dca0 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java @@ -5092,10 +5092,14 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract Map<String, Integer> entries = new HashMap<>(); - for (int i = 0; i < SIZE; ++i) { - cache.put(Integer.toString(i), i); + try (IgniteDataLoader<String, Integer> dataLoader = ignite(0).dataLoader(null)) { + dataLoader.isolated(true); - entries.put(Integer.toString(i), i); + for (int i = 0; i < SIZE; ++i) { + dataLoader.addData(Integer.toString(i), i); + + entries.put(Integer.toString(i), i); + } } checkIteratorHasNext();