ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [7/7] ignite git commit: Merge master into ignite-3477
Date Tue, 14 Mar 2017 14:43:14 GMT
Merge master into ignite-3477


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

Branch: refs/heads/ignite-3477-master
Commit: 0bdcbb359bd818d8f3164eec48697b4bd0e5190a
Parents: 91210eb
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Tue Mar 14 17:41:53 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Tue Mar 14 17:41:53 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java      |  1 -
 .../processors/cache/GridCacheEntryEx.java      |  4 +-
 .../cache/IgniteCacheOffheapManagerImpl.java    |  4 +-
 .../GridDistributedCacheAdapter.java            |  4 +-
 .../dht/GridClientPartitionTopology.java        |  1 +
 .../dht/GridDhtPartitionTopology.java           |  1 +
 .../cache/query/GridCacheQueryManager.java      |  4 --
 .../service/GridServiceProcessor.java           |  2 +-
 .../ignite/internal/util/IgniteUtils.java       |  1 +
 .../internal/visor/query/VisorQueryArg.java     | 13 ++++-
 .../processors/cache/GridCacheTestEntryEx.java  |  2 -
 .../testsuites/IgniteCacheTestSuite2.java       | 13 +----
 .../processors/query/h2/IgniteH2Indexing.java   | 29 +++++------
 .../query/h2/database/H2PkHashIndex.java        |  8 ++-
 .../query/h2/database/H2TreeIndex.java          |  5 ++
 .../query/h2/opt/GridH2ScanIndex.java           | 55 +++++++++++---------
 .../processors/query/h2/opt/GridH2Table.java    | 22 ++++++--
 .../query/h2/opt/GridH2TreeIndex.java           |  5 --
 .../query/IgniteSqlSchemaIndexingTest.java      | 15 +++---
 .../query/h2/sql/H2CompareBigQueryTest.java     |  2 +-
 .../commands/cache/VisorCacheScanCommand.scala  |  2 +-
 .../yardstick/cache/IgniteGetBenchmark.java     | 28 ----------
 22 files changed, 104 insertions(+), 117 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/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 fc1d9e3..6bad92a 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
@@ -2030,7 +2030,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
                                 res = entry.innerGetVersioned(
                                     null,
                                     null,
-                                    /*unmarshal*/true,
                                     updateMetrics,
                                     evt,
                                     subjId,

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
index 8e6a9ec..99f9744 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
@@ -320,7 +320,6 @@ public interface GridCacheEntryEx {
         throws IgniteCheckedException, GridCacheEntryRemovedException;
 
     /**
-     * @param readSwap Flag indicating whether to check swap memory.
      * @param updateMetrics If {@code true} then metrics should be updated.
      * @param evt Flag to signal event notification.
      * @param subjId Subject ID initiated this read.
@@ -332,8 +331,7 @@ public interface GridCacheEntryEx {
      * @throws GridCacheEntryRemovedException If entry was removed.
      * @return Cached value, entry version and flag indicating if entry was reserved.
      */
-    public EntryGetResult innerGetAndReserveForLoad(boolean readSwap,
-        boolean updateMetrics,
+    public EntryGetResult innerGetAndReserveForLoad(boolean updateMetrics,
         boolean evt,
         UUID subjId,
         String taskName,

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
index f47d75e..0cfb0c8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
@@ -261,7 +261,7 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter
imple
 
             for (GridDhtLocalPartition locPart : cctx.topology().currentLocalPartitions())
{
                 if (primary) {
-                    if (cctx.affinity().primary(locNode, locPart.id(), topVer)) {
+                    if (cctx.affinity().primaryByPartition(locNode, locPart.id(), topVer))
{
                         cnt += locPart.size();
 
                         continue;
@@ -269,7 +269,7 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter
imple
                 }
 
                 if (backup) {
-                    if (cctx.affinity().backup(locNode, locPart.id(), topVer))
+                    if (cctx.affinity().backupByPartition(locNode, locPart.id(), topVer))
                         cnt += locPart.size();
                 }
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
index ed0d887..af3b040 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
@@ -300,8 +300,8 @@ public abstract class GridDistributedCacheAdapter<K, V> extends
GridCacheAdapter
 
             IgniteCacheOffheapManager offheap = ctx.offheap();
 
-            if (ctx.affinity().primary(ctx.localNode(), partition, topVer) && modes.primary
||
-                ctx.affinity().backup(ctx.localNode(), partition, topVer) && modes.backup)
+            if (ctx.affinity().primaryByPartition(ctx.localNode(), partition, topVer) &&
modes.primary ||
+                ctx.affinity().backupByPartition(ctx.localNode(), partition, topVer) &&
modes.backup)
                 size += offheap.entriesCount(partition);
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
index eb23c43..ef52f7b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
@@ -39,6 +39,7 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.Gri
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionFullMap;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap2;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture;
+import org.apache.ignite.internal.util.F0;
 import org.apache.ignite.internal.util.GridAtomicLong;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.typedef.F;

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopology.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopology.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopology.java
index 4f8de4e..ac3e2c8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopology.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopology.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache.distributed.dht;
 
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/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 da5b326..d746d54 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
@@ -3041,10 +3041,6 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
 
                 KeyCacheObject key = row.key();
 
-                if (entry.deleted())
-                    continue;
-
-                KeyCacheObject key = entry.key();
                 CacheObject val;
 
                 if (expiryPlc != null) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
index 13cbf1d..94cf6e0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
@@ -1676,7 +1676,7 @@ public class GridServiceProcessor extends GridProcessorAdapter implements
Ignite
                         while (it.hasNext()) {
                             Cache.Entry<Object, Object> e = it.next();
 
-                            if (cache.context().affinity().primary(ctx.grid().localNode(),
e.getKey(), topVer)) {
+                            if (cache.context().affinity().primaryByKey(ctx.grid().localNode(),
e.getKey(), topVer)) {
                                 String name = ((GridServiceAssignmentsKey)e.getKey()).name();
 
                                 try {

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index e7951f9..0455cd0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -238,6 +238,7 @@ import org.jetbrains.annotations.Nullable;
 import org.jsr166.ConcurrentHashMap8;
 import sun.misc.SharedSecrets;
 import sun.misc.URLClassPath;
+import sun.misc.Unsafe;
 
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_DISABLE_HOSTNAME_VERIFIER;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_HOME;

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArg.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArg.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArg.java
index a5eb3eb..c58c51c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArg.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArg.java
@@ -41,16 +41,20 @@ public class VisorQueryArg implements Serializable {
     /** Result batch size. */
     private final int pageSize;
 
+    /** Enforce join order flag. */
+    private final boolean enforceJoinOrder;
+
     /**
      * @param cacheName Cache name for query.
      * @param qryTxt Query text.
      * @param loc Flag whether to execute query locally.
      * @param pageSize Result batch size.
      */
-    public VisorQueryArg(String cacheName, String qryTxt, boolean distributedJoins, boolean
loc, int pageSize) {
+    public VisorQueryArg(String cacheName, String qryTxt, boolean distributedJoins, boolean
enforceJoinOrder, boolean loc, int pageSize) {
         this.cacheName = cacheName;
         this.qryTxt = qryTxt;
         this.distributedJoins = distributedJoins;
+        this.enforceJoinOrder = enforceJoinOrder;
         this.loc = loc;
         this.pageSize = pageSize;
     }
@@ -89,4 +93,11 @@ public class VisorQueryArg implements Serializable {
     public int pageSize() {
         return pageSize;
     }
+
+    /**
+     * @return Enforce join order flag.
+     */
+    public boolean enforceJoinOrder() {
+        return enforceJoinOrder;
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
index 49f0c98..46dec44 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
@@ -34,7 +34,6 @@ import org.apache.ignite.internal.processors.cache.version.GridCacheVersionedEnt
 import org.apache.ignite.internal.processors.dr.GridDrType;
 import org.apache.ignite.internal.util.lang.GridMetadataAwareAdapter;
 import org.apache.ignite.internal.util.lang.GridTuple3;
-import org.apache.ignite.internal.util.typedef.T2;
 import org.jetbrains.annotations.Nullable;
 
 /**
@@ -416,7 +415,6 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements
Gr
 
     /** @inheritDoc */
     @Override public EntryGetResult innerGetAndReserveForLoad(
-        boolean readSwap,
         boolean updateMetrics,
         boolean evt,
         UUID subjId,

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
index a759690..6710087 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
@@ -40,7 +40,6 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheEntryProcessorNode
 import org.apache.ignite.internal.processors.cache.IgniteCacheIncrementTxTest;
 import org.apache.ignite.internal.processors.cache.IgniteCachePartitionMapUpdateTest;
 import org.apache.ignite.internal.processors.cache.IgniteDynamicCacheAndNodeStop;
-import org.apache.ignite.internal.processors.cache.OffheapCacheOnClientsTest;
 import org.apache.ignite.internal.processors.cache.distributed.CacheLoadingConcurrentGridStartSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.CacheLoadingConcurrentGridStartSelfTestAllowOverwrite;
 import org.apache.ignite.internal.processors.cache.distributed.CacheLockReleaseNodeLeaveTest;
@@ -56,10 +55,7 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheColo
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheColocatedPreloadRestartSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheColocatedPrimarySyncSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheColocatedTxSingleThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtAtomicEvictionNearReadersSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtEntrySelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtEvictionNearReadersSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtEvictionSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtEvictionsDisabledSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtExpiredEntriesPreloadSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtMappingSelfTest;
@@ -77,10 +73,8 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePart
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedTopologyChangeSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedUnloadEventsSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.IgniteCachePartitionedBackupNodeFailureRecoveryTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearEvictionEventSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearMultiNodeSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearReadersSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearEvictionEventSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearExpiredEntriesPreloadSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearJobExecutionSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearMultiGetSelfTest;
@@ -114,19 +108,17 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePar
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedTxSingleThreadedSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedTxTimeoutSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheRendezvousAffinityClientSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridPartitionedBackupLoadSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheStoreUpdateTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridNearOffheapCacheStoreUpdateTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridPartitionedBackupLoadSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.NearCacheSyncUpdateTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.NoneRebalanceModeSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridNearOffheapCacheStoreUpdateTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedEvictionSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedJobExecutionTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicBasicStoreSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicGetAndTransformStoreSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalBasicApiSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalBasicStoreSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalEventSelfTest;
-import org.apache.ignite.internal.processors.cache.local.GridCacheLocalEvictionEventSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalGetAndTransformStoreSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalIsolatedNodesSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalLoadAllSelfTest;
@@ -274,7 +266,6 @@ public class IgniteCacheTestSuite2 extends TestSuite {
         suite.addTest(new TestSuite(IgniteNoCustomEventsOnNodeStart.class));
 
         suite.addTest(new TestSuite(CacheExchangeMessageDuplicatedStateTest.class));
-        suite.addTest(new TestSuite(OffheapCacheOnClientsTest.class));
         suite.addTest(new TestSuite(CacheConcurrentReadThroughTest.class));
 
         suite.addTest(new TestSuite(GridNearCacheStoreUpdateTest.class));

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/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 a3e492a..fa0437f 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
@@ -2994,28 +2994,23 @@ public class IgniteH2Indexing implements GridQueryIndexing {
             GridH2Table tbl,
             List<IndexColumn> cols
         ) {
-            try {
-                GridCacheSharedContext<Object, Object> scctx = ctx.cache().context();
+            GridCacheSharedContext<Object, Object> scctx = ctx.cache().context();
 
-                GridCacheContext cctx = scctx.cacheContext(cacheId);
+            GridCacheContext cctx = scctx.cacheContext(cacheId);
 
-                if (cctx.affinityNode() && cctx.offheapIndex()) {
-                    assert pkHashIdx == null : pkHashIdx;
+            if (cctx.affinityNode() && cctx.offheapIndex()) {
+                assert pkHashIdx == null : pkHashIdx;
 
-                    pkHashIdx = new H2PkHashIndex(
-                        cctx,
-                        tbl,
-                        name,
-                        cols);
-
-                    return pkHashIdx;
-                }
+                pkHashIdx = new H2PkHashIndex(
+                    cctx,
+                    tbl,
+                    name,
+                    cols);
 
-                return new GridH2TreeIndex(name, tbl, true, cols);
-            }
-            catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
+                return pkHashIdx;
             }
+
+            return new GridH2TreeIndex(name, tbl, true, cols);
         }
 
         /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2PkHashIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2PkHashIndex.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2PkHashIndex.java
index eb34be6..fb6ea95 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2PkHashIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2PkHashIndex.java
@@ -59,14 +59,13 @@ public class H2PkHashIndex extends GridH2IndexBase {
      * @param tbl Table.
      * @param name Index name.
      * @param colsList Index columns.
-     * @throws IgniteCheckedException If failed.
      */
     public H2PkHashIndex(
         GridCacheContext<?, ?> cctx,
         GridH2Table tbl,
         String name,
         List<IndexColumn> colsList
-    ) throws IgniteCheckedException {
+    ) {
 
         IndexColumn[] cols = colsList.toArray(new IndexColumn[colsList.size()]);
 
@@ -79,6 +78,11 @@ public class H2PkHashIndex extends GridH2IndexBase {
     }
 
     /** {@inheritDoc} */
+    @Override protected int segmentsCount() {
+        return 1;
+    }
+
+    /** {@inheritDoc} */
     @Override public Cursor find(Session ses, final SearchRow lower, final SearchRow upper)
{
         IndexingQueryFilter f = threadLocalFilter();
         IgniteBiPredicate<Object, Object> p = null;

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
index 4be40af..19f7bc6 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
@@ -138,6 +138,11 @@ public class H2TreeIndex extends GridH2IndexBase {
     }
 
     /** {@inheritDoc} */
+    @Override protected int segmentsCount() {
+        return 1;
+    }
+
+    /** {@inheritDoc} */
     @Override public Cursor find(Session ses, SearchRow lower, SearchRow upper) {
         try {
             IndexingQueryFilter f = threadLocalFilter();

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2ScanIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2ScanIndex.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2ScanIndex.java
index 3ddd490..3b486c6 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2ScanIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2ScanIndex.java
@@ -42,7 +42,7 @@ public abstract class GridH2ScanIndex<D extends BaseIndex> extends
BaseIndex {
     private static final IndexType TYPE = IndexType.createScan(false);
 
     /** */
-    protected final D delegate;
+    private final D delegate;
 
     /**
      * @param delegate Delegate.
@@ -51,6 +51,13 @@ public abstract class GridH2ScanIndex<D extends BaseIndex> extends
BaseIndex {
         this.delegate = delegate;
     }
 
+    /**
+     * @return Delegate.
+     */
+    protected D delegate() {
+        return delegate;
+    }
+
     /** {@inheritDoc} */
     @Override public long getDiskSpaceUsed() {
         return 0;
@@ -58,7 +65,7 @@ public abstract class GridH2ScanIndex<D extends BaseIndex> extends
BaseIndex {
 
     /** {@inheritDoc} */
     @Override public void add(Session ses, Row row) {
-        delegate.add(ses, row);
+        delegate().add(ses, row);
     }
 
     /** {@inheritDoc} */
@@ -73,7 +80,7 @@ public abstract class GridH2ScanIndex<D extends BaseIndex> extends
BaseIndex {
 
     /** {@inheritDoc} */
     @Override public boolean canScan() {
-        return delegate.canScan();
+        return delegate().canScan();
     }
 
     /** {@inheritDoc} */
@@ -88,7 +95,7 @@ public abstract class GridH2ScanIndex<D extends BaseIndex> extends
BaseIndex {
 
     /** {@inheritDoc} */
     @Override public int compareRows(SearchRow rowData, SearchRow compare) {
-        return delegate.compareRows(rowData, compare);
+        return delegate().compareRows(rowData, compare);
     }
 
     /** {@inheritDoc} */
@@ -98,7 +105,7 @@ public abstract class GridH2ScanIndex<D extends BaseIndex> extends
BaseIndex {
 
     /** {@inheritDoc} */
     @Override public Cursor find(Session ses, SearchRow first, SearchRow last) {
-        return delegate.find(ses, null, null);
+        return delegate().find(ses, null, null);
     }
 
     /** {@inheritDoc} */
@@ -118,12 +125,12 @@ public abstract class GridH2ScanIndex<D extends BaseIndex> extends
BaseIndex {
 
     /** {@inheritDoc} */
     @Override public Column[] getColumns() {
-        return delegate.getColumns();
+        return delegate().getColumns();
     }
 
     /** {@inheritDoc} */
     @Override public IndexColumn[] getIndexColumns() {
-        return delegate.getIndexColumns();
+        return delegate().getIndexColumns();
     }
 
     /** {@inheritDoc} */
@@ -133,27 +140,27 @@ public abstract class GridH2ScanIndex<D extends BaseIndex> extends
BaseIndex {
 
     /** {@inheritDoc} */
     @Override public Row getRow(Session ses, long key) {
-        return delegate.getRow(ses, key);
+        return delegate().getRow(ses, key);
     }
 
     /** {@inheritDoc} */
     @Override public long getRowCount(Session ses) {
-        return delegate.getRowCount(ses);
+        return delegate().getRowCount(ses);
     }
 
     /** {@inheritDoc} */
     @Override public long getRowCountApproximation() {
-        return delegate.getRowCountApproximation();
+        return delegate().getRowCountApproximation();
     }
 
     /** {@inheritDoc} */
     @Override public Table getTable() {
-        return delegate.getTable();
+        return delegate().getTable();
     }
 
     /** {@inheritDoc} */
     @Override public boolean isRowIdIndex() {
-        return delegate.isRowIdIndex();
+        return delegate().isRowIdIndex();
     }
 
     /** {@inheritDoc} */
@@ -178,7 +185,7 @@ public abstract class GridH2ScanIndex<D extends BaseIndex> extends
BaseIndex {
 
     /** {@inheritDoc} */
     @Override public IndexLookupBatch createLookupBatch(TableFilter filter) {
-        return delegate.createLookupBatch(filter);
+        return delegate().createLookupBatch(filter);
     }
 
     /** {@inheritDoc} */
@@ -188,12 +195,12 @@ public abstract class GridH2ScanIndex<D extends BaseIndex> extends
BaseIndex {
 
     /** {@inheritDoc} */
     @Override public Schema getSchema() {
-        return delegate.getSchema();
+        return delegate().getSchema();
     }
 
     /** {@inheritDoc} */
     @Override public boolean isHidden() {
-        return delegate.isHidden();
+        return delegate().isHidden();
     }
 
     /** {@inheritDoc} */
@@ -203,12 +210,12 @@ public abstract class GridH2ScanIndex<D extends BaseIndex> extends
BaseIndex {
 
     /** {@inheritDoc} */
     @Override public ArrayList<DbObject> getChildren() {
-        return delegate.getChildren();
+        return delegate().getChildren();
     }
 
     /** {@inheritDoc} */
     @Override public String getComment() {
-        return delegate.getComment();
+        return delegate().getComment();
     }
 
     /** {@inheritDoc} */
@@ -218,37 +225,37 @@ public abstract class GridH2ScanIndex<D extends BaseIndex> extends
BaseIndex {
 
     /** {@inheritDoc} */
     @Override public String getCreateSQLForCopy(Table tbl, String quotedName) {
-        return delegate.getCreateSQLForCopy(tbl, quotedName);
+        return delegate().getCreateSQLForCopy(tbl, quotedName);
     }
 
     /** {@inheritDoc} */
     @Override public Database getDatabase() {
-        return delegate.getDatabase();
+        return delegate().getDatabase();
     }
 
     /** {@inheritDoc} */
     @Override public String getDropSQL() {
-        return delegate.getDropSQL();
+        return delegate().getDropSQL();
     }
 
     /** {@inheritDoc} */
     @Override public int getId() {
-        return delegate.getId();
+        return delegate().getId();
     }
 
     /** {@inheritDoc} */
     @Override public String getSQL() {
-        return delegate.getSQL();
+        return delegate().getSQL();
     }
 
     /** {@inheritDoc} */
     @Override public int getType() {
-        return delegate.getType();
+        return delegate().getType();
     }
 
     /** {@inheritDoc} */
     @Override public boolean isTemporary() {
-        return delegate.isTemporary();
+        return delegate().isTemporary();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
index 743f77a..0dd4182 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
@@ -100,7 +100,7 @@ public class GridH2Table extends TableBase {
     private final H2RowFactory rowFactory;
 
     /** */
-    private volatile boolean rebuildFromHashInProgress = false;
+    private volatile boolean rebuildFromHashInProgress;
 
     /**
      * Creates table.
@@ -947,15 +947,27 @@ public class GridH2Table extends TableBase {
      * Wrapper type for primary key.
      */
     @SuppressWarnings("PackageVisibleInnerClass")
-    static class ScanIndex extends GridH2ScanIndex<GridH2IndexBase> {
+    class ScanIndex extends GridH2ScanIndex<GridH2IndexBase> {
         /** */
         static final String SCAN_INDEX_NAME_SUFFIX = "__SCAN_";
 
+        /** */
+        private final GridH2IndexBase hashIdx;
+
+        /**
+         * Constructor.
+         */
+        private ScanIndex(GridH2IndexBase treeIdx, GridH2IndexBase hashIdx) {
+            super(treeIdx);
+
+            this.hashIdx = hashIdx;
+        }
+
         /**
-         * @param delegate Delegate.
+         *
          */
-        public ScanIndex(GridH2IndexBase delegate) {
-            super(delegate);
+        @Override protected GridH2IndexBase delegate() {
+            return rebuildFromHashInProgress ? hashIdx : super.delegate();
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
index eb00c39..ea0b64b 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
@@ -191,11 +191,6 @@ public class GridH2TreeIndex extends GridH2IndexBase implements Comparator<GridS
     @Override public void destroy() {
         assert threadLocalSnapshot() == null;
 
-        for (int i = 0; i < segments.length; i++) {
-            if (segments[i] instanceof AutoCloseable)
-                U.closeQuiet((AutoCloseable)segments[i]);
-        }
-
         super.destroy();
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java
index fb7ef34..21fedf4 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java
@@ -63,9 +63,10 @@ public class IgniteSqlSchemaIndexingTest extends GridCommonAbstractTest
{
     /**
      * @param name Cache name.
      * @param partitioned Partition or replicated cache.
+     * @param idxTypes Indexed types.
      * @return Cache configuration.
      */
-    private static CacheConfiguration cacheConfig(String name, boolean partitioned) {
+    private static CacheConfiguration cacheConfig(String name, boolean partitioned, Class<?>...
idxTypes) {
         return new CacheConfiguration()
             .setName(name)
             .setCacheMode(partitioned ? CacheMode.PARTITIONED : CacheMode.REPLICATED)
@@ -90,9 +91,9 @@ public class IgniteSqlSchemaIndexingTest extends GridCommonAbstractTest
{
 
         GridTestUtils.assertThrows(log, new Callable<Object>() {
             @Override public Object call() throws Exception {
-                final CacheConfiguration cfg = cacheConfig("InSensitiveCache", true)
+                final CacheConfiguration cfg = cacheConfig("InSensitiveCache", true, Integer.class,
Integer.class)
                     .setSqlSchema("InsensitiveCache");
-                final CacheConfiguration collisionCfg = cacheConfig("InsensitiveCache", true)
+                final CacheConfiguration collisionCfg = cacheConfig("InsensitiveCache", true,
Integer.class, Integer.class)
                     .setSqlSchema("Insensitivecache");
                 IgniteConfiguration icfg = new IgniteConfiguration()
                     .setLocalHost("127.0.0.1")
@@ -113,9 +114,9 @@ public class IgniteSqlSchemaIndexingTest extends GridCommonAbstractTest
{
     public void testCacheUnregistration() throws Exception {
         startGridsMultiThreaded(3, true);
 
-        final CacheConfiguration<Integer, Fact> cfg = cacheConfig("Insensitive_Cache",
true)
+        final CacheConfiguration<Integer, Fact> cfg = cacheConfig("Insensitive_Cache",
true, Integer.class, Fact.class)
             .setSqlSchema("Insensitive_Cache");
-        final CacheConfiguration<Integer, Fact> collisionCfg = cacheConfig("InsensitiveCache",
true)
+        final CacheConfiguration<Integer, Fact> collisionCfg = cacheConfig("InsensitiveCache",
true, Integer.class, Fact.class)
             .setSqlSchema("Insensitive_Cache");
 
         IgniteCache<Integer, Fact> cache = ignite(0).createCache(cfg);
@@ -152,11 +153,11 @@ public class IgniteSqlSchemaIndexingTest extends GridCommonAbstractTest
{
     public void testSchemaEscapeAll() throws Exception {
         startGridsMultiThreaded(3, true);
 
-        final CacheConfiguration<Integer, Fact> cfg = cacheConfig("simpleSchema", true)
+        final CacheConfiguration<Integer, Fact> cfg = cacheConfig("simpleSchema", true,
Integer.class, Fact.class)
             .setSqlSchema("SchemaName1")
             .setSqlEscapeAll(true);
 
-        final CacheConfiguration<Integer, Fact> cfgEsc = cacheConfig("escapedSchema",
true)
+        final CacheConfiguration<Integer, Fact> cfgEsc = cacheConfig("escapedSchema",
true, Integer.class, Fact.class)
             .setSqlSchema("\"SchemaName2\"")
             .setSqlEscapeAll(true);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
index 565ee61..dc6c4e2 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
@@ -95,7 +95,7 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest {
     private static IgniteCache<Object, Cancel> cacheCancel;
 
     /** Cache execute. */
-    private static IgniteCache<Integer, Exec> cacheExec;
+    private static IgniteCache<Object, Exec> cacheExec;
 
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
index 39b2ce4..9668072 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
@@ -139,7 +139,7 @@ class VisorCacheScanCommand {
         val firstPage =
             try
                 executeRandom(groupForDataNode(node, cacheName),
-                    classOf[VisorQueryTask], new VisorQueryArg(cacheName, null, false, false,
pageSize)) match {
+                    classOf[VisorQueryTask], new VisorQueryArg(cacheName, null, false, false,
false, pageSize)) match {
                     case x if x.get1() != null =>
                         error(x.get1())
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/0bdcbb35/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetBenchmark.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetBenchmark.java
index 4187c0b..6154ba4 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetBenchmark.java
@@ -40,34 +40,6 @@ public class IgniteGetBenchmark extends IgniteCacheAbstractBenchmark<Integer,
Ob
             throw new IllegalArgumentException("Preloading amount (\"-pa\", \"--preloadAmount\")
" +
                 "must by less then the range (\"-r\", \"--range\").");
 
-        println(cfg, "Loading data...");
-
-        long start = System.nanoTime();
-
-        try (IgniteDataStreamer<Object, Object> dataLdr = ignite().dataStreamer(CACHE_NAME))
{
-            for (int i = 0; i < args.preloadAmount(); i++) {
-                dataLdr.addData(i, new SampleValue(i));
-
-                if (i % 100000 == 0) {
-                    if (Thread.currentThread().isInterrupted())
-                        break;
-
-                    println("Loaded entries: " + i);
-                }
-            }
-        }
-
-        println(cfg, "Finished populating query data in " + ((System.nanoTime() - start)
/ 1_000_000) + " ms.");
-    }
-
-    /** {@inheritDoc} */
-    @Override public void setUp(BenchmarkConfiguration cfg) throws Exception {
-        super.setUp(cfg);
-
-        if (args.preloadAmount() > args.range())
-            throw new IllegalArgumentException("Preloading amount (\"-pa\", \"--preloadAmount\")
" +
-                "must by less then the range (\"-r\", \"--range\").");
-
         String cacheName = cache().getName();
 
         println(cfg, "Loading data for cache: " + cacheName);


Mime
View raw message