Merge branches 'ignite-sprint-5' and 'ignite-sprint-6' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-sprint-6
Conflicts: modules/core/src/main/java/org/apache/ignite/cache/query/ScanQuery.java modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java modules/scalar-2.10/pom.xml modules/spark-2.10/pom.xml modules/spark/pom.xml modules/visor-console-2.10/pom.xml Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/460521c3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/460521c3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/460521c3 Branch: refs/heads/ignite-960 Commit: 460521c353e7672c686e90df38d0356455e3c397 Parents: 40f826b 4375529 Author: Yakov Zhdanov <yzhda...@gridgain.com> Authored: Mon Jun 15 10:21:46 2015 +0300 Committer: Yakov Zhdanov <yzhda...@gridgain.com> Committed: Mon Jun 15 10:21:46 2015 +0300 ---------------------------------------------------------------------- .../apache/ignite/cache/query/ScanQuery.java | 23 ++++++++++++++++++++ .../cache/query/GridCacheQueryManager.java | 5 +++++ .../testsuites/IgniteCacheTestSuite4.java | 2 ++ 3 files changed, 30 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/460521c3/modules/core/src/main/java/org/apache/ignite/cache/query/ScanQuery.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/cache/query/ScanQuery.java index e6b69bc,11a8c84..90000e8 --- a/modules/core/src/main/java/org/apache/ignite/cache/query/ScanQuery.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/query/ScanQuery.java @@@ -99,23 -99,26 +99,46 @@@ public final class ScanQuery<K, V> exte /** * Gets partition number over which this query should iterate. Will return {@code null} if partition was not * set. In this case query will iterate over all partitions in the cache. + * + * @return Partition number or {@code null}. + */ + @Nullable public Integer getPartition() { + return part; + } + + /** + * Sets partition number over which this query should iterate. If {@code null}, query will iterate over + * all partitions in the cache. Must be in the range [0, N) where N is partition number in the cache. + * + * @param part Partition number over which this query should iterate. + * @return {@code this} for chaining. + */ + public ScanQuery<K, V> setPartition(@Nullable Integer part) { + this.part = part; + + return this; + } + ++ /** ++ * Gets partition number over which this query should iterate. Will return {@code null} if partition was not ++ * set. In this case query will iterate over all partitions in the cache. + * + * @return Partition number or {@code null}. + */ + @Nullable public Integer getPartition() { + return part; + } + + /** + * Sets partition number over which this query should iterate. If {@code null}, query will iterate over + * all partitions in the cache. Must be in the range [0, N) where N is partition number in the cache. + * + * @param part Partition number over which this query should iterate. + */ + public void setPartition(@Nullable Integer part) { + this.part = part; + } + /** {@inheritDoc} */ @Override public ScanQuery<K, V> setPageSize(int pageSize) { return (ScanQuery<K, V>)super.setPageSize(pageSize); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/460521c3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java index 1317d38,6e71ba7..7493d07 --- 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 @@@ -791,9 -791,8 +791,14 @@@ public abstract class GridCacheQueryMan locPart = dht.topology().localPartition(part, topVer, false); ++<<<<<<< HEAD + // double check for owning state + if (locPart == null || locPart.state() != OWNING || !locPart.reserve() || + locPart.state() != OWNING) ++======= + if (locPart == null || (locPart.state() != OWNING && locPart.state() != RENTING) || + !locPart.reserve()) ++>>>>>>> 4375529fa929e650f7b68d750318d67a8609ee10 throw new GridDhtInvalidPartitionException(part, "Partition can't be reserved"); iter = new Iterator<K>() { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/460521c3/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java ---------------------------------------------------------------------- diff --cc modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java index c598e38,ed9fc9a..7fa038c --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java @@@ -138,9 -140,6 +138,11 @@@ public class IgniteCacheTestSuite4 exte suite.addTestSuite(IgniteCacheManyClientsTest.class); + suite.addTestSuite(IgniteStartCacheInTransactionSelfTest.class); + suite.addTestSuite(IgniteStartCacheInTransactionAtomicSelfTest.class); + ++ suite.addTestSuite(IgniteCacheManyClientsTest.class); ++ return suite; } }